Class: LockstepSdk::PayablesComingDueHeaderModel
- Inherits:
-
Object
- Object
- LockstepSdk::PayablesComingDueHeaderModel
- Defined in:
- lib/lockstep_sdk/models/payables_coming_due_header_model.rb
Overview
Contains summary information for payables that will be due soon
Instance Attribute Summary collapse
-
#base_currency_code ⇒ String
The group’s base currency code.
-
#due_date ⇒ Date-time
This model represents all the payables that are either already due or due within this date.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#number_of_bills_due ⇒ Int32
Number of bills due for this time period.
-
#number_of_vendors ⇒ Int32
Number of total vendors for this time period.
-
#percentage_of_total ⇒ Double
Percentage of total for this time period.
-
#total_amount_due ⇒ Double
Total amount due for this time period in the group’s base currency.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ PayablesComingDueHeaderModel
constructor
Initialize the PayablesComingDueHeaderModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ PayablesComingDueHeaderModel
Initialize the PayablesComingDueHeaderModel using the provided prototype
25 26 27 28 29 30 31 32 33 |
# File 'lib/lockstep_sdk/models/payables_coming_due_header_model.rb', line 25 def initialize(params = {}) @group_key = params.dig(:group_key) @number_of_bills_due = params.dig(:number_of_bills_due) @number_of_vendors = params.dig(:number_of_vendors) @percentage_of_total = params.dig(:percentage_of_total) @base_currency_code = params.dig(:base_currency_code) @total_amount_due = params.dig(:total_amount_due) @due_date = params.dig(:due_date) end |
Instance Attribute Details
#base_currency_code ⇒ String
Returns The group’s base currency code.
53 54 55 |
# File 'lib/lockstep_sdk/models/payables_coming_due_header_model.rb', line 53 def base_currency_code @base_currency_code end |
#due_date ⇒ Date-time
Returns This model represents all the payables that are either already due or due within this date.
61 62 63 |
# File 'lib/lockstep_sdk/models/payables_coming_due_header_model.rb', line 61 def due_date @due_date end |
#group_key ⇒ Uuid
Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).
37 38 39 |
# File 'lib/lockstep_sdk/models/payables_coming_due_header_model.rb', line 37 def group_key @group_key end |
#number_of_bills_due ⇒ Int32
Returns Number of bills due for this time period.
41 42 43 |
# File 'lib/lockstep_sdk/models/payables_coming_due_header_model.rb', line 41 def number_of_bills_due @number_of_bills_due end |
#number_of_vendors ⇒ Int32
Returns Number of total vendors for this time period.
45 46 47 |
# File 'lib/lockstep_sdk/models/payables_coming_due_header_model.rb', line 45 def number_of_vendors @number_of_vendors end |
#percentage_of_total ⇒ Double
Returns Percentage of total for this time period.
49 50 51 |
# File 'lib/lockstep_sdk/models/payables_coming_due_header_model.rb', line 49 def percentage_of_total @percentage_of_total end |
#total_amount_due ⇒ Double
Returns Total amount due for this time period in the group’s base currency.
57 58 59 |
# File 'lib/lockstep_sdk/models/payables_coming_due_header_model.rb', line 57 def total_amount_due @total_amount_due end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/lockstep_sdk/models/payables_coming_due_header_model.rb', line 65 def as_json(={}) { 'groupKey' => @group_key, 'numberOfBillsDue' => @number_of_bills_due, 'numberOfVendors' => @number_of_vendors, 'percentageOfTotal' => @percentage_of_total, 'baseCurrencyCode' => @base_currency_code, 'totalAmountDue' => @total_amount_due, 'dueDate' => @due_date, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
79 80 81 |
# File 'lib/lockstep_sdk/models/payables_coming_due_header_model.rb', line 79 def to_json(*) "[#{as_json(*).to_json(*)}]" end |