class Shopify::SmartCollection

Extended Modules

Defined in:

shopify/resources/smart_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.create(body : String, domain : String, headers : HTTP::Headers = headers) : Shopify::SmartCollection #

Used to create one smartcollection.

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

Shopify::SmartCollection.with(store).create(body) #=> Shopify::SmartCollection

But it can be used stand-alone, too:

Shopify::SmartCollection.create(body, domain, headers: headers) #=> Shopify::SmartCollection

Under the covers, this just runs:

POST
/admin/api/2022-01/smartcollections.json

[View source]
def self.find(id : Int64, domain : String, headers : HTTP::Headers = headers) : Shopify::SmartCollection #

Used to fetch one smartcollection.

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

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

But it can be used stand-alone, too:

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

Under the covers, this just runs:

GET
/admin/api/2022-01/smartcollections/{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]