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.
- checksums.yaml +7 -0
- data/lib/lockstep_sdk/clients/activities_client.rb +119 -0
- data/lib/lockstep_sdk/clients/api_keys_client.rb +78 -0
- data/lib/lockstep_sdk/clients/app_enrollments_client.rb +121 -0
- data/lib/lockstep_sdk/clients/applications_client.rb +100 -0
- data/lib/lockstep_sdk/clients/attachments_client.rb +121 -0
- data/lib/lockstep_sdk/clients/code_definitions_client.rb +60 -0
- data/lib/lockstep_sdk/clients/companies_client.rb +123 -0
- data/lib/lockstep_sdk/clients/contacts_client.rb +90 -0
- data/lib/lockstep_sdk/clients/credit_memo_applied_client.rb +92 -0
- data/lib/lockstep_sdk/clients/currencies_client.rb +55 -0
- data/lib/lockstep_sdk/clients/custom_field_definitions_client.rb +94 -0
- data/lib/lockstep_sdk/clients/custom_field_values_client.rb +97 -0
- data/lib/lockstep_sdk/clients/definitions_client.rb +95 -0
- data/lib/lockstep_sdk/clients/emails_client.rb +108 -0
- data/lib/lockstep_sdk/clients/invoice_history_client.rb +56 -0
- data/lib/lockstep_sdk/clients/invoices_client.rb +126 -0
- data/lib/lockstep_sdk/clients/leads_client.rb +40 -0
- data/lib/lockstep_sdk/clients/notes_client.rb +84 -0
- data/lib/lockstep_sdk/clients/payment_applications_client.rb +92 -0
- data/lib/lockstep_sdk/clients/payments_client.rb +138 -0
- data/lib/lockstep_sdk/clients/provisioning_client.rb +56 -0
- data/lib/lockstep_sdk/clients/reports_client.rb +114 -0
- data/lib/lockstep_sdk/clients/status_client.rb +53 -0
- data/lib/lockstep_sdk/clients/sync_client.rb +97 -0
- data/lib/lockstep_sdk/clients/user_accounts_client.rb +127 -0
- data/lib/lockstep_sdk/clients/user_roles_client.rb +54 -0
- data/lib/lockstep_sdk/lockstep_api.rb +264 -0
- data/lib/lockstep_sdk/models/activity_model.rb +221 -0
- data/lib/lockstep_sdk/models/activity_stream_item_model.rb +104 -0
- data/lib/lockstep_sdk/models/activity_xref_model.rb +72 -0
- data/lib/lockstep_sdk/models/aging_model.rb +62 -0
- data/lib/lockstep_sdk/models/api_key_model.rb +116 -0
- data/lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb +110 -0
- data/lib/lockstep_sdk/models/app_enrollment_model.rb +151 -0
- data/lib/lockstep_sdk/models/application_model.rb +166 -0
- data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +86 -0
- data/lib/lockstep_sdk/models/ar_header_info_model.rb +170 -0
- data/lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb +140 -0
- data/lib/lockstep_sdk/models/attachment_header_info_model.rb +74 -0
- data/lib/lockstep_sdk/models/attachment_model.rb +122 -0
- data/lib/lockstep_sdk/models/bulk_currency_conversion_model.rb +56 -0
- data/lib/lockstep_sdk/models/cashflow_report_model.rb +74 -0
- data/lib/lockstep_sdk/models/code_definition_model.rb +99 -0
- data/lib/lockstep_sdk/models/company_model.rb +336 -0
- data/lib/lockstep_sdk/models/connector_info_model.rb +69 -0
- data/lib/lockstep_sdk/models/contact_model.rb +227 -0
- data/lib/lockstep_sdk/models/country_model.rb +116 -0
- data/lib/lockstep_sdk/models/credit_memo_applied_model.rb +150 -0
- data/lib/lockstep_sdk/models/credit_memo_invoice_model.rb +116 -0
- data/lib/lockstep_sdk/models/currency_model.rb +74 -0
- data/lib/lockstep_sdk/models/currency_rate_model.rb +68 -0
- data/lib/lockstep_sdk/models/custom_field_definition_model.rb +121 -0
- data/lib/lockstep_sdk/models/custom_field_value_model.rb +115 -0
- data/lib/lockstep_sdk/models/customer_details_model.rb +164 -0
- data/lib/lockstep_sdk/models/customer_details_payment_model.rb +104 -0
- data/lib/lockstep_sdk/models/customer_summary_model.rb +134 -0
- data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +62 -0
- data/lib/lockstep_sdk/models/developer_account_submit_model.rb +62 -0
- data/lib/lockstep_sdk/models/email_model.rb +245 -0
- data/lib/lockstep_sdk/models/erp_info_data_model.rb +63 -0
- data/lib/lockstep_sdk/models/erp_info_model.rb +56 -0
- data/lib/lockstep_sdk/models/erp_model.rb +62 -0
- data/lib/lockstep_sdk/models/invite_data_model.rb +56 -0
- data/lib/lockstep_sdk/models/invite_model.rb +68 -0
- data/lib/lockstep_sdk/models/invite_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/invoice_address_model.rb +140 -0
- data/lib/lockstep_sdk/models/invoice_history_model.rb +238 -0
- data/lib/lockstep_sdk/models/invoice_line_model.rb +194 -0
- data/lib/lockstep_sdk/models/invoice_model.rb +325 -0
- data/lib/lockstep_sdk/models/invoice_payment_detail_model.rb +104 -0
- data/lib/lockstep_sdk/models/invoice_summary_model.rb +134 -0
- data/lib/lockstep_sdk/models/lead_model.rb +74 -0
- data/lib/lockstep_sdk/models/note_model.rb +121 -0
- data/lib/lockstep_sdk/models/payment_applied_model.rb +131 -0
- data/lib/lockstep_sdk/models/payment_detail_header_model.rb +80 -0
- data/lib/lockstep_sdk/models/payment_detail_model.rb +176 -0
- data/lib/lockstep_sdk/models/payment_model.rb +206 -0
- data/lib/lockstep_sdk/models/payment_summary_model.rb +128 -0
- data/lib/lockstep_sdk/models/provisioning_finalize_request_model.rb +74 -0
- data/lib/lockstep_sdk/models/provisioning_model.rb +74 -0
- data/lib/lockstep_sdk/models/provisioning_response_model.rb +86 -0
- data/lib/lockstep_sdk/models/risk_rate_model.rb +98 -0
- data/lib/lockstep_sdk/models/state_model.rb +62 -0
- data/lib/lockstep_sdk/models/status_model.rb +128 -0
- data/lib/lockstep_sdk/models/sync_entity_result_model.rb +74 -0
- data/lib/lockstep_sdk/models/sync_request_model.rb +98 -0
- data/lib/lockstep_sdk/models/sync_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/transfer_owner_model.rb +56 -0
- data/lib/lockstep_sdk/models/transfer_owner_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/user_account_model.rb +240 -0
- data/lib/lockstep_sdk/models/user_role_model.rb +86 -0
- data/lib/lockstep_sdk/version.rb +3 -0
- metadata +150 -0
@@ -0,0 +1,86 @@
|
|
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 response to either a successful or failed account provisioning
|
24
|
+
class ProvisioningResponseModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the ProvisioningResponseModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@user_name = params.dig(:user_name)
|
30
|
+
@account_name = params.dig(:account_name)
|
31
|
+
@user_id = params.dig(:user_id)
|
32
|
+
@group_key = params.dig(:group_key)
|
33
|
+
@app_enrollment_id = params.dig(:app_enrollment_id)
|
34
|
+
@sync_request_id = params.dig(:sync_request_id)
|
35
|
+
@error_message = params.dig(:error_message)
|
36
|
+
end
|
37
|
+
|
38
|
+
##
|
39
|
+
# @return [String] If provisioning is successful, contains the username of the created user.
|
40
|
+
attr_accessor :user_name
|
41
|
+
|
42
|
+
##
|
43
|
+
# @return [String] If provisioning is successful, contains subscription account name of created user.
|
44
|
+
attr_accessor :account_name
|
45
|
+
|
46
|
+
##
|
47
|
+
# @return [Uuid] If provisioning is successful, contains the unique identifier of the created user.
|
48
|
+
attr_accessor :user_id
|
49
|
+
|
50
|
+
##
|
51
|
+
# @return [Uuid] If provisioning is successful, contains the group key of the created user.
|
52
|
+
attr_accessor :group_key
|
53
|
+
|
54
|
+
##
|
55
|
+
# @return [Uuid] If provisioning is successful, contains the app enrollment id of the created app enrollment.
|
56
|
+
attr_accessor :app_enrollment_id
|
57
|
+
|
58
|
+
##
|
59
|
+
# @return [Uuid] if provisioning is successful, contains the sync request id of the sync that was started for the app enrollment.
|
60
|
+
attr_accessor :sync_request_id
|
61
|
+
|
62
|
+
##
|
63
|
+
# @return [String] The error message(s).
|
64
|
+
attr_accessor :error_message
|
65
|
+
|
66
|
+
##
|
67
|
+
# @return [object] This object as a JSON key-value structure
|
68
|
+
def as_json(options={})
|
69
|
+
{
|
70
|
+
'userName' => @user_name,
|
71
|
+
'accountName' => @account_name,
|
72
|
+
'userId' => @user_id,
|
73
|
+
'groupKey' => @group_key,
|
74
|
+
'appEnrollmentId' => @app_enrollment_id,
|
75
|
+
'syncRequestId' => @sync_request_id,
|
76
|
+
'errorMessage' => @error_message,
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# @return [String] This object converted to a JSON string
|
82
|
+
def to_json(*options)
|
83
|
+
"[#{as_json(*options).to_json(*options)}]"
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,98 @@
|
|
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 risk rate calculation for a single month
|
24
|
+
class RiskRateModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the RiskRateModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@group_key = params.dig(:group_key)
|
30
|
+
@report_period = params.dig(:report_period)
|
31
|
+
@invoice_month_name = params.dig(:invoice_month_name)
|
32
|
+
@total_invoice_count = params.dig(:total_invoice_count)
|
33
|
+
@total_invoice_amount = params.dig(:total_invoice_amount)
|
34
|
+
@at_risk_count = params.dig(:at_risk_count)
|
35
|
+
@at_risk_amount = params.dig(:at_risk_amount)
|
36
|
+
@at_risk_count_percentage = params.dig(:at_risk_count_percentage)
|
37
|
+
@at_risk_percentage = params.dig(:at_risk_percentage)
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# @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).
|
42
|
+
attr_accessor :group_key
|
43
|
+
|
44
|
+
##
|
45
|
+
# @return [Date-time] The month the risk rate was calculated for
|
46
|
+
attr_accessor :report_period
|
47
|
+
|
48
|
+
##
|
49
|
+
# @return [String] The string name of the month the risk rate was calculated for
|
50
|
+
attr_accessor :invoice_month_name
|
51
|
+
|
52
|
+
##
|
53
|
+
# @return [Int32] The count of all invoices in the calculation month
|
54
|
+
attr_accessor :total_invoice_count
|
55
|
+
|
56
|
+
##
|
57
|
+
# @return [Double] The sum of the total amount for invoices in the calculation month
|
58
|
+
attr_accessor :total_invoice_amount
|
59
|
+
|
60
|
+
##
|
61
|
+
# @return [Int32] The count of open invoices over 90 days from the calculation month
|
62
|
+
attr_accessor :at_risk_count
|
63
|
+
|
64
|
+
##
|
65
|
+
# @return [Double] The sum of the outstanding balance of open invoices over 90 days from the calculation month
|
66
|
+
attr_accessor :at_risk_amount
|
67
|
+
|
68
|
+
##
|
69
|
+
# @return [Double] The percentage of all open invoices for the calculation month that are over 90 days based on count
|
70
|
+
attr_accessor :at_risk_count_percentage
|
71
|
+
|
72
|
+
##
|
73
|
+
# @return [Double] The percentage of all open invoices for the calculation month that are over 90 days based on outstanding balance
|
74
|
+
attr_accessor :at_risk_percentage
|
75
|
+
|
76
|
+
##
|
77
|
+
# @return [object] This object as a JSON key-value structure
|
78
|
+
def as_json(options={})
|
79
|
+
{
|
80
|
+
'groupKey' => @group_key,
|
81
|
+
'reportPeriod' => @report_period,
|
82
|
+
'invoiceMonthName' => @invoice_month_name,
|
83
|
+
'totalInvoiceCount' => @total_invoice_count,
|
84
|
+
'totalInvoiceAmount' => @total_invoice_amount,
|
85
|
+
'atRiskCount' => @at_risk_count,
|
86
|
+
'atRiskAmount' => @at_risk_amount,
|
87
|
+
'atRiskCountPercentage' => @at_risk_count_percentage,
|
88
|
+
'atRiskPercentage' => @at_risk_percentage,
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
##
|
93
|
+
# @return [String] This object converted to a JSON string
|
94
|
+
def to_json(*options)
|
95
|
+
"[#{as_json(*options).to_json(*options)}]"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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
|
+
# State model for ISO-3166-2
|
24
|
+
class StateModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the StateModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@name = params.dig(:name)
|
30
|
+
@alpha2 = params.dig(:alpha2)
|
31
|
+
@aliases = params.dig(:aliases)
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# @return [String] Name of the state
|
36
|
+
attr_accessor :name
|
37
|
+
|
38
|
+
##
|
39
|
+
# @return [String] 2 letter alphabetic code for the given state
|
40
|
+
attr_accessor :alpha2
|
41
|
+
|
42
|
+
##
|
43
|
+
# @return [String] A different name for a state
|
44
|
+
attr_accessor :aliases
|
45
|
+
|
46
|
+
##
|
47
|
+
# @return [object] This object as a JSON key-value structure
|
48
|
+
def as_json(options={})
|
49
|
+
{
|
50
|
+
'name' => @name,
|
51
|
+
'alpha2' => @alpha2,
|
52
|
+
'aliases' => @aliases,
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# @return [String] This object converted to a JSON string
|
58
|
+
def to_json(*options)
|
59
|
+
"[#{as_json(*options).to_json(*options)}]"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
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
|
+
# Represents the status of a user's credentials
|
24
|
+
class StatusModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the StatusModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@user_name = params.dig(:user_name)
|
30
|
+
@account_name = params.dig(:account_name)
|
31
|
+
@account_company_id = params.dig(:account_company_id)
|
32
|
+
@user_id = params.dig(:user_id)
|
33
|
+
@group_key = params.dig(:group_key)
|
34
|
+
@logged_in = params.dig(:logged_in)
|
35
|
+
@error_message = params.dig(:error_message)
|
36
|
+
@roles = params.dig(:roles)
|
37
|
+
@last_logged_in = params.dig(:last_logged_in)
|
38
|
+
@api_key_id = params.dig(:api_key_id)
|
39
|
+
@user_status = params.dig(:user_status)
|
40
|
+
@environment = params.dig(:environment)
|
41
|
+
@version = params.dig(:version)
|
42
|
+
@dependencies = params.dig(:dependencies)
|
43
|
+
end
|
44
|
+
|
45
|
+
##
|
46
|
+
# @return [String] If authentication is successful, contains the username of the logged-in user.
|
47
|
+
attr_accessor :user_name
|
48
|
+
|
49
|
+
##
|
50
|
+
# @return [String] If authentication is successful, contains subscription account name of logged-in user.
|
51
|
+
attr_accessor :account_name
|
52
|
+
|
53
|
+
##
|
54
|
+
# @return [Uuid] If authentication is successful, contains subscription account company id of logged-in user.
|
55
|
+
attr_accessor :account_company_id
|
56
|
+
|
57
|
+
##
|
58
|
+
# @return [Uuid] If authentication is successful, contains the unique identifier of the logged-in user.
|
59
|
+
attr_accessor :user_id
|
60
|
+
|
61
|
+
##
|
62
|
+
# @return [Uuid] If authentication is successful, contains the group key of the logged-in user.
|
63
|
+
attr_accessor :group_key
|
64
|
+
|
65
|
+
##
|
66
|
+
# @return [Boolean] Returns true if authentication for this API was successful.
|
67
|
+
attr_accessor :logged_in
|
68
|
+
|
69
|
+
##
|
70
|
+
# @return [String] The error message.
|
71
|
+
attr_accessor :error_message
|
72
|
+
|
73
|
+
##
|
74
|
+
# @return [String] The set of roles for this user.
|
75
|
+
attr_accessor :roles
|
76
|
+
|
77
|
+
##
|
78
|
+
# @return [Date-time] Date and time user has last logged into Azure B2C.
|
79
|
+
attr_accessor :last_logged_in
|
80
|
+
|
81
|
+
##
|
82
|
+
# @return [Uuid] The id of the API key used to authenticate.
|
83
|
+
attr_accessor :api_key_id
|
84
|
+
|
85
|
+
##
|
86
|
+
# @return [String] If authentication is successful, contains the user status of the logged-in user.
|
87
|
+
attr_accessor :user_status
|
88
|
+
|
89
|
+
##
|
90
|
+
# @return [String] The environment currently being used
|
91
|
+
attr_accessor :environment
|
92
|
+
|
93
|
+
##
|
94
|
+
# @return [String] The version currently being used
|
95
|
+
attr_accessor :version
|
96
|
+
|
97
|
+
##
|
98
|
+
# @return [Object] Statuses for the dependencies of this api. OK if the dependency is working.
|
99
|
+
attr_accessor :dependencies
|
100
|
+
|
101
|
+
##
|
102
|
+
# @return [object] This object as a JSON key-value structure
|
103
|
+
def as_json(options={})
|
104
|
+
{
|
105
|
+
'userName' => @user_name,
|
106
|
+
'accountName' => @account_name,
|
107
|
+
'accountCompanyId' => @account_company_id,
|
108
|
+
'userId' => @user_id,
|
109
|
+
'groupKey' => @group_key,
|
110
|
+
'loggedIn' => @logged_in,
|
111
|
+
'errorMessage' => @error_message,
|
112
|
+
'roles' => @roles,
|
113
|
+
'lastLoggedIn' => @last_logged_in,
|
114
|
+
'apiKeyId' => @api_key_id,
|
115
|
+
'userStatus' => @user_status,
|
116
|
+
'environment' => @environment,
|
117
|
+
'version' => @version,
|
118
|
+
'dependencies' => @dependencies,
|
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
|
+
# Contains information about a sync process for an entity.
|
24
|
+
class SyncEntityResultModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the SyncEntityResultModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@insert_count = params.dig(:insert_count)
|
30
|
+
@update_count = params.dig(:update_count)
|
31
|
+
@skip_count = params.dig(:skip_count)
|
32
|
+
@error_count = params.dig(:error_count)
|
33
|
+
@errors = params.dig(:errors)
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# @return [Int32] The number of entities inserted
|
38
|
+
attr_accessor :insert_count
|
39
|
+
|
40
|
+
##
|
41
|
+
# @return [Int32] The number of entities updated
|
42
|
+
attr_accessor :update_count
|
43
|
+
|
44
|
+
##
|
45
|
+
# @return [Int32] The number of entities skipped
|
46
|
+
attr_accessor :skip_count
|
47
|
+
|
48
|
+
##
|
49
|
+
# @return [Int32] The number of errors encountered during sync
|
50
|
+
attr_accessor :error_count
|
51
|
+
|
52
|
+
##
|
53
|
+
# @return [Object] The errors encountered during sync keyed by ERP key
|
54
|
+
attr_accessor :errors
|
55
|
+
|
56
|
+
##
|
57
|
+
# @return [object] This object as a JSON key-value structure
|
58
|
+
def as_json(options={})
|
59
|
+
{
|
60
|
+
'insertCount' => @insert_count,
|
61
|
+
'updateCount' => @update_count,
|
62
|
+
'skipCount' => @skip_count,
|
63
|
+
'errorCount' => @error_count,
|
64
|
+
'errors' => @errors,
|
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,98 @@
|
|
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 request to sync data
|
24
|
+
class SyncRequestModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the SyncRequestModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@sync_request_id = params.dig(:sync_request_id)
|
30
|
+
@group_key = params.dig(:group_key)
|
31
|
+
@status_code = params.dig(:status_code)
|
32
|
+
@process_result_message = params.dig(:process_result_message)
|
33
|
+
@app_enrollment_id = params.dig(:app_enrollment_id)
|
34
|
+
@created = params.dig(:created)
|
35
|
+
@modified = params.dig(:modified)
|
36
|
+
@modified_user_id = params.dig(:modified_user_id)
|
37
|
+
@details = params.dig(:details)
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# @return [Uuid] The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
|
42
|
+
attr_accessor :sync_request_id
|
43
|
+
|
44
|
+
##
|
45
|
+
# @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).
|
46
|
+
attr_accessor :group_key
|
47
|
+
|
48
|
+
##
|
49
|
+
# @return [String] Potential values = Cancelled, Ready, In Progress, Success, Failed
|
50
|
+
attr_accessor :status_code
|
51
|
+
|
52
|
+
##
|
53
|
+
# @return [String] Message containing information about the sync request results
|
54
|
+
attr_accessor :process_result_message
|
55
|
+
|
56
|
+
##
|
57
|
+
# @return [Uuid] App enrollment sync request is for
|
58
|
+
attr_accessor :app_enrollment_id
|
59
|
+
|
60
|
+
##
|
61
|
+
# @return [Date-time] The date this sync request was created
|
62
|
+
attr_accessor :created
|
63
|
+
|
64
|
+
##
|
65
|
+
# @return [Date-time] The date this sync request was last modified
|
66
|
+
attr_accessor :modified
|
67
|
+
|
68
|
+
##
|
69
|
+
# @return [Uuid] The ID number of the user who most recently modified this sync request.
|
70
|
+
attr_accessor :modified_user_id
|
71
|
+
|
72
|
+
##
|
73
|
+
# @return [Object] The detailed results from the sync. To retrieve this collection, set `includeDetails` to true in your GET requests.
|
74
|
+
attr_accessor :details
|
75
|
+
|
76
|
+
##
|
77
|
+
# @return [object] This object as a JSON key-value structure
|
78
|
+
def as_json(options={})
|
79
|
+
{
|
80
|
+
'syncRequestId' => @sync_request_id,
|
81
|
+
'groupKey' => @group_key,
|
82
|
+
'statusCode' => @status_code,
|
83
|
+
'processResultMessage' => @process_result_message,
|
84
|
+
'appEnrollmentId' => @app_enrollment_id,
|
85
|
+
'created' => @created,
|
86
|
+
'modified' => @modified,
|
87
|
+
'modifiedUserId' => @modified_user_id,
|
88
|
+
'details' => @details,
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
##
|
93
|
+
# @return [String] This object converted to a JSON string
|
94
|
+
def to_json(*options)
|
95
|
+
"[#{as_json(*options).to_json(*options)}]"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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
|
+
# Model representing information for a sync request
|
24
|
+
class SyncSubmitModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the SyncSubmitModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@app_enrollment_id = params.dig(:app_enrollment_id)
|
30
|
+
end
|
31
|
+
|
32
|
+
##
|
33
|
+
# @return [Uuid] The identifier of the app enrollment
|
34
|
+
attr_accessor :app_enrollment_id
|
35
|
+
|
36
|
+
##
|
37
|
+
# @return [object] This object as a JSON key-value structure
|
38
|
+
def as_json(options={})
|
39
|
+
{
|
40
|
+
'appEnrollmentId' => @app_enrollment_id,
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
##
|
45
|
+
# @return [String] This object converted to a JSON string
|
46
|
+
def to_json(*options)
|
47
|
+
"[#{as_json(*options).to_json(*options)}]"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
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
|
+
# Model from the transfer ownership process.
|
24
|
+
class TransferOwnerModel
|
25
|
+
|
26
|
+
##
|
27
|
+
# Initialize the TransferOwnerModel using the provided prototype
|
28
|
+
def initialize(params = {})
|
29
|
+
@previous_owner = params.dig(:previous_owner)
|
30
|
+
@new_owner = params.dig(:new_owner)
|
31
|
+
end
|
32
|
+
|
33
|
+
##
|
34
|
+
# @return [UserAccountModel] The previous owner of the account.
|
35
|
+
attr_accessor :previous_owner
|
36
|
+
|
37
|
+
##
|
38
|
+
# @return [UserAccountModel] The new owner of the account.
|
39
|
+
attr_accessor :new_owner
|
40
|
+
|
41
|
+
##
|
42
|
+
# @return [object] This object as a JSON key-value structure
|
43
|
+
def as_json(options={})
|
44
|
+
{
|
45
|
+
'previousOwner' => @previous_owner,
|
46
|
+
'newOwner' => @new_owner,
|
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
|