Module: Adyen::REST
- Defined in:
- lib/adyen/rest.rb,
lib/adyen/rest/client.rb,
lib/adyen/rest/errors.rb,
lib/adyen/rest/request.rb,
lib/adyen/rest/response.rb,
lib/adyen/rest/signature.rb,
lib/adyen/rest/modify_payment.rb,
lib/adyen/rest/authorise_payment.rb,
lib/adyen/rest/authorise_recurring_payment.rb
Overview
The Adyen::REST module allows you to interact with Adyen’s REST API.
The primary method here is REST.session, which will yield a Client which you can use to send API requests.
Defined Under Namespace
Modules: AuthorisePayment, AuthoriseRecurringPayment, ListRecurringDetailsPayment, ModifyPayment, ReauthoriseRecurringPayment, Signature Classes: Client, Error, Request, RequestValidationFailed, Response, ResponseError
Class Method Summary collapse
-
.client ⇒ Adyen::REST::Client
Provides a REST API client this is configured using the values in
Adyen.configuration
. -
.session(client = nil) {|client| ... } ⇒ void
Exectutes a session against the Adyen REST API.
Class Method Details
.client ⇒ Adyen::REST::Client
Provides a REST API client this is configured using the values in Adyen.configuration
.
28 29 30 31 32 33 34 |
# File 'lib/adyen/rest.rb', line 28 def self.client Adyen::REST::Client.new( Adyen.configuration.environment, Adyen.configuration.api_username, Adyen.configuration.api_password ) end |
.session(client = nil) {|client| ... } ⇒ void
This method returns an undefined value.
Exectutes a session against the Adyen REST API.
It will use a standard client from client, or it uses a provided client. The client will be yielded to the block, and will be closed after the block is finisged
47 48 49 50 51 52 |
# File 'lib/adyen/rest.rb', line 47 def self.session(client = nil) client ||= self.client yield(client) ensure client.close end |