stackone_client 0.5.9 → 0.6.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/stack_one/accounts.rb +97 -15
- data/lib/stack_one/ats.rb +1442 -288
- data/lib/stack_one/connect_sessions.rb +40 -6
- data/lib/stack_one/connectors.rb +40 -6
- data/lib/stack_one/crm.rb +192 -30
- data/lib/stack_one/hris.rb +1164 -234
- data/lib/stack_one/iam.rb +154 -24
- data/lib/stack_one/lms.rb +515 -81
- data/lib/stack_one/marketing.rb +496 -78
- data/lib/stack_one/models/operations/ats_get_application_custom_field_definition_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_get_application_document_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_application_note_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_application_offer_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_application_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_application_scheduled_interview_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_application_scorecard_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_assessments_package_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_assessments_request_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_assessments_result_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_background_check_package_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_background_check_request_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_background_check_result_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_candidate_custom_field_definition_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_get_candidate_note_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_candidate_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_department_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_interview_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_interview_stage_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_job_custom_field_definition_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_get_job_posting_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_job_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_list_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_location_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_offer_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_rejected_reason_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_user_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_list_application_custom_field_definitions_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_application_documents_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_application_notes_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_application_scorecards_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_applications_offers_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_applications_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_applications_scheduled_interviews_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_assessments_packages_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_background_check_packages_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_background_check_request_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_candidate_custom_field_definitions_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_candidate_notes_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_candidates_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_departments_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_interview_stages_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_interviews_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_job_custom_field_definitions_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_job_postings_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_jobs_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_lists_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_locations_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_offers_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_rejected_reasons_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_users_request.rb +2 -2
- data/lib/stack_one/models/operations/crm_get_account_request.rb +1 -1
- data/lib/stack_one/models/operations/crm_get_contact_custom_field_definition_request.rb +2 -2
- data/lib/stack_one/models/operations/crm_get_contact_request.rb +1 -1
- data/lib/stack_one/models/operations/crm_get_list_request.rb +1 -1
- data/lib/stack_one/models/operations/crm_list_accounts_request.rb +2 -2
- data/lib/stack_one/models/operations/crm_list_contact_custom_field_definitions_request.rb +2 -2
- data/lib/stack_one/models/operations/crm_list_contacts_request.rb +2 -2
- data/lib/stack_one/models/operations/crm_list_lists_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_get_benefit_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_company_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_cost_center_group_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_department_group_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_custom_field_definition_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_get_employee_document_category_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_document_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_employment_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_skill_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_time_off_balance_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employees_time_off_request_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employees_work_eligibility_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employment_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_group_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_job_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_location_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_location_response.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_team_group_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_time_entries_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_time_off_policy_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_time_off_request_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_time_off_type_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_list_benefits_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_companies_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_cost_center_groups_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_department_groups_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_categories_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_custom_field_definitions_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_documents_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_employments_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_skills_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_time_off_balances_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_time_off_requests_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_work_eligibility_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employees_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employments_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_groups_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_jobs_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_locations_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_locations_response.rb +1 -1
- data/lib/stack_one/models/operations/hris_list_team_groups_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_time_entries_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_time_off_policies_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_time_off_requests_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_time_off_types_request.rb +2 -2
- data/lib/stack_one/models/operations/iam_get_group_request.rb +1 -1
- data/lib/stack_one/models/operations/iam_get_policy_request.rb +1 -1
- data/lib/stack_one/models/operations/iam_get_role_request.rb +1 -1
- data/lib/stack_one/models/operations/iam_get_user_request.rb +1 -1
- data/lib/stack_one/models/operations/iam_list_groups_request.rb +2 -2
- data/lib/stack_one/models/operations/iam_list_policies_request.rb +2 -2
- data/lib/stack_one/models/operations/iam_list_roles_request.rb +2 -2
- data/lib/stack_one/models/operations/iam_list_users_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_get_assignment_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_category_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_completion_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_content_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_course_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_skill_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_user_assignment_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_user_completion_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_user_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_list_assignments_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_categories_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_completions_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_content_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_courses_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_skills_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_user_assignments_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_user_completions_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_users_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_get_campaign_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_content_block_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_email_template_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_in_app_template_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_omni_channel_template_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_push_template_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_sms_template_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_list_campaigns_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_content_blocks_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_email_templates_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_in_app_templates_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_omni_channel_templates_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_push_templates_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_sms_templates_request.rb +2 -2
- data/lib/stack_one/models/shared/categories.rb +2 -0
- data/lib/stack_one/models/shared/company.rb +5 -2
- data/lib/stack_one/models/shared/connectorsmeta_category.rb +2 -0
- data/lib/stack_one/models/shared/connectsessioncreate_categories.rb +2 -0
- data/lib/stack_one/models/shared/connectsessiontokenauthlink_categories.rb +2 -0
- data/lib/stack_one/models/shared/createemploymentapimodel.rb +4 -5
- data/lib/stack_one/models/shared/employee_company.rb +5 -2
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto.rb +10 -8
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_employment.rb +56 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_pay_frequency.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_pay_period.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_contract_type.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_employment_contract_type_value.rb +20 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_employment_type_value.rb +33 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_pay_period_value.rb +29 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_type.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_value.rb +31 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_state.rb +3 -3
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto.rb +4 -5
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto.rb +8 -8
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_employment.rb +56 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_pay_frequency.rb +27 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_pay_period.rb +27 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_contract_type.rb +27 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_employment_contract_type_value.rb +20 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_employment_type_value.rb +33 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_pay_period_value.rb +29 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_type.rb +27 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_value.rb +31 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_state.rb +3 -3
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_state.rb +3 -3
- data/lib/stack_one/models/shared/linkedaccountmeta_category.rb +2 -0
- data/lib/stack_one/models/shared/state.rb +3 -3
- data/lib/stack_one/models/shared/updateemployeeapimodel.rb +8 -8
- data/lib/stack_one/models/shared/updateemployeeapimodel_employment.rb +56 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_pay_frequency.rb +27 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_pay_period.rb +27 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_contract_type.rb +27 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_employment_contract_type_value.rb +20 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_employment_type_value.rb +33 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_pay_period_value.rb +29 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_type.rb +27 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_value.rb +31 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_state.rb +3 -3
- data/lib/stack_one/models/shared/updateemployeeapimodel_state.rb +3 -3
- data/lib/stack_one/models/shared/updatepackage.rb +5 -2
- data/lib/stack_one/models/shared.rb +27 -6
- data/lib/stack_one/proxy.rb +21 -3
- data/lib/stack_one/sdkconfiguration.rb +18 -7
- data/lib/stack_one/stackone.rb +8 -3
- data/lib/stack_one/utils/retries.rb +95 -0
- metadata +60 -10
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_home_location_state_value.rb +0 -3840
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_work_location_state_value.rb +0 -3840
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_home_location_state_value.rb +0 -3840
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_work_location_state_value.rb +0 -3840
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_home_location_state_value.rb +0 -3840
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_work_location_state_value.rb +0 -3840
@@ -5,7 +5,9 @@
|
|
5
5
|
|
6
6
|
require 'faraday'
|
7
7
|
require 'faraday/multipart'
|
8
|
+
require 'faraday/retry'
|
8
9
|
require 'sorbet-runtime'
|
10
|
+
require_relative 'utils/retries'
|
9
11
|
|
10
12
|
module StackOne
|
11
13
|
extend T::Sig
|
@@ -19,8 +21,8 @@ module StackOne
|
|
19
21
|
end
|
20
22
|
|
21
23
|
|
22
|
-
sig { params(request: ::StackOne::Shared::ConnectSessionAuthenticate).returns(::StackOne::Operations::StackoneAuthenticateConnectSessionResponse) }
|
23
|
-
def authenticate_connect_session(request)
|
24
|
+
sig { params(request: ::StackOne::Shared::ConnectSessionAuthenticate, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::StackoneAuthenticateConnectSessionResponse) }
|
25
|
+
def authenticate_connect_session(request, retries = nil)
|
24
26
|
# authenticate_connect_session - Authenticate Connect Session
|
25
27
|
url, params = @sdk_configuration.get_server_details
|
26
28
|
base_url = Utils.template_url(url, params)
|
@@ -31,8 +33,24 @@ module StackOne
|
|
31
33
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
32
34
|
headers['Accept'] = 'application/json'
|
33
35
|
headers['user-agent'] = @sdk_configuration.user_agent
|
36
|
+
retries ||= @sdk_configuration.retry_config
|
37
|
+
retries ||= Utils::RetryConfig.new(
|
38
|
+
backoff: Utils::BackoffStrategy.new(
|
39
|
+
exponent: 1.5,
|
40
|
+
initial_interval: 500,
|
41
|
+
max_elapsed_time: 3_600_000,
|
42
|
+
max_interval: 60_000
|
43
|
+
),
|
44
|
+
retry_connection_errors: true,
|
45
|
+
strategy: 'backoff'
|
46
|
+
)
|
47
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
48
|
+
retry_options[:retry_statuses] = [429, 408]
|
49
|
+
|
50
|
+
connection = @sdk_configuration.client.dup
|
51
|
+
connection.request :retry, retry_options
|
34
52
|
|
35
|
-
r =
|
53
|
+
r = connection.post(url) do |req|
|
36
54
|
req.headers = headers
|
37
55
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
38
56
|
Utils.configure_request_security(req, security) if !security.nil?
|
@@ -65,8 +83,8 @@ module StackOne
|
|
65
83
|
end
|
66
84
|
|
67
85
|
|
68
|
-
sig { params(request: ::StackOne::Shared::ConnectSessionCreate).returns(::StackOne::Operations::StackoneCreateConnectSessionResponse) }
|
69
|
-
def create_connect_session(request)
|
86
|
+
sig { params(request: ::StackOne::Shared::ConnectSessionCreate, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::StackoneCreateConnectSessionResponse) }
|
87
|
+
def create_connect_session(request, retries = nil)
|
70
88
|
# create_connect_session - Create Connect Session
|
71
89
|
url, params = @sdk_configuration.get_server_details
|
72
90
|
base_url = Utils.template_url(url, params)
|
@@ -77,8 +95,24 @@ module StackOne
|
|
77
95
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
78
96
|
headers['Accept'] = 'application/json'
|
79
97
|
headers['user-agent'] = @sdk_configuration.user_agent
|
98
|
+
retries ||= @sdk_configuration.retry_config
|
99
|
+
retries ||= Utils::RetryConfig.new(
|
100
|
+
backoff: Utils::BackoffStrategy.new(
|
101
|
+
exponent: 1.5,
|
102
|
+
initial_interval: 500,
|
103
|
+
max_elapsed_time: 3_600_000,
|
104
|
+
max_interval: 60_000
|
105
|
+
),
|
106
|
+
retry_connection_errors: true,
|
107
|
+
strategy: 'backoff'
|
108
|
+
)
|
109
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
110
|
+
retry_options[:retry_statuses] = [429, 408]
|
111
|
+
|
112
|
+
connection = @sdk_configuration.client.dup
|
113
|
+
connection.request :retry, retry_options
|
80
114
|
|
81
|
-
r =
|
115
|
+
r = connection.post(url) do |req|
|
82
116
|
req.headers = headers
|
83
117
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
84
118
|
Utils.configure_request_security(req, security) if !security.nil?
|
data/lib/stack_one/connectors.rb
CHANGED
@@ -5,7 +5,9 @@
|
|
5
5
|
|
6
6
|
require 'faraday'
|
7
7
|
require 'faraday/multipart'
|
8
|
+
require 'faraday/retry'
|
8
9
|
require 'sorbet-runtime'
|
10
|
+
require_relative 'utils/retries'
|
9
11
|
|
10
12
|
module StackOne
|
11
13
|
extend T::Sig
|
@@ -19,8 +21,8 @@ module StackOne
|
|
19
21
|
end
|
20
22
|
|
21
23
|
|
22
|
-
sig { params(provider: ::String, include: T.nilable(::String)).returns(::StackOne::Operations::StackoneGetConnectorMetaResponse) }
|
23
|
-
def get_connector_meta(provider, include = nil)
|
24
|
+
sig { params(provider: ::String, include: T.nilable(::String), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::StackoneGetConnectorMetaResponse) }
|
25
|
+
def get_connector_meta(provider, include = nil, retries = nil)
|
24
26
|
# get_connector_meta - Get Connector Meta information for the given provider key
|
25
27
|
request = ::StackOne::Operations::StackoneGetConnectorMetaRequest.new(
|
26
28
|
|
@@ -39,8 +41,24 @@ module StackOne
|
|
39
41
|
query_params = Utils.get_query_params(::StackOne::Operations::StackoneGetConnectorMetaRequest, request)
|
40
42
|
headers['Accept'] = 'application/json'
|
41
43
|
headers['user-agent'] = @sdk_configuration.user_agent
|
44
|
+
retries ||= @sdk_configuration.retry_config
|
45
|
+
retries ||= Utils::RetryConfig.new(
|
46
|
+
backoff: Utils::BackoffStrategy.new(
|
47
|
+
exponent: 1.5,
|
48
|
+
initial_interval: 500,
|
49
|
+
max_elapsed_time: 3_600_000,
|
50
|
+
max_interval: 60_000
|
51
|
+
),
|
52
|
+
retry_connection_errors: true,
|
53
|
+
strategy: 'backoff'
|
54
|
+
)
|
55
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
56
|
+
retry_options[:retry_statuses] = [429, 408]
|
57
|
+
|
58
|
+
connection = @sdk_configuration.client.dup
|
59
|
+
connection.request :retry, retry_options
|
42
60
|
|
43
|
-
r =
|
61
|
+
r = connection.get(url) do |req|
|
44
62
|
req.headers = headers
|
45
63
|
req.params = query_params
|
46
64
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
@@ -67,8 +85,8 @@ module StackOne
|
|
67
85
|
end
|
68
86
|
|
69
87
|
|
70
|
-
sig { params(include: T.nilable(::String)).returns(::StackOne::Operations::StackoneListConnectorsMetaResponse) }
|
71
|
-
def list_connectors_meta(include = nil)
|
88
|
+
sig { params(include: T.nilable(::String), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::StackoneListConnectorsMetaResponse) }
|
89
|
+
def list_connectors_meta(include = nil, retries = nil)
|
72
90
|
# list_connectors_meta - List Connectors Meta Information for all providers
|
73
91
|
request = ::StackOne::Operations::StackoneListConnectorsMetaRequest.new(
|
74
92
|
|
@@ -81,8 +99,24 @@ module StackOne
|
|
81
99
|
query_params = Utils.get_query_params(::StackOne::Operations::StackoneListConnectorsMetaRequest, request)
|
82
100
|
headers['Accept'] = 'application/json'
|
83
101
|
headers['user-agent'] = @sdk_configuration.user_agent
|
102
|
+
retries ||= @sdk_configuration.retry_config
|
103
|
+
retries ||= Utils::RetryConfig.new(
|
104
|
+
backoff: Utils::BackoffStrategy.new(
|
105
|
+
exponent: 1.5,
|
106
|
+
initial_interval: 500,
|
107
|
+
max_elapsed_time: 3_600_000,
|
108
|
+
max_interval: 60_000
|
109
|
+
),
|
110
|
+
retry_connection_errors: true,
|
111
|
+
strategy: 'backoff'
|
112
|
+
)
|
113
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
114
|
+
retry_options[:retry_statuses] = [429, 408]
|
115
|
+
|
116
|
+
connection = @sdk_configuration.client.dup
|
117
|
+
connection.request :retry, retry_options
|
84
118
|
|
85
|
-
r =
|
119
|
+
r = connection.get(url) do |req|
|
86
120
|
req.headers = headers
|
87
121
|
req.params = query_params
|
88
122
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
data/lib/stack_one/crm.rb
CHANGED
@@ -5,7 +5,9 @@
|
|
5
5
|
|
6
6
|
require 'faraday'
|
7
7
|
require 'faraday/multipart'
|
8
|
+
require 'faraday/retry'
|
8
9
|
require 'sorbet-runtime'
|
10
|
+
require_relative 'utils/retries'
|
9
11
|
|
10
12
|
module StackOne
|
11
13
|
extend T::Sig
|
@@ -19,8 +21,8 @@ module StackOne
|
|
19
21
|
end
|
20
22
|
|
21
23
|
|
22
|
-
sig { params(crm_create_contact_request_dto: ::StackOne::Shared::CrmCreateContactRequestDto, x_account_id: ::String).returns(::StackOne::Operations::CrmCreateContactResponse) }
|
23
|
-
def create_contact(crm_create_contact_request_dto, x_account_id)
|
24
|
+
sig { params(crm_create_contact_request_dto: ::StackOne::Shared::CrmCreateContactRequestDto, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::CrmCreateContactResponse) }
|
25
|
+
def create_contact(crm_create_contact_request_dto, x_account_id, retries = nil)
|
24
26
|
# create_contact - Creates a new Contact
|
25
27
|
request = ::StackOne::Operations::CrmCreateContactRequest.new(
|
26
28
|
|
@@ -36,8 +38,24 @@ module StackOne
|
|
36
38
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
37
39
|
headers['Accept'] = 'application/json'
|
38
40
|
headers['user-agent'] = @sdk_configuration.user_agent
|
41
|
+
retries ||= @sdk_configuration.retry_config
|
42
|
+
retries ||= Utils::RetryConfig.new(
|
43
|
+
backoff: Utils::BackoffStrategy.new(
|
44
|
+
exponent: 1.5,
|
45
|
+
initial_interval: 500,
|
46
|
+
max_elapsed_time: 3_600_000,
|
47
|
+
max_interval: 60_000
|
48
|
+
),
|
49
|
+
retry_connection_errors: true,
|
50
|
+
strategy: 'backoff'
|
51
|
+
)
|
52
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
53
|
+
retry_options[:retry_statuses] = [429, 408]
|
54
|
+
|
55
|
+
connection = @sdk_configuration.client.dup
|
56
|
+
connection.request :retry, retry_options
|
39
57
|
|
40
|
-
r =
|
58
|
+
r = connection.post(url) do |req|
|
41
59
|
req.headers = headers
|
42
60
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
43
61
|
Utils.configure_request_security(req, security) if !security.nil?
|
@@ -70,8 +88,8 @@ module StackOne
|
|
70
88
|
end
|
71
89
|
|
72
90
|
|
73
|
-
sig { params(request: T.nilable(::StackOne::Operations::CrmGetAccountRequest)).returns(::StackOne::Operations::CrmGetAccountResponse) }
|
74
|
-
def get_account(request)
|
91
|
+
sig { params(request: T.nilable(::StackOne::Operations::CrmGetAccountRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::CrmGetAccountResponse) }
|
92
|
+
def get_account(request, retries = nil)
|
75
93
|
# get_account - Get Account
|
76
94
|
url, params = @sdk_configuration.get_server_details
|
77
95
|
base_url = Utils.template_url(url, params)
|
@@ -85,8 +103,24 @@ module StackOne
|
|
85
103
|
query_params = Utils.get_query_params(::StackOne::Operations::CrmGetAccountRequest, request)
|
86
104
|
headers['Accept'] = 'application/json'
|
87
105
|
headers['user-agent'] = @sdk_configuration.user_agent
|
106
|
+
retries ||= @sdk_configuration.retry_config
|
107
|
+
retries ||= Utils::RetryConfig.new(
|
108
|
+
backoff: Utils::BackoffStrategy.new(
|
109
|
+
exponent: 1.5,
|
110
|
+
initial_interval: 500,
|
111
|
+
max_elapsed_time: 3_600_000,
|
112
|
+
max_interval: 60_000
|
113
|
+
),
|
114
|
+
retry_connection_errors: true,
|
115
|
+
strategy: 'backoff'
|
116
|
+
)
|
117
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
118
|
+
retry_options[:retry_statuses] = [429, 408]
|
88
119
|
|
89
|
-
|
120
|
+
connection = @sdk_configuration.client.dup
|
121
|
+
connection.request :retry, retry_options
|
122
|
+
|
123
|
+
r = connection.get(url) do |req|
|
90
124
|
req.headers = headers
|
91
125
|
req.params = query_params
|
92
126
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
@@ -113,8 +147,8 @@ module StackOne
|
|
113
147
|
end
|
114
148
|
|
115
149
|
|
116
|
-
sig { params(request: T.nilable(::StackOne::Operations::CrmGetContactRequest)).returns(::StackOne::Operations::CrmGetContactResponse) }
|
117
|
-
def get_contact(request)
|
150
|
+
sig { params(request: T.nilable(::StackOne::Operations::CrmGetContactRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::CrmGetContactResponse) }
|
151
|
+
def get_contact(request, retries = nil)
|
118
152
|
# get_contact - Get Contact
|
119
153
|
url, params = @sdk_configuration.get_server_details
|
120
154
|
base_url = Utils.template_url(url, params)
|
@@ -128,8 +162,24 @@ module StackOne
|
|
128
162
|
query_params = Utils.get_query_params(::StackOne::Operations::CrmGetContactRequest, request)
|
129
163
|
headers['Accept'] = 'application/json'
|
130
164
|
headers['user-agent'] = @sdk_configuration.user_agent
|
165
|
+
retries ||= @sdk_configuration.retry_config
|
166
|
+
retries ||= Utils::RetryConfig.new(
|
167
|
+
backoff: Utils::BackoffStrategy.new(
|
168
|
+
exponent: 1.5,
|
169
|
+
initial_interval: 500,
|
170
|
+
max_elapsed_time: 3_600_000,
|
171
|
+
max_interval: 60_000
|
172
|
+
),
|
173
|
+
retry_connection_errors: true,
|
174
|
+
strategy: 'backoff'
|
175
|
+
)
|
176
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
177
|
+
retry_options[:retry_statuses] = [429, 408]
|
131
178
|
|
132
|
-
|
179
|
+
connection = @sdk_configuration.client.dup
|
180
|
+
connection.request :retry, retry_options
|
181
|
+
|
182
|
+
r = connection.get(url) do |req|
|
133
183
|
req.headers = headers
|
134
184
|
req.params = query_params
|
135
185
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
@@ -156,8 +206,8 @@ module StackOne
|
|
156
206
|
end
|
157
207
|
|
158
208
|
|
159
|
-
sig { params(request: T.nilable(::StackOne::Operations::CrmGetContactCustomFieldDefinitionRequest)).returns(::StackOne::Operations::CrmGetContactCustomFieldDefinitionResponse) }
|
160
|
-
def get_contact_custom_field_definition(request)
|
209
|
+
sig { params(request: T.nilable(::StackOne::Operations::CrmGetContactCustomFieldDefinitionRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::CrmGetContactCustomFieldDefinitionResponse) }
|
210
|
+
def get_contact_custom_field_definition(request, retries = nil)
|
161
211
|
# get_contact_custom_field_definition - Get Contact Custom Field Definition
|
162
212
|
url, params = @sdk_configuration.get_server_details
|
163
213
|
base_url = Utils.template_url(url, params)
|
@@ -171,8 +221,24 @@ module StackOne
|
|
171
221
|
query_params = Utils.get_query_params(::StackOne::Operations::CrmGetContactCustomFieldDefinitionRequest, request)
|
172
222
|
headers['Accept'] = 'application/json'
|
173
223
|
headers['user-agent'] = @sdk_configuration.user_agent
|
224
|
+
retries ||= @sdk_configuration.retry_config
|
225
|
+
retries ||= Utils::RetryConfig.new(
|
226
|
+
backoff: Utils::BackoffStrategy.new(
|
227
|
+
exponent: 1.5,
|
228
|
+
initial_interval: 500,
|
229
|
+
max_elapsed_time: 3_600_000,
|
230
|
+
max_interval: 60_000
|
231
|
+
),
|
232
|
+
retry_connection_errors: true,
|
233
|
+
strategy: 'backoff'
|
234
|
+
)
|
235
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
236
|
+
retry_options[:retry_statuses] = [429, 408]
|
237
|
+
|
238
|
+
connection = @sdk_configuration.client.dup
|
239
|
+
connection.request :retry, retry_options
|
174
240
|
|
175
|
-
r =
|
241
|
+
r = connection.get(url) do |req|
|
176
242
|
req.headers = headers
|
177
243
|
req.params = query_params
|
178
244
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
@@ -199,8 +265,8 @@ module StackOne
|
|
199
265
|
end
|
200
266
|
|
201
267
|
|
202
|
-
sig { params(request: T.nilable(::StackOne::Operations::CrmGetListRequest)).returns(::StackOne::Operations::CrmGetListResponse) }
|
203
|
-
def get_list(request)
|
268
|
+
sig { params(request: T.nilable(::StackOne::Operations::CrmGetListRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::CrmGetListResponse) }
|
269
|
+
def get_list(request, retries = nil)
|
204
270
|
# get_list - Get List
|
205
271
|
url, params = @sdk_configuration.get_server_details
|
206
272
|
base_url = Utils.template_url(url, params)
|
@@ -214,8 +280,24 @@ module StackOne
|
|
214
280
|
query_params = Utils.get_query_params(::StackOne::Operations::CrmGetListRequest, request)
|
215
281
|
headers['Accept'] = 'application/json'
|
216
282
|
headers['user-agent'] = @sdk_configuration.user_agent
|
283
|
+
retries ||= @sdk_configuration.retry_config
|
284
|
+
retries ||= Utils::RetryConfig.new(
|
285
|
+
backoff: Utils::BackoffStrategy.new(
|
286
|
+
exponent: 1.5,
|
287
|
+
initial_interval: 500,
|
288
|
+
max_elapsed_time: 3_600_000,
|
289
|
+
max_interval: 60_000
|
290
|
+
),
|
291
|
+
retry_connection_errors: true,
|
292
|
+
strategy: 'backoff'
|
293
|
+
)
|
294
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
295
|
+
retry_options[:retry_statuses] = [429, 408]
|
296
|
+
|
297
|
+
connection = @sdk_configuration.client.dup
|
298
|
+
connection.request :retry, retry_options
|
217
299
|
|
218
|
-
r =
|
300
|
+
r = connection.get(url) do |req|
|
219
301
|
req.headers = headers
|
220
302
|
req.params = query_params
|
221
303
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
@@ -242,8 +324,8 @@ module StackOne
|
|
242
324
|
end
|
243
325
|
|
244
326
|
|
245
|
-
sig { params(request: T.nilable(::StackOne::Operations::CrmListAccountsRequest)).returns(::StackOne::Operations::CrmListAccountsResponse) }
|
246
|
-
def list_accounts(request)
|
327
|
+
sig { params(request: T.nilable(::StackOne::Operations::CrmListAccountsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::CrmListAccountsResponse) }
|
328
|
+
def list_accounts(request, retries = nil)
|
247
329
|
# list_accounts - List Accounts
|
248
330
|
url, params = @sdk_configuration.get_server_details
|
249
331
|
base_url = Utils.template_url(url, params)
|
@@ -252,8 +334,24 @@ module StackOne
|
|
252
334
|
query_params = Utils.get_query_params(::StackOne::Operations::CrmListAccountsRequest, request)
|
253
335
|
headers['Accept'] = 'application/json'
|
254
336
|
headers['user-agent'] = @sdk_configuration.user_agent
|
337
|
+
retries ||= @sdk_configuration.retry_config
|
338
|
+
retries ||= Utils::RetryConfig.new(
|
339
|
+
backoff: Utils::BackoffStrategy.new(
|
340
|
+
exponent: 1.5,
|
341
|
+
initial_interval: 500,
|
342
|
+
max_elapsed_time: 3_600_000,
|
343
|
+
max_interval: 60_000
|
344
|
+
),
|
345
|
+
retry_connection_errors: true,
|
346
|
+
strategy: 'backoff'
|
347
|
+
)
|
348
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
349
|
+
retry_options[:retry_statuses] = [429, 408]
|
350
|
+
|
351
|
+
connection = @sdk_configuration.client.dup
|
352
|
+
connection.request :retry, retry_options
|
255
353
|
|
256
|
-
r =
|
354
|
+
r = connection.get(url) do |req|
|
257
355
|
req.headers = headers
|
258
356
|
req.params = query_params
|
259
357
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
@@ -280,8 +378,8 @@ module StackOne
|
|
280
378
|
end
|
281
379
|
|
282
380
|
|
283
|
-
sig { params(request: T.nilable(::StackOne::Operations::CrmListContactCustomFieldDefinitionsRequest)).returns(::StackOne::Operations::CrmListContactCustomFieldDefinitionsResponse) }
|
284
|
-
def list_contact_custom_field_definitions(request)
|
381
|
+
sig { params(request: T.nilable(::StackOne::Operations::CrmListContactCustomFieldDefinitionsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::CrmListContactCustomFieldDefinitionsResponse) }
|
382
|
+
def list_contact_custom_field_definitions(request, retries = nil)
|
285
383
|
# list_contact_custom_field_definitions - List Contact Custom Field Definitions
|
286
384
|
url, params = @sdk_configuration.get_server_details
|
287
385
|
base_url = Utils.template_url(url, params)
|
@@ -290,8 +388,24 @@ module StackOne
|
|
290
388
|
query_params = Utils.get_query_params(::StackOne::Operations::CrmListContactCustomFieldDefinitionsRequest, request)
|
291
389
|
headers['Accept'] = 'application/json'
|
292
390
|
headers['user-agent'] = @sdk_configuration.user_agent
|
391
|
+
retries ||= @sdk_configuration.retry_config
|
392
|
+
retries ||= Utils::RetryConfig.new(
|
393
|
+
backoff: Utils::BackoffStrategy.new(
|
394
|
+
exponent: 1.5,
|
395
|
+
initial_interval: 500,
|
396
|
+
max_elapsed_time: 3_600_000,
|
397
|
+
max_interval: 60_000
|
398
|
+
),
|
399
|
+
retry_connection_errors: true,
|
400
|
+
strategy: 'backoff'
|
401
|
+
)
|
402
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
403
|
+
retry_options[:retry_statuses] = [429, 408]
|
293
404
|
|
294
|
-
|
405
|
+
connection = @sdk_configuration.client.dup
|
406
|
+
connection.request :retry, retry_options
|
407
|
+
|
408
|
+
r = connection.get(url) do |req|
|
295
409
|
req.headers = headers
|
296
410
|
req.params = query_params
|
297
411
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
@@ -318,8 +432,8 @@ module StackOne
|
|
318
432
|
end
|
319
433
|
|
320
434
|
|
321
|
-
sig { params(request: T.nilable(::StackOne::Operations::CrmListContactsRequest)).returns(::StackOne::Operations::CrmListContactsResponse) }
|
322
|
-
def list_contacts(request)
|
435
|
+
sig { params(request: T.nilable(::StackOne::Operations::CrmListContactsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::CrmListContactsResponse) }
|
436
|
+
def list_contacts(request, retries = nil)
|
323
437
|
# list_contacts - List Contacts
|
324
438
|
url, params = @sdk_configuration.get_server_details
|
325
439
|
base_url = Utils.template_url(url, params)
|
@@ -328,8 +442,24 @@ module StackOne
|
|
328
442
|
query_params = Utils.get_query_params(::StackOne::Operations::CrmListContactsRequest, request)
|
329
443
|
headers['Accept'] = 'application/json'
|
330
444
|
headers['user-agent'] = @sdk_configuration.user_agent
|
445
|
+
retries ||= @sdk_configuration.retry_config
|
446
|
+
retries ||= Utils::RetryConfig.new(
|
447
|
+
backoff: Utils::BackoffStrategy.new(
|
448
|
+
exponent: 1.5,
|
449
|
+
initial_interval: 500,
|
450
|
+
max_elapsed_time: 3_600_000,
|
451
|
+
max_interval: 60_000
|
452
|
+
),
|
453
|
+
retry_connection_errors: true,
|
454
|
+
strategy: 'backoff'
|
455
|
+
)
|
456
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
457
|
+
retry_options[:retry_statuses] = [429, 408]
|
331
458
|
|
332
|
-
|
459
|
+
connection = @sdk_configuration.client.dup
|
460
|
+
connection.request :retry, retry_options
|
461
|
+
|
462
|
+
r = connection.get(url) do |req|
|
333
463
|
req.headers = headers
|
334
464
|
req.params = query_params
|
335
465
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
@@ -356,8 +486,8 @@ module StackOne
|
|
356
486
|
end
|
357
487
|
|
358
488
|
|
359
|
-
sig { params(request: T.nilable(::StackOne::Operations::CrmListListsRequest)).returns(::StackOne::Operations::CrmListListsResponse) }
|
360
|
-
def list_lists(request)
|
489
|
+
sig { params(request: T.nilable(::StackOne::Operations::CrmListListsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::CrmListListsResponse) }
|
490
|
+
def list_lists(request, retries = nil)
|
361
491
|
# list_lists - Get all Lists
|
362
492
|
url, params = @sdk_configuration.get_server_details
|
363
493
|
base_url = Utils.template_url(url, params)
|
@@ -366,8 +496,24 @@ module StackOne
|
|
366
496
|
query_params = Utils.get_query_params(::StackOne::Operations::CrmListListsRequest, request)
|
367
497
|
headers['Accept'] = 'application/json'
|
368
498
|
headers['user-agent'] = @sdk_configuration.user_agent
|
499
|
+
retries ||= @sdk_configuration.retry_config
|
500
|
+
retries ||= Utils::RetryConfig.new(
|
501
|
+
backoff: Utils::BackoffStrategy.new(
|
502
|
+
exponent: 1.5,
|
503
|
+
initial_interval: 500,
|
504
|
+
max_elapsed_time: 3_600_000,
|
505
|
+
max_interval: 60_000
|
506
|
+
),
|
507
|
+
retry_connection_errors: true,
|
508
|
+
strategy: 'backoff'
|
509
|
+
)
|
510
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
511
|
+
retry_options[:retry_statuses] = [429, 408]
|
512
|
+
|
513
|
+
connection = @sdk_configuration.client.dup
|
514
|
+
connection.request :retry, retry_options
|
369
515
|
|
370
|
-
r =
|
516
|
+
r = connection.get(url) do |req|
|
371
517
|
req.headers = headers
|
372
518
|
req.params = query_params
|
373
519
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
@@ -394,8 +540,8 @@ module StackOne
|
|
394
540
|
end
|
395
541
|
|
396
542
|
|
397
|
-
sig { params(crm_create_contact_request_dto: ::StackOne::Shared::CrmCreateContactRequestDto, id: ::String, x_account_id: ::String).returns(::StackOne::Operations::CrmUpdateContactResponse) }
|
398
|
-
def update_contact(crm_create_contact_request_dto, id, x_account_id)
|
543
|
+
sig { params(crm_create_contact_request_dto: ::StackOne::Shared::CrmCreateContactRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::CrmUpdateContactResponse) }
|
544
|
+
def update_contact(crm_create_contact_request_dto, id, x_account_id, retries = nil)
|
399
545
|
# update_contact - Update Contact (early access)
|
400
546
|
request = ::StackOne::Operations::CrmUpdateContactRequest.new(
|
401
547
|
|
@@ -417,8 +563,24 @@ module StackOne
|
|
417
563
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
418
564
|
headers['Accept'] = 'application/json'
|
419
565
|
headers['user-agent'] = @sdk_configuration.user_agent
|
566
|
+
retries ||= @sdk_configuration.retry_config
|
567
|
+
retries ||= Utils::RetryConfig.new(
|
568
|
+
backoff: Utils::BackoffStrategy.new(
|
569
|
+
exponent: 1.5,
|
570
|
+
initial_interval: 500,
|
571
|
+
max_elapsed_time: 3_600_000,
|
572
|
+
max_interval: 60_000
|
573
|
+
),
|
574
|
+
retry_connection_errors: true,
|
575
|
+
strategy: 'backoff'
|
576
|
+
)
|
577
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
578
|
+
retry_options[:retry_statuses] = [429, 408]
|
579
|
+
|
580
|
+
connection = @sdk_configuration.client.dup
|
581
|
+
connection.request :retry, retry_options
|
420
582
|
|
421
|
-
r =
|
583
|
+
r = connection.patch(url) do |req|
|
422
584
|
req.headers = headers
|
423
585
|
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
424
586
|
Utils.configure_request_security(req, security) if !security.nil?
|