class Transbank::Patpass::PatpassByWebpay::Base

Constants

DEFAULT_API_KEY
DEFAULT_COMMERCE_CODE

Attributes

api_key[RW]
commerce_code[RW]
integration_type[RW]
integration_types[R]

Public Class Methods

configure_for_testing() click to toggle source
# File lib/transbank/sdk/patpass/patpass_by_webpay/base.rb, line 38
def configure_for_testing
  @api_key = DEFAULT_API_KEY
  @commerce_code = DEFAULT_COMMERCE_CODE
  self.integration_type = :TEST
end
current_integration_type_url() click to toggle source
# File lib/transbank/sdk/patpass/patpass_by_webpay/base.rb, line 27
def current_integration_type_url
  @integration_types[@integration_type]
end
integration_type=(integration_type) click to toggle source
# File lib/transbank/sdk/patpass/patpass_by_webpay/base.rb, line 31
def integration_type=(integration_type)
  type = integration_type.upcase.to_sym
  return @integration_type = type unless @integration_types[type].nil?
  valid_values = @integration_types.keys.join(', ')
  raise Transbank::Patpass::Errors::IntegrationTypeError, "Invalid integration type, valid values are #{valid_values}"
end
integration_type_url(integration_type) click to toggle source
# File lib/transbank/sdk/patpass/patpass_by_webpay/base.rb, line 20
def integration_type_url(integration_type)
  type = integration_type.upcase.to_sym
  return @integration_types[type] unless @integration_types[type].nil?
  valid_values = @integration_types.keys.join(', ')
  raise Transbank::Patpass::Errors::IntegrationTypeError, "Invalid integration type, valid values are #{valid_values}"
end