Class: LockstepSdk::PayablesComingDueModel
- Inherits:
-
Object
- Object
- LockstepSdk::PayablesComingDueModel
- Defined in:
- lib/lockstep_sdk/models/payables_coming_due_model.rb
Overview
Contains information for payables that will be due soon
Instance Attribute Summary collapse
-
#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.
-
#percentage_of_total ⇒ Double
Percentage of total for this time period.
-
#primary_contact ⇒ String
Primary Contact for this company.
-
#total_amount_due ⇒ Double
Total amount due for this time period.
-
#vendor_id ⇒ Uuid
The unique Lockstep Id for the Vendor.
-
#vendor_name ⇒ String
Name for this company.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ PayablesComingDueModel
constructor
Initialize the PayablesComingDueModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ PayablesComingDueModel
Initialize the PayablesComingDueModel using the provided prototype
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 25 def initialize(params = {}) @group_key = params.dig(:group_key) @number_of_bills_due = params.dig(:number_of_bills_due) @vendor_id = params.dig(:vendor_id) @vendor_name = params.dig(:vendor_name) @primary_contact = params.dig(:primary_contact) @percentage_of_total = params.dig(:percentage_of_total) @total_amount_due = params.dig(:total_amount_due) @due_date = params.dig(:due_date) end |
Instance Attribute Details
#due_date ⇒ Date-time
Returns This model represents all the payables that are either already due or due within this date.
66 67 68 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 66 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).
38 39 40 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 38 def group_key @group_key end |
#number_of_bills_due ⇒ Int32
Returns Number of bills due for this time period.
42 43 44 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 42 def number_of_bills_due @number_of_bills_due end |
#percentage_of_total ⇒ Double
Returns Percentage of total for this time period.
58 59 60 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 58 def percentage_of_total @percentage_of_total end |
#primary_contact ⇒ String
Returns Primary Contact for this company.
54 55 56 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 54 def primary_contact @primary_contact end |
#total_amount_due ⇒ Double
Returns Total amount due for this time period.
62 63 64 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 62 def total_amount_due @total_amount_due end |
#vendor_id ⇒ Uuid
Returns The unique Lockstep Id for the Vendor.
46 47 48 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 46 def vendor_id @vendor_id end |
#vendor_name ⇒ String
Returns Name for this company.
50 51 52 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 50 def vendor_name @vendor_name end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 70 def as_json(={}) { 'groupKey' => @group_key, 'numberOfBillsDue' => @number_of_bills_due, 'vendorId' => @vendor_id, 'vendorName' => @vendor_name, 'primaryContact' => @primary_contact, 'percentageOfTotal' => @percentage_of_total, 'totalAmountDue' => @total_amount_due, 'dueDate' => @due_date, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
85 86 87 |
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 85 def to_json(*) "[#{as_json(*options).to_json(*options)}]" end |