Class: LockstepSdk::InvoiceLineSyncModel

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

Overview

The InvoiceLineSyncModel 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 InvoiceLineSyncModel 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 [InvoiceLineModel](developer.lockstep.io/docs/invoicelinemodel).

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 = {}) ⇒ InvoiceLineSyncModel

Initialize the InvoiceLineSyncModel 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
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 33

def initialize(params = {})
    @erp_key = params.dig(:erp_key)
    @invoice_erp_key = params.dig(:invoice_erp_key)
    @line_number = params.dig(:line_number)
    @product_code = params.dig(:product_code)
    @description = params.dig(:description)
    @unit_measure_code = params.dig(:unit_measure_code)
    @unit_price = params.dig(:unit_price)
    @quantity = params.dig(:quantity)
    @quantity_shipped = params.dig(:quantity_shipped)
    @quantity_received = params.dig(:quantity_received)
    @total_amount = params.dig(:total_amount)
    @exemption_code = params.dig(:exemption_code)
    @reporting_date = params.dig(:reporting_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)
end

Instance Attribute Details

#bill_to_address_cityString

Returns Billing address for this invoice line, if this line item is to be billed to a different address.

Returns:

  • (String)

    Billing address for this invoice line, if this line item is to be billed to a different address



180
181
182
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 180

def bill_to_address_city
  @bill_to_address_city
end

#bill_to_address_countryString

Returns Billing address for this invoice line, if this line item is to be billed to a different address.

Returns:

  • (String)

    Billing address for this invoice line, if this line item is to be billed to a different address



192
193
194
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 192

def bill_to_address_country
  @bill_to_address_country
end

#bill_to_address_latitudeFloat

Returns Billing address for this invoice line, if this line item is to be billed to a different address.

Returns:

  • (Float)

    Billing address for this invoice line, if this line item is to be billed to a different address



196
197
198
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 196

def bill_to_address_latitude
  @bill_to_address_latitude
end

#bill_to_address_line1String

Returns Billing address for this invoice line, if this line item is to be billed to a different address.

Returns:

  • (String)

    Billing address for this invoice line, if this line item is to be billed to a different address



168
169
170
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 168

def bill_to_address_line1
  @bill_to_address_line1
end

#bill_to_address_line2String

Returns Billing address for this invoice line, if this line item is to be billed to a different address.

Returns:

  • (String)

    Billing address for this invoice line, if this line item is to be billed to a different address



172
173
174
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 172

def bill_to_address_line2
  @bill_to_address_line2
end

#bill_to_address_line3String

Returns Billing address for this invoice line, if this line item is to be billed to a different address.

Returns:

  • (String)

    Billing address for this invoice line, if this line item is to be billed to a different address



176
177
178
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 176

def bill_to_address_line3
  @bill_to_address_line3
end

#bill_to_address_longitudeFloat

Returns Billing address for this invoice line, if this line item is to be billed to a different address.

Returns:

  • (Float)

    Billing address for this invoice line, if this line item is to be billed to a different address



200
201
202
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 200

def bill_to_address_longitude
  @bill_to_address_longitude
end

#bill_to_address_postal_codeString

Returns Billing address for this invoice line, if this line item is to be billed to a different address.

Returns:

  • (String)

    Billing address for this invoice line, if this line item is to be billed to a different address



188
189
190
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 188

def bill_to_address_postal_code
  @bill_to_address_postal_code
end

#bill_to_address_regionString

Returns Billing address for this invoice line, if this line item is to be billed to a different address.

Returns:

  • (String)

    Billing address for this invoice line, if this line item is to be billed to a different address



184
185
186
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 184

def bill_to_address_region
  @bill_to_address_region
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.



240
241
242
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 240

def created
  @created
end

#descriptionString

Returns Description of this invoice line.

Returns:

  • (String)

    Description of this invoice line.



96
97
98
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 96

def description
  @description
end

#erp_keyString

Returns This is the primary key of the Invoice Line record. For this field, you should use whatever the contact’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 line records in a database, whatever the primary key for the invoice line 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 Line record. For this field, you should use whatever the contact’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 line records in a database, whatever the primary key for the invoice line table is in the database should be the “ErpKey”. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).



80
81
82
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 80

def erp_key
  @erp_key
end

#exemption_codeString

Returns If this line is tax exempt, this code indicates the reason for the exemption.

Returns:

  • (String)

    If this line is tax exempt, this code indicates the reason for the exemption.



124
125
126
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 124

def exemption_code
  @exemption_code
end

#invoice_erp_keyString

Returns The original primary key or unique ID of the invoice to which this line belongs. This value should match the [Invoice ErpKey](developer.lockstep.io/docs/importing-invoices#erpkey) field on the [InvoiceSyncModel](developer.lockstep.io/docs/importing-invoices).

Returns:



84
85
86
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 84

def invoice_erp_key
  @invoice_erp_key
end

#line_numberString

Returns The line number of this line, as defined in the originating ERP or accounting system. You can sort on this number to get the original view of lines within the invoice.

Returns:

  • (String)

    The line number of this line, as defined in the originating ERP or accounting system. You can sort on this number to get the original view of lines within the invoice.



88
89
90
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 88

def line_number
  @line_number
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.



244
245
246
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 244

def modified
  @modified
end

#origin_address_cityString

Returns Origination address for this invoice line, if this line item was originated from a different address.

Returns:

  • (String)

    Origination address for this invoice line, if this line item was originated from a different address



144
145
146
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 144

def origin_address_city
  @origin_address_city
end

#origin_address_countryString

Returns Origination address for this invoice line, if this line item was originated from a different address.

Returns:

  • (String)

    Origination address for this invoice line, if this line item was originated from a different address



156
157
158
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 156

def origin_address_country
  @origin_address_country
end

#origin_address_latitudeFloat

Returns Origination address for this invoice line, if this line item was originated from a different address.

Returns:

  • (Float)

    Origination address for this invoice line, if this line item was originated from a different address



160
161
162
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 160

def origin_address_latitude
  @origin_address_latitude
end

#origin_address_line1String

Returns Origination address for this invoice line, if this line item was originated from a different address.

Returns:

  • (String)

    Origination address for this invoice line, if this line item was originated from a different address



132
133
134
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 132

def origin_address_line1
  @origin_address_line1
end

#origin_address_line2String

Returns Origination address for this invoice line, if this line item was originated from a different address.

Returns:

  • (String)

    Origination address for this invoice line, if this line item was originated from a different address



136
137
138
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 136

def origin_address_line2
  @origin_address_line2
end

#origin_address_line3String

Returns Origination address for this invoice line, if this line item was originated from a different address.

Returns:

  • (String)

    Origination address for this invoice line, if this line item was originated from a different address



140
141
142
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 140

def origin_address_line3
  @origin_address_line3
end

#origin_address_longitudeFloat

Returns Origination address for this invoice line, if this line item was originated from a different address.

Returns:

  • (Float)

    Origination address for this invoice line, if this line item was originated from a different address



164
165
166
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 164

def origin_address_longitude
  @origin_address_longitude
end

#origin_address_postal_codeString

Returns Origination address for this invoice line, if this line item was originated from a different address.

Returns:

  • (String)

    Origination address for this invoice line, if this line item was originated from a different address



152
153
154
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 152

def origin_address_postal_code
  @origin_address_postal_code
end

#origin_address_regionString

Returns Origination address for this invoice line, if this line item was originated from a different address.

Returns:

  • (String)

    Origination address for this invoice line, if this line item was originated from a different address



148
149
150
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 148

def origin_address_region
  @origin_address_region
end

#product_codeString

Returns A code number identifying the product or service that is specified on this line.

Returns:

  • (String)

    A code number identifying the product or service that is specified on this line.



92
93
94
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 92

def product_code
  @product_code
end

#quantityDouble

Returns The quantity of items for ths line.

Returns:

  • (Double)

    The quantity of items for ths line.



108
109
110
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 108

def quantity
  @quantity
end

#quantity_receivedDouble

Returns The number of items that has been received.

Returns:

  • (Double)

    The number of items that has been received.



116
117
118
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 116

def quantity_received
  @quantity_received
end

#quantity_shippedDouble

Returns The number of items that have been shipped.

Returns:

  • (Double)

    The number of items that have been shipped.



112
113
114
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 112

def quantity_shipped
  @quantity_shipped
end

#reporting_dateDate-time

Returns If null, the products specified on this line were delivered on the same date as all other lines. If not null, this line was delivered or finalized on a different date than the overall invoice.

Returns:

  • (Date-time)

    If null, the products specified on this line were delivered on the same date as all other lines. If not null, this line was delivered or finalized on a different date than the overall invoice.



128
129
130
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 128

def reporting_date
  @reporting_date
end

#ship_to_address_cityString

Returns Shipping address for this invoice line, if this line item is to be shipped to a different address.

Returns:

  • (String)

    Shipping address for this invoice line, if this line item is to be shipped to a different address



216
217
218
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 216

def ship_to_address_city
  @ship_to_address_city
end

#ship_to_address_countryString

Returns Shipping address for this invoice line, if this line item is to be shipped to a different address.

Returns:

  • (String)

    Shipping address for this invoice line, if this line item is to be shipped to a different address



228
229
230
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 228

def ship_to_address_country
  @ship_to_address_country
end

#ship_to_address_latitudeFloat

Returns Shipping address for this invoice line, if this line item is to be shipped to a different address.

Returns:

  • (Float)

    Shipping address for this invoice line, if this line item is to be shipped to a different address



232
233
234
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 232

def ship_to_address_latitude
  @ship_to_address_latitude
end

#ship_to_address_line1String

Returns Shipping address for this invoice line, if this line item is to be shipped to a different address.

Returns:

  • (String)

    Shipping address for this invoice line, if this line item is to be shipped to a different address



204
205
206
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 204

def ship_to_address_line1
  @ship_to_address_line1
end

#ship_to_address_line2String

Returns Shipping address for this invoice line, if this line item is to be shipped to a different address.

Returns:

  • (String)

    Shipping address for this invoice line, if this line item is to be shipped to a different address



208
209
210
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 208

def ship_to_address_line2
  @ship_to_address_line2
end

#ship_to_address_line3String

Returns Shipping address for this invoice line, if this line item is to be shipped to a different address.

Returns:

  • (String)

    Shipping address for this invoice line, if this line item is to be shipped to a different address



212
213
214
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 212

def ship_to_address_line3
  @ship_to_address_line3
end

#ship_to_address_longitudeFloat

Returns Shipping address for this invoice line, if this line item is to be shipped to a different address.

Returns:

  • (Float)

    Shipping address for this invoice line, if this line item is to be shipped to a different address



236
237
238
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 236

def ship_to_address_longitude
  @ship_to_address_longitude
end

#ship_to_address_postal_codeString

Returns Shipping address for this invoice line, if this line item is to be shipped to a different address.

Returns:

  • (String)

    Shipping address for this invoice line, if this line item is to be shipped to a different address



224
225
226
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 224

def ship_to_address_postal_code
  @ship_to_address_postal_code
end

#ship_to_address_regionString

Returns Shipping address for this invoice line, if this line item is to be shipped to a different address.

Returns:

  • (String)

    Shipping address for this invoice line, if this line item is to be shipped to a different address



220
221
222
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 220

def ship_to_address_region
  @ship_to_address_region
end

#total_amountDouble

Returns The total amount for this line.

Returns:

  • (Double)

    The total amount for this line.



120
121
122
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 120

def total_amount
  @total_amount
end

#unit_measure_codeString

Returns For lines measured in a unit other than “quantity”, this code indicates the measurement system for the quantity field. If the line is measured in quantity, this field is null.

Returns:

  • (String)

    For lines measured in a unit other than “quantity”, this code indicates the measurement system for the quantity field. If the line is measured in quantity, this field is null.



100
101
102
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 100

def unit_measure_code
  @unit_measure_code
end

#unit_priceDouble

Returns The price of a single unit for this line.

Returns:

  • (Double)

    The price of a single unit for this line.



104
105
106
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 104

def unit_price
  @unit_price
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



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 248

def as_json(options={})
    {
        'erpKey' => @erp_key,
        'invoiceErpKey' => @invoice_erp_key,
        'lineNumber' => @line_number,
        'productCode' => @product_code,
        'description' => @description,
        'unitMeasureCode' => @unit_measure_code,
        'unitPrice' => @unit_price,
        'quantity' => @quantity,
        'quantityShipped' => @quantity_shipped,
        'quantityReceived' => @quantity_received,
        'totalAmount' => @total_amount,
        'exemptionCode' => @exemption_code,
        'reportingDate' => @reporting_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,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



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

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