Skip to content
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

regenerate management v3 and transfers v4 #189

Merged
merged 1 commit into from
Oct 23, 2023
Merged
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ posTerminalManagement: spec=TfmAPIService-v1
payment: spec=PaymentService-v68
recurring: spec=RecurringService-v68
payout: spec=PayoutService-v68
management: spec=ManagementService-v1
management: spec=ManagementService-v3
legalEntityManagement: spec=LegalEntityService-v3
balancePlatform: spec=BalancePlatformService-v2
balanceControlService: spec=BalanceControlService-v1
transfers: spec=TransferService-v3
transfers: spec=TransferService-v4
disputes: spec=DisputeService-v30

allServices: $(services) $(singleFileServices)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ This library supports the following:
| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | v2 | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](lib/adyen/services/balancePlatform.rb) |
| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](lib/adyen/services/dataProtection.rb) |
| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | v3 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](lib/adyen/services/legalEntityManagement.rb) |
| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | v1 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](lib/adyen/services/management.rb) |
| [Management API](https://docs.adyen.com/api-explorer/Management/3/overview) | v3 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](lib/adyen/services/management.rb) |
| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [Classic Integration API](lib/adyen/services/payment.rb) |
| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | v68 | Endpoints for sending funds to your customers. | [Payout](lib/adyen/services/payout.rb) |
| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | v1 | Endpoints for managing your point-of-sale payment terminals. | [TerminalManagement](lib/adyen/services/posTerminalManagement.rb) |
| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](lib/adyen/services/recurring.rb) |
| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | v46 | Manage both online and point-of-sale gift cards and other stored-value cards. | [StoredValue](lib/adyen/services/storedValue.rb) |
| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | v3 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](lib/adyen/services/transfers.rb) |
| [Transfers API](https://docs.adyen.com/api-explorer/transfers/4/overview) | v4 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](lib/adyen/services/transfers.rb) |
| [Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/terminal-api-reference/) | - | Our point-of-sale integration. | [TerminalCloudAPI](lib/adyen/services/terminalCloudAPI.rb) |
| [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview) | v30 | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | [Disputes](lib/adyen/services/disputes.rb) |

Expand Down
2 changes: 1 addition & 1 deletion lib/adyen/services/management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module Adyen
class Management
attr_accessor :service, :version

DEFAULT_VERSION = 1
DEFAULT_VERSION = 3
def initialize(client, version = DEFAULT_VERSION)
@service = 'Management'
@client = client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,14 @@ def list_android_certificates(company_id, headers: {}, query_params: {})
@client.call_adyen_api(@service, action, {}, headers, @version)
end

def upload_android_app(company_id, headers: {})
endpoint = '/companies/{companyId}/androidApps'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, company_id)

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

end
end
9 changes: 9 additions & 0 deletions lib/adyen/services/management/my_api_credential_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,14 @@ def add_allowed_origin(request, headers: {})
@client.call_adyen_api(@service, action, request, headers, @version)
end

def generate_new_client_key_for_self(headers: {})
endpoint = '/me/generateClientKey'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)

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

end
end
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,14 @@ def list_terminals(headers: {}, query_params: {})
@client.call_adyen_api(@service, action, {}, headers, @version)
end

def reassign_terminal(request, terminal_id, headers: {})
endpoint = '/terminals/{terminalId}/reassign'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, terminal_id)

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

end
end
2 changes: 1 addition & 1 deletion lib/adyen/services/transfers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Adyen
class Transfers
attr_accessor :service, :version

DEFAULT_VERSION = 3
DEFAULT_VERSION = 4
def initialize(client, version = DEFAULT_VERSION)
@service = 'Transfers'
@client = client
Expand Down
9 changes: 9 additions & 0 deletions lib/adyen/services/transfers/transfers_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,14 @@ def transfer_funds(request, headers: {})
@client.call_adyen_api(@service, action, request, headers, @version)
end

def return_transfer(request, id, headers: {})
endpoint = '/transfers/{id}/returns'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, id)

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

end
end