lockstep_sdk 2022.4.32.0 → 2022.6.49.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 +4 -4
- data/lib/lockstep_sdk/clients/activities_client.rb +0 -1
- data/lib/lockstep_sdk/clients/api_keys_client.rb +0 -1
- data/lib/lockstep_sdk/clients/app_enrollments_client.rb +0 -1
- data/lib/lockstep_sdk/clients/applications_client.rb +0 -1
- data/lib/lockstep_sdk/clients/attachments_client.rb +2 -2
- data/lib/lockstep_sdk/clients/code_definitions_client.rb +0 -1
- data/lib/lockstep_sdk/clients/companies_client.rb +0 -1
- data/lib/lockstep_sdk/clients/contacts_client.rb +0 -1
- data/lib/lockstep_sdk/clients/credit_memo_applied_client.rb +0 -1
- data/lib/lockstep_sdk/clients/currencies_client.rb +0 -1
- data/lib/lockstep_sdk/clients/custom_field_definitions_client.rb +0 -1
- data/lib/lockstep_sdk/clients/custom_field_values_client.rb +0 -1
- data/lib/lockstep_sdk/clients/definitions_client.rb +0 -1
- data/lib/lockstep_sdk/clients/emails_client.rb +0 -1
- data/lib/lockstep_sdk/clients/invoice_history_client.rb +0 -1
- data/lib/lockstep_sdk/clients/invoices_client.rb +0 -1
- data/lib/lockstep_sdk/clients/leads_client.rb +0 -1
- data/lib/lockstep_sdk/clients/notes_client.rb +0 -1
- data/lib/lockstep_sdk/clients/payment_applications_client.rb +0 -1
- data/lib/lockstep_sdk/clients/payments_client.rb +0 -1
- data/lib/lockstep_sdk/clients/provisioning_client.rb +0 -5
- data/lib/lockstep_sdk/clients/reports_client.rb +0 -1
- data/lib/lockstep_sdk/clients/status_client.rb +0 -1
- data/lib/lockstep_sdk/clients/sync_client.rb +15 -2
- data/lib/lockstep_sdk/clients/user_accounts_client.rb +0 -1
- data/lib/lockstep_sdk/clients/user_roles_client.rb +0 -1
- data/lib/lockstep_sdk/clients/webhooks_client.rb +91 -0
- data/lib/lockstep_sdk/lockstep_api.rb +8 -3
- data/lib/lockstep_sdk/models/activity_model.rb +0 -1
- data/lib/lockstep_sdk/models/activity_stream_item_model.rb +0 -1
- data/lib/lockstep_sdk/models/activity_xref_model.rb +0 -1
- data/lib/lockstep_sdk/models/aging_model.rb +0 -1
- data/lib/lockstep_sdk/models/api_key_model.rb +0 -1
- data/lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb +0 -1
- data/lib/lockstep_sdk/models/app_enrollment_model.rb +0 -1
- data/lib/lockstep_sdk/models/application_model.rb +0 -1
- data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +0 -1
- data/lib/lockstep_sdk/models/ar_header_info_model.rb +0 -1
- data/lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb +0 -1
- data/lib/lockstep_sdk/models/attachment_header_info_model.rb +0 -1
- data/lib/lockstep_sdk/models/attachment_model.rb +12 -1
- data/lib/lockstep_sdk/models/batch_sync_model.rb +99 -0
- data/lib/lockstep_sdk/models/bulk_currency_conversion_model.rb +0 -1
- data/lib/lockstep_sdk/models/cashflow_report_model.rb +0 -1
- data/lib/lockstep_sdk/models/code_definition_model.rb +0 -1
- data/lib/lockstep_sdk/models/company_model.rb +0 -1
- data/lib/lockstep_sdk/models/company_sync_model.rb +195 -0
- data/lib/lockstep_sdk/models/connector_info_model.rb +0 -1
- data/lib/lockstep_sdk/models/contact_model.rb +0 -1
- data/lib/lockstep_sdk/models/contact_sync_model.rb +177 -0
- data/lib/lockstep_sdk/models/country_model.rb +0 -1
- data/lib/lockstep_sdk/models/credit_memo_applied_model.rb +6 -7
- data/lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb +99 -0
- data/lib/lockstep_sdk/models/credit_memo_invoice_model.rb +0 -1
- data/lib/lockstep_sdk/models/currency_model.rb +0 -1
- data/lib/lockstep_sdk/models/currency_rate_model.rb +0 -1
- data/lib/lockstep_sdk/models/custom_field_definition_model.rb +0 -1
- data/lib/lockstep_sdk/models/custom_field_sync_model.rb +97 -0
- data/lib/lockstep_sdk/models/custom_field_value_model.rb +0 -1
- data/lib/lockstep_sdk/models/customer_details_model.rb +0 -1
- data/lib/lockstep_sdk/models/customer_details_payment_model.rb +0 -1
- data/lib/lockstep_sdk/models/customer_summary_model.rb +0 -1
- data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +0 -1
- data/lib/lockstep_sdk/models/developer_account_submit_model.rb +0 -1
- data/lib/lockstep_sdk/models/email_model.rb +0 -1
- data/lib/lockstep_sdk/models/erp_info_data_model.rb +0 -1
- data/lib/lockstep_sdk/models/erp_info_model.rb +0 -1
- data/lib/lockstep_sdk/models/erp_model.rb +0 -1
- data/lib/lockstep_sdk/models/invite_data_model.rb +0 -1
- data/lib/lockstep_sdk/models/invite_model.rb +0 -1
- data/lib/lockstep_sdk/models/invite_submit_model.rb +0 -1
- data/lib/lockstep_sdk/models/invoice_address_model.rb +0 -1
- data/lib/lockstep_sdk/models/invoice_history_model.rb +0 -1
- data/lib/lockstep_sdk/models/invoice_line_model.rb +0 -1
- data/lib/lockstep_sdk/models/invoice_line_sync_model.rb +303 -0
- data/lib/lockstep_sdk/models/invoice_model.rb +5 -6
- data/lib/lockstep_sdk/models/invoice_payment_detail_model.rb +0 -1
- data/lib/lockstep_sdk/models/invoice_summary_model.rb +0 -1
- data/lib/lockstep_sdk/models/invoice_sync_model.rb +369 -0
- data/lib/lockstep_sdk/models/lead_model.rb +0 -1
- data/lib/lockstep_sdk/models/note_model.rb +0 -1
- data/lib/lockstep_sdk/models/payment_applied_model.rb +3 -4
- data/lib/lockstep_sdk/models/payment_applied_sync_model.rb +99 -0
- data/lib/lockstep_sdk/models/payment_detail_header_model.rb +0 -1
- data/lib/lockstep_sdk/models/payment_detail_model.rb +0 -1
- data/lib/lockstep_sdk/models/payment_model.rb +7 -8
- data/lib/lockstep_sdk/models/payment_summary_model.rb +0 -1
- data/lib/lockstep_sdk/models/payment_sync_model.rb +147 -0
- data/lib/lockstep_sdk/models/provisioning_finalize_request_model.rb +0 -1
- data/lib/lockstep_sdk/models/provisioning_model.rb +0 -1
- data/lib/lockstep_sdk/models/provisioning_response_model.rb +0 -1
- data/lib/lockstep_sdk/models/risk_rate_model.rb +0 -1
- data/lib/lockstep_sdk/models/state_model.rb +0 -1
- data/lib/lockstep_sdk/models/status_model.rb +0 -1
- data/lib/lockstep_sdk/models/sync_entity_result_model.rb +0 -1
- data/lib/lockstep_sdk/models/sync_request_model.rb +10 -4
- data/lib/lockstep_sdk/models/sync_submit_model.rb +10 -3
- data/lib/lockstep_sdk/models/transfer_owner_model.rb +0 -1
- data/lib/lockstep_sdk/models/transfer_owner_submit_model.rb +0 -1
- data/lib/lockstep_sdk/models/uri_model.rb +49 -0
- data/lib/lockstep_sdk/models/user_account_model.rb +0 -1
- data/lib/lockstep_sdk/models/user_role_model.rb +0 -1
- data/lib/lockstep_sdk/models/webhook_model.rb +137 -0
- data/lib/lockstep_sdk/version.rb +1 -1
- metadata +14 -2
@@ -0,0 +1,369 @@
|
|
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
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
14
|
+
#
|
15
|
+
|
16
|
+
|
17
|
+
require 'json'
|
18
|
+
|
19
|
+
module LockstepSdk
|
20
|
+
|
21
|
+
##
|
22
|
+
# The InvoiceSyncModel represents information coming into Lockstep from an external financial system or other
|
23
|
+
# enterprise resource planning system. To import data from an external system, convert your original data into
|
24
|
+
# the InvoiceSyncModel format and call the [Upload Sync File API](https://developer.lockstep.io/reference/post_api-v1-sync-zip).
|
25
|
+
# This API retrieves all of the data you uploaded in a compressed ZIP file and imports it into the Lockstep
|
26
|
+
# platform.
|
27
|
+
#
|
28
|
+
# Once imported, this record will be available in the Lockstep API as an [InvoiceModel](https://developer.lockstep.io/docs/invoicemodel).
|
29
|
+
#
|
30
|
+
# For more information on writing your own connector, see [Connector Data](https://developer.lockstep.io/docs/connector-data).
|
31
|
+
class InvoiceSyncModel
|
32
|
+
|
33
|
+
##
|
34
|
+
# Initialize the InvoiceSyncModel using the provided prototype
|
35
|
+
def initialize(params = {})
|
36
|
+
@erp_key = params.dig(:erp_key)
|
37
|
+
@company_erp_key = params.dig(:company_erp_key)
|
38
|
+
@customer_erp_key = params.dig(:customer_erp_key)
|
39
|
+
@salesperson_name = params.dig(:salesperson_name)
|
40
|
+
@purchase_order_code = params.dig(:purchase_order_code)
|
41
|
+
@reference_code = params.dig(:reference_code)
|
42
|
+
@salesperson_code = params.dig(:salesperson_code)
|
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
|
+
@origin_address_line1 = params.dig(:origin_address_line1)
|
59
|
+
@origin_address_line2 = params.dig(:origin_address_line2)
|
60
|
+
@origin_address_line3 = params.dig(:origin_address_line3)
|
61
|
+
@origin_address_city = params.dig(:origin_address_city)
|
62
|
+
@origin_address_region = params.dig(:origin_address_region)
|
63
|
+
@origin_address_postal_code = params.dig(:origin_address_postal_code)
|
64
|
+
@origin_address_country = params.dig(:origin_address_country)
|
65
|
+
@origin_address_latitude = params.dig(:origin_address_latitude)
|
66
|
+
@origin_address_longitude = params.dig(:origin_address_longitude)
|
67
|
+
@bill_to_address_line1 = params.dig(:bill_to_address_line1)
|
68
|
+
@bill_to_address_line2 = params.dig(:bill_to_address_line2)
|
69
|
+
@bill_to_address_line3 = params.dig(:bill_to_address_line3)
|
70
|
+
@bill_to_address_city = params.dig(:bill_to_address_city)
|
71
|
+
@bill_to_address_region = params.dig(:bill_to_address_region)
|
72
|
+
@bill_to_address_postal_code = params.dig(:bill_to_address_postal_code)
|
73
|
+
@bill_to_address_country = params.dig(:bill_to_address_country)
|
74
|
+
@bill_to_address_latitude = params.dig(:bill_to_address_latitude)
|
75
|
+
@bill_to_address_longitude = params.dig(:bill_to_address_longitude)
|
76
|
+
@ship_to_address_line1 = params.dig(:ship_to_address_line1)
|
77
|
+
@ship_to_address_line2 = params.dig(:ship_to_address_line2)
|
78
|
+
@ship_to_address_line3 = params.dig(:ship_to_address_line3)
|
79
|
+
@ship_to_address_city = params.dig(:ship_to_address_city)
|
80
|
+
@ship_to_address_region = params.dig(:ship_to_address_region)
|
81
|
+
@ship_to_address_postal_code = params.dig(:ship_to_address_postal_code)
|
82
|
+
@ship_to_address_country = params.dig(:ship_to_address_country)
|
83
|
+
@ship_to_address_latitude = params.dig(:ship_to_address_latitude)
|
84
|
+
@ship_to_address_longitude = params.dig(:ship_to_address_longitude)
|
85
|
+
@created = params.dig(:created)
|
86
|
+
@modified = params.dig(:modified)
|
87
|
+
@is_voided = params.dig(:is_voided)
|
88
|
+
@in_dispute = params.dig(:in_dispute)
|
89
|
+
end
|
90
|
+
|
91
|
+
##
|
92
|
+
# @return [String] This is the primary key of the Invoice record. For this field, you should use whatever the invoice'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 records in a database, whatever the primary key for the invoice table is in the database should be the "ErpKey". For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
93
|
+
attr_accessor :erp_key
|
94
|
+
|
95
|
+
##
|
96
|
+
# @return [String] The original primary key or unique ID of the company to which this invoice belongs. This value should match the [Company ErpKey](https://developer.lockstep.io/docs/importing-companies#erpkey) field on the [CompanySyncModel](https://developer.lockstep.io/docs/importing-companies). An Invoice has two relationships: The Company and the Customer. The field `CompanyErpKey` identifies the company that created the invoice, and the field `CustomerErpKey` is the customer to whom the invoice was sent.
|
97
|
+
attr_accessor :company_erp_key
|
98
|
+
|
99
|
+
##
|
100
|
+
# @return [String] The original primary key or unique ID of the company to which this invoice was sent. This value should match the [Company ErpKey](https://developer.lockstep.io/docs/importing-companies#erpkey) field on the [CompanySyncModel](https://developer.lockstep.io/docs/importing-companies). An Invoice has two relationships: The Company and the Customer. The field `CompanyErpKey` identifies the company that created the invoice, and the field `CustomerErpKey` is the customer to whom the invoice was sent.
|
101
|
+
attr_accessor :customer_erp_key
|
102
|
+
|
103
|
+
##
|
104
|
+
# @return [String] The name of the salesperson that wrote this invoice. This is just text, it is not a reference to the "Contacts" table. You will not receive an error if this field does not match a known contact person.
|
105
|
+
attr_accessor :salesperson_name
|
106
|
+
|
107
|
+
##
|
108
|
+
# @return [String] The "Purchase Order Code" is a code that is sometimes used by companies to refer to the original PO that was sent that caused this invoice to be written. If a customer sends a purchase order to a vendor, the vendor can then create an invoice and refer back to the originating purchase order using this field.
|
109
|
+
attr_accessor :purchase_order_code
|
110
|
+
|
111
|
+
##
|
112
|
+
# @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.
|
113
|
+
attr_accessor :reference_code
|
114
|
+
|
115
|
+
##
|
116
|
+
# @return [String] A code identifying the salesperson responsible for writing this quote, invoice, or order. This is just text, it is not a reference to the "Contacts" table. You will not receive an error if this field does not match a known contact person.
|
117
|
+
attr_accessor :salesperson_code
|
118
|
+
|
119
|
+
##
|
120
|
+
# @return [String] A code identifying the type of this invoice. Recognized Invoice types are: * `Invoice` - Represents an invoice sent by Company to the Customer * `AP Invoice` - Represents an invoice sent by Customer to the Company * `Credit Memo` - Represents a credit memo generated by Customer given to Company
|
121
|
+
attr_accessor :invoice_type_code
|
122
|
+
|
123
|
+
##
|
124
|
+
# @return [String] A code identifying the status of this invoice. Recognized Invoice status codes are: * `Open` - Represents an invoice that is considered open and needs more work to complete * `Closed` - Represents an invoice that is considered closed and resolved
|
125
|
+
attr_accessor :invoice_status_code
|
126
|
+
|
127
|
+
##
|
128
|
+
# @return [String] A code identifying the terms given to the purchaser. This field is imported directly from the originating financial system and does not follow a specified format.
|
129
|
+
attr_accessor :terms_code
|
130
|
+
|
131
|
+
##
|
132
|
+
# @return [String] If the customer negotiated any special terms different from the standard terms above, describe them here.
|
133
|
+
attr_accessor :special_terms
|
134
|
+
|
135
|
+
##
|
136
|
+
# @return [String] The three-character ISO 4217 currency code used for this invoice. This will be validated by the /api/v1/currencies data set
|
137
|
+
attr_accessor :currency_code
|
138
|
+
|
139
|
+
##
|
140
|
+
# @return [Double] The total value of this invoice, inclusive of all taxes and line items.
|
141
|
+
attr_accessor :total_amount
|
142
|
+
|
143
|
+
##
|
144
|
+
# @return [Double] The total sales (or transactional) tax calculated for this invoice.
|
145
|
+
attr_accessor :sales_tax_amount
|
146
|
+
|
147
|
+
##
|
148
|
+
# @return [Double] The total discounts given by the seller to the buyer on this invoice.
|
149
|
+
attr_accessor :discount_amount
|
150
|
+
|
151
|
+
##
|
152
|
+
# @return [Double] The remaining balance value of this invoice.
|
153
|
+
attr_accessor :outstanding_balance_amount
|
154
|
+
|
155
|
+
##
|
156
|
+
# @return [Date-time] The reporting date for this invoice.
|
157
|
+
attr_accessor :invoice_date
|
158
|
+
|
159
|
+
##
|
160
|
+
# @return [Date-time] The date when discounts were adjusted for this invoice.
|
161
|
+
attr_accessor :discount_date
|
162
|
+
|
163
|
+
##
|
164
|
+
# @return [Date-time] The date when this invoice posted to the company's general ledger.
|
165
|
+
attr_accessor :posted_date
|
166
|
+
|
167
|
+
##
|
168
|
+
# @return [Date-time] The date when the invoice was closed and finalized after completion of all payments and delivery of all products and services.
|
169
|
+
attr_accessor :invoice_closed_date
|
170
|
+
|
171
|
+
##
|
172
|
+
# @return [Date-time] The date when the remaining outstanding balance is due.
|
173
|
+
attr_accessor :payment_due_date
|
174
|
+
|
175
|
+
##
|
176
|
+
# @return [Date-time] The date and time when this record was imported from the user's ERP or accounting system.
|
177
|
+
attr_accessor :imported_date
|
178
|
+
|
179
|
+
##
|
180
|
+
# @return [String] The origination address for this invoice
|
181
|
+
attr_accessor :origin_address_line1
|
182
|
+
|
183
|
+
##
|
184
|
+
# @return [String] The origination address for this invoice
|
185
|
+
attr_accessor :origin_address_line2
|
186
|
+
|
187
|
+
##
|
188
|
+
# @return [String] The origination address for this invoice
|
189
|
+
attr_accessor :origin_address_line3
|
190
|
+
|
191
|
+
##
|
192
|
+
# @return [String] The origination address for this invoice
|
193
|
+
attr_accessor :origin_address_city
|
194
|
+
|
195
|
+
##
|
196
|
+
# @return [String] The origination address for this invoice
|
197
|
+
attr_accessor :origin_address_region
|
198
|
+
|
199
|
+
##
|
200
|
+
# @return [String] The origination address for this invoice
|
201
|
+
attr_accessor :origin_address_postal_code
|
202
|
+
|
203
|
+
##
|
204
|
+
# @return [String] The origination address for this invoice This will be validated by the /api/v1/countries data set
|
205
|
+
attr_accessor :origin_address_country
|
206
|
+
|
207
|
+
##
|
208
|
+
# @return [Float] The origination address for this invoice
|
209
|
+
attr_accessor :origin_address_latitude
|
210
|
+
|
211
|
+
##
|
212
|
+
# @return [Float] The origination address for this invoice
|
213
|
+
attr_accessor :origin_address_longitude
|
214
|
+
|
215
|
+
##
|
216
|
+
# @return [String] The billing address for this invoice
|
217
|
+
attr_accessor :bill_to_address_line1
|
218
|
+
|
219
|
+
##
|
220
|
+
# @return [String] The billing address for this invoice
|
221
|
+
attr_accessor :bill_to_address_line2
|
222
|
+
|
223
|
+
##
|
224
|
+
# @return [String] The billing address for this invoice
|
225
|
+
attr_accessor :bill_to_address_line3
|
226
|
+
|
227
|
+
##
|
228
|
+
# @return [String] The billing address for this invoice
|
229
|
+
attr_accessor :bill_to_address_city
|
230
|
+
|
231
|
+
##
|
232
|
+
# @return [String] The billing address for this invoice
|
233
|
+
attr_accessor :bill_to_address_region
|
234
|
+
|
235
|
+
##
|
236
|
+
# @return [String] The billing address for this invoice
|
237
|
+
attr_accessor :bill_to_address_postal_code
|
238
|
+
|
239
|
+
##
|
240
|
+
# @return [String] The billing address for this invoice This will be validated by the /api/v1/countries data set
|
241
|
+
attr_accessor :bill_to_address_country
|
242
|
+
|
243
|
+
##
|
244
|
+
# @return [Float] The billing address for this invoice
|
245
|
+
attr_accessor :bill_to_address_latitude
|
246
|
+
|
247
|
+
##
|
248
|
+
# @return [Float] The billing address for this invoice
|
249
|
+
attr_accessor :bill_to_address_longitude
|
250
|
+
|
251
|
+
##
|
252
|
+
# @return [String] The shipping address for this invoice
|
253
|
+
attr_accessor :ship_to_address_line1
|
254
|
+
|
255
|
+
##
|
256
|
+
# @return [String] The shipping address for this invoice
|
257
|
+
attr_accessor :ship_to_address_line2
|
258
|
+
|
259
|
+
##
|
260
|
+
# @return [String] The shipping address for this invoice
|
261
|
+
attr_accessor :ship_to_address_line3
|
262
|
+
|
263
|
+
##
|
264
|
+
# @return [String] The shipping address for this invoice
|
265
|
+
attr_accessor :ship_to_address_city
|
266
|
+
|
267
|
+
##
|
268
|
+
# @return [String] The shipping address for this invoice
|
269
|
+
attr_accessor :ship_to_address_region
|
270
|
+
|
271
|
+
##
|
272
|
+
# @return [String] The shipping address for this invoice
|
273
|
+
attr_accessor :ship_to_address_postal_code
|
274
|
+
|
275
|
+
##
|
276
|
+
# @return [String] The shipping address for this invoice This will be validated by the /api/v1/countries data set
|
277
|
+
attr_accessor :ship_to_address_country
|
278
|
+
|
279
|
+
##
|
280
|
+
# @return [Float] The shipping address for this invoice
|
281
|
+
attr_accessor :ship_to_address_latitude
|
282
|
+
|
283
|
+
##
|
284
|
+
# @return [Float] The shipping address for this invoice
|
285
|
+
attr_accessor :ship_to_address_longitude
|
286
|
+
|
287
|
+
##
|
288
|
+
# @return [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.
|
289
|
+
attr_accessor :created
|
290
|
+
|
291
|
+
##
|
292
|
+
# @return [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.
|
293
|
+
attr_accessor :modified
|
294
|
+
|
295
|
+
##
|
296
|
+
# @return [Boolean] Is the invoice voided?
|
297
|
+
attr_accessor :is_voided
|
298
|
+
|
299
|
+
##
|
300
|
+
# @return [Boolean] Is the invoice in dispute?
|
301
|
+
attr_accessor :in_dispute
|
302
|
+
|
303
|
+
##
|
304
|
+
# @return [object] This object as a JSON key-value structure
|
305
|
+
def as_json(options={})
|
306
|
+
{
|
307
|
+
'erpKey' => @erp_key,
|
308
|
+
'companyErpKey' => @company_erp_key,
|
309
|
+
'customerErpKey' => @customer_erp_key,
|
310
|
+
'salespersonName' => @salesperson_name,
|
311
|
+
'purchaseOrderCode' => @purchase_order_code,
|
312
|
+
'referenceCode' => @reference_code,
|
313
|
+
'salespersonCode' => @salesperson_code,
|
314
|
+
'invoiceTypeCode' => @invoice_type_code,
|
315
|
+
'invoiceStatusCode' => @invoice_status_code,
|
316
|
+
'termsCode' => @terms_code,
|
317
|
+
'specialTerms' => @special_terms,
|
318
|
+
'currencyCode' => @currency_code,
|
319
|
+
'totalAmount' => @total_amount,
|
320
|
+
'salesTaxAmount' => @sales_tax_amount,
|
321
|
+
'discountAmount' => @discount_amount,
|
322
|
+
'outstandingBalanceAmount' => @outstanding_balance_amount,
|
323
|
+
'invoiceDate' => @invoice_date,
|
324
|
+
'discountDate' => @discount_date,
|
325
|
+
'postedDate' => @posted_date,
|
326
|
+
'invoiceClosedDate' => @invoice_closed_date,
|
327
|
+
'paymentDueDate' => @payment_due_date,
|
328
|
+
'importedDate' => @imported_date,
|
329
|
+
'originAddressLine1' => @origin_address_line1,
|
330
|
+
'originAddressLine2' => @origin_address_line2,
|
331
|
+
'originAddressLine3' => @origin_address_line3,
|
332
|
+
'originAddressCity' => @origin_address_city,
|
333
|
+
'originAddressRegion' => @origin_address_region,
|
334
|
+
'originAddressPostalCode' => @origin_address_postal_code,
|
335
|
+
'originAddressCountry' => @origin_address_country,
|
336
|
+
'originAddressLatitude' => @origin_address_latitude,
|
337
|
+
'originAddressLongitude' => @origin_address_longitude,
|
338
|
+
'billToAddressLine1' => @bill_to_address_line1,
|
339
|
+
'billToAddressLine2' => @bill_to_address_line2,
|
340
|
+
'billToAddressLine3' => @bill_to_address_line3,
|
341
|
+
'billToAddressCity' => @bill_to_address_city,
|
342
|
+
'billToAddressRegion' => @bill_to_address_region,
|
343
|
+
'billToAddressPostalCode' => @bill_to_address_postal_code,
|
344
|
+
'billToAddressCountry' => @bill_to_address_country,
|
345
|
+
'billToAddressLatitude' => @bill_to_address_latitude,
|
346
|
+
'billToAddressLongitude' => @bill_to_address_longitude,
|
347
|
+
'shipToAddressLine1' => @ship_to_address_line1,
|
348
|
+
'shipToAddressLine2' => @ship_to_address_line2,
|
349
|
+
'shipToAddressLine3' => @ship_to_address_line3,
|
350
|
+
'shipToAddressCity' => @ship_to_address_city,
|
351
|
+
'shipToAddressRegion' => @ship_to_address_region,
|
352
|
+
'shipToAddressPostalCode' => @ship_to_address_postal_code,
|
353
|
+
'shipToAddressCountry' => @ship_to_address_country,
|
354
|
+
'shipToAddressLatitude' => @ship_to_address_latitude,
|
355
|
+
'shipToAddressLongitude' => @ship_to_address_longitude,
|
356
|
+
'created' => @created,
|
357
|
+
'modified' => @modified,
|
358
|
+
'isVoided' => @is_voided,
|
359
|
+
'inDispute' => @in_dispute,
|
360
|
+
}
|
361
|
+
end
|
362
|
+
|
363
|
+
##
|
364
|
+
# @return [String] This object converted to a JSON string
|
365
|
+
def to_json(*options)
|
366
|
+
"[#{as_json(*options).to_json(*options)}]"
|
367
|
+
end
|
368
|
+
end
|
369
|
+
end
|
@@ -10,7 +10,6 @@
|
|
10
10
|
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
11
|
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
12
|
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
-
# @version 2022.4
|
14
13
|
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
14
|
#
|
16
15
|
|
@@ -66,15 +65,15 @@ module LockstepSdk
|
|
66
65
|
attr_accessor :erp_key
|
67
66
|
|
68
67
|
##
|
69
|
-
# @return [Int32]
|
68
|
+
# @return [Int32] The entry number of this payment application. This is often a journal entry number, confirmation code, or other identifying field for this payment application.
|
70
69
|
attr_accessor :entry_number
|
71
70
|
|
72
71
|
##
|
73
|
-
# @return [Date-time]
|
72
|
+
# @return [Date-time] The date this payment was applied to this invoice.
|
74
73
|
attr_accessor :apply_to_invoice_date
|
75
74
|
|
76
75
|
##
|
77
|
-
# @return [Double]
|
76
|
+
# @return [Double] The total amount that was applied to this Invoice from the Payment.
|
78
77
|
attr_accessor :payment_applied_amount
|
79
78
|
|
80
79
|
##
|
@@ -0,0 +1,99 @@
|
|
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
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
14
|
+
#
|
15
|
+
|
16
|
+
|
17
|
+
require 'json'
|
18
|
+
|
19
|
+
module LockstepSdk
|
20
|
+
|
21
|
+
##
|
22
|
+
# The PaymentAppliedSyncModel represents information coming into Lockstep from an external financial system or
|
23
|
+
# other enterprise resource planning system. To import data from an external system, convert your original data
|
24
|
+
# into the PaymentAppliedSyncModel format and call the [Upload Sync File API](https://developer.lockstep.io/reference/post_api-v1-sync-zip).
|
25
|
+
# This API retrieves all of the data you uploaded in a compressed ZIP file and imports it into the Lockstep
|
26
|
+
# platform.
|
27
|
+
#
|
28
|
+
# Once imported, this record will be available in the Lockstep API as a [PaymentAppliedModel](https://developer.lockstep.io/docs/paymentappliedmodel).
|
29
|
+
#
|
30
|
+
# For more information on writing your own connector, see [Connector Data](https://developer.lockstep.io/docs/connector-data).
|
31
|
+
class PaymentAppliedSyncModel
|
32
|
+
|
33
|
+
##
|
34
|
+
# Initialize the PaymentAppliedSyncModel using the provided prototype
|
35
|
+
def initialize(params = {})
|
36
|
+
@erp_key = params.dig(:erp_key)
|
37
|
+
@invoice_erp_key = params.dig(:invoice_erp_key)
|
38
|
+
@payment_erp_key = params.dig(:payment_erp_key)
|
39
|
+
@entry_number = params.dig(:entry_number)
|
40
|
+
@apply_to_invoice_date = params.dig(:apply_to_invoice_date)
|
41
|
+
@payment_applied_amount = params.dig(:payment_applied_amount)
|
42
|
+
@created = params.dig(:created)
|
43
|
+
@modified = params.dig(:modified)
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# @return [String] This is the primary key of the Payment Application record. For this field, you should use whatever this transaction's unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Since Payment Applications are often considered transactions, a typical value to look for will be the transaction ID number, the payment confirmation number, or some other record of this payment. For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
48
|
+
attr_accessor :erp_key
|
49
|
+
|
50
|
+
##
|
51
|
+
# @return [String] This field indicates which Invoice had its balance reduced by applying this payment. In this field, identify the original primary key or unique ID of the Invoice which had its balance reduced. This information lets you track how an invoice was paid. You can identify what proportion of an invoice's balance was paid by which methods by joining this field to Invoices. This value should match the [Invoice ErpKey](https://developer.lockstep.io/docs/importing-invoices#erpkey) field on the [InvoiceSyncModel](https://developer.lockstep.io/docs/importing-invoices).
|
52
|
+
attr_accessor :invoice_erp_key
|
53
|
+
|
54
|
+
##
|
55
|
+
# @return [String] This field indicates which Payment was used to provide the funds for this payment application. In this field, identify the original primary key or unique ID of the Payment that was used for this payment application. This information lets you track how an invoice was paid. You can identify what proportion of an payment's balance was paid by which methods by joining this field to the Payment. This value should match the [Payment ErpKey](https://developer.lockstep.io/docs/importing-payments#erpkey) field on the [PaymentSyncModel](https://developer.lockstep.io/docs/importing-payments).
|
56
|
+
attr_accessor :payment_erp_key
|
57
|
+
|
58
|
+
##
|
59
|
+
# @return [Int32] The entry number of this payment application. This is often a journal entry number, confirmation code, or other identifying field for this payment application.
|
60
|
+
attr_accessor :entry_number
|
61
|
+
|
62
|
+
##
|
63
|
+
# @return [Date-time] The date this payment was applied to this invoice.
|
64
|
+
attr_accessor :apply_to_invoice_date
|
65
|
+
|
66
|
+
##
|
67
|
+
# @return [Double] The total amount that was applied to this Invoice from the Payment.
|
68
|
+
attr_accessor :payment_applied_amount
|
69
|
+
|
70
|
+
##
|
71
|
+
# @return [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.
|
72
|
+
attr_accessor :created
|
73
|
+
|
74
|
+
##
|
75
|
+
# @return [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.
|
76
|
+
attr_accessor :modified
|
77
|
+
|
78
|
+
##
|
79
|
+
# @return [object] This object as a JSON key-value structure
|
80
|
+
def as_json(options={})
|
81
|
+
{
|
82
|
+
'erpKey' => @erp_key,
|
83
|
+
'invoiceErpKey' => @invoice_erp_key,
|
84
|
+
'paymentErpKey' => @payment_erp_key,
|
85
|
+
'entryNumber' => @entry_number,
|
86
|
+
'applyToInvoiceDate' => @apply_to_invoice_date,
|
87
|
+
'paymentAppliedAmount' => @payment_applied_amount,
|
88
|
+
'created' => @created,
|
89
|
+
'modified' => @modified,
|
90
|
+
}
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# @return [String] This object converted to a JSON string
|
95
|
+
def to_json(*options)
|
96
|
+
"[#{as_json(*options).to_json(*options)}]"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -10,7 +10,6 @@
|
|
10
10
|
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
11
|
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
12
|
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
-
# @version 2022.4
|
14
13
|
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
14
|
#
|
16
15
|
|
@@ -77,15 +76,15 @@ module LockstepSdk
|
|
77
76
|
attr_accessor :erp_key
|
78
77
|
|
79
78
|
##
|
80
|
-
# @return [String] The type of payment, cash or check.
|
79
|
+
# @return [String] The type of payment, cash or check. Recognized PaymentType values are: * `Cash` - A cash payment or other direct transfer. * `Check` - A check payment.
|
81
80
|
attr_accessor :payment_type
|
82
81
|
|
83
82
|
##
|
84
|
-
# @return [String] Cash, check, credit card, wire transfer.
|
83
|
+
# @return [String] Cash, check, credit card, wire transfer. Recognized TenderType values are: * `Cash` - A cash payment or other direct transfer. * `Check` - A check payment. * `Credit Card` - A payment made via a credit card. * `Wire Transfer` - A payment made via wire transfer from another financial institution.
|
85
84
|
attr_accessor :tender_type
|
86
85
|
|
87
86
|
##
|
88
|
-
# @return [Boolean]
|
87
|
+
# @return [Boolean] True if this payment includes some unassigned amount that has not yet been applied to an invoice. If this value is true, the field `UnappliedAmount` will be nonzero.
|
89
88
|
attr_accessor :is_open
|
90
89
|
|
91
90
|
##
|
@@ -93,11 +92,11 @@ module LockstepSdk
|
|
93
92
|
attr_accessor :memo_text
|
94
93
|
|
95
94
|
##
|
96
|
-
# @return [Date] The date
|
95
|
+
# @return [Date] The date when this payment was received. This typically is the date when an accounting employee recorded that they received notification that the payment had occurred, whether they were notified by email, postal mail, or financial transaction notification.
|
97
96
|
attr_accessor :payment_date
|
98
97
|
|
99
98
|
##
|
100
|
-
# @return [Date]
|
99
|
+
# @return [Date] The date when a payment was posted to a ledger. This date is often determined by a company's accounting practices and may be different than the date when the payment was received. This date may be affected by issues such as temporary holds on funds transferred, bank holidays, or other actions.
|
101
100
|
attr_accessor :post_date
|
102
101
|
|
103
102
|
##
|
@@ -105,11 +104,11 @@ module LockstepSdk
|
|
105
104
|
attr_accessor :payment_amount
|
106
105
|
|
107
106
|
##
|
108
|
-
# @return [Double] Unapplied balance of this payment.
|
107
|
+
# @return [Double] Unapplied balance of this payment. If this amount is nonzero, the field `IsOpen` will be true.
|
109
108
|
attr_accessor :unapplied_amount
|
110
109
|
|
111
110
|
##
|
112
|
-
# @return [String]
|
111
|
+
# @return [String] The ISO 4217 currency code for this payment. For a list of ISO 4217 currency codes, see [Query Currencies](https://developer.lockstep.io/reference/get_api-v1-definitions-currencies). This will be validated by the /api/v1/currencies data set
|
113
112
|
attr_accessor :currency_code
|
114
113
|
|
115
114
|
##
|