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
The AppEnrollmentId of the application that imported this record.
-
#apply_to_invoice_date ⇒ Date-time
The date this payment was applied to this 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
The entry number of this payment application.
-
#erp_key ⇒ String
The unique ID of this record as it was known in its originating financial system.
-
#erp_write_status ⇒ ErpWriteStatuses
Possible statuses for a record that supports ERP write.
-
#erp_write_status_name ⇒ String
The name of the ErpWriteStatus for this payment application.
-
#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 ⇒ PaymentModel
The payment associated with this applied payment.
-
#payment_applied_amount ⇒ Double
The total amount that was applied to this Invoice from the Payment.
-
#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.
-
#source_modified_date ⇒ Date-time
The date on which this record was last modified in source ERP.
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
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 28 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) @erp_write_status = params.dig(:erp_write_status) @erp_write_status_name = params.dig(:erp_write_status_name) @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) @source_modified_date = params.dig(:source_modified_date) @payment = params.dig(:payment) @invoice = params.dig(:invoice) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
107 108 109 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 107 def app_enrollment_id @app_enrollment_id end |
#apply_to_invoice_date ⇒ Date-time
83 84 85 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 83 def apply_to_invoice_date @apply_to_invoice_date end |
#created ⇒ Date-time
91 92 93 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 91 def created @created end |
#created_user_id ⇒ Uuid
95 96 97 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 95 def created_user_id @created_user_id end |
#entry_number ⇒ Int32
79 80 81 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 79 def entry_number @entry_number end |
#erp_key ⇒ String
67 68 69 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 67 def erp_key @erp_key end |
#erp_write_status ⇒ ErpWriteStatuses
71 72 73 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 71 def erp_write_status @erp_write_status end |
#erp_write_status_name ⇒ String
75 76 77 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 75 def erp_write_status_name @erp_write_status_name end |
#group_key ⇒ Uuid
51 52 53 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 51 def group_key @group_key end |
#invoice ⇒ InvoiceModel
119 120 121 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 119 def invoice @invoice end |
#invoice_id ⇒ Uuid
59 60 61 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 59 def invoice_id @invoice_id end |
#modified ⇒ Date-time
99 100 101 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 99 def modified @modified end |
#modified_user_id ⇒ Uuid
103 104 105 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 103 def modified_user_id @modified_user_id end |
#payment ⇒ PaymentModel
115 116 117 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 115 def payment @payment end |
#payment_applied_amount ⇒ Double
87 88 89 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 87 def payment_applied_amount @payment_applied_amount end |
#payment_applied_id ⇒ Uuid
55 56 57 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 55 def payment_applied_id @payment_applied_id end |
#payment_id ⇒ Uuid
63 64 65 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 63 def payment_id @payment_id end |
#source_modified_date ⇒ Date-time
111 112 113 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 111 def source_modified_date @source_modified_date end |
Instance Method Details
#as_json(options = {}) ⇒ object
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 123 def as_json(={}) { 'groupKey' => @group_key, 'paymentAppliedId' => @payment_applied_id, 'invoiceId' => @invoice_id, 'paymentId' => @payment_id, 'erpKey' => @erp_key, 'erpWriteStatus' => @erp_write_status, 'erpWriteStatusName' => @erp_write_status_name, '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, 'sourceModifiedDate' => @source_modified_date, 'payment' => @payment, 'invoice' => @invoice, } end |
#to_json(*options) ⇒ String
148 149 150 |
# File 'lib/lockstep_sdk/models/payment_applied_model.rb', line 148 def to_json(*) "[#{as_json(*options).to_json(*options)}]" end |