Class: Transbank::Patpass::PatpassByWebpay::Base
- Inherits:
-
Object
- Object
- Transbank::Patpass::PatpassByWebpay::Base
- Defined in:
- lib/transbank/sdk/patpass/patpass_by_webpay/base.rb
Constant Summary collapse
- DEFAULT_API_KEY =
'579B532A7440BB0C9079DED94D31EA1615BACEB56610332264630D42D0A36B1C'.freeze
- DEFAULT_COMMERCE_CODE =
'597055555550'.freeze
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.commerce_code ⇒ Object
Returns the value of attribute commerce_code.
-
.integration_type ⇒ Object
Returns the value of attribute integration_type.
-
.integration_types ⇒ Object
readonly
Returns the value of attribute integration_types.
Class Method Summary collapse
- .configure_for_testing ⇒ Object
- .current_integration_type_url ⇒ Object
- .integration_type_url(integration_type) ⇒ Object
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
18 19 20 |
# File 'lib/transbank/sdk/patpass/patpass_by_webpay/base.rb', line 18 def api_key @api_key end |
.commerce_code ⇒ Object
Returns the value of attribute commerce_code.
18 19 20 |
# File 'lib/transbank/sdk/patpass/patpass_by_webpay/base.rb', line 18 def commerce_code @commerce_code end |
.integration_type ⇒ Object
Returns the value of attribute integration_type.
18 19 20 |
# File 'lib/transbank/sdk/patpass/patpass_by_webpay/base.rb', line 18 def integration_type @integration_type end |
.integration_types ⇒ Object (readonly)
Returns the value of attribute integration_types.
17 18 19 |
# File 'lib/transbank/sdk/patpass/patpass_by_webpay/base.rb', line 17 def integration_types @integration_types end |
Class Method Details
.configure_for_testing ⇒ Object
38 39 40 41 42 |
# 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 ⇒ Object
27 28 29 |
# File 'lib/transbank/sdk/patpass/patpass_by_webpay/base.rb', line 27 def current_integration_type_url @integration_types[@integration_type] end |
.integration_type_url(integration_type) ⇒ Object
20 21 22 23 24 25 |
# 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 |