Class: AbacatePay::Resources::Products
- Defined in:
- lib/abacate_pay/resources/products.rb
Overview
Represents a catalogue product in the AbacatePay system.
Constant Summary collapse
- ENUM_PROPERTIES =
{ cycle: "AbacatePay::Enums::Products::Cycles" }.freeze
- DATETIME_PROPERTIES =
%w[created_at updated_at].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#cycle ⇒ Object
readonly
Returns the value of attribute cycle.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#external_id ⇒ Object
readonly
Returns the value of attribute external_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#image_url ⇒ Object
readonly
Returns the value of attribute image_url.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(data) ⇒ Products
constructor
A new instance of Products.
Constructor Details
#initialize(data) ⇒ Products
Returns a new instance of Products.
16 17 18 |
# File 'lib/abacate_pay/resources/products.rb', line 16 def initialize(data) fill(data) end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
13 14 15 |
# File 'lib/abacate_pay/resources/products.rb', line 13 def created_at @created_at end |
#currency ⇒ Object
Returns the value of attribute currency.
13 14 15 |
# File 'lib/abacate_pay/resources/products.rb', line 13 def currency @currency end |
#cycle ⇒ Object
Returns the value of attribute cycle.
13 14 15 |
# File 'lib/abacate_pay/resources/products.rb', line 13 def cycle @cycle end |
#description ⇒ Object
Returns the value of attribute description.
13 14 15 |
# File 'lib/abacate_pay/resources/products.rb', line 13 def description @description end |
#external_id ⇒ Object
Returns the value of attribute external_id.
13 14 15 |
# File 'lib/abacate_pay/resources/products.rb', line 13 def external_id @external_id end |
#id ⇒ Object
Returns the value of attribute id.
13 14 15 |
# File 'lib/abacate_pay/resources/products.rb', line 13 def id @id end |
#image_url ⇒ Object
Returns the value of attribute image_url.
13 14 15 |
# File 'lib/abacate_pay/resources/products.rb', line 13 def image_url @image_url end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/abacate_pay/resources/products.rb', line 13 def name @name end |
#price ⇒ Object
Returns the value of attribute price.
13 14 15 |
# File 'lib/abacate_pay/resources/products.rb', line 13 def price @price end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
13 14 15 |
# File 'lib/abacate_pay/resources/products.rb', line 13 def updated_at @updated_at end |