require_relative './service'
module Adyen

  # NOTE: This class is auto generated by OpenAPI Generator
  # Ref: https://openapi-generator.tech
  #
  # Do not edit the class manually.
  class BinLookup < Service
    attr_accessor :service, :version

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

    # Check if 3D Secure is available
    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 a fees cost estimate
    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

  end
end
