cybrid_api_organization_ruby 0.115.10 → 0.115.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +18 -6
  4. data/cybrid_api_organization_ruby.gemspec +2 -2
  5. data/docs/PostSubscriptionOrganizationModel.md +24 -0
  6. data/docs/SubscriptionEnvironmentOrganizationModel.md +15 -0
  7. data/docs/SubscriptionListOrganizationModel.md +24 -0
  8. data/docs/SubscriptionOrganizationModel.md +34 -0
  9. data/docs/SubscriptionStateOrganizationModel.md +15 -0
  10. data/docs/SubscriptionTypeOrganizationModel.md +15 -0
  11. data/docs/SubscriptionsOrganizationApi.md +305 -0
  12. data/lib/cybrid_api_organization_ruby/api/organizations_organization_api.rb +2 -2
  13. data/lib/cybrid_api_organization_ruby/api/subscriptions_organization_api.rb +294 -0
  14. data/lib/cybrid_api_organization_ruby/api_client.rb +2 -2
  15. data/lib/cybrid_api_organization_ruby/api_error.rb +2 -2
  16. data/lib/cybrid_api_organization_ruby/configuration.rb +2 -2
  17. data/lib/cybrid_api_organization_ruby/models/error_response_organization_model.rb +2 -2
  18. data/lib/cybrid_api_organization_ruby/models/organization_organization_model.rb +2 -2
  19. data/lib/cybrid_api_organization_ruby/models/patch_organization_organization_model.rb +2 -2
  20. data/lib/cybrid_api_organization_ruby/models/post_subscription_organization_model.rb +360 -0
  21. data/lib/cybrid_api_organization_ruby/models/subscription_environment_organization_model.rb +37 -0
  22. data/lib/cybrid_api_organization_ruby/models/subscription_list_organization_model.rb +328 -0
  23. data/lib/cybrid_api_organization_ruby/models/subscription_organization_model.rb +449 -0
  24. data/lib/cybrid_api_organization_ruby/models/subscription_state_organization_model.rb +40 -0
  25. data/lib/cybrid_api_organization_ruby/models/subscription_type_organization_model.rb +36 -0
  26. data/lib/cybrid_api_organization_ruby/version.rb +3 -3
  27. data/lib/cybrid_api_organization_ruby.rb +9 -2
  28. data/spec/api/organizations_organization_api_spec.rb +2 -2
  29. data/spec/api/subscriptions_organization_api_spec.rb +85 -0
  30. data/spec/api_client_spec.rb +2 -2
  31. data/spec/configuration_spec.rb +2 -2
  32. data/spec/models/error_response_organization_model_spec.rb +2 -2
  33. data/spec/models/organization_organization_model_spec.rb +2 -2
  34. data/spec/models/patch_organization_organization_model_spec.rb +2 -2
  35. data/spec/models/post_subscription_organization_model_spec.rb +56 -0
  36. data/spec/models/subscription_environment_organization_model_spec.rb +28 -0
  37. data/spec/models/subscription_list_organization_model_spec.rb +52 -0
  38. data/spec/models/subscription_organization_model_spec.rb +86 -0
  39. data/spec/models/subscription_state_organization_model_spec.rb +28 -0
  40. data/spec/models/subscription_type_organization_model_spec.rb +28 -0
  41. data/spec/spec_helper.rb +2 -2
  42. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +5 -5
  43. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.16.3/gem_make.out +5 -5
  44. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  45. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.2/gem_make.out +5 -5
  46. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.3/gem_make.out +5 -5
  47. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.1.0/gem_make.out +5 -5
  48. metadata +30 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e23577f86d028e9a99a0431ba7ac7eb677eba9eef7f71eb6939c93029fba69a2
4
- data.tar.gz: 4f09b2a5b873cb5d84fe02b63bcf9a2bc86fa8b49ef88c175f26520c4030b774
3
+ metadata.gz: ab0610aa01ca7d2f8acde468a0acc017d5404451ede24b06b50102722bf108f3
4
+ data.tar.gz: 7023a173c837f4642595d7e8b2d6b0f8470732f60ca3716620482c49dc950c6a
5
5
  SHA512:
6
- metadata.gz: 83c7d653b590ce1e920f0807a57d3bedb8bf1dea5dd01d7eec111ea47251aa7b40708bfbba4dc19a0ee0624144e8ca80ec4737d1f367f9ce6748032c7b9decc5
7
- data.tar.gz: 13349b094f4dca1ae5c048e9ee9a6d483fcb8bc1bed78188d6c03ae892e8ce19f7ffe4a53ec74a912be9ae7eff62bbb836f52a398cc62017ad881d97c745fbe7
6
+ metadata.gz: a99a90f13497965514df2276a9c2097095fe4356a3b995e1ecb9d8245a4ea821a5321b321fe6ed0497438ee22e3f2dc7bb97f793468a24be0a2e9f9fd9cde642
7
+ data.tar.gz: 2001ac62ee44ac23bf744194ab28eaa108721e63f46241f9d37dbc4d055c5d23f0883ba0458e3172362148b2bb83227ee24f791b1368e8d07216f42c389e15ce
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cybrid_api_organization_ruby (0.115.10)
4
+ cybrid_api_organization_ruby (0.115.13)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -72,7 +72,7 @@ curl -X POST https://id.sandbox.cybrid.app/oauth/token -d '{
72
72
  \"scope\": \"banks:read banks:write bank_applications:execute accounts:read accounts: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\"
73
73
  }' -H \"Content-Type: application/json\"
74
74
 
75
- # 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 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'
75
+ # 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 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'
76
76
  ```
77
77
  <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>
78
78
 
@@ -152,8 +152,8 @@ An `Organization` can have multiple `banks`, in either `Sandbox` or `Production`
152
152
 
153
153
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
154
154
 
155
- - API version: v0.115.10
156
- - Package version: 0.115.10
155
+ - API version: v0.115.13
156
+ - Package version: 0.115.13
157
157
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
158
158
 
159
159
  ## Installation
@@ -169,16 +169,16 @@ gem build cybrid_api_organization_ruby.gemspec
169
169
  Then either install the gem locally:
170
170
 
171
171
  ```shell
172
- gem install ./cybrid_api_organization_ruby-0.115.10.gem
172
+ gem install ./cybrid_api_organization_ruby-0.115.13.gem
173
173
  ```
174
174
 
175
- (for development, run `gem install --dev ./cybrid_api_organization_ruby-0.115.10.gem` to install the development dependencies)
175
+ (for development, run `gem install --dev ./cybrid_api_organization_ruby-0.115.13.gem` to install the development dependencies)
176
176
 
177
177
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
178
178
 
179
179
  Finally add this to the Gemfile:
180
180
 
181
- gem 'cybrid_api_organization_ruby', '~> 0.115.10'
181
+ gem 'cybrid_api_organization_ruby', '~> 0.115.13'
182
182
 
183
183
  ### Install from Git
184
184
 
@@ -232,6 +232,10 @@ Class | Method | HTTP request | Description
232
232
  ------------ | ------------- | ------------- | -------------
233
233
  *CybridApiOrganization::OrganizationsOrganizationApi* | [**get_organization**](docs/OrganizationsOrganizationApi.md#get_organization) | **GET** /api/organizations/{organization_guid} | Get organization
234
234
  *CybridApiOrganization::OrganizationsOrganizationApi* | [**update_organization**](docs/OrganizationsOrganizationApi.md#update_organization) | **PATCH** /api/organizations/{organization_guid} | Patch organization
235
+ *CybridApiOrganization::SubscriptionsOrganizationApi* | [**create_subscription**](docs/SubscriptionsOrganizationApi.md#create_subscription) | **POST** /api/subscriptions/ | Create Subscription
236
+ *CybridApiOrganization::SubscriptionsOrganizationApi* | [**delete_subscription**](docs/SubscriptionsOrganizationApi.md#delete_subscription) | **DELETE** /api/subscriptions/{subscription_guid} | Delete Subscription
237
+ *CybridApiOrganization::SubscriptionsOrganizationApi* | [**get_subscription**](docs/SubscriptionsOrganizationApi.md#get_subscription) | **GET** /api/subscriptions/{subscription_guid} | Get Subscription
238
+ *CybridApiOrganization::SubscriptionsOrganizationApi* | [**list_subscriptions**](docs/SubscriptionsOrganizationApi.md#list_subscriptions) | **GET** /api/subscriptions | Get subscriptions list
235
239
 
236
240
 
237
241
  ## Documentation for Models
@@ -239,6 +243,12 @@ Class | Method | HTTP request | Description
239
243
  - [CybridApiOrganization::ErrorResponseOrganizationModel](docs/ErrorResponseOrganizationModel.md)
240
244
  - [CybridApiOrganization::OrganizationOrganizationModel](docs/OrganizationOrganizationModel.md)
241
245
  - [CybridApiOrganization::PatchOrganizationOrganizationModel](docs/PatchOrganizationOrganizationModel.md)
246
+ - [CybridApiOrganization::PostSubscriptionOrganizationModel](docs/PostSubscriptionOrganizationModel.md)
247
+ - [CybridApiOrganization::SubscriptionEnvironmentOrganizationModel](docs/SubscriptionEnvironmentOrganizationModel.md)
248
+ - [CybridApiOrganization::SubscriptionListOrganizationModel](docs/SubscriptionListOrganizationModel.md)
249
+ - [CybridApiOrganization::SubscriptionOrganizationModel](docs/SubscriptionOrganizationModel.md)
250
+ - [CybridApiOrganization::SubscriptionStateOrganizationModel](docs/SubscriptionStateOrganizationModel.md)
251
+ - [CybridApiOrganization::SubscriptionTypeOrganizationModel](docs/SubscriptionTypeOrganizationModel.md)
242
252
 
243
253
 
244
254
  ## Documentation for Authorization
@@ -257,4 +267,6 @@ Class | Method | HTTP request | Description
257
267
  - **Scopes**:
258
268
  - organizations:write: organizations write
259
269
  - organizations:read: organizations read
270
+ - subscriptions:write: subscriptions write
271
+ - subscriptions:read: subscriptions read
260
272
 
@@ -3,9 +3,9 @@
3
3
  =begin
4
4
  #Cybrid Organization API
5
5
 
6
- ## 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.sandbox.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.sandbox.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.sandbox.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.sandbox.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.sandbox.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.sandbox.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.sandbox.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.sandbox.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 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\" }' -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 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' ``` <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) | | 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.sandbox.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.sandbox.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.sandbox.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 | 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.
6
+ ## 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.sandbox.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.sandbox.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.sandbox.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.sandbox.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.sandbox.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.sandbox.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.sandbox.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.sandbox.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 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\" }' -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 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' ``` <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) | | 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.sandbox.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.sandbox.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.sandbox.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 | 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.
7
7
 
8
- The version of the OpenAPI document: v0.115.10
8
+ The version of the OpenAPI document: v0.115.13
9
9
  Contact: support@cybrid.app
10
10
  Generated by: https://openapi-generator.tech
11
11
  OpenAPI Generator version: 6.0.0
@@ -0,0 +1,24 @@
1
+ # CybridApiOrganization::PostSubscriptionOrganizationModel
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Name provided for the subscription. | |
8
+ | **type** | **String** | The type of subscription. | |
9
+ | **url** | **String** | The url for the subscription. | |
10
+ | **environment** | **String** | The environment that the subscription is configured for; one of sandbox or production. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'cybrid_api_organization_ruby'
16
+
17
+ instance = CybridApiOrganization::PostSubscriptionOrganizationModel.new(
18
+ name: null,
19
+ type: null,
20
+ url: null,
21
+ environment: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,15 @@
1
+ # CybridApiOrganization::SubscriptionEnvironmentOrganizationModel
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'cybrid_api_organization_ruby'
12
+
13
+ instance = CybridApiOrganization::SubscriptionEnvironmentOrganizationModel.new()
14
+ ```
15
+
@@ -0,0 +1,24 @@
1
+ # CybridApiOrganization::SubscriptionListOrganizationModel
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **total** | **Integer** | The total number of records available. | |
8
+ | **page** | **Integer** | The page index to retrieve. | |
9
+ | **per_page** | **Integer** | The number of entities per page to return. | |
10
+ | **objects** | [**Array&lt;SubscriptionOrganizationModel&gt;**](SubscriptionOrganizationModel.md) | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'cybrid_api_organization_ruby'
16
+
17
+ instance = CybridApiOrganization::SubscriptionListOrganizationModel.new(
18
+ total: null,
19
+ page: null,
20
+ per_page: null,
21
+ objects: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,34 @@
1
+ # CybridApiOrganization::SubscriptionOrganizationModel
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **guid** | **String** | Auto-generated unique identifier for the subscription. | |
8
+ | **name** | **String** | Name provided for the subscription. | |
9
+ | **type** | **String** | The type of subscription. | |
10
+ | **url** | **String** | The url for the subscription. | |
11
+ | **environment** | **String** | The environment that the subscription is configured for; one of sandbox or production. | |
12
+ | **state** | **String** | The state of the subscription; one of storing, completed, failed, deleting, or deleted. | |
13
+ | **failure_code** | **String** | The failure code of a subscription (if any) | [optional] |
14
+ | **created_at** | **Time** | ISO8601 datetime the record was created at. | [optional] |
15
+ | **updated_at** | **Time** | ISO8601 datetime the record was last updated at. | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'cybrid_api_organization_ruby'
21
+
22
+ instance = CybridApiOrganization::SubscriptionOrganizationModel.new(
23
+ guid: null,
24
+ name: null,
25
+ type: null,
26
+ url: null,
27
+ environment: null,
28
+ state: null,
29
+ failure_code: null,
30
+ created_at: null,
31
+ updated_at: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,15 @@
1
+ # CybridApiOrganization::SubscriptionStateOrganizationModel
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'cybrid_api_organization_ruby'
12
+
13
+ instance = CybridApiOrganization::SubscriptionStateOrganizationModel.new()
14
+ ```
15
+
@@ -0,0 +1,15 @@
1
+ # CybridApiOrganization::SubscriptionTypeOrganizationModel
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'cybrid_api_organization_ruby'
12
+
13
+ instance = CybridApiOrganization::SubscriptionTypeOrganizationModel.new()
14
+ ```
15
+
@@ -0,0 +1,305 @@
1
+ # CybridApiOrganization::SubscriptionsOrganizationApi
2
+
3
+ All URIs are relative to *https://organization.sandbox.cybrid.app*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_subscription**](SubscriptionsOrganizationApi.md#create_subscription) | **POST** /api/subscriptions/ | Create Subscription |
8
+ | [**delete_subscription**](SubscriptionsOrganizationApi.md#delete_subscription) | **DELETE** /api/subscriptions/{subscription_guid} | Delete Subscription |
9
+ | [**get_subscription**](SubscriptionsOrganizationApi.md#get_subscription) | **GET** /api/subscriptions/{subscription_guid} | Get Subscription |
10
+ | [**list_subscriptions**](SubscriptionsOrganizationApi.md#list_subscriptions) | **GET** /api/subscriptions | Get subscriptions list |
11
+
12
+
13
+ ## create_subscription
14
+
15
+ > <SubscriptionOrganizationModel> create_subscription(post_subscription_organization_model)
16
+
17
+ Create Subscription
18
+
19
+ Creates a Subscription. ## Subscription creation Subscriptions can be created for webhook endpoints. ## State | State | Description | |-------|-------------| | storing | The Platform is storing the subscription details in our private store | | completed | The Platform has created the subscription | | failed | The Platform was not able to successfully create the subscription | | deleting | The Platform is deleting the subscription | | deleted | The Platform has deleted the subscription| Required scope: **subscriptions:execute
20
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'cybrid_api_organization_ruby'
26
+ # setup authorization
27
+ CybridApiOrganization.configure do |config|
28
+ # Configure Bearer authorization (JWT): BearerAuth
29
+ config.access_token = 'YOUR_BEARER_TOKEN'
30
+
31
+ # Configure OAuth2 access token for authorization: oauth2
32
+ config.access_token = 'YOUR ACCESS TOKEN'
33
+ end
34
+
35
+ api_instance = CybridApiOrganization::SubscriptionsOrganizationApi.new
36
+ post_subscription_organization_model = CybridApiOrganization::PostSubscriptionOrganizationModel.new({name: 'name_example', type: 'webhook', url: 'url_example', environment: 'environment_example'}) # PostSubscriptionOrganizationModel |
37
+
38
+ begin
39
+ # Create Subscription
40
+ result = api_instance.create_subscription(post_subscription_organization_model)
41
+ p result
42
+ rescue CybridApiOrganization::ApiError => e
43
+ puts "Error when calling SubscriptionsOrganizationApi->create_subscription: #{e}"
44
+ end
45
+ ```
46
+
47
+ #### Using the create_subscription_with_http_info variant
48
+
49
+ This returns an Array which contains the response data, status code and headers.
50
+
51
+ > <Array(<SubscriptionOrganizationModel>, Integer, Hash)> create_subscription_with_http_info(post_subscription_organization_model)
52
+
53
+ ```ruby
54
+ begin
55
+ # Create Subscription
56
+ data, status_code, headers = api_instance.create_subscription_with_http_info(post_subscription_organization_model)
57
+ p status_code # => 2xx
58
+ p headers # => { ... }
59
+ p data # => <SubscriptionOrganizationModel>
60
+ rescue CybridApiOrganization::ApiError => e
61
+ puts "Error when calling SubscriptionsOrganizationApi->create_subscription_with_http_info: #{e}"
62
+ end
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ | Name | Type | Description | Notes |
68
+ | ---- | ---- | ----------- | ----- |
69
+ | **post_subscription_organization_model** | [**PostSubscriptionOrganizationModel**](PostSubscriptionOrganizationModel.md) | | |
70
+
71
+ ### Return type
72
+
73
+ [**SubscriptionOrganizationModel**](SubscriptionOrganizationModel.md)
74
+
75
+ ### Authorization
76
+
77
+ [BearerAuth](../README.md#BearerAuth), [oauth2](../README.md#oauth2)
78
+
79
+ ### HTTP request headers
80
+
81
+ - **Content-Type**: application/json
82
+ - **Accept**: application/json
83
+
84
+
85
+ ## delete_subscription
86
+
87
+ > <SubscriptionOrganizationModel> delete_subscription(subscription_guid)
88
+
89
+ Delete Subscription
90
+
91
+ Deletes a subscription. Required scope: **subscriptions:execute**
92
+
93
+ ### Examples
94
+
95
+ ```ruby
96
+ require 'time'
97
+ require 'cybrid_api_organization_ruby'
98
+ # setup authorization
99
+ CybridApiOrganization.configure do |config|
100
+ # Configure Bearer authorization (JWT): BearerAuth
101
+ config.access_token = 'YOUR_BEARER_TOKEN'
102
+
103
+ # Configure OAuth2 access token for authorization: oauth2
104
+ config.access_token = 'YOUR ACCESS TOKEN'
105
+ end
106
+
107
+ api_instance = CybridApiOrganization::SubscriptionsOrganizationApi.new
108
+ subscription_guid = 'subscription_guid_example' # String | Identifier for the subscription.
109
+
110
+ begin
111
+ # Delete Subscription
112
+ result = api_instance.delete_subscription(subscription_guid)
113
+ p result
114
+ rescue CybridApiOrganization::ApiError => e
115
+ puts "Error when calling SubscriptionsOrganizationApi->delete_subscription: #{e}"
116
+ end
117
+ ```
118
+
119
+ #### Using the delete_subscription_with_http_info variant
120
+
121
+ This returns an Array which contains the response data, status code and headers.
122
+
123
+ > <Array(<SubscriptionOrganizationModel>, Integer, Hash)> delete_subscription_with_http_info(subscription_guid)
124
+
125
+ ```ruby
126
+ begin
127
+ # Delete Subscription
128
+ data, status_code, headers = api_instance.delete_subscription_with_http_info(subscription_guid)
129
+ p status_code # => 2xx
130
+ p headers # => { ... }
131
+ p data # => <SubscriptionOrganizationModel>
132
+ rescue CybridApiOrganization::ApiError => e
133
+ puts "Error when calling SubscriptionsOrganizationApi->delete_subscription_with_http_info: #{e}"
134
+ end
135
+ ```
136
+
137
+ ### Parameters
138
+
139
+ | Name | Type | Description | Notes |
140
+ | ---- | ---- | ----------- | ----- |
141
+ | **subscription_guid** | **String** | Identifier for the subscription. | |
142
+
143
+ ### Return type
144
+
145
+ [**SubscriptionOrganizationModel**](SubscriptionOrganizationModel.md)
146
+
147
+ ### Authorization
148
+
149
+ [BearerAuth](../README.md#BearerAuth), [oauth2](../README.md#oauth2)
150
+
151
+ ### HTTP request headers
152
+
153
+ - **Content-Type**: Not defined
154
+ - **Accept**: application/json
155
+
156
+
157
+ ## get_subscription
158
+
159
+ > <SubscriptionOrganizationModel> get_subscription(subscription_guid)
160
+
161
+ Get Subscription
162
+
163
+ Retrieves a subscription. Required scope: **subscriptions:read**
164
+
165
+ ### Examples
166
+
167
+ ```ruby
168
+ require 'time'
169
+ require 'cybrid_api_organization_ruby'
170
+ # setup authorization
171
+ CybridApiOrganization.configure do |config|
172
+ # Configure Bearer authorization (JWT): BearerAuth
173
+ config.access_token = 'YOUR_BEARER_TOKEN'
174
+
175
+ # Configure OAuth2 access token for authorization: oauth2
176
+ config.access_token = 'YOUR ACCESS TOKEN'
177
+ end
178
+
179
+ api_instance = CybridApiOrganization::SubscriptionsOrganizationApi.new
180
+ subscription_guid = 'subscription_guid_example' # String | Identifier for the subscription.
181
+
182
+ begin
183
+ # Get Subscription
184
+ result = api_instance.get_subscription(subscription_guid)
185
+ p result
186
+ rescue CybridApiOrganization::ApiError => e
187
+ puts "Error when calling SubscriptionsOrganizationApi->get_subscription: #{e}"
188
+ end
189
+ ```
190
+
191
+ #### Using the get_subscription_with_http_info variant
192
+
193
+ This returns an Array which contains the response data, status code and headers.
194
+
195
+ > <Array(<SubscriptionOrganizationModel>, Integer, Hash)> get_subscription_with_http_info(subscription_guid)
196
+
197
+ ```ruby
198
+ begin
199
+ # Get Subscription
200
+ data, status_code, headers = api_instance.get_subscription_with_http_info(subscription_guid)
201
+ p status_code # => 2xx
202
+ p headers # => { ... }
203
+ p data # => <SubscriptionOrganizationModel>
204
+ rescue CybridApiOrganization::ApiError => e
205
+ puts "Error when calling SubscriptionsOrganizationApi->get_subscription_with_http_info: #{e}"
206
+ end
207
+ ```
208
+
209
+ ### Parameters
210
+
211
+ | Name | Type | Description | Notes |
212
+ | ---- | ---- | ----------- | ----- |
213
+ | **subscription_guid** | **String** | Identifier for the subscription. | |
214
+
215
+ ### Return type
216
+
217
+ [**SubscriptionOrganizationModel**](SubscriptionOrganizationModel.md)
218
+
219
+ ### Authorization
220
+
221
+ [BearerAuth](../README.md#BearerAuth), [oauth2](../README.md#oauth2)
222
+
223
+ ### HTTP request headers
224
+
225
+ - **Content-Type**: Not defined
226
+ - **Accept**: application/json
227
+
228
+
229
+ ## list_subscriptions
230
+
231
+ > <SubscriptionListOrganizationModel> list_subscriptions(opts)
232
+
233
+ Get subscriptions list
234
+
235
+ Retrieves a listing of subscriptions. Required scope: **subscriptions:read**
236
+
237
+ ### Examples
238
+
239
+ ```ruby
240
+ require 'time'
241
+ require 'cybrid_api_organization_ruby'
242
+ # setup authorization
243
+ CybridApiOrganization.configure do |config|
244
+ # Configure Bearer authorization (JWT): BearerAuth
245
+ config.access_token = 'YOUR_BEARER_TOKEN'
246
+
247
+ # Configure OAuth2 access token for authorization: oauth2
248
+ config.access_token = 'YOUR ACCESS TOKEN'
249
+ end
250
+
251
+ api_instance = CybridApiOrganization::SubscriptionsOrganizationApi.new
252
+ opts = {
253
+ page: 56, # Integer | The page index to retrieve.
254
+ per_page: 56, # Integer | The number of entities per page to return.
255
+ guid: 'guid_example' # String | Comma separated subscription_guids to list subscriptions for.
256
+ }
257
+
258
+ begin
259
+ # Get subscriptions list
260
+ result = api_instance.list_subscriptions(opts)
261
+ p result
262
+ rescue CybridApiOrganization::ApiError => e
263
+ puts "Error when calling SubscriptionsOrganizationApi->list_subscriptions: #{e}"
264
+ end
265
+ ```
266
+
267
+ #### Using the list_subscriptions_with_http_info variant
268
+
269
+ This returns an Array which contains the response data, status code and headers.
270
+
271
+ > <Array(<SubscriptionListOrganizationModel>, Integer, Hash)> list_subscriptions_with_http_info(opts)
272
+
273
+ ```ruby
274
+ begin
275
+ # Get subscriptions list
276
+ data, status_code, headers = api_instance.list_subscriptions_with_http_info(opts)
277
+ p status_code # => 2xx
278
+ p headers # => { ... }
279
+ p data # => <SubscriptionListOrganizationModel>
280
+ rescue CybridApiOrganization::ApiError => e
281
+ puts "Error when calling SubscriptionsOrganizationApi->list_subscriptions_with_http_info: #{e}"
282
+ end
283
+ ```
284
+
285
+ ### Parameters
286
+
287
+ | Name | Type | Description | Notes |
288
+ | ---- | ---- | ----------- | ----- |
289
+ | **page** | **Integer** | The page index to retrieve. | [optional] |
290
+ | **per_page** | **Integer** | The number of entities per page to return. | [optional] |
291
+ | **guid** | **String** | Comma separated subscription_guids to list subscriptions for. | [optional] |
292
+
293
+ ### Return type
294
+
295
+ [**SubscriptionListOrganizationModel**](SubscriptionListOrganizationModel.md)
296
+
297
+ ### Authorization
298
+
299
+ [BearerAuth](../README.md#BearerAuth), [oauth2](../README.md#oauth2)
300
+
301
+ ### HTTP request headers
302
+
303
+ - **Content-Type**: Not defined
304
+ - **Accept**: application/json
305
+