|
| 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 BalancesApi < Service |
| 9 | + attr_accessor :service, :version |
| 10 | + |
| 11 | + def initialize(client, version = DEFAULT_VERSION) |
| 12 | + super(client, version, 'BalancePlatform') |
| 13 | + end |
| 14 | + |
| 15 | + # Get webhook settings |
| 16 | + def balance_platforms_balance_platform_id_webhooks_webhook_id_settings_get(balance_platform_id, webhook_id, headers: {}) |
| 17 | + endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings'.gsub(/{.+?}/, '%s') |
| 18 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 19 | + endpoint = format(endpoint, balance_platform_id, webhook_id) |
| 20 | + |
| 21 | + action = { method: 'get', url: endpoint } |
| 22 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 23 | + end |
| 24 | + |
| 25 | + # Create a balance webhook setting |
| 26 | + def balance_platforms_balance_platform_id_webhooks_webhook_id_settings_post(request, balance_platform_id, webhook_id, balance_webhook_settings_request, headers: {}) |
| 27 | + endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings'.gsub(/{.+?}/, '%s') |
| 28 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 29 | + endpoint = format(endpoint, balance_platform_id, webhook_id) |
| 30 | + |
| 31 | + action = { method: 'post', url: endpoint } |
| 32 | + @client.call_adyen_api(@service, action, request, headers, @version) |
| 33 | + end |
| 34 | + |
| 35 | + # Delete a webhook setting |
| 36 | + def balance_platforms_balance_platform_id_webhooks_webhook_id_settings_setting_id_delete(balance_platform_id, webhook_id, setting_id, headers: {}) |
| 37 | + endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}'.gsub(/{.+?}/, '%s') |
| 38 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 39 | + endpoint = format(endpoint, balance_platform_id, webhook_id, setting_id) |
| 40 | + |
| 41 | + action = { method: 'delete', url: endpoint } |
| 42 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 43 | + end |
| 44 | + |
| 45 | + # Get a webhook setting |
| 46 | + def balance_platforms_balance_platform_id_webhooks_webhook_id_settings_setting_id_get(balance_platform_id, webhook_id, setting_id, headers: {}) |
| 47 | + endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}'.gsub(/{.+?}/, '%s') |
| 48 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 49 | + endpoint = format(endpoint, balance_platform_id, webhook_id, setting_id) |
| 50 | + |
| 51 | + action = { method: 'get', url: endpoint } |
| 52 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 53 | + end |
| 54 | + |
| 55 | + # Update a webhook setting |
| 56 | + def balance_platforms_balance_platform_id_webhooks_webhook_id_settings_setting_id_patch(request, balance_platform_id, webhook_id, setting_id, patchable_balance_webhook_settings_request, headers: {}) |
| 57 | + endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}'.gsub(/{.+?}/, '%s') |
| 58 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 59 | + endpoint = format(endpoint, balance_platform_id, webhook_id, setting_id) |
| 60 | + |
| 61 | + action = { method: 'patch', url: endpoint } |
| 62 | + @client.call_adyen_api(@service, action, request, headers, @version) |
| 63 | + end |
| 64 | + |
| 65 | + end |
| 66 | +end |
0 commit comments