Class: Afterpay::Components::Item
- Defined in:
- lib/afterpay/components/item.rb
Instance Attribute Summary collapse
-
#categories ⇒ Array
An array of arrays to accommodate multiple categories that apply to the item.
-
#estimated_shipment_date ⇒ String
The estimated date when the order will be shipped, in YYYY-MM or YYYY-MM-DD format.
-
#image_url ⇒ String
A URL for a web-optimised photo of the item, suitable for use directly as the src attribute of an img tag.
-
#name ⇒ String
Product’s name.
-
#page_url ⇒ String
The canonical URL for the item’s Product Detail Page.
-
#preorder ⇒ Object
Should return false when the estimated_shipment_date is already passed otherwise true.
-
#price ⇒ Afterpay::Components::Money
The unit price of the individual item.
-
#quantity ⇒ Integer
The quantity of the item.
-
#sku ⇒ String
Product’s SKU.
Method Summary
Methods included from Initializable
Methods included from Representable
Instance Attribute Details
#categories ⇒ Array
An array of arrays to accommodate multiple categories that apply to the item. Each array represents a hierarchical path to a category, with the left-most category being the top-level parent category.
40 41 42 |
# File 'lib/afterpay/components/item.rb', line 40 def categories @categories end |
#estimated_shipment_date ⇒ String
The estimated date when the order will be shipped, in YYYY-MM or YYYY-MM-DD format
45 46 47 |
# File 'lib/afterpay/components/item.rb', line 45 def estimated_shipment_date @estimated_shipment_date end |
#image_url ⇒ String
A URL for a web-optimised photo of the item, suitable for use directly as the src attribute of an img tag. Limited to 2048 characters.
24 25 26 |
# File 'lib/afterpay/components/item.rb', line 24 def image_url @image_url end |
#name ⇒ String
Product’s name
9 10 11 |
# File 'lib/afterpay/components/item.rb', line 9 def name @name end |
#page_url ⇒ String
The canonical URL for the item’s Product Detail Page. Limited to 2048 characters.
19 20 21 |
# File 'lib/afterpay/components/item.rb', line 19 def page_url @page_url end |
#preorder ⇒ Object
Should return false when the estimated_shipment_date is already passed otherwise true
50 51 52 |
# File 'lib/afterpay/components/item.rb', line 50 def preorder @preorder end |
#price ⇒ Afterpay::Components::Money
The unit price of the individual item. Must be a positive value.
34 35 36 |
# File 'lib/afterpay/components/item.rb', line 34 def price @price end |
#quantity ⇒ Integer
The quantity of the item.
29 30 31 |
# File 'lib/afterpay/components/item.rb', line 29 def quantity @quantity end |
#sku ⇒ String
Product’s SKU
14 15 16 |
# File 'lib/afterpay/components/item.rb', line 14 def sku @sku end |