Class: Falsify::ProductImage

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

Instance Attribute Details

#created_atString

The date and time when the product image was created. The API returns this value in ISO 8601 format.

Returns:

  • (String)


8
9
10
# File 'lib/falsify/models/product/product_image.rb', line 8

def created_at
  @created_at
end

#heightInteger

Height dimension of the image which is determined on upload.

Returns:

  • (Integer)


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

def height
  @height
end

#idString

A unique numeric identifier for the product image.

Returns:

  • (String)


11
12
13
# File 'lib/falsify/models/product/product_image.rb', line 11

def id
  @id
end

#positionInteger

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.

Returns:

  • (Integer)


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

def position
  @position
end

#product_idString

The id of the product associated with the image.

Returns:

  • (String)


18
19
20
# File 'lib/falsify/models/product/product_image.rb', line 18

def product_id
  @product_id
end

#srcString

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).

Returns:

  • (String)


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

def src
  @src
end

#updated_atString

The date and time when the product image was last modified. The API returns this value in ISO 8601 format.

Returns:

  • (String)


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

def updated_at
  @updated_at
end

#variant_idsArray<String>

An array of variant ids associated with the image.

Returns:

  • (Array<String>)


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

def variant_ids
  @variant_ids
end

#widthInteger

Width dimension of the image which is determined on upload.

Returns:

  • (Integer)


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

def width
  @width
end