# File lib/shopify_api/rest/resources/2022_04/collection_listing.rb, line 69 def primary_key() "collection_id" end
class ShopifyAPI::CollectionListing
Attributes
Public Class Methods
Source
# File lib/shopify_api/rest/resources/2022_04/collection_listing.rb, line 117 def all( limit: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {}, params: {limit: limit}.merge(kwargs).compact, ) T.cast(response, T::Array[CollectionListing]) end
Source
# File lib/shopify_api/rest/resources/2022_04/collection_listing.rb, line 97 def delete( collection_id:, session: ShopifyAPI::Context.active_session ) request( http_method: :delete, operation: :delete, session: session, ids: {collection_id: collection_id}, params: {}, ) end
Source
# File lib/shopify_api/rest/resources/2022_04/collection_listing.rb, line 79 def find( collection_id:, session: ShopifyAPI::Context.active_session ) result = base_find( session: session, ids: {collection_id: collection_id}, params: {}, ) T.cast(result[0], T.nilable(CollectionListing)) end
Source
# File lib/shopify_api/rest/resources/2022_04/collection_listing.rb, line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @body_html = T.let(nil, T.nilable(String)) @collection_id = T.let(nil, T.nilable(Integer)) @default_product_image = T.let(nil, T.nilable(T::Array[T.untyped])) @handle = T.let(nil, T.nilable(String)) @image = T.let(nil, T.nilable(Image)) @published_at = T.let(nil, T.nilable(String)) @sort_order = T.let(nil, T.nilable(String)) @title = T.let(nil, T.nilable(String)) @updated_at = T.let(nil, T.nilable(String)) super(session: session, from_hash: from_hash) end
Calls superclass method
ShopifyAPI::Rest::Base::new
Source
Source
# File lib/shopify_api/rest/resources/2022_04/collection_listing.rb, line 139 def product_ids( collection_id:, limit: nil, session: ShopifyAPI::Context.active_session, **kwargs ) request( http_method: :get, operation: :product_ids, session: session, ids: {collection_id: collection_id}, params: {limit: limit}.merge(kwargs).compact, body: {}, entity: nil, ) end