Class: Payture::Cheques::Config
- Inherits:
-
Object
- Object
- Payture::Cheques::Config
- Defined in:
- lib/payture/cheques/config.rb
Instance Attribute Summary collapse
-
#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.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/payture/cheques/config.rb', line 15 def initialize(**) @host = [:host] @merchant_id = [:merchant_id] @password = [:password] @logger = [:logger] @timeout = [:timeout] @open_timeout = [:open_timeout] check_required_fields! end |
Instance Attribute Details
#host ⇒ Object (readonly)
required
6 7 8 |
# File 'lib/payture/cheques/config.rb', line 6 def host @host end |
#logger ⇒ Object (readonly)
optional
11 12 13 |
# File 'lib/payture/cheques/config.rb', line 11 def logger @logger end |
#merchant_id ⇒ Object (readonly)
Returns the value of attribute merchant_id.
7 8 9 |
# File 'lib/payture/cheques/config.rb', line 7 def merchant_id @merchant_id end |
#open_timeout ⇒ Object (readonly)
Returns the value of attribute open_timeout.
13 14 15 |
# File 'lib/payture/cheques/config.rb', line 13 def open_timeout @open_timeout end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
8 9 10 |
# File 'lib/payture/cheques/config.rb', line 8 def password @password end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
12 13 14 |
# File 'lib/payture/cheques/config.rb', line 12 def timeout @timeout end |
Instance Method Details
#base_url ⇒ Object
26 27 28 |
# File 'lib/payture/cheques/config.rb', line 26 def base_url "https://#{host}/apicheque" end |