Class: Falsify::Product
- Inherits:
-
Object
- Object
- Falsify::Product
- Extended by:
- Enumerize
- Defined in:
- lib/falsify/models/product/product.rb
Overview
The Product resource lets you update and create products in a merchant's store. See the API documentation.
Required Fields:
- title
Instance Attribute Summary collapse
-
#body_html ⇒ String
A description of the product.
-
#created_at ⇒ String
readonly
The date and time (ISO 8601 format) when the product was created.
-
#handle ⇒ String
A unique human-friendly string for the product.
-
#id ⇒ String
readonly
An unsigned 64-bit integer that's used as a unique identifier for the product.
-
#images ⇒ String
A list of product image objects, each one representing an image associated with the product.
-
#metafields_global_description_tag ⇒ String
A description of the product used for SEO purposes.
-
#metafields_global_title_tag ⇒ String
The name of the product used for SEO purposes.
-
#options ⇒ String
The custom product property names like
Size
,Color
, andMaterial
. -
#product_type ⇒ String
A categorization for the product used for filtering and searching products.
-
#published_at ⇒ String
The date and time (ISO 8601 format) when the product was published.
-
#published_scope ⇒ :web, :global
Whether the product is published to the Point of Sale channel.
-
#tags ⇒ String
A string of comma-separated tags that are used for filtering and search.
-
#template_suffix ⇒ String?
The suffix of the Liquid template used for the product page.
-
#title ⇒ String
The name of the product.
-
#updated_at ⇒ String
readonly
The date and time (ISO 8601 format) when the product was last modified.
-
#variants ⇒ Array<ProductVariant>
A list of product variants, each representing a different version of the product.
-
#vendor ⇒ String
The name of the product's vendor.
Instance Attribute Details
#body_html ⇒ String
A description of the product. Supports HTML formatting.
13 14 15 |
# File 'lib/falsify/models/product/product.rb', line 13 def body_html @body_html end |
#created_at ⇒ String (readonly)
The date and time (ISO 8601 format) when the product was created.
16 17 18 |
# File 'lib/falsify/models/product/product.rb', line 16 def created_at @created_at end |
#handle ⇒ String
A unique human-friendly string for the product.
Automatically generated from the product's title
.
Used by the Liquid templating language to refer to objects.
21 22 23 |
# File 'lib/falsify/models/product/product.rb', line 21 def handle @handle end |
#id ⇒ String (readonly)
An unsigned 64-bit integer that's used as a unique identifier for the product.
Each id
is unique across the Shopify system.
No two products will have the same id
, even if they're from different shops.
26 27 28 |
# File 'lib/falsify/models/product/product.rb', line 26 def id @id end |
#images ⇒ String
A list of product image objects, each one representing an image associated with the product.
29 30 31 |
# File 'lib/falsify/models/product/product.rb', line 29 def images @images end |
#metafields_global_description_tag ⇒ String
A description of the product used for SEO purposes.
Generally added to the <meta name='description'>
tag.
69 70 71 |
# File 'lib/falsify/models/product/product.rb', line 69 def @metafields_global_description_tag end |
#metafields_global_title_tag ⇒ String
The name of the product used for SEO purposes.
Generally added to the <meta name='title'>
tag.
65 66 67 |
# File 'lib/falsify/models/product/product.rb', line 65 def @metafields_global_title_tag end |
#options ⇒ String
The custom product property names like Size
, Color
, and Material
.
You can add up to 3 options of up to 255 characters each.
33 34 35 |
# File 'lib/falsify/models/product/product.rb', line 33 def @options end |
#product_type ⇒ String
A categorization for the product used for filtering and searching products.
36 37 38 |
# File 'lib/falsify/models/product/product.rb', line 36 def product_type @product_type end |
#published_at ⇒ String
The date and time (ISO 8601 format) when the product was published.
Can be set to null
to unpublish the product from the Online Store channel.
40 41 42 |
# File 'lib/falsify/models/product/product.rb', line 40 def published_at @published_at end |
#published_scope ⇒ :web, :global
Whether the product is published to the Point of Sale channel. Valid values:
web
: The product is published to the Online Store channel but not published to the Point of Sale channel.global
: The product is published to both the Online Store channel and the Point of Sale channel.
47 |
# File 'lib/falsify/models/product/product.rb', line 47 enumerize :published_scope, in: [:web, :global] |
#tags ⇒ String
A string of comma-separated tags that are used for filtering and search. A product can have up to 250 tags. Each tag can have up to 255 characters.
52 53 54 |
# File 'lib/falsify/models/product/product.rb', line 52 def @tags end |
#template_suffix ⇒ String?
The suffix of the Liquid template used for the product page.
If this property is specified, then the product page uses a template called "product.suffix.liquid", where "suffix" is the value of this property.
If this property is ""
or null
, then the product page uses the default template "product.liquid".
(default: null
)
58 59 60 |
# File 'lib/falsify/models/product/product.rb', line 58 def template_suffix @template_suffix end |
#title ⇒ String
The name of the product.
61 62 63 |
# File 'lib/falsify/models/product/product.rb', line 61 def title @title end |
#updated_at ⇒ String (readonly)
The date and time (ISO 8601 format) when the product was last modified.
72 73 74 |
# File 'lib/falsify/models/product/product.rb', line 72 def updated_at @updated_at end |
#variants ⇒ Array<ProductVariant>
A list of product variants, each representing a different version of the product.
The position
property is read-only.
The position of variants is indicated by the order in which they are listed.
To retrieve the presentment_prices
property on a variant, include the request header 'X-Shopify-Api-Features': 'include-presentment-prices'
.
78 79 80 |
# File 'lib/falsify/models/product/product.rb', line 78 def variants @variants end |
#vendor ⇒ String
The name of the product's vendor.
81 82 83 |
# File 'lib/falsify/models/product/product.rb', line 81 def vendor @vendor end |