class Transbank::Webpay::Oneclick::Base
Constants
- DEFAULT_API_KEY
- DEFAULT_ONECLICK_MALL_CHILD_COMMERCE_CODES
- DEFAULT_ONECLICK_MALL_COMMERCE_CODE
- DEFAULT_ONECLICK_MALL_DEFERRED_CHILD_COMMERCE_CODES
- DEFAULT_ONECLICK_MALL_DEFERRED_COMMERCE_CODE
Attributes
api_key[RW]
commerce_code[RW]
integration_type[RW]
integration_types[R]
Public Class Methods
configure_mall_deferred_for_testing()
click to toggle source
# File lib/transbank/sdk/oneclick/base.rb, line 55 def configure_mall_deferred_for_testing @api_key = DEFAULT_API_KEY @commerce_code = DEFAULT_ONECLICK_MALL_DEFERRED_COMMERCE_CODE self.integration_type = :TEST end
configure_mall_for_testing()
click to toggle source
# File lib/transbank/sdk/oneclick/base.rb, line 49 def configure_mall_for_testing @api_key = DEFAULT_API_KEY @commerce_code = DEFAULT_ONECLICK_MALL_COMMERCE_CODE self.integration_type = :TEST end
current_integration_type_url()
click to toggle source
# File lib/transbank/sdk/oneclick/base.rb, line 38 def current_integration_type_url @integration_types[@integration_type] end
integration_type=(integration_type)
click to toggle source
# File lib/transbank/sdk/oneclick/base.rb, line 42 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::Webpay::Errors::IntegrationTypeError, "Invalid integration type, valid values are #{valid_values}" end
integration_type_url(integration_type)
click to toggle source
# File lib/transbank/sdk/oneclick/base.rb, line 31 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::Webpay::Errors::IntegrationTypeError, "Invalid integration type, valid values are #{valid_values}" end