class ShopifyAPI::Product
Attributes
Public Class Methods
Source
# File lib/shopify_api/rest/resources/2022_04/product.rb, line 152 def all( ids: nil, limit: nil, since_id: nil, title: nil, vendor: nil, handle: nil, product_type: nil, status: nil, collection_id: nil, created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, published_at_min: nil, published_at_max: nil, published_status: nil, fields: nil, presentment_currencies: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {}, params: {ids: ids, limit: limit, since_id: since_id, title: title, vendor: vendor, handle: handle, product_type: product_type, status: status, collection_id: collection_id, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, published_at_min: published_at_min, published_at_max: published_at_max, published_status: published_status, fields: fields, presentment_currencies: presentment_currencies}.merge(kwargs).compact, ) T.cast(response, T::Array[Product]) end
Source
# File lib/shopify_api/rest/resources/2022_04/product.rb, line 199 def count( vendor: nil, product_type: nil, collection_id: nil, created_at_min: nil, created_at_max: nil, updated_at_min: nil, updated_at_max: nil, published_at_min: nil, published_at_max: nil, published_status: nil, session: ShopifyAPI::Context.active_session, **kwargs ) request( http_method: :get, operation: :count, session: session, ids: {}, params: {vendor: vendor, product_type: product_type, collection_id: collection_id, created_at_min: created_at_min, created_at_max: created_at_max, updated_at_min: updated_at_min, updated_at_max: updated_at_max, published_at_min: published_at_min, published_at_max: published_at_max, published_status: published_status}.merge(kwargs).compact, body: {}, entity: nil, ) end
Source
# File lib/shopify_api/rest/resources/2022_04/product.rb, line 115 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/product.rb, line 96 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(Product)) end
Source
# File lib/shopify_api/rest/resources/2022_04/product.rb, line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @title = T.let(nil, T.nilable(String)) @body_html = T.let(nil, T.nilable(String)) @created_at = T.let(nil, T.nilable(String)) @handle = T.let(nil, T.nilable(String)) @id = T.let(nil, T.nilable(Integer)) @images = T.let(nil, T.nilable(T::Array[T.untyped])) @options = T.let(nil, T.nilable(T.any(T::Hash[T.untyped, T.untyped], T::Array[T.untyped]))) @product_type = T.let(nil, T.nilable(String)) @published_at = T.let(nil, T.nilable(String)) @published_scope = T.let(nil, T.nilable(String)) @status = T.let(nil, T.nilable(String)) @tags = T.let(nil, T.nilable(T.any(String, T::Array[T.untyped]))) @template_suffix = T.let(nil, T.nilable(String)) @updated_at = T.let(nil, T.nilable(String)) @variants = T.let(nil, T.nilable(T::Array[T.untyped])) @vendor = T.let(nil, T.nilable(String)) super(session: session, from_hash: from_hash) end
Calls superclass method
ShopifyAPI::Rest::Base::new