class ShopifyAPI::Theme

Attributes

created_at[R]
id[R]
name[R]
previewable[R]
processing[R]
role[R]
src[R]
theme_store_id[R]
updated_at[R]

Public Class Methods

all( fields: nil, session: ShopifyAPI::Context.active_session, **kwargs ) click to toggle source
# File lib/shopify_api/rest/resources/2022_04/theme.rb, line 110
def all(
  fields: nil,
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  response = base_find(
    session: session,
    ids: {},
    params: {fields: fields}.merge(kwargs).compact,
  )

  T.cast(response, T::Array[Theme])
end
delete( id:, session: ShopifyAPI::Context.active_session ) click to toggle source
# File lib/shopify_api/rest/resources/2022_04/theme.rb, line 90
def delete(
  id:,
  session: ShopifyAPI::Context.active_session
)
  request(
    http_method: :delete,
    operation: :delete,
    session: session,
    ids: {id: id},
    params: {},
  )
end
find( id:, fields: nil, session: ShopifyAPI::Context.active_session ) click to toggle source
# File lib/shopify_api/rest/resources/2022_04/theme.rb, line 71
def find(
  id:,
  fields: nil,
  session: ShopifyAPI::Context.active_session
)
  result = base_find(
    session: session,
    ids: {id: id},
    params: {fields: fields},
  )
  T.cast(result[0], T.nilable(Theme))
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/theme.rb, line 19
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)

  @created_at = T.let(nil, T.nilable(String))
  @id = T.let(nil, T.nilable(Integer))
  @name = T.let(nil, T.nilable(String))
  @previewable = T.let(nil, T.nilable(T::Boolean))
  @processing = T.let(nil, T.nilable(T::Boolean))
  @role = T.let(nil, T.nilable(String))
  @src = T.let(nil, T.nilable(String))
  @theme_store_id = T.let(nil, T.nilable(Integer))
  @updated_at = T.let(nil, T.nilable(String))

  super(session: session, from_hash: from_hash)
end