Class: SyncteraRubySdk::ExternalAccountsApi
- Inherits:
-
Object
- Object
- SyncteraRubySdk::ExternalAccountsApi
- Defined in:
- lib/synctera_ruby_sdk/api/external_accounts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_external_accounts(add_accounts_request, opts = {}) ⇒ ExternalAccount
Add an external account Add an external account for a customer.
-
#add_external_accounts_with_http_info(add_accounts_request, opts = {}) ⇒ Array<(ExternalAccount, Integer, Hash)>
Add an external account Add an external account for a customer.
-
#add_vendor_external_accounts(add_vendor_accounts_request, opts = {}) ⇒ AddVendorAccountsResponse
Add external accounts through a vendor, such as Plaid.
-
#add_vendor_external_accounts_with_http_info(add_vendor_accounts_request, opts = {}) ⇒ Array<(AddVendorAccountsResponse, Integer, Hash)>
Add external accounts through a vendor, such as Plaid.
-
#create_access_token(external_account_access_token, opts = {}) ⇒ ExternalAccountAccessToken
Create a permanent access token for an external account.
-
#create_access_token_with_http_info(external_account_access_token, opts = {}) ⇒ Array<(ExternalAccountAccessToken, Integer, Hash)>
Create a permanent access token for an external account.
-
#create_verification_link_token(external_account_link_token, opts = {}) ⇒ ExternalAccountLinkToken
Create a link token to verify an external account.
-
#create_verification_link_token_with_http_info(external_account_link_token, opts = {}) ⇒ Array<(ExternalAccountLinkToken, Integer, Hash)>
Create a link token to verify an external account.
-
#delete_external_account(external_account_id, opts = {}) ⇒ DeleteResponse
Delete an external account Deletes an external account, given an external account ID.
-
#delete_external_account_with_http_info(external_account_id, opts = {}) ⇒ Array<(DeleteResponse, Integer, Hash)>
Delete an external account Deletes an external account, given an external account ID.
-
#get_external_account(external_account_id, opts = {}) ⇒ ExternalAccount
Get an external account Returns an external account, given an external account ID.
-
#get_external_account_balance(external_account_id, opts = {}) ⇒ ExternalAccountBalance
Get external account balances Given an external account ID, return the account balances in real time.
-
#get_external_account_balance_with_http_info(external_account_id, opts = {}) ⇒ Array<(ExternalAccountBalance, Integer, Hash)>
Get external account balances Given an external account ID, return the account balances in real time.
-
#get_external_account_transactions(external_account_id, start_date, end_date, opts = {}) ⇒ ExternalAccountsTransactionList
List transactions of a given external account Returns a list of transactions on from the external account, given an external account ID.
-
#get_external_account_transactions_with_http_info(external_account_id, start_date, end_date, opts = {}) ⇒ Array<(ExternalAccountsTransactionList, Integer, Hash)>
List transactions of a given external account Returns a list of transactions on from the external account, given an external account ID.
-
#get_external_account_with_http_info(external_account_id, opts = {}) ⇒ Array<(ExternalAccount, Integer, Hash)>
Get an external account Returns an external account, given an external account ID.
-
#initialize(api_client = ApiClient.default) ⇒ ExternalAccountsApi
constructor
A new instance of ExternalAccountsApi.
-
#list_external_accounts(opts = {}) ⇒ ExternalAccountsList
List external accounts Returns a list of all external accounts assigned to customers.
-
#list_external_accounts_with_http_info(opts = {}) ⇒ Array<(ExternalAccountsList, Integer, Hash)>
List external accounts Returns a list of all external accounts assigned to customers.
-
#sync_vendor_external_accounts(add_vendor_accounts_request, opts = {}) ⇒ AddVendorAccountsResponse
Sync external accounts through a vendor, such as Plaid.
-
#sync_vendor_external_accounts_with_http_info(add_vendor_accounts_request, opts = {}) ⇒ Array<(AddVendorAccountsResponse, Integer, Hash)>
Sync external accounts through a vendor, such as Plaid.
-
#update_external_account(external_account_id, patch_external_account, opts = {}) ⇒ ExternalAccount
Patch an external account Edits an unverified external account, given an external account ID.
-
#update_external_account_with_http_info(external_account_id, patch_external_account, opts = {}) ⇒ Array<(ExternalAccount, Integer, Hash)>
Patch an external account Edits an unverified external account, given an external account ID.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ExternalAccountsApi
Returns a new instance of ExternalAccountsApi.
19 20 21 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_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/synctera_ruby_sdk/api/external_accounts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_external_accounts(add_accounts_request, opts = {}) ⇒ ExternalAccount
Add an external account Add an external account for a customer. The account will be created in an unverified state.
28 29 30 31 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 28 def add_external_accounts(add_accounts_request, opts = {}) data, _status_code, _headers = add_external_accounts_with_http_info(add_accounts_request, opts) data end |
#add_external_accounts_with_http_info(add_accounts_request, opts = {}) ⇒ Array<(ExternalAccount, Integer, Hash)>
Add an external account Add an external account for a customer. The account will be created in an unverified state.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 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 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 39 def add_external_accounts_with_http_info(add_accounts_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.add_external_accounts ...' end # verify the required parameter 'add_accounts_request' is set if @api_client.config.client_side_validation && add_accounts_request.nil? fail ArgumentError, "Missing the required parameter 'add_accounts_request' when calling ExternalAccountsApi.add_external_accounts" end # resource path local_var_path = '/external_accounts' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(add_accounts_request) # return_type return_type = opts[:debug_return_type] || 'ExternalAccount' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.add_external_accounts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#add_external_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#add_vendor_external_accounts(add_vendor_accounts_request, opts = {}) ⇒ AddVendorAccountsResponse
Add external accounts through a vendor, such as Plaid. Add external accounts for a customer through an existing access token. The token must be valid, and the information on the accounts returned by the vendor must correspond to the customer. A success response for this route may include failures if an account could not be added, so it’s important that the caller checks the response body.
99 100 101 102 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 99 def add_vendor_external_accounts(add_vendor_accounts_request, opts = {}) data, _status_code, _headers = add_vendor_external_accounts_with_http_info(add_vendor_accounts_request, opts) data end |
#add_vendor_external_accounts_with_http_info(add_vendor_accounts_request, opts = {}) ⇒ Array<(AddVendorAccountsResponse, Integer, Hash)>
Add external accounts through a vendor, such as Plaid. Add external accounts for a customer through an existing access token. The token must be valid, and the information on the accounts returned by the vendor must correspond to the customer. A success response for this route may include failures if an account could not be added, so it's important that the caller checks the response body.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 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 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 110 def add_vendor_external_accounts_with_http_info(add_vendor_accounts_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.add_vendor_external_accounts ...' end # verify the required parameter 'add_vendor_accounts_request' is set if @api_client.config.client_side_validation && add_vendor_accounts_request.nil? fail ArgumentError, "Missing the required parameter 'add_vendor_accounts_request' when calling ExternalAccountsApi.add_vendor_external_accounts" end # resource path local_var_path = '/external_accounts/add_vendor_accounts' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(add_vendor_accounts_request) # return_type return_type = opts[:debug_return_type] || 'AddVendorAccountsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.add_vendor_external_accounts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#add_vendor_external_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_access_token(external_account_access_token, opts = {}) ⇒ ExternalAccountAccessToken
Create a permanent access token for an external account
169 170 171 172 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 169 def create_access_token(external_account_access_token, opts = {}) data, _status_code, _headers = create_access_token_with_http_info(external_account_access_token, opts) data end |
#create_access_token_with_http_info(external_account_access_token, opts = {}) ⇒ Array<(ExternalAccountAccessToken, Integer, Hash)>
Create a permanent access token for an external account
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 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 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 179 def create_access_token_with_http_info(external_account_access_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.create_access_token ...' end # verify the required parameter 'external_account_access_token' is set if @api_client.config.client_side_validation && external_account_access_token.nil? fail ArgumentError, "Missing the required parameter 'external_account_access_token' when calling ExternalAccountsApi.create_access_token" end # resource path local_var_path = '/external_accounts/access_tokens' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(external_account_access_token) # return_type return_type = opts[:debug_return_type] || 'ExternalAccountAccessToken' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.create_access_token", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#create_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_verification_link_token(external_account_link_token, opts = {}) ⇒ ExternalAccountLinkToken
Create a link token to verify an external account
238 239 240 241 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 238 def create_verification_link_token(external_account_link_token, opts = {}) data, _status_code, _headers = create_verification_link_token_with_http_info(external_account_link_token, opts) data end |
#create_verification_link_token_with_http_info(external_account_link_token, opts = {}) ⇒ Array<(ExternalAccountLinkToken, Integer, Hash)>
Create a link token to verify an external account
248 249 250 251 252 253 254 255 256 257 258 259 260 261 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 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 248 def create_verification_link_token_with_http_info(external_account_link_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.create_verification_link_token ...' end # verify the required parameter 'external_account_link_token' is set if @api_client.config.client_side_validation && external_account_link_token.nil? fail ArgumentError, "Missing the required parameter 'external_account_link_token' when calling ExternalAccountsApi.create_verification_link_token" end # resource path local_var_path = '/external_accounts/link_tokens' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(external_account_link_token) # return_type return_type = opts[:debug_return_type] || 'ExternalAccountLinkToken' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.create_verification_link_token", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#create_verification_link_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_external_account(external_account_id, opts = {}) ⇒ DeleteResponse
Delete an external account Deletes an external account, given an external account ID. If no accounts left, the access token to the financial institution will be removed
307 308 309 310 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 307 def delete_external_account(external_account_id, opts = {}) data, _status_code, _headers = delete_external_account_with_http_info(external_account_id, opts) data end |
#delete_external_account_with_http_info(external_account_id, opts = {}) ⇒ Array<(DeleteResponse, Integer, Hash)>
Delete an external account Deletes an external account, given an external account ID. If no accounts left, the access token to the financial institution will be removed
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 317 def delete_external_account_with_http_info(external_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.delete_external_account ...' end # verify the required parameter 'external_account_id' is set if @api_client.config.client_side_validation && external_account_id.nil? fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ExternalAccountsApi.delete_external_account" end # resource path local_var_path = '/external_accounts/{external_account_id}'.sub('{' + 'external_account_id' + '}', CGI.escape(external_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeleteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.delete_external_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#delete_external_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_external_account(external_account_id, opts = {}) ⇒ ExternalAccount
Get an external account Returns an external account, given an external account ID.
370 371 372 373 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 370 def get_external_account(external_account_id, opts = {}) data, _status_code, _headers = get_external_account_with_http_info(external_account_id, opts) data end |
#get_external_account_balance(external_account_id, opts = {}) ⇒ ExternalAccountBalance
Get external account balances Given an external account ID, return the account balances in real time. The data returned by this endpoint is always fetched synchronously; it is not cached by Synctera. As a result, response latency is often high.
434 435 436 437 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 434 def get_external_account_balance(external_account_id, opts = {}) data, _status_code, _headers = get_external_account_balance_with_http_info(external_account_id, opts) data end |
#get_external_account_balance_with_http_info(external_account_id, opts = {}) ⇒ Array<(ExternalAccountBalance, Integer, Hash)>
Get external account balances Given an external account ID, return the account balances in real time. The data returned by this endpoint is always fetched synchronously; it is not cached by Synctera. As a result, response latency is often high.
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 445 def get_external_account_balance_with_http_info(external_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.get_external_account_balance ...' end # verify the required parameter 'external_account_id' is set if @api_client.config.client_side_validation && external_account_id.nil? fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ExternalAccountsApi.get_external_account_balance" end if @api_client.config.client_side_validation && !opts[:'max_age'].nil? && opts[:'max_age'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_age"]" when calling ExternalAccountsApi.get_external_account_balance, must be greater than or equal to 1.' end # resource path local_var_path = '/external_accounts/{external_account_id}/balance'.sub('{' + 'external_account_id' + '}', CGI.escape(external_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'max_age'] = opts[:'max_age'] if !opts[:'max_age'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExternalAccountBalance' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.get_external_account_balance", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#get_external_account_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_external_account_transactions(external_account_id, start_date, end_date, opts = {}) ⇒ ExternalAccountsTransactionList
List transactions of a given external account Returns a list of transactions on from the external account, given an external account ID. Maximum 500 transctions will be returned.
505 506 507 508 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 505 def get_external_account_transactions(external_account_id, start_date, end_date, opts = {}) data, _status_code, _headers = get_external_account_transactions_with_http_info(external_account_id, start_date, end_date, opts) data end |
#get_external_account_transactions_with_http_info(external_account_id, start_date, end_date, opts = {}) ⇒ Array<(ExternalAccountsTransactionList, Integer, Hash)>
List transactions of a given external account Returns a list of transactions on from the external account, given an external account ID. Maximum 500 transctions will be returned.
517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 517 def get_external_account_transactions_with_http_info(external_account_id, start_date, end_date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.get_external_account_transactions ...' end # verify the required parameter 'external_account_id' is set if @api_client.config.client_side_validation && external_account_id.nil? fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ExternalAccountsApi.get_external_account_transactions" end # verify the required parameter 'start_date' is set if @api_client.config.client_side_validation && start_date.nil? fail ArgumentError, "Missing the required parameter 'start_date' when calling ExternalAccountsApi.get_external_account_transactions" end # verify the required parameter 'end_date' is set if @api_client.config.client_side_validation && end_date.nil? fail ArgumentError, "Missing the required parameter 'end_date' when calling ExternalAccountsApi.get_external_account_transactions" end # resource path local_var_path = '/external_accounts/{external_account_id}/transactions'.sub('{' + 'external_account_id' + '}', CGI.escape(external_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'start_date'] = start_date query_params[:'end_date'] = end_date # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExternalAccountsTransactionList' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.get_external_account_transactions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#get_external_account_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_external_account_with_http_info(external_account_id, opts = {}) ⇒ Array<(ExternalAccount, Integer, Hash)>
Get an external account Returns an external account, given an external account ID.
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 380 def get_external_account_with_http_info(external_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.get_external_account ...' end # verify the required parameter 'external_account_id' is set if @api_client.config.client_side_validation && external_account_id.nil? fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ExternalAccountsApi.get_external_account" end # resource path local_var_path = '/external_accounts/{external_account_id}'.sub('{' + 'external_account_id' + '}', CGI.escape(external_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExternalAccount' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.get_external_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#get_external_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_external_accounts(opts = {}) ⇒ ExternalAccountsList
List external accounts Returns a list of all external accounts assigned to customers.
584 585 586 587 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 584 def list_external_accounts(opts = {}) data, _status_code, _headers = list_external_accounts_with_http_info(opts) data end |
#list_external_accounts_with_http_info(opts = {}) ⇒ Array<(ExternalAccountsList, Integer, Hash)>
List external accounts Returns a list of all external accounts assigned to customers.
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 598 def list_external_accounts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.list_external_accounts ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ExternalAccountsApi.list_external_accounts, must be greater than or equal to 1.' end # resource path local_var_path = '/external_accounts' # query parameters query_params = opts[:query_params] || {} query_params[:'customer_id'] = @api_client.build_collection_param(opts[:'customer_id'], :csv) if !opts[:'customer_id'].nil? query_params[:'business_id'] = @api_client.build_collection_param(opts[:'business_id'], :csv) if !opts[:'business_id'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil? query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExternalAccountsList' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.list_external_accounts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#list_external_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sync_vendor_external_accounts(add_vendor_accounts_request, opts = {}) ⇒ AddVendorAccountsResponse
Sync external accounts through a vendor, such as Plaid. Sync external accounts for a customer through an existing access token. The token must be valid, and the information on the accounts returned by the vendor must correspond to the customer. A success response for this route may include failures if an account could not be added and deletions if the account is removed by the end user, so it’s important that the caller checks the response body.
657 658 659 660 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 657 def sync_vendor_external_accounts(add_vendor_accounts_request, opts = {}) data, _status_code, _headers = sync_vendor_external_accounts_with_http_info(add_vendor_accounts_request, opts) data end |
#sync_vendor_external_accounts_with_http_info(add_vendor_accounts_request, opts = {}) ⇒ Array<(AddVendorAccountsResponse, Integer, Hash)>
Sync external accounts through a vendor, such as Plaid. Sync external accounts for a customer through an existing access token. The token must be valid, and the information on the accounts returned by the vendor must correspond to the customer. A success response for this route may include failures if an account could not be added and deletions if the account is removed by the end user, so it's important that the caller checks the response body.
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 668 def sync_vendor_external_accounts_with_http_info(add_vendor_accounts_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.sync_vendor_external_accounts ...' end # verify the required parameter 'add_vendor_accounts_request' is set if @api_client.config.client_side_validation && add_vendor_accounts_request.nil? fail ArgumentError, "Missing the required parameter 'add_vendor_accounts_request' when calling ExternalAccountsApi.sync_vendor_external_accounts" end # resource path local_var_path = '/external_accounts/sync_vendor_accounts' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(add_vendor_accounts_request) # return_type return_type = opts[:debug_return_type] || 'AddVendorAccountsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.sync_vendor_external_accounts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#sync_vendor_external_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_external_account(external_account_id, patch_external_account, opts = {}) ⇒ ExternalAccount
Patch an external account Edits an unverified external account, given an external account ID.
729 730 731 732 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 729 def update_external_account(external_account_id, patch_external_account, opts = {}) data, _status_code, _headers = update_external_account_with_http_info(external_account_id, patch_external_account, opts) data end |
#update_external_account_with_http_info(external_account_id, patch_external_account, opts = {}) ⇒ Array<(ExternalAccount, Integer, Hash)>
Patch an external account Edits an unverified external account, given an external account ID.
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 |
# File 'lib/synctera_ruby_sdk/api/external_accounts_api.rb', line 741 def update_external_account_with_http_info(external_account_id, patch_external_account, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExternalAccountsApi.update_external_account ...' end # verify the required parameter 'external_account_id' is set if @api_client.config.client_side_validation && external_account_id.nil? fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ExternalAccountsApi.update_external_account" end # verify the required parameter 'patch_external_account' is set if @api_client.config.client_side_validation && patch_external_account.nil? fail ArgumentError, "Missing the required parameter 'patch_external_account' when calling ExternalAccountsApi.update_external_account" end # resource path local_var_path = '/external_accounts/{external_account_id}'.sub('{' + 'external_account_id' + '}', CGI.escape(external_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_external_account) # return_type return_type = opts[:debug_return_type] || 'ExternalAccount' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ExternalAccountsApi.update_external_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalAccountsApi#update_external_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |