Class: Airwallex::Beneficiary
- Inherits:
-
APIResource
- Object
- APIResource
- Airwallex::Beneficiary
- Extended by:
- APIOperations::Create, APIOperations::Delete, APIOperations::List, APIOperations::Retrieve
- Includes:
- APIOperations::Update
- Defined in:
- lib/airwallex/resources/beneficiary.rb
Overview
Constant Summary collapse
- API_SCHEMA_PATH =
"/api/v1/beneficiary_api_schemas/generate"- FORM_SCHEMA_PATH =
"/api/v1/beneficiary_form_schemas/generate"- SUPPORTED_FINANCIAL_INSTITUTIONS_PATH =
"/api/v1/beneficiary_form_schemas/supported_financial_institutions"
Instance Attribute Summary
Attributes inherited from APIResource
Class Method Summary collapse
-
.api_schema(params = {}) ⇒ Hash
Retrieve the API schema (field validation rules) for beneficiary bank details, keyed by beneficiary type / entity type / bank country.
-
.form_schema(params = {}) ⇒ Hash
Retrieve the dynamic form schema used to render beneficiary bank-detail forms in the UI, keyed by beneficiary type / entity type / bank country.
- .resource_path ⇒ Object
-
.supported_financial_institutions(params = {}) ⇒ Hash
Search financial institutions supported for a given country, currency, entity type, and transfer method, by name keyword.
-
.validate(params = {}) ⇒ Hash
Validate beneficiary details (address, bank details, entity type, transfer method) before attempting to create the beneficiary.
-
.verify_account(params = {}) ⇒ Hash
Verify ownership of a beneficiary's bank account via Confirmation of Payee (CoP) before creation.
Methods included from APIOperations::Create
Methods included from APIOperations::Retrieve
Methods included from APIOperations::List
Methods included from APIOperations::Delete
Methods included from APIOperations::Update
Methods inherited from APIResource
#changed_attributes, #dirty?, #initialize, #inspect, #method_missing, #refresh, #refresh_from, resource_name, #respond_to_missing?, #to_hash, #to_json, #to_s
Constructor Details
This class inherits a constructor from Airwallex::APIResource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Airwallex::APIResource
Class Method Details
.api_schema(params = {}) ⇒ Hash
Retrieve the API schema (field validation rules) for beneficiary bank details, keyed by beneficiary type / entity type / bank country.
86 87 88 |
# File 'lib/airwallex/resources/beneficiary.rb', line 86 def self.api_schema(params = {}) Airwallex.client.post(API_SCHEMA_PATH, params) end |
.form_schema(params = {}) ⇒ Hash
Retrieve the dynamic form schema used to render beneficiary bank-detail forms in the UI, keyed by beneficiary type / entity type / bank country.
95 96 97 |
# File 'lib/airwallex/resources/beneficiary.rb', line 95 def self.form_schema(params = {}) Airwallex.client.post(FORM_SCHEMA_PATH, params) end |
.resource_path ⇒ Object
59 60 61 |
# File 'lib/airwallex/resources/beneficiary.rb', line 59 def self.resource_path "/api/v1/beneficiaries" end |
.supported_financial_institutions(params = {}) ⇒ Hash
Search financial institutions supported for a given country, currency, entity type, and transfer method, by name keyword.
106 107 108 |
# File 'lib/airwallex/resources/beneficiary.rb', line 106 def self.supported_financial_institutions(params = {}) Airwallex.client.get(SUPPORTED_FINANCIAL_INSTITUTIONS_PATH, params) end |
.validate(params = {}) ⇒ Hash
Validate beneficiary details (address, bank details, entity type, transfer method) before attempting to create the beneficiary.
68 69 70 |
# File 'lib/airwallex/resources/beneficiary.rb', line 68 def self.validate(params = {}) Airwallex.client.post("#{resource_path}/validate", params) end |
.verify_account(params = {}) ⇒ Hash
Verify ownership of a beneficiary's bank account via Confirmation of Payee (CoP) before creation.
77 78 79 |
# File 'lib/airwallex/resources/beneficiary.rb', line 77 def self.verify_account(params = {}) Airwallex.client.post("#{resource_path}/verify_account", params) end |