Class: LockstepSdk::PaymentDetailModel
- Inherits:
-
Object
- Object
- LockstepSdk::PaymentDetailModel
- Defined in:
- lib/lockstep_sdk/models/payment_detail_model.rb
Overview
Contains detailed information about a Payment.
Instance Attribute Summary collapse
-
#address1 ⇒ String
The first line of the address for the Customer’s Primary Contact.
-
#address2 ⇒ String
The second line of the address for the Customer’s Primary Contact.
-
#address3 ⇒ String
The third line of the address for the Customer’s Primary Contact.
-
#base_currency_code ⇒ String
The base currency code of the group.
-
#base_currency_payment_amount ⇒ Double
The payment amount in the group’s base currency.
-
#base_currency_unapplied_amount ⇒ Double
The payment amount in the group’s base currency.
-
#city ⇒ String
The city of the address for the Customer’s Primary Contact.
-
#country_code ⇒ String
The 2 character country code of the address for the Customer’s Primary Contact.
-
#currency_code ⇒ String
The currency code of the payment.
-
#customer_id ⇒ Uuid
The ID of the customer to which this Payment belongs.
-
#customer_name ⇒ String
The name of the customer to which this Payment belongs.
-
#email ⇒ String
The Email address of the Customer.
-
#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.
-
#fax ⇒ String
The fax number of the Customer’s Primary Contact.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#memo_text ⇒ String
Memo or reference text (ex. memo field on a check).
-
#payment_amount ⇒ Double
Total amount of this Payment.
-
#payment_date ⇒ Date
The date of this Payment.
-
#payment_id ⇒ Uuid
The unique ID of this Payment.
-
#payment_type ⇒ String
The type of payment, AR Payment or AP Payment.
-
#phone ⇒ String
The phone number of the Customer’s Primary Contact.
-
#post_date ⇒ Date
Payment post date.
-
#postal_code ⇒ String
The postal/zip code of the address for the Customer’s Primary Contact.
-
#primary_contact ⇒ String
The name of the Primary Contact for the Customer.
-
#reference_code ⇒ String
Reference code for the payment for the given Erp system.
-
#state_region ⇒ String
The state/region of the address for the Customer’s Primary Contact.
-
#tender_type ⇒ String
Cash, check, credit card, wire transfer.
-
#unapplied_amount ⇒ Double
Unapplied balance of this Payment.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ PaymentDetailModel
constructor
Initialize the PaymentDetailModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ PaymentDetailModel
Initialize the PaymentDetailModel using the provided prototype
25 26 27 28 29 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 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 25 def initialize(params = {}) @group_key = params.dig(:group_key) @payment_id = params.dig(:payment_id) @customer_id = params.dig(:customer_id) @customer_name = params.dig(:customer_name) @memo_text = params.dig(:memo_text) @reference_code = params.dig(:reference_code) @primary_contact = params.dig(:primary_contact) @email = params.dig(:email) @erp_write_status = params.dig(:erp_write_status) @erp_write_status_name = params.dig(:erp_write_status_name) @currency_code = params.dig(:currency_code) @payment_amount = params.dig(:payment_amount) @unapplied_amount = params.dig(:unapplied_amount) @base_currency_code = params.dig(:base_currency_code) @base_currency_payment_amount = params.dig(:base_currency_payment_amount) @base_currency_unapplied_amount = params.dig(:base_currency_unapplied_amount) @payment_type = params.dig(:payment_type) @tender_type = params.dig(:tender_type) @payment_date = params.dig(:payment_date) @post_date = params.dig(:post_date) @phone = params.dig(:phone) @fax = params.dig(:fax) @address1 = params.dig(:address1) @address2 = params.dig(:address2) @address3 = params.dig(:address3) @city = params.dig(:city) @state_region = params.dig(:state_region) @postal_code = params.dig(:postal_code) @country_code = params.dig(:country_code) end |
Instance Attribute Details
#address1 ⇒ String
Returns The first line of the address for the Customer’s Primary Contact.
147 148 149 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 147 def address1 @address1 end |
#address2 ⇒ String
Returns The second line of the address for the Customer’s Primary Contact.
151 152 153 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 151 def address2 @address2 end |
#address3 ⇒ String
Returns The third line of the address for the Customer’s Primary Contact.
155 156 157 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 155 def address3 @address3 end |
#base_currency_code ⇒ String
Returns The base currency code of the group.
111 112 113 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 111 def base_currency_code @base_currency_code end |
#base_currency_payment_amount ⇒ Double
Returns The payment amount in the group’s base currency.
115 116 117 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 115 def base_currency_payment_amount @base_currency_payment_amount end |
#base_currency_unapplied_amount ⇒ Double
Returns The payment amount in the group’s base currency.
119 120 121 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 119 def base_currency_unapplied_amount @base_currency_unapplied_amount end |
#city ⇒ String
Returns The city of the address for the Customer’s Primary Contact.
159 160 161 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 159 def city @city end |
#country_code ⇒ String
Returns The 2 character country code of the address for the Customer’s Primary Contact.
171 172 173 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 171 def country_code @country_code end |
#currency_code ⇒ String
Returns The currency code of the payment.
99 100 101 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 99 def currency_code @currency_code end |
#customer_id ⇒ Uuid
Returns The ID of the customer to which this Payment belongs.
67 68 69 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 67 def customer_id @customer_id end |
#customer_name ⇒ String
Returns The name of the customer to which this Payment belongs.
71 72 73 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 71 def customer_name @customer_name end |
#email ⇒ String
Returns The Email address of the Customer.
87 88 89 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 87 def email @email end |
#erp_write_status ⇒ ErpWriteStatuses
Returns Possible statuses for a record that supports ERP write.
91 92 93 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 91 def erp_write_status @erp_write_status end |
#erp_write_status_name ⇒ String
Returns The name of the ErpWriteStatus for this payment.
95 96 97 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 95 def erp_write_status_name @erp_write_status_name end |
#fax ⇒ String
Returns The fax number of the Customer’s Primary Contact.
143 144 145 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 143 def fax @fax 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).
59 60 61 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 59 def group_key @group_key end |
#memo_text ⇒ String
Returns Memo or reference text (ex. memo field on a check).
75 76 77 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 75 def memo_text @memo_text end |
#payment_amount ⇒ Double
Returns Total amount of this Payment.
103 104 105 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 103 def payment_amount @payment_amount end |
#payment_date ⇒ Date
Returns The date of this Payment.
131 132 133 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 131 def payment_date @payment_date end |
#payment_id ⇒ Uuid
Returns The unique ID of this Payment.
63 64 65 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 63 def payment_id @payment_id end |
#payment_type ⇒ String
Returns The type of payment, AR Payment or AP Payment. Recognized PaymentType values are: * ‘AR Payment` - A payment made by a Customer to the Company * `AP Payment` - A payment made by the Company to a Vendor.
123 124 125 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 123 def payment_type @payment_type end |
#phone ⇒ String
Returns The phone number of the Customer’s Primary Contact.
139 140 141 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 139 def phone @phone end |
#post_date ⇒ Date
Returns Payment post date.
135 136 137 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 135 def post_date @post_date end |
#postal_code ⇒ String
Returns The postal/zip code of the address for the Customer’s Primary Contact.
167 168 169 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 167 def postal_code @postal_code end |
#primary_contact ⇒ String
Returns The name of the Primary Contact for the Customer.
83 84 85 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 83 def primary_contact @primary_contact end |
#reference_code ⇒ String
Returns Reference code for the payment for the given Erp system.
79 80 81 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 79 def reference_code @reference_code end |
#state_region ⇒ String
Returns The state/region of the address for the Customer’s Primary Contact.
163 164 165 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 163 def state_region @state_region end |
#tender_type ⇒ String
Returns Cash, check, credit card, wire transfer. Recognized TenderType values are: * ‘Cash` - A cash payment or other direct transfer. * `Check` - A check payment. * `Credit Card` - A payment made via a credit card. * `Wire Transfer` - A payment made via wire transfer from another financial institution. * `Other` - A payment made via another method not listed above.
127 128 129 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 127 def tender_type @tender_type end |
#unapplied_amount ⇒ Double
Returns Unapplied balance of this Payment.
107 108 109 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 107 def unapplied_amount @unapplied_amount end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 175 def as_json(={}) { 'groupKey' => @group_key, 'paymentId' => @payment_id, 'customerId' => @customer_id, 'customerName' => @customer_name, 'memoText' => @memo_text, 'referenceCode' => @reference_code, 'primaryContact' => @primary_contact, 'email' => @email, 'erpWriteStatus' => @erp_write_status, 'erpWriteStatusName' => @erp_write_status_name, 'currencyCode' => @currency_code, 'paymentAmount' => @payment_amount, 'unappliedAmount' => @unapplied_amount, 'baseCurrencyCode' => @base_currency_code, 'baseCurrencyPaymentAmount' => @base_currency_payment_amount, 'baseCurrencyUnappliedAmount' => @base_currency_unapplied_amount, 'paymentType' => @payment_type, 'tenderType' => @tender_type, 'paymentDate' => @payment_date, 'postDate' => @post_date, 'phone' => @phone, 'fax' => @fax, 'address1' => @address1, 'address2' => @address2, 'address3' => @address3, 'city' => @city, 'stateRegion' => @state_region, 'postalCode' => @postal_code, 'countryCode' => @country_code, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
211 212 213 |
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 211 def to_json(*) "[#{as_json(*).to_json(*)}]" end |