cybrid_api_organization_ruby 0.118.120 → 0.118.124
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +18 -6
- data/cybrid_api_organization_ruby.gemspec +2 -2
- data/docs/PostSubscriptionDeliveryOrganizationModel.md +20 -0
- data/docs/SubscriptionDeliveriesOrganizationApi.md +236 -0
- data/docs/SubscriptionDeliveryListOrganizationModel.md +24 -0
- data/docs/SubscriptionDeliveryOrganizationModel.md +38 -0
- data/docs/SubscriptionEventListOrganizationModel.md +24 -0
- data/docs/SubscriptionEventOrganizationModel.md +30 -0
- data/docs/SubscriptionEventsOrganizationApi.md +159 -0
- data/docs/SubscriptionOrganizationModel.md +6 -0
- data/docs/SubscriptionsOrganizationApi.md +11 -5
- data/lib/cybrid_api_organization_ruby/api/organizations_organization_api.rb +2 -2
- data/lib/cybrid_api_organization_ruby/api/subscription_deliveries_organization_api.rb +237 -0
- data/lib/cybrid_api_organization_ruby/api/subscription_events_organization_api.rb +163 -0
- data/lib/cybrid_api_organization_ruby/api/subscriptions_organization_api.rb +8 -2
- data/lib/cybrid_api_organization_ruby/api_client.rb +2 -2
- data/lib/cybrid_api_organization_ruby/api_error.rb +2 -2
- data/lib/cybrid_api_organization_ruby/configuration.rb +2 -2
- data/lib/cybrid_api_organization_ruby/models/error_response_organization_model.rb +2 -2
- data/lib/cybrid_api_organization_ruby/models/organization_organization_model.rb +2 -2
- data/lib/cybrid_api_organization_ruby/models/patch_organization_organization_model.rb +2 -2
- data/lib/cybrid_api_organization_ruby/models/post_subscription_delivery_organization_model.rb +240 -0
- data/lib/cybrid_api_organization_ruby/models/post_subscription_organization_model.rb +2 -2
- data/lib/cybrid_api_organization_ruby/models/subscription_delivery_list_organization_model.rb +328 -0
- data/lib/cybrid_api_organization_ruby/models/subscription_delivery_organization_model.rb +383 -0
- data/lib/cybrid_api_organization_ruby/models/subscription_environment_organization_model.rb +2 -2
- data/lib/cybrid_api_organization_ruby/models/subscription_event_list_organization_model.rb +328 -0
- data/lib/cybrid_api_organization_ruby/models/subscription_event_organization_model.rb +305 -0
- data/lib/cybrid_api_organization_ruby/models/subscription_list_organization_model.rb +2 -2
- data/lib/cybrid_api_organization_ruby/models/subscription_organization_model.rb +63 -8
- data/lib/cybrid_api_organization_ruby/models/subscription_state_organization_model.rb +2 -2
- data/lib/cybrid_api_organization_ruby/models/subscription_type_organization_model.rb +2 -2
- data/lib/cybrid_api_organization_ruby/version.rb +3 -3
- data/lib/cybrid_api_organization_ruby.rb +9 -2
- data/spec/api/organizations_organization_api_spec.rb +2 -2
- data/spec/api/subscription_deliveries_organization_api_spec.rb +75 -0
- data/spec/api/subscription_events_organization_api_spec.rb +61 -0
- data/spec/api/subscriptions_organization_api_spec.rb +4 -2
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/error_response_organization_model_spec.rb +2 -2
- data/spec/models/organization_organization_model_spec.rb +2 -2
- data/spec/models/patch_organization_organization_model_spec.rb +2 -2
- data/spec/models/post_subscription_delivery_organization_model_spec.rb +40 -0
- data/spec/models/post_subscription_organization_model_spec.rb +2 -2
- data/spec/models/subscription_delivery_list_organization_model_spec.rb +52 -0
- data/spec/models/subscription_delivery_organization_model_spec.rb +98 -0
- data/spec/models/subscription_environment_organization_model_spec.rb +2 -2
- data/spec/models/subscription_event_list_organization_model_spec.rb +52 -0
- data/spec/models/subscription_event_organization_model_spec.rb +70 -0
- data/spec/models/subscription_list_organization_model_spec.rb +2 -2
- data/spec/models/subscription_organization_model_spec.rb +20 -2
- data/spec/models/subscription_state_organization_model_spec.rb +2 -2
- data/spec/models/subscription_type_organization_model_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.1.1/gem_make.out +5 -5
- metadata +30 -2
@@ -0,0 +1,159 @@
|
|
1
|
+
# CybridApiOrganization::SubscriptionEventsOrganizationApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://organization.sandbox.cybrid.app*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**get_subscription_event**](SubscriptionEventsOrganizationApi.md#get_subscription_event) | **GET** /api/subscription_events/{subscription_event_guid} | Get Subscription Event |
|
8
|
+
| [**list_subscription_events**](SubscriptionEventsOrganizationApi.md#list_subscription_events) | **GET** /api/subscription_events | Get subscription events list |
|
9
|
+
|
10
|
+
|
11
|
+
## get_subscription_event
|
12
|
+
|
13
|
+
> <SubscriptionEventOrganizationModel> get_subscription_event(subscription_event_guid)
|
14
|
+
|
15
|
+
Get Subscription Event
|
16
|
+
|
17
|
+
Retrieves a Subscription Event. Required scope: **subscription_events:read**
|
18
|
+
|
19
|
+
### Examples
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'time'
|
23
|
+
require 'cybrid_api_organization_ruby'
|
24
|
+
# setup authorization
|
25
|
+
CybridApiOrganization.configure do |config|
|
26
|
+
# Configure Bearer authorization (JWT): BearerAuth
|
27
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
28
|
+
|
29
|
+
# Configure OAuth2 access token for authorization: oauth2
|
30
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = CybridApiOrganization::SubscriptionEventsOrganizationApi.new
|
34
|
+
subscription_event_guid = 'subscription_event_guid_example' # String | Identifier for the Subscription Event.
|
35
|
+
|
36
|
+
begin
|
37
|
+
# Get Subscription Event
|
38
|
+
result = api_instance.get_subscription_event(subscription_event_guid)
|
39
|
+
p result
|
40
|
+
rescue CybridApiOrganization::ApiError => e
|
41
|
+
puts "Error when calling SubscriptionEventsOrganizationApi->get_subscription_event: #{e}"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
#### Using the get_subscription_event_with_http_info variant
|
46
|
+
|
47
|
+
This returns an Array which contains the response data, status code and headers.
|
48
|
+
|
49
|
+
> <Array(<SubscriptionEventOrganizationModel>, Integer, Hash)> get_subscription_event_with_http_info(subscription_event_guid)
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
begin
|
53
|
+
# Get Subscription Event
|
54
|
+
data, status_code, headers = api_instance.get_subscription_event_with_http_info(subscription_event_guid)
|
55
|
+
p status_code # => 2xx
|
56
|
+
p headers # => { ... }
|
57
|
+
p data # => <SubscriptionEventOrganizationModel>
|
58
|
+
rescue CybridApiOrganization::ApiError => e
|
59
|
+
puts "Error when calling SubscriptionEventsOrganizationApi->get_subscription_event_with_http_info: #{e}"
|
60
|
+
end
|
61
|
+
```
|
62
|
+
|
63
|
+
### Parameters
|
64
|
+
|
65
|
+
| Name | Type | Description | Notes |
|
66
|
+
| ---- | ---- | ----------- | ----- |
|
67
|
+
| **subscription_event_guid** | **String** | Identifier for the Subscription Event. | |
|
68
|
+
|
69
|
+
### Return type
|
70
|
+
|
71
|
+
[**SubscriptionEventOrganizationModel**](SubscriptionEventOrganizationModel.md)
|
72
|
+
|
73
|
+
### Authorization
|
74
|
+
|
75
|
+
[BearerAuth](../README.md#BearerAuth), [oauth2](../README.md#oauth2)
|
76
|
+
|
77
|
+
### HTTP request headers
|
78
|
+
|
79
|
+
- **Content-Type**: Not defined
|
80
|
+
- **Accept**: application/json
|
81
|
+
|
82
|
+
|
83
|
+
## list_subscription_events
|
84
|
+
|
85
|
+
> <SubscriptionEventListOrganizationModel> list_subscription_events(opts)
|
86
|
+
|
87
|
+
Get subscription events list
|
88
|
+
|
89
|
+
Retrieves a listing of subscription events s. Required scope: **subscription_events:read**
|
90
|
+
|
91
|
+
### Examples
|
92
|
+
|
93
|
+
```ruby
|
94
|
+
require 'time'
|
95
|
+
require 'cybrid_api_organization_ruby'
|
96
|
+
# setup authorization
|
97
|
+
CybridApiOrganization.configure do |config|
|
98
|
+
# Configure Bearer authorization (JWT): BearerAuth
|
99
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
100
|
+
|
101
|
+
# Configure OAuth2 access token for authorization: oauth2
|
102
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
103
|
+
end
|
104
|
+
|
105
|
+
api_instance = CybridApiOrganization::SubscriptionEventsOrganizationApi.new
|
106
|
+
opts = {
|
107
|
+
page: 56, # Integer | The page index to retrieve.
|
108
|
+
per_page: 56, # Integer | The number of entities per page to return.
|
109
|
+
guid: 'guid_example' # String | Comma separated subscription_event_guids to list subscription events for.
|
110
|
+
}
|
111
|
+
|
112
|
+
begin
|
113
|
+
# Get subscription events list
|
114
|
+
result = api_instance.list_subscription_events(opts)
|
115
|
+
p result
|
116
|
+
rescue CybridApiOrganization::ApiError => e
|
117
|
+
puts "Error when calling SubscriptionEventsOrganizationApi->list_subscription_events: #{e}"
|
118
|
+
end
|
119
|
+
```
|
120
|
+
|
121
|
+
#### Using the list_subscription_events_with_http_info variant
|
122
|
+
|
123
|
+
This returns an Array which contains the response data, status code and headers.
|
124
|
+
|
125
|
+
> <Array(<SubscriptionEventListOrganizationModel>, Integer, Hash)> list_subscription_events_with_http_info(opts)
|
126
|
+
|
127
|
+
```ruby
|
128
|
+
begin
|
129
|
+
# Get subscription events list
|
130
|
+
data, status_code, headers = api_instance.list_subscription_events_with_http_info(opts)
|
131
|
+
p status_code # => 2xx
|
132
|
+
p headers # => { ... }
|
133
|
+
p data # => <SubscriptionEventListOrganizationModel>
|
134
|
+
rescue CybridApiOrganization::ApiError => e
|
135
|
+
puts "Error when calling SubscriptionEventsOrganizationApi->list_subscription_events_with_http_info: #{e}"
|
136
|
+
end
|
137
|
+
```
|
138
|
+
|
139
|
+
### Parameters
|
140
|
+
|
141
|
+
| Name | Type | Description | Notes |
|
142
|
+
| ---- | ---- | ----------- | ----- |
|
143
|
+
| **page** | **Integer** | The page index to retrieve. | [optional] |
|
144
|
+
| **per_page** | **Integer** | The number of entities per page to return. | [optional] |
|
145
|
+
| **guid** | **String** | Comma separated subscription_event_guids to list subscription events for. | [optional] |
|
146
|
+
|
147
|
+
### Return type
|
148
|
+
|
149
|
+
[**SubscriptionEventListOrganizationModel**](SubscriptionEventListOrganizationModel.md)
|
150
|
+
|
151
|
+
### Authorization
|
152
|
+
|
153
|
+
[BearerAuth](../README.md#BearerAuth), [oauth2](../README.md#oauth2)
|
154
|
+
|
155
|
+
### HTTP request headers
|
156
|
+
|
157
|
+
- **Content-Type**: Not defined
|
158
|
+
- **Accept**: application/json
|
159
|
+
|
@@ -5,9 +5,12 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **guid** | **String** | Auto-generated unique identifier for the subscription. | |
|
8
|
+
| **organization_guid** | **String** | The organization guid for the subscription. | [optional] |
|
8
9
|
| **name** | **String** | Name provided for the subscription. | |
|
9
10
|
| **type** | **String** | The type of subscription. | |
|
10
11
|
| **url** | **String** | The url for the subscription. | |
|
12
|
+
| **signing_key** | **String** | Subscription private signing key. | [optional] |
|
13
|
+
| **deliveries_failing_since** | **Time** | ISO8601 datetime the deliveries started failing. | [optional] |
|
11
14
|
| **environment** | **String** | The environment that the subscription is configured for; one of sandbox or production. | |
|
12
15
|
| **state** | **String** | The state of the subscription; one of storing, completed, or failed. | |
|
13
16
|
| **failure_code** | **String** | The failure code of a subscription (if any) | [optional] |
|
@@ -21,9 +24,12 @@ require 'cybrid_api_organization_ruby'
|
|
21
24
|
|
22
25
|
instance = CybridApiOrganization::SubscriptionOrganizationModel.new(
|
23
26
|
guid: null,
|
27
|
+
organization_guid: null,
|
24
28
|
name: null,
|
25
29
|
type: null,
|
26
30
|
url: null,
|
31
|
+
signing_key: null,
|
32
|
+
deliveries_failing_since: null,
|
27
33
|
environment: null,
|
28
34
|
state: null,
|
29
35
|
failure_code: null,
|
@@ -155,7 +155,7 @@ nil (empty response body)
|
|
155
155
|
|
156
156
|
## get_subscription
|
157
157
|
|
158
|
-
> <SubscriptionOrganizationModel> get_subscription(subscription_guid)
|
158
|
+
> <SubscriptionOrganizationModel> get_subscription(subscription_guid, opts)
|
159
159
|
|
160
160
|
Get Subscription
|
161
161
|
|
@@ -177,10 +177,13 @@ end
|
|
177
177
|
|
178
178
|
api_instance = CybridApiOrganization::SubscriptionsOrganizationApi.new
|
179
179
|
subscription_guid = 'subscription_guid_example' # String | Identifier for the subscription.
|
180
|
+
opts = {
|
181
|
+
include_signing_key: true # Boolean | Flag to include signing key in the response.
|
182
|
+
}
|
180
183
|
|
181
184
|
begin
|
182
185
|
# Get Subscription
|
183
|
-
result = api_instance.get_subscription(subscription_guid)
|
186
|
+
result = api_instance.get_subscription(subscription_guid, opts)
|
184
187
|
p result
|
185
188
|
rescue CybridApiOrganization::ApiError => e
|
186
189
|
puts "Error when calling SubscriptionsOrganizationApi->get_subscription: #{e}"
|
@@ -191,12 +194,12 @@ end
|
|
191
194
|
|
192
195
|
This returns an Array which contains the response data, status code and headers.
|
193
196
|
|
194
|
-
> <Array(<SubscriptionOrganizationModel>, Integer, Hash)> get_subscription_with_http_info(subscription_guid)
|
197
|
+
> <Array(<SubscriptionOrganizationModel>, Integer, Hash)> get_subscription_with_http_info(subscription_guid, opts)
|
195
198
|
|
196
199
|
```ruby
|
197
200
|
begin
|
198
201
|
# Get Subscription
|
199
|
-
data, status_code, headers = api_instance.get_subscription_with_http_info(subscription_guid)
|
202
|
+
data, status_code, headers = api_instance.get_subscription_with_http_info(subscription_guid, opts)
|
200
203
|
p status_code # => 2xx
|
201
204
|
p headers # => { ... }
|
202
205
|
p data # => <SubscriptionOrganizationModel>
|
@@ -210,6 +213,7 @@ end
|
|
210
213
|
| Name | Type | Description | Notes |
|
211
214
|
| ---- | ---- | ----------- | ----- |
|
212
215
|
| **subscription_guid** | **String** | Identifier for the subscription. | |
|
216
|
+
| **include_signing_key** | **Boolean** | Flag to include signing key in the response. | [optional] |
|
213
217
|
|
214
218
|
### Return type
|
215
219
|
|
@@ -251,7 +255,8 @@ api_instance = CybridApiOrganization::SubscriptionsOrganizationApi.new
|
|
251
255
|
opts = {
|
252
256
|
page: 56, # Integer | The page index to retrieve.
|
253
257
|
per_page: 56, # Integer | The number of entities per page to return.
|
254
|
-
guid: 'guid_example' # String | Comma separated subscription_guids to list subscriptions for.
|
258
|
+
guid: 'guid_example', # String | Comma separated subscription_guids to list subscriptions for.
|
259
|
+
include_signing_key: true # Boolean | Flag to include signing key in the response.
|
255
260
|
}
|
256
261
|
|
257
262
|
begin
|
@@ -288,6 +293,7 @@ end
|
|
288
293
|
| **page** | **Integer** | The page index to retrieve. | [optional] |
|
289
294
|
| **per_page** | **Integer** | The number of entities per page to return. | [optional] |
|
290
295
|
| **guid** | **String** | Comma separated subscription_guids to list subscriptions for. | [optional] |
|
296
|
+
| **include_signing_key** | **Boolean** | Flag to include signing key in the response. | [optional] |
|
291
297
|
|
292
298
|
### Return type
|
293
299
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Cybrid Organization API
|
3
3
|
|
4
|
-
## Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you'll find details on how our REST API operates and generally how our platform functions. If you're looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid's public interactive API documentation, which allows you to fully test our APIs. If you'd like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you're new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Understanding the Platform](https://kb.cybrid.xyz/understanding-the-platform) 2. [Getting Started in the Cybrid Sandbox](https://kb.cybrid.xyz/getting-started-guide) 3. [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading) 4. [Running the Web Demo App](https://kb.cybrid.xyz/locally-running-the-web-demo-app) (or, alternatively, [Testing with Hosted Web Demo App](https://kb.cybrid.xyz/testing-with-hosted-web-demo-app)) In [Getting Started in the Cybrid Sandbox](https://kb.cybrid.xyz/getting-started-guide), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. If you've already run through the first two guides, you can follow the [Running the Web Demo App](https://kb.cybrid.xyz/locally-running-the-web-demo-app) guide to test our web SDK with your sandbox `bank` and `customer`. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you'll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\"orange\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d '{ \"grant_type\": \"client_credentials\", \"client_id\": \"<Your Client ID>\", \"client_secret\": \"<Your Secret>\", \"scope\": \"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\" }' -H \"Content-Type: application/json\" # When using Organization credentials set `scope` to 'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute identity_verifications:read' ``` <font color=\"orange\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you'd like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC'd) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer.
|
4
|
+
## Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you'll find details on how our REST API operates and generally how our platform functions. If you're looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid's public interactive API documentation, which allows you to fully test our APIs. If you'd like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you're new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Understanding the Platform](https://kb.cybrid.xyz/understanding-the-platform) 2. [Getting Started in the Cybrid Sandbox](https://kb.cybrid.xyz/getting-started-guide) 3. [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading) 4. [Running the Web Demo App](https://kb.cybrid.xyz/locally-running-the-web-demo-app) (or, alternatively, [Testing with Hosted Web Demo App](https://kb.cybrid.xyz/testing-with-hosted-web-demo-app)) In [Getting Started in the Cybrid Sandbox](https://kb.cybrid.xyz/getting-started-guide), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. If you've already run through the first two guides, you can follow the [Running the Web Demo App](https://kb.cybrid.xyz/locally-running-the-web-demo-app) guide to test our web SDK with your sandbox `bank` and `customer`. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you'll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\"orange\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d '{ \"grant_type\": \"client_credentials\", \"client_id\": \"<Your Client ID>\", \"client_secret\": \"<Your Secret>\", \"scope\": \"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\" }' -H \"Content-Type: application/json\" # When using Organization credentials set `scope` to 'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read' ``` <font color=\"orange\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you'd like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC'd) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.118.
|
6
|
+
The version of the OpenAPI document: v0.118.124
|
7
7
|
Contact: support@cybrid.app
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 6.0.0
|
@@ -0,0 +1,237 @@
|
|
1
|
+
=begin
|
2
|
+
#Cybrid Organization API
|
3
|
+
|
4
|
+
## Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you'll find details on how our REST API operates and generally how our platform functions. If you're looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid's public interactive API documentation, which allows you to fully test our APIs. If you'd like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you're new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Understanding the Platform](https://kb.cybrid.xyz/understanding-the-platform) 2. [Getting Started in the Cybrid Sandbox](https://kb.cybrid.xyz/getting-started-guide) 3. [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading) 4. [Running the Web Demo App](https://kb.cybrid.xyz/locally-running-the-web-demo-app) (or, alternatively, [Testing with Hosted Web Demo App](https://kb.cybrid.xyz/testing-with-hosted-web-demo-app)) In [Getting Started in the Cybrid Sandbox](https://kb.cybrid.xyz/getting-started-guide), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. If you've already run through the first two guides, you can follow the [Running the Web Demo App](https://kb.cybrid.xyz/locally-running-the-web-demo-app) guide to test our web SDK with your sandbox `bank` and `customer`. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you'll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\"orange\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d '{ \"grant_type\": \"client_credentials\", \"client_id\": \"<Your Client ID>\", \"client_secret\": \"<Your Secret>\", \"scope\": \"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\" }' -H \"Content-Type: application/json\" # When using Organization credentials set `scope` to 'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read' ``` <font color=\"orange\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you'd like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC'd) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.118.124
|
7
|
+
Contact: support@cybrid.app
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module CybridApiOrganization
|
16
|
+
class SubscriptionDeliveriesOrganizationApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create SubscriptionDelivery
|
23
|
+
# Creates a SubscriptionDelivery. post Required scope: **subscription_events:execute
|
24
|
+
# @param post_subscription_delivery_organization_model [PostSubscriptionDeliveryOrganizationModel]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [SubscriptionDeliveryOrganizationModel]
|
27
|
+
def create_subscription_delivery(post_subscription_delivery_organization_model, opts = {})
|
28
|
+
data, _status_code, _headers = create_subscription_delivery_with_http_info(post_subscription_delivery_organization_model, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create SubscriptionDelivery
|
33
|
+
# Creates a SubscriptionDelivery. post Required scope: **subscription_events:execute
|
34
|
+
# @param post_subscription_delivery_organization_model [PostSubscriptionDeliveryOrganizationModel]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(SubscriptionDeliveryOrganizationModel, Integer, Hash)>] SubscriptionDeliveryOrganizationModel data, response status code and response headers
|
37
|
+
def create_subscription_delivery_with_http_info(post_subscription_delivery_organization_model, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionDeliveriesOrganizationApi.create_subscription_delivery ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'post_subscription_delivery_organization_model' is set
|
42
|
+
if @api_client.config.client_side_validation && post_subscription_delivery_organization_model.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'post_subscription_delivery_organization_model' when calling SubscriptionDeliveriesOrganizationApi.create_subscription_delivery"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/api/subscription_deliveries/'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
57
|
+
if !content_type.nil?
|
58
|
+
header_params['Content-Type'] = content_type
|
59
|
+
end
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_subscription_delivery_organization_model)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:debug_return_type] || 'SubscriptionDeliveryOrganizationModel'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth', 'oauth2']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:operation => :"SubscriptionDeliveriesOrganizationApi.create_subscription_delivery",
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type
|
81
|
+
)
|
82
|
+
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: SubscriptionDeliveriesOrganizationApi#create_subscription_delivery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Get Subscription Delivery
|
91
|
+
# Retrieves a subscription delivery. Required scope: **subscription_events:read**
|
92
|
+
# @param subscription_delivery_guid [String] Identifier for the subscription delivery.
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [SubscriptionDeliveryOrganizationModel]
|
95
|
+
def get_subscription_delivery(subscription_delivery_guid, opts = {})
|
96
|
+
data, _status_code, _headers = get_subscription_delivery_with_http_info(subscription_delivery_guid, opts)
|
97
|
+
data
|
98
|
+
end
|
99
|
+
|
100
|
+
# Get Subscription Delivery
|
101
|
+
# Retrieves a subscription delivery. Required scope: **subscription_events:read**
|
102
|
+
# @param subscription_delivery_guid [String] Identifier for the subscription delivery.
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @return [Array<(SubscriptionDeliveryOrganizationModel, Integer, Hash)>] SubscriptionDeliveryOrganizationModel data, response status code and response headers
|
105
|
+
def get_subscription_delivery_with_http_info(subscription_delivery_guid, opts = {})
|
106
|
+
if @api_client.config.debugging
|
107
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionDeliveriesOrganizationApi.get_subscription_delivery ...'
|
108
|
+
end
|
109
|
+
# verify the required parameter 'subscription_delivery_guid' is set
|
110
|
+
if @api_client.config.client_side_validation && subscription_delivery_guid.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'subscription_delivery_guid' when calling SubscriptionDeliveriesOrganizationApi.get_subscription_delivery"
|
112
|
+
end
|
113
|
+
# resource path
|
114
|
+
local_var_path = '/api/subscription_deliveries/{subscription_delivery_guid}'.sub('{' + 'subscription_delivery_guid' + '}', CGI.escape(subscription_delivery_guid.to_s))
|
115
|
+
|
116
|
+
# query parameters
|
117
|
+
query_params = opts[:query_params] || {}
|
118
|
+
|
119
|
+
# header parameters
|
120
|
+
header_params = opts[:header_params] || {}
|
121
|
+
# HTTP header 'Accept' (if needed)
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
123
|
+
|
124
|
+
# form parameters
|
125
|
+
form_params = opts[:form_params] || {}
|
126
|
+
|
127
|
+
# http body (model)
|
128
|
+
post_body = opts[:debug_body]
|
129
|
+
|
130
|
+
# return_type
|
131
|
+
return_type = opts[:debug_return_type] || 'SubscriptionDeliveryOrganizationModel'
|
132
|
+
|
133
|
+
# auth_names
|
134
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth', 'oauth2']
|
135
|
+
|
136
|
+
new_options = opts.merge(
|
137
|
+
:operation => :"SubscriptionDeliveriesOrganizationApi.get_subscription_delivery",
|
138
|
+
:header_params => header_params,
|
139
|
+
:query_params => query_params,
|
140
|
+
:form_params => form_params,
|
141
|
+
:body => post_body,
|
142
|
+
:auth_names => auth_names,
|
143
|
+
:return_type => return_type
|
144
|
+
)
|
145
|
+
|
146
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
147
|
+
if @api_client.config.debugging
|
148
|
+
@api_client.config.logger.debug "API called: SubscriptionDeliveriesOrganizationApi#get_subscription_delivery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
149
|
+
end
|
150
|
+
return data, status_code, headers
|
151
|
+
end
|
152
|
+
|
153
|
+
# Get subscription deliveries list
|
154
|
+
# Retrieves a listing of subscription deliveries s. Required scope: **subscription_events:read**
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @option opts [Integer] :page The page index to retrieve.
|
157
|
+
# @option opts [Integer] :per_page The number of entities per page to return.
|
158
|
+
# @option opts [String] :guid Comma separated subscription_delivery_guids to list subscription deliveries for.
|
159
|
+
# @option opts [String] :subscription_event_guid Comma separated subscription_event_guids to list subscription deliveries for.
|
160
|
+
# @option opts [String] :subscription_guid Comma separated subscription_guids to list subscription deliveries for.
|
161
|
+
# @return [SubscriptionDeliveryListOrganizationModel]
|
162
|
+
def list_subscription_deliveries(opts = {})
|
163
|
+
data, _status_code, _headers = list_subscription_deliveries_with_http_info(opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# Get subscription deliveries list
|
168
|
+
# Retrieves a listing of subscription deliveries s. Required scope: **subscription_events:read**
|
169
|
+
# @param [Hash] opts the optional parameters
|
170
|
+
# @option opts [Integer] :page The page index to retrieve.
|
171
|
+
# @option opts [Integer] :per_page The number of entities per page to return.
|
172
|
+
# @option opts [String] :guid Comma separated subscription_delivery_guids to list subscription deliveries for.
|
173
|
+
# @option opts [String] :subscription_event_guid Comma separated subscription_event_guids to list subscription deliveries for.
|
174
|
+
# @option opts [String] :subscription_guid Comma separated subscription_guids to list subscription deliveries for.
|
175
|
+
# @return [Array<(SubscriptionDeliveryListOrganizationModel, Integer, Hash)>] SubscriptionDeliveryListOrganizationModel data, response status code and response headers
|
176
|
+
def list_subscription_deliveries_with_http_info(opts = {})
|
177
|
+
if @api_client.config.debugging
|
178
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionDeliveriesOrganizationApi.list_subscription_deliveries ...'
|
179
|
+
end
|
180
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
|
181
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SubscriptionDeliveriesOrganizationApi.list_subscription_deliveries, must be greater than or equal to 0.'
|
182
|
+
end
|
183
|
+
|
184
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
|
185
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling SubscriptionDeliveriesOrganizationApi.list_subscription_deliveries, must be smaller than or equal to 100.'
|
186
|
+
end
|
187
|
+
|
188
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
|
189
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling SubscriptionDeliveriesOrganizationApi.list_subscription_deliveries, must be greater than or equal to 1.'
|
190
|
+
end
|
191
|
+
|
192
|
+
# resource path
|
193
|
+
local_var_path = '/api/subscription_deliveries'
|
194
|
+
|
195
|
+
# query parameters
|
196
|
+
query_params = opts[:query_params] || {}
|
197
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
198
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
199
|
+
query_params[:'guid'] = opts[:'guid'] if !opts[:'guid'].nil?
|
200
|
+
query_params[:'subscription_event_guid'] = opts[:'subscription_event_guid'] if !opts[:'subscription_event_guid'].nil?
|
201
|
+
query_params[:'subscription_guid'] = opts[:'subscription_guid'] if !opts[:'subscription_guid'].nil?
|
202
|
+
|
203
|
+
# header parameters
|
204
|
+
header_params = opts[:header_params] || {}
|
205
|
+
# HTTP header 'Accept' (if needed)
|
206
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
207
|
+
|
208
|
+
# form parameters
|
209
|
+
form_params = opts[:form_params] || {}
|
210
|
+
|
211
|
+
# http body (model)
|
212
|
+
post_body = opts[:debug_body]
|
213
|
+
|
214
|
+
# return_type
|
215
|
+
return_type = opts[:debug_return_type] || 'SubscriptionDeliveryListOrganizationModel'
|
216
|
+
|
217
|
+
# auth_names
|
218
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth', 'oauth2']
|
219
|
+
|
220
|
+
new_options = opts.merge(
|
221
|
+
:operation => :"SubscriptionDeliveriesOrganizationApi.list_subscription_deliveries",
|
222
|
+
:header_params => header_params,
|
223
|
+
:query_params => query_params,
|
224
|
+
:form_params => form_params,
|
225
|
+
:body => post_body,
|
226
|
+
:auth_names => auth_names,
|
227
|
+
:return_type => return_type
|
228
|
+
)
|
229
|
+
|
230
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
231
|
+
if @api_client.config.debugging
|
232
|
+
@api_client.config.logger.debug "API called: SubscriptionDeliveriesOrganizationApi#list_subscription_deliveries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
233
|
+
end
|
234
|
+
return data, status_code, headers
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|