seatschart 0.3.0 → 0.5.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/README.md +79 -11
- data/lib/seatschart/api/audit_api.rb +2 -2
- data/lib/seatschart/api/auth_api.rb +85 -8
- data/lib/seatschart/api/billing_api.rb +93 -8
- data/lib/seatschart/api/charts_api.rb +63 -63
- data/lib/seatschart/api/events_api.rb +130 -124
- data/lib/seatschart/api/public_api.rb +6 -6
- data/lib/seatschart/api/seasons_api.rb +88 -88
- data/lib/seatschart/api/seats_api.rb +6 -6
- data/lib/seatschart/api/usage_api.rb +4 -4
- data/lib/seatschart/api/workspace_api.rb +1229 -51
- data/lib/seatschart/models/{api_error.rb → api_error_body.rb} +7 -7
- data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -0
- data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_members_by_user_id200_response.rb +221 -0
- data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +50 -4
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_invitations200_response.rb +239 -0
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_invitations200_response_invitations_inner.rb +286 -0
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_members200_response.rb +239 -0
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_members200_response_members_inner.rb +288 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response.rb +288 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_account.rb +270 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_account_charts.rb +233 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_account_plan.rb +237 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_items_inner.rb +439 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_items_inner_revenue.rb +234 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_items_inner_usage.rb +271 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_seats.rb +431 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_seats_overage.rb +233 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_seats_projected.rb +237 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_totals.rb +318 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_totals_revenue.rb +238 -0
- data/lib/seatschart/models/get_api_workspaces_overview200_response_totals_seats.rb +253 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +15 -15
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
- data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
- data/lib/seatschart/models/post_api_billing_actions_change_plan_request.rb +256 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request_objects_inner.rb +0 -2
- data/lib/seatschart/models/post_api_sandboxes201_response.rb +0 -4
- data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +0 -2
- data/lib/seatschart/models/post_api_workspaces200_response.rb +464 -0
- data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
- data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
- data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations201_response.rb +238 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations201_response_invitation.rb +286 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
- data/lib/seatschart/models/post_api_workspaces_request.rb +100 -4
- data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -0
- data/lib/seatschart/version.rb +1 -1
- data/lib/seatschart/workspaces.rb +172 -0
- data/lib/seatschart.rb +41 -2
- metadata +43 -4
- data/lib/seatschart/models/put_api_charts_by_chart_id_map_draft_request.rb +0 -349
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 590c96bfa128894d11dd556141fd811e137e0465115e0d29aecac3a5eeb4c190
|
|
4
|
+
data.tar.gz: '0289a7df24571425b5aa5ad678c88b4f357e4fa53251a8c9a435774d99016936'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3fc2f7be846627bbef83a72c58ea55479bd62a668af9adb878298222e954105815b8ffd38ac1988cdf735c33bf41780fc29013770e90c3071c9ce663e08a2168
|
|
7
|
+
data.tar.gz: 2c149651a3cb6789590b3ee99e8e8a760ced17201f00b93020fa4881f145cf1a219a47f38b59f5b65848d6ef6a1c467a93ff5878239c18bc6db2b6c79e6f4d86
|
data/README.md
CHANGED
|
@@ -72,6 +72,21 @@ rescue SeatsChart::Retry::TimeoutError => e # e.error_code == 'timeout', e.attem
|
|
|
72
72
|
end
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
+
## One workspace per organizer
|
|
76
|
+
|
|
77
|
+
Ticketing platforms give each organizer its own workspace and operate all of them with one workspace admin key. `forWorkspace` scopes a client to one workspace (its id or external id) with `X-Workspace-Key`; the `Workspaces` helper provisions an organizer (`externalId`, `templateWorkspaceId`, `issueKey`, always with an `Idempotency-Key`) and covers `getByExternalId`, keys, members, invitations and the consolidated overview. The generated `WorkspaceApi` methods stay available.
|
|
78
|
+
|
|
79
|
+
```ruby
|
|
80
|
+
workspaces = SeatsChart::Workspaces.new(platform) # platform: a SeatsChart::ApiClient with the workspace admin key
|
|
81
|
+
created = workspaces.create({ displayName: 'Teatro Aurora', externalId: 'org-1042', templateWorkspaceId: 'org-template',
|
|
82
|
+
issueKey: { name: 'Server key' } }, idempotency_key: 'provision-org-1042')
|
|
83
|
+
org = SeatsChart.for_workspace('org-1042', platform) # every call through org sends X-Workspace-Key
|
|
84
|
+
events = SeatsChart::EventsApi.new(org)
|
|
85
|
+
workspaces.keys.rotate('org-1042', created.api_key.id)
|
|
86
|
+
workspaces.invitations.create('org-1042', { email: 'box-office@teatro-aurora.example', role: 'viewer' })
|
|
87
|
+
workspaces.list_all_overview(created_by_api: true).each { |row| puts "#{row.external_id} #{row.seats.sold}" }
|
|
88
|
+
```
|
|
89
|
+
|
|
75
90
|
<!-- seatschart:intro -->
|
|
76
91
|
|
|
77
92
|
# seatschart
|
|
@@ -83,7 +98,7 @@ Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api
|
|
|
83
98
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
84
99
|
|
|
85
100
|
- API version: 1.0.0
|
|
86
|
-
- Package version: 0.
|
|
101
|
+
- Package version: 0.5.0
|
|
87
102
|
- Generator version: 7.11.0
|
|
88
103
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
89
104
|
|
|
@@ -96,7 +111,7 @@ gem install seatschart
|
|
|
96
111
|
or add it to the Gemfile:
|
|
97
112
|
|
|
98
113
|
```ruby
|
|
99
|
-
gem 'seatschart', '~> 0.
|
|
114
|
+
gem 'seatschart', '~> 0.5.0'
|
|
100
115
|
```
|
|
101
116
|
|
|
102
117
|
## Getting Started
|
|
@@ -156,13 +171,15 @@ Class | Method | HTTP request | Description
|
|
|
156
171
|
*SeatsChart::AuthApi* | [**post_api_auth_accept_invite**](docs/AuthApi.md#post_api_auth_accept_invite) | **POST** /api/auth/accept-invite | Accept a workspace invitation
|
|
157
172
|
*SeatsChart::AuthApi* | [**post_api_auth_login**](docs/AuthApi.md#post_api_auth_login) | **POST** /api/auth/login | Sign in with email and password
|
|
158
173
|
*SeatsChart::AuthApi* | [**post_api_auth_logout**](docs/AuthApi.md#post_api_auth_logout) | **POST** /api/auth/logout | Revoke refresh token
|
|
174
|
+
*SeatsChart::AuthApi* | [**post_api_auth_new_workspace**](docs/AuthApi.md#post_api_auth_new_workspace) | **POST** /api/auth/new-workspace | Create a new workspace for an account that belongs to none
|
|
159
175
|
*SeatsChart::AuthApi* | [**post_api_auth_refresh**](docs/AuthApi.md#post_api_auth_refresh) | **POST** /api/auth/refresh | Rotate refresh token and issue new access JWT
|
|
160
176
|
*SeatsChart::AuthApi* | [**post_api_auth_signup**](docs/AuthApi.md#post_api_auth_signup) | **POST** /api/auth/signup | Create account and workspace
|
|
161
177
|
*SeatsChart::AuthApi* | [**post_api_auth_switch_workspace**](docs/AuthApi.md#post_api_auth_switch_workspace) | **POST** /api/auth/switch-workspace | Switch active workspace
|
|
162
|
-
*SeatsChart::BillingApi* | [**get_api_billing**](docs/BillingApi.md#get_api_billing) | **GET** /api/billing | Get billing
|
|
163
|
-
*SeatsChart::BillingApi* | [**
|
|
164
|
-
*SeatsChart::BillingApi* | [**
|
|
165
|
-
*SeatsChart::BillingApi* | [**
|
|
178
|
+
*SeatsChart::BillingApi* | [**get_api_billing**](docs/BillingApi.md#get_api_billing) | **GET** /api/billing | Get the billing account, its plan and usage
|
|
179
|
+
*SeatsChart::BillingApi* | [**post_api_billing_actions_change_plan**](docs/BillingApi.md#post_api_billing_actions_change_plan) | **POST** /api/billing/actions/change-plan | Leave Ultra On-Demand for the Free plan (the whole account)
|
|
180
|
+
*SeatsChart::BillingApi* | [**post_api_billing_checkout_session**](docs/BillingApi.md#post_api_billing_checkout_session) | **POST** /api/billing/checkout-session | Create Stripe Checkout session for a paid plan (the whole account)
|
|
181
|
+
*SeatsChart::BillingApi* | [**post_api_billing_confirm_checkout**](docs/BillingApi.md#post_api_billing_confirm_checkout) | **POST** /api/billing/confirm-checkout | Confirm checkout session and sync the account plan
|
|
182
|
+
*SeatsChart::BillingApi* | [**post_api_billing_portal_session**](docs/BillingApi.md#post_api_billing_portal_session) | **POST** /api/billing/portal-session | Create Stripe Customer Portal session (the account subscription)
|
|
166
183
|
*SeatsChart::BillingApi* | [**post_api_billing_webhook**](docs/BillingApi.md#post_api_billing_webhook) | **POST** /api/billing/webhook | Stripe webhook
|
|
167
184
|
*SeatsChart::ChartsApi* | [**delete_api_charts_by_chart_id**](docs/ChartsApi.md#delete_api_charts_by_chart_id) | **DELETE** /api/charts/{chartId} | Delete chart permanently
|
|
168
185
|
*SeatsChart::ChartsApi* | [**delete_api_charts_by_chart_id_categories_by_category_id**](docs/ChartsApi.md#delete_api_charts_by_chart_id_categories_by_category_id) | **DELETE** /api/charts/{chartId}/categories/{categoryId} | Delete a category from the chart draft
|
|
@@ -483,7 +500,10 @@ Class | Method | HTTP request | Description
|
|
|
483
500
|
*SeatsChart::WebhooksApi* | [**post_api_webhooks_by_id_deliveries_by_delivery_id_replay**](docs/WebhooksApi.md#post_api_webhooks_by_id_deliveries_by_delivery_id_replay) | **POST** /api/webhooks/{id}/deliveries/{deliveryId}/replay | Replay a webhook delivery
|
|
484
501
|
*SeatsChart::WebhooksApi* | [**post_api_webhooks_by_id_rotate_secret**](docs/WebhooksApi.md#post_api_webhooks_by_id_rotate_secret) | **POST** /api/webhooks/{id}/rotate-secret | Rotate a webhook signing secret
|
|
485
502
|
*SeatsChart::WebhooksApi* | [**post_api_webhooks_by_id_test**](docs/WebhooksApi.md#post_api_webhooks_by_id_test) | **POST** /api/webhooks/{id}/test | Send a signed test event
|
|
486
|
-
*SeatsChart::WorkspaceApi* | [**delete_api_workspaces_by_workspace_id**](docs/WorkspaceApi.md#delete_api_workspaces_by_workspace_id) | **DELETE** /api/workspaces/{workspaceId} |
|
|
503
|
+
*SeatsChart::WorkspaceApi* | [**delete_api_workspaces_by_workspace_id**](docs/WorkspaceApi.md#delete_api_workspaces_by_workspace_id) | **DELETE** /api/workspaces/{workspaceId} | Deactivate a workspace (legacy DELETE)
|
|
504
|
+
*SeatsChart::WorkspaceApi* | [**delete_api_workspaces_by_workspace_id_invitations_by_invitation_id**](docs/WorkspaceApi.md#delete_api_workspaces_by_workspace_id_invitations_by_invitation_id) | **DELETE** /api/workspaces/{workspaceId}/invitations/{invitationId} | Revoke a pending invitation of a workspace you administer
|
|
505
|
+
*SeatsChart::WorkspaceApi* | [**delete_api_workspaces_by_workspace_id_keys_by_key_id**](docs/WorkspaceApi.md#delete_api_workspaces_by_workspace_id_keys_by_key_id) | **DELETE** /api/workspaces/{workspaceId}/keys/{keyId} | Revoke a key of a workspace you administer
|
|
506
|
+
*SeatsChart::WorkspaceApi* | [**delete_api_workspaces_by_workspace_id_members_by_user_id**](docs/WorkspaceApi.md#delete_api_workspaces_by_workspace_id_members_by_user_id) | **DELETE** /api/workspaces/{workspaceId}/members/{userId} | Remove a member from a workspace you administer
|
|
487
507
|
*SeatsChart::WorkspaceApi* | [**get_api_workspace**](docs/WorkspaceApi.md#get_api_workspace) | **GET** /api/workspace | Get workspace profile for the authenticated tenant
|
|
488
508
|
*SeatsChart::WorkspaceApi* | [**get_api_workspace_buyer_extra_data**](docs/WorkspaceApi.md#get_api_workspace_buyer_extra_data) | **GET** /api/workspace/buyer-extra-data | Get the buyer extraData publication (opt-in, allow-listed keys)
|
|
489
509
|
*SeatsChart::WorkspaceApi* | [**get_api_workspace_chart_validation**](docs/WorkspaceApi.md#get_api_workspace_chart_validation) | **GET** /api/workspace/chart-validation | Get chart validation severities
|
|
@@ -491,27 +511,39 @@ Class | Method | HTTP request | Description
|
|
|
491
511
|
*SeatsChart::WorkspaceApi* | [**get_api_workspace_integration**](docs/WorkspaceApi.md#get_api_workspace_integration) | **GET** /api/workspace/integration | Get the workspace integration mode (pricing source)
|
|
492
512
|
*SeatsChart::WorkspaceApi* | [**get_api_workspace_settings**](docs/WorkspaceApi.md#get_api_workspace_settings) | **GET** /api/workspace/settings | Get workspace settings (effective value and source)
|
|
493
513
|
*SeatsChart::WorkspaceApi* | [**get_api_workspaces**](docs/WorkspaceApi.md#get_api_workspaces) | **GET** /api/workspaces | List my workspaces
|
|
514
|
+
*SeatsChart::WorkspaceApi* | [**get_api_workspaces_by_external_id_by_external_id**](docs/WorkspaceApi.md#get_api_workspaces_by_external_id_by_external_id) | **GET** /api/workspaces/by-external-id/{externalId} | Get one of my workspaces by its external id
|
|
494
515
|
*SeatsChart::WorkspaceApi* | [**get_api_workspaces_by_workspace_id**](docs/WorkspaceApi.md#get_api_workspaces_by_workspace_id) | **GET** /api/workspaces/{workspaceId} | Get one of my workspaces
|
|
516
|
+
*SeatsChart::WorkspaceApi* | [**get_api_workspaces_by_workspace_id_invitations**](docs/WorkspaceApi.md#get_api_workspaces_by_workspace_id_invitations) | **GET** /api/workspaces/{workspaceId}/invitations | List the pending invitations of a workspace you administer
|
|
517
|
+
*SeatsChart::WorkspaceApi* | [**get_api_workspaces_by_workspace_id_keys**](docs/WorkspaceApi.md#get_api_workspaces_by_workspace_id_keys) | **GET** /api/workspaces/{workspaceId}/keys | List the API keys of a workspace you administer
|
|
518
|
+
*SeatsChart::WorkspaceApi* | [**get_api_workspaces_by_workspace_id_members**](docs/WorkspaceApi.md#get_api_workspaces_by_workspace_id_members) | **GET** /api/workspaces/{workspaceId}/members | List the members of a workspace you administer
|
|
519
|
+
*SeatsChart::WorkspaceApi* | [**get_api_workspaces_overview**](docs/WorkspaceApi.md#get_api_workspaces_overview) | **GET** /api/workspaces/overview | Consolidated overview of the organizer workspaces you administer
|
|
495
520
|
*SeatsChart::WorkspaceApi* | [**patch_api_workspace**](docs/WorkspaceApi.md#patch_api_workspace) | **PATCH** /api/workspace | Update workspace display name
|
|
496
521
|
*SeatsChart::WorkspaceApi* | [**patch_api_workspace_chart_validation**](docs/WorkspaceApi.md#patch_api_workspace_chart_validation) | **PATCH** /api/workspace/chart-validation | Update chart validation severities
|
|
497
522
|
*SeatsChart::WorkspaceApi* | [**patch_api_workspace_defaults**](docs/WorkspaceApi.md#patch_api_workspace_defaults) | **PATCH** /api/workspace/defaults | Change the workspace defaults (renderer settings, draft chart drawings)
|
|
498
523
|
*SeatsChart::WorkspaceApi* | [**patch_api_workspace_integration**](docs/WorkspaceApi.md#patch_api_workspace_integration) | **PATCH** /api/workspace/integration | Change the workspace integration mode
|
|
499
524
|
*SeatsChart::WorkspaceApi* | [**patch_api_workspace_settings**](docs/WorkspaceApi.md#patch_api_workspace_settings) | **PATCH** /api/workspace/settings | Override workspace settings or return them to the default
|
|
500
|
-
*SeatsChart::WorkspaceApi* | [**patch_api_workspaces_by_workspace_id**](docs/WorkspaceApi.md#patch_api_workspaces_by_workspace_id) | **PATCH** /api/workspaces/{workspaceId} | Rename one of my workspaces
|
|
525
|
+
*SeatsChart::WorkspaceApi* | [**patch_api_workspaces_by_workspace_id**](docs/WorkspaceApi.md#patch_api_workspaces_by_workspace_id) | **PATCH** /api/workspaces/{workspaceId} | Rename one of my workspaces or change its external id
|
|
526
|
+
*SeatsChart::WorkspaceApi* | [**patch_api_workspaces_by_workspace_id_keys_by_key_id**](docs/WorkspaceApi.md#patch_api_workspaces_by_workspace_id_keys_by_key_id) | **PATCH** /api/workspaces/{workspaceId}/keys/{keyId} | Rename a key of a workspace you administer or change its scopes
|
|
501
527
|
*SeatsChart::WorkspaceApi* | [**post_api_workspace_public_key_rotate**](docs/WorkspaceApi.md#post_api_workspace_public_key_rotate) | **POST** /api/workspace/public-key/rotate | Rotate the public workspace key
|
|
502
|
-
*SeatsChart::WorkspaceApi* | [**post_api_workspaces**](docs/WorkspaceApi.md#post_api_workspaces) | **POST** /api/workspaces | Create an
|
|
528
|
+
*SeatsChart::WorkspaceApi* | [**post_api_workspaces**](docs/WorkspaceApi.md#post_api_workspaces) | **POST** /api/workspaces | Create a workspace (provision an organizer)
|
|
503
529
|
*SeatsChart::WorkspaceApi* | [**post_api_workspaces_by_workspace_id_actions_activate**](docs/WorkspaceApi.md#post_api_workspaces_by_workspace_id_actions_activate) | **POST** /api/workspaces/{workspaceId}/actions/activate | Reactivate a workspace
|
|
504
530
|
*SeatsChart::WorkspaceApi* | [**post_api_workspaces_by_workspace_id_actions_deactivate**](docs/WorkspaceApi.md#post_api_workspaces_by_workspace_id_actions_deactivate) | **POST** /api/workspaces/{workspaceId}/actions/deactivate | Deactivate a workspace
|
|
531
|
+
*SeatsChart::WorkspaceApi* | [**post_api_workspaces_by_workspace_id_actions_delete**](docs/WorkspaceApi.md#post_api_workspaces_by_workspace_id_actions_delete) | **POST** /api/workspaces/{workspaceId}/actions/delete | Delete a workspace
|
|
505
532
|
*SeatsChart::WorkspaceApi* | [**post_api_workspaces_by_workspace_id_actions_set_default**](docs/WorkspaceApi.md#post_api_workspaces_by_workspace_id_actions_set_default) | **POST** /api/workspaces/{workspaceId}/actions/set-default | Set my default workspace
|
|
533
|
+
*SeatsChart::WorkspaceApi* | [**post_api_workspaces_by_workspace_id_invitations**](docs/WorkspaceApi.md#post_api_workspaces_by_workspace_id_invitations) | **POST** /api/workspaces/{workspaceId}/invitations | Invite a person to a workspace you administer
|
|
534
|
+
*SeatsChart::WorkspaceApi* | [**post_api_workspaces_by_workspace_id_keys**](docs/WorkspaceApi.md#post_api_workspaces_by_workspace_id_keys) | **POST** /api/workspaces/{workspaceId}/keys | Mint an API key in a workspace you administer
|
|
535
|
+
*SeatsChart::WorkspaceApi* | [**post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate**](docs/WorkspaceApi.md#post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate) | **POST** /api/workspaces/{workspaceId}/keys/{keyId}/actions/rotate | Rotate the secret of a key of a workspace you administer
|
|
506
536
|
*SeatsChart::WorkspaceApi* | [**put_api_workspace_buyer_extra_data**](docs/WorkspaceApi.md#put_api_workspace_buyer_extra_data) | **PUT** /api/workspace/buyer-extra-data | Publish selected extraData keys to buyers (or stop)
|
|
507
537
|
|
|
508
538
|
|
|
509
539
|
## Documentation for Models
|
|
510
540
|
|
|
511
|
-
- [SeatsChart::
|
|
541
|
+
- [SeatsChart::ApiErrorBody](docs/ApiErrorBody.md)
|
|
512
542
|
- [SeatsChart::ApiErrorParamsValue](docs/ApiErrorParamsValue.md)
|
|
513
543
|
- [SeatsChart::DeleteApiSandboxesBySandboxId200Response](docs/DeleteApiSandboxesBySandboxId200Response.md)
|
|
514
544
|
- [SeatsChart::DeleteApiWorkspacesByWorkspaceId200Response](docs/DeleteApiWorkspacesByWorkspaceId200Response.md)
|
|
545
|
+
- [SeatsChart::DeleteApiWorkspacesByWorkspaceIdKeysByKeyId200Response](docs/DeleteApiWorkspacesByWorkspaceIdKeysByKeyId200Response.md)
|
|
546
|
+
- [SeatsChart::DeleteApiWorkspacesByWorkspaceIdMembersByUserId200Response](docs/DeleteApiWorkspacesByWorkspaceIdMembersByUserId200Response.md)
|
|
515
547
|
- [SeatsChart::GetApiChartsByChartIdVersions200Response](docs/GetApiChartsByChartIdVersions200Response.md)
|
|
516
548
|
- [SeatsChart::GetApiChartsByChartIdVersions200ResponseItemsInner](docs/GetApiChartsByChartIdVersions200ResponseItemsInner.md)
|
|
517
549
|
- [SeatsChart::GetApiChartsByChartIdVersions200ResponseItemsInnerPublishedBy](docs/GetApiChartsByChartIdVersions200ResponseItemsInnerPublishedBy.md)
|
|
@@ -549,6 +581,25 @@ Class | Method | HTTP request | Description
|
|
|
549
581
|
- [SeatsChart::GetApiWorkspaceSettings200ResponseSources](docs/GetApiWorkspaceSettings200ResponseSources.md)
|
|
550
582
|
- [SeatsChart::GetApiWorkspaces200Response](docs/GetApiWorkspaces200Response.md)
|
|
551
583
|
- [SeatsChart::GetApiWorkspaces200ResponseItemsInner](docs/GetApiWorkspaces200ResponseItemsInner.md)
|
|
584
|
+
- [SeatsChart::GetApiWorkspacesByWorkspaceIdInvitations200Response](docs/GetApiWorkspacesByWorkspaceIdInvitations200Response.md)
|
|
585
|
+
- [SeatsChart::GetApiWorkspacesByWorkspaceIdInvitations200ResponseInvitationsInner](docs/GetApiWorkspacesByWorkspaceIdInvitations200ResponseInvitationsInner.md)
|
|
586
|
+
- [SeatsChart::GetApiWorkspacesByWorkspaceIdKeys200Response](docs/GetApiWorkspacesByWorkspaceIdKeys200Response.md)
|
|
587
|
+
- [SeatsChart::GetApiWorkspacesByWorkspaceIdKeys200ResponseApiKeysInner](docs/GetApiWorkspacesByWorkspaceIdKeys200ResponseApiKeysInner.md)
|
|
588
|
+
- [SeatsChart::GetApiWorkspacesByWorkspaceIdMembers200Response](docs/GetApiWorkspacesByWorkspaceIdMembers200Response.md)
|
|
589
|
+
- [SeatsChart::GetApiWorkspacesByWorkspaceIdMembers200ResponseMembersInner](docs/GetApiWorkspacesByWorkspaceIdMembers200ResponseMembersInner.md)
|
|
590
|
+
- [SeatsChart::GetApiWorkspacesOverview200Response](docs/GetApiWorkspacesOverview200Response.md)
|
|
591
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseAccount](docs/GetApiWorkspacesOverview200ResponseAccount.md)
|
|
592
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseAccountCharts](docs/GetApiWorkspacesOverview200ResponseAccountCharts.md)
|
|
593
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseAccountPlan](docs/GetApiWorkspacesOverview200ResponseAccountPlan.md)
|
|
594
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseItemsInner](docs/GetApiWorkspacesOverview200ResponseItemsInner.md)
|
|
595
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseItemsInnerRevenue](docs/GetApiWorkspacesOverview200ResponseItemsInnerRevenue.md)
|
|
596
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseItemsInnerUsage](docs/GetApiWorkspacesOverview200ResponseItemsInnerUsage.md)
|
|
597
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseSeats](docs/GetApiWorkspacesOverview200ResponseSeats.md)
|
|
598
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseSeatsOverage](docs/GetApiWorkspacesOverview200ResponseSeatsOverage.md)
|
|
599
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseSeatsProjected](docs/GetApiWorkspacesOverview200ResponseSeatsProjected.md)
|
|
600
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseTotals](docs/GetApiWorkspacesOverview200ResponseTotals.md)
|
|
601
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseTotalsRevenue](docs/GetApiWorkspacesOverview200ResponseTotalsRevenue.md)
|
|
602
|
+
- [SeatsChart::GetApiWorkspacesOverview200ResponseTotalsSeats](docs/GetApiWorkspacesOverview200ResponseTotalsSeats.md)
|
|
552
603
|
- [SeatsChart::PatchApiChartsByChartIdCategoriesByCategoryIdRequest](docs/PatchApiChartsByChartIdCategoriesByCategoryIdRequest.md)
|
|
553
604
|
- [SeatsChart::PatchApiChartsByChartIdRequest](docs/PatchApiChartsByChartIdRequest.md)
|
|
554
605
|
- [SeatsChart::PatchApiEventsByEventIdInventoryChannelsByChannelKeyIdRequest](docs/PatchApiEventsByEventIdInventoryChannelsByChannelKeyIdRequest.md)
|
|
@@ -569,6 +620,9 @@ Class | Method | HTTP request | Description
|
|
|
569
620
|
- [SeatsChart::PatchApiWorkspaceIntegrationRequest](docs/PatchApiWorkspaceIntegrationRequest.md)
|
|
570
621
|
- [SeatsChart::PatchApiWorkspaceRequest](docs/PatchApiWorkspaceRequest.md)
|
|
571
622
|
- [SeatsChart::PatchApiWorkspaceSettingsRequest](docs/PatchApiWorkspaceSettingsRequest.md)
|
|
623
|
+
- [SeatsChart::PatchApiWorkspacesByWorkspaceIdKeysByKeyId200Response](docs/PatchApiWorkspacesByWorkspaceIdKeysByKeyId200Response.md)
|
|
624
|
+
- [SeatsChart::PatchApiWorkspacesByWorkspaceIdKeysByKeyIdRequest](docs/PatchApiWorkspacesByWorkspaceIdKeysByKeyIdRequest.md)
|
|
625
|
+
- [SeatsChart::PatchApiWorkspacesByWorkspaceIdRequest](docs/PatchApiWorkspacesByWorkspaceIdRequest.md)
|
|
572
626
|
- [SeatsChart::PostApiAuth2faDisableRequest](docs/PostApiAuth2faDisableRequest.md)
|
|
573
627
|
- [SeatsChart::PostApiAuth2faEnableRequest](docs/PostApiAuth2faEnableRequest.md)
|
|
574
628
|
- [SeatsChart::PostApiAuth2faEnrollConfirmRequest](docs/PostApiAuth2faEnrollConfirmRequest.md)
|
|
@@ -577,9 +631,11 @@ Class | Method | HTTP request | Description
|
|
|
577
631
|
- [SeatsChart::PostApiAuthAcceptInviteRequest](docs/PostApiAuthAcceptInviteRequest.md)
|
|
578
632
|
- [SeatsChart::PostApiAuthLoginRequest](docs/PostApiAuthLoginRequest.md)
|
|
579
633
|
- [SeatsChart::PostApiAuthLogoutRequest](docs/PostApiAuthLogoutRequest.md)
|
|
634
|
+
- [SeatsChart::PostApiAuthNewWorkspaceRequest](docs/PostApiAuthNewWorkspaceRequest.md)
|
|
580
635
|
- [SeatsChart::PostApiAuthRefreshRequest](docs/PostApiAuthRefreshRequest.md)
|
|
581
636
|
- [SeatsChart::PostApiAuthSignupRequest](docs/PostApiAuthSignupRequest.md)
|
|
582
637
|
- [SeatsChart::PostApiAuthSwitchWorkspaceRequest](docs/PostApiAuthSwitchWorkspaceRequest.md)
|
|
638
|
+
- [SeatsChart::PostApiBillingActionsChangePlanRequest](docs/PostApiBillingActionsChangePlanRequest.md)
|
|
583
639
|
- [SeatsChart::PostApiBillingCheckoutSessionRequest](docs/PostApiBillingCheckoutSessionRequest.md)
|
|
584
640
|
- [SeatsChart::PostApiBillingConfirmCheckoutRequest](docs/PostApiBillingConfirmCheckoutRequest.md)
|
|
585
641
|
- [SeatsChart::PostApiChartsByChartIdActionsArchive200Response](docs/PostApiChartsByChartIdActionsArchive200Response.md)
|
|
@@ -688,8 +744,20 @@ Class | Method | HTTP request | Description
|
|
|
688
744
|
- [SeatsChart::PostApiTicketBuyersRequest](docs/PostApiTicketBuyersRequest.md)
|
|
689
745
|
- [SeatsChart::PostApiViewerTokensRequest](docs/PostApiViewerTokensRequest.md)
|
|
690
746
|
- [SeatsChart::PostApiWebhooksRequest](docs/PostApiWebhooksRequest.md)
|
|
747
|
+
- [SeatsChart::PostApiWorkspaces200Response](docs/PostApiWorkspaces200Response.md)
|
|
748
|
+
- [SeatsChart::PostApiWorkspaces200ResponseApiKey](docs/PostApiWorkspaces200ResponseApiKey.md)
|
|
749
|
+
- [SeatsChart::PostApiWorkspaces200ResponseTemplate](docs/PostApiWorkspaces200ResponseTemplate.md)
|
|
750
|
+
- [SeatsChart::PostApiWorkspaces200ResponseTemplateWebhooksInner](docs/PostApiWorkspaces200ResponseTemplateWebhooksInner.md)
|
|
751
|
+
- [SeatsChart::PostApiWorkspacesByWorkspaceIdActionsDelete200Response](docs/PostApiWorkspacesByWorkspaceIdActionsDelete200Response.md)
|
|
752
|
+
- [SeatsChart::PostApiWorkspacesByWorkspaceIdActionsDeleteRequest](docs/PostApiWorkspacesByWorkspaceIdActionsDeleteRequest.md)
|
|
753
|
+
- [SeatsChart::PostApiWorkspacesByWorkspaceIdInvitations201Response](docs/PostApiWorkspacesByWorkspaceIdInvitations201Response.md)
|
|
754
|
+
- [SeatsChart::PostApiWorkspacesByWorkspaceIdInvitations201ResponseInvitation](docs/PostApiWorkspacesByWorkspaceIdInvitations201ResponseInvitation.md)
|
|
755
|
+
- [SeatsChart::PostApiWorkspacesByWorkspaceIdInvitationsRequest](docs/PostApiWorkspacesByWorkspaceIdInvitationsRequest.md)
|
|
756
|
+
- [SeatsChart::PostApiWorkspacesByWorkspaceIdKeys201Response](docs/PostApiWorkspacesByWorkspaceIdKeys201Response.md)
|
|
757
|
+
- [SeatsChart::PostApiWorkspacesByWorkspaceIdKeys201ResponseApiKey](docs/PostApiWorkspacesByWorkspaceIdKeys201ResponseApiKey.md)
|
|
758
|
+
- [SeatsChart::PostApiWorkspacesByWorkspaceIdKeysRequest](docs/PostApiWorkspacesByWorkspaceIdKeysRequest.md)
|
|
691
759
|
- [SeatsChart::PostApiWorkspacesRequest](docs/PostApiWorkspacesRequest.md)
|
|
692
|
-
- [SeatsChart::
|
|
760
|
+
- [SeatsChart::PostApiWorkspacesRequestIssueKey](docs/PostApiWorkspacesRequestIssueKey.md)
|
|
693
761
|
- [SeatsChart::PutApiChartsByChartIdTagsRequest](docs/PutApiChartsByChartIdTagsRequest.md)
|
|
694
762
|
- [SeatsChart::PutApiChartsByChartIdVersionsByVersionThumbnailRequest](docs/PutApiChartsByChartIdVersionsByVersionThumbnailRequest.md)
|
|
695
763
|
- [SeatsChart::PutApiEventsByEventIdInventoryChannelsDefinitionsRequest](docs/PutApiEventsByEventIdInventoryChannelsDefinitionsRequest.md)
|
|
@@ -20,7 +20,7 @@ module SeatsChart
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# List recent workspace audit log entries
|
|
23
|
-
# Append-only config change history for the JWT tenant. Requires `workspace_admin`. Each entry carries where the change came from when known: `ip` (client IP truncated to /24 for IPv4 or /48 for IPv6), `userAgent` and `requestId` (the `x-request-id` of the request that made it); these are never part of the public event log or its webhooks.
|
|
23
|
+
# Append-only config change history for the JWT tenant. Requires `workspace_admin`. Each entry carries where the change came from when known: `ip` (client IP truncated to /24 for IPv4 or /48 for IPv6), `userAgent` and `requestId` (the `x-request-id` of the request that made it); these are never part of the public event log or its webhooks. `summary` is an English sentence; `data` holds the details of the change (the audit metadata without those private fields, as in the event log), from which clients can render the entry in another language.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [Float] :limit (default to 50)
|
|
26
26
|
# @return [nil]
|
|
@@ -30,7 +30,7 @@ module SeatsChart
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# List recent workspace audit log entries
|
|
33
|
-
# Append-only config change history for the JWT tenant. Requires `workspace_admin`. Each entry carries where the change came from when known: `ip` (client IP truncated to /24 for IPv4 or /48 for IPv6), `userAgent` and `requestId` (the `x-request-id` of the request that made it); these are never part of the public event log or its webhooks.
|
|
33
|
+
# Append-only config change history for the JWT tenant. Requires `workspace_admin`. Each entry carries where the change came from when known: `ip` (client IP truncated to /24 for IPv4 or /48 for IPv6), `userAgent` and `requestId` (the `x-request-id` of the request that made it); these are never part of the public event log or its webhooks. `summary` is an English sentence; `data` holds the details of the change (the audit metadata without those private fields, as in the event log), from which clients can render the entry in another language.
|
|
34
34
|
# @param [Hash] opts the optional parameters
|
|
35
35
|
# @option opts [Float] :limit (default to 50)
|
|
36
36
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -142,7 +142,7 @@ module SeatsChart
|
|
|
142
142
|
end
|
|
143
143
|
|
|
144
144
|
# Current dashboard user
|
|
145
|
-
# Returns the authenticated user when the Bearer token was issued by `/auth/login` or `/auth/signup`.
|
|
145
|
+
# Returns the authenticated user when the Bearer token was issued by `/auth/login` or `/auth/signup`. `user.seatAllowance` is set when the workspace is on Free and used at least 80% of its seats of the month: `state` `near`, or `reached` when its events accept no new holds until `resumesAt` (the next UTC month) or an upgrade (holds already taken can still be confirmed); null otherwise. The seats are counted over every workspace of the billing account; `managedBy` is the e-mail of the account owner when the caller is not the owner (only the owner upgrades).
|
|
146
146
|
# @param [Hash] opts the optional parameters
|
|
147
147
|
# @return [nil]
|
|
148
148
|
def get_api_auth_me(opts = {})
|
|
@@ -151,7 +151,7 @@ module SeatsChart
|
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
# Current dashboard user
|
|
154
|
-
# Returns the authenticated user when the Bearer token was issued by `/auth/login` or `/auth/signup`.
|
|
154
|
+
# Returns the authenticated user when the Bearer token was issued by `/auth/login` or `/auth/signup`. `user.seatAllowance` is set when the workspace is on Free and used at least 80% of its seats of the month: `state` `near`, or `reached` when its events accept no new holds until `resumesAt` (the next UTC month) or an upgrade (holds already taken can still be confirmed); null otherwise. The seats are counted over every workspace of the billing account; `managedBy` is the e-mail of the account owner when the caller is not the owner (only the owner upgrades).
|
|
155
155
|
# @param [Hash] opts the optional parameters
|
|
156
156
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
157
157
|
def get_api_auth_me_with_http_info(opts = {})
|
|
@@ -802,7 +802,7 @@ module SeatsChart
|
|
|
802
802
|
end
|
|
803
803
|
|
|
804
804
|
# Sign in with email and password
|
|
805
|
-
# Returns tokens, or a second step: `{ twoFactorRequired: true, pendingToken }` when the account has two-factor authentication (finish with `POST /auth/2fa/verify`), or `{ twoFactorEnrollmentRequired: true, pendingToken }` when the workspace requires 2FA and the account has none yet (`POST /auth/2fa/enroll/start` then `/enroll/confirm`). No session exists until the second step succeeds.
|
|
805
|
+
# Returns tokens, or a second step: `{ twoFactorRequired: true, pendingToken }` when the account has two-factor authentication (finish with `POST /auth/2fa/verify`), or `{ twoFactorEnrollmentRequired: true, pendingToken }` when the workspace requires 2FA and the account has none yet (`POST /auth/2fa/enroll/start` then `/enroll/confirm`). No session exists until the second step succeeds. An account that belongs to no workspace any more gets 403 `ERR_NO_WORKSPACE` with a single-use `newWorkspaceToken` (after its two-factor code, if it has 2FA): `POST /auth/new-workspace` starts a new workspace.
|
|
806
806
|
# @param post_api_auth_login_request [PostApiAuthLoginRequest]
|
|
807
807
|
# @param [Hash] opts the optional parameters
|
|
808
808
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -813,7 +813,7 @@ module SeatsChart
|
|
|
813
813
|
end
|
|
814
814
|
|
|
815
815
|
# Sign in with email and password
|
|
816
|
-
# Returns tokens, or a second step: `{ twoFactorRequired: true, pendingToken }` when the account has two-factor authentication (finish with `POST /auth/2fa/verify`), or `{ twoFactorEnrollmentRequired: true, pendingToken }` when the workspace requires 2FA and the account has none yet (`POST /auth/2fa/enroll/start` then `/enroll/confirm`). No session exists until the second step succeeds.
|
|
816
|
+
# Returns tokens, or a second step: `{ twoFactorRequired: true, pendingToken }` when the account has two-factor authentication (finish with `POST /auth/2fa/verify`), or `{ twoFactorEnrollmentRequired: true, pendingToken }` when the workspace requires 2FA and the account has none yet (`POST /auth/2fa/enroll/start` then `/enroll/confirm`). No session exists until the second step succeeds. An account that belongs to no workspace any more gets 403 `ERR_NO_WORKSPACE` with a single-use `newWorkspaceToken` (after its two-factor code, if it has 2FA): `POST /auth/new-workspace` starts a new workspace.
|
|
817
817
|
# @param post_api_auth_login_request [PostApiAuthLoginRequest]
|
|
818
818
|
# @param [Hash] opts the optional parameters
|
|
819
819
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -953,8 +953,85 @@ module SeatsChart
|
|
|
953
953
|
return data, status_code, headers
|
|
954
954
|
end
|
|
955
955
|
|
|
956
|
+
# Create a new workspace for an account that belongs to none
|
|
957
|
+
# An account removed from its last workspace signs in with the right password (and its two-factor code, if any) and gets 403 `ERR_NO_WORKSPACE` with a single-use `newWorkspaceToken` (5 minutes). This creates a new workspace with the account as its only admin and returns the session tokens. It never restores access to a former workspace; 409 when the account belongs to a workspace again. Written to the new workspace's audit log (`workspace.create`, `reason: no_workspace_left`).
|
|
958
|
+
# @param post_api_auth_new_workspace_request [PostApiAuthNewWorkspaceRequest]
|
|
959
|
+
# @param [Hash] opts the optional parameters
|
|
960
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
961
|
+
# @return [nil]
|
|
962
|
+
def post_api_auth_new_workspace(post_api_auth_new_workspace_request, opts = {})
|
|
963
|
+
post_api_auth_new_workspace_with_http_info(post_api_auth_new_workspace_request, opts)
|
|
964
|
+
nil
|
|
965
|
+
end
|
|
966
|
+
|
|
967
|
+
# Create a new workspace for an account that belongs to none
|
|
968
|
+
# An account removed from its last workspace signs in with the right password (and its two-factor code, if any) and gets 403 `ERR_NO_WORKSPACE` with a single-use `newWorkspaceToken` (5 minutes). This creates a new workspace with the account as its only admin and returns the session tokens. It never restores access to a former workspace; 409 when the account belongs to a workspace again. Written to the new workspace's audit log (`workspace.create`, `reason: no_workspace_left`).
|
|
969
|
+
# @param post_api_auth_new_workspace_request [PostApiAuthNewWorkspaceRequest]
|
|
970
|
+
# @param [Hash] opts the optional parameters
|
|
971
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
972
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
973
|
+
def post_api_auth_new_workspace_with_http_info(post_api_auth_new_workspace_request, opts = {})
|
|
974
|
+
if @api_client.config.debugging
|
|
975
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth_new_workspace ...'
|
|
976
|
+
end
|
|
977
|
+
# verify the required parameter 'post_api_auth_new_workspace_request' is set
|
|
978
|
+
if @api_client.config.client_side_validation && post_api_auth_new_workspace_request.nil?
|
|
979
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth_new_workspace_request' when calling AuthApi.post_api_auth_new_workspace"
|
|
980
|
+
end
|
|
981
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
982
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_new_workspace, the character length must be smaller than or equal to 255.'
|
|
983
|
+
end
|
|
984
|
+
|
|
985
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
986
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_new_workspace, the character length must be great than or equal to 1.'
|
|
987
|
+
end
|
|
988
|
+
|
|
989
|
+
# resource path
|
|
990
|
+
local_var_path = '/api/auth/new-workspace'
|
|
991
|
+
|
|
992
|
+
# query parameters
|
|
993
|
+
query_params = opts[:query_params] || {}
|
|
994
|
+
|
|
995
|
+
# header parameters
|
|
996
|
+
header_params = opts[:header_params] || {}
|
|
997
|
+
# HTTP header 'Content-Type'
|
|
998
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
999
|
+
if !content_type.nil?
|
|
1000
|
+
header_params['Content-Type'] = content_type
|
|
1001
|
+
end
|
|
1002
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1003
|
+
|
|
1004
|
+
# form parameters
|
|
1005
|
+
form_params = opts[:form_params] || {}
|
|
1006
|
+
|
|
1007
|
+
# http body (model)
|
|
1008
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth_new_workspace_request)
|
|
1009
|
+
|
|
1010
|
+
# return_type
|
|
1011
|
+
return_type = opts[:debug_return_type]
|
|
1012
|
+
|
|
1013
|
+
# auth_names
|
|
1014
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1015
|
+
|
|
1016
|
+
new_options = opts.merge(
|
|
1017
|
+
:operation => :"AuthApi.post_api_auth_new_workspace",
|
|
1018
|
+
:header_params => header_params,
|
|
1019
|
+
:query_params => query_params,
|
|
1020
|
+
:form_params => form_params,
|
|
1021
|
+
:body => post_body,
|
|
1022
|
+
:auth_names => auth_names,
|
|
1023
|
+
:return_type => return_type
|
|
1024
|
+
)
|
|
1025
|
+
|
|
1026
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1027
|
+
if @api_client.config.debugging
|
|
1028
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth_new_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1029
|
+
end
|
|
1030
|
+
return data, status_code, headers
|
|
1031
|
+
end
|
|
1032
|
+
|
|
956
1033
|
# Rotate refresh token and issue new access JWT
|
|
957
|
-
# Consumes a one-time refresh token (Redis), revokes it, and returns a new refresh + access pair. Use `audience: viewer` for B2C embed tokens.
|
|
1034
|
+
# Consumes a one-time refresh token (Redis), revokes it, and returns a new refresh + access pair. Use `audience: viewer` for B2C embed tokens. Dashboard access tokens live one hour (`expiresIn`, seconds) and viewer tokens two hours; the refresh token lives 30 days and every renewal checks workspace membership and the 2FA policy again.
|
|
958
1035
|
# @param post_api_auth_refresh_request [PostApiAuthRefreshRequest]
|
|
959
1036
|
# @param [Hash] opts the optional parameters
|
|
960
1037
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -965,7 +1042,7 @@ module SeatsChart
|
|
|
965
1042
|
end
|
|
966
1043
|
|
|
967
1044
|
# Rotate refresh token and issue new access JWT
|
|
968
|
-
# Consumes a one-time refresh token (Redis), revokes it, and returns a new refresh + access pair. Use `audience: viewer` for B2C embed tokens.
|
|
1045
|
+
# Consumes a one-time refresh token (Redis), revokes it, and returns a new refresh + access pair. Use `audience: viewer` for B2C embed tokens. Dashboard access tokens live one hour (`expiresIn`, seconds) and viewer tokens two hours; the refresh token lives 30 days and every renewal checks workspace membership and the 2FA policy again.
|
|
969
1046
|
# @param post_api_auth_refresh_request [PostApiAuthRefreshRequest]
|
|
970
1047
|
# @param [Hash] opts the optional parameters
|
|
971
1048
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -1031,7 +1108,7 @@ module SeatsChart
|
|
|
1031
1108
|
end
|
|
1032
1109
|
|
|
1033
1110
|
# Create account and workspace
|
|
1034
|
-
# Registers a new user, provisions a tenant workspace, and returns an HS256 dashboard JWT (`tenant_id`, `sub`, `email`, `role`).
|
|
1111
|
+
# Registers a new user, provisions a tenant workspace, and returns an HS256 dashboard JWT (`tenant_id`, `sub`, `email`, `role`, `is_test`).
|
|
1035
1112
|
# @param post_api_auth_signup_request [PostApiAuthSignupRequest]
|
|
1036
1113
|
# @param [Hash] opts the optional parameters
|
|
1037
1114
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -1042,7 +1119,7 @@ module SeatsChart
|
|
|
1042
1119
|
end
|
|
1043
1120
|
|
|
1044
1121
|
# Create account and workspace
|
|
1045
|
-
# Registers a new user, provisions a tenant workspace, and returns an HS256 dashboard JWT (`tenant_id`, `sub`, `email`, `role`).
|
|
1122
|
+
# Registers a new user, provisions a tenant workspace, and returns an HS256 dashboard JWT (`tenant_id`, `sub`, `email`, `role`, `is_test`).
|
|
1046
1123
|
# @param post_api_auth_signup_request [PostApiAuthSignupRequest]
|
|
1047
1124
|
# @param [Hash] opts the optional parameters
|
|
1048
1125
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -19,7 +19,8 @@ module SeatsChart
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Get billing
|
|
22
|
+
# Get the billing account, its plan and usage
|
|
23
|
+
# One plan per account: the plan, its limits and the Stripe subscription belong to the billing account that owns the workspace, and apply to every workspace of the account. `account` names the owner (who alone may change the plan, from a dashboard session: `canManageBilling`), the workspaces it covers (listed to the owner) and the account's chart and event counts, which the caps count together. `usage` holds this workspace's counts (charts, events, embed domains and used objects this month); embed domains stay limited per workspace. `seats` is the used seats of the month over every production workspace of the account against the included seats, the overage so far and projected, and its cost. On Ultra On-Demand (`isSalesManaged`) the owner may switch to a paid plan through checkout (the account stays on Ultra until the checkout is confirmed) or to Free with `POST /billing/actions/change-plan`. `managedByPlatform` is true for a workspace a ticketing platform provisioned with its workspace admin key: it belongs to the platform admin's account, and plan-limit refusals carry `billingManagedByPlatform: true` instead of an upgrade prompt.
|
|
23
24
|
# @param [Hash] opts the optional parameters
|
|
24
25
|
# @return [nil]
|
|
25
26
|
def get_api_billing(opts = {})
|
|
@@ -27,7 +28,8 @@ module SeatsChart
|
|
|
27
28
|
nil
|
|
28
29
|
end
|
|
29
30
|
|
|
30
|
-
# Get billing
|
|
31
|
+
# Get the billing account, its plan and usage
|
|
32
|
+
# One plan per account: the plan, its limits and the Stripe subscription belong to the billing account that owns the workspace, and apply to every workspace of the account. `account` names the owner (who alone may change the plan, from a dashboard session: `canManageBilling`), the workspaces it covers (listed to the owner) and the account's chart and event counts, which the caps count together. `usage` holds this workspace's counts (charts, events, embed domains and used objects this month); embed domains stay limited per workspace. `seats` is the used seats of the month over every production workspace of the account against the included seats, the overage so far and projected, and its cost. On Ultra On-Demand (`isSalesManaged`) the owner may switch to a paid plan through checkout (the account stays on Ultra until the checkout is confirmed) or to Free with `POST /billing/actions/change-plan`. `managedByPlatform` is true for a workspace a ticketing platform provisioned with its workspace admin key: it belongs to the platform admin's account, and plan-limit refusals carry `billingManagedByPlatform: true` instead of an upgrade prompt.
|
|
31
33
|
# @param [Hash] opts the optional parameters
|
|
32
34
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
33
35
|
def get_api_billing_with_http_info(opts = {})
|
|
@@ -72,7 +74,85 @@ module SeatsChart
|
|
|
72
74
|
return data, status_code, headers
|
|
73
75
|
end
|
|
74
76
|
|
|
75
|
-
#
|
|
77
|
+
# Leave Ultra On-Demand for the Free plan (the whole account)
|
|
78
|
+
# Moves an Ultra On-Demand billing account to Free right away, with no payment: every workspace of the account moves at once, the Ultra limits end now and the Free limits apply (the agreed custom limits are cleared). Charts, events and embed domains above the Free limits are kept and keep working; new ones are refused (402 `plan_limit_exceeded`) until the account is back within the limits or upgrades. Returns `{ changed, previousPlanId, planId, limits, usage, withinLimits, workspaces }` (`usage`: the account's charts and events, this workspace's embed domains; `workspaces`: the workspaces that moved); an account already on Free answers 200 with `changed: false`. Audited once on the account and once on this workspace as `billing.plan_changed`. Account owner only, from a dashboard session: the other admins get 403 `billing_managed_by_owner` (with `managedBy`), the members of a workspace a ticketing platform manages 403 `billing_managed_by_platform`, API keys 403 `forbidden` (`ERR_PARTNER_SCOPE`). Send an `Idempotency-Key` to make retries safe (the first result is replayed for 24 hours; another body with the same key: 422 `idempotency_key_reused`). 400 `checkout_required` for a paid plan (use `POST /billing/checkout-session`), 400 `plan_requires_sales` for `ultra`, 409 `ERR_SUBSCRIPTION_EXISTS` with a paid subscription (change it in the billing portal), 409 `test_workspace_not_billable` in a test workspace.
|
|
79
|
+
# @param post_api_billing_actions_change_plan_request [PostApiBillingActionsChangePlanRequest]
|
|
80
|
+
# @param [Hash] opts the optional parameters
|
|
81
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
82
|
+
# @return [nil]
|
|
83
|
+
def post_api_billing_actions_change_plan(post_api_billing_actions_change_plan_request, opts = {})
|
|
84
|
+
post_api_billing_actions_change_plan_with_http_info(post_api_billing_actions_change_plan_request, opts)
|
|
85
|
+
nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Leave Ultra On-Demand for the Free plan (the whole account)
|
|
89
|
+
# Moves an Ultra On-Demand billing account to Free right away, with no payment: every workspace of the account moves at once, the Ultra limits end now and the Free limits apply (the agreed custom limits are cleared). Charts, events and embed domains above the Free limits are kept and keep working; new ones are refused (402 `plan_limit_exceeded`) until the account is back within the limits or upgrades. Returns `{ changed, previousPlanId, planId, limits, usage, withinLimits, workspaces }` (`usage`: the account's charts and events, this workspace's embed domains; `workspaces`: the workspaces that moved); an account already on Free answers 200 with `changed: false`. Audited once on the account and once on this workspace as `billing.plan_changed`. Account owner only, from a dashboard session: the other admins get 403 `billing_managed_by_owner` (with `managedBy`), the members of a workspace a ticketing platform manages 403 `billing_managed_by_platform`, API keys 403 `forbidden` (`ERR_PARTNER_SCOPE`). Send an `Idempotency-Key` to make retries safe (the first result is replayed for 24 hours; another body with the same key: 422 `idempotency_key_reused`). 400 `checkout_required` for a paid plan (use `POST /billing/checkout-session`), 400 `plan_requires_sales` for `ultra`, 409 `ERR_SUBSCRIPTION_EXISTS` with a paid subscription (change it in the billing portal), 409 `test_workspace_not_billable` in a test workspace.
|
|
90
|
+
# @param post_api_billing_actions_change_plan_request [PostApiBillingActionsChangePlanRequest]
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
93
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
94
|
+
def post_api_billing_actions_change_plan_with_http_info(post_api_billing_actions_change_plan_request, opts = {})
|
|
95
|
+
if @api_client.config.debugging
|
|
96
|
+
@api_client.config.logger.debug 'Calling API: BillingApi.post_api_billing_actions_change_plan ...'
|
|
97
|
+
end
|
|
98
|
+
# verify the required parameter 'post_api_billing_actions_change_plan_request' is set
|
|
99
|
+
if @api_client.config.client_side_validation && post_api_billing_actions_change_plan_request.nil?
|
|
100
|
+
fail ArgumentError, "Missing the required parameter 'post_api_billing_actions_change_plan_request' when calling BillingApi.post_api_billing_actions_change_plan"
|
|
101
|
+
end
|
|
102
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
103
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling BillingApi.post_api_billing_actions_change_plan, the character length must be smaller than or equal to 255.'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
107
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling BillingApi.post_api_billing_actions_change_plan, the character length must be great than or equal to 1.'
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# resource path
|
|
111
|
+
local_var_path = '/api/billing/actions/change-plan'
|
|
112
|
+
|
|
113
|
+
# query parameters
|
|
114
|
+
query_params = opts[:query_params] || {}
|
|
115
|
+
|
|
116
|
+
# header parameters
|
|
117
|
+
header_params = opts[:header_params] || {}
|
|
118
|
+
# HTTP header 'Content-Type'
|
|
119
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
120
|
+
if !content_type.nil?
|
|
121
|
+
header_params['Content-Type'] = content_type
|
|
122
|
+
end
|
|
123
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
124
|
+
|
|
125
|
+
# form parameters
|
|
126
|
+
form_params = opts[:form_params] || {}
|
|
127
|
+
|
|
128
|
+
# http body (model)
|
|
129
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_billing_actions_change_plan_request)
|
|
130
|
+
|
|
131
|
+
# return_type
|
|
132
|
+
return_type = opts[:debug_return_type]
|
|
133
|
+
|
|
134
|
+
# auth_names
|
|
135
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
136
|
+
|
|
137
|
+
new_options = opts.merge(
|
|
138
|
+
:operation => :"BillingApi.post_api_billing_actions_change_plan",
|
|
139
|
+
:header_params => header_params,
|
|
140
|
+
:query_params => query_params,
|
|
141
|
+
:form_params => form_params,
|
|
142
|
+
:body => post_body,
|
|
143
|
+
:auth_names => auth_names,
|
|
144
|
+
:return_type => return_type
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
148
|
+
if @api_client.config.debugging
|
|
149
|
+
@api_client.config.logger.debug "API called: BillingApi#post_api_billing_actions_change_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
150
|
+
end
|
|
151
|
+
return data, status_code, headers
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Create Stripe Checkout session for a paid plan (the whole account)
|
|
155
|
+
# Returns `{ url }` of a Stripe Checkout for `planId` (`starter` | `pro` | `business` | `scale`), with the metered seat overage line of the plan when configured. The subscription is the billing account's: once confirmed, every workspace of the account moves to the plan. Only the account owner, from a dashboard session: other admins get 403 `billing_managed_by_owner` (with `managedBy`, the owner's e-mail), the members of a workspace a ticketing platform manages 403 `billing_managed_by_platform`, API keys 403. 409 `ERR_SUBSCRIPTION_EXISTS` when the account already has a live subscription (change plans in the billing portal: `POST /billing/portal-session`), 409 `test_workspace_not_billable` in a test workspace, 400 `plan_requires_sales` for `ultra` (Ultra On-Demand is arranged with the SeatsChart team), 503 `stripe_not_configured` when billing is not set up. On an Ultra On-Demand account the checkout is how the owner moves to a paid plan: the account stays on Ultra until the checkout is confirmed (`POST /billing/confirm-checkout` or the Stripe webhook); the confirmed subscription then replaces Ultra (plan, limits of the plan, agreed custom limits cleared).
|
|
76
156
|
# @param post_api_billing_checkout_session_request [PostApiBillingCheckoutSessionRequest]
|
|
77
157
|
# @param [Hash] opts the optional parameters
|
|
78
158
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -82,7 +162,8 @@ module SeatsChart
|
|
|
82
162
|
nil
|
|
83
163
|
end
|
|
84
164
|
|
|
85
|
-
# Create Stripe Checkout session for a paid plan
|
|
165
|
+
# Create Stripe Checkout session for a paid plan (the whole account)
|
|
166
|
+
# Returns `{ url }` of a Stripe Checkout for `planId` (`starter` | `pro` | `business` | `scale`), with the metered seat overage line of the plan when configured. The subscription is the billing account's: once confirmed, every workspace of the account moves to the plan. Only the account owner, from a dashboard session: other admins get 403 `billing_managed_by_owner` (with `managedBy`, the owner's e-mail), the members of a workspace a ticketing platform manages 403 `billing_managed_by_platform`, API keys 403. 409 `ERR_SUBSCRIPTION_EXISTS` when the account already has a live subscription (change plans in the billing portal: `POST /billing/portal-session`), 409 `test_workspace_not_billable` in a test workspace, 400 `plan_requires_sales` for `ultra` (Ultra On-Demand is arranged with the SeatsChart team), 503 `stripe_not_configured` when billing is not set up. On an Ultra On-Demand account the checkout is how the owner moves to a paid plan: the account stays on Ultra until the checkout is confirmed (`POST /billing/confirm-checkout` or the Stripe webhook); the confirmed subscription then replaces Ultra (plan, limits of the plan, agreed custom limits cleared).
|
|
86
167
|
# @param post_api_billing_checkout_session_request [PostApiBillingCheckoutSessionRequest]
|
|
87
168
|
# @param [Hash] opts the optional parameters
|
|
88
169
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -147,7 +228,8 @@ module SeatsChart
|
|
|
147
228
|
return data, status_code, headers
|
|
148
229
|
end
|
|
149
230
|
|
|
150
|
-
# Confirm checkout session and sync plan
|
|
231
|
+
# Confirm checkout session and sync the account plan
|
|
232
|
+
# Reads the completed Stripe Checkout session of this workspace's billing account and applies its subscription to the account: every workspace of the account moves to the plan at once (audited once on the account and once on the workspace as `billing.plan_changed`). A checkout started on an Ultra On-Demand account replaces Ultra once paid; any other Stripe subscription never changes an Ultra account. Account owner only (dashboard session).
|
|
151
233
|
# @param post_api_billing_confirm_checkout_request [PostApiBillingConfirmCheckoutRequest]
|
|
152
234
|
# @param [Hash] opts the optional parameters
|
|
153
235
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -157,7 +239,8 @@ module SeatsChart
|
|
|
157
239
|
nil
|
|
158
240
|
end
|
|
159
241
|
|
|
160
|
-
# Confirm checkout session and sync plan
|
|
242
|
+
# Confirm checkout session and sync the account plan
|
|
243
|
+
# Reads the completed Stripe Checkout session of this workspace's billing account and applies its subscription to the account: every workspace of the account moves to the plan at once (audited once on the account and once on the workspace as `billing.plan_changed`). A checkout started on an Ultra On-Demand account replaces Ultra once paid; any other Stripe subscription never changes an Ultra account. Account owner only (dashboard session).
|
|
161
244
|
# @param post_api_billing_confirm_checkout_request [PostApiBillingConfirmCheckoutRequest]
|
|
162
245
|
# @param [Hash] opts the optional parameters
|
|
163
246
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -222,7 +305,8 @@ module SeatsChart
|
|
|
222
305
|
return data, status_code, headers
|
|
223
306
|
end
|
|
224
307
|
|
|
225
|
-
# Create Stripe Customer Portal session
|
|
308
|
+
# Create Stripe Customer Portal session (the account subscription)
|
|
309
|
+
# Returns `{ url }` of the Stripe billing portal of the billing account (change or cancel the subscription; the change applies to every workspace of the account). Account owner only, from a dashboard session (403 `billing_managed_by_owner` with `managedBy` for the other admins, 403 `billing_managed_by_platform` for the members of a workspace a ticketing platform manages). 409 `plan_managed_by_sales` on Ultra On-Demand (no Stripe subscription: switch plan with checkout or `POST /billing/actions/change-plan`), 409 `test_workspace_not_billable` in a test workspace.
|
|
226
310
|
# @param [Hash] opts the optional parameters
|
|
227
311
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
228
312
|
# @return [nil]
|
|
@@ -231,7 +315,8 @@ module SeatsChart
|
|
|
231
315
|
nil
|
|
232
316
|
end
|
|
233
317
|
|
|
234
|
-
# Create Stripe Customer Portal session
|
|
318
|
+
# Create Stripe Customer Portal session (the account subscription)
|
|
319
|
+
# Returns `{ url }` of the Stripe billing portal of the billing account (change or cancel the subscription; the change applies to every workspace of the account). Account owner only, from a dashboard session (403 `billing_managed_by_owner` with `managedBy` for the other admins, 403 `billing_managed_by_platform` for the members of a workspace a ticketing platform manages). 409 `plan_managed_by_sales` on Ultra On-Demand (no Stripe subscription: switch plan with checkout or `POST /billing/actions/change-plan`), 409 `test_workspace_not_billable` in a test workspace.
|
|
235
320
|
# @param [Hash] opts the optional parameters
|
|
236
321
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
237
322
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|