Class: LockstepSdk::InvoiceLineSyncModel
- Inherits:
-
Object
- Object
- LockstepSdk::InvoiceLineSyncModel
- 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
-
#bill_to_address_city ⇒ String
Billing address for this invoice line, if this line item is to be billed to a different address.
-
#bill_to_address_country ⇒ String
Billing address for this invoice line, if this line item is to be billed to a different address.
-
#bill_to_address_latitude ⇒ Float
Billing address for this invoice line, if this line item is to be billed to a different address.
-
#bill_to_address_line1 ⇒ String
Billing address for this invoice line, if this line item is to be billed to a different address.
-
#bill_to_address_line2 ⇒ String
Billing address for this invoice line, if this line item is to be billed to a different address.
-
#bill_to_address_line3 ⇒ String
Billing address for this invoice line, if this line item is to be billed to a different address.
-
#bill_to_address_longitude ⇒ Float
Billing address for this invoice line, if this line item is to be billed to a different address.
-
#bill_to_address_postal_code ⇒ String
Billing address for this invoice line, if this line item is to be billed to a different address.
-
#bill_to_address_region ⇒ String
Billing address for this invoice line, if this line item is to be billed to a different address.
-
#created ⇒ Date-time
If known, the date when this record was created according to the originating financial system in which this record is maintained.
-
#description ⇒ String
Description of this invoice line.
-
#erp_key ⇒ String
This is the primary key of the Invoice Line record.
-
#exemption_code ⇒ String
If this line is tax exempt, this code indicates the reason for the exemption.
-
#invoice_erp_key ⇒ String
The original primary key or unique ID of the invoice to which this line belongs.
-
#line_number ⇒ String
The line number of this line, as defined in the originating ERP or accounting system.
-
#modified ⇒ 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.
-
#on_match_action ⇒ MatchAction
Indicates what action to take when an existing object has been found during the sync process.
-
#origin_address_city ⇒ String
Origination address for this invoice line, if this line item was originated from a different address.
-
#origin_address_country ⇒ String
Origination address for this invoice line, if this line item was originated from a different address.
-
#origin_address_latitude ⇒ Float
Origination address for this invoice line, if this line item was originated from a different address.
-
#origin_address_line1 ⇒ String
Origination address for this invoice line, if this line item was originated from a different address.
-
#origin_address_line2 ⇒ String
Origination address for this invoice line, if this line item was originated from a different address.
-
#origin_address_line3 ⇒ String
Origination address for this invoice line, if this line item was originated from a different address.
-
#origin_address_longitude ⇒ Float
Origination address for this invoice line, if this line item was originated from a different address.
-
#origin_address_postal_code ⇒ String
Origination address for this invoice line, if this line item was originated from a different address.
-
#origin_address_region ⇒ String
Origination address for this invoice line, if this line item was originated from a different address.
-
#product_code ⇒ String
A code number identifying the product or service that is specified on this line.
-
#quantity ⇒ Double
The quantity of items for ths line.
-
#quantity_received ⇒ Double
The number of items that has been received.
-
#quantity_shipped ⇒ Double
The number of items that have been shipped.
-
#reporting_date ⇒ Date-time
If null, the products specified on this line were delivered on the same date as all other lines.
-
#ship_to_address_city ⇒ String
Shipping address for this invoice line, if this line item is to be shipped to a different address.
-
#ship_to_address_country ⇒ String
Shipping address for this invoice line, if this line item is to be shipped to a different address.
-
#ship_to_address_latitude ⇒ Float
Shipping address for this invoice line, if this line item is to be shipped to a different address.
-
#ship_to_address_line1 ⇒ String
Shipping address for this invoice line, if this line item is to be shipped to a different address.
-
#ship_to_address_line2 ⇒ String
Shipping address for this invoice line, if this line item is to be shipped to a different address.
-
#ship_to_address_line3 ⇒ String
Shipping address for this invoice line, if this line item is to be shipped to a different address.
-
#ship_to_address_longitude ⇒ Float
Shipping address for this invoice line, if this line item is to be shipped to a different address.
-
#ship_to_address_postal_code ⇒ String
Shipping address for this invoice line, if this line item is to be shipped to a different address.
-
#ship_to_address_region ⇒ String
Shipping address for this invoice line, if this line item is to be shipped to a different address.
-
#total_amount ⇒ Double
The total amount for this line.
-
#unit_measure_code ⇒ String
For lines measured in a unit other than “quantity”, this code indicates the measurement system for the quantity field.
-
#unit_price ⇒ Double
The price of a single unit for this line.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ InvoiceLineSyncModel
constructor
Initialize the InvoiceLineSyncModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
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_city ⇒ String
Returns 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_country ⇒ String
Returns 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_latitude ⇒ Float
Returns 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_line1 ⇒ String
Returns 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_line2 ⇒ String
Returns 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_line3 ⇒ String
Returns 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_longitude ⇒ Float
Returns 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_code ⇒ String
Returns 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_region ⇒ String
Returns 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 |
#created ⇒ Date-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.
245 246 247 |
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 245 def created @created end |
#description ⇒ String
Returns 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_key ⇒ String
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).
85 86 87 |
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 85 def erp_key @erp_key end |
#exemption_code ⇒ String
Returns 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_key ⇒ String
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).
89 90 91 |
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 89 def invoice_erp_key @invoice_erp_key end |
#line_number ⇒ String
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.
93 94 95 |
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 93 def line_number @line_number end |
#modified ⇒ Date-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.
249 250 251 |
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 249 def modified @modified end |
#on_match_action ⇒ MatchAction
Returns 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_city ⇒ String
Returns 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_country ⇒ String
Returns 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_latitude ⇒ Float
Returns 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_line1 ⇒ String
Returns 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_line2 ⇒ String
Returns 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_line3 ⇒ String
Returns 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_longitude ⇒ Float
Returns 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_code ⇒ String
Returns 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_region ⇒ String
Returns 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_code ⇒ String
Returns 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 |
#quantity ⇒ Double
Returns 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_received ⇒ Double
Returns 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_shipped ⇒ Double
Returns 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_date ⇒ Date-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.
133 134 135 |
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 133 def reporting_date @reporting_date end |
#ship_to_address_city ⇒ String
Returns 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_country ⇒ String
Returns 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_latitude ⇒ Float
Returns 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_line1 ⇒ String
Returns 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_line2 ⇒ String
Returns 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_line3 ⇒ String
Returns 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_longitude ⇒ Float
Returns 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_code ⇒ String
Returns 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_region ⇒ String
Returns 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_amount ⇒ Double
Returns 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_code ⇒ String
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.
105 106 107 |
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 105 def unit_measure_code @unit_measure_code end |
#unit_price ⇒ Double
Returns 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.
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(={}) { '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.
303 304 305 |
# File 'lib/lockstep_sdk/models/invoice_line_sync_model.rb', line 303 def to_json(*) "[#{as_json(*).to_json(*)}]" end |