Class: Payture::Ewallet::Config
- Inherits:
-
Object
- Object
- Payture::Ewallet::Config
- Defined in:
- lib/payture/ewallet/config.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#host ⇒ Object
readonly
required.
-
#logger ⇒ Object
readonly
optional.
-
#merchant_id ⇒ Object
readonly
Returns the value of attribute merchant_id.
-
#open_timeout ⇒ Object
readonly
Returns the value of attribute open_timeout.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
Instance Method Summary collapse
- #base_url ⇒ Object
-
#initialize(**options) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(**options) ⇒ Config
Returns a new instance of Config.
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/payture/ewallet/config.rb', line 16 def initialize(**) @host = [:host] @merchant_id = [:merchant_id] @password = [:password] @currency = [:currency] @logger = [:logger] @timeout = [:timeout] @open_timeout = [:open_timeout] check_required_fields! update_money_rounding_mode end |
Instance Attribute Details
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
9 10 11 |
# File 'lib/payture/ewallet/config.rb', line 9 def currency @currency end |
#host ⇒ Object (readonly)
required
6 7 8 |
# File 'lib/payture/ewallet/config.rb', line 6 def host @host end |
#logger ⇒ Object (readonly)
optional
12 13 14 |
# File 'lib/payture/ewallet/config.rb', line 12 def logger @logger end |
#merchant_id ⇒ Object (readonly)
Returns the value of attribute merchant_id.
7 8 9 |
# File 'lib/payture/ewallet/config.rb', line 7 def merchant_id @merchant_id end |
#open_timeout ⇒ Object (readonly)
Returns the value of attribute open_timeout.
14 15 16 |
# File 'lib/payture/ewallet/config.rb', line 14 def open_timeout @open_timeout end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
8 9 10 |
# File 'lib/payture/ewallet/config.rb', line 8 def password @password end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
13 14 15 |
# File 'lib/payture/ewallet/config.rb', line 13 def timeout @timeout end |
Instance Method Details
#base_url ⇒ Object
29 30 31 |
# File 'lib/payture/ewallet/config.rb', line 29 def base_url "http://#{host}/vwapi" end |