class ShopifyAPI::InventoryItem

Attributes

cost[R]
country_code_of_origin[R]
country_harmonized_system_codes[R]
created_at[R]
harmonized_system_code[R]
id[R]
province_code_of_origin[R]
requires_shipping[R]
sku[R]
tracked[R]
updated_at[R]

Public Class Methods

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

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

  @cost = T.let(nil, T.nilable(String))
  @country_code_of_origin = T.let(nil, T.nilable(String))
  @country_harmonized_system_codes = T.let(nil, T.nilable(T::Array[T.untyped]))
  @created_at = T.let(nil, T.nilable(String))
  @harmonized_system_code = T.let(nil, T.nilable(T.any(Integer, String)))
  @id = T.let(nil, T.nilable(Integer))
  @province_code_of_origin = T.let(nil, T.nilable(String))
  @requires_shipping = T.let(nil, T.nilable(T::Boolean))
  @sku = T.let(nil, T.nilable(String))
  @tracked = T.let(nil, T.nilable(T::Boolean))
  @updated_at = T.let(nil, T.nilable(String))

  super(session: session, from_hash: from_hash)
end