Class: AbacatePay::Resources::Billings
- Defined in:
- lib/abacate_pay/resources/billings.rb,
lib/abacate_pay/resources/billings/product.rb,
lib/abacate_pay/resources/billings/metadata.rb
Overview
Represents a billing resource in the AbacatePay payment system.
Manages billing-related data including payment methods, products, scheduling, and customer information for recurring and one-time payments.
Defined Under Namespace
Constant Summary collapse
- RESOURCE_PROPERTIES =
Maps property names to their corresponding resource classes
{ metadata: "AbacatePay::Resources::Billings::Metadata", customer: "AbacatePay::Resources::Customers", products: "AbacatePay::Resources::Billings::Product" }.freeze
- ENUM_PROPERTIES =
Maps property names to their corresponding enum classes
{ status: "AbacatePay::Enums::Billings::Statuses", frequency: "AbacatePay::Enums::Billings::Frequencies", methods: "AbacatePay::Enums::Billings::Methods" }.freeze
- DATETIME_PROPERTIES =
Properties that should be handled as DateTime objects
%w[ next_billing created_at updated_at ].freeze
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Basic attributes.
-
#amount ⇒ Object
readonly
Basic attributes.
-
#created_at ⇒ Object
readonly
DateTime attributes.
-
#customer ⇒ Object
readonly
Complex attributes.
-
#dev_mode ⇒ Object
readonly
Basic attributes.
-
#frequency ⇒ Object
readonly
Enum attributes.
-
#id ⇒ Object
readonly
Basic attributes.
-
#metadata ⇒ Object
readonly
Complex attributes.
-
#methods ⇒ Object
readonly
Complex attributes.
-
#next_billing ⇒ Object
readonly
DateTime attributes.
-
#products ⇒ Object
readonly
Complex attributes.
-
#status ⇒ Object
readonly
Enum attributes.
-
#updated_at ⇒ Object
readonly
DateTime attributes.
-
#url ⇒ Object
readonly
Basic attributes.
Instance Method Summary collapse
-
#dev_mode? ⇒ Boolean?
Checks if billing is in development mode.
-
#initialize(data) ⇒ Billings
constructor
Creates a new Billing instance.
Constructor Details
#initialize(data) ⇒ Billings
Creates a new Billing instance
47 48 49 |
# File 'lib/abacate_pay/resources/billings.rb', line 47 def initialize(data) fill(data) end |
Instance Attribute Details
#account_id ⇒ Object
Basic attributes
32 33 34 |
# File 'lib/abacate_pay/resources/billings.rb', line 32 def account_id @account_id end |
#amount ⇒ Object
Basic attributes
32 33 34 |
# File 'lib/abacate_pay/resources/billings.rb', line 32 def amount @amount end |
#created_at ⇒ Object
DateTime attributes
41 42 43 |
# File 'lib/abacate_pay/resources/billings.rb', line 41 def created_at @created_at end |
#customer ⇒ Object
Complex attributes
35 36 37 |
# File 'lib/abacate_pay/resources/billings.rb', line 35 def customer @customer end |
#dev_mode ⇒ Object
Basic attributes
32 33 34 |
# File 'lib/abacate_pay/resources/billings.rb', line 32 def dev_mode @dev_mode end |
#frequency ⇒ Object
Enum attributes
38 39 40 |
# File 'lib/abacate_pay/resources/billings.rb', line 38 def frequency @frequency end |
#id ⇒ Object
Basic attributes
32 33 34 |
# File 'lib/abacate_pay/resources/billings.rb', line 32 def id @id end |
#metadata ⇒ Object
Complex attributes
35 36 37 |
# File 'lib/abacate_pay/resources/billings.rb', line 35 def @metadata end |
#methods ⇒ Object
Complex attributes
35 36 37 |
# File 'lib/abacate_pay/resources/billings.rb', line 35 def methods @methods end |
#next_billing ⇒ Object
DateTime attributes
41 42 43 |
# File 'lib/abacate_pay/resources/billings.rb', line 41 def next_billing @next_billing end |
#products ⇒ Object
Complex attributes
35 36 37 |
# File 'lib/abacate_pay/resources/billings.rb', line 35 def products @products end |
#status ⇒ Object
Enum attributes
38 39 40 |
# File 'lib/abacate_pay/resources/billings.rb', line 38 def status @status end |
#updated_at ⇒ Object
DateTime attributes
41 42 43 |
# File 'lib/abacate_pay/resources/billings.rb', line 41 def updated_at @updated_at end |
#url ⇒ Object
Basic attributes
32 33 34 |
# File 'lib/abacate_pay/resources/billings.rb', line 32 def url @url end |
Instance Method Details
#dev_mode? ⇒ Boolean?
Checks if billing is in development mode
54 55 56 |
# File 'lib/abacate_pay/resources/billings.rb', line 54 def dev_mode? @dev_mode end |