Class: ShopifyAPI::MarketingEvent
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::MarketingEvent
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2022_04/marketing_event.rb,
lib/shopify_api/rest/resources/2022_07/marketing_event.rb,
lib/shopify_api/rest/resources/2022_10/marketing_event.rb,
lib/shopify_api/rest/resources/2023_01/marketing_event.rb,
lib/shopify_api/rest/resources/2023_04/marketing_event.rb,
lib/shopify_api/rest/resources/2023_07/marketing_event.rb,
lib/shopify_api/rest/resources/2023_10/marketing_event.rb,
lib/shopify_api/rest/resources/2024_01/marketing_event.rb,
lib/shopify_api/rest/resources/2024_04/marketing_event.rb,
lib/shopify_api/rest/resources/2024_07/marketing_event.rb,
lib/shopify_api/rest/resources/2024_10/marketing_event.rb
Instance Attribute Summary collapse
-
#budget ⇒ Object
readonly
Returns the value of attribute budget.
-
#budget_type ⇒ Object
readonly
Returns the value of attribute budget_type.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#ended_at ⇒ Object
readonly
Returns the value of attribute ended_at.
-
#event_type ⇒ Object
readonly
Returns the value of attribute event_type.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#manage_url ⇒ Object
readonly
Returns the value of attribute manage_url.
-
#marketed_resources ⇒ Object
readonly
Returns the value of attribute marketed_resources.
-
#marketing_channel ⇒ Object
readonly
Returns the value of attribute marketing_channel.
-
#paid ⇒ Object
readonly
Returns the value of attribute paid.
-
#preview_url ⇒ Object
readonly
Returns the value of attribute preview_url.
-
#referring_domain ⇒ Object
readonly
Returns the value of attribute referring_domain.
-
#remote_id ⇒ Object
readonly
Returns the value of attribute remote_id.
-
#scheduled_to_end_at ⇒ Object
readonly
Returns the value of attribute scheduled_to_end_at.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#UTM_parameters ⇒ Object
readonly
Returns the value of attribute UTM_parameters.
Attributes inherited from Rest::Base
Class Method Summary collapse
- .all(limit: nil, offset: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .count(session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
- .delete(id:, session: ShopifyAPI::Context.active_session) ⇒ Object
- .find(id:, session: ShopifyAPI::Context.active_session) ⇒ Object
Instance Method Summary collapse
- #engagements(occurred_on: nil, impressions_count: nil, views_count: nil, clicks_count: nil, shares_count: nil, favorites_count: nil, comments_count: nil, ad_spend: nil, is_cumulative: nil, body: nil, **kwargs) ⇒ Object
-
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ MarketingEvent
constructor
A new instance of MarketingEvent.
Methods inherited from Rest::Base
api_call_limit, base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, get_path_ids, has_many?, has_one?, inherited, json_body_name, json_response_body_names, #method_missing, next_page?, next_page_info, prev_page?, prev_page_info, primary_key, read_only_attributes, request, #respond_to_missing?, retry_request_after, #save, #save!, #to_hash
Constructor Details
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ MarketingEvent
Returns a new instance of MarketingEvent.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @event_type = T.let(nil, T.nilable(String)) @marketing_channel = T.let(nil, T.nilable(String)) @paid = T.let(nil, T.nilable(T::Boolean)) @started_at = T.let(nil, T.nilable(String)) @UTM_parameters = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped])) @budget = T.let(nil, T.nilable(String)) @budget_type = T.let(nil, T.nilable(String)) @currency = T.let(nil, T.nilable(String)) @description = T.let(nil, T.nilable(String)) @ended_at = T.let(nil, T.nilable(String)) @id = T.let(nil, T.nilable(Integer)) @manage_url = T.let(nil, T.nilable(String)) @marketed_resources = T.let(nil, T.nilable(T::Array[T.untyped])) @preview_url = T.let(nil, T.nilable(String)) @referring_domain = T.let(nil, T.nilable(String)) @remote_id = T.let(nil, T.nilable(String)) @scheduled_to_end_at = T.let(nil, T.nilable(String)) super(session: session, from_hash: from_hash) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ShopifyAPI::Rest::Base
Instance Attribute Details
#budget ⇒ Object (readonly)
Returns the value of attribute budget.
65 66 67 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 65 def budget @budget end |
#budget_type ⇒ Object (readonly)
Returns the value of attribute budget_type.
67 68 69 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 67 def budget_type @budget_type end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
69 70 71 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 69 def currency @currency end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
71 72 73 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 71 def description @description end |
#ended_at ⇒ Object (readonly)
Returns the value of attribute ended_at.
73 74 75 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 73 def ended_at @ended_at end |
#event_type ⇒ Object (readonly)
Returns the value of attribute event_type.
55 56 57 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 55 def event_type @event_type end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
75 76 77 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 75 def id @id end |
#manage_url ⇒ Object (readonly)
Returns the value of attribute manage_url.
77 78 79 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 77 def manage_url @manage_url end |
#marketed_resources ⇒ Object (readonly)
Returns the value of attribute marketed_resources.
79 80 81 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 79 def marketed_resources @marketed_resources end |
#marketing_channel ⇒ Object (readonly)
Returns the value of attribute marketing_channel.
57 58 59 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 57 def marketing_channel @marketing_channel end |
#paid ⇒ Object (readonly)
Returns the value of attribute paid.
59 60 61 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 59 def paid @paid end |
#preview_url ⇒ Object (readonly)
Returns the value of attribute preview_url.
81 82 83 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 81 def preview_url @preview_url end |
#referring_domain ⇒ Object (readonly)
Returns the value of attribute referring_domain.
83 84 85 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 83 def referring_domain @referring_domain end |
#remote_id ⇒ Object (readonly)
Returns the value of attribute remote_id.
85 86 87 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 85 def remote_id @remote_id end |
#scheduled_to_end_at ⇒ Object (readonly)
Returns the value of attribute scheduled_to_end_at.
87 88 89 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 87 def scheduled_to_end_at @scheduled_to_end_at end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
61 62 63 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 61 def started_at @started_at end |
#UTM_parameters ⇒ Object (readonly)
Returns the value of attribute UTM_parameters.
63 64 65 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 63 def UTM_parameters @UTM_parameters end |
Class Method Details
.all(limit: nil, offset: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 135 def all( limit: nil, offset: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {}, params: {limit: limit, offset: offset}.merge(kwargs).compact, ) T.cast(response, T::Array[MarketingEvent]) end |
.count(session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 156 def count( session: ShopifyAPI::Context.active_session, **kwargs ) request( http_method: :get, operation: :count, session: session, ids: {}, params: {}.merge(kwargs).compact, body: {}, entity: nil, ) end |
.delete(id:, session: ShopifyAPI::Context.active_session) ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 114 def delete( id:, session: ShopifyAPI::Context.active_session ) request( http_method: :delete, operation: :delete, session: session, ids: {id: id}, params: {}, ) end |
.find(id:, session: ShopifyAPI::Context.active_session) ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 96 def find( id:, session: ShopifyAPI::Context.active_session ) result = base_find( session: session, ids: {id: id}, params: {}, ) T.cast(result[0], T.nilable(MarketingEvent)) end |
Instance Method Details
#engagements(occurred_on: nil, impressions_count: nil, views_count: nil, clicks_count: nil, shares_count: nil, favorites_count: nil, comments_count: nil, ad_spend: nil, is_cumulative: nil, body: nil, **kwargs) ⇒ Object
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/shopify_api/rest/resources/2022_04/marketing_event.rb', line 188 def engagements( occurred_on: nil, impressions_count: nil, views_count: nil, clicks_count: nil, shares_count: nil, favorites_count: nil, comments_count: nil, ad_spend: nil, is_cumulative: nil, body: nil, **kwargs ) self.class.request( http_method: :post, operation: :engagements, session: @session, ids: {id: @id}, params: {occurred_on: occurred_on, impressions_count: impressions_count, views_count: views_count, clicks_count: clicks_count, shares_count: shares_count, favorites_count: favorites_count, comments_count: comments_count, ad_spend: ad_spend, is_cumulative: is_cumulative}.merge(kwargs).compact, body: body, entity: self, ) end |