Repository navigation
[foreignexchange] Code generation: update services and models #406
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| require_relative 'foreignExchange/rates_api' | ||
|
|
||
| module Adyen | ||
|
|
||
| # NOTE: This class is auto generated by OpenAPI Generator | ||
| # Ref: https://openapi-generator.tech | ||
| # | ||
| # Do not edit the class manually. | ||
| class ForeignExchange | ||
| attr_accessor :service, :version | ||
|
|
||
| DEFAULT_VERSION = 1 | ||
| def initialize(client, version = DEFAULT_VERSION) | ||
| @service = 'ForeignExchange' | ||
| @client = client | ||
| @version = version | ||
| end | ||
|
|
||
| def rates_api | ||
| @rates_api ||= Adyen::RatesApi.new(@client, @version) | ||
| end | ||
|
|
||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| 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 RatesApi < Service | ||
| attr_accessor :service, :version | ||
|
|
||
| def initialize(client, version = DEFAULT_VERSION) | ||
| super(client, version, 'ForeignExchange') | ||
| end | ||
|
Comment on lines
+11
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The constant DEFAULT_VERSION = 1
def initialize(client, version = DEFAULT_VERSION)
super(client, version, 'ForeignExchange')
end |
||
|
|
||
| # Calculate amount in a different currency | ||
| def calculate(request, headers: {}) | ||
| endpoint = build_endpoint('/rates/calculate') | ||
|
|
||
| action = { method: 'post', url: endpoint } | ||
| @client.call_adyen_api(@service, action, request, headers, @version) | ||
| end | ||
|
|
||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "service": "foreignexchange", | ||
| "project": "ruby", | ||
| "generatedAt": "2026-10-22T14:18:24Z", | ||
| "openapiCommitSha": "2c1f3ab1e0385815899db9364a95e5aa5cf5568a", | ||
| "automationCommitSha": "b78db5c1f857f1d7d8d45116ce61f6266043fa60", | ||
| "libraryCommitSha": "773b42b07b93eceb706d79d666496a2c864f62fe" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service name
'ForeignExchange'is not yet supported inAdyen::Client#service_url_base(defined inlib/adyen/client.rb). Any API call to this service will raise anArgumentError: Invalid service specified. Please ensureAdyen::Clientis updated to support the'ForeignExchange'service base URL.