Class: Killbill::PaymentTest::PaymentTestClient
- Inherits:
-
KillBillClient::Model::Resource
- Object
- KillBillClient::Model::Resource
- Killbill::PaymentTest::PaymentTestClient
- Defined in:
- lib/payment_test/client.rb
Constant Summary collapse
- KILLBILL_PAYMENT_TEST_PREFIX =
'/plugins/killbill-payment-test'
Class Method Summary collapse
- .reset(methods, options = {}) ⇒ Object
- .set_sleep_time(sleep_time_sec, methods, options = {}) ⇒ Object
- .set_status_canceled(methods, options = {}) ⇒ Object
- .set_status_error(methods, options = {}) ⇒ Object
- .set_status_null(methods, options = {}) ⇒ Object
- .set_status_pending(methods, options = {}) ⇒ Object
- .set_status_throw(methods, options = {}) ⇒ Object
- .status(options = {}) ⇒ Object
Class Method Details
.reset(methods, options = {}) ⇒ Object
41 42 43 |
# File 'lib/payment_test/client.rb', line 41 def reset(methods, = {}) configure('ACTION_CLEAR', nil, methods, ) end |
.set_sleep_time(sleep_time_sec, methods, options = {}) ⇒ Object
29 30 31 |
# File 'lib/payment_test/client.rb', line 29 def set_sleep_time(sleep_time_sec, methods, = {}) configure('ACTION_SLEEP', sleep_time_sec, methods, ) end |
.set_status_canceled(methods, options = {}) ⇒ Object
25 26 27 |
# File 'lib/payment_test/client.rb', line 25 def set_status_canceled(methods, = {}) configure('ACTION_RETURN_PLUGIN_STATUS_CANCELED', nil, methods, ) end |
.set_status_error(methods, options = {}) ⇒ Object
21 22 23 |
# File 'lib/payment_test/client.rb', line 21 def set_status_error(methods, = {}) configure('ACTION_RETURN_PLUGIN_STATUS_ERROR', nil, methods, ) end |
.set_status_null(methods, options = {}) ⇒ Object
37 38 39 |
# File 'lib/payment_test/client.rb', line 37 def set_status_null(methods, = {}) configure('RETURN_NIL', nil, methods, ) end |
.set_status_pending(methods, options = {}) ⇒ Object
17 18 19 |
# File 'lib/payment_test/client.rb', line 17 def set_status_pending(methods, = {}) configure('ACTION_RETURN_PLUGIN_STATUS_PENDING', nil, methods, ) end |
.set_status_throw(methods, options = {}) ⇒ Object
33 34 35 |
# File 'lib/payment_test/client.rb', line 33 def set_status_throw(methods, = {}) configure('ACTION_THROW_EXCEPTION', nil, methods, ) end |
.status(options = {}) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/payment_test/client.rb', line 10 def status( = {}) response = KillBillClient::API.get "#{KILLBILL_PAYMENT_TEST_PREFIX}/status", {}, JSON.parse(response.body) end |