Class: TreezorClient::BeneficiariesApi
- Inherits:
-
Object
- Object
- TreezorClient::BeneficiariesApi
- Defined in:
- lib/treezor_client/api/beneficiaries_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_beneficiaries(opts = {}) ⇒ InlineResponse2002
search beneficiary bank accounts Get beneficiary bank accounts that match search criteria.
-
#get_beneficiaries_with_http_info(opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
search beneficiary bank accounts Get beneficiary bank accounts that match search criteria.
-
#get_beneficiary(id, opts = {}) ⇒ InlineResponse2002
get a beneficiary bank account Get a beneficiary bank account from the system.
-
#get_beneficiary_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
get a beneficiary bank account Get a beneficiary bank account from the system.
-
#initialize(api_client = ApiClient.default) ⇒ BeneficiariesApi
constructor
A new instance of BeneficiariesApi.
-
#post_beneficiary(opts = {}) ⇒ InlineResponse2002
create a beneficiary Create a new benefeciary bank account in the system.
-
#post_beneficiary_with_http_info(opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
create a beneficiary Create a new benefeciary bank account in the system.
-
#put_beneficiary(id, opts = {}) ⇒ InlineResponse2002
edit a beneficiary Edit a benefeciary bank account in the system.
-
#put_beneficiary_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
edit a beneficiary Edit a benefeciary bank account in the system.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ BeneficiariesApi
Returns a new instance of BeneficiariesApi.
19 20 21 |
# File 'lib/treezor_client/api/beneficiaries_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/treezor_client/api/beneficiaries_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_beneficiaries(opts = {}) ⇒ InlineResponse2002
search beneficiary bank accounts Get beneficiary bank accounts that match search criteria.
42 43 44 45 |
# File 'lib/treezor_client/api/beneficiaries_api.rb', line 42 def get_beneficiaries(opts = {}) data, _status_code, _headers = get_beneficiaries_with_http_info(opts) data end |
#get_beneficiaries_with_http_info(opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
search beneficiary bank accounts Get beneficiary bank accounts that match search criteria.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/treezor_client/api/beneficiaries_api.rb', line 67 def get_beneficiaries_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BeneficiariesApi.get_beneficiaries ...' end # resource path local_var_path = '/beneficiaries' # query parameters query_params = {} query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil? query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil? query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil? query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil? query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? query_params[:'iban'] = opts[:'iban'] if !opts[:'iban'].nil? query_params[:'bic'] = opts[:'bic'] if !opts[:'bic'].nil? query_params[:'nickName'] = opts[:'nick_name'] if !opts[:'nick_name'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'pageNumber'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil? query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2002') if @api_client.config.debugging @api_client.config.logger.debug "API called: BeneficiariesApi#get_beneficiaries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_beneficiary(id, opts = {}) ⇒ InlineResponse2002
get a beneficiary bank account Get a beneficiary bank account from the system.
124 125 126 127 |
# File 'lib/treezor_client/api/beneficiaries_api.rb', line 124 def get_beneficiary(id, opts = {}) data, _status_code, _headers = get_beneficiary_with_http_info(id, opts) data end |
#get_beneficiary_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
get a beneficiary bank account Get a beneficiary bank account from the system.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/treezor_client/api/beneficiaries_api.rb', line 135 def get_beneficiary_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BeneficiariesApi.get_beneficiary ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BeneficiariesApi.get_beneficiary" end # resource path local_var_path = '/beneficiaries/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2002') if @api_client.config.debugging @api_client.config.logger.debug "API called: BeneficiariesApi#get_beneficiary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_beneficiary(opts = {}) ⇒ InlineResponse2002
create a beneficiary Create a new benefeciary bank account in the system.
184 185 186 187 |
# File 'lib/treezor_client/api/beneficiaries_api.rb', line 184 def post_beneficiary(opts = {}) data, _status_code, _headers = post_beneficiary_with_http_info(opts) data end |
#post_beneficiary_with_http_info(opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
create a beneficiary Create a new benefeciary bank account in the system.
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/treezor_client/api/beneficiaries_api.rb', line 198 def post_beneficiary_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BeneficiariesApi.post_beneficiary ...' end # resource path local_var_path = '/beneficiaries' # query parameters query_params = {} query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil? query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil? query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil? query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2002') if @api_client.config.debugging @api_client.config.logger.debug "API called: BeneficiariesApi#post_beneficiary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_beneficiary(id, opts = {}) ⇒ InlineResponse2002
edit a beneficiary Edit a benefeciary bank account in the system.
247 248 249 250 |
# File 'lib/treezor_client/api/beneficiaries_api.rb', line 247 def put_beneficiary(id, opts = {}) data, _status_code, _headers = put_beneficiary_with_http_info(id, opts) data end |
#put_beneficiary_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
edit a beneficiary Edit a benefeciary bank account in the system.
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/treezor_client/api/beneficiaries_api.rb', line 262 def put_beneficiary_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BeneficiariesApi.put_beneficiary ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BeneficiariesApi.put_beneficiary" end # resource path local_var_path = '/beneficiaries/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil? query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil? query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil? query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2002') if @api_client.config.debugging @api_client.config.logger.debug "API called: BeneficiariesApi#put_beneficiary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |