trustcomponent 0.0.1.beta.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/LICENSE.md +21 -0
- data/README.md +78 -0
- data/lib/trustcomponent/captcha.rb +24 -0
- data/lib/trustcomponent/client.rb +44 -0
- data/lib/trustcomponent/errors.rb +58 -0
- data/lib/trustcomponent/http_middleware.rb +83 -0
- data/lib/trustcomponent.rb +15 -0
- data/lib/trustcomponent_generated/api/analytics_server_events_api.rb +90 -0
- data/lib/trustcomponent_generated/api/analytics_websites_api.rb +527 -0
- data/lib/trustcomponent_generated/api/captcha_verifications_api.rb +88 -0
- data/lib/trustcomponent_generated/api/monitoring_heartbeats_api.rb +89 -0
- data/lib/trustcomponent_generated/api/platform_events_api.rb +106 -0
- data/lib/trustcomponent_generated/api/tax_validation_schedules_api.rb +147 -0
- data/lib/trustcomponent_generated/api/tax_validation_validation_results_api.rb +83 -0
- data/lib/trustcomponent_generated/api/tax_validation_validations_api.rb +156 -0
- data/lib/trustcomponent_generated/api_client.rb +441 -0
- data/lib/trustcomponent_generated/api_error.rb +58 -0
- data/lib/trustcomponent_generated/api_model_base.rb +88 -0
- data/lib/trustcomponent_generated/configuration.rb +400 -0
- data/lib/trustcomponent_generated/models/analytics_event_category_enum.rb +52 -0
- data/lib/trustcomponent_generated/models/analytics_realtime.rb +251 -0
- data/lib/trustcomponent_generated/models/analytics_realtime_page.rb +193 -0
- data/lib/trustcomponent_generated/models/analytics_realtime_point.rb +193 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_create_params.rb +295 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_commerce_create_params.rb +366 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_commerce_product_create_params.rb +298 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_create_params.rb +508 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_error_create_params.rb +269 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_refund_create_params.rb +211 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_result.rb +194 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_result_drop_reason_enum.rb +52 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_result_dropped.rb +213 -0
- data/lib/trustcomponent_generated/models/analytics_stats_breakdown.rb +351 -0
- data/lib/trustcomponent_generated/models/analytics_stats_breakdown_row.rb +201 -0
- data/lib/trustcomponent_generated/models/analytics_stats_breakdown_row_page.rb +226 -0
- data/lib/trustcomponent_generated/models/analytics_stats_conversions.rb +249 -0
- data/lib/trustcomponent_generated/models/analytics_stats_conversions_goal.rb +260 -0
- data/lib/trustcomponent_generated/models/analytics_stats_conversions_goal_revenue.rb +193 -0
- data/lib/trustcomponent_generated/models/analytics_stats_dimension_enum.rb +69 -0
- data/lib/trustcomponent_generated/models/analytics_stats_filter_match_mode_enum.rb +40 -0
- data/lib/trustcomponent_generated/models/analytics_stats_filter_operator_enum.rb +45 -0
- data/lib/trustcomponent_generated/models/analytics_stats_granularity_enum.rb +40 -0
- data/lib/trustcomponent_generated/models/analytics_stats_overview.rb +282 -0
- data/lib/trustcomponent_generated/models/analytics_stats_timeseries.rb +270 -0
- data/lib/trustcomponent_generated/models/analytics_stats_timeseries_point.rb +192 -0
- data/lib/trustcomponent_generated/models/analytics_stats_totals.rb +307 -0
- data/lib/trustcomponent_generated/models/analytics_website.rb +249 -0
- data/lib/trustcomponent_generated/models/analytics_websites_page.rb +249 -0
- data/lib/trustcomponent_generated/models/captcha_verification_result.rb +350 -0
- data/lib/trustcomponent_generated/models/platform_event.rb +439 -0
- data/lib/trustcomponent_generated/models/platform_event_actor.rb +218 -0
- data/lib/trustcomponent_generated/models/platform_event_actor_automation.rb +214 -0
- data/lib/trustcomponent_generated/models/platform_event_actor_automation_kind_enum.rb +41 -0
- data/lib/trustcomponent_generated/models/platform_event_actor_type_enum.rb +43 -0
- data/lib/trustcomponent_generated/models/platform_event_change.rb +263 -0
- data/lib/trustcomponent_generated/models/platform_event_change_operation_enum.rb +43 -0
- data/lib/trustcomponent_generated/models/platform_event_origin.rb +263 -0
- data/lib/trustcomponent_generated/models/platform_event_ref.rb +204 -0
- data/lib/trustcomponent_generated/models/platform_event_source_enum.rb +44 -0
- data/lib/trustcomponent_generated/models/platform_events_page.rb +314 -0
- data/lib/trustcomponent_generated/models/tax_validation_match_status_enum.rb +44 -0
- data/lib/trustcomponent_generated/models/tax_validation_provider_enum.rb +46 -0
- data/lib/trustcomponent_generated/models/tax_validation_provider_status_enum.rb +51 -0
- data/lib/trustcomponent_generated/models/tax_validation_schedule.rb +423 -0
- data/lib/trustcomponent_generated/models/tax_validation_schedule_create_params.rb +321 -0
- data/lib/trustcomponent_generated/models/tax_validation_tax_address.rb +188 -0
- data/lib/trustcomponent_generated/models/tax_validation_tax_identifier_scheme_enum.rb +49 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation.rb +372 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_address_match.rb +290 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_batch_create_params.rb +176 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_create_params.rb +292 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_frequency_enum.rb +41 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_input.rb +322 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_match.rb +238 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_mode_enum.rb +40 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_outcome_enum.rb +44 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_request_status_enum.rb +44 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_response_data.rb +177 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_result.rb +459 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_schedule_attach_params.rb +225 -0
- data/lib/trustcomponent_generated/models/tax_validation_verification_method_enum.rb +40 -0
- data/lib/trustcomponent_generated/modules.rb +51 -0
- data/lib/trustcomponent_generated/version.rb +15 -0
- data/lib/trustcomponent_generated.rb +110 -0
- metadata +190 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TrustComponent API
|
|
3
|
+
|
|
4
|
+
#The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.1-beta.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module TrustComponent::Generated
|
|
16
|
+
class MonitoringHeartbeatsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Registers a heartbeat ping of a heartbeat monitor
|
|
23
|
+
# Call this from the monitored system on its own schedule. When no ping arrives within the interval plus grace period of the monitor, the monitor goes into outage.
|
|
24
|
+
# @param service_id [String] Id of the service
|
|
25
|
+
# @param monitor_id [String] Id of the monitor
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [nil]
|
|
28
|
+
def ping_heartbeat(service_id, monitor_id, opts = {})
|
|
29
|
+
ping_heartbeat_with_http_info(service_id, monitor_id, opts)
|
|
30
|
+
nil
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Registers a heartbeat ping of a heartbeat monitor
|
|
34
|
+
# Call this from the monitored system on its own schedule. When no ping arrives within the interval plus grace period of the monitor, the monitor goes into outage.
|
|
35
|
+
# @param service_id [String] Id of the service
|
|
36
|
+
# @param monitor_id [String] Id of the monitor
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
39
|
+
def ping_heartbeat_with_http_info(service_id, monitor_id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: MonitoringHeartbeatsApi.ping_heartbeat ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'service_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling MonitoringHeartbeatsApi.ping_heartbeat"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'monitor_id' is set
|
|
48
|
+
if @api_client.config.client_side_validation && monitor_id.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'monitor_id' when calling MonitoringHeartbeatsApi.ping_heartbeat"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/monitoring/v1/heartbeats/{serviceId}/{monitorId}'.sub('{serviceId}', CGI.escape(service_id.to_s)).sub('{monitorId}', CGI.escape(monitor_id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
|
|
60
|
+
# form parameters
|
|
61
|
+
form_params = opts[:form_params] || {}
|
|
62
|
+
|
|
63
|
+
# http body (model)
|
|
64
|
+
post_body = opts[:debug_body]
|
|
65
|
+
|
|
66
|
+
# return_type
|
|
67
|
+
return_type = opts[:debug_return_type]
|
|
68
|
+
|
|
69
|
+
# auth_names
|
|
70
|
+
auth_names = opts[:debug_auth_names] || ['bearerApiKey']
|
|
71
|
+
|
|
72
|
+
new_options = opts.merge(
|
|
73
|
+
:operation => :"MonitoringHeartbeatsApi.ping_heartbeat",
|
|
74
|
+
:header_params => header_params,
|
|
75
|
+
:query_params => query_params,
|
|
76
|
+
:form_params => form_params,
|
|
77
|
+
:body => post_body,
|
|
78
|
+
:auth_names => auth_names,
|
|
79
|
+
:return_type => return_type
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
83
|
+
if @api_client.config.debugging
|
|
84
|
+
@api_client.config.logger.debug "API called: MonitoringHeartbeatsApi#ping_heartbeat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
85
|
+
end
|
|
86
|
+
return data, status_code, headers
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TrustComponent API
|
|
3
|
+
|
|
4
|
+
#The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.1-beta.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module TrustComponent::Generated
|
|
16
|
+
class PlatformEventsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Returns the audit log events of a time range
|
|
23
|
+
# Returns the audit log events of the project or organization the API key belongs to, newest first. Events older than the audit log retention of your plan are not returned. To read a time range completely, keep `from` and `to` fixed and pass the `nextCursor` of each response as `cursor` of the next request until `nextCursor` is null. Paging with `page` still works but shifts when new events arrive during the read.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :from Start of the time range (inclusive), ISO 8601 in UTC. Defaults to 24 hours before `to`.
|
|
26
|
+
# @option opts [String] :to End of the time range (inclusive), ISO 8601 in UTC. Defaults to now.
|
|
27
|
+
# @option opts [String] :cursor Position to continue after, taken from `nextCursor` of the previous response. When set, `page` is ignored.
|
|
28
|
+
# @option opts [Integer] :page Zero-based page index, ignored when `cursor` is set (default to 0)
|
|
29
|
+
# @option opts [Integer] :page_size Number of entries per page (default to 100)
|
|
30
|
+
# @return [PlatformEventsPage]
|
|
31
|
+
def get_events(opts = {})
|
|
32
|
+
data, _status_code, _headers = get_events_with_http_info(opts)
|
|
33
|
+
data
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns the audit log events of a time range
|
|
37
|
+
# Returns the audit log events of the project or organization the API key belongs to, newest first. Events older than the audit log retention of your plan are not returned. To read a time range completely, keep `from` and `to` fixed and pass the `nextCursor` of each response as `cursor` of the next request until `nextCursor` is null. Paging with `page` still works but shifts when new events arrive during the read.
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :from Start of the time range (inclusive), ISO 8601 in UTC. Defaults to 24 hours before `to`.
|
|
40
|
+
# @option opts [String] :to End of the time range (inclusive), ISO 8601 in UTC. Defaults to now.
|
|
41
|
+
# @option opts [String] :cursor Position to continue after, taken from `nextCursor` of the previous response. When set, `page` is ignored.
|
|
42
|
+
# @option opts [Integer] :page Zero-based page index, ignored when `cursor` is set (default to 0)
|
|
43
|
+
# @option opts [Integer] :page_size Number of entries per page (default to 100)
|
|
44
|
+
# @return [Array<(PlatformEventsPage, Integer, Hash)>] PlatformEventsPage data, response status code and response headers
|
|
45
|
+
def get_events_with_http_info(opts = {})
|
|
46
|
+
if @api_client.config.debugging
|
|
47
|
+
@api_client.config.logger.debug 'Calling API: PlatformEventsApi.get_events ...'
|
|
48
|
+
end
|
|
49
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
|
|
50
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling PlatformEventsApi.get_events, must be greater than or equal to 0.'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
|
|
54
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PlatformEventsApi.get_events, must be smaller than or equal to 1000.'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
58
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PlatformEventsApi.get_events, must be greater than or equal to 1.'
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# resource path
|
|
62
|
+
local_var_path = '/platform/v1/events'
|
|
63
|
+
|
|
64
|
+
# query parameters
|
|
65
|
+
query_params = opts[:query_params] || {}
|
|
66
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
67
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
68
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
69
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
70
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
71
|
+
|
|
72
|
+
# header parameters
|
|
73
|
+
header_params = opts[:header_params] || {}
|
|
74
|
+
# HTTP header 'Accept' (if needed)
|
|
75
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
76
|
+
|
|
77
|
+
# form parameters
|
|
78
|
+
form_params = opts[:form_params] || {}
|
|
79
|
+
|
|
80
|
+
# http body (model)
|
|
81
|
+
post_body = opts[:debug_body]
|
|
82
|
+
|
|
83
|
+
# return_type
|
|
84
|
+
return_type = opts[:debug_return_type] || 'PlatformEventsPage'
|
|
85
|
+
|
|
86
|
+
# auth_names
|
|
87
|
+
auth_names = opts[:debug_auth_names] || ['bearerApiKey']
|
|
88
|
+
|
|
89
|
+
new_options = opts.merge(
|
|
90
|
+
:operation => :"PlatformEventsApi.get_events",
|
|
91
|
+
:header_params => header_params,
|
|
92
|
+
:query_params => query_params,
|
|
93
|
+
:form_params => form_params,
|
|
94
|
+
:body => post_body,
|
|
95
|
+
:auth_names => auth_names,
|
|
96
|
+
:return_type => return_type
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
100
|
+
if @api_client.config.debugging
|
|
101
|
+
@api_client.config.logger.debug "API called: PlatformEventsApi#get_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
102
|
+
end
|
|
103
|
+
return data, status_code, headers
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TrustComponent API
|
|
3
|
+
|
|
4
|
+
#The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.1-beta.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module TrustComponent::Generated
|
|
16
|
+
class TaxValidationSchedulesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Creates a recurring validation schedule via API key (countryCode + rawValue; TaxIdentifier derived server-side)
|
|
23
|
+
# @param tax_validation_schedule_create_params [TaxValidationScheduleCreateParams] Schedule input
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [TaxValidationSchedule]
|
|
26
|
+
def create_schedule(tax_validation_schedule_create_params, opts = {})
|
|
27
|
+
data, _status_code, _headers = create_schedule_with_http_info(tax_validation_schedule_create_params, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Creates a recurring validation schedule via API key (countryCode + rawValue; TaxIdentifier derived server-side)
|
|
32
|
+
# @param tax_validation_schedule_create_params [TaxValidationScheduleCreateParams] Schedule input
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(TaxValidationSchedule, Integer, Hash)>] TaxValidationSchedule data, response status code and response headers
|
|
35
|
+
def create_schedule_with_http_info(tax_validation_schedule_create_params, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: TaxValidationSchedulesApi.create_schedule ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'tax_validation_schedule_create_params' is set
|
|
40
|
+
if @api_client.config.client_side_validation && tax_validation_schedule_create_params.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'tax_validation_schedule_create_params' when calling TaxValidationSchedulesApi.create_schedule"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/taxvalidation/v1/schedules'
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
53
|
+
# HTTP header 'Content-Type'
|
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
55
|
+
if !content_type.nil?
|
|
56
|
+
header_params['Content-Type'] = content_type
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# form parameters
|
|
60
|
+
form_params = opts[:form_params] || {}
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(tax_validation_schedule_create_params)
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'TaxValidationSchedule'
|
|
67
|
+
|
|
68
|
+
# auth_names
|
|
69
|
+
auth_names = opts[:debug_auth_names] || ['bearerApiKey']
|
|
70
|
+
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"TaxValidationSchedulesApi.create_schedule",
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: TaxValidationSchedulesApi#create_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Stops and removes a recurring validation schedule
|
|
89
|
+
# @param schedule_id [String] Id of the schedule
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [nil]
|
|
92
|
+
def delete_schedule(schedule_id, opts = {})
|
|
93
|
+
delete_schedule_with_http_info(schedule_id, opts)
|
|
94
|
+
nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Stops and removes a recurring validation schedule
|
|
98
|
+
# @param schedule_id [String] Id of the schedule
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
101
|
+
def delete_schedule_with_http_info(schedule_id, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: TaxValidationSchedulesApi.delete_schedule ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'schedule_id' is set
|
|
106
|
+
if @api_client.config.client_side_validation && schedule_id.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'schedule_id' when calling TaxValidationSchedulesApi.delete_schedule"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '/taxvalidation/v1/schedules/{scheduleId}'.sub('{scheduleId}', CGI.escape(schedule_id.to_s))
|
|
111
|
+
|
|
112
|
+
# query parameters
|
|
113
|
+
query_params = opts[:query_params] || {}
|
|
114
|
+
|
|
115
|
+
# header parameters
|
|
116
|
+
header_params = opts[:header_params] || {}
|
|
117
|
+
|
|
118
|
+
# form parameters
|
|
119
|
+
form_params = opts[:form_params] || {}
|
|
120
|
+
|
|
121
|
+
# http body (model)
|
|
122
|
+
post_body = opts[:debug_body]
|
|
123
|
+
|
|
124
|
+
# return_type
|
|
125
|
+
return_type = opts[:debug_return_type]
|
|
126
|
+
|
|
127
|
+
# auth_names
|
|
128
|
+
auth_names = opts[:debug_auth_names] || ['bearerApiKey']
|
|
129
|
+
|
|
130
|
+
new_options = opts.merge(
|
|
131
|
+
:operation => :"TaxValidationSchedulesApi.delete_schedule",
|
|
132
|
+
:header_params => header_params,
|
|
133
|
+
:query_params => query_params,
|
|
134
|
+
:form_params => form_params,
|
|
135
|
+
:body => post_body,
|
|
136
|
+
:auth_names => auth_names,
|
|
137
|
+
:return_type => return_type
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
141
|
+
if @api_client.config.debugging
|
|
142
|
+
@api_client.config.logger.debug "API called: TaxValidationSchedulesApi#delete_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
143
|
+
end
|
|
144
|
+
return data, status_code, headers
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TrustComponent API
|
|
3
|
+
|
|
4
|
+
#The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.1-beta.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module TrustComponent::Generated
|
|
16
|
+
class TaxValidationValidationResultsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Returns a single validation result (e.g. the one referenced in a webhook notification)
|
|
23
|
+
# @param validation_result_id [String] Id of the validation result
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [TaxValidationValidationResult]
|
|
26
|
+
def get_validation_result(validation_result_id, opts = {})
|
|
27
|
+
data, _status_code, _headers = get_validation_result_with_http_info(validation_result_id, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns a single validation result (e.g. the one referenced in a webhook notification)
|
|
32
|
+
# @param validation_result_id [String] Id of the validation result
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(TaxValidationValidationResult, Integer, Hash)>] TaxValidationValidationResult data, response status code and response headers
|
|
35
|
+
def get_validation_result_with_http_info(validation_result_id, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: TaxValidationValidationResultsApi.get_validation_result ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'validation_result_id' is set
|
|
40
|
+
if @api_client.config.client_side_validation && validation_result_id.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'validation_result_id' when calling TaxValidationValidationResultsApi.get_validation_result"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/taxvalidation/v1/validation-results/{validationResultId}'.sub('{validationResultId}', CGI.escape(validation_result_id.to_s))
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = opts[:form_params] || {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = opts[:debug_body]
|
|
59
|
+
|
|
60
|
+
# return_type
|
|
61
|
+
return_type = opts[:debug_return_type] || 'TaxValidationValidationResult'
|
|
62
|
+
|
|
63
|
+
# auth_names
|
|
64
|
+
auth_names = opts[:debug_auth_names] || ['bearerApiKey']
|
|
65
|
+
|
|
66
|
+
new_options = opts.merge(
|
|
67
|
+
:operation => :"TaxValidationValidationResultsApi.get_validation_result",
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: TaxValidationValidationResultsApi#get_validation_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
return data, status_code, headers
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TrustComponent API
|
|
3
|
+
|
|
4
|
+
#The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.1-beta.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module TrustComponent::Generated
|
|
16
|
+
class TaxValidationValidationsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Submits a validation request via API key (programmatic integration)
|
|
23
|
+
# @param tax_validation_validation_create_params [TaxValidationValidationCreateParams] Validation input
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [TaxValidationValidation]
|
|
26
|
+
def create_validation(tax_validation_validation_create_params, opts = {})
|
|
27
|
+
data, _status_code, _headers = create_validation_with_http_info(tax_validation_validation_create_params, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Submits a validation request via API key (programmatic integration)
|
|
32
|
+
# @param tax_validation_validation_create_params [TaxValidationValidationCreateParams] Validation input
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(TaxValidationValidation, Integer, Hash)>] TaxValidationValidation data, response status code and response headers
|
|
35
|
+
def create_validation_with_http_info(tax_validation_validation_create_params, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: TaxValidationValidationsApi.create_validation ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'tax_validation_validation_create_params' is set
|
|
40
|
+
if @api_client.config.client_side_validation && tax_validation_validation_create_params.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'tax_validation_validation_create_params' when calling TaxValidationValidationsApi.create_validation"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/taxvalidation/v1/validations'
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
53
|
+
# HTTP header 'Content-Type'
|
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
55
|
+
if !content_type.nil?
|
|
56
|
+
header_params['Content-Type'] = content_type
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# form parameters
|
|
60
|
+
form_params = opts[:form_params] || {}
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(tax_validation_validation_create_params)
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'TaxValidationValidation'
|
|
67
|
+
|
|
68
|
+
# auth_names
|
|
69
|
+
auth_names = opts[:debug_auth_names] || ['bearerApiKey']
|
|
70
|
+
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"TaxValidationValidationsApi.create_validation",
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: TaxValidationValidationsApi#create_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Submits multiple validation requests in one call via API key
|
|
89
|
+
# Every item is accepted as a PENDING validation request and processed asynchronously; the per-item result is delivered via webhook (or can be polled). The response carries the created requests in input order, each without an outcome yet. A batch is always accepted or rejected as a whole.
|
|
90
|
+
# @param tax_validation_validation_batch_create_params [TaxValidationValidationBatchCreateParams] Batch of validation inputs
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @return [Array<TaxValidationValidation>]
|
|
93
|
+
def create_validation_batch(tax_validation_validation_batch_create_params, opts = {})
|
|
94
|
+
data, _status_code, _headers = create_validation_batch_with_http_info(tax_validation_validation_batch_create_params, opts)
|
|
95
|
+
data
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Submits multiple validation requests in one call via API key
|
|
99
|
+
# Every item is accepted as a PENDING validation request and processed asynchronously; the per-item result is delivered via webhook (or can be polled). The response carries the created requests in input order, each without an outcome yet. A batch is always accepted or rejected as a whole.
|
|
100
|
+
# @param tax_validation_validation_batch_create_params [TaxValidationValidationBatchCreateParams] Batch of validation inputs
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @return [Array<(Array<TaxValidationValidation>, Integer, Hash)>] Array<TaxValidationValidation> data, response status code and response headers
|
|
103
|
+
def create_validation_batch_with_http_info(tax_validation_validation_batch_create_params, opts = {})
|
|
104
|
+
if @api_client.config.debugging
|
|
105
|
+
@api_client.config.logger.debug 'Calling API: TaxValidationValidationsApi.create_validation_batch ...'
|
|
106
|
+
end
|
|
107
|
+
# verify the required parameter 'tax_validation_validation_batch_create_params' is set
|
|
108
|
+
if @api_client.config.client_side_validation && tax_validation_validation_batch_create_params.nil?
|
|
109
|
+
fail ArgumentError, "Missing the required parameter 'tax_validation_validation_batch_create_params' when calling TaxValidationValidationsApi.create_validation_batch"
|
|
110
|
+
end
|
|
111
|
+
# resource path
|
|
112
|
+
local_var_path = '/taxvalidation/v1/validations/batch'
|
|
113
|
+
|
|
114
|
+
# query parameters
|
|
115
|
+
query_params = opts[:query_params] || {}
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = opts[:header_params] || {}
|
|
119
|
+
# HTTP header 'Accept' (if needed)
|
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
121
|
+
# HTTP header 'Content-Type'
|
|
122
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
123
|
+
if !content_type.nil?
|
|
124
|
+
header_params['Content-Type'] = content_type
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# form parameters
|
|
128
|
+
form_params = opts[:form_params] || {}
|
|
129
|
+
|
|
130
|
+
# http body (model)
|
|
131
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(tax_validation_validation_batch_create_params)
|
|
132
|
+
|
|
133
|
+
# return_type
|
|
134
|
+
return_type = opts[:debug_return_type] || 'Array<TaxValidationValidation>'
|
|
135
|
+
|
|
136
|
+
# auth_names
|
|
137
|
+
auth_names = opts[:debug_auth_names] || ['bearerApiKey']
|
|
138
|
+
|
|
139
|
+
new_options = opts.merge(
|
|
140
|
+
:operation => :"TaxValidationValidationsApi.create_validation_batch",
|
|
141
|
+
:header_params => header_params,
|
|
142
|
+
:query_params => query_params,
|
|
143
|
+
:form_params => form_params,
|
|
144
|
+
:body => post_body,
|
|
145
|
+
:auth_names => auth_names,
|
|
146
|
+
:return_type => return_type
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug "API called: TaxValidationValidationsApi#create_validation_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
152
|
+
end
|
|
153
|
+
return data, status_code, headers
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|