Class: LockstepSdk::PaymentAppliedSyncModel
- Inherits:
-
Object
- Object
- LockstepSdk::PaymentAppliedSyncModel
- Defined in:
- lib/lockstep_sdk/models/payment_applied_sync_model.rb
Overview
The PaymentAppliedSyncModel represents information coming into Lockstep from an external financial system or other enterprise resource planning system. To import data from an external system, convert your original data into the PaymentAppliedSyncModel format and call the [Upload Sync File API](developer.lockstep.io/reference/post_api-v1-sync-zip). This API retrieves all of the data you uploaded in a compressed ZIP file and imports it into the Lockstep platform.
Once imported, this record will be available in the Lockstep API as a [PaymentAppliedModel](developer.lockstep.io/docs/paymentappliedmodel).
For more information on writing your own connector, see [Connector Data](developer.lockstep.io/docs/connector-data).
Instance Attribute Summary collapse
-
#apply_to_invoice_date ⇒ Date-time
The date this payment was applied to this invoice.
-
#created ⇒ Date-time
If known, the date when this record was created according to the originating financial system in which this record is maintained.
-
#entry_number ⇒ Int32
The entry number of this payment application.
-
#erp_key ⇒ String
This is the primary key of the Payment Application record.
-
#invoice_erp_key ⇒ String
This field indicates which Invoice had its balance reduced by applying this payment.
-
#modified ⇒ Date-time
If known, the date when this record was most recently modified according to the originating financial system in which this record is maintained.
-
#on_match_action ⇒ MatchAction
Indicates what action to take when an existing object has been found during the sync process.
-
#payment_applied_amount ⇒ Double
The total amount that was applied to this Invoice from the Payment.
-
#payment_erp_key ⇒ String
This field indicates which Payment was used to provide the funds for this payment application.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ PaymentAppliedSyncModel
constructor
Initialize the PaymentAppliedSyncModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ PaymentAppliedSyncModel
Initialize the PaymentAppliedSyncModel using the provided prototype
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 33 def initialize(params = {}) @on_match_action = params.dig(:on_match_action) @erp_key = params.dig(:erp_key) @invoice_erp_key = params.dig(:invoice_erp_key) @payment_erp_key = params.dig(:payment_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) @modified = params.dig(:modified) end |
Instance Attribute Details
#apply_to_invoice_date ⇒ Date-time
67 68 69 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 67 def apply_to_invoice_date @apply_to_invoice_date end |
#created ⇒ Date-time
75 76 77 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 75 def created @created end |
#entry_number ⇒ Int32
63 64 65 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 63 def entry_number @entry_number end |
#erp_key ⇒ String
51 52 53 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 51 def erp_key @erp_key end |
#invoice_erp_key ⇒ String
55 56 57 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 55 def invoice_erp_key @invoice_erp_key end |
#modified ⇒ Date-time
79 80 81 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 79 def modified @modified end |
#on_match_action ⇒ MatchAction
47 48 49 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 47 def on_match_action @on_match_action end |
#payment_applied_amount ⇒ Double
71 72 73 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 71 def payment_applied_amount @payment_applied_amount end |
#payment_erp_key ⇒ String
59 60 61 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 59 def payment_erp_key @payment_erp_key end |
Instance Method Details
#as_json(options = {}) ⇒ object
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 83 def as_json(={}) { 'onMatchAction' => @on_match_action, 'erpKey' => @erp_key, 'invoiceErpKey' => @invoice_erp_key, 'paymentErpKey' => @payment_erp_key, 'entryNumber' => @entry_number, 'applyToInvoiceDate' => @apply_to_invoice_date, 'paymentAppliedAmount' => @payment_applied_amount, 'created' => @created, 'modified' => @modified, } end |
#to_json(*options) ⇒ String
99 100 101 |
# File 'lib/lockstep_sdk/models/payment_applied_sync_model.rb', line 99 def to_json(*) "[#{as_json(*options).to_json(*options)}]" end |