class ShopifyAPI::MarketingEvent

Attributes

UTM_parameters[R]
budget[R]
budget_type[R]
currency[R]
description[R]
ended_at[R]
event_type[R]
id[R]
manage_url[R]
marketed_resources[R]
marketing_channel[R]
paid[R]
preview_url[R]
referring_domain[R]
remote_id[R]
scheduled_to_end_at[R]
started_at[R]

Public Class Methods

all( limit: nil, offset: nil, session: ShopifyAPI::Context.active_session, **kwargs ) click to toggle 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
count( session: ShopifyAPI::Context.active_session, **kwargs ) click to toggle 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
delete( id:, session: ShopifyAPI::Context.active_session ) click to toggle 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
find( id:, session: ShopifyAPI::Context.active_session ) click to toggle 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
new(session: ShopifyAPI::Context.active_session, from_hash: nil) click to toggle source
Calls superclass method ShopifyAPI::Rest::Base::new
# 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

Public Instance Methods

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 ) click to toggle 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