class ShopifyAPI::MarketingEvent
Attributes
Public Class Methods
Source
# 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
Source
# 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
Source
# 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
Source
# 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
Source
# 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
Calls superclass method
ShopifyAPI::Rest::Base::new
Public Instance Methods
Source
# 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