Skip to content

Code generation: update services and models #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/adyen/services/balanceControlService.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def initialize(client, version = DEFAULT_VERSION)
end

# Start a balance transfer
#
# Deprecated since Adyen Balance Control API v1
def balance_transfer(request, headers: {})
endpoint = '/balanceTransfer'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
Expand Down
5 changes: 5 additions & 0 deletions lib/adyen/services/balancePlatform.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require_relative 'balancePlatform/account_holders_api'
require_relative 'balancePlatform/balance_accounts_api'
require_relative 'balancePlatform/balances_api'
require_relative 'balancePlatform/bank_account_validation_api'
require_relative 'balancePlatform/card_orders_api'
require_relative 'balancePlatform/grant_accounts_api'
Expand Down Expand Up @@ -37,6 +38,10 @@ def balance_accounts_api
@balance_accounts_api ||= Adyen::BalanceAccountsApi.new(@client, @version)
end

def balances_api
@balances_api ||= Adyen::BalancesApi.new(@client, @version)
end

def bank_account_validation_api
@bank_account_validation_api ||= Adyen::BankAccountValidationApi.new(@client, @version)
end
Expand Down
66 changes: 66 additions & 0 deletions lib/adyen/services/balancePlatform/balances_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
require_relative '../service'
module Adyen

# NOTE: This class is auto generated by OpenAPI Generator
# Ref: https://openapi-generator.tech
#
# Do not edit the class manually.
class BalancesApi < Service
attr_accessor :service, :version

def initialize(client, version = DEFAULT_VERSION)
super(client, version, 'BalancePlatform')
end

# Create a balance webhook setting
def create_webhook_setting(request, balance_platform_id, webhook_id, balance_webhook_setting_info, headers: {})
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, balance_platform_id, webhook_id)

action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, request, headers, @version)
end

# Delete a balance webhook setting by id
def delete_webhook_setting(balance_platform_id, webhook_id, setting_id, headers: {})
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, balance_platform_id, webhook_id, setting_id)

action = { method: 'delete', url: endpoint }
@client.call_adyen_api(@service, action, {}, headers, @version)
end

# Get all balance webhook settings
def get_all_webhook_settings(balance_platform_id, webhook_id, headers: {})
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, balance_platform_id, webhook_id)

action = { method: 'get', url: endpoint }
@client.call_adyen_api(@service, action, {}, headers, @version)
end

# Get a balance webhook setting by id
def get_webhook_setting(balance_platform_id, webhook_id, setting_id, headers: {})
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, balance_platform_id, webhook_id, setting_id)

action = { method: 'get', url: endpoint }
@client.call_adyen_api(@service, action, {}, headers, @version)
end

# Update a balance webhook setting by id
def update_webhook_setting(request, balance_platform_id, webhook_id, setting_id, balance_webhook_setting_info_update, headers: {})
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, balance_platform_id, webhook_id, setting_id)

action = { method: 'patch', url: endpoint }
@client.call_adyen_api(@service, action, request, headers, @version)
end

end
end
12 changes: 12 additions & 0 deletions lib/adyen/services/recurring.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def initialize(client, version = DEFAULT_VERSION)
end

# Create new permits linked to a recurring contract.
#
# Deprecated since Adyen Recurring API v68
def create_permit(request, headers: {})
endpoint = '/createPermit'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
Expand All @@ -24,6 +26,8 @@ def create_permit(request, headers: {})
end

# Disable stored payment details
#
# Deprecated since Adyen Recurring API v68
def disable(request, headers: {})
endpoint = '/disable'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
Expand All @@ -34,6 +38,8 @@ def disable(request, headers: {})
end

# Disable an existing permit.
#
# Deprecated since Adyen Recurring API v68
def disable_permit(request, headers: {})
endpoint = '/disablePermit'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
Expand All @@ -44,6 +50,8 @@ def disable_permit(request, headers: {})
end

# Get stored payment details
#
# Deprecated since Adyen Recurring API v68
def list_recurring_details(request, headers: {})
endpoint = '/listRecurringDetails'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
Expand All @@ -54,6 +62,8 @@ def list_recurring_details(request, headers: {})
end

# Ask issuer to notify the shopper
#
# Deprecated since Adyen Recurring API v68
def notify_shopper(request, headers: {})
endpoint = '/notifyShopper'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
Expand All @@ -64,6 +74,8 @@ def notify_shopper(request, headers: {})
end

# Schedule running the Account Updater
#
# Deprecated since Adyen Recurring API v68
def schedule_account_updater(request, headers: {})
endpoint = '/scheduleAccountUpdater'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
Expand Down
Loading