Class: LockstepSdk::InvoiceLineModel
- Inherits:
-
Object
- Object
- LockstepSdk::InvoiceLineModel
- Defined in:
- lib/lockstep_sdk/models/invoice_line_model.rb
Overview
Represents a line in an invoice
Instance Attribute Summary collapse
-
#app_enrollment_id ⇒ Uuid
The AppEnrollmentId of the application that imported this record.
-
#attachments ⇒ AttachmentModel
A collection of attachments linked to this record.
-
#created ⇒ Date-time
The date on which this line was created.
-
#created_user_id ⇒ Uuid
The ID number of the user who created this line.
-
#description ⇒ String
Description of this invoice line.
-
#erp_key ⇒ String
The unique ID of this record as it was known in its originating financial system, if it was different from the original ‘LineNumber`.
-
#exemption_code ⇒ String
If this line is tax exempt, this code indicates the reason for the exemption.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#invoice_id ⇒ Uuid
The ID number of the invoice this line belongs to.
-
#invoice_line_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#line_number ⇒ String
The line number of this line, as defined in the originating ERP or accounting system.
-
#modified ⇒ Date-time
The date on which this line was last modified.
-
#modified_user_id ⇒ Uuid
The ID number of the user who most recently modified this line.
-
#notes ⇒ NoteModel
A collection of notes linked to this record.
-
#override_bill_to_address_id ⇒ Uuid
An optional ID number for the line’s bill to address.
-
#override_origin_address_id ⇒ Uuid
An optional ID number for the line’s origin address.
-
#override_ship_to_address_id ⇒ Uuid
An optional ID number for the line’s ship to 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
If null, the products specified on this line were delivered on the same date as all other lines.
-
#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 = {}) ⇒ InvoiceLineModel
constructor
Initialize the InvoiceLineModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ InvoiceLineModel
Initialize the InvoiceLineModel using the provided prototype
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 25 def initialize(params = {}) @invoice_line_id = params.dig(:invoice_line_id) @group_key = params.dig(:group_key) @invoice_id = params.dig(:invoice_id) @erp_key = params.dig(: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) @override_origin_address_id = params.dig(:override_origin_address_id) @override_bill_to_address_id = params.dig(:override_bill_to_address_id) @override_ship_to_address_id = params.dig(:override_ship_to_address_id) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_id) @app_enrollment_id = params.dig(:app_enrollment_id) @notes = params.dig(:notes) @attachments = params.dig(:attachments) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
Returns The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.
143 144 145 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 143 def app_enrollment_id @app_enrollment_id end |
#attachments ⇒ AttachmentModel
Returns A collection of attachments linked to this record. To retrieve this collection, specify ‘Attachments` in the `include` parameter when retrieving data. To create an attachment, use the [Upload Attachment](developer.lockstep.io/reference/post_api-v1-attachments) endpoint with the `TableKey` to `InvoiceLine` and the `ObjectKey` set to the `InvoiceLineId` for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
151 152 153 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 151 def @attachments end |
#created ⇒ Date-time
Returns The date on which this line was created.
127 128 129 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 127 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID number of the user who created this line.
131 132 133 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 131 def created_user_id @created_user_id end |
#description ⇒ String
Returns Description of this invoice line.
79 80 81 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 79 def description @description end |
#erp_key ⇒ String
Returns The unique ID of this record as it was known in its originating financial system, if it was different from the original ‘LineNumber`. If this company record was imported from a financial system, it will have the value `ErpKey` set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported, this value will be `null`. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).
67 68 69 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 67 def erp_key @erp_key end |
#exemption_code ⇒ String
Returns If this line is tax exempt, this code indicates the reason for the exemption.
107 108 109 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 107 def exemption_code @exemption_code end |
#group_key ⇒ Uuid
Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).
59 60 61 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 59 def group_key @group_key end |
#invoice_id ⇒ Uuid
Returns The ID number of the invoice this line belongs to.
63 64 65 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 63 def invoice_id @invoice_id end |
#invoice_line_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform. For the ID of this record in its originating financial system, see ‘ErpKey`.
55 56 57 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 55 def invoice_line_id @invoice_line_id 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.
71 72 73 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 71 def line_number @line_number end |
#modified ⇒ Date-time
Returns The date on which this line was last modified.
135 136 137 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 135 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID number of the user who most recently modified this line.
139 140 141 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 139 def modified_user_id @modified_user_id end |
#notes ⇒ NoteModel
Returns A collection of notes linked to this record. To retrieve this collection, specify ‘Notes` in the `include` parameter when retrieving data. To create a note, use the [Create Note](developer.lockstep.io/reference/post_api-v1-notes) endpoint with the `TableKey` to `InvoiceLine` and the `ObjectKey` set to the `InvoiceLineId` for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
147 148 149 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 147 def notes @notes end |
#override_bill_to_address_id ⇒ Uuid
Returns An optional ID number for the line’s bill to address.
119 120 121 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 119 def override_bill_to_address_id @override_bill_to_address_id end |
#override_origin_address_id ⇒ Uuid
Returns An optional ID number for the line’s origin address.
115 116 117 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 115 def override_origin_address_id @override_origin_address_id end |
#override_ship_to_address_id ⇒ Uuid
Returns An optional ID number for the line’s ship to address.
123 124 125 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 123 def override_ship_to_address_id @override_ship_to_address_id end |
#product_code ⇒ String
Returns A code number identifying the product or service that is specified on this line.
75 76 77 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 75 def product_code @product_code end |
#quantity ⇒ Double
Returns The quantity of items for ths line.
91 92 93 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 91 def quantity @quantity end |
#quantity_received ⇒ Double
Returns The number of items that has been received.
99 100 101 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 99 def quantity_received @quantity_received end |
#quantity_shipped ⇒ Double
Returns The number of items that have been shipped.
95 96 97 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 95 def quantity_shipped @quantity_shipped end |
#reporting_date ⇒ Date
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.
111 112 113 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 111 def reporting_date @reporting_date end |
#total_amount ⇒ Double
Returns The total amount for this line.
103 104 105 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 103 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.
83 84 85 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 83 def unit_measure_code @unit_measure_code end |
#unit_price ⇒ Double
Returns The price of a single unit for this line.
87 88 89 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 87 def unit_price @unit_price end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 155 def as_json(={}) { 'invoiceLineId' => @invoice_line_id, 'groupKey' => @group_key, 'invoiceId' => @invoice_id, 'erpKey' => @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, 'overrideOriginAddressId' => @override_origin_address_id, 'overrideBillToAddressId' => @override_bill_to_address_id, 'overrideShipToAddressId' => @override_ship_to_address_id, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, 'appEnrollmentId' => @app_enrollment_id, 'notes' => @notes, 'attachments' => @attachments, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
187 188 189 |
# File 'lib/lockstep_sdk/models/invoice_line_model.rb', line 187 def to_json(*) "[#{as_json(*).to_json(*)}]" end |