Class: Adyen::BinLookup
- Defined in:
- lib/adyen/services/binLookup.rb
Constant Summary collapse
- DEFAULT_VERSION =
54
Instance Attribute Summary collapse
-
#service ⇒ Object
Returns the value of attribute service.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from Service
Instance Method Summary collapse
- #get3ds_availability(request, headers: {}) ⇒ Object
- #get_cost_estimate(request, headers: {}) ⇒ Object
-
#initialize(client, version = DEFAULT_VERSION) ⇒ BinLookup
constructor
A new instance of BinLookup.
Methods inherited from Service
Constructor Details
#initialize(client, version = DEFAULT_VERSION) ⇒ BinLookup
Returns a new instance of BinLookup.
9 10 11 12 13 |
# File 'lib/adyen/services/binLookup.rb', line 9 def initialize(client, version = DEFAULT_VERSION) @service = "BinLookup" @client = client @version = version end |
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
6 7 8 |
# File 'lib/adyen/services/binLookup.rb', line 6 def service @service end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/adyen/services/binLookup.rb', line 6 def version @version end |
Instance Method Details
#get3ds_availability(request, headers: {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/adyen/services/binLookup.rb', line 15 def get3ds_availability(request, headers: {} ) """ Check if 3D Secure is available """ endpoint = "/get3dsAvailability".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [] action = { method: "post", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |
#get_cost_estimate(request, headers: {}) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/adyen/services/binLookup.rb', line 27 def get_cost_estimate(request, headers: {} ) """ Get a fees cost estimate """ endpoint = "/getCostEstimate".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [] action = { method: "post", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |