class ShopifyAPI::Image
Attributes
created_at[R]
height[R]
id[R]
position[R]
product_id[R]
src[R]
updated_at[R]
variant_ids[R]
width[R]
Public Class Methods
all( product_id: nil, since_id: nil, fields: nil, session: ShopifyAPI::Context.active_session, **kwargs )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/image.rb, line 117 def all( product_id: nil, since_id: nil, fields: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {product_id: product_id}, params: {since_id: since_id, fields: fields}.merge(kwargs).compact, ) T.cast(response, T::Array[Image]) end
count( product_id: nil, since_id: nil, session: ShopifyAPI::Context.active_session, **kwargs )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/image.rb, line 141 def count( product_id: nil, since_id: nil, session: ShopifyAPI::Context.active_session, **kwargs ) request( http_method: :get, operation: :count, session: session, ids: {product_id: product_id}, params: {since_id: since_id}.merge(kwargs).compact, body: {}, entity: nil, ) end
delete( id:, product_id: nil, session: ShopifyAPI::Context.active_session )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/image.rb, line 94 def delete( id:, product_id: nil, session: ShopifyAPI::Context.active_session ) request( http_method: :delete, operation: :delete, session: session, ids: {id: id, product_id: product_id}, params: {}, ) end
find( id:, product_id: nil, fields: nil, session: ShopifyAPI::Context.active_session )
click to toggle source
# File lib/shopify_api/rest/resources/2022_04/image.rb, line 73 def find( id:, product_id: nil, fields: nil, session: ShopifyAPI::Context.active_session ) result = base_find( session: session, ids: {id: id, product_id: product_id}, params: {fields: fields}, ) T.cast(result[0], T.nilable(Image)) 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/image.rb, line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @created_at = T.let(nil, T.nilable(String)) @height = T.let(nil, T.nilable(Integer)) @id = T.let(nil, T.nilable(Integer)) @position = T.let(nil, T.nilable(Integer)) @product_id = T.let(nil, T.nilable(Integer)) @src = T.let(nil, T.nilable(String)) @updated_at = T.let(nil, T.nilable(String)) @variant_ids = T.let(nil, T.nilable(T::Array[T.untyped])) @width = T.let(nil, T.nilable(Integer)) super(session: session, from_hash: from_hash) end