Class: LockstepSdk::AgingModel
- Inherits:
-
Object
- Object
- LockstepSdk::AgingModel
- Defined in:
- lib/lockstep_sdk/models/aging_model.rb
Overview
Represents an aging record
Instance Attribute Summary collapse
-
#bucket ⇒ Int32
Aging bucket of outstanding balance data (days past due date of invoice).
-
#currency_code ⇒ String
Currency code of aging bucket.
-
#outstanding_balance ⇒ Double
Outstanding balance for the given aging bucket.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ AgingModel
constructor
Initialize the AgingModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ AgingModel
Initialize the AgingModel using the provided prototype
28 29 30 31 32 |
# File 'lib/lockstep_sdk/models/aging_model.rb', line 28 def initialize(params = {}) @bucket = params.dig(:bucket) @currency_code = params.dig(:currency_code) @outstanding_balance = params.dig(:outstanding_balance) end |
Instance Attribute Details
#bucket ⇒ Int32
Returns Aging bucket of outstanding balance data (days past due date of invoice).
36 37 38 |
# File 'lib/lockstep_sdk/models/aging_model.rb', line 36 def bucket @bucket end |
#currency_code ⇒ String
Returns Currency code of aging bucket.
40 41 42 |
# File 'lib/lockstep_sdk/models/aging_model.rb', line 40 def currency_code @currency_code end |
#outstanding_balance ⇒ Double
Returns Outstanding balance for the given aging bucket.
44 45 46 |
# File 'lib/lockstep_sdk/models/aging_model.rb', line 44 def outstanding_balance @outstanding_balance end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
48 49 50 51 52 53 54 |
# File 'lib/lockstep_sdk/models/aging_model.rb', line 48 def as_json(={}) { 'bucket' => @bucket, 'currencyCode' => @currency_code, 'outstandingBalance' => @outstanding_balance, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
58 59 60 |
# File 'lib/lockstep_sdk/models/aging_model.rb', line 58 def to_json(*) "[#{as_json(*).to_json(*)}]" end |