Class: Adyen::BinLookup

Inherits:
Service show all
Defined in:
lib/adyen/services/binLookup.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 =
54

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Service

action_for_method_name, #create_query_string

Constructor Details

#initialize(client, version = DEFAULT_VERSION) ⇒ BinLookup

Returns a new instance of BinLookup.



12
13
14
# File 'lib/adyen/services/binLookup.rb', line 12

def initialize(client, version = DEFAULT_VERSION)
  super(client, version, 'BinLookup')
end

Instance Attribute Details

#serviceObject

Returns the value of attribute service.



9
10
11
# File 'lib/adyen/services/binLookup.rb', line 9

def service
  @service
end

#versionObject

Returns the value of attribute version.



9
10
11
# File 'lib/adyen/services/binLookup.rb', line 9

def version
  @version
end

Instance Method Details

#get3ds_availability(request, headers: {}) ⇒ Object

Check if 3D Secure is available



17
18
19
20
21
22
23
24
# File 'lib/adyen/services/binLookup.rb', line 17

def get3ds_availability(request, headers: {})
  endpoint = '/get3dsAvailability'.gsub(/{.+?}/, '%s')
  endpoint = endpoint.gsub(%r{^/}, '')
  endpoint = format(endpoint)
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end

#get_cost_estimate(request, headers: {}) ⇒ Object

Get a fees cost estimate



27
28
29
30
31
32
33
34
# File 'lib/adyen/services/binLookup.rb', line 27

def get_cost_estimate(request, headers: {})
  endpoint = '/getCostEstimate'.gsub(/{.+?}/, '%s')
  endpoint = endpoint.gsub(%r{^/}, '')
  endpoint = format(endpoint)
  
  action = { method: 'post', url: endpoint }
  @client.call_adyen_api(@service, action, request, headers, @version)
end