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

def initialize(params = {})
    @on_match_action = params.dig(:on_match_action)
    @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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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.



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

def created
  @created
end

#descriptionString

Returns Description of this invoice line.

Returns:

  • (String)

    Description of this invoice line.



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

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



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

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.



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

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:



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

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.



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

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.



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

def modified
  @modified
end

#on_match_actionMatchAction

Returns Indicates what action to take when an existing object has been found during the sync process.

Returns:

  • (MatchAction)

    Indicates what action to take when an existing object has been found during the sync process.



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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.



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

def product_code
  @product_code
end

#quantityDouble

Returns The quantity of items for ths line.

Returns:

  • (Double)

    The quantity of items for ths line.



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

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.



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

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.



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

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.



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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.



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

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.



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

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.



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

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



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
294
295
296
297
298
299
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 253

def as_json(options={})
    {
        'onMatchAction' => @on_match_action,
        '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



303
304
305
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 303

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