Class: Falsify::ProductImage
- Inherits:
-
Object
- Object
- Falsify::ProductImage
- Defined in:
- lib/falsify/models/product/product_image.rb
Overview
See the API documentation. Any product may have up to 250 images, and images can be in .png, .gif or .jpg format.
Instance Attribute Summary collapse
-
#created_at ⇒ String
The date and time when the product image was created.
-
#height ⇒ Integer
Height dimension of the image which is determined on upload.
-
#id ⇒ String
A unique numeric identifier for the product image.
-
#position ⇒ Integer
The order of the product image in the list.
-
#product_id ⇒ String
The id of the product associated with the image.
-
#src ⇒ String
Specifies the location of the product image.
-
#updated_at ⇒ String
The date and time when the product image was last modified.
-
#variant_ids ⇒ Array<String>
An array of variant ids associated with the image.
-
#width ⇒ Integer
Width dimension of the image which is determined on upload.
Instance Attribute Details
#created_at ⇒ String
The date and time when the product image was created. The API returns this value in ISO 8601 format.
8 9 10 |
# File 'lib/falsify/models/product/product_image.rb', line 8 def created_at @created_at end |
#height ⇒ Integer
Height dimension of the image which is determined on upload.
33 34 35 |
# File 'lib/falsify/models/product/product_image.rb', line 33 def height @height end |
#id ⇒ String
A unique numeric identifier for the product image.
11 12 13 |
# File 'lib/falsify/models/product/product_image.rb', line 11 def id @id end |
#position ⇒ Integer
The order of the product image in the list. The first product image is at position 1 and is the "main" image for the product.
15 16 17 |
# File 'lib/falsify/models/product/product_image.rb', line 15 def position @position end |
#product_id ⇒ String
The id of the product associated with the image.
18 19 20 |
# File 'lib/falsify/models/product/product_image.rb', line 18 def product_id @product_id end |
#src ⇒ String
Specifies the location of the product image.
This parameter supports URL filters that you can use to retrieve modified copies of the image.
For example, add _small
, to the filename to retrieve a scaled copy of the image at 100 x 100 px (for example, ipod-nano_small.png
),
or add _2048x2048
to retrieve a copy of the image constrained at 2048 x 2048 px resolution (for example, ipod-nano_2048x2048.png
).
27 28 29 |
# File 'lib/falsify/models/product/product_image.rb', line 27 def src @src end |
#updated_at ⇒ String
The date and time when the product image was last modified. The API returns this value in ISO 8601 format.
37 38 39 |
# File 'lib/falsify/models/product/product_image.rb', line 37 def updated_at @updated_at end |
#variant_ids ⇒ Array<String>
An array of variant ids associated with the image.
21 22 23 |
# File 'lib/falsify/models/product/product_image.rb', line 21 def variant_ids @variant_ids end |
#width ⇒ Integer
Width dimension of the image which is determined on upload.
30 31 32 |
# File 'lib/falsify/models/product/product_image.rb', line 30 def width @width end |