lockstep_sdk 2022.15.31.1 → 2022.26.12.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/app_enrollments_client.rb +10 -0
- data/lib/lockstep_sdk/clients/companies_client.rb +25 -5
- data/lib/lockstep_sdk/clients/financial_account_client.rb +1 -1
- data/lib/lockstep_sdk/clients/group_accounts_client.rb +46 -0
- data/lib/lockstep_sdk/clients/payment_applications_client.rb +1 -1
- data/lib/lockstep_sdk/clients/provisioning_client.rb +0 -18
- data/lib/lockstep_sdk/clients/reports_client.rb +132 -8
- data/lib/lockstep_sdk/clients/user_accounts_client.rb +12 -0
- data/lib/lockstep_sdk/clients/webhook_rules_client.rb +81 -0
- data/lib/lockstep_sdk/clients/webhooks_client.rb +13 -2
- data/lib/lockstep_sdk/lockstep_api.rb +14 -4
- data/lib/lockstep_sdk/models/action_result_model.rb +52 -0
- data/lib/lockstep_sdk/models/ap_aging_header_info_model.rb +101 -0
- data/lib/lockstep_sdk/models/ap_header_info_model.rb +197 -0
- data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +18 -0
- data/lib/lockstep_sdk/models/ar_header_info_model.rb +46 -10
- data/lib/lockstep_sdk/models/{customer_details_model.rb → company_details_model.rb} +22 -22
- data/lib/lockstep_sdk/models/{customer_details_payment_model.rb → company_details_payment_model.rb} +3 -3
- data/lib/lockstep_sdk/models/company_model.rb +6 -0
- data/lib/lockstep_sdk/models/company_sync_model.rb +13 -1
- data/lib/lockstep_sdk/models/connector_info_model.rb +18 -0
- data/lib/lockstep_sdk/models/contact_sync_model.rb +2 -2
- data/lib/lockstep_sdk/models/customer_summary_model.rb +36 -0
- data/lib/lockstep_sdk/models/daily_payable_outstanding_report_model.rb +59 -0
- data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +0 -6
- data/lib/lockstep_sdk/models/dpo_summary_group_total_model.rb +71 -0
- data/lib/lockstep_sdk/models/dpo_summary_model.rb +83 -0
- data/lib/lockstep_sdk/models/error_result.rb +77 -0
- data/lib/lockstep_sdk/models/group_account_model.rb +101 -0
- data/lib/lockstep_sdk/models/invoice_line_sync_model.rb +3 -3
- data/lib/lockstep_sdk/models/invoice_model.rb +7 -1
- data/lib/lockstep_sdk/models/invoice_summary_model.rb +6 -0
- data/lib/lockstep_sdk/models/invoice_sync_model.rb +10 -4
- data/lib/lockstep_sdk/models/payables_coming_due_header_model.rb +77 -0
- data/lib/lockstep_sdk/models/payables_coming_due_model.rb +89 -0
- data/lib/lockstep_sdk/models/payables_coming_due_widget_model.rb +59 -0
- data/lib/lockstep_sdk/models/payables_summary_report_model.rb +77 -0
- data/lib/lockstep_sdk/models/payment_applied_model.rb +6 -0
- data/lib/lockstep_sdk/models/payment_detail_model.rb +7 -1
- data/lib/lockstep_sdk/models/payment_model.rb +2 -2
- data/lib/lockstep_sdk/models/payment_summary_model.rb +45 -9
- data/lib/lockstep_sdk/models/payment_sync_model.rb +2 -2
- data/lib/lockstep_sdk/models/status_model.rb +12 -0
- data/lib/lockstep_sdk/models/sync_entity_result_model.rb +6 -0
- data/lib/lockstep_sdk/models/user_group_model.rb +66 -0
- data/lib/lockstep_sdk/models/vendor_summary_model.rb +143 -0
- data/lib/lockstep_sdk/models/webhook_model.rb +7 -1
- data/lib/lockstep_sdk/models/webhook_rule_model.rb +116 -0
- data/lib/lockstep_sdk/version.rb +1 -1
- metadata +21 -8
- data/lib/lockstep_sdk/models/erp_info_data_model.rb +0 -62
- data/lib/lockstep_sdk/models/trial_balance_report_cell_model.rb +0 -49
- data/lib/lockstep_sdk/models/trial_balance_report_model.rb +0 -79
- data/lib/lockstep_sdk/models/trial_balance_report_row_model.rb +0 -67
@@ -0,0 +1,77 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Platform SDK 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 Lockstep Network <support@lockstep.io>
|
10
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
11
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
12
|
+
#
|
13
|
+
|
14
|
+
|
15
|
+
require 'json'
|
16
|
+
|
17
|
+
module LockstepSdk
|
18
|
+
|
19
|
+
##
|
20
|
+
# Contains summary information for payables that will be due soon
|
21
|
+
class PayablesComingDueHeaderModel
|
22
|
+
|
23
|
+
##
|
24
|
+
# Initialize the PayablesComingDueHeaderModel using the provided prototype
|
25
|
+
def initialize(params = {})
|
26
|
+
@group_key = params.dig(:group_key)
|
27
|
+
@number_of_bills_due = params.dig(:number_of_bills_due)
|
28
|
+
@number_of_vendors = params.dig(:number_of_vendors)
|
29
|
+
@percentage_of_total = params.dig(:percentage_of_total)
|
30
|
+
@total_amount_due = params.dig(:total_amount_due)
|
31
|
+
@due_date = params.dig(:due_date)
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# @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).
|
36
|
+
attr_accessor :group_key
|
37
|
+
|
38
|
+
##
|
39
|
+
# @return [Int32] Number of bills due for this time period
|
40
|
+
attr_accessor :number_of_bills_due
|
41
|
+
|
42
|
+
##
|
43
|
+
# @return [Int32] Number of total vendors for this time period
|
44
|
+
attr_accessor :number_of_vendors
|
45
|
+
|
46
|
+
##
|
47
|
+
# @return [Double] Percentage of total for this time period
|
48
|
+
attr_accessor :percentage_of_total
|
49
|
+
|
50
|
+
##
|
51
|
+
# @return [Double] Total amount due for this time period
|
52
|
+
attr_accessor :total_amount_due
|
53
|
+
|
54
|
+
##
|
55
|
+
# @return [Date-time] This model represents all the payables that are either already due or due within this date.
|
56
|
+
attr_accessor :due_date
|
57
|
+
|
58
|
+
##
|
59
|
+
# @return [object] This object as a JSON key-value structure
|
60
|
+
def as_json(options={})
|
61
|
+
{
|
62
|
+
'groupKey' => @group_key,
|
63
|
+
'numberOfBillsDue' => @number_of_bills_due,
|
64
|
+
'numberOfVendors' => @number_of_vendors,
|
65
|
+
'percentageOfTotal' => @percentage_of_total,
|
66
|
+
'totalAmountDue' => @total_amount_due,
|
67
|
+
'dueDate' => @due_date,
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# @return [String] This object converted to a JSON string
|
73
|
+
def to_json(*options)
|
74
|
+
"[#{as_json(*options).to_json(*options)}]"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Platform SDK 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 Lockstep Network <support@lockstep.io>
|
10
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
11
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
12
|
+
#
|
13
|
+
|
14
|
+
|
15
|
+
require 'json'
|
16
|
+
|
17
|
+
module LockstepSdk
|
18
|
+
|
19
|
+
##
|
20
|
+
# Contains information for payables that will be due soon
|
21
|
+
class PayablesComingDueModel
|
22
|
+
|
23
|
+
##
|
24
|
+
# Initialize the PayablesComingDueModel using the provided prototype
|
25
|
+
def initialize(params = {})
|
26
|
+
@group_key = params.dig(:group_key)
|
27
|
+
@number_of_bills_due = params.dig(:number_of_bills_due)
|
28
|
+
@vendor_id = params.dig(:vendor_id)
|
29
|
+
@vendor_name = params.dig(:vendor_name)
|
30
|
+
@primary_contact = params.dig(:primary_contact)
|
31
|
+
@percentage_of_total = params.dig(:percentage_of_total)
|
32
|
+
@total_amount_due = params.dig(:total_amount_due)
|
33
|
+
@due_date = params.dig(:due_date)
|
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 [Int32] Number of bills due for this time period
|
42
|
+
attr_accessor :number_of_bills_due
|
43
|
+
|
44
|
+
##
|
45
|
+
# @return [Uuid] The unique Lockstep Id for the Vendor
|
46
|
+
attr_accessor :vendor_id
|
47
|
+
|
48
|
+
##
|
49
|
+
# @return [String] Name for this company
|
50
|
+
attr_accessor :vendor_name
|
51
|
+
|
52
|
+
##
|
53
|
+
# @return [String] Primary Contact for this company
|
54
|
+
attr_accessor :primary_contact
|
55
|
+
|
56
|
+
##
|
57
|
+
# @return [Double] Percentage of total for this time period
|
58
|
+
attr_accessor :percentage_of_total
|
59
|
+
|
60
|
+
##
|
61
|
+
# @return [Double] Total amount due for this time period
|
62
|
+
attr_accessor :total_amount_due
|
63
|
+
|
64
|
+
##
|
65
|
+
# @return [Date-time] This model represents all the payables that are either already due or due within this date.
|
66
|
+
attr_accessor :due_date
|
67
|
+
|
68
|
+
##
|
69
|
+
# @return [object] This object as a JSON key-value structure
|
70
|
+
def as_json(options={})
|
71
|
+
{
|
72
|
+
'groupKey' => @group_key,
|
73
|
+
'numberOfBillsDue' => @number_of_bills_due,
|
74
|
+
'vendorId' => @vendor_id,
|
75
|
+
'vendorName' => @vendor_name,
|
76
|
+
'primaryContact' => @primary_contact,
|
77
|
+
'percentageOfTotal' => @percentage_of_total,
|
78
|
+
'totalAmountDue' => @total_amount_due,
|
79
|
+
'dueDate' => @due_date,
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# @return [String] This object converted to a JSON string
|
85
|
+
def to_json(*options)
|
86
|
+
"[#{as_json(*options).to_json(*options)}]"
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Platform SDK 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 Lockstep Network <support@lockstep.io>
|
10
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
11
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
12
|
+
#
|
13
|
+
|
14
|
+
|
15
|
+
require 'json'
|
16
|
+
|
17
|
+
module LockstepSdk
|
18
|
+
|
19
|
+
##
|
20
|
+
# Contains summary information for payables for the widget
|
21
|
+
class PayablesComingDueWidgetModel
|
22
|
+
|
23
|
+
##
|
24
|
+
# Initialize the PayablesComingDueWidgetModel using the provided prototype
|
25
|
+
def initialize(params = {})
|
26
|
+
@group_key = params.dig(:group_key)
|
27
|
+
@date = params.dig(:date)
|
28
|
+
@amount_due = params.dig(:amount_due)
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# @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).
|
33
|
+
attr_accessor :group_key
|
34
|
+
|
35
|
+
##
|
36
|
+
# @return [Date-time] This model represents all the payables that are either already due or due within this date.
|
37
|
+
attr_accessor :date
|
38
|
+
|
39
|
+
##
|
40
|
+
# @return [Double] Total amount due for this time period
|
41
|
+
attr_accessor :amount_due
|
42
|
+
|
43
|
+
##
|
44
|
+
# @return [object] This object as a JSON key-value structure
|
45
|
+
def as_json(options={})
|
46
|
+
{
|
47
|
+
'groupKey' => @group_key,
|
48
|
+
'date' => @date,
|
49
|
+
'amountDue' => @amount_due,
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
##
|
54
|
+
# @return [String] This object converted to a JSON string
|
55
|
+
def to_json(*options)
|
56
|
+
"[#{as_json(*options).to_json(*options)}]"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Platform SDK 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 Lockstep Network <support@lockstep.io>
|
10
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
11
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
12
|
+
#
|
13
|
+
|
14
|
+
|
15
|
+
require 'json'
|
16
|
+
|
17
|
+
module LockstepSdk
|
18
|
+
|
19
|
+
##
|
20
|
+
# Represents the payables summary report based on a timeframe
|
21
|
+
class PayablesSummaryReportModel
|
22
|
+
|
23
|
+
##
|
24
|
+
# Initialize the PayablesSummaryReportModel using the provided prototype
|
25
|
+
def initialize(params = {})
|
26
|
+
@group_key = params.dig(:group_key)
|
27
|
+
@timeframe = params.dig(:timeframe)
|
28
|
+
@total_payments_amount = params.dig(:total_payments_amount)
|
29
|
+
@total_payments_count = params.dig(:total_payments_count)
|
30
|
+
@total_amount_billed = params.dig(:total_amount_billed)
|
31
|
+
@total_bills_count = params.dig(:total_bills_count)
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# @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).
|
36
|
+
attr_accessor :group_key
|
37
|
+
|
38
|
+
##
|
39
|
+
# @return [Int32] Timeframe in days the payables summary report is generated on
|
40
|
+
attr_accessor :timeframe
|
41
|
+
|
42
|
+
##
|
43
|
+
# @return [Double] Amount of payments made based in the timeframe
|
44
|
+
attr_accessor :total_payments_amount
|
45
|
+
|
46
|
+
##
|
47
|
+
# @return [Int32] Number of payments made based in the timeframe
|
48
|
+
attr_accessor :total_payments_count
|
49
|
+
|
50
|
+
##
|
51
|
+
# @return [Double] Amount of bills received based in the timeframe
|
52
|
+
attr_accessor :total_amount_billed
|
53
|
+
|
54
|
+
##
|
55
|
+
# @return [Int32] Number of bills received in the timeframe
|
56
|
+
attr_accessor :total_bills_count
|
57
|
+
|
58
|
+
##
|
59
|
+
# @return [object] This object as a JSON key-value structure
|
60
|
+
def as_json(options={})
|
61
|
+
{
|
62
|
+
'groupKey' => @group_key,
|
63
|
+
'timeframe' => @timeframe,
|
64
|
+
'totalPaymentsAmount' => @total_payments_amount,
|
65
|
+
'totalPaymentsCount' => @total_payments_count,
|
66
|
+
'totalAmountBilled' => @total_amount_billed,
|
67
|
+
'totalBillsCount' => @total_bills_count,
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# @return [String] This object converted to a JSON string
|
73
|
+
def to_json(*options)
|
74
|
+
"[#{as_json(*options).to_json(*options)}]"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -39,6 +39,7 @@ module LockstepSdk
|
|
39
39
|
@modified = params.dig(:modified)
|
40
40
|
@modified_user_id = params.dig(:modified_user_id)
|
41
41
|
@app_enrollment_id = params.dig(:app_enrollment_id)
|
42
|
+
@payment = params.dig(:payment)
|
42
43
|
@invoice = params.dig(:invoice)
|
43
44
|
end
|
44
45
|
|
@@ -94,6 +95,10 @@ module LockstepSdk
|
|
94
95
|
# @return [Uuid] The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.
|
95
96
|
attr_accessor :app_enrollment_id
|
96
97
|
|
98
|
+
##
|
99
|
+
# @return [PaymentModel] The payment associated with this applied payment
|
100
|
+
attr_accessor :payment
|
101
|
+
|
97
102
|
##
|
98
103
|
# @return [InvoiceModel] The invoice associated with this applied payment.
|
99
104
|
attr_accessor :invoice
|
@@ -115,6 +120,7 @@ module LockstepSdk
|
|
115
120
|
'modified' => @modified,
|
116
121
|
'modifiedUserId' => @modified_user_id,
|
117
122
|
'appEnrollmentId' => @app_enrollment_id,
|
123
|
+
'payment' => @payment,
|
118
124
|
'invoice' => @invoice,
|
119
125
|
}
|
120
126
|
end
|
@@ -34,6 +34,7 @@ module LockstepSdk
|
|
34
34
|
@payment_amount = params.dig(:payment_amount)
|
35
35
|
@unapplied_amount = params.dig(:unapplied_amount)
|
36
36
|
@payment_type = params.dig(:payment_type)
|
37
|
+
@tender_type = params.dig(:tender_type)
|
37
38
|
@payment_date = params.dig(:payment_date)
|
38
39
|
@post_date = params.dig(:post_date)
|
39
40
|
@phone = params.dig(:phone)
|
@@ -88,9 +89,13 @@ module LockstepSdk
|
|
88
89
|
attr_accessor :unapplied_amount
|
89
90
|
|
90
91
|
##
|
91
|
-
# @return [String] The type of payment, Payment or AP Payment.
|
92
|
+
# @return [String] The type of payment, AR Payment or AP Payment. Recognized PaymentType values are: * `AR Payment` - A payment made by a Customer to the Company * `AP Payment` - A payment made by the Company to a Vendor
|
92
93
|
attr_accessor :payment_type
|
93
94
|
|
95
|
+
##
|
96
|
+
# @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. * `Other` - A payment made via another method not listed above.
|
97
|
+
attr_accessor :tender_type
|
98
|
+
|
94
99
|
##
|
95
100
|
# @return [Date] The date of this Payment.
|
96
101
|
attr_accessor :payment_date
|
@@ -150,6 +155,7 @@ module LockstepSdk
|
|
150
155
|
'paymentAmount' => @payment_amount,
|
151
156
|
'unappliedAmount' => @unapplied_amount,
|
152
157
|
'paymentType' => @payment_type,
|
158
|
+
'tenderType' => @tender_type,
|
153
159
|
'paymentDate' => @payment_date,
|
154
160
|
'postDate' => @post_date,
|
155
161
|
'phone' => @phone,
|
@@ -74,11 +74,11 @@ module LockstepSdk
|
|
74
74
|
attr_accessor :erp_key
|
75
75
|
|
76
76
|
##
|
77
|
-
# @return [String] The type of payment,
|
77
|
+
# @return [String] The type of payment, AR Payment or AP Payment. Recognized PaymentType values are: * `AR Payment` - A payment made by a Customer to the Company * `AP Payment` - A payment made by the Company to a Vendor
|
78
78
|
attr_accessor :payment_type
|
79
79
|
|
80
80
|
##
|
81
|
-
# @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.
|
81
|
+
# @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. * `Other` - A payment made via another method not listed above.
|
82
82
|
attr_accessor :tender_type
|
83
83
|
|
84
84
|
##
|
@@ -27,16 +27,22 @@ module LockstepSdk
|
|
27
27
|
@payment_id = params.dig(:payment_id)
|
28
28
|
@memo_text = params.dig(:memo_text)
|
29
29
|
@reference_code = params.dig(:reference_code)
|
30
|
+
@tender_type = params.dig(:tender_type)
|
30
31
|
@payment_type = params.dig(:payment_type)
|
31
32
|
@payment_date = params.dig(:payment_date)
|
32
33
|
@payment_amount = params.dig(:payment_amount)
|
33
34
|
@unapplied_amount = params.dig(:unapplied_amount)
|
35
|
+
@is_open = params.dig(:is_open)
|
34
36
|
@invoice_count = params.dig(:invoice_count)
|
35
37
|
@total_payments_applied = params.dig(:total_payments_applied)
|
36
38
|
@invoice_list = params.dig(:invoice_list)
|
37
39
|
@invoice_id_list = params.dig(:invoice_id_list)
|
38
|
-
@
|
39
|
-
@
|
40
|
+
@payment_company_id = params.dig(:payment_company_id)
|
41
|
+
@payment_company_name = params.dig(:payment_company_name)
|
42
|
+
@customer_ids = params.dig(:customer_ids)
|
43
|
+
@customer_names = params.dig(:customer_names)
|
44
|
+
@company_ids = params.dig(:company_ids)
|
45
|
+
@company_names = params.dig(:company_names)
|
40
46
|
end
|
41
47
|
|
42
48
|
##
|
@@ -56,7 +62,11 @@ module LockstepSdk
|
|
56
62
|
attr_accessor :reference_code
|
57
63
|
|
58
64
|
##
|
59
|
-
# @return [String] The type of payment,
|
65
|
+
# @return [String] The tender type of payment (Cash, Check, etc.)
|
66
|
+
attr_accessor :tender_type
|
67
|
+
|
68
|
+
##
|
69
|
+
# @return [String] The type of payment, AR Payment or AP Payment.
|
60
70
|
attr_accessor :payment_type
|
61
71
|
|
62
72
|
##
|
@@ -71,6 +81,10 @@ module LockstepSdk
|
|
71
81
|
# @return [Double] Unapplied balance of this payment.
|
72
82
|
attr_accessor :unapplied_amount
|
73
83
|
|
84
|
+
##
|
85
|
+
# @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.
|
86
|
+
attr_accessor :is_open
|
87
|
+
|
74
88
|
##
|
75
89
|
# @return [Int32] The number of invoices associated to this payment.
|
76
90
|
attr_accessor :invoice_count
|
@@ -88,12 +102,28 @@ module LockstepSdk
|
|
88
102
|
attr_accessor :invoice_id_list
|
89
103
|
|
90
104
|
##
|
91
|
-
# @return [
|
92
|
-
attr_accessor :
|
105
|
+
# @return [Uuid] The id of the company for this payment.
|
106
|
+
attr_accessor :payment_company_id
|
107
|
+
|
108
|
+
##
|
109
|
+
# @return [String] The name of the company for this payment.
|
110
|
+
attr_accessor :payment_company_name
|
111
|
+
|
112
|
+
##
|
113
|
+
# @return [Uuid] The ids of the customer for the associated invoices.
|
114
|
+
attr_accessor :customer_ids
|
115
|
+
|
116
|
+
##
|
117
|
+
# @return [String] The names of the customer for the associated invoices.
|
118
|
+
attr_accessor :customer_names
|
119
|
+
|
120
|
+
##
|
121
|
+
# @return [Uuid] The ids of the company for the associated invoices.
|
122
|
+
attr_accessor :company_ids
|
93
123
|
|
94
124
|
##
|
95
|
-
# @return [
|
96
|
-
attr_accessor :
|
125
|
+
# @return [String] The names of the company for the associated invoices.
|
126
|
+
attr_accessor :company_names
|
97
127
|
|
98
128
|
##
|
99
129
|
# @return [object] This object as a JSON key-value structure
|
@@ -103,16 +133,22 @@ module LockstepSdk
|
|
103
133
|
'paymentId' => @payment_id,
|
104
134
|
'memoText' => @memo_text,
|
105
135
|
'referenceCode' => @reference_code,
|
136
|
+
'tenderType' => @tender_type,
|
106
137
|
'paymentType' => @payment_type,
|
107
138
|
'paymentDate' => @payment_date,
|
108
139
|
'paymentAmount' => @payment_amount,
|
109
140
|
'unappliedAmount' => @unapplied_amount,
|
141
|
+
'isOpen' => @is_open,
|
110
142
|
'invoiceCount' => @invoice_count,
|
111
143
|
'totalPaymentsApplied' => @total_payments_applied,
|
112
144
|
'invoiceList' => @invoice_list,
|
113
145
|
'invoiceIdList' => @invoice_id_list,
|
114
|
-
'
|
115
|
-
'
|
146
|
+
'paymentCompanyId' => @payment_company_id,
|
147
|
+
'paymentCompanyName' => @payment_company_name,
|
148
|
+
'customerIds' => @customer_ids,
|
149
|
+
'customerNames' => @customer_names,
|
150
|
+
'companyIds' => @company_ids,
|
151
|
+
'companyNames' => @company_names,
|
116
152
|
}
|
117
153
|
end
|
118
154
|
|
@@ -58,11 +58,11 @@ module LockstepSdk
|
|
58
58
|
attr_accessor :company_erp_key
|
59
59
|
|
60
60
|
##
|
61
|
-
# @return [String] The type of payment,
|
61
|
+
# @return [String] The type of payment, AR Payment or AP Payment. Recognized PaymentType values are: * `AR Payment` - A payment made by a Customer to the Company * `AP Payment` - A payment made by the Company to a Vendor
|
62
62
|
attr_accessor :payment_type
|
63
63
|
|
64
64
|
##
|
65
|
-
# @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.
|
65
|
+
# @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. * `Other` - A payment made via another method not listed above.
|
66
66
|
attr_accessor :tender_type
|
67
67
|
|
68
68
|
##
|
@@ -36,7 +36,9 @@ module LockstepSdk
|
|
36
36
|
@user_status = params.dig(:user_status)
|
37
37
|
@environment = params.dig(:environment)
|
38
38
|
@version = params.dig(:version)
|
39
|
+
@onboarding_scheduled = params.dig(:onboarding_scheduled)
|
39
40
|
@dependencies = params.dig(:dependencies)
|
41
|
+
@user_groups = params.dig(:user_groups)
|
40
42
|
end
|
41
43
|
|
42
44
|
##
|
@@ -91,10 +93,18 @@ module LockstepSdk
|
|
91
93
|
# @return [String] The version currently being used
|
92
94
|
attr_accessor :version
|
93
95
|
|
96
|
+
##
|
97
|
+
# @return [Boolean] If authentication is successful, contains the onboarding session status of the logged-in user's group account.
|
98
|
+
attr_accessor :onboarding_scheduled
|
99
|
+
|
94
100
|
##
|
95
101
|
# @return [Object] Statuses for the dependencies of this api. OK if the dependency is working.
|
96
102
|
attr_accessor :dependencies
|
97
103
|
|
104
|
+
##
|
105
|
+
# @return [UserGroupModel] The set of Groups that the user has access to. You can use the /api/v1/useraccounts/change-group endpoint to change your active group.
|
106
|
+
attr_accessor :user_groups
|
107
|
+
|
98
108
|
##
|
99
109
|
# @return [object] This object as a JSON key-value structure
|
100
110
|
def as_json(options={})
|
@@ -112,7 +122,9 @@ module LockstepSdk
|
|
112
122
|
'userStatus' => @user_status,
|
113
123
|
'environment' => @environment,
|
114
124
|
'version' => @version,
|
125
|
+
'onboardingScheduled' => @onboarding_scheduled,
|
115
126
|
'dependencies' => @dependencies,
|
127
|
+
'userGroups' => @user_groups,
|
116
128
|
}
|
117
129
|
end
|
118
130
|
|
@@ -25,6 +25,7 @@ module LockstepSdk
|
|
25
25
|
def initialize(params = {})
|
26
26
|
@insert_count = params.dig(:insert_count)
|
27
27
|
@update_count = params.dig(:update_count)
|
28
|
+
@delete_count = params.dig(:delete_count)
|
28
29
|
@skip_count = params.dig(:skip_count)
|
29
30
|
@error_count = params.dig(:error_count)
|
30
31
|
@errors = params.dig(:errors)
|
@@ -38,6 +39,10 @@ module LockstepSdk
|
|
38
39
|
# @return [Int32] The number of entities updated
|
39
40
|
attr_accessor :update_count
|
40
41
|
|
42
|
+
##
|
43
|
+
# @return [Int32] The number of entities deleted
|
44
|
+
attr_accessor :delete_count
|
45
|
+
|
41
46
|
##
|
42
47
|
# @return [Int32] The number of entities skipped
|
43
48
|
attr_accessor :skip_count
|
@@ -56,6 +61,7 @@ module LockstepSdk
|
|
56
61
|
{
|
57
62
|
'insertCount' => @insert_count,
|
58
63
|
'updateCount' => @update_count,
|
64
|
+
'deleteCount' => @delete_count,
|
59
65
|
'skipCount' => @skip_count,
|
60
66
|
'errorCount' => @error_count,
|
61
67
|
'errors' => @errors,
|
@@ -0,0 +1,66 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Platform SDK 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 Lockstep Network <support@lockstep.io>
|
10
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
11
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
12
|
+
#
|
13
|
+
|
14
|
+
|
15
|
+
require 'json'
|
16
|
+
|
17
|
+
module LockstepSdk
|
18
|
+
|
19
|
+
##
|
20
|
+
# A UserGroup represents the groups that the user is a member of.
|
21
|
+
# A user may have varying permissions/access within a Group.
|
22
|
+
class UserGroupModel
|
23
|
+
|
24
|
+
##
|
25
|
+
# Initialize the UserGroupModel using the provided prototype
|
26
|
+
def initialize(params = {})
|
27
|
+
@group_key = params.dig(:group_key)
|
28
|
+
@user_role = params.dig(:user_role)
|
29
|
+
@group_name = params.dig(:group_name)
|
30
|
+
@status = params.dig(:status)
|
31
|
+
end
|
32
|
+
|
33
|
+
##
|
34
|
+
# @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).
|
35
|
+
attr_accessor :group_key
|
36
|
+
|
37
|
+
##
|
38
|
+
# @return [String] The name of the Permission Level for the group.
|
39
|
+
attr_accessor :user_role
|
40
|
+
|
41
|
+
##
|
42
|
+
# @return [String] The name of the group
|
43
|
+
attr_accessor :group_name
|
44
|
+
|
45
|
+
##
|
46
|
+
# @return [String] The user's status in the group
|
47
|
+
attr_accessor :status
|
48
|
+
|
49
|
+
##
|
50
|
+
# @return [object] This object as a JSON key-value structure
|
51
|
+
def as_json(options={})
|
52
|
+
{
|
53
|
+
'groupKey' => @group_key,
|
54
|
+
'userRole' => @user_role,
|
55
|
+
'groupName' => @group_name,
|
56
|
+
'status' => @status,
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
##
|
61
|
+
# @return [String] This object converted to a JSON string
|
62
|
+
def to_json(*options)
|
63
|
+
"[#{as_json(*options).to_json(*options)}]"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|