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,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 CreditMemoAppliedSyncModel 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 CreditMemoAppliedSyncModel 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 [CreditMemoAppliedModel](https://developer.lockstep.io/docs/creditmemoappliedmodel).
|
29
|
+
#
|
30
|
+
# For more information on writing your own connector, see [Connector Data](https://developer.lockstep.io/docs/connector-data).
|
31
|
+
class CreditMemoAppliedSyncModel
|
32
|
+
|
33
|
+
##
|
34
|
+
# Initialize the CreditMemoAppliedSyncModel 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
|
+
@credit_memo_invoice_erp_key = params.dig(:credit_memo_invoice_erp_key)
|
39
|
+
@entry_number = params.dig(:entry_number)
|
40
|
+
@apply_to_invoice_date = params.dig(:apply_to_invoice_date)
|
41
|
+
@credit_memo_applied_amount = params.dig(:credit_memo_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 Credit Memo 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 Credit Memo 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 balanced reduced by applying a credit memo. In this field, identify the original primary key or unique ID of the Invoice which had its balanced reduced. Example: Company ABC received a credit memo, CM000123 for $500. Company ABC then chooses to apply this credit memo to reduce the balance of the invoice PO1000578. The `InvoiceErpKey` is `PO1000578`.
|
52
|
+
attr_accessor :invoice_erp_key
|
53
|
+
|
54
|
+
##
|
55
|
+
# @return [String] This field indicates which Invoice is the original credit memo that was used to make this payment application event. In this field, identify the original primary key or unique ID of the Invoice which created the credit memo that was consumed in this event. Example: Company ABC received a credit memo, CM000123 for $500. Company ABC then chooses to apply this credit memo to reduce the balance of the invoice PO1000578. The `CreditMemoInvoiceErpKey` is `CM000123`.
|
56
|
+
attr_accessor :credit_memo_invoice_erp_key
|
57
|
+
|
58
|
+
##
|
59
|
+
# @return [Int32] Reference number for the applied credit memo.
|
60
|
+
attr_accessor :entry_number
|
61
|
+
|
62
|
+
##
|
63
|
+
# @return [Date-time] The date on which this credit memo was applied to the Invoice.
|
64
|
+
attr_accessor :apply_to_invoice_date
|
65
|
+
|
66
|
+
##
|
67
|
+
# @return [Double] The amount of this credit memo that was applied to this Invoice.
|
68
|
+
attr_accessor :credit_memo_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
|
+
'creditMemoInvoiceErpKey' => @credit_memo_invoice_erp_key,
|
85
|
+
'entryNumber' => @entry_number,
|
86
|
+
'applyToInvoiceDate' => @apply_to_invoice_date,
|
87
|
+
'creditMemoAppliedAmount' => @credit_memo_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
|
@@ -0,0 +1,97 @@
|
|
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 CustomFieldSyncModel represents information coming into Lockstep from an external financial system or other
|
23
|
+
# enterprise resource planning system. [Custom Fields](https://developer.lockstep.io/docs/custom-fields#custom-fields)
|
24
|
+
# represent custom data extensions that you can use with the Lockstep Platform. If you need to store extra
|
25
|
+
# information about an object that does not match Lockstep's official schema, you can store it in the Custom
|
26
|
+
# Field system using CustomFieldSyncModel.
|
27
|
+
#
|
28
|
+
# To store a custom field for an object, create a CustomFieldSyncModel record containing the `EntityType` and
|
29
|
+
# `ErpKey` of the entity to which you will attach a custom field. Next specify the field's `CustomFieldLabel`
|
30
|
+
# and either a `StringValue` or `NumericValue`.
|
31
|
+
#
|
32
|
+
# Once imported, this record will be available in the Lockstep API as a [CustomFieldValueModel](https://developer.lockstep.io/docs/customfieldvaluemodel).
|
33
|
+
#
|
34
|
+
# For more information on writing your own connector, see [Connector Data](https://developer.lockstep.io/docs/connector-data).
|
35
|
+
class CustomFieldSyncModel
|
36
|
+
|
37
|
+
##
|
38
|
+
# Initialize the CustomFieldSyncModel using the provided prototype
|
39
|
+
def initialize(params = {})
|
40
|
+
@erp_key = params.dig(:erp_key)
|
41
|
+
@entity_type = params.dig(:entity_type)
|
42
|
+
@custom_field_label = params.dig(:custom_field_label)
|
43
|
+
@string_value = params.dig(:string_value)
|
44
|
+
@numeric_value = params.dig(:numeric_value)
|
45
|
+
@created = params.dig(:created)
|
46
|
+
@modified = params.dig(:modified)
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# @return [String] This is the primary key of the record to which you will attach this custom field. You should provide the identifying number as it is stored in the originating financial system. Search for a unique, non-changing number within the originating financial system for this record. Custom Fields are identified by the `EntityType` and `ErpKey` values together. Example: You have an invoice whose ID number is 100047878, and you wish to store a custom field on that invoice named "ApprovalStatusCode". For the `ErpKey` field, specify the value `100047878`. For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
51
|
+
attr_accessor :erp_key
|
52
|
+
|
53
|
+
##
|
54
|
+
# @return [String] Custom Fields are identified by the `EntityType` and `ErpKey` values together. Example: You have an invoice whose ID number is 100047878, and you wish to store a custom field on that invoice named "ApprovalStatusCode". For the `EntityType` field, specify the value `Invoice`. Recognized types include: * `Company` - Link this custom field to a CompanySyncModel * `Contact` - Link this custom field to a ContactSyncModel * `Invoice` - Link this custom field to an InvoiceSyncModel * `InvoiceLine` - Link this custom field to an InvoiceLineSyncModel * `Payment` - Link this custom field to a PaymentSyncModel
|
55
|
+
attr_accessor :entity_type
|
56
|
+
|
57
|
+
##
|
58
|
+
# @return [String] A label that uniquely identifies this custom field within your software. Example: You have an invoice whose ID number is 100047878, and you wish to store a custom field on that invoice named "ApprovalStatusCode". For the `CustomFieldLabel` field, specify the value `ApprovalStatusCode`.
|
59
|
+
attr_accessor :custom_field_label
|
60
|
+
|
61
|
+
##
|
62
|
+
# @return [String] The value of this custom field, if it is stored in string format.
|
63
|
+
attr_accessor :string_value
|
64
|
+
|
65
|
+
##
|
66
|
+
# @return [Double] The value of this custom field, if it is stored in numeric format.
|
67
|
+
attr_accessor :numeric_value
|
68
|
+
|
69
|
+
##
|
70
|
+
# @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.
|
71
|
+
attr_accessor :created
|
72
|
+
|
73
|
+
##
|
74
|
+
# @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.
|
75
|
+
attr_accessor :modified
|
76
|
+
|
77
|
+
##
|
78
|
+
# @return [object] This object as a JSON key-value structure
|
79
|
+
def as_json(options={})
|
80
|
+
{
|
81
|
+
'erpKey' => @erp_key,
|
82
|
+
'entityType' => @entity_type,
|
83
|
+
'customFieldLabel' => @custom_field_label,
|
84
|
+
'stringValue' => @string_value,
|
85
|
+
'numericValue' => @numeric_value,
|
86
|
+
'created' => @created,
|
87
|
+
'modified' => @modified,
|
88
|
+
}
|
89
|
+
end
|
90
|
+
|
91
|
+
##
|
92
|
+
# @return [String] This object converted to a JSON string
|
93
|
+
def to_json(*options)
|
94
|
+
"[#{as_json(*options).to_json(*options)}]"
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|