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,170 @@
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
+ # Aggregated Accounts Receivable information.
24
+ class ArHeaderInfoModel
25
+
26
+ ##
27
+ # Initialize the ArHeaderInfoModel using the provided prototype
28
+ def initialize(params = {})
29
+ @group_key = params.dig(:group_key)
30
+ @report_period = params.dig(:report_period)
31
+ @total_customers = params.dig(:total_customers)
32
+ @total_invoices = params.dig(:total_invoices)
33
+ @total_invoiced_amount = params.dig(:total_invoiced_amount)
34
+ @total_unapplied_payments = params.dig(:total_unapplied_payments)
35
+ @total_collected = params.dig(:total_collected)
36
+ @total_ar_amount = params.dig(:total_ar_amount)
37
+ @total_invoices_paid = params.dig(:total_invoices_paid)
38
+ @total_invoices_past_due = params.dig(:total_invoices_past_due)
39
+ @total_invoices90_days_past_due = params.dig(:total_invoices90_days_past_due)
40
+ @total_past_due_amount = params.dig(:total_past_due_amount)
41
+ @total_past_due_amount90_days = params.dig(:total_past_due_amount90_days)
42
+ @percentage_of_total_ar = params.dig(:percentage_of_total_ar)
43
+ @dso = params.dig(:dso)
44
+ @total_invoice_amount_current_year = params.dig(:total_invoice_amount_current_year)
45
+ @total_invoice_amount_previous_year = params.dig(:total_invoice_amount_previous_year)
46
+ @total_payment_amount_current_year = params.dig(:total_payment_amount_current_year)
47
+ @total_collected_past_thirty_days = params.dig(:total_collected_past_thirty_days)
48
+ @total_invoices_paid_past_thirty_days = params.dig(:total_invoices_paid_past_thirty_days)
49
+ @percentage_of_total_ar90_days_past_due = params.dig(:percentage_of_total_ar90_days_past_due)
50
+ end
51
+
52
+ ##
53
+ # @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).
54
+ attr_accessor :group_key
55
+
56
+ ##
57
+ # @return [Date] The date of the report
58
+ attr_accessor :report_period
59
+
60
+ ##
61
+ # @return [Int32] The total number of customers.
62
+ attr_accessor :total_customers
63
+
64
+ ##
65
+ # @return [Int32] The total number of invoices.
66
+ attr_accessor :total_invoices
67
+
68
+ ##
69
+ # @return [Double] The total amount invoiced.
70
+ attr_accessor :total_invoiced_amount
71
+
72
+ ##
73
+ # @return [Double] The total number of unapplied payments.
74
+ attr_accessor :total_unapplied_payments
75
+
76
+ ##
77
+ # @return [Double] The total amount of collected payments.
78
+ attr_accessor :total_collected
79
+
80
+ ##
81
+ # @return [Double] The total accounts receivable amount.
82
+ attr_accessor :total_ar_amount
83
+
84
+ ##
85
+ # @return [Int32] The number of paid invoices.
86
+ attr_accessor :total_invoices_paid
87
+
88
+ ##
89
+ # @return [Int32] The number of past due invoices.
90
+ attr_accessor :total_invoices_past_due
91
+
92
+ ##
93
+ # @return [Int32] The number of past due invoices for the last 90 days.
94
+ attr_accessor :total_invoices90_days_past_due
95
+
96
+ ##
97
+ # @return [Double] The total amount past due.
98
+ attr_accessor :total_past_due_amount
99
+
100
+ ##
101
+ # @return [Double] The total past due for the past 90 days.
102
+ attr_accessor :total_past_due_amount90_days
103
+
104
+ ##
105
+ # @return [Double] Portion of Total AR that is Past due.
106
+ attr_accessor :percentage_of_total_ar
107
+
108
+ ##
109
+ # @return [Double] Daily sales outstanding.
110
+ attr_accessor :dso
111
+
112
+ ##
113
+ # @return [Double] The total amount invoiced, due this year.
114
+ attr_accessor :total_invoice_amount_current_year
115
+
116
+ ##
117
+ # @return [Double] The total amount invoiced, due last year.
118
+ attr_accessor :total_invoice_amount_previous_year
119
+
120
+ ##
121
+ # @return [Double] The total of all payments received this year.
122
+ attr_accessor :total_payment_amount_current_year
123
+
124
+ ##
125
+ # @return [Int32] The total amount of payments received in the last 30 days
126
+ attr_accessor :total_collected_past_thirty_days
127
+
128
+ ##
129
+ # @return [Int32] The total amount of Invoices paid in the last 30 days
130
+ attr_accessor :total_invoices_paid_past_thirty_days
131
+
132
+ ##
133
+ # @return [Double] Portion of Total AR that is 90+ days Past due.
134
+ attr_accessor :percentage_of_total_ar90_days_past_due
135
+
136
+ ##
137
+ # @return [object] This object as a JSON key-value structure
138
+ def as_json(options={})
139
+ {
140
+ 'groupKey' => @group_key,
141
+ 'reportPeriod' => @report_period,
142
+ 'totalCustomers' => @total_customers,
143
+ 'totalInvoices' => @total_invoices,
144
+ 'totalInvoicedAmount' => @total_invoiced_amount,
145
+ 'totalUnappliedPayments' => @total_unapplied_payments,
146
+ 'totalCollected' => @total_collected,
147
+ 'totalArAmount' => @total_ar_amount,
148
+ 'totalInvoicesPaid' => @total_invoices_paid,
149
+ 'totalInvoicesPastDue' => @total_invoices_past_due,
150
+ 'totalInvoices90DaysPastDue' => @total_invoices90_days_past_due,
151
+ 'totalPastDueAmount' => @total_past_due_amount,
152
+ 'totalPastDueAmount90Days' => @total_past_due_amount90_days,
153
+ 'percentageOfTotalAr' => @percentage_of_total_ar,
154
+ 'dso' => @dso,
155
+ 'totalInvoiceAmountCurrentYear' => @total_invoice_amount_current_year,
156
+ 'totalInvoiceAmountPreviousYear' => @total_invoice_amount_previous_year,
157
+ 'totalPaymentAmountCurrentYear' => @total_payment_amount_current_year,
158
+ 'totalCollectedPastThirtyDays' => @total_collected_past_thirty_days,
159
+ 'totalInvoicesPaidPastThirtyDays' => @total_invoices_paid_past_thirty_days,
160
+ 'percentageOfTotalAr90DaysPastDue' => @percentage_of_total_ar90_days_past_due,
161
+ }
162
+ end
163
+
164
+ ##
165
+ # @return [String] This object converted to a JSON string
166
+ def to_json(*options)
167
+ "[#{as_json(*options).to_json(*options)}]"
168
+ end
169
+ end
170
+ end
@@ -0,0 +1,140 @@
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 summarized data for an invoice
24
+ class AtRiskInvoiceSummaryModel
25
+
26
+ ##
27
+ # Initialize the AtRiskInvoiceSummaryModel using the provided prototype
28
+ def initialize(params = {})
29
+ @report_date = params.dig(:report_date)
30
+ @group_key = params.dig(:group_key)
31
+ @customer_id = params.dig(:customer_id)
32
+ @invoice_id = params.dig(:invoice_id)
33
+ @invoice_number = params.dig(:invoice_number)
34
+ @invoice_date = params.dig(:invoice_date)
35
+ @customer_name = params.dig(:customer_name)
36
+ @status = params.dig(:status)
37
+ @payment_due_date = params.dig(:payment_due_date)
38
+ @invoice_amount = params.dig(:invoice_amount)
39
+ @outstanding_balance = params.dig(:outstanding_balance)
40
+ @invoice_type_code = params.dig(:invoice_type_code)
41
+ @newest_activity = params.dig(:newest_activity)
42
+ @days_past_due = params.dig(:days_past_due)
43
+ @payment_numbers = params.dig(:payment_numbers)
44
+ @payment_ids = params.dig(:payment_ids)
45
+ end
46
+
47
+ ##
48
+ # @return [Date] The date of the report
49
+ attr_accessor :report_date
50
+
51
+ ##
52
+ # @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).
53
+ attr_accessor :group_key
54
+
55
+ ##
56
+ # @return [Uuid] The ID number of the counterparty for the invoice, for example, a customer or vendor.
57
+ attr_accessor :customer_id
58
+
59
+ ##
60
+ # @return [Uuid] The unique ID number of this invoice.
61
+ attr_accessor :invoice_id
62
+
63
+ ##
64
+ # @return [String] A reference code that is used to identify this invoice. The meaning of this field is specific to the ERP or accounting system used by the user.
65
+ attr_accessor :invoice_number
66
+
67
+ ##
68
+ # @return [Date] The reporting date for this invoice.
69
+ attr_accessor :invoice_date
70
+
71
+ ##
72
+ # @return [String] The name of the counterparty for the invoice, for example, a customer or vendor.
73
+ attr_accessor :customer_name
74
+
75
+ ##
76
+ # @return [String] The status of the invoice.
77
+ attr_accessor :status
78
+
79
+ ##
80
+ # @return [Date] The due date of the invoice.
81
+ attr_accessor :payment_due_date
82
+
83
+ ##
84
+ # @return [Double] The total amount of the Invoice.
85
+ attr_accessor :invoice_amount
86
+
87
+ ##
88
+ # @return [Double] The remaining balance value of this invoice.
89
+ attr_accessor :outstanding_balance
90
+
91
+ ##
92
+ # @return [String] A code identifying the type of this Invoice.
93
+ attr_accessor :invoice_type_code
94
+
95
+ ##
96
+ # @return [Date] The date stamp for the newest Activity on this Invoice.
97
+ attr_accessor :newest_activity
98
+
99
+ ##
100
+ # @return [Int32] The number of days this Invoice is past due.
101
+ attr_accessor :days_past_due
102
+
103
+ ##
104
+ # @return [String] The memo text of the payments associated to this invoice.
105
+ attr_accessor :payment_numbers
106
+
107
+ ##
108
+ # @return [Uuid] The ids of the payments associated to this invoice.
109
+ attr_accessor :payment_ids
110
+
111
+ ##
112
+ # @return [object] This object as a JSON key-value structure
113
+ def as_json(options={})
114
+ {
115
+ 'reportDate' => @report_date,
116
+ 'groupKey' => @group_key,
117
+ 'customerId' => @customer_id,
118
+ 'invoiceId' => @invoice_id,
119
+ 'invoiceNumber' => @invoice_number,
120
+ 'invoiceDate' => @invoice_date,
121
+ 'customerName' => @customer_name,
122
+ 'status' => @status,
123
+ 'paymentDueDate' => @payment_due_date,
124
+ 'invoiceAmount' => @invoice_amount,
125
+ 'outstandingBalance' => @outstanding_balance,
126
+ 'invoiceTypeCode' => @invoice_type_code,
127
+ 'newestActivity' => @newest_activity,
128
+ 'daysPastDue' => @days_past_due,
129
+ 'paymentNumbers' => @payment_numbers,
130
+ 'paymentIds' => @payment_ids,
131
+ }
132
+ end
133
+
134
+ ##
135
+ # @return [String] This object converted to a JSON string
136
+ def to_json(*options)
137
+ "[#{as_json(*options).to_json(*options)}]"
138
+ end
139
+ end
140
+ 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
+ # Aggregated Attachment status information.
24
+ class AttachmentHeaderInfoModel
25
+
26
+ ##
27
+ # Initialize the AttachmentHeaderInfoModel using the provided prototype
28
+ def initialize(params = {})
29
+ @group_key = params.dig(:group_key)
30
+ @company_id = params.dig(:company_id)
31
+ @total_attachments = params.dig(:total_attachments)
32
+ @total_archived = params.dig(:total_archived)
33
+ @total_active = params.dig(:total_active)
34
+ end
35
+
36
+ ##
37
+ # @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).
38
+ attr_accessor :group_key
39
+
40
+ ##
41
+ # @return [Uuid] The CompanyId associated with the attachment status report. Providing a null value will return an attachment summary for all attachments associated to the provided GroupKey
42
+ attr_accessor :company_id
43
+
44
+ ##
45
+ # @return [Int32] The total number of attachments associated with the provided GroupKey and CompanyId.
46
+ attr_accessor :total_attachments
47
+
48
+ ##
49
+ # @return [Int32] The total number of archived attachments associated with the provided GroupKey and CompanyId.
50
+ attr_accessor :total_archived
51
+
52
+ ##
53
+ # @return [Int32] The total number of active attachments associated with the provided GroupKey and CompanyId.
54
+ attr_accessor :total_active
55
+
56
+ ##
57
+ # @return [object] This object as a JSON key-value structure
58
+ def as_json(options={})
59
+ {
60
+ 'groupKey' => @group_key,
61
+ 'companyId' => @company_id,
62
+ 'totalAttachments' => @total_attachments,
63
+ 'totalArchived' => @total_archived,
64
+ 'totalActive' => @total_active,
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,122 @@
1
+ #
2
+ # Lockstep Software Development Kit for Ruby
3
+ #
4
+ # (c) 2021-2022 Lockstep, Inc.
5
+ #
6
+ # For the full copyright and license information, please view the LICENSE
7
+ # file that was distributed with this source code.
8
+ #
9
+ # @author Ted Spence <tspence@lockstep.io>
10
+ # @author Manish Narayan B S <manish.n@lockstep.io>
11
+ # @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
12
+ # @copyright 2021-2022 Lockstep, Inc.
13
+ # @version 2022.4
14
+ # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
15
+ #
16
+
17
+
18
+ require 'json'
19
+
20
+ module LockstepSdk
21
+
22
+ ##
23
+ # Represents a user uploaded attachment
24
+ class AttachmentModel
25
+
26
+ ##
27
+ # Initialize the AttachmentModel using the provided prototype
28
+ def initialize(params = {})
29
+ @attachment_id = params.dig(:attachment_id)
30
+ @group_key = params.dig(:group_key)
31
+ @table_key = params.dig(:table_key)
32
+ @object_key = params.dig(:object_key)
33
+ @file_name = params.dig(:file_name)
34
+ @file_ext = params.dig(:file_ext)
35
+ @attachment_type_id = params.dig(:attachment_type_id)
36
+ @is_archived = params.dig(:is_archived)
37
+ @origin_attachment_id = params.dig(:origin_attachment_id)
38
+ @view_internal = params.dig(:view_internal)
39
+ @view_external = params.dig(:view_external)
40
+ @created = params.dig(:created)
41
+ @created_user_id = params.dig(:created_user_id)
42
+ end
43
+
44
+ ##
45
+ # @return [Uuid] The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
46
+ attr_accessor :attachment_id
47
+
48
+ ##
49
+ # @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).
50
+ attr_accessor :group_key
51
+
52
+ ##
53
+ # @return [String] The name of the table the attachment is associated with
54
+ attr_accessor :table_key
55
+
56
+ ##
57
+ # @return [Uuid] The ID of the object the attachment is associated with
58
+ attr_accessor :object_key
59
+
60
+ ##
61
+ # @return [String] Name of the file
62
+ attr_accessor :file_name
63
+
64
+ ##
65
+ # @return [String] Extension type of the file
66
+ attr_accessor :file_ext
67
+
68
+ ##
69
+ # @return [Uuid] Corresponding AttachmentType object to describe this attachment
70
+ attr_accessor :attachment_type_id
71
+
72
+ ##
73
+ # @return [Boolean] Flag indicating the attachment was archived
74
+ attr_accessor :is_archived
75
+
76
+ ##
77
+ # @return [Uuid]
78
+ attr_accessor :origin_attachment_id
79
+
80
+ ##
81
+ # @return [Boolean] Flag for if LS clients can see this file
82
+ attr_accessor :view_internal
83
+
84
+ ##
85
+ # @return [Boolean] Flag for if Vendors and customers can see this file
86
+ attr_accessor :view_external
87
+
88
+ ##
89
+ # @return [Date-time] The date the attachment was created
90
+ attr_accessor :created
91
+
92
+ ##
93
+ # @return [Uuid] Id of the user who made the file
94
+ attr_accessor :created_user_id
95
+
96
+ ##
97
+ # @return [object] This object as a JSON key-value structure
98
+ def as_json(options={})
99
+ {
100
+ 'attachmentId' => @attachment_id,
101
+ 'groupKey' => @group_key,
102
+ 'tableKey' => @table_key,
103
+ 'objectKey' => @object_key,
104
+ 'fileName' => @file_name,
105
+ 'fileExt' => @file_ext,
106
+ 'attachmentTypeId' => @attachment_type_id,
107
+ 'isArchived' => @is_archived,
108
+ 'originAttachmentId' => @origin_attachment_id,
109
+ 'viewInternal' => @view_internal,
110
+ 'viewExternal' => @view_external,
111
+ 'created' => @created,
112
+ 'createdUserId' => @created_user_id,
113
+ }
114
+ end
115
+
116
+ ##
117
+ # @return [String] This object converted to a JSON string
118
+ def to_json(*options)
119
+ "[#{as_json(*options).to_json(*options)}]"
120
+ end
121
+ end
122
+ end
@@ -0,0 +1,56 @@
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
+ # Input format used for bulk conversion route
24
+ class BulkCurrencyConversionModel
25
+
26
+ ##
27
+ # Initialize the BulkCurrencyConversionModel using the provided prototype
28
+ def initialize(params = {})
29
+ @date = params.dig(:date)
30
+ @source_currency = params.dig(:source_currency)
31
+ end
32
+
33
+ ##
34
+ # @return [Date] The date for the currency rate
35
+ attr_accessor :date
36
+
37
+ ##
38
+ # @return [String] The currency code This will be validated by the /api/v1/currencies data set
39
+ attr_accessor :source_currency
40
+
41
+ ##
42
+ # @return [object] This object as a JSON key-value structure
43
+ def as_json(options={})
44
+ {
45
+ 'date' => @date,
46
+ 'sourceCurrency' => @source_currency,
47
+ }
48
+ end
49
+
50
+ ##
51
+ # @return [String] This object converted to a JSON string
52
+ def to_json(*options)
53
+ "[#{as_json(*options).to_json(*options)}]"
54
+ end
55
+ end
56
+ 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 cashflow report based on a timeframe
24
+ class CashflowReportModel
25
+
26
+ ##
27
+ # Initialize the CashflowReportModel using the provided prototype
28
+ def initialize(params = {})
29
+ @timeframe = params.dig(:timeframe)
30
+ @payments_collected = params.dig(:payments_collected)
31
+ @payments_collected_count = params.dig(:payments_collected_count)
32
+ @invoices_billed = params.dig(:invoices_billed)
33
+ @invoices_billed_count = params.dig(:invoices_billed_count)
34
+ end
35
+
36
+ ##
37
+ # @return [Int32] Timeframe in days the cashflow report is generated on
38
+ attr_accessor :timeframe
39
+
40
+ ##
41
+ # @return [Double] Amount of payments collected based in the timeframe
42
+ attr_accessor :payments_collected
43
+
44
+ ##
45
+ # @return [Int32] Number of payments collected based in the timeframe
46
+ attr_accessor :payments_collected_count
47
+
48
+ ##
49
+ # @return [Double] Amount of invoices billed based in the timeframe
50
+ attr_accessor :invoices_billed
51
+
52
+ ##
53
+ # @return [Int32] Number of invoices billed in the timeframe
54
+ attr_accessor :invoices_billed_count
55
+
56
+ ##
57
+ # @return [object] This object as a JSON key-value structure
58
+ def as_json(options={})
59
+ {
60
+ 'timeframe' => @timeframe,
61
+ 'paymentsCollected' => @payments_collected,
62
+ 'paymentsCollectedCount' => @payments_collected_count,
63
+ 'invoicesBilled' => @invoices_billed,
64
+ 'invoicesBilledCount' => @invoices_billed_count,
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