Class: Adyen::API::RecurringService
- Inherits:
-
SimpleSOAPClient
- Object
- SimpleSOAPClient
- Adyen::API::RecurringService
- Defined in:
- lib/adyen/api.rb,
lib/adyen/api.rb
Defined Under Namespace
Classes: DisableResponse, ListResponse
Constant Summary collapse
- ENDPOINT_URI =
'https://pal-%s.adyen.com/pal/servlet/soap/Recurring'
- LIST_LAYOUT =
<<EOS <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <recurring:listRecurringDetails xmlns:recurring="http://recurring.services.adyen.com"> <recurring:request> <recurring:recurring> <recurring:contract>RECURRING</recurring:contract> </recurring:recurring> <recurring:merchantAccount>%s</recurring:merchantAccount> <recurring:shopperReference>%s</recurring:shopperReference> </recurring:request> </recurring:listRecurringDetails> </soap:Body> </soap:Envelope> EOS
- DISABLE_LAYOUT =
<<EOS <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <recurring:disable xmlns:recurring="http://recurring.services.adyen.com"> <recurring:request> <recurring:merchantAccount>%s</recurring:merchantAccount> <recurring:shopperReference>%s</recurring:shopperReference> %s </recurring:request> </recurring:disable> </soap:Body> </soap:Envelope> EOS
- RECURRING_DETAIL_PARTIAL =
<<EOS <recurring:recurringDetailReference>%s</recurring:recurringDetailReference> EOS
- DISABLE_RESPONSE =
Test responses
<<EOS <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <ns1:disableResponse xmlns:ns1="http://recurring.services.adyen.com"> <ns1:result> <response xmlns="http://recurring.services.adyen.com"> %s </response> </ns1:result> </ns1:disableResponse> </soap:Body> </soap:Envelope> EOS
Constants inherited from SimpleSOAPClient
Instance Attribute Summary
Attributes inherited from SimpleSOAPClient
Class Method Summary collapse
Instance Method Summary collapse
- #disable ⇒ Object
-
#list ⇒ Object
TODO: rename to list_details and make shortcut method take the only necessary param.
Methods inherited from SimpleSOAPClient
#call_webservice_action, endpoint, #initialize
Constructor Details
This class inherits a constructor from Adyen::API::SimpleSOAPClient
Class Method Details
.disabled_stub ⇒ Object
348 349 350 351 352 |
# File 'lib/adyen/api.rb', line 348 def disabled_stub http_response = Net::HTTPOK.new('1.1', '200', 'OK') def http_response.body; DISABLE_RESPONSE % DisableResponse::DISABLED_RESPONSES.first; end DisableResponse.new(http_response) end |
.stub_disabled! ⇒ Object
354 355 356 |
# File 'lib/adyen/api.rb', line 354 def stub_disabled! @stubbed_response = disabled_stub end |
Instance Method Details
#disable ⇒ Object
364 365 366 |
# File 'lib/adyen/api.rb', line 364 def disable call_webservice_action('disable', disable_request_body, DisableResponse) end |
#list ⇒ Object
TODO: rename to list_details and make shortcut method take the only necessary param
360 361 362 |
# File 'lib/adyen/api.rb', line 360 def list call_webservice_action('listRecurringDetails', list_request_body, ListResponse) end |