Class: LockstepSdk::PaymentAppliedModel
- Inherits:
-
Object
- Object
- LockstepSdk::PaymentAppliedModel
- Defined in:
- lib/lockstep_sdk/models/payment_applied_model.rb
Overview
A Payment Application is created by a business who receives a Payment from a customer. A customer may make a single Payment to match an Invoice exactly, a partial Payment for an Invoice, or a single Payment may be made for multiple smaller Invoices. The Payment Application contains information about which Invoices are connected to which Payments and for which amounts.
Instance Attribute Summary collapse
-
#app_enrollment_id ⇒ Uuid
AppEnrollmentId for this record; used for mapping purposes.
-
#apply_to_invoice_date ⇒ Date-time
Date payment applied to invoice.
-
#created ⇒ Date-time
Date payment applied record was created.
-
#created_user_id ⇒ Uuid
The id of the user who created this applied payment.
-
#entry_number ⇒ Int32
Reference number for the payment applied.
-
#erp_key ⇒ String
The unique ID of this record as it was known in its originating financial system.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#invoice ⇒ InvoiceModel
The invoice associated with this applied payment.
-
#invoice_id ⇒ Uuid
The Invoice this payment is applied to.
-
#modified ⇒ Date-time
Date payment applied record was modified.
-
#modified_user_id ⇒ Uuid
The id of the user who modified this applied payment.
-
#payment_applied_amount ⇒ Double
Amount applied to invoice.
-
#payment_applied_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#payment_id ⇒ Uuid
The Payment applied to the invoice.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ PaymentAppliedModel
constructor
Initialize the PaymentAppliedModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ PaymentAppliedModel
Initialize the PaymentAppliedModel using the provided prototype
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 31 def initialize(params = {}) @group_key = params.dig(:group_key) @payment_applied_id = params.dig(:payment_applied_id) @invoice_id = params.dig(:invoice_id) @payment_id = params.dig(:payment_id) @erp_key = params.dig(:erp_key) @entry_number = params.dig(:entry_number) @apply_to_invoice_date = params.dig(:apply_to_invoice_date) @payment_applied_amount = params.dig(:payment_applied_amount) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_id) @app_enrollment_id = params.dig(:app_enrollment_id) @invoice = params.dig(:invoice) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
Returns AppEnrollmentId for this record; used for mapping purposes.
98 99 100 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 98 def app_enrollment_id @app_enrollment_id end |
#apply_to_invoice_date ⇒ Date-time
Returns Date payment applied to invoice.
74 75 76 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 74 def apply_to_invoice_date @apply_to_invoice_date end |
#created ⇒ Date-time
Returns Date payment applied record was created.
82 83 84 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 82 def created @created end |
#created_user_id ⇒ Uuid
Returns The id of the user who created this applied payment.
86 87 88 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 86 def created_user_id @created_user_id end |
#entry_number ⇒ Int32
Returns Reference number for the payment applied.
70 71 72 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 70 def entry_number @entry_number end |
#erp_key ⇒ String
Returns The unique ID of this record as it was known in its originating financial system. If this company record was imported from a financial system, it will have the value `ErpKey` set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported, this value will be `null`. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).
66 67 68 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 66 def erp_key @erp_key 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).
50 51 52 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 50 def group_key @group_key end |
#invoice ⇒ InvoiceModel
Returns The invoice associated with this applied payment.
102 103 104 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 102 def invoice @invoice end |
#invoice_id ⇒ Uuid
Returns The Invoice this payment is applied to.
58 59 60 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 58 def invoice_id @invoice_id end |
#modified ⇒ Date-time
Returns Date payment applied record was modified.
90 91 92 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 90 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The id of the user who modified this applied payment.
94 95 96 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 94 def modified_user_id @modified_user_id end |
#payment_applied_amount ⇒ Double
Returns Amount applied to invoice.
78 79 80 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 78 def payment_applied_amount @payment_applied_amount end |
#payment_applied_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform. For the ID of this record in its originating financial system, see `ErpKey`.
54 55 56 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 54 def payment_applied_id @payment_applied_id end |
#payment_id ⇒ Uuid
Returns The Payment applied to the invoice.
62 63 64 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 62 def payment_id @payment_id end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 106 def as_json(={}) { 'groupKey' => @group_key, 'paymentAppliedId' => @payment_applied_id, 'invoiceId' => @invoice_id, 'paymentId' => @payment_id, 'erpKey' => @erp_key, 'entryNumber' => @entry_number, 'applyToInvoiceDate' => @apply_to_invoice_date, 'paymentAppliedAmount' => @payment_applied_amount, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, 'appEnrollmentId' => @app_enrollment_id, 'invoice' => @invoice, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
127 128 129 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 127 def to_json(*) "[#{as_json(*).to_json(*)}]" end |