trustcomponent 0.0.1.beta.2 → 0.0.1.beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -5
  3. data/lib/trustcomponent/errors.rb +3 -1
  4. data/lib/trustcomponent_generated/api/analytics_server_events_api.rb +1 -1
  5. data/lib/trustcomponent_generated/api/analytics_websites_api.rb +15 -9
  6. data/lib/trustcomponent_generated/api/captcha_verifications_api.rb +4 -4
  7. data/lib/trustcomponent_generated/api/monitoring_heartbeats_api.rb +1 -1
  8. data/lib/trustcomponent_generated/api/platform_events_api.rb +181 -1
  9. data/lib/trustcomponent_generated/api/platform_projects_api.rb +97 -0
  10. data/lib/trustcomponent_generated/api/tax_validation_schedules_api.rb +15 -7
  11. data/lib/trustcomponent_generated/api/tax_validation_validation_results_api.rb +1 -1
  12. data/lib/trustcomponent_generated/api/tax_validation_validations_api.rb +29 -15
  13. data/lib/trustcomponent_generated/api_client.rb +1 -1
  14. data/lib/trustcomponent_generated/api_error.rb +1 -1
  15. data/lib/trustcomponent_generated/api_model_base.rb +1 -1
  16. data/lib/trustcomponent_generated/configuration.rb +1 -1
  17. data/lib/trustcomponent_generated/models/analytics_event_category_enum.rb +1 -1
  18. data/lib/trustcomponent_generated/models/analytics_realtime.rb +1 -1
  19. data/lib/trustcomponent_generated/models/analytics_realtime_page.rb +1 -1
  20. data/lib/trustcomponent_generated/models/analytics_realtime_point.rb +1 -1
  21. data/lib/trustcomponent_generated/models/analytics_server_event_batch_create_params.rb +1 -1
  22. data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_commerce_create_params.rb +1 -1
  23. data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_commerce_product_create_params.rb +1 -1
  24. data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_create_params.rb +1 -1
  25. data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_error_create_params.rb +1 -1
  26. data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_refund_create_params.rb +1 -1
  27. data/lib/trustcomponent_generated/models/analytics_server_event_batch_result.rb +1 -1
  28. data/lib/trustcomponent_generated/models/analytics_server_event_batch_result_drop_reason_enum.rb +1 -1
  29. data/lib/trustcomponent_generated/models/analytics_server_event_batch_result_dropped.rb +1 -1
  30. data/lib/trustcomponent_generated/models/analytics_stats_breakdown.rb +1 -1
  31. data/lib/trustcomponent_generated/models/analytics_stats_breakdown_row.rb +1 -1
  32. data/lib/trustcomponent_generated/models/analytics_stats_breakdown_row_page.rb +1 -1
  33. data/lib/trustcomponent_generated/models/analytics_stats_conversions.rb +1 -1
  34. data/lib/trustcomponent_generated/models/analytics_stats_conversions_goal.rb +1 -1
  35. data/lib/trustcomponent_generated/models/analytics_stats_conversions_goal_revenue.rb +1 -1
  36. data/lib/trustcomponent_generated/models/analytics_stats_dimension_enum.rb +1 -1
  37. data/lib/trustcomponent_generated/models/analytics_stats_filter_match_mode_enum.rb +1 -1
  38. data/lib/trustcomponent_generated/models/analytics_stats_filter_operator_enum.rb +1 -1
  39. data/lib/trustcomponent_generated/models/analytics_stats_granularity_enum.rb +1 -1
  40. data/lib/trustcomponent_generated/models/analytics_stats_overview.rb +1 -1
  41. data/lib/trustcomponent_generated/models/analytics_stats_timeseries.rb +1 -1
  42. data/lib/trustcomponent_generated/models/analytics_stats_timeseries_point.rb +1 -1
  43. data/lib/trustcomponent_generated/models/analytics_stats_totals.rb +1 -1
  44. data/lib/trustcomponent_generated/models/analytics_website.rb +1 -1
  45. data/lib/trustcomponent_generated/models/analytics_websites_page.rb +1 -1
  46. data/lib/trustcomponent_generated/models/captcha_verification_result.rb +1 -1
  47. data/lib/trustcomponent_generated/models/platform_event.rb +1 -1
  48. data/lib/trustcomponent_generated/models/platform_event_actor.rb +1 -1
  49. data/lib/trustcomponent_generated/models/platform_event_actor_automation.rb +1 -1
  50. data/lib/trustcomponent_generated/models/platform_event_actor_automation_kind_enum.rb +1 -1
  51. data/lib/trustcomponent_generated/models/platform_event_actor_type_enum.rb +1 -1
  52. data/lib/trustcomponent_generated/models/platform_event_change.rb +1 -1
  53. data/lib/trustcomponent_generated/models/platform_event_change_operation_enum.rb +1 -1
  54. data/lib/trustcomponent_generated/models/platform_event_origin.rb +1 -1
  55. data/lib/trustcomponent_generated/models/platform_event_ref.rb +1 -1
  56. data/lib/trustcomponent_generated/models/platform_event_source_enum.rb +1 -1
  57. data/lib/trustcomponent_generated/models/platform_events_page.rb +1 -1
  58. data/lib/trustcomponent_generated/models/platform_project.rb +251 -0
  59. data/lib/trustcomponent_generated/models/platform_project_module_enum.rb +42 -0
  60. data/lib/trustcomponent_generated/models/platform_project_role_enum.rb +44 -0
  61. data/lib/trustcomponent_generated/models/platform_projects_page.rb +249 -0
  62. data/lib/trustcomponent_generated/models/tax_validation_match_status_enum.rb +1 -1
  63. data/lib/trustcomponent_generated/models/tax_validation_provider_enum.rb +1 -1
  64. data/lib/trustcomponent_generated/models/tax_validation_provider_status_enum.rb +1 -1
  65. data/lib/trustcomponent_generated/models/tax_validation_schedule.rb +1 -1
  66. data/lib/trustcomponent_generated/models/tax_validation_schedule_create_params.rb +1 -1
  67. data/lib/trustcomponent_generated/models/tax_validation_tax_address.rb +1 -1
  68. data/lib/trustcomponent_generated/models/tax_validation_tax_identifier_scheme_enum.rb +1 -1
  69. data/lib/trustcomponent_generated/models/tax_validation_validation.rb +1 -1
  70. data/lib/trustcomponent_generated/models/tax_validation_validation_address_match.rb +1 -1
  71. data/lib/trustcomponent_generated/models/tax_validation_validation_batch_create_params.rb +1 -1
  72. data/lib/trustcomponent_generated/models/tax_validation_validation_create_params.rb +1 -1
  73. data/lib/trustcomponent_generated/models/tax_validation_validation_frequency_enum.rb +1 -1
  74. data/lib/trustcomponent_generated/models/tax_validation_validation_input.rb +1 -1
  75. data/lib/trustcomponent_generated/models/tax_validation_validation_match.rb +1 -1
  76. data/lib/trustcomponent_generated/models/tax_validation_validation_mode_enum.rb +1 -1
  77. data/lib/trustcomponent_generated/models/tax_validation_validation_outcome_enum.rb +1 -1
  78. data/lib/trustcomponent_generated/models/tax_validation_validation_request_status_enum.rb +1 -1
  79. data/lib/trustcomponent_generated/models/tax_validation_validation_response_data.rb +1 -1
  80. data/lib/trustcomponent_generated/models/tax_validation_validation_result.rb +1 -1
  81. data/lib/trustcomponent_generated/models/tax_validation_validation_schedule_attach_params.rb +1 -1
  82. data/lib/trustcomponent_generated/models/tax_validation_verification_method_enum.rb +1 -1
  83. data/lib/trustcomponent_generated/modules.rb +4 -3
  84. data/lib/trustcomponent_generated/version.rb +2 -2
  85. data/lib/trustcomponent_generated.rb +6 -1
  86. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea077b830acc666371bf4d1282057855ab5c277f8f42079e56a69ac7f804a3ec
4
- data.tar.gz: 2ccab14a2c9c04c33765cfafb0c33979984c6d3556089749dd2bccc4675f10f0
3
+ metadata.gz: a9fa85aa0368677787f0ffa93469201595b0de14212ef1e250d4a84ea0ab447e
4
+ data.tar.gz: e4c12b1b6f9f6cd6b20015b93207b2bd1afccc223bfcd2248cb6603791b89fd9
5
5
  SHA512:
6
- metadata.gz: f807f6b525b9a70237a6b3569ad2b233f657fdb8846b6da258378f71563ceabc6e7556f8f67d32854faed146ec5750d5887baf576ed75e230d0f57afcdb30908
7
- data.tar.gz: 3202052c98eaaa3d5f248d68cb31a2f511392d80a8e1cc4a0e60e9f5271058d6c2dbc4286a64193c7afc7d34f5cc63c5511209083bb7646ca05d0fae43c46c5e
6
+ metadata.gz: 95ee531bfa844a4c28af3c90a38781f20b7c12f38a8128a896405d7c5453729031b23cafb743580900a2e29461172250e7ed37a3420d4c2bcfc988e5a0d02c60
7
+ data.tar.gz: 31ffeae1b5b7610b836f819afd34660dfed63703b254a254a8df432a2c46a191bdfee67980658962cb3d59717726d304680c2f3b2c8cac00288ba262fbff151c
data/README.md CHANGED
@@ -25,17 +25,18 @@ if result.verification_passed
25
25
  end
26
26
  ```
27
27
 
28
- Create the API key (`ak_…`) in the dashboard under the project's API keys. The key decides which modules the client can use.
28
+ Create the API key (`ak_…`) in the dashboard under the project's API keys, or under the agency's API keys to reach its client projects. The key decides which projects and modules the client can use.
29
29
 
30
30
  ## Every module
31
31
 
32
32
  The client is `module → resource → operation`, with the same names in every language:
33
33
 
34
34
  ```ruby
35
- tc.analytics.websites.get_websites
36
- tc.tax_validation.validations.create_validation(TrustComponent::Generated::TaxValidationValidationCreateParams.new(country_code: 'DE', raw_value: 'DE811569869'))
35
+ project_id = tc.platform.projects.get_projects.content.first.id
36
+ tc.analytics.websites.get_websites(project_id)
37
+ tc.tax_validation.validations.create_validation(project_id, TrustComponent::Generated::TaxValidationValidationCreateParams.new(country_code: 'DE', raw_value: 'DE811569869'))
37
38
  tc.monitoring.heartbeats.ping_heartbeat(service_id, monitor_id)
38
- tc.platform.events.get_events
39
+ tc.platform.events.get_events_of_project(project_id)
39
40
  ```
40
41
 
41
42
  The full reference of every operation is at https://docs.trustcomponent.com.
@@ -55,7 +56,7 @@ Every request names the SDK in `User-Agent` and `TrustComponent-Sdk`, together w
55
56
  ## Errors
56
57
 
57
58
  Every error is a `TrustComponent::Error` carrying the HTTP status and the stable `code` of the API:
58
- `InvalidRequestError`, `AuthenticationError`, `PermissionError`, `PlanLimitError`, `NotFoundError`, `ConflictError`, `GoneError`, `RateLimitError`, `ServerError`, `ConnectionError`, `OperationRetiredError`, `VerificationTokenInvalidError`.
59
+ `InvalidRequestError`, `AuthenticationError`, `PermissionError`, `PlanLimitError`, `LockedError`, `NotFoundError`, `ConflictError`, `GoneError`, `RateLimitError`, `ServerError`, `ConnectionError`, `OperationRetiredError`, `VerificationTokenInvalidError`.
59
60
 
60
61
  ```ruby
61
62
  begin
@@ -31,7 +31,8 @@ module TrustComponent
31
31
  when 402 then PlanLimitError
32
32
  when 403 then PermissionError
33
33
  when 404 then NotFoundError
34
- when 409, 412, 423 then ConflictError
34
+ when 409, 412 then ConflictError
35
+ when 423 then LockedError
35
36
  when 410 then GoneError
36
37
  when 429 then RateLimitError
37
38
  else status >= 500 ? ServerError : Error
@@ -44,6 +45,7 @@ module TrustComponent
44
45
  class AuthenticationError < Error; end
45
46
  class PermissionError < Error; end
46
47
  class PlanLimitError < Error; end
48
+ class LockedError < Error; end
47
49
  class NotFoundError < Error; end
48
50
  class ConflictError < Error; end
49
51
  class GoneError < Error; end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
5
5
 
6
- The version of the OpenAPI document: 0.0.1-beta.2
6
+ The version of the OpenAPI document: 0.0.1-beta.3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.24.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
5
5
 
6
- The version of the OpenAPI document: 0.0.1-beta.2
6
+ The version of the OpenAPI document: 0.0.1-beta.3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.24.0
@@ -449,27 +449,33 @@ module TrustComponent::Generated
449
449
  return data, status_code, headers
450
450
  end
451
451
 
452
- # Lists the websites of the subscription of the API key
453
- # Every website of the project the API key belongs to, oldest first, with the id the statistics endpoints take.
452
+ # Lists the websites of a project
453
+ # Every website of the project, oldest first, with the id the statistics endpoints take. Same as getWebsitesV1, but names its project in the path, so a key of an agency can list the websites of each client project it reaches. A key of a project uses its own project id.
454
+ # @param project_id [String] Id of the project
454
455
  # @param [Hash] opts the optional parameters
455
456
  # @option opts [Integer] :page Zero-based page index (default to 0)
456
457
  # @option opts [Integer] :page_size Number of entries per page (default to 100)
457
458
  # @return [AnalyticsWebsitesPage]
458
- def get_websites(opts = {})
459
- data, _status_code, _headers = get_websites_with_http_info(opts)
459
+ def get_websites(project_id, opts = {})
460
+ data, _status_code, _headers = get_websites_with_http_info(project_id, opts)
460
461
  data
461
462
  end
462
463
 
463
- # Lists the websites of the subscription of the API key
464
- # Every website of the project the API key belongs to, oldest first, with the id the statistics endpoints take.
464
+ # Lists the websites of a project
465
+ # Every website of the project, oldest first, with the id the statistics endpoints take. Same as getWebsitesV1, but names its project in the path, so a key of an agency can list the websites of each client project it reaches. A key of a project uses its own project id.
466
+ # @param project_id [String] Id of the project
465
467
  # @param [Hash] opts the optional parameters
466
468
  # @option opts [Integer] :page Zero-based page index (default to 0)
467
469
  # @option opts [Integer] :page_size Number of entries per page (default to 100)
468
470
  # @return [Array<(AnalyticsWebsitesPage, Integer, Hash)>] AnalyticsWebsitesPage data, response status code and response headers
469
- def get_websites_with_http_info(opts = {})
471
+ def get_websites_with_http_info(project_id, opts = {})
470
472
  if @api_client.config.debugging
471
473
  @api_client.config.logger.debug 'Calling API: AnalyticsWebsitesApi.get_websites ...'
472
474
  end
475
+ # verify the required parameter 'project_id' is set
476
+ if @api_client.config.client_side_validation && project_id.nil?
477
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling AnalyticsWebsitesApi.get_websites"
478
+ end
473
479
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
474
480
  fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsWebsitesApi.get_websites, must be greater than or equal to 0.'
475
481
  end
@@ -483,7 +489,7 @@ module TrustComponent::Generated
483
489
  end
484
490
 
485
491
  # resource path
486
- local_var_path = '/analytics/v1/websites'
492
+ local_var_path = '/analytics/v2/projects/{projectId}/websites'.sub('{projectId}', CGI.escape(project_id.to_s))
487
493
 
488
494
  # query parameters
489
495
  query_params = opts[:query_params] || {}
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
5
5
 
6
- The version of the OpenAPI document: 0.0.1-beta.2
6
+ The version of the OpenAPI document: 0.0.1-beta.3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.24.0
@@ -20,7 +20,7 @@ module TrustComponent::Generated
20
20
  @api_client = api_client
21
21
  end
22
22
  # Returns the result of a verification
23
- # Call it from your server with the verification id from the token the widget put into your form. A 429 here means the result reached its maximum retrieval count and comes without `Retry-After`; it is final and is not retried.
23
+ # Call it from your server with the verification id from the token the widget put into your form. Same result as getResultV2; only the error answers changed: every final refusal carries a stable `code` (`result_not_released`, `result_retrieval_limit_reached`, `result_expired`), a verification of a project the API key does not reach answers like one that does not exist, and no answer of this operation is a 429.
24
24
  # @param verification_id [String] ID of a verification
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [Boolean] :client_failover Set when the widget could not reach TrustCaptcha (&#x60;clientFailover&#x60; in its token). The public gateway then answers on its own and lets the visitor pass only while it has seen an outage itself.
@@ -31,7 +31,7 @@ module TrustComponent::Generated
31
31
  end
32
32
 
33
33
  # Returns the result of a verification
34
- # Call it from your server with the verification id from the token the widget put into your form. A 429 here means the result reached its maximum retrieval count and comes without &#x60;Retry-After&#x60;; it is final and is not retried.
34
+ # Call it from your server with the verification id from the token the widget put into your form. Same result as getResultV2; only the error answers changed: every final refusal carries a stable &#x60;code&#x60; (&#x60;result_not_released&#x60;, &#x60;result_retrieval_limit_reached&#x60;, &#x60;result_expired&#x60;), a verification of a project the API key does not reach answers like one that does not exist, and no answer of this operation is a 429.
35
35
  # @param verification_id [String] ID of a verification
36
36
  # @param [Hash] opts the optional parameters
37
37
  # @option opts [Boolean] :client_failover Set when the widget could not reach TrustCaptcha (&#x60;clientFailover&#x60; in its token). The public gateway then answers on its own and lets the visitor pass only while it has seen an outage itself.
@@ -45,7 +45,7 @@ module TrustComponent::Generated
45
45
  fail ArgumentError, "Missing the required parameter 'verification_id' when calling CaptchaVerificationsApi.get_result"
46
46
  end
47
47
  # resource path
48
- local_var_path = '/captcha/v2/verifications/{verificationId}/results'.sub('{verificationId}', CGI.escape(verification_id.to_s))
48
+ local_var_path = '/captcha/v3/verifications/{verificationId}/results'.sub('{verificationId}', CGI.escape(verification_id.to_s))
49
49
 
50
50
  # query parameters
51
51
  query_params = opts[:query_params] || {}
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
5
5
 
6
- The version of the OpenAPI document: 0.0.1-beta.2
6
+ The version of the OpenAPI document: 0.0.1-beta.3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.24.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
5
5
 
6
- The version of the OpenAPI document: 0.0.1-beta.2
6
+ The version of the OpenAPI document: 0.0.1-beta.3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.24.0
@@ -102,5 +102,185 @@ module TrustComponent::Generated
102
102
  end
103
103
  return data, status_code, headers
104
104
  end
105
+
106
+ # Returns the audit log events of an agency
107
+ # Returns the audit log events of the agency itself, newest first, within the audit log retention of its plan. Only a key of this agency with the Auditor role reads it; client projects are read with getEventsOfProjectV1. Paging works as in getEventsV1.
108
+ # @param agency_id [String] Id of the agency
109
+ # @param [Hash] opts the optional parameters
110
+ # @option opts [String] :from Start of the time range (inclusive), ISO 8601 in UTC. Defaults to 24 hours before &#x60;to&#x60;.
111
+ # @option opts [String] :to End of the time range (inclusive), ISO 8601 in UTC. Defaults to now.
112
+ # @option opts [String] :cursor Position to continue after, taken from &#x60;nextCursor&#x60; of the previous response. When set, &#x60;page&#x60; is ignored.
113
+ # @option opts [Integer] :page Zero-based page index, ignored when &#x60;cursor&#x60; is set (default to 0)
114
+ # @option opts [Integer] :page_size Number of entries per page (default to 100)
115
+ # @return [PlatformEventsPage]
116
+ def get_events_of_agency(agency_id, opts = {})
117
+ data, _status_code, _headers = get_events_of_agency_with_http_info(agency_id, opts)
118
+ data
119
+ end
120
+
121
+ # Returns the audit log events of an agency
122
+ # Returns the audit log events of the agency itself, newest first, within the audit log retention of its plan. Only a key of this agency with the Auditor role reads it; client projects are read with getEventsOfProjectV1. Paging works as in getEventsV1.
123
+ # @param agency_id [String] Id of the agency
124
+ # @param [Hash] opts the optional parameters
125
+ # @option opts [String] :from Start of the time range (inclusive), ISO 8601 in UTC. Defaults to 24 hours before &#x60;to&#x60;.
126
+ # @option opts [String] :to End of the time range (inclusive), ISO 8601 in UTC. Defaults to now.
127
+ # @option opts [String] :cursor Position to continue after, taken from &#x60;nextCursor&#x60; of the previous response. When set, &#x60;page&#x60; is ignored.
128
+ # @option opts [Integer] :page Zero-based page index, ignored when &#x60;cursor&#x60; is set (default to 0)
129
+ # @option opts [Integer] :page_size Number of entries per page (default to 100)
130
+ # @return [Array<(PlatformEventsPage, Integer, Hash)>] PlatformEventsPage data, response status code and response headers
131
+ def get_events_of_agency_with_http_info(agency_id, opts = {})
132
+ if @api_client.config.debugging
133
+ @api_client.config.logger.debug 'Calling API: PlatformEventsApi.get_events_of_agency ...'
134
+ end
135
+ # verify the required parameter 'agency_id' is set
136
+ if @api_client.config.client_side_validation && agency_id.nil?
137
+ fail ArgumentError, "Missing the required parameter 'agency_id' when calling PlatformEventsApi.get_events_of_agency"
138
+ end
139
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
140
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling PlatformEventsApi.get_events_of_agency, must be greater than or equal to 0.'
141
+ end
142
+
143
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
144
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PlatformEventsApi.get_events_of_agency, must be smaller than or equal to 1000.'
145
+ end
146
+
147
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
148
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PlatformEventsApi.get_events_of_agency, must be greater than or equal to 1.'
149
+ end
150
+
151
+ # resource path
152
+ local_var_path = '/platform/v1/agencies/{agencyId}/events'.sub('{agencyId}', CGI.escape(agency_id.to_s))
153
+
154
+ # query parameters
155
+ query_params = opts[:query_params] || {}
156
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
157
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
158
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
159
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
160
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
161
+
162
+ # header parameters
163
+ header_params = opts[:header_params] || {}
164
+ # HTTP header 'Accept' (if needed)
165
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
166
+
167
+ # form parameters
168
+ form_params = opts[:form_params] || {}
169
+
170
+ # http body (model)
171
+ post_body = opts[:debug_body]
172
+
173
+ # return_type
174
+ return_type = opts[:debug_return_type] || 'PlatformEventsPage'
175
+
176
+ # auth_names
177
+ auth_names = opts[:debug_auth_names] || ['bearerApiKey']
178
+
179
+ new_options = opts.merge(
180
+ :operation => :"PlatformEventsApi.get_events_of_agency",
181
+ :header_params => header_params,
182
+ :query_params => query_params,
183
+ :form_params => form_params,
184
+ :body => post_body,
185
+ :auth_names => auth_names,
186
+ :return_type => return_type
187
+ )
188
+
189
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug "API called: PlatformEventsApi#get_events_of_agency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
192
+ end
193
+ return data, status_code, headers
194
+ end
195
+
196
+ # Returns the audit log events of a project
197
+ # Returns the audit log events of the project and of all its modules, newest first, within the audit log retention of the project's plan. A key of a project reads its own project; a key of an agency reads every client project it reaches on which it holds the Auditor role. Paging works as in getEventsV1.
198
+ # @param project_id [String] Id of the project
199
+ # @param [Hash] opts the optional parameters
200
+ # @option opts [String] :from Start of the time range (inclusive), ISO 8601 in UTC. Defaults to 24 hours before &#x60;to&#x60;.
201
+ # @option opts [String] :to End of the time range (inclusive), ISO 8601 in UTC. Defaults to now.
202
+ # @option opts [String] :cursor Position to continue after, taken from &#x60;nextCursor&#x60; of the previous response. When set, &#x60;page&#x60; is ignored.
203
+ # @option opts [Integer] :page Zero-based page index, ignored when &#x60;cursor&#x60; is set (default to 0)
204
+ # @option opts [Integer] :page_size Number of entries per page (default to 100)
205
+ # @return [PlatformEventsPage]
206
+ def get_events_of_project(project_id, opts = {})
207
+ data, _status_code, _headers = get_events_of_project_with_http_info(project_id, opts)
208
+ data
209
+ end
210
+
211
+ # Returns the audit log events of a project
212
+ # Returns the audit log events of the project and of all its modules, newest first, within the audit log retention of the project&#39;s plan. A key of a project reads its own project; a key of an agency reads every client project it reaches on which it holds the Auditor role. Paging works as in getEventsV1.
213
+ # @param project_id [String] Id of the project
214
+ # @param [Hash] opts the optional parameters
215
+ # @option opts [String] :from Start of the time range (inclusive), ISO 8601 in UTC. Defaults to 24 hours before &#x60;to&#x60;.
216
+ # @option opts [String] :to End of the time range (inclusive), ISO 8601 in UTC. Defaults to now.
217
+ # @option opts [String] :cursor Position to continue after, taken from &#x60;nextCursor&#x60; of the previous response. When set, &#x60;page&#x60; is ignored.
218
+ # @option opts [Integer] :page Zero-based page index, ignored when &#x60;cursor&#x60; is set (default to 0)
219
+ # @option opts [Integer] :page_size Number of entries per page (default to 100)
220
+ # @return [Array<(PlatformEventsPage, Integer, Hash)>] PlatformEventsPage data, response status code and response headers
221
+ def get_events_of_project_with_http_info(project_id, opts = {})
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug 'Calling API: PlatformEventsApi.get_events_of_project ...'
224
+ end
225
+ # verify the required parameter 'project_id' is set
226
+ if @api_client.config.client_side_validation && project_id.nil?
227
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling PlatformEventsApi.get_events_of_project"
228
+ end
229
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
230
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling PlatformEventsApi.get_events_of_project, must be greater than or equal to 0.'
231
+ end
232
+
233
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
234
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PlatformEventsApi.get_events_of_project, must be smaller than or equal to 1000.'
235
+ end
236
+
237
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
238
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PlatformEventsApi.get_events_of_project, must be greater than or equal to 1.'
239
+ end
240
+
241
+ # resource path
242
+ local_var_path = '/platform/v1/projects/{projectId}/events'.sub('{projectId}', CGI.escape(project_id.to_s))
243
+
244
+ # query parameters
245
+ query_params = opts[:query_params] || {}
246
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
247
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
248
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
249
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
250
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
251
+
252
+ # header parameters
253
+ header_params = opts[:header_params] || {}
254
+ # HTTP header 'Accept' (if needed)
255
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
256
+
257
+ # form parameters
258
+ form_params = opts[:form_params] || {}
259
+
260
+ # http body (model)
261
+ post_body = opts[:debug_body]
262
+
263
+ # return_type
264
+ return_type = opts[:debug_return_type] || 'PlatformEventsPage'
265
+
266
+ # auth_names
267
+ auth_names = opts[:debug_auth_names] || ['bearerApiKey']
268
+
269
+ new_options = opts.merge(
270
+ :operation => :"PlatformEventsApi.get_events_of_project",
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :form_params => form_params,
274
+ :body => post_body,
275
+ :auth_names => auth_names,
276
+ :return_type => return_type
277
+ )
278
+
279
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "API called: PlatformEventsApi#get_events_of_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
282
+ end
283
+ return data, status_code, headers
284
+ end
105
285
  end
106
286
  end
@@ -0,0 +1,97 @@
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.3
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 PlatformProjectsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Lists the projects the API key reaches
23
+ # Every project the API key may act on, sorted by name, with its modules and the roles the key holds there. A key of a project returns its own project; a key of an agency returns the client projects in its scope.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Integer] :page Zero-based page index (default to 0)
26
+ # @option opts [Integer] :page_size Number of entries per page (default to 25)
27
+ # @return [PlatformProjectsPage]
28
+ def get_projects(opts = {})
29
+ data, _status_code, _headers = get_projects_with_http_info(opts)
30
+ data
31
+ end
32
+
33
+ # Lists the projects the API key reaches
34
+ # Every project the API key may act on, sorted by name, with its modules and the roles the key holds there. A key of a project returns its own project; a key of an agency returns the client projects in its scope.
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [Integer] :page Zero-based page index (default to 0)
37
+ # @option opts [Integer] :page_size Number of entries per page (default to 25)
38
+ # @return [Array<(PlatformProjectsPage, Integer, Hash)>] PlatformProjectsPage data, response status code and response headers
39
+ def get_projects_with_http_info(opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: PlatformProjectsApi.get_projects ...'
42
+ end
43
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
44
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling PlatformProjectsApi.get_projects, must be greater than or equal to 0.'
45
+ end
46
+
47
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
48
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PlatformProjectsApi.get_projects, must be smaller than or equal to 100.'
49
+ end
50
+
51
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
52
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PlatformProjectsApi.get_projects, must be greater than or equal to 1.'
53
+ end
54
+
55
+ # resource path
56
+ local_var_path = '/platform/v1/projects'
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
61
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
62
+
63
+ # header parameters
64
+ header_params = opts[:header_params] || {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:debug_body]
73
+
74
+ # return_type
75
+ return_type = opts[:debug_return_type] || 'PlatformProjectsPage'
76
+
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || ['bearerApiKey']
79
+
80
+ new_options = opts.merge(
81
+ :operation => :"PlatformProjectsApi.get_projects",
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => return_type
88
+ )
89
+
90
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: PlatformProjectsApi#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+ end
97
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
5
5
 
6
- The version of the OpenAPI document: 0.0.1-beta.2
6
+ The version of the OpenAPI document: 0.0.1-beta.3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.24.0
@@ -19,29 +19,37 @@ module TrustComponent::Generated
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Creates a recurring validation schedule via API key (countryCode + rawValue; TaxIdentifier derived server-side)
22
+ # Creates a recurring validation schedule for a project
23
+ # Same as createScheduleV1, but names its project in the path, so a key of an agency can create schedules in each client project it reaches.
24
+ # @param project_id [String] Id of the project
23
25
  # @param tax_validation_schedule_create_params [TaxValidationScheduleCreateParams] Schedule input
24
26
  # @param [Hash] opts the optional parameters
25
27
  # @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
+ def create_schedule(project_id, tax_validation_schedule_create_params, opts = {})
29
+ data, _status_code, _headers = create_schedule_with_http_info(project_id, tax_validation_schedule_create_params, opts)
28
30
  data
29
31
  end
30
32
 
31
- # Creates a recurring validation schedule via API key (countryCode + rawValue; TaxIdentifier derived server-side)
33
+ # Creates a recurring validation schedule for a project
34
+ # Same as createScheduleV1, but names its project in the path, so a key of an agency can create schedules in each client project it reaches.
35
+ # @param project_id [String] Id of the project
32
36
  # @param tax_validation_schedule_create_params [TaxValidationScheduleCreateParams] Schedule input
33
37
  # @param [Hash] opts the optional parameters
34
38
  # @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 = {})
39
+ def create_schedule_with_http_info(project_id, tax_validation_schedule_create_params, opts = {})
36
40
  if @api_client.config.debugging
37
41
  @api_client.config.logger.debug 'Calling API: TaxValidationSchedulesApi.create_schedule ...'
38
42
  end
43
+ # verify the required parameter 'project_id' is set
44
+ if @api_client.config.client_side_validation && project_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling TaxValidationSchedulesApi.create_schedule"
46
+ end
39
47
  # verify the required parameter 'tax_validation_schedule_create_params' is set
40
48
  if @api_client.config.client_side_validation && tax_validation_schedule_create_params.nil?
41
49
  fail ArgumentError, "Missing the required parameter 'tax_validation_schedule_create_params' when calling TaxValidationSchedulesApi.create_schedule"
42
50
  end
43
51
  # resource path
44
- local_var_path = '/taxvalidation/v1/schedules'
52
+ local_var_path = '/taxvalidation/v2/projects/{projectId}/schedules'.sub('{projectId}', CGI.escape(project_id.to_s))
45
53
 
46
54
  # query parameters
47
55
  query_params = opts[:query_params] || {}
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
5
5
 
6
- The version of the OpenAPI document: 0.0.1-beta.2
6
+ The version of the OpenAPI document: 0.0.1-beta.3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.24.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
5
5
 
6
- The version of the OpenAPI document: 0.0.1-beta.2
6
+ The version of the OpenAPI document: 0.0.1-beta.3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.24.0
@@ -19,29 +19,37 @@ module TrustComponent::Generated
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Submits a validation request via API key (programmatic integration)
22
+ # Validates a tax identifier for a project
23
+ # Same as createValidationV1, but names its project in the path, so a key of an agency can validate for each client project it reaches. A key of a project uses its own project id.
24
+ # @param project_id [String] Id of the project
23
25
  # @param tax_validation_validation_create_params [TaxValidationValidationCreateParams] Validation input
24
26
  # @param [Hash] opts the optional parameters
25
27
  # @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
+ def create_validation(project_id, tax_validation_validation_create_params, opts = {})
29
+ data, _status_code, _headers = create_validation_with_http_info(project_id, tax_validation_validation_create_params, opts)
28
30
  data
29
31
  end
30
32
 
31
- # Submits a validation request via API key (programmatic integration)
33
+ # Validates a tax identifier for a project
34
+ # Same as createValidationV1, but names its project in the path, so a key of an agency can validate for each client project it reaches. A key of a project uses its own project id.
35
+ # @param project_id [String] Id of the project
32
36
  # @param tax_validation_validation_create_params [TaxValidationValidationCreateParams] Validation input
33
37
  # @param [Hash] opts the optional parameters
34
38
  # @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 = {})
39
+ def create_validation_with_http_info(project_id, tax_validation_validation_create_params, opts = {})
36
40
  if @api_client.config.debugging
37
41
  @api_client.config.logger.debug 'Calling API: TaxValidationValidationsApi.create_validation ...'
38
42
  end
43
+ # verify the required parameter 'project_id' is set
44
+ if @api_client.config.client_side_validation && project_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling TaxValidationValidationsApi.create_validation"
46
+ end
39
47
  # verify the required parameter 'tax_validation_validation_create_params' is set
40
48
  if @api_client.config.client_side_validation && tax_validation_validation_create_params.nil?
41
49
  fail ArgumentError, "Missing the required parameter 'tax_validation_validation_create_params' when calling TaxValidationValidationsApi.create_validation"
42
50
  end
43
51
  # resource path
44
- local_var_path = '/taxvalidation/v1/validations'
52
+ local_var_path = '/taxvalidation/v2/projects/{projectId}/validations'.sub('{projectId}', CGI.escape(project_id.to_s))
45
53
 
46
54
  # query parameters
47
55
  query_params = opts[:query_params] || {}
@@ -85,31 +93,37 @@ module TrustComponent::Generated
85
93
  return data, status_code, headers
86
94
  end
87
95
 
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.
96
+ # Submits multiple validation requests for a project in one call
97
+ # Same as createValidationBatchV1, but names its project in the path. 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. A batch is always accepted or rejected as a whole.
98
+ # @param project_id [String] Id of the project
90
99
  # @param tax_validation_validation_batch_create_params [TaxValidationValidationBatchCreateParams] Batch of validation inputs
91
100
  # @param [Hash] opts the optional parameters
92
101
  # @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)
102
+ def create_validation_batch(project_id, tax_validation_validation_batch_create_params, opts = {})
103
+ data, _status_code, _headers = create_validation_batch_with_http_info(project_id, tax_validation_validation_batch_create_params, opts)
95
104
  data
96
105
  end
97
106
 
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.
107
+ # Submits multiple validation requests for a project in one call
108
+ # Same as createValidationBatchV1, but names its project in the path. 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. A batch is always accepted or rejected as a whole.
109
+ # @param project_id [String] Id of the project
100
110
  # @param tax_validation_validation_batch_create_params [TaxValidationValidationBatchCreateParams] Batch of validation inputs
101
111
  # @param [Hash] opts the optional parameters
102
112
  # @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 = {})
113
+ def create_validation_batch_with_http_info(project_id, tax_validation_validation_batch_create_params, opts = {})
104
114
  if @api_client.config.debugging
105
115
  @api_client.config.logger.debug 'Calling API: TaxValidationValidationsApi.create_validation_batch ...'
106
116
  end
117
+ # verify the required parameter 'project_id' is set
118
+ if @api_client.config.client_side_validation && project_id.nil?
119
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling TaxValidationValidationsApi.create_validation_batch"
120
+ end
107
121
  # verify the required parameter 'tax_validation_validation_batch_create_params' is set
108
122
  if @api_client.config.client_side_validation && tax_validation_validation_batch_create_params.nil?
109
123
  fail ArgumentError, "Missing the required parameter 'tax_validation_validation_batch_create_params' when calling TaxValidationValidationsApi.create_validation_batch"
110
124
  end
111
125
  # resource path
112
- local_var_path = '/taxvalidation/v1/validations/batch'
126
+ local_var_path = '/taxvalidation/v2/projects/{projectId}/validations/batch'.sub('{projectId}', CGI.escape(project_id.to_s))
113
127
 
114
128
  # query parameters
115
129
  query_params = opts[:query_params] || {}