Class: LockstepSdk::InvoiceSyncModel

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

Overview

The InvoiceSyncModel 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 InvoiceSyncModel 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 an [InvoiceModel](developer.lockstep.io/docs/invoicemodel).

For more information on writing your own connector, see [Connector Data](developer.lockstep.io/docs/connector-data).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ InvoiceSyncModel

Initialize the InvoiceSyncModel using the provided prototype



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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 33

def initialize(params = {})
    @erp_key = params.dig(:erp_key)
    @company_erp_key = params.dig(:company_erp_key)
    @customer_erp_key = params.dig(:customer_erp_key)
    @salesperson_name = params.dig(:salesperson_name)
    @purchase_order_code = params.dig(:purchase_order_code)
    @reference_code = params.dig(:reference_code)
    @salesperson_code = params.dig(:salesperson_code)
    @invoice_type_code = params.dig(:invoice_type_code)
    @invoice_status_code = params.dig(:invoice_status_code)
    @terms_code = params.dig(:terms_code)
    @special_terms = params.dig(:special_terms)
    @currency_code = params.dig(:currency_code)
    @total_amount = params.dig(:total_amount)
    @sales_tax_amount = params.dig(:sales_tax_amount)
    @discount_amount = params.dig(:discount_amount)
    @outstanding_balance_amount = params.dig(:outstanding_balance_amount)
    @invoice_date = params.dig(:invoice_date)
    @discount_date = params.dig(:discount_date)
    @posted_date = params.dig(:posted_date)
    @invoice_closed_date = params.dig(:invoice_closed_date)
    @payment_due_date = params.dig(:payment_due_date)
    @imported_date = params.dig(:imported_date)
    @origin_address_line1 = params.dig(:origin_address_line1)
    @origin_address_line2 = params.dig(:origin_address_line2)
    @origin_address_line3 = params.dig(:origin_address_line3)
    @origin_address_city = params.dig(:origin_address_city)
    @origin_address_region = params.dig(:origin_address_region)
    @origin_address_postal_code = params.dig(:origin_address_postal_code)
    @origin_address_country = params.dig(:origin_address_country)
    @origin_address_latitude = params.dig(:origin_address_latitude)
    @origin_address_longitude = params.dig(:origin_address_longitude)
    @bill_to_address_line1 = params.dig(:bill_to_address_line1)
    @bill_to_address_line2 = params.dig(:bill_to_address_line2)
    @bill_to_address_line3 = params.dig(:bill_to_address_line3)
    @bill_to_address_city = params.dig(:bill_to_address_city)
    @bill_to_address_region = params.dig(:bill_to_address_region)
    @bill_to_address_postal_code = params.dig(:bill_to_address_postal_code)
    @bill_to_address_country = params.dig(:bill_to_address_country)
    @bill_to_address_latitude = params.dig(:bill_to_address_latitude)
    @bill_to_address_longitude = params.dig(:bill_to_address_longitude)
    @ship_to_address_line1 = params.dig(:ship_to_address_line1)
    @ship_to_address_line2 = params.dig(:ship_to_address_line2)
    @ship_to_address_line3 = params.dig(:ship_to_address_line3)
    @ship_to_address_city = params.dig(:ship_to_address_city)
    @ship_to_address_region = params.dig(:ship_to_address_region)
    @ship_to_address_postal_code = params.dig(:ship_to_address_postal_code)
    @ship_to_address_country = params.dig(:ship_to_address_country)
    @ship_to_address_latitude = params.dig(:ship_to_address_latitude)
    @ship_to_address_longitude = params.dig(:ship_to_address_longitude)
    @created = params.dig(:created)
    @modified = params.dig(:modified)
    @is_voided = params.dig(:is_voided)
    @in_dispute = params.dig(:in_dispute)
    @preferred_delivery_method = params.dig(:preferred_delivery_method)
    @currency_rate = params.dig(:currency_rate)
    @base_currency_total_amount = params.dig(:base_currency_total_amount)
    @base_currency_sales_tax_amount = params.dig(:base_currency_sales_tax_amount)
    @base_currency_discount_amount = params.dig(:base_currency_discount_amount)
    @base_currency_outstanding_balance_amount = params.dig(:base_currency_outstanding_balance_amount)
end

Instance Attribute Details

#base_currency_discount_amountDouble

Returns The total discounts given by the seller to the buyer on this invoice in the erp’s base currency.

Returns:

  • (Double)

    The total discounts given by the seller to the buyer on this invoice in the erp’s base currency.



325
326
327
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 325

def base_currency_discount_amount
  @base_currency_discount_amount
end

#base_currency_outstanding_balance_amountDouble

Returns The remaining balance value of this invoice in the erp’s base currency.

Returns:

  • (Double)

    The remaining balance value of this invoice in the erp’s base currency.



329
330
331
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 329

def base_currency_outstanding_balance_amount
  @base_currency_outstanding_balance_amount
end

#base_currency_sales_tax_amountDouble

Returns The total sales (or transactional) tax calculated for this invoice in the erp’s base currency.

Returns:

  • (Double)

    The total sales (or transactional) tax calculated for this invoice in the erp’s base currency.



321
322
323
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 321

def base_currency_sales_tax_amount
  @base_currency_sales_tax_amount
end

#base_currency_total_amountDouble

Returns The total value of this invoice, inclusive of all taxes and line items in the erp’s base currency.

Returns:

  • (Double)

    The total value of this invoice, inclusive of all taxes and line items in the erp’s base currency.



317
318
319
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 317

def base_currency_total_amount
  @base_currency_total_amount
end

#bill_to_address_cityString

Returns The billing address for this invoice.

Returns:

  • (String)

    The billing address for this invoice



233
234
235
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 233

def bill_to_address_city
  @bill_to_address_city
end

#bill_to_address_countryString

Returns The billing address for this invoice.

Returns:

  • (String)

    The billing address for this invoice



245
246
247
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 245

def bill_to_address_country
  @bill_to_address_country
end

#bill_to_address_latitudeFloat

Returns The billing address for this invoice.

Returns:

  • (Float)

    The billing address for this invoice



249
250
251
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 249

def bill_to_address_latitude
  @bill_to_address_latitude
end

#bill_to_address_line1String

Returns The billing address for this invoice.

Returns:

  • (String)

    The billing address for this invoice



221
222
223
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 221

def bill_to_address_line1
  @bill_to_address_line1
end

#bill_to_address_line2String

Returns The billing address for this invoice.

Returns:

  • (String)

    The billing address for this invoice



225
226
227
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 225

def bill_to_address_line2
  @bill_to_address_line2
end

#bill_to_address_line3String

Returns The billing address for this invoice.

Returns:

  • (String)

    The billing address for this invoice



229
230
231
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 229

def bill_to_address_line3
  @bill_to_address_line3
end

#bill_to_address_longitudeFloat

Returns The billing address for this invoice.

Returns:

  • (Float)

    The billing address for this invoice



253
254
255
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 253

def bill_to_address_longitude
  @bill_to_address_longitude
end

#bill_to_address_postal_codeString

Returns The billing address for this invoice.

Returns:

  • (String)

    The billing address for this invoice



241
242
243
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 241

def bill_to_address_postal_code
  @bill_to_address_postal_code
end

#bill_to_address_regionString

Returns The billing address for this invoice.

Returns:

  • (String)

    The billing address for this invoice



237
238
239
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 237

def bill_to_address_region
  @bill_to_address_region
end

#company_erp_keyString

Returns The original primary key or unique ID of the company to which this invoice belongs. This value should match the [Company ErpKey](developer.lockstep.io/docs/importing-companies#erpkey) field on the [CompanySyncModel](developer.lockstep.io/docs/importing-companies). An Invoice has two relationships: The Company and the Customer. The field ‘CompanyErpKey` identifies the company that created the invoice, and the field `CustomerErpKey` is the customer to whom the invoice was sent.

Returns:

  • (String)

    The original primary key or unique ID of the company to which this invoice belongs. This value should match the [Company ErpKey](developer.lockstep.io/docs/importing-companies#erpkey) field on the [CompanySyncModel](developer.lockstep.io/docs/importing-companies). An Invoice has two relationships: The Company and the Customer. The field ‘CompanyErpKey` identifies the company that created the invoice, and the field `CustomerErpKey` is the customer to whom the invoice was sent.



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

def company_erp_key
  @company_erp_key
end

#createdDate-time

Returns If known, the date when this record was created according to the originating financial system in which this record is maintained. If the originating financial system does not maintain a created-date, leave this field null.

Returns:

  • (Date-time)

    If known, the date when this record was created according to the originating financial system in which this record is maintained. If the originating financial system does not maintain a created-date, leave this field null.



293
294
295
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 293

def created
  @created
end

#currency_codeString

Returns The three-character ISO 4217 currency code used for this invoice.

Returns:

  • (String)

    The three-character ISO 4217 currency code used for this invoice.



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

def currency_code
  @currency_code
end

#currency_rateDouble

Returns The Currency Rate used to get from the account’s base currency to the invoice amount.

Returns:

  • (Double)

    The Currency Rate used to get from the account’s base currency to the invoice amount.



313
314
315
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 313

def currency_rate
  @currency_rate
end

#customer_erp_keyString

Returns The original primary key or unique ID of the company to which this invoice was sent. This value should match the [Company ErpKey](developer.lockstep.io/docs/importing-companies#erpkey) field on the [CompanySyncModel](developer.lockstep.io/docs/importing-companies). An Invoice has two relationships: The Company and the Customer. The field ‘CompanyErpKey` identifies the company that created the invoice, and the field `CustomerErpKey` is the customer to whom the invoice was sent.

Returns:

  • (String)

    The original primary key or unique ID of the company to which this invoice was sent. This value should match the [Company ErpKey](developer.lockstep.io/docs/importing-companies#erpkey) field on the [CompanySyncModel](developer.lockstep.io/docs/importing-companies). An Invoice has two relationships: The Company and the Customer. The field ‘CompanyErpKey` identifies the company that created the invoice, and the field `CustomerErpKey` is the customer to whom the invoice was sent.



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

def customer_erp_key
  @customer_erp_key
end

#discount_amountDouble

Returns The total discounts given by the seller to the buyer on this invoice in the invoice currency.

Returns:

  • (Double)

    The total discounts given by the seller to the buyer on this invoice in the invoice currency.



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

def discount_amount
  @discount_amount
end

#discount_dateDate-time

Returns The date when discounts were adjusted for this invoice.

Returns:

  • (Date-time)

    The date when discounts were adjusted for this invoice.



165
166
167
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 165

def discount_date
  @discount_date
end

#erp_keyString

Returns This is the primary key of the Invoice record. For this field, you should use whatever the invoice’s unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your invoice records in a database, whatever the primary key for the invoice table is in the database should be the “ErpKey”. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).

Returns:

  • (String)

    This is the primary key of the Invoice record. For this field, you should use whatever the invoice’s unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your invoice records in a database, whatever the primary key for the invoice table is in the database should be the “ErpKey”. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).



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

def erp_key
  @erp_key
end

#imported_dateDate-time

Returns The date and time when this record was imported from the user’s ERP or accounting system.

Returns:

  • (Date-time)

    The date and time when this record was imported from the user’s ERP or accounting system.



181
182
183
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 181

def imported_date
  @imported_date
end

#in_disputeBoolean

Returns Is the invoice in dispute? If not specified, we assume the invoice is not in dispute.

Returns:

  • (Boolean)

    Is the invoice in dispute? If not specified, we assume the invoice is not in dispute.



305
306
307
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 305

def in_dispute
  @in_dispute
end

#invoice_closed_dateDate-time

Returns The date when the invoice was closed and finalized after completion of all payments and delivery of all products and services.

Returns:

  • (Date-time)

    The date when the invoice was closed and finalized after completion of all payments and delivery of all products and services.



173
174
175
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 173

def invoice_closed_date
  @invoice_closed_date
end

#invoice_dateDate-time

Returns The reporting date for this invoice.

Returns:

  • (Date-time)

    The reporting date for this invoice.



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

def invoice_date
  @invoice_date
end

#invoice_status_codeString

Returns A code identifying the status of this invoice. Recognized Invoice status codes are: * ‘Open` - Represents an invoice that is considered open and needs more work to complete * `Closed` - Represents an invoice that is considered closed and resolved.

Returns:

  • (String)

    A code identifying the status of this invoice. Recognized Invoice status codes are: * ‘Open` - Represents an invoice that is considered open and needs more work to complete * `Closed` - Represents an invoice that is considered closed and resolved



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

def invoice_status_code
  @invoice_status_code
end

#invoice_type_codeString

Returns A code identifying the type of this invoice. Recognized Invoice types are: * ‘AR Invoice` - Represents an invoice sent by Company to the Customer * `AP Invoice` - Represents an invoice sent by Vendor to the Company * `AR Credit Memo` - Represents a credit memo generated by Company given to Customer * `AP Credit Memo` - Represents a credit memo generated by Vendor given to Company.

Returns:

  • (String)

    A code identifying the type of this invoice. Recognized Invoice types are: * ‘AR Invoice` - Represents an invoice sent by Company to the Customer * `AP Invoice` - Represents an invoice sent by Vendor to the Company * `AR Credit Memo` - Represents a credit memo generated by Company given to Customer * `AP Credit Memo` - Represents a credit memo generated by Vendor given to Company



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

def invoice_type_code
  @invoice_type_code
end

#is_voidedBoolean

Returns Is the invoice voided? If not specified, we assume the invoice is not voided.

Returns:

  • (Boolean)

    Is the invoice voided? If not specified, we assume the invoice is not voided.



301
302
303
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 301

def is_voided
  @is_voided
end

#modifiedDate-time

Returns If known, the date when this record was most recently modified according to the originating financial system in which this record is maintained. If the originating financial system does not maintain a most-recently-modified-date, leave this field null.

Returns:

  • (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. If the originating financial system does not maintain a most-recently-modified-date, leave this field null.



297
298
299
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 297

def modified
  @modified
end

#origin_address_cityString

Returns The origination address for this invoice.

Returns:

  • (String)

    The origination address for this invoice



197
198
199
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 197

def origin_address_city
  @origin_address_city
end

#origin_address_countryString

Returns The origination address for this invoice.

Returns:

  • (String)

    The origination address for this invoice



209
210
211
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 209

def origin_address_country
  @origin_address_country
end

#origin_address_latitudeFloat

Returns The origination address for this invoice.

Returns:

  • (Float)

    The origination address for this invoice



213
214
215
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 213

def origin_address_latitude
  @origin_address_latitude
end

#origin_address_line1String

Returns The origination address for this invoice.

Returns:

  • (String)

    The origination address for this invoice



185
186
187
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 185

def origin_address_line1
  @origin_address_line1
end

#origin_address_line2String

Returns The origination address for this invoice.

Returns:

  • (String)

    The origination address for this invoice



189
190
191
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 189

def origin_address_line2
  @origin_address_line2
end

#origin_address_line3String

Returns The origination address for this invoice.

Returns:

  • (String)

    The origination address for this invoice



193
194
195
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 193

def origin_address_line3
  @origin_address_line3
end

#origin_address_longitudeFloat

Returns The origination address for this invoice.

Returns:

  • (Float)

    The origination address for this invoice



217
218
219
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 217

def origin_address_longitude
  @origin_address_longitude
end

#origin_address_postal_codeString

Returns The origination address for this invoice.

Returns:

  • (String)

    The origination address for this invoice



205
206
207
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 205

def origin_address_postal_code
  @origin_address_postal_code
end

#origin_address_regionString

Returns The origination address for this invoice.

Returns:

  • (String)

    The origination address for this invoice



201
202
203
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 201

def origin_address_region
  @origin_address_region
end

#outstanding_balance_amountDouble

Returns The remaining balance value of this invoice in the invoice currency.

Returns:

  • (Double)

    The remaining balance value of this invoice in the invoice currency.



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

def outstanding_balance_amount
  @outstanding_balance_amount
end

#payment_due_dateDate-time

Returns The date when the remaining outstanding balance is due.

Returns:

  • (Date-time)

    The date when the remaining outstanding balance is due.



177
178
179
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 177

def payment_due_date
  @payment_due_date
end

#posted_dateDate-time

Returns The date when this invoice posted to the company’s general ledger.

Returns:

  • (Date-time)

    The date when this invoice posted to the company’s general ledger.



169
170
171
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 169

def posted_date
  @posted_date
end

#preferred_delivery_methodString

Returns Indicates the preferred delivery method for this invoice. Examples include Print, Email, Fax.

Returns:

  • (String)

    Indicates the preferred delivery method for this invoice. Examples include Print, Email, Fax



309
310
311
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 309

def preferred_delivery_method
  @preferred_delivery_method
end

#purchase_order_codeString

Returns The “Purchase Order Code” is a code that is sometimes used by companies to refer to the original PO that was sent that caused this invoice to be written. If a customer sends a purchase order to a vendor, the vendor can then create an invoice and refer back to the originating purchase order using this field.

Returns:

  • (String)

    The “Purchase Order Code” is a code that is sometimes used by companies to refer to the original PO that was sent that caused this invoice to be written. If a customer sends a purchase order to a vendor, the vendor can then create an invoice and refer back to the originating purchase order using this field.



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

def purchase_order_code
  @purchase_order_code
end

#reference_codeString

Returns An additional reference code that is sometimes used to identify this invoice. The meaning of this field is specific to the ERP or accounting system used by the user.

Returns:

  • (String)

    An additional reference code that is sometimes used to identify this invoice. The meaning of this field is specific to the ERP or accounting system used by the user.



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

def reference_code
  @reference_code
end

#sales_tax_amountDouble

Returns The total sales (or transactional) tax calculated for this invoice in the invoice currency.

Returns:

  • (Double)

    The total sales (or transactional) tax calculated for this invoice in the invoice currency.



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

def sales_tax_amount
  @sales_tax_amount
end

#salesperson_codeString

Returns A code identifying the salesperson responsible for writing this quote, invoice, or order. This is just text, it is not a reference to the “Contacts” table. You will not receive an error if this field does not match a known contact person.

Returns:

  • (String)

    A code identifying the salesperson responsible for writing this quote, invoice, or order. This is just text, it is not a reference to the “Contacts” table. You will not receive an error if this field does not match a known contact person.



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

def salesperson_code
  @salesperson_code
end

#salesperson_nameString

Returns The name of the salesperson that wrote this invoice. This is just text, it is not a reference to the “Contacts” table. You will not receive an error if this field does not match a known contact person.

Returns:

  • (String)

    The name of the salesperson that wrote this invoice. This is just text, it is not a reference to the “Contacts” table. You will not receive an error if this field does not match a known contact person.



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

def salesperson_name
  @salesperson_name
end

#ship_to_address_cityString

Returns The shipping address for this invoice.

Returns:

  • (String)

    The shipping address for this invoice



269
270
271
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 269

def ship_to_address_city
  @ship_to_address_city
end

#ship_to_address_countryString

Returns The shipping address for this invoice.

Returns:

  • (String)

    The shipping address for this invoice



281
282
283
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 281

def ship_to_address_country
  @ship_to_address_country
end

#ship_to_address_latitudeFloat

Returns The shipping address for this invoice.

Returns:

  • (Float)

    The shipping address for this invoice



285
286
287
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 285

def ship_to_address_latitude
  @ship_to_address_latitude
end

#ship_to_address_line1String

Returns The shipping address for this invoice.

Returns:

  • (String)

    The shipping address for this invoice



257
258
259
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 257

def ship_to_address_line1
  @ship_to_address_line1
end

#ship_to_address_line2String

Returns The shipping address for this invoice.

Returns:

  • (String)

    The shipping address for this invoice



261
262
263
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 261

def ship_to_address_line2
  @ship_to_address_line2
end

#ship_to_address_line3String

Returns The shipping address for this invoice.

Returns:

  • (String)

    The shipping address for this invoice



265
266
267
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 265

def ship_to_address_line3
  @ship_to_address_line3
end

#ship_to_address_longitudeFloat

Returns The shipping address for this invoice.

Returns:

  • (Float)

    The shipping address for this invoice



289
290
291
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 289

def ship_to_address_longitude
  @ship_to_address_longitude
end

#ship_to_address_postal_codeString

Returns The shipping address for this invoice.

Returns:

  • (String)

    The shipping address for this invoice



277
278
279
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 277

def ship_to_address_postal_code
  @ship_to_address_postal_code
end

#ship_to_address_regionString

Returns The shipping address for this invoice.

Returns:

  • (String)

    The shipping address for this invoice



273
274
275
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 273

def ship_to_address_region
  @ship_to_address_region
end

#special_termsString

Returns If the customer negotiated any special terms different from the standard terms above, describe them here.

Returns:

  • (String)

    If the customer negotiated any special terms different from the standard terms above, describe them here.



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

def special_terms
  @special_terms
end

#terms_codeString

Returns A code identifying the terms given to the purchaser. This field is imported directly from the originating financial system and does not follow a specified format.

Returns:

  • (String)

    A code identifying the terms given to the purchaser. This field is imported directly from the originating financial system and does not follow a specified format.



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

def terms_code
  @terms_code
end

#total_amountDouble

Returns The total value of this invoice, inclusive of all taxes and line items in the invoice currency.

Returns:

  • (Double)

    The total value of this invoice, inclusive of all taxes and line items in the invoice currency.



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

def total_amount
  @total_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



333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 333

def as_json(options={})
    {
        'erpKey' => @erp_key,
        'companyErpKey' => @company_erp_key,
        'customerErpKey' => @customer_erp_key,
        'salespersonName' => @salesperson_name,
        'purchaseOrderCode' => @purchase_order_code,
        'referenceCode' => @reference_code,
        'salespersonCode' => @salesperson_code,
        'invoiceTypeCode' => @invoice_type_code,
        'invoiceStatusCode' => @invoice_status_code,
        'termsCode' => @terms_code,
        'specialTerms' => @special_terms,
        'currencyCode' => @currency_code,
        'totalAmount' => @total_amount,
        'salesTaxAmount' => @sales_tax_amount,
        'discountAmount' => @discount_amount,
        'outstandingBalanceAmount' => @outstanding_balance_amount,
        'invoiceDate' => @invoice_date,
        'discountDate' => @discount_date,
        'postedDate' => @posted_date,
        'invoiceClosedDate' => @invoice_closed_date,
        'paymentDueDate' => @payment_due_date,
        'importedDate' => @imported_date,
        'originAddressLine1' => @origin_address_line1,
        'originAddressLine2' => @origin_address_line2,
        'originAddressLine3' => @origin_address_line3,
        'originAddressCity' => @origin_address_city,
        'originAddressRegion' => @origin_address_region,
        'originAddressPostalCode' => @origin_address_postal_code,
        'originAddressCountry' => @origin_address_country,
        'originAddressLatitude' => @origin_address_latitude,
        'originAddressLongitude' => @origin_address_longitude,
        'billToAddressLine1' => @bill_to_address_line1,
        'billToAddressLine2' => @bill_to_address_line2,
        'billToAddressLine3' => @bill_to_address_line3,
        'billToAddressCity' => @bill_to_address_city,
        'billToAddressRegion' => @bill_to_address_region,
        'billToAddressPostalCode' => @bill_to_address_postal_code,
        'billToAddressCountry' => @bill_to_address_country,
        'billToAddressLatitude' => @bill_to_address_latitude,
        'billToAddressLongitude' => @bill_to_address_longitude,
        'shipToAddressLine1' => @ship_to_address_line1,
        'shipToAddressLine2' => @ship_to_address_line2,
        'shipToAddressLine3' => @ship_to_address_line3,
        'shipToAddressCity' => @ship_to_address_city,
        'shipToAddressRegion' => @ship_to_address_region,
        'shipToAddressPostalCode' => @ship_to_address_postal_code,
        'shipToAddressCountry' => @ship_to_address_country,
        'shipToAddressLatitude' => @ship_to_address_latitude,
        'shipToAddressLongitude' => @ship_to_address_longitude,
        'created' => @created,
        'modified' => @modified,
        'isVoided' => @is_voided,
        'inDispute' => @in_dispute,
        'preferredDeliveryMethod' => @preferred_delivery_method,
        'currencyRate' => @currency_rate,
        'baseCurrencyTotalAmount' => @base_currency_total_amount,
        'baseCurrencySalesTaxAmount' => @base_currency_sales_tax_amount,
        'baseCurrencyDiscountAmount' => @base_currency_discount_amount,
        'baseCurrencyOutstandingBalanceAmount' => @base_currency_outstanding_balance_amount,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



399
400
401
# File 'lib/lockstep_sdk/models/invoice_sync_model.rb', line 399

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