Class: Dotpay::Configuration
- Inherits:
-
Object
- Object
- Dotpay::Configuration
- Defined in:
- lib/dotpay/configuration.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Account ID in Dotpay system, for which payment is made (Seller’s account ID).
-
#cancel_endpoint ⇒ Object
Cancel API endpoint.
-
#cancel_login ⇒ Object
Cancel API login.
-
#cancel_password ⇒ Object
Cancel API password.
-
#email ⇒ Object
provider’s email.
-
#endpoint ⇒ Object
service hostname.
-
#language ⇒ Object
Language.
-
#pin ⇒ Object
URLC PIN 16-character alphanumeric string defined in section: Settings → URLC parameters.
Instance Method Summary collapse
-
#[](option) ⇒ Object
Allows config options to be read like a hash.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
40 41 42 43 44 |
# File 'lib/dotpay/configuration.rb', line 40 def initialize @language = :pl @endpoint = 'https://ssl.dotpay.pl/' @cancel_endpoint = 'https://ssl.dotpay.pl/api/cancel/' end |
Instance Attribute Details
#account_id ⇒ Object
Account ID in Dotpay system, for which payment is made (Seller’s account ID)
4 5 6 |
# File 'lib/dotpay/configuration.rb', line 4 def account_id @account_id end |
#cancel_endpoint ⇒ Object
Cancel API endpoint
32 33 34 |
# File 'lib/dotpay/configuration.rb', line 32 def cancel_endpoint @cancel_endpoint end |
#cancel_login ⇒ Object
Cancel API login
35 36 37 |
# File 'lib/dotpay/configuration.rb', line 35 def cancel_login @cancel_login end |
#cancel_password ⇒ Object
Cancel API password
38 39 40 |
# File 'lib/dotpay/configuration.rb', line 38 def cancel_password @cancel_password end |
#email ⇒ Object
provider’s email
29 30 31 |
# File 'lib/dotpay/configuration.rb', line 29 def email @email end |
#endpoint ⇒ Object
service hostname
26 27 28 |
# File 'lib/dotpay/configuration.rb', line 26 def endpoint @endpoint end |
#language ⇒ Object
Language
Defaults to :pl
:pl → Polish :en → English :de → German :it → Italian :fr → French :es → Spanish :cz → Czech :ru → Russian :bg → Bulgarian
23 24 25 |
# File 'lib/dotpay/configuration.rb', line 23 def language @language end |
#pin ⇒ Object
URLC PIN 16-character alphanumeric string defined in section: Settings → URLC parameters
8 9 10 |
# File 'lib/dotpay/configuration.rb', line 8 def pin @pin end |
Instance Method Details
#[](option) ⇒ Object
Allows config options to be read like a hash
option: Key for a given attribute
50 51 52 |
# File 'lib/dotpay/configuration.rb', line 50 def [](option) send(option) end |