Class: Klarna::Checkout::Configuration
- Inherits:
-
Object
- Object
- Klarna::Checkout::Configuration
- Defined in:
- lib/klarna/checkout/configuration.rb
Instance Attribute Summary collapse
- #checkout_uri ⇒ Object
- #confirmation_uri ⇒ Object
- #environment ⇒ Object
- #locale ⇒ Object
- #passcode ⇒ Object
- #purchase_country ⇒ Object
- #purchase_currency ⇒ Object
- #push_uri ⇒ Object
- #terms_uri ⇒ Object
- #user_id ⇒ Object
Instance Method Summary collapse
- #checkout_url ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/klarna/checkout/configuration.rb', line 17 def initialize @purchase_country = nil @purchase_currency = nil @locale = nil @terms_uri = nil @checkout_uri = nil @confirmation_uri = nil @push_uri = nil @environment = nil @user_id = nil @passcode = nil @checkout_url = nil end |
Instance Attribute Details
#checkout_uri ⇒ Object
61 62 63 64 65 66 67 |
# File 'lib/klarna/checkout/configuration.rb', line 61 def checkout_uri unless @checkout_uri raise Klarna::Checkout::Errors::ConfigurationError.new('checkout_uri', 'missing_configuration_item') end @checkout_uri end |
#confirmation_uri ⇒ Object
69 70 71 72 73 74 75 |
# File 'lib/klarna/checkout/configuration.rb', line 69 def confirmation_uri unless @confirmation_uri raise Klarna::Checkout::Errors::ConfigurationError.new('confirmation_uri', 'missing_configuration_item') end @confirmation_uri end |
#environment ⇒ Object
85 86 87 88 89 90 91 |
# File 'lib/klarna/checkout/configuration.rb', line 85 def environment unless @environment raise Klarna::Checkout::Errors::ConfigurationError.new('environment', 'missing_configuration_item') end @environment end |
#locale ⇒ Object
47 48 49 50 51 |
# File 'lib/klarna/checkout/configuration.rb', line 47 def locale raise Klarna::Checkout::Errors::ConfigurationError.new('locale', 'missing_configuration_item') unless @locale @locale end |
#passcode ⇒ Object
99 100 101 102 103 104 105 |
# File 'lib/klarna/checkout/configuration.rb', line 99 def passcode unless @passcode raise Klarna::Checkout::Errors::ConfigurationError.new('passcode', 'missing_configuration_item') end @passcode end |
#purchase_country ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/klarna/checkout/configuration.rb', line 31 def purchase_country unless @purchase_country raise Klarna::Checkout::Errors::ConfigurationError.new('purchase_country', 'missing_configuration_item') end @purchase_country end |
#purchase_currency ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/klarna/checkout/configuration.rb', line 39 def purchase_currency unless @purchase_currency raise Klarna::Checkout::Errors::ConfigurationError.new('purchase_currency', 'missing_configuration_item') end @purchase_currency end |
#push_uri ⇒ Object
77 78 79 80 81 82 83 |
# File 'lib/klarna/checkout/configuration.rb', line 77 def push_uri unless @push_uri raise Klarna::Checkout::Errors::ConfigurationError.new('push_uri', 'missing_configuration_item') end @push_uri end |
#terms_uri ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/klarna/checkout/configuration.rb', line 53 def terms_uri unless @terms_uri raise Klarna::Checkout::Errors::ConfigurationError.new('terms_uri', 'missing_configuration_item') end @terms_uri end |
#user_id ⇒ Object
93 94 95 96 97 |
# File 'lib/klarna/checkout/configuration.rb', line 93 def user_id raise Klarna::Checkout::Errors::ConfigurationError.new('user_id', 'missing_configuration_item') unless @user_id @user_id end |
Instance Method Details
#checkout_url ⇒ Object
107 108 109 110 111 112 113 |
# File 'lib/klarna/checkout/configuration.rb', line 107 def checkout_url unless @checkout_url raise Klarna::Checkout::Errors::ConfigurationError.new('checkout_url', 'missing_configuration_item') end @checkout_url end |