class Shopify::Collection

Extended Modules

Defined in:

shopify/resources/collection.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Shopify::Resource

store : Store store, store=(store : Store) store=

Constructor methods inherited from class Shopify::Resource

new(pull : JSON::PullParser) new

Class methods inherited from class Shopify::Resource

headers headers

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Class Method Detail

def self.find(id : Int64, domain : String, headers : HTTP::Headers = headers) : Shopify::Collection #

Used to fetch one collection.

Generally, this is used with .with(store):

Shopify::Collection.with(store).find(id) #=> Shopify::Collection

But it can be used stand-alone, too:

Shopify::Collection.find(id, domain, headers: headers) #=> Shopify::Collection

Under the covers, this just runs:

GET
/admin/api/2022-01/collections/{id}.json

[View source]
def self.uri(domain : String, path : String = "") : URI #

[View source]
def self.with(store : Store) #

[View source]

Instance Method Detail

def body_html : String? #

[View source]
def body_html=(body_html : String?) #

[View source]
def handle : String #

[View source]
def handle=(handle : String) #

[View source]
def id : Int64 #

[View source]
def id=(id : Int64) #

[View source]
def image : JSON::Any? #

[View source]
def image=(image : JSON::Any?) #

[View source]
def published_at : Time? #

[View source]
def published_at=(published_at : Time?) #

[View source]
def published_scope : String #

[View source]
def published_scope=(published_scope : String) #

[View source]
def sort_order : String #

[View source]
def sort_order=(sort_order : String) #

[View source]
def template_suffix : String? #

[View source]
def template_suffix=(template_suffix : String?) #

[View source]
def title : String #

[View source]
def title=(title : String) #

[View source]
def updated_at : Time #

[View source]
def updated_at=(updated_at : Time) #

[View source]