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.
Files changed (94) hide show
  1. checksums.yaml +7 -0
  2. data/lib/lockstep_sdk/clients/activities_client.rb +119 -0
  3. data/lib/lockstep_sdk/clients/api_keys_client.rb +78 -0
  4. data/lib/lockstep_sdk/clients/app_enrollments_client.rb +121 -0
  5. data/lib/lockstep_sdk/clients/applications_client.rb +100 -0
  6. data/lib/lockstep_sdk/clients/attachments_client.rb +121 -0
  7. data/lib/lockstep_sdk/clients/code_definitions_client.rb +60 -0
  8. data/lib/lockstep_sdk/clients/companies_client.rb +123 -0
  9. data/lib/lockstep_sdk/clients/contacts_client.rb +90 -0
  10. data/lib/lockstep_sdk/clients/credit_memo_applied_client.rb +92 -0
  11. data/lib/lockstep_sdk/clients/currencies_client.rb +55 -0
  12. data/lib/lockstep_sdk/clients/custom_field_definitions_client.rb +94 -0
  13. data/lib/lockstep_sdk/clients/custom_field_values_client.rb +97 -0
  14. data/lib/lockstep_sdk/clients/definitions_client.rb +95 -0
  15. data/lib/lockstep_sdk/clients/emails_client.rb +108 -0
  16. data/lib/lockstep_sdk/clients/invoice_history_client.rb +56 -0
  17. data/lib/lockstep_sdk/clients/invoices_client.rb +126 -0
  18. data/lib/lockstep_sdk/clients/leads_client.rb +40 -0
  19. data/lib/lockstep_sdk/clients/notes_client.rb +84 -0
  20. data/lib/lockstep_sdk/clients/payment_applications_client.rb +92 -0
  21. data/lib/lockstep_sdk/clients/payments_client.rb +138 -0
  22. data/lib/lockstep_sdk/clients/provisioning_client.rb +56 -0
  23. data/lib/lockstep_sdk/clients/reports_client.rb +114 -0
  24. data/lib/lockstep_sdk/clients/status_client.rb +53 -0
  25. data/lib/lockstep_sdk/clients/sync_client.rb +97 -0
  26. data/lib/lockstep_sdk/clients/user_accounts_client.rb +127 -0
  27. data/lib/lockstep_sdk/clients/user_roles_client.rb +54 -0
  28. data/lib/lockstep_sdk/lockstep_api.rb +264 -0
  29. data/lib/lockstep_sdk/models/activity_model.rb +221 -0
  30. data/lib/lockstep_sdk/models/activity_stream_item_model.rb +104 -0
  31. data/lib/lockstep_sdk/models/activity_xref_model.rb +72 -0
  32. data/lib/lockstep_sdk/models/aging_model.rb +62 -0
  33. data/lib/lockstep_sdk/models/api_key_model.rb +116 -0
  34. data/lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb +110 -0
  35. data/lib/lockstep_sdk/models/app_enrollment_model.rb +151 -0
  36. data/lib/lockstep_sdk/models/application_model.rb +166 -0
  37. data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +86 -0
  38. data/lib/lockstep_sdk/models/ar_header_info_model.rb +170 -0
  39. data/lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb +140 -0
  40. data/lib/lockstep_sdk/models/attachment_header_info_model.rb +74 -0
  41. data/lib/lockstep_sdk/models/attachment_model.rb +122 -0
  42. data/lib/lockstep_sdk/models/bulk_currency_conversion_model.rb +56 -0
  43. data/lib/lockstep_sdk/models/cashflow_report_model.rb +74 -0
  44. data/lib/lockstep_sdk/models/code_definition_model.rb +99 -0
  45. data/lib/lockstep_sdk/models/company_model.rb +336 -0
  46. data/lib/lockstep_sdk/models/connector_info_model.rb +69 -0
  47. data/lib/lockstep_sdk/models/contact_model.rb +227 -0
  48. data/lib/lockstep_sdk/models/country_model.rb +116 -0
  49. data/lib/lockstep_sdk/models/credit_memo_applied_model.rb +150 -0
  50. data/lib/lockstep_sdk/models/credit_memo_invoice_model.rb +116 -0
  51. data/lib/lockstep_sdk/models/currency_model.rb +74 -0
  52. data/lib/lockstep_sdk/models/currency_rate_model.rb +68 -0
  53. data/lib/lockstep_sdk/models/custom_field_definition_model.rb +121 -0
  54. data/lib/lockstep_sdk/models/custom_field_value_model.rb +115 -0
  55. data/lib/lockstep_sdk/models/customer_details_model.rb +164 -0
  56. data/lib/lockstep_sdk/models/customer_details_payment_model.rb +104 -0
  57. data/lib/lockstep_sdk/models/customer_summary_model.rb +134 -0
  58. data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +62 -0
  59. data/lib/lockstep_sdk/models/developer_account_submit_model.rb +62 -0
  60. data/lib/lockstep_sdk/models/email_model.rb +245 -0
  61. data/lib/lockstep_sdk/models/erp_info_data_model.rb +63 -0
  62. data/lib/lockstep_sdk/models/erp_info_model.rb +56 -0
  63. data/lib/lockstep_sdk/models/erp_model.rb +62 -0
  64. data/lib/lockstep_sdk/models/invite_data_model.rb +56 -0
  65. data/lib/lockstep_sdk/models/invite_model.rb +68 -0
  66. data/lib/lockstep_sdk/models/invite_submit_model.rb +50 -0
  67. data/lib/lockstep_sdk/models/invoice_address_model.rb +140 -0
  68. data/lib/lockstep_sdk/models/invoice_history_model.rb +238 -0
  69. data/lib/lockstep_sdk/models/invoice_line_model.rb +194 -0
  70. data/lib/lockstep_sdk/models/invoice_model.rb +325 -0
  71. data/lib/lockstep_sdk/models/invoice_payment_detail_model.rb +104 -0
  72. data/lib/lockstep_sdk/models/invoice_summary_model.rb +134 -0
  73. data/lib/lockstep_sdk/models/lead_model.rb +74 -0
  74. data/lib/lockstep_sdk/models/note_model.rb +121 -0
  75. data/lib/lockstep_sdk/models/payment_applied_model.rb +131 -0
  76. data/lib/lockstep_sdk/models/payment_detail_header_model.rb +80 -0
  77. data/lib/lockstep_sdk/models/payment_detail_model.rb +176 -0
  78. data/lib/lockstep_sdk/models/payment_model.rb +206 -0
  79. data/lib/lockstep_sdk/models/payment_summary_model.rb +128 -0
  80. data/lib/lockstep_sdk/models/provisioning_finalize_request_model.rb +74 -0
  81. data/lib/lockstep_sdk/models/provisioning_model.rb +74 -0
  82. data/lib/lockstep_sdk/models/provisioning_response_model.rb +86 -0
  83. data/lib/lockstep_sdk/models/risk_rate_model.rb +98 -0
  84. data/lib/lockstep_sdk/models/state_model.rb +62 -0
  85. data/lib/lockstep_sdk/models/status_model.rb +128 -0
  86. data/lib/lockstep_sdk/models/sync_entity_result_model.rb +74 -0
  87. data/lib/lockstep_sdk/models/sync_request_model.rb +98 -0
  88. data/lib/lockstep_sdk/models/sync_submit_model.rb +50 -0
  89. data/lib/lockstep_sdk/models/transfer_owner_model.rb +56 -0
  90. data/lib/lockstep_sdk/models/transfer_owner_submit_model.rb +50 -0
  91. data/lib/lockstep_sdk/models/user_account_model.rb +240 -0
  92. data/lib/lockstep_sdk/models/user_role_model.rb +86 -0
  93. data/lib/lockstep_sdk/version.rb +3 -0
  94. metadata +150 -0
@@ -0,0 +1,176 @@
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
+ # Contains detailed information about a Payment.
24
+ class PaymentDetailModel
25
+
26
+ ##
27
+ # Initialize the PaymentDetailModel using the provided prototype
28
+ def initialize(params = {})
29
+ @group_key = params.dig(:group_key)
30
+ @payment_id = params.dig(:payment_id)
31
+ @customer_id = params.dig(:customer_id)
32
+ @customer_name = params.dig(:customer_name)
33
+ @memo_text = params.dig(:memo_text)
34
+ @reference_code = params.dig(:reference_code)
35
+ @primary_contact = params.dig(:primary_contact)
36
+ @email = params.dig(:email)
37
+ @payment_amount = params.dig(:payment_amount)
38
+ @unapplied_amount = params.dig(:unapplied_amount)
39
+ @payment_type = params.dig(:payment_type)
40
+ @payment_date = params.dig(:payment_date)
41
+ @post_date = params.dig(:post_date)
42
+ @phone = params.dig(:phone)
43
+ @fax = params.dig(:fax)
44
+ @address1 = params.dig(:address1)
45
+ @address2 = params.dig(:address2)
46
+ @address3 = params.dig(:address3)
47
+ @city = params.dig(:city)
48
+ @state_region = params.dig(:state_region)
49
+ @postal_code = params.dig(:postal_code)
50
+ @country_code = params.dig(:country_code)
51
+ end
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 [Uuid] The unique ID of this Payment.
59
+ attr_accessor :payment_id
60
+
61
+ ##
62
+ # @return [Uuid] The ID of the customer to which this Payment belongs.
63
+ attr_accessor :customer_id
64
+
65
+ ##
66
+ # @return [String] The name of the customer to which this Payment belongs.
67
+ attr_accessor :customer_name
68
+
69
+ ##
70
+ # @return [String] Memo or reference text (ex. memo field on a check).
71
+ attr_accessor :memo_text
72
+
73
+ ##
74
+ # @return [String] Reference code for the payment for the given Erp system.
75
+ attr_accessor :reference_code
76
+
77
+ ##
78
+ # @return [String] The name of the Primary Contact for the Customer.
79
+ attr_accessor :primary_contact
80
+
81
+ ##
82
+ # @return [String] The Email address of the Customer.
83
+ attr_accessor :email
84
+
85
+ ##
86
+ # @return [Double] Total amount of this Payment.
87
+ attr_accessor :payment_amount
88
+
89
+ ##
90
+ # @return [Double] Unapplied balance of this Payment.
91
+ attr_accessor :unapplied_amount
92
+
93
+ ##
94
+ # @return [String] The type of payment, Payment or AP Payment.
95
+ attr_accessor :payment_type
96
+
97
+ ##
98
+ # @return [Date] The date of this Payment.
99
+ attr_accessor :payment_date
100
+
101
+ ##
102
+ # @return [Date] Payment post date.
103
+ attr_accessor :post_date
104
+
105
+ ##
106
+ # @return [String] The phone number of the Customer's Primary Contact.
107
+ attr_accessor :phone
108
+
109
+ ##
110
+ # @return [String] The fax number of the Customer's Primary Contact.
111
+ attr_accessor :fax
112
+
113
+ ##
114
+ # @return [String] The first line of the address for the Customer's Primary Contact.
115
+ attr_accessor :address1
116
+
117
+ ##
118
+ # @return [String] The second line of the address for the Customer's Primary Contact.
119
+ attr_accessor :address2
120
+
121
+ ##
122
+ # @return [String] The third line of the address for the Customer's Primary Contact.
123
+ attr_accessor :address3
124
+
125
+ ##
126
+ # @return [String] The city of the address for the Customer's Primary Contact.
127
+ attr_accessor :city
128
+
129
+ ##
130
+ # @return [String] The state/region of the address for the Customer's Primary Contact.
131
+ attr_accessor :state_region
132
+
133
+ ##
134
+ # @return [String] The postal/zip code of the address for the Customer's Primary Contact.
135
+ attr_accessor :postal_code
136
+
137
+ ##
138
+ # @return [String] The 2 character country code of the address for the Customer's Primary Contact.
139
+ attr_accessor :country_code
140
+
141
+ ##
142
+ # @return [object] This object as a JSON key-value structure
143
+ def as_json(options={})
144
+ {
145
+ 'groupKey' => @group_key,
146
+ 'paymentId' => @payment_id,
147
+ 'customerId' => @customer_id,
148
+ 'customerName' => @customer_name,
149
+ 'memoText' => @memo_text,
150
+ 'referenceCode' => @reference_code,
151
+ 'primaryContact' => @primary_contact,
152
+ 'email' => @email,
153
+ 'paymentAmount' => @payment_amount,
154
+ 'unappliedAmount' => @unapplied_amount,
155
+ 'paymentType' => @payment_type,
156
+ 'paymentDate' => @payment_date,
157
+ 'postDate' => @post_date,
158
+ 'phone' => @phone,
159
+ 'fax' => @fax,
160
+ 'address1' => @address1,
161
+ 'address2' => @address2,
162
+ 'address3' => @address3,
163
+ 'city' => @city,
164
+ 'stateRegion' => @state_region,
165
+ 'postalCode' => @postal_code,
166
+ 'countryCode' => @country_code,
167
+ }
168
+ end
169
+
170
+ ##
171
+ # @return [String] This object converted to a JSON string
172
+ def to_json(*options)
173
+ "[#{as_json(*options).to_json(*options)}]"
174
+ end
175
+ end
176
+ end
@@ -0,0 +1,206 @@
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
+ # A Payment represents money sent from one company to another. A single payment may contain payments for
24
+ # one or more invoices; it is also possible for payments to be made in advance of an invoice, for example,
25
+ # as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of
26
+ # the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a
27
+ # Lockstep Platform ID number and a customer ERP "key" that was generated by the system that originated
28
+ # the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which
29
+ # represents a deposit that has been paid and not yet applied to an Invoice.
30
+ class PaymentModel
31
+
32
+ ##
33
+ # Initialize the PaymentModel using the provided prototype
34
+ def initialize(params = {})
35
+ @group_key = params.dig(:group_key)
36
+ @payment_id = params.dig(:payment_id)
37
+ @company_id = params.dig(:company_id)
38
+ @erp_key = params.dig(:erp_key)
39
+ @payment_type = params.dig(:payment_type)
40
+ @tender_type = params.dig(:tender_type)
41
+ @is_open = params.dig(:is_open)
42
+ @memo_text = params.dig(:memo_text)
43
+ @payment_date = params.dig(:payment_date)
44
+ @post_date = params.dig(:post_date)
45
+ @payment_amount = params.dig(:payment_amount)
46
+ @unapplied_amount = params.dig(:unapplied_amount)
47
+ @currency_code = params.dig(:currency_code)
48
+ @reference_code = params.dig(:reference_code)
49
+ @created = params.dig(:created)
50
+ @created_user_id = params.dig(:created_user_id)
51
+ @modified = params.dig(:modified)
52
+ @modified_user_id = params.dig(:modified_user_id)
53
+ @app_enrollment_id = params.dig(:app_enrollment_id)
54
+ @is_voided = params.dig(:is_voided)
55
+ @in_dispute = params.dig(:in_dispute)
56
+ @applications = params.dig(:applications)
57
+ @notes = params.dig(:notes)
58
+ @attachments = params.dig(:attachments)
59
+ @custom_field_definitions = params.dig(:custom_field_definitions)
60
+ @custom_field_values = params.dig(:custom_field_values)
61
+ end
62
+
63
+ ##
64
+ # @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).
65
+ attr_accessor :group_key
66
+
67
+ ##
68
+ # @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`.
69
+ attr_accessor :payment_id
70
+
71
+ ##
72
+ # @return [Uuid] The ID of the company to which this payment belongs.
73
+ attr_accessor :company_id
74
+
75
+ ##
76
+ # @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).
77
+ attr_accessor :erp_key
78
+
79
+ ##
80
+ # @return [String] The type of payment, cash or check.
81
+ attr_accessor :payment_type
82
+
83
+ ##
84
+ # @return [String] Cash, check, credit card, wire transfer.
85
+ attr_accessor :tender_type
86
+
87
+ ##
88
+ # @return [Boolean] Has the payment been fully applied?
89
+ attr_accessor :is_open
90
+
91
+ ##
92
+ # @return [String] Memo or reference text (ex. memo field on a check).
93
+ attr_accessor :memo_text
94
+
95
+ ##
96
+ # @return [Date] The date of this payment.
97
+ attr_accessor :payment_date
98
+
99
+ ##
100
+ # @return [Date] Payment post date.
101
+ attr_accessor :post_date
102
+
103
+ ##
104
+ # @return [Double] Total amount of this payment.
105
+ attr_accessor :payment_amount
106
+
107
+ ##
108
+ # @return [Double] Unapplied balance of this payment.
109
+ attr_accessor :unapplied_amount
110
+
111
+ ##
112
+ # @return [String] Currency of the payment. This will be validated by the /api/v1/currencies data set
113
+ attr_accessor :currency_code
114
+
115
+ ##
116
+ # @return [String] Reference code for the payment for the given Erp system.
117
+ attr_accessor :reference_code
118
+
119
+ ##
120
+ # @return [Date-time] The date on which this record was created.
121
+ attr_accessor :created
122
+
123
+ ##
124
+ # @return [Uuid] The ID of the user who created this payment.
125
+ attr_accessor :created_user_id
126
+
127
+ ##
128
+ # @return [Date-time] The date on which this record was last modified.
129
+ attr_accessor :modified
130
+
131
+ ##
132
+ # @return [Uuid] The ID of the user who last modified this payment.
133
+ attr_accessor :modified_user_id
134
+
135
+ ##
136
+ # @return [Uuid] AppEnrollmentId for this record; used for mapping purposes.
137
+ attr_accessor :app_enrollment_id
138
+
139
+ ##
140
+ # @return [Boolean] Is the payment voided?
141
+ attr_accessor :is_voided
142
+
143
+ ##
144
+ # @return [Boolean] Is the payment in dispute?
145
+ attr_accessor :in_dispute
146
+
147
+ ##
148
+ # @return [PaymentAppliedModel] All applications this payment is associated with. To retrieve this collection, specify `Applications` in the "Include" parameter for your query.
149
+ attr_accessor :applications
150
+
151
+ ##
152
+ # @return [NoteModel] All notes attached to this payment. To retrieve this collection, specify `Notes` in the "Include" parameter for your query.
153
+ attr_accessor :notes
154
+
155
+ ##
156
+ # @return [AttachmentModel] All attachments attached to this payment. To retrieve this collection, specify `Attachments` in the "Include" parameter for your query.
157
+ attr_accessor :attachments
158
+
159
+ ##
160
+ # @return [CustomFieldDefinitionModel] All definitions attached to this payment. To retrieve this collection, specify `CustomFieldValues` in the "Include" parameter for your query.
161
+ attr_accessor :custom_field_definitions
162
+
163
+ ##
164
+ # @return [CustomFieldValueModel] All values attached to this payment. To retrieve this collection, specify `CustomFieldValues` in the "Include" parameter for your query.
165
+ attr_accessor :custom_field_values
166
+
167
+ ##
168
+ # @return [object] This object as a JSON key-value structure
169
+ def as_json(options={})
170
+ {
171
+ 'groupKey' => @group_key,
172
+ 'paymentId' => @payment_id,
173
+ 'companyId' => @company_id,
174
+ 'erpKey' => @erp_key,
175
+ 'paymentType' => @payment_type,
176
+ 'tenderType' => @tender_type,
177
+ 'isOpen' => @is_open,
178
+ 'memoText' => @memo_text,
179
+ 'paymentDate' => @payment_date,
180
+ 'postDate' => @post_date,
181
+ 'paymentAmount' => @payment_amount,
182
+ 'unappliedAmount' => @unapplied_amount,
183
+ 'currencyCode' => @currency_code,
184
+ 'referenceCode' => @reference_code,
185
+ 'created' => @created,
186
+ 'createdUserId' => @created_user_id,
187
+ 'modified' => @modified,
188
+ 'modifiedUserId' => @modified_user_id,
189
+ 'appEnrollmentId' => @app_enrollment_id,
190
+ 'isVoided' => @is_voided,
191
+ 'inDispute' => @in_dispute,
192
+ 'applications' => @applications,
193
+ 'notes' => @notes,
194
+ 'attachments' => @attachments,
195
+ 'customFieldDefinitions' => @custom_field_definitions,
196
+ 'customFieldValues' => @custom_field_values,
197
+ }
198
+ end
199
+
200
+ ##
201
+ # @return [String] This object converted to a JSON string
202
+ def to_json(*options)
203
+ "[#{as_json(*options).to_json(*options)}]"
204
+ end
205
+ end
206
+ end
@@ -0,0 +1,128 @@
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
+ # Contains summary information for a Payment
24
+ class PaymentSummaryModel
25
+
26
+ ##
27
+ # Initialize the PaymentSummaryModel using the provided prototype
28
+ def initialize(params = {})
29
+ @group_key = params.dig(:group_key)
30
+ @payment_id = params.dig(:payment_id)
31
+ @memo_text = params.dig(:memo_text)
32
+ @reference_code = params.dig(:reference_code)
33
+ @payment_type = params.dig(:payment_type)
34
+ @payment_date = params.dig(:payment_date)
35
+ @payment_amount = params.dig(:payment_amount)
36
+ @unapplied_amount = params.dig(:unapplied_amount)
37
+ @invoice_count = params.dig(:invoice_count)
38
+ @total_payments_applied = params.dig(:total_payments_applied)
39
+ @invoice_list = params.dig(:invoice_list)
40
+ @invoice_id_list = params.dig(:invoice_id_list)
41
+ @customer_name = params.dig(:customer_name)
42
+ @customer_id = params.dig(:customer_id)
43
+ end
44
+
45
+ ##
46
+ # @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).
47
+ attr_accessor :group_key
48
+
49
+ ##
50
+ # @return [Uuid] The id of the payment
51
+ attr_accessor :payment_id
52
+
53
+ ##
54
+ # @return [String] Memo or reference text (ex. memo field on a check).
55
+ attr_accessor :memo_text
56
+
57
+ ##
58
+ # @return [String] Reference code for the payment for the given Erp system.
59
+ attr_accessor :reference_code
60
+
61
+ ##
62
+ # @return [String] The type of payment, Payment or AP Payment.
63
+ attr_accessor :payment_type
64
+
65
+ ##
66
+ # @return [Date] The date of this payment.
67
+ attr_accessor :payment_date
68
+
69
+ ##
70
+ # @return [Double] Total amount of this payment.
71
+ attr_accessor :payment_amount
72
+
73
+ ##
74
+ # @return [Double] Unapplied balance of this payment.
75
+ attr_accessor :unapplied_amount
76
+
77
+ ##
78
+ # @return [Int32] The number of invoices associated to this payment.
79
+ attr_accessor :invoice_count
80
+
81
+ ##
82
+ # @return [Double] The number of payments applied to this payment.
83
+ attr_accessor :total_payments_applied
84
+
85
+ ##
86
+ # @return [String] The reference codes of the invoices associated to this payment.
87
+ attr_accessor :invoice_list
88
+
89
+ ##
90
+ # @return [Uuid] The ids of the invoices associated to this payment.
91
+ attr_accessor :invoice_id_list
92
+
93
+ ##
94
+ # @return [String] The name of the customer for this payment.
95
+ attr_accessor :customer_name
96
+
97
+ ##
98
+ # @return [Uuid] The id of the customer for this payment.
99
+ attr_accessor :customer_id
100
+
101
+ ##
102
+ # @return [object] This object as a JSON key-value structure
103
+ def as_json(options={})
104
+ {
105
+ 'groupKey' => @group_key,
106
+ 'paymentId' => @payment_id,
107
+ 'memoText' => @memo_text,
108
+ 'referenceCode' => @reference_code,
109
+ 'paymentType' => @payment_type,
110
+ 'paymentDate' => @payment_date,
111
+ 'paymentAmount' => @payment_amount,
112
+ 'unappliedAmount' => @unapplied_amount,
113
+ 'invoiceCount' => @invoice_count,
114
+ 'totalPaymentsApplied' => @total_payments_applied,
115
+ 'invoiceList' => @invoice_list,
116
+ 'invoiceIdList' => @invoice_id_list,
117
+ 'customerName' => @customer_name,
118
+ 'customerId' => @customer_id,
119
+ }
120
+ end
121
+
122
+ ##
123
+ # @return [String] This object converted to a JSON string
124
+ def to_json(*options)
125
+ "[#{as_json(*options).to_json(*options)}]"
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,74 @@
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 the data to finalize onboarding for a user
24
+ class ProvisioningFinalizeRequestModel
25
+
26
+ ##
27
+ # Initialize the ProvisioningFinalizeRequestModel using the provided prototype
28
+ def initialize(params = {})
29
+ @full_name = params.dig(:full_name)
30
+ @time_zone = params.dig(:time_zone)
31
+ @default_currency = params.dig(:default_currency)
32
+ @company = params.dig(:company)
33
+ @email_connector = params.dig(:email_connector)
34
+ end
35
+
36
+ ##
37
+ # @return [String] The full name of the user
38
+ attr_accessor :full_name
39
+
40
+ ##
41
+ # @return [String] The time zone of the user
42
+ attr_accessor :time_zone
43
+
44
+ ##
45
+ # @return [String] The default currency of the user
46
+ attr_accessor :default_currency
47
+
48
+ ##
49
+ # @return [CompanyModel] The company information for the user and group
50
+ attr_accessor :company
51
+
52
+ ##
53
+ # @return [ErpInfoModel] Optional connector information needed to enroll user to their email connector
54
+ attr_accessor :email_connector
55
+
56
+ ##
57
+ # @return [object] This object as a JSON key-value structure
58
+ def as_json(options={})
59
+ {
60
+ 'fullName' => @full_name,
61
+ 'timeZone' => @time_zone,
62
+ 'defaultCurrency' => @default_currency,
63
+ 'company' => @company,
64
+ 'emailConnector' => @email_connector,
65
+ }
66
+ end
67
+
68
+ ##
69
+ # @return [String] This object converted to a JSON string
70
+ def to_json(*options)
71
+ "[#{as_json(*options).to_json(*options)}]"
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,74 @@
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 the data sent during the onboarding flow
24
+ class ProvisioningModel
25
+
26
+ ##
27
+ # Initialize the ProvisioningModel using the provided prototype
28
+ def initialize(params = {})
29
+ @full_name = params.dig(:full_name)
30
+ @time_zone = params.dig(:time_zone)
31
+ @default_currency = params.dig(:default_currency)
32
+ @erp = params.dig(:erp)
33
+ @company = params.dig(:company)
34
+ end
35
+
36
+ ##
37
+ # @return [String] The full name of the new user
38
+ attr_accessor :full_name
39
+
40
+ ##
41
+ # @return [String] The time zone of the new user
42
+ attr_accessor :time_zone
43
+
44
+ ##
45
+ # @return [String] The default currency of the new user
46
+ attr_accessor :default_currency
47
+
48
+ ##
49
+ # @return [ErpInfoModel] The information necessary to enroll the user in their ERP
50
+ attr_accessor :erp
51
+
52
+ ##
53
+ # @return [CompanyModel] The company information for the new user and group
54
+ attr_accessor :company
55
+
56
+ ##
57
+ # @return [object] This object as a JSON key-value structure
58
+ def as_json(options={})
59
+ {
60
+ 'fullName' => @full_name,
61
+ 'timeZone' => @time_zone,
62
+ 'defaultCurrency' => @default_currency,
63
+ 'erp' => @erp,
64
+ 'company' => @company,
65
+ }
66
+ end
67
+
68
+ ##
69
+ # @return [String] This object converted to a JSON string
70
+ def to_json(*options)
71
+ "[#{as_json(*options).to_json(*options)}]"
72
+ end
73
+ end
74
+ end