Class: Adyen::StoredValue
- Defined in:
- lib/adyen/services/storedValue.rb
Overview
NOTE: This class is auto generated by OpenAPI Generator Ref: openapi-generator.tech
Do not edit the class manually.
Constant Summary collapse
- DEFAULT_VERSION =
46
Instance Attribute Summary collapse
-
#service ⇒ Object
Returns the value of attribute service.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#change_status(request, headers: {}) ⇒ Object
Changes the status of the payment method.
-
#check_balance(request, headers: {}) ⇒ Object
Checks the balance.
-
#initialize(client, version = DEFAULT_VERSION) ⇒ StoredValue
constructor
A new instance of StoredValue.
-
#issue(request, headers: {}) ⇒ Object
Issues a new card.
-
#load(request, headers: {}) ⇒ Object
Loads the payment method.
-
#merge_balance(request, headers: {}) ⇒ Object
Merge the balance of two cards.
-
#void_transaction(request, headers: {}) ⇒ Object
Voids a transaction.
Methods inherited from Service
action_for_method_name, #create_query_string
Constructor Details
#initialize(client, version = DEFAULT_VERSION) ⇒ StoredValue
Returns a new instance of StoredValue.
12 13 14 |
# File 'lib/adyen/services/storedValue.rb', line 12 def initialize(client, version = DEFAULT_VERSION) super(client, version, 'StoredValue') end |
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
9 10 11 |
# File 'lib/adyen/services/storedValue.rb', line 9 def service @service end |
#version ⇒ Object
Returns the value of attribute version.
9 10 11 |
# File 'lib/adyen/services/storedValue.rb', line 9 def version @version end |
Instance Method Details
#change_status(request, headers: {}) ⇒ Object
Changes the status of the payment method.
17 18 19 20 21 22 23 24 |
# File 'lib/adyen/services/storedValue.rb', line 17 def change_status(request, headers: {}) endpoint = '/changeStatus'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#check_balance(request, headers: {}) ⇒ Object
Checks the balance.
27 28 29 30 31 32 33 34 |
# File 'lib/adyen/services/storedValue.rb', line 27 def check_balance(request, headers: {}) endpoint = '/checkBalance'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#issue(request, headers: {}) ⇒ Object
Issues a new card.
37 38 39 40 41 42 43 44 |
# File 'lib/adyen/services/storedValue.rb', line 37 def issue(request, headers: {}) endpoint = '/issue'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#load(request, headers: {}) ⇒ Object
Loads the payment method.
47 48 49 50 51 52 53 54 |
# File 'lib/adyen/services/storedValue.rb', line 47 def load(request, headers: {}) endpoint = '/load'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#merge_balance(request, headers: {}) ⇒ Object
Merge the balance of two cards.
57 58 59 60 61 62 63 64 |
# File 'lib/adyen/services/storedValue.rb', line 57 def merge_balance(request, headers: {}) endpoint = '/mergeBalance'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |
#void_transaction(request, headers: {}) ⇒ Object
Voids a transaction.
67 68 69 70 71 72 73 74 |
# File 'lib/adyen/services/storedValue.rb', line 67 def void_transaction(request, headers: {}) endpoint = '/voidTransaction'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end |