Class: Falsify::Product

Inherits:
Object
  • Object
show all
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

Instance Attribute Details

#body_htmlString

A description of the product. Supports HTML formatting.

Returns:

  • (String)


13
14
15
# File 'lib/falsify/models/product/product.rb', line 13

def body_html
  @body_html
end

#created_atString (readonly)

The date and time (ISO 8601 format) when the product was created.

Returns:

  • (String)


16
17
18
# File 'lib/falsify/models/product/product.rb', line 16

def created_at
  @created_at
end

#handleString

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.

Returns:

  • (String)


21
22
23
# File 'lib/falsify/models/product/product.rb', line 21

def handle
  @handle
end

#idString (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.

Returns:

  • (String)


26
27
28
# File 'lib/falsify/models/product/product.rb', line 26

def id
  @id
end

#imagesString

A list of product image objects, each one representing an image associated with the product.

Returns:

  • (String)


29
30
31
# File 'lib/falsify/models/product/product.rb', line 29

def images
  @images
end

#metafields_global_description_tagString

A description of the product used for SEO purposes. Generally added to the <meta name='description'> tag.

Returns:

  • (String)


69
70
71
# File 'lib/falsify/models/product/product.rb', line 69

def metafields_global_description_tag
  @metafields_global_description_tag
end

#metafields_global_title_tagString

The name of the product used for SEO purposes. Generally added to the <meta name='title'> tag.

Returns:

  • (String)


65
66
67
# File 'lib/falsify/models/product/product.rb', line 65

def metafields_global_title_tag
  @metafields_global_title_tag
end

#optionsString

The custom product property names like Size, Color, and Material. You can add up to 3 options of up to 255 characters each.

Returns:

  • (String)


33
34
35
# File 'lib/falsify/models/product/product.rb', line 33

def options
  @options
end

#product_typeString

A categorization for the product used for filtering and searching products.

Returns:

  • (String)


36
37
38
# File 'lib/falsify/models/product/product.rb', line 36

def product_type
  @product_type
end

#published_atString

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.

Returns:

  • (String)


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.

Returns:

  • (:web, :global)


47
# File 'lib/falsify/models/product/product.rb', line 47

enumerize :published_scope, in: [:web, :global]

#tagsString

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.

Returns:

  • (String)


52
53
54
# File 'lib/falsify/models/product/product.rb', line 52

def tags
  @tags
end

#template_suffixString?

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)

Returns:

  • (String, nil)


58
59
60
# File 'lib/falsify/models/product/product.rb', line 58

def template_suffix
  @template_suffix
end

#titleString

The name of the product.

Returns:

  • (String)


61
62
63
# File 'lib/falsify/models/product/product.rb', line 61

def title
  @title
end

#updated_atString (readonly)

The date and time (ISO 8601 format) when the product was last modified.

Returns:

  • (String)


72
73
74
# File 'lib/falsify/models/product/product.rb', line 72

def updated_at
  @updated_at
end

#variantsArray<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'.

Returns:



78
79
80
# File 'lib/falsify/models/product/product.rb', line 78

def variants
  @variants
end

#vendorString

The name of the product's vendor.

Returns:

  • (String)


81
82
83
# File 'lib/falsify/models/product/product.rb', line 81

def vendor
  @vendor
end