class Shopify::SmartCollection
- Shopify::SmartCollection
- Shopify::Resource
- Reference
- Object
Extended Modules
- Shopify::Resource::ClassMethods
Defined in:
shopify/resources/smart_collection.crConstructors
Class Method Summary
-
.create(body : String, domain : String, headers : HTTP::Headers = headers) : Shopify::SmartCollection
Used to create one smartcollection.
-
.find(id : Int64, domain : String, headers : HTTP::Headers = headers) : Shopify::SmartCollection
Used to fetch one smartcollection.
- .uri(domain : String, path : String = "") : URI
- .with(store : Store)
Instance Method Summary
- #body_html : String?
- #body_html=(body_html : String?)
- #handle : String
- #handle=(handle : String)
- #id : Int64
- #id=(id : Int64)
- #image : JSON::Any?
- #image=(image : JSON::Any?)
- #published_at : Time?
- #published_at=(published_at : Time?)
- #published_scope : String
- #published_scope=(published_scope : String)
- #sort_order : String
- #sort_order=(sort_order : String)
- #template_suffix : String?
- #template_suffix=(template_suffix : String?)
- #title : String
- #title=(title : String)
- #updated_at : Time
- #updated_at=(updated_at : Time)
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
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
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