Class: LockstepSdk::PaymentModel
- Inherits:
-
Object
- Object
- LockstepSdk::PaymentModel
- Defined in:
- lib/lockstep_sdk/models/payment_model.rb
Overview
A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP “key” that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
Instance Attribute Summary collapse
-
#app_enrollment_id ⇒ Uuid
AppEnrollmentId for this record; used for mapping purposes.
-
#applications ⇒ PaymentAppliedModel
All applications this payment is associated with.
-
#attachments ⇒ AttachmentModel
All attachments attached to this payment.
-
#company_id ⇒ Uuid
The ID of the company to which this payment belongs.
-
#created ⇒ Date-time
The date on which this record was created.
-
#created_user_id ⇒ Uuid
The ID of the user who created this payment.
-
#currency_code ⇒ String
Currency of the payment.
-
#custom_field_definitions ⇒ CustomFieldDefinitionModel
All definitions attached to this payment.
-
#custom_field_values ⇒ CustomFieldValueModel
All values attached to this payment.
-
#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.
-
#in_dispute ⇒ Boolean
Is the payment in dispute?.
-
#is_open ⇒ Boolean
Has the payment been fully applied?.
-
#is_voided ⇒ Boolean
Is the payment voided?.
-
#memo_text ⇒ String
Memo or reference text (ex. memo field on a check).
-
#modified ⇒ Date-time
The date on which this record was last modified.
-
#modified_user_id ⇒ Uuid
The ID of the user who last modified this payment.
-
#notes ⇒ NoteModel
All notes attached to this payment.
-
#payment_amount ⇒ Double
Total amount of this payment.
-
#payment_date ⇒ Date
The date of this payment.
-
#payment_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#payment_type ⇒ String
The type of payment, cash or check.
-
#post_date ⇒ Date
Payment post date.
-
#reference_code ⇒ String
Reference code for the payment for the given Erp system.
-
#tender_type ⇒ String
Cash, check, credit card, wire transfer.
-
#unapplied_amount ⇒ Double
Unapplied balance of this payment.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ PaymentModel
constructor
Initialize the PaymentModel using the provided prototype.
Constructor Details
#initialize(params = {}) ⇒ PaymentModel
Initialize the PaymentModel using the provided prototype
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 30 def initialize(params = {}) @group_key = params.dig(:group_key) @payment_id = params.dig(:payment_id) @company_id = params.dig(:company_id) @erp_key = params.dig(:erp_key) @payment_type = params.dig(:payment_type) @tender_type = params.dig(:tender_type) @is_open = params.dig(:is_open) @memo_text = params.dig(:memo_text) @payment_date = params.dig(:payment_date) @post_date = params.dig(:post_date) @payment_amount = params.dig(:payment_amount) @unapplied_amount = params.dig(:unapplied_amount) @currency_code = params.dig(:currency_code) @reference_code = params.dig(:reference_code) @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) @is_voided = params.dig(:is_voided) @in_dispute = params.dig(:in_dispute) @applications = params.dig(:applications) @notes = params.dig(:notes) @attachments = params.dig(:attachments) @custom_field_definitions = params.dig(:custom_field_definitions) @custom_field_values = params.dig(:custom_field_values) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
Returns AppEnrollmentId for this record; used for mapping purposes.
96 97 98 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 96 def app_enrollment_id @app_enrollment_id end |
#applications ⇒ PaymentAppliedModel
Returns All applications this payment is associated with. To retrieve this collection, specify `Applications` in the “Include” parameter for your query.
102 103 104 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 102 def applications @applications end |
#attachments ⇒ AttachmentModel
Returns All attachments attached to this payment. To retrieve this collection, specify `Attachments` in the “Include” parameter for your query.
106 107 108 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 106 def @attachments end |
#company_id ⇒ Uuid
Returns The ID of the company to which this payment belongs.
64 65 66 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 64 def company_id @company_id end |
#created ⇒ Date-time
Returns The date on which this record was created.
88 89 90 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 88 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID of the user who created this payment.
90 91 92 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 90 def created_user_id @created_user_id end |
#currency_code ⇒ String
Returns Currency of the payment. This will be validated by the /api/v1/currencies data set.
84 85 86 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 84 def currency_code @currency_code end |
#custom_field_definitions ⇒ CustomFieldDefinitionModel
Returns All definitions attached to this payment. To retrieve this collection, specify `CustomFieldValues` in the “Include” parameter for your query.
108 109 110 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 108 def custom_field_definitions @custom_field_definitions end |
#custom_field_values ⇒ CustomFieldValueModel
Returns All values attached to this payment. To retrieve this collection, specify `CustomFieldValues` in the “Include” parameter for your query.
110 111 112 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 110 def custom_field_values @custom_field_values 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_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).
60 61 62 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 60 def group_key @group_key end |
#in_dispute ⇒ Boolean
Returns Is the payment in dispute?.
100 101 102 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 100 def in_dispute @in_dispute end |
#is_open ⇒ Boolean
Returns Has the payment been fully applied?.
72 73 74 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 72 def is_open @is_open end |
#is_voided ⇒ Boolean
Returns Is the payment voided?.
98 99 100 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 98 def is_voided @is_voided end |
#memo_text ⇒ String
Returns Memo or reference text (ex. memo field on a check).
74 75 76 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 74 def memo_text @memo_text end |
#modified ⇒ Date-time
Returns The date on which this record was last modified.
92 93 94 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 92 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID of the user who last modified this payment.
94 95 96 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 94 def modified_user_id @modified_user_id end |
#notes ⇒ NoteModel
Returns All notes attached to this payment. To retrieve this collection, specify `Notes` in the “Include” parameter for your query.
104 105 106 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 104 def notes @notes end |
#payment_amount ⇒ Double
Returns Total amount of this payment.
80 81 82 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 80 def payment_amount @payment_amount end |
#payment_date ⇒ Date
Returns The date of this payment.
76 77 78 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 76 def payment_date @payment_date end |
#payment_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`.
62 63 64 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 62 def payment_id @payment_id end |
#payment_type ⇒ String
Returns The type of payment, cash or check.
68 69 70 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 68 def payment_type @payment_type end |
#post_date ⇒ Date
Returns Payment post date.
78 79 80 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 78 def post_date @post_date end |
#reference_code ⇒ String
Returns Reference code for the payment for the given Erp system.
86 87 88 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 86 def reference_code @reference_code end |
#tender_type ⇒ String
Returns Cash, check, credit card, wire transfer.
70 71 72 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 70 def tender_type @tender_type end |
#unapplied_amount ⇒ Double
Returns Unapplied balance of this payment.
82 83 84 |
# File 'lib/lockstep_sdk/models/payment_model.rb', line 82 def unapplied_amount @unapplied_amount end |