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.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lockstep_sdk/clients/activities_client.rb +0 -1
  3. data/lib/lockstep_sdk/clients/api_keys_client.rb +0 -1
  4. data/lib/lockstep_sdk/clients/app_enrollments_client.rb +0 -1
  5. data/lib/lockstep_sdk/clients/applications_client.rb +0 -1
  6. data/lib/lockstep_sdk/clients/attachments_client.rb +2 -2
  7. data/lib/lockstep_sdk/clients/code_definitions_client.rb +0 -1
  8. data/lib/lockstep_sdk/clients/companies_client.rb +0 -1
  9. data/lib/lockstep_sdk/clients/contacts_client.rb +0 -1
  10. data/lib/lockstep_sdk/clients/credit_memo_applied_client.rb +0 -1
  11. data/lib/lockstep_sdk/clients/currencies_client.rb +0 -1
  12. data/lib/lockstep_sdk/clients/custom_field_definitions_client.rb +0 -1
  13. data/lib/lockstep_sdk/clients/custom_field_values_client.rb +0 -1
  14. data/lib/lockstep_sdk/clients/definitions_client.rb +0 -1
  15. data/lib/lockstep_sdk/clients/emails_client.rb +0 -1
  16. data/lib/lockstep_sdk/clients/invoice_history_client.rb +0 -1
  17. data/lib/lockstep_sdk/clients/invoices_client.rb +0 -1
  18. data/lib/lockstep_sdk/clients/leads_client.rb +0 -1
  19. data/lib/lockstep_sdk/clients/notes_client.rb +0 -1
  20. data/lib/lockstep_sdk/clients/payment_applications_client.rb +0 -1
  21. data/lib/lockstep_sdk/clients/payments_client.rb +0 -1
  22. data/lib/lockstep_sdk/clients/provisioning_client.rb +0 -5
  23. data/lib/lockstep_sdk/clients/reports_client.rb +0 -1
  24. data/lib/lockstep_sdk/clients/status_client.rb +0 -1
  25. data/lib/lockstep_sdk/clients/sync_client.rb +15 -2
  26. data/lib/lockstep_sdk/clients/user_accounts_client.rb +0 -1
  27. data/lib/lockstep_sdk/clients/user_roles_client.rb +0 -1
  28. data/lib/lockstep_sdk/clients/webhooks_client.rb +91 -0
  29. data/lib/lockstep_sdk/lockstep_api.rb +8 -3
  30. data/lib/lockstep_sdk/models/activity_model.rb +0 -1
  31. data/lib/lockstep_sdk/models/activity_stream_item_model.rb +0 -1
  32. data/lib/lockstep_sdk/models/activity_xref_model.rb +0 -1
  33. data/lib/lockstep_sdk/models/aging_model.rb +0 -1
  34. data/lib/lockstep_sdk/models/api_key_model.rb +0 -1
  35. data/lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb +0 -1
  36. data/lib/lockstep_sdk/models/app_enrollment_model.rb +0 -1
  37. data/lib/lockstep_sdk/models/application_model.rb +0 -1
  38. data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +0 -1
  39. data/lib/lockstep_sdk/models/ar_header_info_model.rb +0 -1
  40. data/lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb +0 -1
  41. data/lib/lockstep_sdk/models/attachment_header_info_model.rb +0 -1
  42. data/lib/lockstep_sdk/models/attachment_model.rb +12 -1
  43. data/lib/lockstep_sdk/models/batch_sync_model.rb +99 -0
  44. data/lib/lockstep_sdk/models/bulk_currency_conversion_model.rb +0 -1
  45. data/lib/lockstep_sdk/models/cashflow_report_model.rb +0 -1
  46. data/lib/lockstep_sdk/models/code_definition_model.rb +0 -1
  47. data/lib/lockstep_sdk/models/company_model.rb +0 -1
  48. data/lib/lockstep_sdk/models/company_sync_model.rb +195 -0
  49. data/lib/lockstep_sdk/models/connector_info_model.rb +0 -1
  50. data/lib/lockstep_sdk/models/contact_model.rb +0 -1
  51. data/lib/lockstep_sdk/models/contact_sync_model.rb +177 -0
  52. data/lib/lockstep_sdk/models/country_model.rb +0 -1
  53. data/lib/lockstep_sdk/models/credit_memo_applied_model.rb +6 -7
  54. data/lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb +99 -0
  55. data/lib/lockstep_sdk/models/credit_memo_invoice_model.rb +0 -1
  56. data/lib/lockstep_sdk/models/currency_model.rb +0 -1
  57. data/lib/lockstep_sdk/models/currency_rate_model.rb +0 -1
  58. data/lib/lockstep_sdk/models/custom_field_definition_model.rb +0 -1
  59. data/lib/lockstep_sdk/models/custom_field_sync_model.rb +97 -0
  60. data/lib/lockstep_sdk/models/custom_field_value_model.rb +0 -1
  61. data/lib/lockstep_sdk/models/customer_details_model.rb +0 -1
  62. data/lib/lockstep_sdk/models/customer_details_payment_model.rb +0 -1
  63. data/lib/lockstep_sdk/models/customer_summary_model.rb +0 -1
  64. data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +0 -1
  65. data/lib/lockstep_sdk/models/developer_account_submit_model.rb +0 -1
  66. data/lib/lockstep_sdk/models/email_model.rb +0 -1
  67. data/lib/lockstep_sdk/models/erp_info_data_model.rb +0 -1
  68. data/lib/lockstep_sdk/models/erp_info_model.rb +0 -1
  69. data/lib/lockstep_sdk/models/erp_model.rb +0 -1
  70. data/lib/lockstep_sdk/models/invite_data_model.rb +0 -1
  71. data/lib/lockstep_sdk/models/invite_model.rb +0 -1
  72. data/lib/lockstep_sdk/models/invite_submit_model.rb +0 -1
  73. data/lib/lockstep_sdk/models/invoice_address_model.rb +0 -1
  74. data/lib/lockstep_sdk/models/invoice_history_model.rb +0 -1
  75. data/lib/lockstep_sdk/models/invoice_line_model.rb +0 -1
  76. data/lib/lockstep_sdk/models/invoice_line_sync_model.rb +303 -0
  77. data/lib/lockstep_sdk/models/invoice_model.rb +5 -6
  78. data/lib/lockstep_sdk/models/invoice_payment_detail_model.rb +0 -1
  79. data/lib/lockstep_sdk/models/invoice_summary_model.rb +0 -1
  80. data/lib/lockstep_sdk/models/invoice_sync_model.rb +369 -0
  81. data/lib/lockstep_sdk/models/lead_model.rb +0 -1
  82. data/lib/lockstep_sdk/models/note_model.rb +0 -1
  83. data/lib/lockstep_sdk/models/payment_applied_model.rb +3 -4
  84. data/lib/lockstep_sdk/models/payment_applied_sync_model.rb +99 -0
  85. data/lib/lockstep_sdk/models/payment_detail_header_model.rb +0 -1
  86. data/lib/lockstep_sdk/models/payment_detail_model.rb +0 -1
  87. data/lib/lockstep_sdk/models/payment_model.rb +7 -8
  88. data/lib/lockstep_sdk/models/payment_summary_model.rb +0 -1
  89. data/lib/lockstep_sdk/models/payment_sync_model.rb +147 -0
  90. data/lib/lockstep_sdk/models/provisioning_finalize_request_model.rb +0 -1
  91. data/lib/lockstep_sdk/models/provisioning_model.rb +0 -1
  92. data/lib/lockstep_sdk/models/provisioning_response_model.rb +0 -1
  93. data/lib/lockstep_sdk/models/risk_rate_model.rb +0 -1
  94. data/lib/lockstep_sdk/models/state_model.rb +0 -1
  95. data/lib/lockstep_sdk/models/status_model.rb +0 -1
  96. data/lib/lockstep_sdk/models/sync_entity_result_model.rb +0 -1
  97. data/lib/lockstep_sdk/models/sync_request_model.rb +10 -4
  98. data/lib/lockstep_sdk/models/sync_submit_model.rb +10 -3
  99. data/lib/lockstep_sdk/models/transfer_owner_model.rb +0 -1
  100. data/lib/lockstep_sdk/models/transfer_owner_submit_model.rb +0 -1
  101. data/lib/lockstep_sdk/models/uri_model.rb +49 -0
  102. data/lib/lockstep_sdk/models/user_account_model.rb +0 -1
  103. data/lib/lockstep_sdk/models/user_role_model.rb +0 -1
  104. data/lib/lockstep_sdk/models/webhook_model.rb +137 -0
  105. data/lib/lockstep_sdk/version.rb +1 -1
  106. metadata +14 -2
@@ -0,0 +1,147 @@
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 PaymentSyncModel 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 PaymentSyncModel 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 [PaymentModel](https://developer.lockstep.io/docs/paymentmodel).
29
+ #
30
+ # For more information on writing your own connector, see [Connector Data](https://developer.lockstep.io/docs/connector-data).
31
+ class PaymentSyncModel
32
+
33
+ ##
34
+ # Initialize the PaymentSyncModel 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
+ @payment_type = params.dig(:payment_type)
39
+ @tender_type = params.dig(:tender_type)
40
+ @is_open = params.dig(:is_open)
41
+ @memo_text = params.dig(:memo_text)
42
+ @payment_date = params.dig(:payment_date)
43
+ @post_date = params.dig(:post_date)
44
+ @payment_amount = params.dig(:payment_amount)
45
+ @unapplied_amount = params.dig(:unapplied_amount)
46
+ @currency_code = params.dig(:currency_code)
47
+ @created = params.dig(:created)
48
+ @modified = params.dig(:modified)
49
+ @reference_code = params.dig(:reference_code)
50
+ @is_voided = params.dig(:is_voided)
51
+ @in_dispute = params.dig(:in_dispute)
52
+ end
53
+
54
+ ##
55
+ # @return [String] This is the primary key of the Payment record. For this field, you should use whatever the payment'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 payment records in a database, whatever the primary key for the payment table is in the database should be the "ErpKey". For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
56
+ attr_accessor :erp_key
57
+
58
+ ##
59
+ # @return [String] The original primary key or unique ID of the company to which this payment 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).
60
+ attr_accessor :company_erp_key
61
+
62
+ ##
63
+ # @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.
64
+ attr_accessor :payment_type
65
+
66
+ ##
67
+ # @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.
68
+ attr_accessor :tender_type
69
+
70
+ ##
71
+ # @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.
72
+ attr_accessor :is_open
73
+
74
+ ##
75
+ # @return [String] Memo or reference text (ex. memo field on a check).
76
+ attr_accessor :memo_text
77
+
78
+ ##
79
+ # @return [Date-time] 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.
80
+ attr_accessor :payment_date
81
+
82
+ ##
83
+ # @return [Date-time] 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.
84
+ attr_accessor :post_date
85
+
86
+ ##
87
+ # @return [Double] Total amount of this payment.
88
+ attr_accessor :payment_amount
89
+
90
+ ##
91
+ # @return [Double] Unapplied balance of this payment. If this amount is nonzero, the field `IsOpen` will be true.
92
+ attr_accessor :unapplied_amount
93
+
94
+ ##
95
+ # @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
96
+ attr_accessor :currency_code
97
+
98
+ ##
99
+ # @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.
100
+ attr_accessor :created
101
+
102
+ ##
103
+ # @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.
104
+ attr_accessor :modified
105
+
106
+ ##
107
+ # @return [String] A reference code for the payment for the given financial or ERP system. This can be any value that the originating system uses to designate the payment, such as a confirmation number or tracking number, that is different from the `ErpKey` value.
108
+ attr_accessor :reference_code
109
+
110
+ ##
111
+ # @return [Boolean] True if this payment was voided.
112
+ attr_accessor :is_voided
113
+
114
+ ##
115
+ # @return [Boolean] True if this payment is in dispute.
116
+ attr_accessor :in_dispute
117
+
118
+ ##
119
+ # @return [object] This object as a JSON key-value structure
120
+ def as_json(options={})
121
+ {
122
+ 'erpKey' => @erp_key,
123
+ 'companyErpKey' => @company_erp_key,
124
+ 'paymentType' => @payment_type,
125
+ 'tenderType' => @tender_type,
126
+ 'isOpen' => @is_open,
127
+ 'memoText' => @memo_text,
128
+ 'paymentDate' => @payment_date,
129
+ 'postDate' => @post_date,
130
+ 'paymentAmount' => @payment_amount,
131
+ 'unappliedAmount' => @unapplied_amount,
132
+ 'currencyCode' => @currency_code,
133
+ 'created' => @created,
134
+ 'modified' => @modified,
135
+ 'referenceCode' => @reference_code,
136
+ 'isVoided' => @is_voided,
137
+ 'inDispute' => @in_dispute,
138
+ }
139
+ end
140
+
141
+ ##
142
+ # @return [String] This object converted to a JSON string
143
+ def to_json(*options)
144
+ "[#{as_json(*options).to_json(*options)}]"
145
+ end
146
+ end
147
+ 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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -20,7 +19,14 @@ require 'json'
20
19
  module LockstepSdk
21
20
 
22
21
  ##
23
- # Represents a user request to sync data
22
+ # Represents a Sync action that loads data from a connector into the Lockstep Platform. Users can
23
+ # request Sync actions manually using Lockstep Inbox, or via the [Create Sync API](https://developer.lockstep.io/reference/post_api-v1-sync).
24
+ # Each Sync action is tied to an [AppEnrollment](https://developer.lockstep.io/docs/applications-and-enrollments).
25
+ # When the Sync action is complete, the field `StatusCode` will be set to either `Success` or `Failed`.
26
+ #
27
+ # You can fetch a list of detailed results for the Sync API by calling Retrieve or Query with an `include`
28
+ # parameter of `details`. These detailed results contain line-by-line errors that were detected during
29
+ # processing of this sync.
24
30
  class SyncRequestModel
25
31
 
26
32
  ##
@@ -46,7 +52,7 @@ module LockstepSdk
46
52
  attr_accessor :group_key
47
53
 
48
54
  ##
49
- # @return [String] Potential values = Cancelled, Ready, In Progress, Success, Failed
55
+ # @return [String] The status of processing for this SyncRequest. When a SyncRequest is created, it is flagged as `Ready`. When it is picked up for execution, its status moves to `In Progress`. When it is complete, its status will move to `Success` or `Failed`. If another API call cancels the SyncRequest, its status will move to `Cancelled`. * Ready * In Progress * Cancelled * Failed * Success
50
56
  attr_accessor :status_code
51
57
 
52
58
  ##
@@ -70,7 +76,7 @@ module LockstepSdk
70
76
  attr_accessor :modified_user_id
71
77
 
72
78
  ##
73
- # @return [Object] The detailed results from the sync. To retrieve this collection, set `includeDetails` to true in your GET requests.
79
+ # @return [Object] The detailed list of results and errors that occurred during the processing of this SyncRequest. This information is available only after the SyncRequest has completed. You will only be able to fetch this field if the SyncRequest's `StatusCode` field is set to `Cancelled`, `Success`, or `Failed`. To retrieve this collection, add the keyword `details` to the `include` parameter on your Retrieve or Query requests.
74
80
  attr_accessor :details
75
81
 
76
82
  ##
@@ -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
 
@@ -20,7 +19,15 @@ require 'json'
20
19
  module LockstepSdk
21
20
 
22
21
  ##
23
- # Model representing information for a sync request
22
+ # A SyncSubmitModel represents a task that loads data from a connector to load into the Lockstep Platform. Data
23
+ # contained in a sync will be merged with your existing data. Each record will be matched with existing data
24
+ # inside the Lockstep Platform using the [Identity Column](https://developer.lockstep.io/docs/identity-columns)
25
+ # rules. Any record that represents a new AppEnrollmentId+ErpKey will be inserted. A record that matches an
26
+ # existing AppEnrollmentId+ErpKey will be updated, but only if the data has changed.
27
+ #
28
+ # A Sync process permits either a complete data file or a partial / delta data file. Lockstep recommends
29
+ # using a sliding time window to avoid the risk of clock skew errors that might accidentally omit records.
30
+ # Best practice is to run a Sync process daily, and to export all data that has changed in the past 48 hours.
24
31
  class SyncSubmitModel
25
32
 
26
33
  ##
@@ -30,7 +37,7 @@ module LockstepSdk
30
37
  end
31
38
 
32
39
  ##
33
- # @return [Uuid] The identifier of the app enrollment
40
+ # @return [Uuid] The unique identifier of the app enrollment that is creating this sync request.
34
41
  attr_accessor :app_enrollment_id
35
42
 
36
43
  ##
@@ -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
 
@@ -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
 
@@ -0,0 +1,49 @@
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
+ # Represents a Uri for download link
23
+ class UriModel
24
+
25
+ ##
26
+ # Initialize the UriModel using the provided prototype
27
+ def initialize(params = {})
28
+ @download_link = params.dig(:download_link)
29
+ end
30
+
31
+ ##
32
+ # @return [Uri] Represents the download link
33
+ attr_accessor :download_link
34
+
35
+ ##
36
+ # @return [object] This object as a JSON key-value structure
37
+ def as_json(options={})
38
+ {
39
+ 'downloadLink' => @download_link,
40
+ }
41
+ end
42
+
43
+ ##
44
+ # @return [String] This object converted to a JSON string
45
+ def to_json(*options)
46
+ "[#{as_json(*options).to_json(*options)}]"
47
+ end
48
+ end
49
+ 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
 
@@ -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
 
@@ -0,0 +1,137 @@
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
+ # A Webhook is a subscription to receive notifications automatically to the supplied
23
+ # callback url when changes are made to a supported object.
24
+ #
25
+ # Currently supported objects:
26
+ # * `SyncRequest` - Receive a notification when a new sync request has completed for the group key.
27
+ class WebhookModel
28
+
29
+ ##
30
+ # Initialize the WebhookModel using the provided prototype
31
+ def initialize(params = {})
32
+ @webhook_id = params.dig(:webhook_id)
33
+ @group_key = params.dig(:group_key)
34
+ @name = params.dig(:name)
35
+ @status_code = params.dig(:status_code)
36
+ @status_message = params.dig(:status_message)
37
+ @client_secret = params.dig(:client_secret)
38
+ @request_content_type = params.dig(:request_content_type)
39
+ @callback_http_method = params.dig(:callback_http_method)
40
+ @callback_url = params.dig(:callback_url)
41
+ @expiration_date = params.dig(:expiration_date)
42
+ @retry_count = params.dig(:retry_count)
43
+ @created = params.dig(:created)
44
+ @created_user_id = params.dig(:created_user_id)
45
+ @modified = params.dig(:modified)
46
+ @modified_user_id = params.dig(:modified_user_id)
47
+ end
48
+
49
+ ##
50
+ # @return [Uuid] The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
51
+ attr_accessor :webhook_id
52
+
53
+ ##
54
+ # @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).
55
+ attr_accessor :group_key
56
+
57
+ ##
58
+ # @return [String] A name for the webhook subscription.
59
+ attr_accessor :name
60
+
61
+ ##
62
+ # @return [String] The status of the webhook (Active, Inactive, Errored).
63
+ attr_accessor :status_code
64
+
65
+ ##
66
+ # @return [String] When the StatusCode is set to Errored a message is supplied for why it was errored.
67
+ attr_accessor :status_message
68
+
69
+ ##
70
+ # @return [String] An secret set during webhook creation that can be used to verify that the notification is coming from the Lockstep API.
71
+ attr_accessor :client_secret
72
+
73
+ ##
74
+ # @return [String] The format of the content to be returned in the webhook notifications. Options TBD.
75
+ attr_accessor :request_content_type
76
+
77
+ ##
78
+ # @return [String] The HTTP Method to be used on the callback URL for use in notifications (GET, POST, PATCH, PUT).
79
+ attr_accessor :callback_http_method
80
+
81
+ ##
82
+ # @return [Uri] The URL where the notification will be sent via the method set in CallbackHttpMethod. When creating a webhook, the Lockstep API will make a call to this url via the method set in the CallbackHttpMethod property with a query parameter of "code" set to an encoded string. To successfully create the webhook, the call must return a successful status code with the query parameter's value as the plain text content.
83
+ attr_accessor :callback_url
84
+
85
+ ##
86
+ # @return [Date-time] The expiration date for the given webhook subscription. Once the expiration date passes, notifications will no longer be sent to the callback url.
87
+ attr_accessor :expiration_date
88
+
89
+ ##
90
+ # @return [Int32] The amount of times a notification should be retried before marking the webhook as errored.
91
+ attr_accessor :retry_count
92
+
93
+ ##
94
+ # @return [Date-time] The date this webhook was created
95
+ attr_accessor :created
96
+
97
+ ##
98
+ # @return [Uuid] The ID of the user who created this webhook
99
+ attr_accessor :created_user_id
100
+
101
+ ##
102
+ # @return [Date-time] The date this webhook was last modified
103
+ attr_accessor :modified
104
+
105
+ ##
106
+ # @return [Uuid] The ID of the user who last modified this webhook
107
+ attr_accessor :modified_user_id
108
+
109
+ ##
110
+ # @return [object] This object as a JSON key-value structure
111
+ def as_json(options={})
112
+ {
113
+ 'webhookId' => @webhook_id,
114
+ 'groupKey' => @group_key,
115
+ 'name' => @name,
116
+ 'statusCode' => @status_code,
117
+ 'statusMessage' => @status_message,
118
+ 'clientSecret' => @client_secret,
119
+ 'requestContentType' => @request_content_type,
120
+ 'callbackHttpMethod' => @callback_http_method,
121
+ 'callbackUrl' => @callback_url,
122
+ 'expirationDate' => @expiration_date,
123
+ 'retryCount' => @retry_count,
124
+ 'created' => @created,
125
+ 'createdUserId' => @created_user_id,
126
+ 'modified' => @modified,
127
+ 'modifiedUserId' => @modified_user_id,
128
+ }
129
+ end
130
+
131
+ ##
132
+ # @return [String] This object converted to a JSON string
133
+ def to_json(*options)
134
+ "[#{as_json(*options).to_json(*options)}]"
135
+ end
136
+ end
137
+ end
@@ -1,3 +1,3 @@
1
1
  module LockstepSdk
2
- VERSION = "2022.4.32.0"
2
+ VERSION = "2022.6.49.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockstep_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2022.4.32.0
4
+ version: 2022.6.49.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lockstep
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-28 00:00:00.000000000 Z
11
+ date: 2022-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awrence
@@ -58,6 +58,7 @@ files:
58
58
  - lib/lockstep_sdk/clients/sync_client.rb
59
59
  - lib/lockstep_sdk/clients/user_accounts_client.rb
60
60
  - lib/lockstep_sdk/clients/user_roles_client.rb
61
+ - lib/lockstep_sdk/clients/webhooks_client.rb
61
62
  - lib/lockstep_sdk/lockstep_api.rb
62
63
  - lib/lockstep_sdk/models/activity_model.rb
63
64
  - lib/lockstep_sdk/models/activity_stream_item_model.rb
@@ -72,18 +73,23 @@ files:
72
73
  - lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb
73
74
  - lib/lockstep_sdk/models/attachment_header_info_model.rb
74
75
  - lib/lockstep_sdk/models/attachment_model.rb
76
+ - lib/lockstep_sdk/models/batch_sync_model.rb
75
77
  - lib/lockstep_sdk/models/bulk_currency_conversion_model.rb
76
78
  - lib/lockstep_sdk/models/cashflow_report_model.rb
77
79
  - lib/lockstep_sdk/models/code_definition_model.rb
78
80
  - lib/lockstep_sdk/models/company_model.rb
81
+ - lib/lockstep_sdk/models/company_sync_model.rb
79
82
  - lib/lockstep_sdk/models/connector_info_model.rb
80
83
  - lib/lockstep_sdk/models/contact_model.rb
84
+ - lib/lockstep_sdk/models/contact_sync_model.rb
81
85
  - lib/lockstep_sdk/models/country_model.rb
82
86
  - lib/lockstep_sdk/models/credit_memo_applied_model.rb
87
+ - lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb
83
88
  - lib/lockstep_sdk/models/credit_memo_invoice_model.rb
84
89
  - lib/lockstep_sdk/models/currency_model.rb
85
90
  - lib/lockstep_sdk/models/currency_rate_model.rb
86
91
  - lib/lockstep_sdk/models/custom_field_definition_model.rb
92
+ - lib/lockstep_sdk/models/custom_field_sync_model.rb
87
93
  - lib/lockstep_sdk/models/custom_field_value_model.rb
88
94
  - lib/lockstep_sdk/models/customer_details_model.rb
89
95
  - lib/lockstep_sdk/models/customer_details_payment_model.rb
@@ -100,16 +106,20 @@ files:
100
106
  - lib/lockstep_sdk/models/invoice_address_model.rb
101
107
  - lib/lockstep_sdk/models/invoice_history_model.rb
102
108
  - lib/lockstep_sdk/models/invoice_line_model.rb
109
+ - lib/lockstep_sdk/models/invoice_line_sync_model.rb
103
110
  - lib/lockstep_sdk/models/invoice_model.rb
104
111
  - lib/lockstep_sdk/models/invoice_payment_detail_model.rb
105
112
  - lib/lockstep_sdk/models/invoice_summary_model.rb
113
+ - lib/lockstep_sdk/models/invoice_sync_model.rb
106
114
  - lib/lockstep_sdk/models/lead_model.rb
107
115
  - lib/lockstep_sdk/models/note_model.rb
108
116
  - lib/lockstep_sdk/models/payment_applied_model.rb
117
+ - lib/lockstep_sdk/models/payment_applied_sync_model.rb
109
118
  - lib/lockstep_sdk/models/payment_detail_header_model.rb
110
119
  - lib/lockstep_sdk/models/payment_detail_model.rb
111
120
  - lib/lockstep_sdk/models/payment_model.rb
112
121
  - lib/lockstep_sdk/models/payment_summary_model.rb
122
+ - lib/lockstep_sdk/models/payment_sync_model.rb
113
123
  - lib/lockstep_sdk/models/provisioning_finalize_request_model.rb
114
124
  - lib/lockstep_sdk/models/provisioning_model.rb
115
125
  - lib/lockstep_sdk/models/provisioning_response_model.rb
@@ -121,8 +131,10 @@ files:
121
131
  - lib/lockstep_sdk/models/sync_submit_model.rb
122
132
  - lib/lockstep_sdk/models/transfer_owner_model.rb
123
133
  - lib/lockstep_sdk/models/transfer_owner_submit_model.rb
134
+ - lib/lockstep_sdk/models/uri_model.rb
124
135
  - lib/lockstep_sdk/models/user_account_model.rb
125
136
  - lib/lockstep_sdk/models/user_role_model.rb
137
+ - lib/lockstep_sdk/models/webhook_model.rb
126
138
  - lib/lockstep_sdk/version.rb
127
139
  homepage: https://developer.lockstep.io
128
140
  licenses: