Class: LockstepSdk::PaymentDetailModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/payment_detail_model.rb

Overview

Contains detailed information about a Payment.

Instance Attribute Summary collapse

Instance Method Summary collapse

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
# 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)
    @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

#address1String

Returns The first line of the address for the Customer’s Primary Contact.

Returns:

  • (String)

    The first line of the address for the Customer’s Primary Contact.



137
138
139
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 137

def address1
  @address1
end

#address2String

Returns The second line of the address for the Customer’s Primary Contact.

Returns:

  • (String)

    The second line of the address for the Customer’s Primary Contact.



141
142
143
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 141

def address2
  @address2
end

#address3String

Returns The third line of the address for the Customer’s Primary Contact.

Returns:

  • (String)

    The third line of the address for the Customer’s Primary Contact.



145
146
147
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 145

def address3
  @address3
end

#base_currency_codeString

Returns The base currency code of the group.

Returns:

  • (String)

    The base currency code of the group.



101
102
103
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 101

def base_currency_code
  @base_currency_code
end

#base_currency_payment_amountDouble

Returns The payment amount in the group’s base currency.

Returns:

  • (Double)

    The payment amount in the group’s base currency.



105
106
107
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 105

def base_currency_payment_amount
  @base_currency_payment_amount
end

#base_currency_unapplied_amountDouble

Returns The payment amount in the group’s base currency.

Returns:

  • (Double)

    The payment amount in the group’s base currency.



109
110
111
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 109

def base_currency_unapplied_amount
  @base_currency_unapplied_amount
end

#cityString

Returns The city of the address for the Customer’s Primary Contact.

Returns:

  • (String)

    The city of the address for the Customer’s Primary Contact.



149
150
151
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 149

def city
  @city
end

#country_codeString

Returns The 2 character country code of the address for the Customer’s Primary Contact.

Returns:

  • (String)

    The 2 character country code of the address for the Customer’s Primary Contact.



161
162
163
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 161

def country_code
  @country_code
end

#currency_codeString

Returns The currency code of the payment.

Returns:

  • (String)

    The currency code of the payment.



89
90
91
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 89

def currency_code
  @currency_code
end

#customer_idUuid

Returns The ID of the customer to which this Payment belongs.

Returns:

  • (Uuid)

    The ID of the customer to which this Payment belongs.



65
66
67
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 65

def customer_id
  @customer_id
end

#customer_nameString

Returns The name of the customer to which this Payment belongs.

Returns:

  • (String)

    The name of the customer to which this Payment belongs.



69
70
71
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 69

def customer_name
  @customer_name
end

#emailString

Returns The Email address of the Customer.

Returns:

  • (String)

    The Email address of the Customer.



85
86
87
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 85

def email
  @email
end

#faxString

Returns The fax number of the Customer’s Primary Contact.

Returns:

  • (String)

    The fax number of the Customer’s Primary Contact.



133
134
135
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 133

def fax
  @fax
end

#group_keyUuid

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).

Returns:

  • (Uuid)

    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).



57
58
59
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 57

def group_key
  @group_key
end

#memo_textString

Returns Memo or reference text (ex. memo field on a check).

Returns:

  • (String)

    Memo or reference text (ex. memo field on a check).



73
74
75
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 73

def memo_text
  @memo_text
end

#payment_amountDouble

Returns Total amount of this Payment.

Returns:

  • (Double)

    Total amount of this Payment.



93
94
95
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 93

def payment_amount
  @payment_amount
end

#payment_dateDate

Returns The date of this Payment.

Returns:

  • (Date)

    The date of this Payment.



121
122
123
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 121

def payment_date
  @payment_date
end

#payment_idUuid

Returns The unique ID of this Payment.

Returns:

  • (Uuid)

    The unique ID of this Payment.



61
62
63
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 61

def payment_id
  @payment_id
end

#payment_typeString

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.

Returns:

  • (String)

    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



113
114
115
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 113

def payment_type
  @payment_type
end

#phoneString

Returns The phone number of the Customer’s Primary Contact.

Returns:

  • (String)

    The phone number of the Customer’s Primary Contact.



129
130
131
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 129

def phone
  @phone
end

#post_dateDate

Returns Payment post date.

Returns:

  • (Date)

    Payment post date.



125
126
127
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 125

def 
  @post_date
end

#postal_codeString

Returns The postal/zip code of the address for the Customer’s Primary Contact.

Returns:

  • (String)

    The postal/zip code of the address for the Customer’s Primary Contact.



157
158
159
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 157

def postal_code
  @postal_code
end

#primary_contactString

Returns The name of the Primary Contact for the Customer.

Returns:

  • (String)

    The name of the Primary Contact for the Customer.



81
82
83
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 81

def primary_contact
  @primary_contact
end

#reference_codeString

Returns Reference code for the payment for the given Erp system.

Returns:

  • (String)

    Reference code for the payment for the given Erp system.



77
78
79
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 77

def reference_code
  @reference_code
end

#state_regionString

Returns The state/region of the address for the Customer’s Primary Contact.

Returns:

  • (String)

    The state/region of the address for the Customer’s Primary Contact.



153
154
155
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 153

def state_region
  @state_region
end

#tender_typeString

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.

Returns:

  • (String)

    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.



117
118
119
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 117

def tender_type
  @tender_type
end

#unapplied_amountDouble

Returns Unapplied balance of this Payment.

Returns:

  • (Double)

    Unapplied balance of this Payment.



97
98
99
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 97

def unapplied_amount
  @unapplied_amount
end

Instance Method Details

#as_json(options = {}) ⇒ object

Returns This object as a JSON key-value structure.

Returns:

  • (object)

    This object as a JSON key-value structure



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 165

def as_json(options={})
    {
        'groupKey' => @group_key,
        'paymentId' => @payment_id,
        'customerId' => @customer_id,
        'customerName' => @customer_name,
        'memoText' => @memo_text,
        'referenceCode' => @reference_code,
        'primaryContact' => @primary_contact,
        'email' => @email,
        '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.

Returns:

  • (String)

    This object converted to a JSON string



199
200
201
# File 'lib/lockstep_sdk/models/payment_detail_model.rb', line 199

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end