docs/CounterpartiesBankApi

CybridApiBank::CounterpartiesBankApi

All URIs are relative to https://bank.sandbox.cybrid.app

Method HTTP request Description
create_counterparty POST /api/counterparties Create Counterparty
get_counterparty GET /api/counterparties/{counterparty_guid} Get Counterparty
list_counterparties GET /api/counterparties Get counterparties list

create_counterparty

> create_counterparty(post_counterparty_bank_model)

Create Counterparty

Creates a counterparty. ## Counterparty Type Counterparty resources are an abstraction for real world individuals and businesses that are not directly on the Cybrid Platform. ## State | State | Description | |——-|————-| | storing | The Platform is storing the counterparty details in our private store | | unverified | The Platform has not yet verified the counterparty’s identity | | verified | The Platform has verified the counterparty’s identity | | rejected | The Platform was not able to successfully verify the counterparty’s identity | Required scope: counterparties:execute

Examples

require 'time'
require 'cybrid_api_bank_ruby'
# setup authorization
CybridApiBank.configure do |config|
  # Configure Bearer authorization (JWT): BearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'

  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = CybridApiBank::CounterpartiesBankApi.new
post_counterparty_bank_model = CybridApiBank::PostCounterpartyBankModel.new({type: 'business', address: CybridApiBank::PostCounterpartyAddressBankModel.new({country_code: 'country_code_example'})}) # PostCounterpartyBankModel | 

begin
  # Create Counterparty
  result = api_instance.create_counterparty(post_counterparty_bank_model)
  p result
rescue CybridApiBank::ApiError => e
  puts "Error when calling CounterpartiesBankApi->create_counterparty: #{e}"
end

Using the create_counterparty_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> create_counterparty_with_http_info(post_counterparty_bank_model)

begin
  # Create Counterparty
  data, status_code, headers = api_instance.create_counterparty_with_http_info(post_counterparty_bank_model)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => 
rescue CybridApiBank::ApiError => e
  puts "Error when calling CounterpartiesBankApi->create_counterparty_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
post_counterparty_bank_model PostCounterpartyBankModel

Return type

CounterpartyBankModel

Authorization

BearerAuth, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_counterparty

> get_counterparty(counterparty_guid, opts)

Get Counterparty

Retrieves a counterparty. Required scope: counterparties:read Optional scope: counterparties:pii:read.

Examples

require 'time'
require 'cybrid_api_bank_ruby'
# setup authorization
CybridApiBank.configure do |config|
  # Configure Bearer authorization (JWT): BearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'

  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = CybridApiBank::CounterpartiesBankApi.new
counterparty_guid = 'counterparty_guid_example' # String | Identifier for the counterparty.
opts = {
  include_pii: true # Boolean | Include PII in the response (requires **counterparties:pii:read** scope).
}

begin
  # Get Counterparty
  result = api_instance.get_counterparty(counterparty_guid, opts)
  p result
rescue CybridApiBank::ApiError => e
  puts "Error when calling CounterpartiesBankApi->get_counterparty: #{e}"
end

Using the get_counterparty_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> get_counterparty_with_http_info(counterparty_guid, opts)

begin
  # Get Counterparty
  data, status_code, headers = api_instance.get_counterparty_with_http_info(counterparty_guid, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => 
rescue CybridApiBank::ApiError => e
  puts "Error when calling CounterpartiesBankApi->get_counterparty_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
counterparty_guid String Identifier for the counterparty.
include_pii Boolean Include PII in the response (requires counterparties:pii:read scope). [optional]

Return type

CounterpartyBankModel

Authorization

BearerAuth, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

list_counterparties

> list_counterparties(opts)

Get counterparties list

Retrieves a listing of counterparties. Records are sorted by creation date in descending order. Required scope: counterparties:read Optional scope: counterparties:pii:read.

Examples

require 'time'
require 'cybrid_api_bank_ruby'
# setup authorization
CybridApiBank.configure do |config|
  # Configure Bearer authorization (JWT): BearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'

  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = CybridApiBank::CounterpartiesBankApi.new
opts = {
  page: 56, # Integer | 
  per_page: 56, # Integer | 
  type: 'type_example', # String | Comma separated types to list counterparties for.
  bank_guid: 'bank_guid_example', # String | Comma separated bank_guids to list counterparties for.
  customer_guid: 'customer_guid_example', # String | Comma separated customer_guids to list counterparties for.
  guid: 'guid_example', # String | Comma separated counterparty_guids to list counterparties for.
  label: 'label_example', # String | Comma separated labels to list counterparties for.
  include_pii: true # Boolean | Include PII in the response (requires **counterparties:pii:read** scope).
}

begin
  # Get counterparties list
  result = api_instance.list_counterparties(opts)
  p result
rescue CybridApiBank::ApiError => e
  puts "Error when calling CounterpartiesBankApi->list_counterparties: #{e}"
end

Using the list_counterparties_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> , Integer, Hash)> list_counterparties_with_http_info(opts)

begin
  # Get counterparties list
  data, status_code, headers = api_instance.list_counterparties_with_http_info(opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => 
rescue CybridApiBank::ApiError => e
  puts "Error when calling CounterpartiesBankApi->list_counterparties_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
page Integer [optional]
per_page Integer [optional]
type String Comma separated types to list counterparties for. [optional]
bank_guid String Comma separated bank_guids to list counterparties for. [optional]
customer_guid String Comma separated customer_guids to list counterparties for. [optional]
guid String Comma separated counterparty_guids to list counterparties for. [optional]
label String Comma separated labels to list counterparties for. [optional]
include_pii Boolean Include PII in the response (requires counterparties:pii:read scope). [optional]

Return type

CounterpartyListBankModel

Authorization

BearerAuth, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json