lockstep_sdk 2022.4.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/lockstep_sdk/clients/activities_client.rb +119 -0
- data/lib/lockstep_sdk/clients/api_keys_client.rb +78 -0
- data/lib/lockstep_sdk/clients/app_enrollments_client.rb +121 -0
- data/lib/lockstep_sdk/clients/applications_client.rb +100 -0
- data/lib/lockstep_sdk/clients/attachments_client.rb +121 -0
- data/lib/lockstep_sdk/clients/code_definitions_client.rb +60 -0
- data/lib/lockstep_sdk/clients/companies_client.rb +123 -0
- data/lib/lockstep_sdk/clients/contacts_client.rb +90 -0
- data/lib/lockstep_sdk/clients/credit_memo_applied_client.rb +92 -0
- data/lib/lockstep_sdk/clients/currencies_client.rb +55 -0
- data/lib/lockstep_sdk/clients/custom_field_definitions_client.rb +94 -0
- data/lib/lockstep_sdk/clients/custom_field_values_client.rb +97 -0
- data/lib/lockstep_sdk/clients/definitions_client.rb +95 -0
- data/lib/lockstep_sdk/clients/emails_client.rb +108 -0
- data/lib/lockstep_sdk/clients/invoice_history_client.rb +56 -0
- data/lib/lockstep_sdk/clients/invoices_client.rb +126 -0
- data/lib/lockstep_sdk/clients/leads_client.rb +40 -0
- data/lib/lockstep_sdk/clients/notes_client.rb +84 -0
- data/lib/lockstep_sdk/clients/payment_applications_client.rb +92 -0
- data/lib/lockstep_sdk/clients/payments_client.rb +138 -0
- data/lib/lockstep_sdk/clients/provisioning_client.rb +56 -0
- data/lib/lockstep_sdk/clients/reports_client.rb +114 -0
- data/lib/lockstep_sdk/clients/status_client.rb +53 -0
- data/lib/lockstep_sdk/clients/sync_client.rb +97 -0
- data/lib/lockstep_sdk/clients/user_accounts_client.rb +127 -0
- data/lib/lockstep_sdk/clients/user_roles_client.rb +54 -0
- data/lib/lockstep_sdk/lockstep_api.rb +264 -0
- data/lib/lockstep_sdk/models/activity_model.rb +221 -0
- data/lib/lockstep_sdk/models/activity_stream_item_model.rb +104 -0
- data/lib/lockstep_sdk/models/activity_xref_model.rb +72 -0
- data/lib/lockstep_sdk/models/aging_model.rb +62 -0
- data/lib/lockstep_sdk/models/api_key_model.rb +116 -0
- data/lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb +110 -0
- data/lib/lockstep_sdk/models/app_enrollment_model.rb +151 -0
- data/lib/lockstep_sdk/models/application_model.rb +166 -0
- data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +86 -0
- data/lib/lockstep_sdk/models/ar_header_info_model.rb +170 -0
- data/lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb +140 -0
- data/lib/lockstep_sdk/models/attachment_header_info_model.rb +74 -0
- data/lib/lockstep_sdk/models/attachment_model.rb +122 -0
- data/lib/lockstep_sdk/models/bulk_currency_conversion_model.rb +56 -0
- data/lib/lockstep_sdk/models/cashflow_report_model.rb +74 -0
- data/lib/lockstep_sdk/models/code_definition_model.rb +99 -0
- data/lib/lockstep_sdk/models/company_model.rb +336 -0
- data/lib/lockstep_sdk/models/connector_info_model.rb +69 -0
- data/lib/lockstep_sdk/models/contact_model.rb +227 -0
- data/lib/lockstep_sdk/models/country_model.rb +116 -0
- data/lib/lockstep_sdk/models/credit_memo_applied_model.rb +150 -0
- data/lib/lockstep_sdk/models/credit_memo_invoice_model.rb +116 -0
- data/lib/lockstep_sdk/models/currency_model.rb +74 -0
- data/lib/lockstep_sdk/models/currency_rate_model.rb +68 -0
- data/lib/lockstep_sdk/models/custom_field_definition_model.rb +121 -0
- data/lib/lockstep_sdk/models/custom_field_value_model.rb +115 -0
- data/lib/lockstep_sdk/models/customer_details_model.rb +164 -0
- data/lib/lockstep_sdk/models/customer_details_payment_model.rb +104 -0
- data/lib/lockstep_sdk/models/customer_summary_model.rb +134 -0
- data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +62 -0
- data/lib/lockstep_sdk/models/developer_account_submit_model.rb +62 -0
- data/lib/lockstep_sdk/models/email_model.rb +245 -0
- data/lib/lockstep_sdk/models/erp_info_data_model.rb +63 -0
- data/lib/lockstep_sdk/models/erp_info_model.rb +56 -0
- data/lib/lockstep_sdk/models/erp_model.rb +62 -0
- data/lib/lockstep_sdk/models/invite_data_model.rb +56 -0
- data/lib/lockstep_sdk/models/invite_model.rb +68 -0
- data/lib/lockstep_sdk/models/invite_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/invoice_address_model.rb +140 -0
- data/lib/lockstep_sdk/models/invoice_history_model.rb +238 -0
- data/lib/lockstep_sdk/models/invoice_line_model.rb +194 -0
- data/lib/lockstep_sdk/models/invoice_model.rb +325 -0
- data/lib/lockstep_sdk/models/invoice_payment_detail_model.rb +104 -0
- data/lib/lockstep_sdk/models/invoice_summary_model.rb +134 -0
- data/lib/lockstep_sdk/models/lead_model.rb +74 -0
- data/lib/lockstep_sdk/models/note_model.rb +121 -0
- data/lib/lockstep_sdk/models/payment_applied_model.rb +131 -0
- data/lib/lockstep_sdk/models/payment_detail_header_model.rb +80 -0
- data/lib/lockstep_sdk/models/payment_detail_model.rb +176 -0
- data/lib/lockstep_sdk/models/payment_model.rb +206 -0
- data/lib/lockstep_sdk/models/payment_summary_model.rb +128 -0
- data/lib/lockstep_sdk/models/provisioning_finalize_request_model.rb +74 -0
- data/lib/lockstep_sdk/models/provisioning_model.rb +74 -0
- data/lib/lockstep_sdk/models/provisioning_response_model.rb +86 -0
- data/lib/lockstep_sdk/models/risk_rate_model.rb +98 -0
- data/lib/lockstep_sdk/models/state_model.rb +62 -0
- data/lib/lockstep_sdk/models/status_model.rb +128 -0
- data/lib/lockstep_sdk/models/sync_entity_result_model.rb +74 -0
- data/lib/lockstep_sdk/models/sync_request_model.rb +98 -0
- data/lib/lockstep_sdk/models/sync_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/transfer_owner_model.rb +56 -0
- data/lib/lockstep_sdk/models/transfer_owner_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/user_account_model.rb +240 -0
- data/lib/lockstep_sdk/models/user_role_model.rb +86 -0
- data/lib/lockstep_sdk/version.rb +3 -0
- metadata +150 -0
@@ -0,0 +1,194 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2022 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'json'
|
19
|
+
|
20
|
+
module LockstepSdk
|
21
|
+
|
22
|
+
##
|
23
|
+
# Represents a line in an invoice
|
24
|
+
class InvoiceLineModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the InvoiceLineModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@invoice_line_id = params.dig(:invoice_line_id)
|
30
|
+
@group_key = params.dig(:group_key)
|
31
|
+
@invoice_id = params.dig(:invoice_id)
|
32
|
+
@erp_key = params.dig(:erp_key)
|
33
|
+
@line_number = params.dig(:line_number)
|
34
|
+
@product_code = params.dig(:product_code)
|
35
|
+
@description = params.dig(:description)
|
36
|
+
@unit_measure_code = params.dig(:unit_measure_code)
|
37
|
+
@unit_price = params.dig(:unit_price)
|
38
|
+
@quantity = params.dig(:quantity)
|
39
|
+
@quantity_shipped = params.dig(:quantity_shipped)
|
40
|
+
@quantity_received = params.dig(:quantity_received)
|
41
|
+
@total_amount = params.dig(:total_amount)
|
42
|
+
@exemption_code = params.dig(:exemption_code)
|
43
|
+
@reporting_date = params.dig(:reporting_date)
|
44
|
+
@override_origin_address_id = params.dig(:override_origin_address_id)
|
45
|
+
@override_bill_to_address_id = params.dig(:override_bill_to_address_id)
|
46
|
+
@override_ship_to_address_id = params.dig(:override_ship_to_address_id)
|
47
|
+
@created = params.dig(:created)
|
48
|
+
@created_user_id = params.dig(:created_user_id)
|
49
|
+
@modified = params.dig(:modified)
|
50
|
+
@modified_user_id = params.dig(:modified_user_id)
|
51
|
+
@app_enrollment_id = params.dig(:app_enrollment_id)
|
52
|
+
@notes = params.dig(:notes)
|
53
|
+
@attachments = params.dig(:attachments)
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# @return [Uuid] 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`.
|
58
|
+
attr_accessor :invoice_line_id
|
59
|
+
|
60
|
+
##
|
61
|
+
# @return [Uuid] 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](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
62
|
+
attr_accessor :group_key
|
63
|
+
|
64
|
+
##
|
65
|
+
# @return [Uuid] The ID number of the invoice this line belongs to.
|
66
|
+
attr_accessor :invoice_id
|
67
|
+
|
68
|
+
##
|
69
|
+
# @return [String] 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](https://developer.lockstep.io/docs/identity-columns).
|
70
|
+
attr_accessor :erp_key
|
71
|
+
|
72
|
+
##
|
73
|
+
# @return [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.
|
74
|
+
attr_accessor :line_number
|
75
|
+
|
76
|
+
##
|
77
|
+
# @return [String] A code number identifying the product or service that is specified on this line.
|
78
|
+
attr_accessor :product_code
|
79
|
+
|
80
|
+
##
|
81
|
+
# @return [String] Description of this invoice line.
|
82
|
+
attr_accessor :description
|
83
|
+
|
84
|
+
##
|
85
|
+
# @return [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.
|
86
|
+
attr_accessor :unit_measure_code
|
87
|
+
|
88
|
+
##
|
89
|
+
# @return [Double] The price of a single unit for this line.
|
90
|
+
attr_accessor :unit_price
|
91
|
+
|
92
|
+
##
|
93
|
+
# @return [Double] The quantity of items for ths line.
|
94
|
+
attr_accessor :quantity
|
95
|
+
|
96
|
+
##
|
97
|
+
# @return [Double] The number of items that have been shipped.
|
98
|
+
attr_accessor :quantity_shipped
|
99
|
+
|
100
|
+
##
|
101
|
+
# @return [Double] The number of items that has been received.
|
102
|
+
attr_accessor :quantity_received
|
103
|
+
|
104
|
+
##
|
105
|
+
# @return [Double] The total amount for this line.
|
106
|
+
attr_accessor :total_amount
|
107
|
+
|
108
|
+
##
|
109
|
+
# @return [String] If this line is tax exempt, this code indicates the reason for the exemption.
|
110
|
+
attr_accessor :exemption_code
|
111
|
+
|
112
|
+
##
|
113
|
+
# @return [Date] 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.
|
114
|
+
attr_accessor :reporting_date
|
115
|
+
|
116
|
+
##
|
117
|
+
# @return [Uuid] An optional ID number for the line's origin address.
|
118
|
+
attr_accessor :override_origin_address_id
|
119
|
+
|
120
|
+
##
|
121
|
+
# @return [Uuid] An optional ID number for the line's bill to address.
|
122
|
+
attr_accessor :override_bill_to_address_id
|
123
|
+
|
124
|
+
##
|
125
|
+
# @return [Uuid] An optional ID number for the line's ship to address.
|
126
|
+
attr_accessor :override_ship_to_address_id
|
127
|
+
|
128
|
+
##
|
129
|
+
# @return [Date-time] The date on which this line was created.
|
130
|
+
attr_accessor :created
|
131
|
+
|
132
|
+
##
|
133
|
+
# @return [Uuid] The ID number of the user who created this line.
|
134
|
+
attr_accessor :created_user_id
|
135
|
+
|
136
|
+
##
|
137
|
+
# @return [Date-time] The date on which this line was last modified.
|
138
|
+
attr_accessor :modified
|
139
|
+
|
140
|
+
##
|
141
|
+
# @return [Uuid] The ID number of the user who most recently modified this line.
|
142
|
+
attr_accessor :modified_user_id
|
143
|
+
|
144
|
+
##
|
145
|
+
# @return [Uuid] AppEnrollmentId for this record; used for mapping purposes.
|
146
|
+
attr_accessor :app_enrollment_id
|
147
|
+
|
148
|
+
##
|
149
|
+
# @return [NoteModel] All notes attached to this company. To retrieve this collection, specify `Notes` in the "Include" parameter for your query.
|
150
|
+
attr_accessor :notes
|
151
|
+
|
152
|
+
##
|
153
|
+
# @return [AttachmentModel] All attachments attached to this company. To retrieve this collection, specify `Attachments` in the "Include" parameter for your query.
|
154
|
+
attr_accessor :attachments
|
155
|
+
|
156
|
+
##
|
157
|
+
# @return [object] This object as a JSON key-value structure
|
158
|
+
def as_json(options={})
|
159
|
+
{
|
160
|
+
'invoiceLineId' => @invoice_line_id,
|
161
|
+
'groupKey' => @group_key,
|
162
|
+
'invoiceId' => @invoice_id,
|
163
|
+
'erpKey' => @erp_key,
|
164
|
+
'lineNumber' => @line_number,
|
165
|
+
'productCode' => @product_code,
|
166
|
+
'description' => @description,
|
167
|
+
'unitMeasureCode' => @unit_measure_code,
|
168
|
+
'unitPrice' => @unit_price,
|
169
|
+
'quantity' => @quantity,
|
170
|
+
'quantityShipped' => @quantity_shipped,
|
171
|
+
'quantityReceived' => @quantity_received,
|
172
|
+
'totalAmount' => @total_amount,
|
173
|
+
'exemptionCode' => @exemption_code,
|
174
|
+
'reportingDate' => @reporting_date,
|
175
|
+
'overrideOriginAddressId' => @override_origin_address_id,
|
176
|
+
'overrideBillToAddressId' => @override_bill_to_address_id,
|
177
|
+
'overrideShipToAddressId' => @override_ship_to_address_id,
|
178
|
+
'created' => @created,
|
179
|
+
'createdUserId' => @created_user_id,
|
180
|
+
'modified' => @modified,
|
181
|
+
'modifiedUserId' => @modified_user_id,
|
182
|
+
'appEnrollmentId' => @app_enrollment_id,
|
183
|
+
'notes' => @notes,
|
184
|
+
'attachments' => @attachments,
|
185
|
+
}
|
186
|
+
end
|
187
|
+
|
188
|
+
##
|
189
|
+
# @return [String] This object converted to a JSON string
|
190
|
+
def to_json(*options)
|
191
|
+
"[#{as_json(*options).to_json(*options)}]"
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
@@ -0,0 +1,325 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2022 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'json'
|
19
|
+
|
20
|
+
module LockstepSdk
|
21
|
+
|
22
|
+
##
|
23
|
+
# An Invoice represents a bill sent from one company to another. The creator of the invoice is identified
|
24
|
+
# by the `CompanyId` field, and the recipient of the invoice is identified by the `CustomerId` field. Most
|
25
|
+
# invoices are uniquely identified both by a Lockstep Platform ID number and a customer ERP "key" that was
|
26
|
+
# generated by the system that originated the invoice. Invoices have a total amount and a due date, and when
|
27
|
+
# some payments have been made on the Invoice the `TotalAmount` and the `OutstandingBalanceAmount` may be
|
28
|
+
# different.
|
29
|
+
class InvoiceModel
|
30
|
+
|
31
|
+
##
|
32
|
+
# Initialize the InvoiceModel using the provided prototype
|
33
|
+
def initialize(params = {})
|
34
|
+
@group_key = params.dig(:group_key)
|
35
|
+
@invoice_id = params.dig(:invoice_id)
|
36
|
+
@company_id = params.dig(:company_id)
|
37
|
+
@customer_id = params.dig(:customer_id)
|
38
|
+
@erp_key = params.dig(:erp_key)
|
39
|
+
@purchase_order_code = params.dig(:purchase_order_code)
|
40
|
+
@reference_code = params.dig(:reference_code)
|
41
|
+
@salesperson_code = params.dig(:salesperson_code)
|
42
|
+
@salesperson_name = params.dig(:salesperson_name)
|
43
|
+
@invoice_type_code = params.dig(:invoice_type_code)
|
44
|
+
@invoice_status_code = params.dig(:invoice_status_code)
|
45
|
+
@terms_code = params.dig(:terms_code)
|
46
|
+
@special_terms = params.dig(:special_terms)
|
47
|
+
@currency_code = params.dig(:currency_code)
|
48
|
+
@total_amount = params.dig(:total_amount)
|
49
|
+
@sales_tax_amount = params.dig(:sales_tax_amount)
|
50
|
+
@discount_amount = params.dig(:discount_amount)
|
51
|
+
@outstanding_balance_amount = params.dig(:outstanding_balance_amount)
|
52
|
+
@invoice_date = params.dig(:invoice_date)
|
53
|
+
@discount_date = params.dig(:discount_date)
|
54
|
+
@posted_date = params.dig(:posted_date)
|
55
|
+
@invoice_closed_date = params.dig(:invoice_closed_date)
|
56
|
+
@payment_due_date = params.dig(:payment_due_date)
|
57
|
+
@imported_date = params.dig(:imported_date)
|
58
|
+
@primary_origin_address_id = params.dig(:primary_origin_address_id)
|
59
|
+
@primary_bill_to_address_id = params.dig(:primary_bill_to_address_id)
|
60
|
+
@primary_ship_to_address_id = params.dig(:primary_ship_to_address_id)
|
61
|
+
@created = params.dig(:created)
|
62
|
+
@created_user_id = params.dig(:created_user_id)
|
63
|
+
@modified = params.dig(:modified)
|
64
|
+
@modified_user_id = params.dig(:modified_user_id)
|
65
|
+
@app_enrollment_id = params.dig(:app_enrollment_id)
|
66
|
+
@is_voided = params.dig(:is_voided)
|
67
|
+
@in_dispute = params.dig(:in_dispute)
|
68
|
+
@exclude_from_aging = params.dig(:exclude_from_aging)
|
69
|
+
@addresses = params.dig(:addresses)
|
70
|
+
@lines = params.dig(:lines)
|
71
|
+
@payments = params.dig(:payments)
|
72
|
+
@notes = params.dig(:notes)
|
73
|
+
@attachments = params.dig(:attachments)
|
74
|
+
@company = params.dig(:company)
|
75
|
+
@customer = params.dig(:customer)
|
76
|
+
@customer_primary_contact = params.dig(:customer_primary_contact)
|
77
|
+
@credit_memos = params.dig(:credit_memos)
|
78
|
+
@custom_field_values = params.dig(:custom_field_values)
|
79
|
+
@custom_field_definitions = params.dig(:custom_field_definitions)
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# @return [Uuid] 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](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
84
|
+
attr_accessor :group_key
|
85
|
+
|
86
|
+
##
|
87
|
+
# @return [Uuid] 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`.
|
88
|
+
attr_accessor :invoice_id
|
89
|
+
|
90
|
+
##
|
91
|
+
# @return [Uuid] The ID number of the company that created this invoice.
|
92
|
+
attr_accessor :company_id
|
93
|
+
|
94
|
+
##
|
95
|
+
# @return [Uuid] The ID number of the counterparty for the invoice, for example, a customer or vendor.
|
96
|
+
attr_accessor :customer_id
|
97
|
+
|
98
|
+
##
|
99
|
+
# @return [String] The unique ID of this record as it was known in its originating financial system. 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](https://developer.lockstep.io/docs/identity-columns).
|
100
|
+
attr_accessor :erp_key
|
101
|
+
|
102
|
+
##
|
103
|
+
# @return [String] The purchase order code as it exists in the user's ERP or accounting system.
|
104
|
+
attr_accessor :purchase_order_code
|
105
|
+
|
106
|
+
##
|
107
|
+
# @return [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.
|
108
|
+
attr_accessor :reference_code
|
109
|
+
|
110
|
+
##
|
111
|
+
# @return [String] A code identifying the salesperson responsible for writing this quote, invoice, or order.
|
112
|
+
attr_accessor :salesperson_code
|
113
|
+
|
114
|
+
##
|
115
|
+
# @return [String] A string identifying the salesperson responsible for writing this quote, invoice, or order.
|
116
|
+
attr_accessor :salesperson_name
|
117
|
+
|
118
|
+
##
|
119
|
+
# @return [String] A code identifying the type of this invoice.
|
120
|
+
attr_accessor :invoice_type_code
|
121
|
+
|
122
|
+
##
|
123
|
+
# @return [String] A code identifying the status of this invoice.
|
124
|
+
attr_accessor :invoice_status_code
|
125
|
+
|
126
|
+
##
|
127
|
+
# @return [String] A code identifying the terms given to the purchaser.
|
128
|
+
attr_accessor :terms_code
|
129
|
+
|
130
|
+
##
|
131
|
+
# @return [String] If the customer negotiated any special terms different from the standard terms above, describe them here.
|
132
|
+
attr_accessor :special_terms
|
133
|
+
|
134
|
+
##
|
135
|
+
# @return [String] The three-character ISO 4217 currency code used for this invoice.
|
136
|
+
attr_accessor :currency_code
|
137
|
+
|
138
|
+
##
|
139
|
+
# @return [Double] The total value of this invoice, inclusive of all taxes and line items.
|
140
|
+
attr_accessor :total_amount
|
141
|
+
|
142
|
+
##
|
143
|
+
# @return [Double] The total sales (or transactional) tax calculated for this invoice.
|
144
|
+
attr_accessor :sales_tax_amount
|
145
|
+
|
146
|
+
##
|
147
|
+
# @return [Double] The total discounts given by the seller to the buyer on this invoice.
|
148
|
+
attr_accessor :discount_amount
|
149
|
+
|
150
|
+
##
|
151
|
+
# @return [Double] The remaining balance value of this invoice.
|
152
|
+
attr_accessor :outstanding_balance_amount
|
153
|
+
|
154
|
+
##
|
155
|
+
# @return [Date] The reporting date for this invoice.
|
156
|
+
attr_accessor :invoice_date
|
157
|
+
|
158
|
+
##
|
159
|
+
# @return [Date] The date when discounts were adjusted for this invoice.
|
160
|
+
attr_accessor :discount_date
|
161
|
+
|
162
|
+
##
|
163
|
+
# @return [Date] The date when this invoice posted to the company's general ledger.
|
164
|
+
attr_accessor :posted_date
|
165
|
+
|
166
|
+
##
|
167
|
+
# @return [Date] The date when the invoice was closed and finalized after completion of all payments and delivery of all products and services.
|
168
|
+
attr_accessor :invoice_closed_date
|
169
|
+
|
170
|
+
##
|
171
|
+
# @return [Date] The date when the remaining outstanding balance is due.
|
172
|
+
attr_accessor :payment_due_date
|
173
|
+
|
174
|
+
##
|
175
|
+
# @return [Date-time] The date and time when this record was imported from the user's ERP or accounting system.
|
176
|
+
attr_accessor :imported_date
|
177
|
+
|
178
|
+
##
|
179
|
+
# @return [Uuid] The ID number of the invoice's origination address
|
180
|
+
attr_accessor :primary_origin_address_id
|
181
|
+
|
182
|
+
##
|
183
|
+
# @return [Uuid] The ID number of the invoice's bill-to address
|
184
|
+
attr_accessor :primary_bill_to_address_id
|
185
|
+
|
186
|
+
##
|
187
|
+
# @return [Uuid] The ID number of the invoice's ship-to address
|
188
|
+
attr_accessor :primary_ship_to_address_id
|
189
|
+
|
190
|
+
##
|
191
|
+
# @return [Date-time] The date on which this address record was created.
|
192
|
+
attr_accessor :created
|
193
|
+
|
194
|
+
##
|
195
|
+
# @return [Uuid] The ID number of the user who created this address.
|
196
|
+
attr_accessor :created_user_id
|
197
|
+
|
198
|
+
##
|
199
|
+
# @return [Date-time] The date on which this address record was last modified.
|
200
|
+
attr_accessor :modified
|
201
|
+
|
202
|
+
##
|
203
|
+
# @return [Uuid] The ID number of the user who most recently modified this address.
|
204
|
+
attr_accessor :modified_user_id
|
205
|
+
|
206
|
+
##
|
207
|
+
# @return [Uuid] AppEnrollmentId for this record; used for mapping purposes.
|
208
|
+
attr_accessor :app_enrollment_id
|
209
|
+
|
210
|
+
##
|
211
|
+
# @return [Boolean] Is the invoice voided?
|
212
|
+
attr_accessor :is_voided
|
213
|
+
|
214
|
+
##
|
215
|
+
# @return [Boolean] Is the invoice in dispute?
|
216
|
+
attr_accessor :in_dispute
|
217
|
+
|
218
|
+
##
|
219
|
+
# @return [Boolean] Should the invoice be excluded from aging calculations?
|
220
|
+
attr_accessor :exclude_from_aging
|
221
|
+
|
222
|
+
##
|
223
|
+
# @return [InvoiceAddressModel] All addresses connected to this invoice. To retrieve this collection, specify `Addresses` in the "Include" parameter for your query.
|
224
|
+
attr_accessor :addresses
|
225
|
+
|
226
|
+
##
|
227
|
+
# @return [InvoiceLineModel] All lines attached to this invoice. To retrieve this collection, specify `Lines` in the "Include" parameter for your query.
|
228
|
+
attr_accessor :lines
|
229
|
+
|
230
|
+
##
|
231
|
+
# @return [InvoicePaymentDetailModel] All payments attached to this invoice, the amount of the payment applied to this Invoice, and the date the Payment was applied. To retrieve this collection, specify `Payments` in the "Include" parameter for your query.
|
232
|
+
attr_accessor :payments
|
233
|
+
|
234
|
+
##
|
235
|
+
# @return [NoteModel] All notes attached to this invoice. To retrieve this collection, specify `Notes` in the "Include" parameter for your query.
|
236
|
+
attr_accessor :notes
|
237
|
+
|
238
|
+
##
|
239
|
+
# @return [AttachmentModel] All attachments attached to this invoice. To retrieve this collection, specify `Attachments` in the "Include" parameter for your query.
|
240
|
+
attr_accessor :attachments
|
241
|
+
|
242
|
+
##
|
243
|
+
# @return [CompanyModel] The Company associated to this invoice. To retrieve this item, specify `Company` in the "Include" parameter for your query.
|
244
|
+
attr_accessor :company
|
245
|
+
|
246
|
+
##
|
247
|
+
# @return [CompanyModel] The Customer associated to the invoice customer To retrieve this item, specify `Customer` in the "Include" parameter for your query.
|
248
|
+
attr_accessor :customer
|
249
|
+
|
250
|
+
##
|
251
|
+
# @return [ContactModel] The Contact associated to the invoice customer To retrieve this item, specify `Customer` in the "Include" parameter for your query.
|
252
|
+
attr_accessor :customer_primary_contact
|
253
|
+
|
254
|
+
##
|
255
|
+
# @return [CreditMemoInvoiceModel] The credit memos associated to this invoice. To retrieve this item, specify `CreditMemos` in the "Include" parameter for your query.
|
256
|
+
attr_accessor :credit_memos
|
257
|
+
|
258
|
+
##
|
259
|
+
# @return [CustomFieldValueModel] All custom field values associated with this invoice To retrieve this item, specify `CustomFieldValues` in the "Include" parameter for your query.
|
260
|
+
attr_accessor :custom_field_values
|
261
|
+
|
262
|
+
##
|
263
|
+
# @return [CustomFieldDefinitionModel] All custom field definitions
|
264
|
+
attr_accessor :custom_field_definitions
|
265
|
+
|
266
|
+
##
|
267
|
+
# @return [object] This object as a JSON key-value structure
|
268
|
+
def as_json(options={})
|
269
|
+
{
|
270
|
+
'groupKey' => @group_key,
|
271
|
+
'invoiceId' => @invoice_id,
|
272
|
+
'companyId' => @company_id,
|
273
|
+
'customerId' => @customer_id,
|
274
|
+
'erpKey' => @erp_key,
|
275
|
+
'purchaseOrderCode' => @purchase_order_code,
|
276
|
+
'referenceCode' => @reference_code,
|
277
|
+
'salespersonCode' => @salesperson_code,
|
278
|
+
'salespersonName' => @salesperson_name,
|
279
|
+
'invoiceTypeCode' => @invoice_type_code,
|
280
|
+
'invoiceStatusCode' => @invoice_status_code,
|
281
|
+
'termsCode' => @terms_code,
|
282
|
+
'specialTerms' => @special_terms,
|
283
|
+
'currencyCode' => @currency_code,
|
284
|
+
'totalAmount' => @total_amount,
|
285
|
+
'salesTaxAmount' => @sales_tax_amount,
|
286
|
+
'discountAmount' => @discount_amount,
|
287
|
+
'outstandingBalanceAmount' => @outstanding_balance_amount,
|
288
|
+
'invoiceDate' => @invoice_date,
|
289
|
+
'discountDate' => @discount_date,
|
290
|
+
'postedDate' => @posted_date,
|
291
|
+
'invoiceClosedDate' => @invoice_closed_date,
|
292
|
+
'paymentDueDate' => @payment_due_date,
|
293
|
+
'importedDate' => @imported_date,
|
294
|
+
'primaryOriginAddressId' => @primary_origin_address_id,
|
295
|
+
'primaryBillToAddressId' => @primary_bill_to_address_id,
|
296
|
+
'primaryShipToAddressId' => @primary_ship_to_address_id,
|
297
|
+
'created' => @created,
|
298
|
+
'createdUserId' => @created_user_id,
|
299
|
+
'modified' => @modified,
|
300
|
+
'modifiedUserId' => @modified_user_id,
|
301
|
+
'appEnrollmentId' => @app_enrollment_id,
|
302
|
+
'isVoided' => @is_voided,
|
303
|
+
'inDispute' => @in_dispute,
|
304
|
+
'excludeFromAging' => @exclude_from_aging,
|
305
|
+
'addresses' => @addresses,
|
306
|
+
'lines' => @lines,
|
307
|
+
'payments' => @payments,
|
308
|
+
'notes' => @notes,
|
309
|
+
'attachments' => @attachments,
|
310
|
+
'company' => @company,
|
311
|
+
'customer' => @customer,
|
312
|
+
'customerPrimaryContact' => @customer_primary_contact,
|
313
|
+
'creditMemos' => @credit_memos,
|
314
|
+
'customFieldValues' => @custom_field_values,
|
315
|
+
'customFieldDefinitions' => @custom_field_definitions,
|
316
|
+
}
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# @return [String] This object converted to a JSON string
|
321
|
+
def to_json(*options)
|
322
|
+
"[#{as_json(*options).to_json(*options)}]"
|
323
|
+
end
|
324
|
+
end
|
325
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2022 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'json'
|
19
|
+
|
20
|
+
module LockstepSdk
|
21
|
+
|
22
|
+
##
|
23
|
+
# View to return Payment Detail information for a given Invoice record.
|
24
|
+
class InvoicePaymentDetailModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the InvoicePaymentDetailModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@group_key = params.dig(:group_key)
|
30
|
+
@payment_applied_id = params.dig(:payment_applied_id)
|
31
|
+
@invoice_id = params.dig(:invoice_id)
|
32
|
+
@payment_id = params.dig(:payment_id)
|
33
|
+
@apply_to_invoice_date = params.dig(:apply_to_invoice_date)
|
34
|
+
@payment_applied_amount = params.dig(:payment_applied_amount)
|
35
|
+
@reference_code = params.dig(:reference_code)
|
36
|
+
@company_id = params.dig(:company_id)
|
37
|
+
@payment_amount = params.dig(:payment_amount)
|
38
|
+
@unapplied_amount = params.dig(:unapplied_amount)
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# @return [Uuid] 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](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
43
|
+
attr_accessor :group_key
|
44
|
+
|
45
|
+
##
|
46
|
+
# @return [Uuid] The unique identifier of this PaymentApplied record.
|
47
|
+
attr_accessor :payment_applied_id
|
48
|
+
|
49
|
+
##
|
50
|
+
# @return [Uuid] The database id of the invoice
|
51
|
+
attr_accessor :invoice_id
|
52
|
+
|
53
|
+
##
|
54
|
+
# @return [Uuid] The database id of the Payment.
|
55
|
+
attr_accessor :payment_id
|
56
|
+
|
57
|
+
##
|
58
|
+
# @return [Date] Date Payment applied to Invoice.
|
59
|
+
attr_accessor :apply_to_invoice_date
|
60
|
+
|
61
|
+
##
|
62
|
+
# @return [Double] Amount applied to Invoice.
|
63
|
+
attr_accessor :payment_applied_amount
|
64
|
+
|
65
|
+
##
|
66
|
+
# @return [String] An additional reference code that is sometimes used to identify this Payment. The meaning of this field is specific to the ERP or accounting system used by the user.
|
67
|
+
attr_accessor :reference_code
|
68
|
+
|
69
|
+
##
|
70
|
+
# @return [Uuid] The ID number of the Company (CompanyType = "Customer") that created this Payment.
|
71
|
+
attr_accessor :company_id
|
72
|
+
|
73
|
+
##
|
74
|
+
# @return [Double] The total value of this Payment.
|
75
|
+
attr_accessor :payment_amount
|
76
|
+
|
77
|
+
##
|
78
|
+
# @return [Double] The remaining balance value of this Payment.
|
79
|
+
attr_accessor :unapplied_amount
|
80
|
+
|
81
|
+
##
|
82
|
+
# @return [object] This object as a JSON key-value structure
|
83
|
+
def as_json(options={})
|
84
|
+
{
|
85
|
+
'groupKey' => @group_key,
|
86
|
+
'paymentAppliedId' => @payment_applied_id,
|
87
|
+
'invoiceId' => @invoice_id,
|
88
|
+
'paymentId' => @payment_id,
|
89
|
+
'applyToInvoiceDate' => @apply_to_invoice_date,
|
90
|
+
'paymentAppliedAmount' => @payment_applied_amount,
|
91
|
+
'referenceCode' => @reference_code,
|
92
|
+
'companyId' => @company_id,
|
93
|
+
'paymentAmount' => @payment_amount,
|
94
|
+
'unappliedAmount' => @unapplied_amount,
|
95
|
+
}
|
96
|
+
end
|
97
|
+
|
98
|
+
##
|
99
|
+
# @return [String] This object converted to a JSON string
|
100
|
+
def to_json(*options)
|
101
|
+
"[#{as_json(*options).to_json(*options)}]"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|