|
| 1 | +require_relative '../service' |
| 2 | +module Adyen |
| 3 | + |
| 4 | + # NOTE: This class is auto generated by OpenAPI Generator |
| 5 | + # Ref: https://openapi-generator.tech |
| 6 | + # |
| 7 | + # Do not edit the class manually. |
| 8 | + class TransferLimitsBalanceAccountLevelApi < Service |
| 9 | + attr_accessor :service, :version |
| 10 | + |
| 11 | + def initialize(client, version = DEFAULT_VERSION) |
| 12 | + super(client, version, 'BalancePlatform') |
| 13 | + end |
| 14 | + |
| 15 | + # Approve pending transfer limits |
| 16 | + def approve_pending_transfer_limits(request, id, headers: {}) |
| 17 | + endpoint = '/balanceAccounts/{id}/transferLimits/approve'.gsub(/{.+?}/, '%s') |
| 18 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 19 | + endpoint = format(endpoint, id) |
| 20 | + |
| 21 | + action = { method: 'post', url: endpoint } |
| 22 | + @client.call_adyen_api(@service, action, request, headers, @version) |
| 23 | + end |
| 24 | + |
| 25 | + # Create a transfer limit |
| 26 | + def create_transfer_limit(request, id, headers: {}) |
| 27 | + endpoint = '/balanceAccounts/{id}/transferLimits'.gsub(/{.+?}/, '%s') |
| 28 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 29 | + endpoint = format(endpoint, id) |
| 30 | + |
| 31 | + action = { method: 'post', url: endpoint } |
| 32 | + @client.call_adyen_api(@service, action, request, headers, @version) |
| 33 | + end |
| 34 | + |
| 35 | + # Delete a scheduled or pending transfer limit |
| 36 | + def delete_pending_transfer_limit(id, transfer_limit_id, headers: {}) |
| 37 | + endpoint = '/balanceAccounts/{id}/transferLimits/{transferLimitId}'.gsub(/{.+?}/, '%s') |
| 38 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 39 | + endpoint = format(endpoint, id, transfer_limit_id) |
| 40 | + |
| 41 | + action = { method: 'delete', url: endpoint } |
| 42 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 43 | + end |
| 44 | + |
| 45 | + # Get all current transfer limits |
| 46 | + def get_current_transfer_limits(id, headers: {}, query_params: {}) |
| 47 | + endpoint = '/balanceAccounts/{id}/transferLimits/current'.gsub(/{.+?}/, '%s') |
| 48 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 49 | + endpoint = format(endpoint, id) |
| 50 | + endpoint += create_query_string(query_params) |
| 51 | + action = { method: 'get', url: endpoint } |
| 52 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 53 | + end |
| 54 | + |
| 55 | + # Get the details of a transfer limit |
| 56 | + def get_specific_transfer_limit(id, transfer_limit_id, headers: {}) |
| 57 | + endpoint = '/balanceAccounts/{id}/transferLimits/{transferLimitId}'.gsub(/{.+?}/, '%s') |
| 58 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 59 | + endpoint = format(endpoint, id, transfer_limit_id) |
| 60 | + |
| 61 | + action = { method: 'get', url: endpoint } |
| 62 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 63 | + end |
| 64 | + |
| 65 | + # Filter and view the transfer limits |
| 66 | + def get_transfer_limits(id, headers: {}, query_params: {}) |
| 67 | + endpoint = '/balanceAccounts/{id}/transferLimits'.gsub(/{.+?}/, '%s') |
| 68 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 69 | + endpoint = format(endpoint, id) |
| 70 | + endpoint += create_query_string(query_params) |
| 71 | + action = { method: 'get', url: endpoint } |
| 72 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 73 | + end |
| 74 | + |
| 75 | + end |
| 76 | +end |
0 commit comments