Class: AbacatePay::Resources::Billings::Product
- Defined in:
- lib/abacate_pay/resources/billings/product.rb
Overview
Represents a product in a billing resource in the AbacatePay system.
This class contains information about a product, such as its identifier, name, description, quantity, and price.
Instance Attribute Summary collapse
-
#description ⇒ String?
Description of the product.
-
#external_id ⇒ String?
External identifier for the product.
-
#name ⇒ String?
Name of the product.
-
#price ⇒ Integer?
Price of the product in smallest currency unit (e.g., cents).
-
#product_id ⇒ String?
Internal identifier for the product in the system.
-
#quantity ⇒ Integer?
Quantity of the product.
Instance Method Summary collapse
-
#initialize(data) ⇒ Product
constructor
Creates a new Product instance.
Constructor Details
#initialize(data) ⇒ Product
Creates a new Product instance
32 33 34 |
# File 'lib/abacate_pay/resources/billings/product.rb', line 32 def initialize(data) fill(data) end |
Instance Attribute Details
#description ⇒ String?
Returns Description of the product.
21 22 23 |
# File 'lib/abacate_pay/resources/billings/product.rb', line 21 def description @description end |
#external_id ⇒ String?
Returns External identifier for the product.
12 13 14 |
# File 'lib/abacate_pay/resources/billings/product.rb', line 12 def external_id @external_id end |
#name ⇒ String?
Returns Name of the product.
18 19 20 |
# File 'lib/abacate_pay/resources/billings/product.rb', line 18 def name @name end |
#price ⇒ Integer?
Returns Price of the product in smallest currency unit (e.g., cents).
27 28 29 |
# File 'lib/abacate_pay/resources/billings/product.rb', line 27 def price @price end |
#product_id ⇒ String?
Returns Internal identifier for the product in the system.
15 16 17 |
# File 'lib/abacate_pay/resources/billings/product.rb', line 15 def product_id @product_id end |
#quantity ⇒ Integer?
Returns Quantity of the product.
24 25 26 |
# File 'lib/abacate_pay/resources/billings/product.rb', line 24 def quantity @quantity end |