Class: UnivapayClientSdk::DirectDebitApi
- Defined in:
- lib/univapay_client_sdk/apis/direct_debit_api.rb
Overview
DirectDebitApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#create_direct_debit_bank_account(merchant_id, body, idempotency_key: nil) ⇒ ApiResponse
Registers a consumer bank account for direct debit.
-
#create_direct_debit_bank_transfer(merchant_id, bank_account_id, body, idempotency_key: nil) ⇒ ApiResponse
Schedules a pull of funds from an active bank account.
-
#deactivate_direct_debit_bank_account(merchant_id, bank_account_id) ⇒ ApiResponse
Deactivates a bank account so no further transfers can be registered against it.
-
#delete_direct_debit_bank_transfer(merchant_id, bank_transfer_id) ⇒ ApiResponse
Cancels a scheduled transfer so it is not sent to the bank.
-
#get_direct_debit_bank_account(merchant_id, bank_account_id) ⇒ ApiResponse
Retrieves a single registered bank account, including its current verification status.
-
#get_direct_debit_bank_transfer(merchant_id, bank_transfer_id) ⇒ ApiResponse
Retrieves a single transfer.
-
#get_direct_debit_configuration(merchant_id) ⇒ ApiResponse
Retrieves the merchant's direct debit configuration — whether direct debit is enabled and which monthly debit cycle applies.
-
#get_direct_debit_current_schedule(merchant_id) ⇒ ApiResponse
Retrieves the key dates for the debit cycle currently in progress, based on the merchant's configured cycle.
-
#get_direct_debit_notification_configuration(merchant_id) ⇒ ApiResponse
Retrieves which direct debit email notifications the merchant has opted into.
-
#list_direct_debit_bank_accounts(merchant_id, limit: 10, cursor: nil, cursor_direction: CursorDirectionQuery::DESC, user_number: nil, bank_account_id: nil, bank_code: nil, bank_name: nil, branch_code: nil, bank_account_type: nil, bank_account_number: nil, bank_account_name: nil, registration_origin: nil, bank_account_status: nil, from: nil, to: nil) ⇒ ApiResponse
Lists the consumer bank accounts registered for direct debit under this merchant.
-
#list_direct_debit_bank_transfers(merchant_id, limit: 10, cursor: nil, cursor_direction: CursorDirectionQuery::DESC, bank_transfer_id: nil, bank_transfer_start: nil, bank_transfer_end: nil, debit_date: nil, user_number: nil, bank_account_number: nil, bank_account_name: nil, lock_status: nil, bank_transfer_status: nil) ⇒ ApiResponse
Lists the direct debit transfers registered under this merchant, across all bank accounts.
-
#reenable_direct_debit_bank_account(merchant_id, bank_account_id, idempotency_key: nil) ⇒ ApiResponse
Returns a deactivated bank account to
activeso transfers can be registered against it again. -
#update_direct_debit_bank_account(merchant_id, bank_account_id, body, idempotency_key: nil) ⇒ ApiResponse
Updates a registered bank account.
-
#update_direct_debit_bank_transfer(merchant_id, bank_transfer_id, body, idempotency_key: nil) ⇒ ApiResponse
Changes a scheduled transfer's amount.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from UnivapayClientSdk::BaseApi
Instance Method Details
#create_direct_debit_bank_account(merchant_id, body, idempotency_key: nil) ⇒ ApiResponse
Registers a consumer bank account for direct debit. The account is created
and then verified against the bank, so it starts out unusable — poll its
status until it becomes active (or registration_failed) before
scheduling transfers against it.
identifier of the merchant.
Request payload for registering a consumer bank account.
idempotency key to prevent double charges and duplicate operations. We
recommend a randomly generated UUID (v4).
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 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 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 291 def create_direct_debit_bank_account(merchant_id, body, idempotency_key: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/merchants/{merchantId}/bank-accounts', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter(idempotency_key, key: 'Idempotency-Key')) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitBankAccount.method(:from_hash)) .is_api_response(true) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', ApiErrorException) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#create_direct_debit_bank_transfer(merchant_id, bank_account_id, body, idempotency_key: nil) ⇒ ApiResponse
Schedules a pull of funds from an active bank account. The transfer is queued for the merchant's next debit cycle and stays editable until that cycle's upload deadline passes. identifier of the merchant. of the direct debit bank account. Request payload for scheduling a transfer, in JPY. idempotency key to prevent double charges and duplicate operations. We recommend a randomly generated UUID (v4).
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 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 609 def create_direct_debit_bank_transfer(merchant_id, bank_account_id, body, idempotency_key: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/merchants/{merchantId}/bank-accounts/{bankAccountId}/bank-transfers', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .template_param(new_parameter(bank_account_id, key: 'bankAccountId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter(idempotency_key, key: 'Idempotency-Key')) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitBankTransfer.method(:from_hash)) .is_api_response(true) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', ApiErrorException) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#deactivate_direct_debit_bank_account(merchant_id, bank_account_id) ⇒ ApiResponse
Deactivates a bank account so no further transfers can be registered
against it. The record is retained (status becomes inactive) rather than
deleted, and can be re-enabled later.
identifier of the merchant.
of the direct debit bank account.
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 482 def deactivate_direct_debit_bank_account(merchant_id, bank_account_id) @api_call .request(new_request_builder(HttpMethodEnum::DELETE, '/merchants/{merchantId}/bank-accounts/{bankAccountId}', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .template_param(new_parameter(bank_account_id, key: 'bankAccountId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitBankAccount.method(:from_hash)) .is_api_response(true) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#delete_direct_debit_bank_transfer(merchant_id, bank_transfer_id) ⇒ ApiResponse
Cancels a scheduled transfer so it is not sent to the bank. Only permitted
while the transfer is unlocked.
identifier of the merchant.
of the direct debit bank transfer.
905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 905 def delete_direct_debit_bank_transfer(merchant_id, bank_transfer_id) @api_call .request(new_request_builder(HttpMethodEnum::DELETE, '/merchants/{merchantId}/bank-transfers/{bankTransferId}', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .template_param(new_parameter(bank_transfer_id, key: 'bankTransferId') .is_required(true) .should_encode(true)) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .is_response_void(true) .is_api_response(true) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', ApiErrorException) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#get_direct_debit_bank_account(merchant_id, bank_account_id) ⇒ ApiResponse
Retrieves a single registered bank account, including its current verification status. identifier of the merchant. of the direct debit bank account.
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 352 def get_direct_debit_bank_account(merchant_id, bank_account_id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/merchants/{merchantId}/bank-accounts/{bankAccountId}', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .template_param(new_parameter(bank_account_id, key: 'bankAccountId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitBankAccount.method(:from_hash)) .is_api_response(true) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#get_direct_debit_bank_transfer(merchant_id, bank_transfer_id) ⇒ ApiResponse
Retrieves a single transfer. Poll this after the cycle's result registration date to pick up the outcome and, on failure, the bank's reason. identifier of the merchant. of the direct debit bank transfer.
776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 776 def get_direct_debit_bank_transfer(merchant_id, bank_transfer_id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/merchants/{merchantId}/bank-transfers/{bankTransferId}', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .template_param(new_parameter(bank_transfer_id, key: 'bankTransferId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitBankTransfer.method(:from_hash)) .is_api_response(true) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#get_direct_debit_configuration(merchant_id) ⇒ ApiResponse
Retrieves the merchant's direct debit configuration — whether direct debit is enabled and which monthly debit cycle applies. identifier of the merchant.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 14 def get_direct_debit_configuration(merchant_id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/merchants/{merchantId}/configuration', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitMerchantConfiguration.method(:from_hash)) .is_api_response(true) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#get_direct_debit_current_schedule(merchant_id) ⇒ ApiResponse
Retrieves the key dates for the debit cycle currently in progress, based
on the merchant's configured cycle. Compare
merchant_bank_transfer_upload_deadline against today to decide whether
transfers can still be registered or edited this month.
identifier of the merchant.
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 163 164 165 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 120 def get_direct_debit_current_schedule(merchant_id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/merchants/{merchantId}/schedules/current', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitSchedule.method(:from_hash)) .is_api_response(true) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#get_direct_debit_notification_configuration(merchant_id) ⇒ ApiResponse
Retrieves which direct debit email notifications the merchant has opted into. identifier of the merchant.
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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 66 def get_direct_debit_notification_configuration(merchant_id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/merchants/{merchantId}/notification-configuration', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitNotificationConfiguration.method(:from_hash)) .is_api_response(true) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#list_direct_debit_bank_accounts(merchant_id, limit: 10, cursor: nil, cursor_direction: CursorDirectionQuery::DESC, user_number: nil, bank_account_id: nil, bank_code: nil, bank_name: nil, branch_code: nil, bank_account_type: nil, bank_account_number: nil, bank_account_name: nil, registration_origin: nil, bank_account_status: nil, from: nil, to: nil) ⇒ ApiResponse
Lists the consumer bank accounts registered for direct debit under this merchant. identifier of the merchant. return in one page. after which pagination should continue. Pagination direction relative to the supplied cursor. own membership number for the consumer (会員番号). bank account ID. code (銀行コード). half-width katakana (銀行名). branch code (支店コード). Filter by deposit account type (預金種類). 7-digit account number (口座番号). holder name in half-width katakana (口座名義). parameter: Filter by where the bank account was registered from. parameter: Filter by bank account status. Omit to return every status. after this date (ISO-8601). this date (ISO-8601).
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 237 238 239 240 241 242 243 244 245 246 247 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 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 202 def list_direct_debit_bank_accounts(merchant_id, limit: 10, cursor: nil, cursor_direction: CursorDirectionQuery::DESC, user_number: nil, bank_account_id: nil, bank_code: nil, bank_name: nil, branch_code: nil, bank_account_type: nil, bank_account_number: nil, bank_account_name: nil, registration_origin: nil, bank_account_status: nil, from: nil, to: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/merchants/{merchantId}/bank-accounts', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .query_param(new_parameter(limit, key: 'limit')) .query_param(new_parameter(cursor, key: 'cursor')) .query_param(new_parameter(cursor_direction, key: 'cursor_direction')) .query_param(new_parameter(user_number, key: 'user_number')) .query_param(new_parameter(bank_account_id, key: 'bank_account_id')) .query_param(new_parameter(bank_code, key: 'bank_code')) .query_param(new_parameter(bank_name, key: 'bank_name')) .query_param(new_parameter(branch_code, key: 'branch_code')) .query_param(new_parameter(bank_account_type, key: 'bank_account_type')) .query_param(new_parameter(bank_account_number, key: 'bank_account_number')) .query_param(new_parameter(bank_account_name, key: 'bank_account_name')) .query_param(new_parameter(registration_origin, key: 'registration_origin')) .query_param(new_parameter(bank_account_status, key: 'bank_account_status')) .query_param(new_parameter(from, key: 'from')) .query_param(new_parameter(to, key: 'to')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitBankAccountList.method(:from_hash)) .is_api_response(true) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', ApiErrorException) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#list_direct_debit_bank_transfers(merchant_id, limit: 10, cursor: nil, cursor_direction: CursorDirectionQuery::DESC, bank_transfer_id: nil, bank_transfer_start: nil, bank_transfer_end: nil, debit_date: nil, user_number: nil, bank_account_number: nil, bank_account_name: nil, lock_status: nil, bank_transfer_status: nil) ⇒ ApiResponse
Lists the direct debit transfers registered under this merchant, across all bank accounts. identifier of the merchant. return in one page. after which pagination should continue. Pagination direction relative to the supplied cursor. bank transfer ID. year-month range in which the transfer is scheduled to occur. year-month range in which the transfer is scheduled to occur. monthly debit cycle. own membership number for the consumer (会員番号). 7-digit account number (口座番号). holder name in half-width katakana (口座名義). Filter by lock status. Omit to return both locked and unlocked transfers. parameter: Filter by transfer status. Omit to return every status.
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 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 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 697 def list_direct_debit_bank_transfers(merchant_id, limit: 10, cursor: nil, cursor_direction: CursorDirectionQuery::DESC, bank_transfer_id: nil, bank_transfer_start: nil, bank_transfer_end: nil, debit_date: nil, user_number: nil, bank_account_number: nil, bank_account_name: nil, lock_status: nil, bank_transfer_status: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/merchants/{merchantId}/bank-transfers', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .query_param(new_parameter(limit, key: 'limit')) .query_param(new_parameter(cursor, key: 'cursor')) .query_param(new_parameter(cursor_direction, key: 'cursor_direction')) .query_param(new_parameter(bank_transfer_id, key: 'bank_transfer_id')) .query_param(new_parameter(bank_transfer_start, key: 'bank_transfer_start')) .query_param(new_parameter(bank_transfer_end, key: 'bank_transfer_end')) .query_param(new_parameter(debit_date, key: 'debit_date')) .query_param(new_parameter(user_number, key: 'user_number')) .query_param(new_parameter(bank_account_number, key: 'bank_account_number')) .query_param(new_parameter(bank_account_name, key: 'bank_account_name')) .query_param(new_parameter(lock_status, key: 'lock_status')) .query_param(new_parameter(bank_transfer_status, key: 'bank_transfer_status')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitBankTransferList.method(:from_hash)) .is_api_response(true) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', ApiErrorException) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#reenable_direct_debit_bank_account(merchant_id, bank_account_id, idempotency_key: nil) ⇒ ApiResponse
Returns a deactivated bank account to active so transfers can be
registered against it again. The account must currently be inactive.
identifier of the merchant.
of the direct debit bank account.
idempotency key to prevent double charges and duplicate operations. We
recommend a randomly generated UUID (v4).
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 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 543 def reenable_direct_debit_bank_account(merchant_id, bank_account_id, idempotency_key: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/merchants/{merchantId}/bank-accounts/{bankAccountId}/re-enable', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .template_param(new_parameter(bank_account_id, key: 'bankAccountId') .is_required(true) .should_encode(true)) .header_param(new_parameter(idempotency_key, key: 'Idempotency-Key')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitBankAccount.method(:from_hash)) .is_api_response(true) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', ApiErrorException) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#update_direct_debit_bank_account(merchant_id, bank_account_id, body, idempotency_key: nil) ⇒ ApiResponse
Updates a registered bank account. Changing bank details re-triggers verification with the bank. Transfers already registered keep the details they were created with. identifier of the merchant. of the direct debit bank account. Request payload for updating a registered bank account. idempotency key to prevent double charges and duplicate operations. We recommend a randomly generated UUID (v4).
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 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 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 416 def update_direct_debit_bank_account(merchant_id, bank_account_id, body, idempotency_key: nil) @api_call .request(new_request_builder(HttpMethodEnum::PATCH, '/merchants/{merchantId}/bank-accounts/{bankAccountId}', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .template_param(new_parameter(bank_account_id, key: 'bankAccountId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter(idempotency_key, key: 'Idempotency-Key')) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitBankAccount.method(:from_hash)) .is_api_response(true) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', ApiErrorException) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |
#update_direct_debit_bank_transfer(merchant_id, bank_transfer_id, body, idempotency_key: nil) ⇒ ApiResponse
Changes a scheduled transfer's amount. Only permitted while the transfer
is unlocked — once its cycle's upload deadline passes the amount is
fixed.
identifier of the merchant.
of the direct debit bank transfer.
Request payload for changing the transfer amount.
idempotency key to prevent double charges and duplicate operations. We
recommend a randomly generated UUID (v4).
840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 |
# File 'lib/univapay_client_sdk/apis/direct_debit_api.rb', line 840 def update_direct_debit_bank_transfer(merchant_id, bank_transfer_id, body, idempotency_key: nil) @api_call .request(new_request_builder(HttpMethodEnum::PATCH, '/merchants/{merchantId}/bank-transfers/{bankTransferId}', Server::DIRECTDEBIT) .template_param(new_parameter(merchant_id, key: 'merchantId') .is_required(true) .should_encode(true)) .template_param(new_parameter(bank_transfer_id, key: 'bankTransferId') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter(idempotency_key, key: 'Idempotency-Key')) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('JWT_TOKEN'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DirectDebitBankTransfer.method(:from_hash)) .is_api_response(true) .local_error_template('400', 'HTTP 400 Bad Request: {$response.body#/code}', ApiErrorException) .local_error_template('401', 'HTTP 401 Unauthorized: {$response.body#/code}', ApiErrorException) .local_error_template('403', 'HTTP 403 Forbidden: {$response.body#/code}', ApiErrorException) .local_error_template('404', 'HTTP 404 Not Found: {$response.body#/code}', ApiErrorException) .local_error_template('429', 'HTTP 429 Rate Limited: {$response.body#/code}', APIException) .local_error_template('409', 'HTTP 409 Conflict: {$response.body#/code}', APIException) .local_error_template('500', 'HTTP 500 Server Error: {$response.body#/code}', APIException) .local_error_template('503', 'HTTP 503 Unavailable: {$response.body#/code}', APIException) .local_error_template('504', 'HTTP 504 Timeout: {$response.body#/code}', APIException) .local_error_template('default', 'HTTP {$statusCode}: {$response.body#/code}', APIException)) .execute end |