diff --git a/lib/adyen/services/balancePlatform.rb b/lib/adyen/services/balancePlatform.rb index 1c10de40..24ca6c38 100644 --- a/lib/adyen/services/balancePlatform.rb +++ b/lib/adyen/services/balancePlatform.rb @@ -12,6 +12,8 @@ require_relative 'balancePlatform/payment_instrument_groups_api' require_relative 'balancePlatform/payment_instruments_api' require_relative 'balancePlatform/platform_api' +require_relative 'balancePlatform/sca_association_management_api' +require_relative 'balancePlatform/sca_device_management_api' require_relative 'balancePlatform/transaction_rules_api' require_relative 'balancePlatform/transfer_limits_balance_account_level_api' require_relative 'balancePlatform/transfer_limits_balance_platform_level_api' @@ -89,6 +91,14 @@ def platform_api @platform_api ||= Adyen::PlatformApi.new(@client, @version) end + def sca_association_management_api + @sca_association_management_api ||= Adyen::SCAAssociationManagementApi.new(@client, @version) + end + + def sca_device_management_api + @sca_device_management_api ||= Adyen::SCADeviceManagementApi.new(@client, @version) + end + def transaction_rules_api @transaction_rules_api ||= Adyen::TransactionRulesApi.new(@client, @version) end diff --git a/lib/adyen/services/balancePlatform/sca_association_management_api.rb b/lib/adyen/services/balancePlatform/sca_association_management_api.rb new file mode 100644 index 00000000..7376486b --- /dev/null +++ b/lib/adyen/services/balancePlatform/sca_association_management_api.rb @@ -0,0 +1,46 @@ +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 SCAAssociationManagementApi < Service + attr_accessor :service, :version + + def initialize(client, version = DEFAULT_VERSION) + super(client, version, 'BalancePlatform') + end + + # Approve a pending approval association + def approve_association(request, headers: {}) + endpoint = '/scaAssociations'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + + action = { method: 'patch', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + # Get a list of devices associated with an entity + def list_associations(headers: {}, query_params: {}) + endpoint = '/scaAssociations'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + endpoint += create_query_string(query_params) + action = { method: 'get', url: endpoint } + @client.call_adyen_api(@service, action, {}, headers, @version) + end + + # Delete association to devices + def remove_association(request, headers: {}) + endpoint = '/scaAssociations'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + + action = { method: 'delete', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + end +end diff --git a/lib/adyen/services/balancePlatform/sca_device_management_api.rb b/lib/adyen/services/balancePlatform/sca_device_management_api.rb new file mode 100644 index 00000000..895f1cf8 --- /dev/null +++ b/lib/adyen/services/balancePlatform/sca_device_management_api.rb @@ -0,0 +1,46 @@ +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 SCADeviceManagementApi < Service + attr_accessor :service, :version + + def initialize(client, version = DEFAULT_VERSION) + super(client, version, 'BalancePlatform') + end + + # Begin SCA device registration + def begin_sca_device_registration(request, headers: {}) + endpoint = '/scaDevices'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + + action = { method: 'post', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + # Finish registration process for a SCA device + def finish_sca_device_registration(request, device_id, headers: {}) + endpoint = '/scaDevices/{deviceId}'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, device_id) + + action = { method: 'patch', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + # Create a new SCA association for a device + def submit_sca_association(request, device_id, headers: {}) + endpoint = '/scaDevices/{deviceId}/scaAssociations'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, device_id) + + action = { method: 'post', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + end +end diff --git a/lib/adyen/services/capital.rb b/lib/adyen/services/capital.rb new file mode 100644 index 00000000..a19bee5e --- /dev/null +++ b/lib/adyen/services/capital.rb @@ -0,0 +1,34 @@ +require_relative 'capital/grant_accounts_api' +require_relative 'capital/grant_offers_api' +require_relative 'capital/grants_api' + +module Adyen + + # NOTE: This class is auto generated by OpenAPI Generator + # Ref: https://openapi-generator.tech + # + # Do not edit the class manually. + class Capital + attr_accessor :service, :version + + DEFAULT_VERSION = 1 + def initialize(client, version = DEFAULT_VERSION) + @service = 'Capital' + @client = client + @version = version + end + + def grant_accounts_api + @grant_accounts_api ||= Adyen::GrantAccountsApi.new(@client, @version) + end + + def grant_offers_api + @grant_offers_api ||= Adyen::GrantOffersApi.new(@client, @version) + end + + def grants_api + @grants_api ||= Adyen::GrantsApi.new(@client, @version) + end + + end +end diff --git a/lib/adyen/services/capital/grant_accounts_api.rb b/lib/adyen/services/capital/grant_accounts_api.rb new file mode 100644 index 00000000..ba7bc504 --- /dev/null +++ b/lib/adyen/services/capital/grant_accounts_api.rb @@ -0,0 +1,26 @@ +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 GrantAccountsApi < Service + attr_accessor :service, :version + + def initialize(client, version = DEFAULT_VERSION) + super(client, version, 'Capital') + end + + # Get the information of your grant account + def get_grant_account_information(id, headers: {}) + endpoint = '/grantAccounts/{id}'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, id) + + action = { method: 'get', url: endpoint } + @client.call_adyen_api(@service, action, {}, headers, @version) + end + + end +end diff --git a/lib/adyen/services/capital/grant_offers_api.rb b/lib/adyen/services/capital/grant_offers_api.rb new file mode 100644 index 00000000..844d66ca --- /dev/null +++ b/lib/adyen/services/capital/grant_offers_api.rb @@ -0,0 +1,36 @@ +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 GrantOffersApi < Service + attr_accessor :service, :version + + def initialize(client, version = DEFAULT_VERSION) + super(client, version, 'Capital') + end + + # Get all available grant offers + def get_all_grant_offers(headers: {}, query_params: {}) + endpoint = '/grantOffers'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + endpoint += create_query_string(query_params) + action = { method: 'get', url: endpoint } + @client.call_adyen_api(@service, action, {}, headers, @version) + end + + # Get the details of a grant offer + def get_grant_offer(id, headers: {}) + endpoint = '/grantOffers/{id}'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, id) + + action = { method: 'get', url: endpoint } + @client.call_adyen_api(@service, action, {}, headers, @version) + end + + end +end diff --git a/lib/adyen/services/capital/grants_api.rb b/lib/adyen/services/capital/grants_api.rb new file mode 100644 index 00000000..267723bb --- /dev/null +++ b/lib/adyen/services/capital/grants_api.rb @@ -0,0 +1,76 @@ +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 GrantsApi < Service + attr_accessor :service, :version + + def initialize(client, version = DEFAULT_VERSION) + super(client, version, 'Capital') + end + + # Get all the disbursements of a grant + def get_all_grant_disbursements(grant_id, headers: {}) + endpoint = '/grants/{grantId}/disbursements'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, grant_id) + + action = { method: 'get', url: endpoint } + @client.call_adyen_api(@service, action, {}, headers, @version) + end + + # Get all the grants of an account holder + def get_all_grants(headers: {}, query_params: {}) + endpoint = '/grants'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + endpoint += create_query_string(query_params) + action = { method: 'get', url: endpoint } + @client.call_adyen_api(@service, action, {}, headers, @version) + end + + # Get the details of a grant + def get_grant(grant_id, headers: {}) + endpoint = '/grants/{grantId}'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, grant_id) + + action = { method: 'get', url: endpoint } + @client.call_adyen_api(@service, action, {}, headers, @version) + end + + # Get disbursement details + def get_grant_disbursement(grant_id, disbursement_id, headers: {}) + endpoint = '/grants/{grantId}/disbursements/{disbursementId}'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, grant_id, disbursement_id) + + action = { method: 'get', url: endpoint } + @client.call_adyen_api(@service, action, {}, headers, @version) + end + + # Make a request for a grant + def request_grant(request, headers: {}) + endpoint = '/grants'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + + action = { method: 'post', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + # Update the repayment configuration of a disbursement + def update_grant_disbursement(request, grant_id, disbursement_id, headers: {}) + endpoint = '/grants/{grantId}/disbursements/{disbursementId}'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, grant_id, disbursement_id) + + action = { method: 'patch', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + end +end diff --git a/lib/adyen/services/checkout/recurring_api.rb b/lib/adyen/services/checkout/recurring_api.rb index 53ea5179..2cf996b1 100644 --- a/lib/adyen/services/checkout/recurring_api.rb +++ b/lib/adyen/services/checkout/recurring_api.rb @@ -22,6 +22,16 @@ def delete_token_for_stored_payment_details(stored_payment_method_id, headers: { @client.call_adyen_api(@service, action, {}, headers, @version) end + # Forward stored payment details + def forward(request, headers: {}) + endpoint = '/forward'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + + action = { method: 'post', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + # Get tokens for stored payment details def get_tokens_for_stored_payment_details(headers: {}, query_params: {}) endpoint = '/storedPaymentMethods'.gsub(/{.+?}/, '%s')