Class: Qiwi::Client
- Inherits:
-
Object
- Object
- Qiwi::Client
- Defined in:
- lib/qiwi/client.rb
Constant Summary collapse
- ENDPOINT =
'https://ishop.qiwi.ru/services/ishop'.freeze
- HEADERS =
{'Content-Type' => 'application/soap+xml'}.freeze
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#login ⇒ Object
readonly
Returns the value of attribute login.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
Instance Method Summary collapse
-
#initialize(login = nil, password = nil, endpoint = nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(login = nil, password = nil, endpoint = nil) ⇒ Client
Returns a new instance of Client.
15 16 17 18 19 20 |
# File 'lib/qiwi/client.rb', line 15 def initialize(login = nil, password = nil, endpoint = nil) @login = login || Qiwi.config.login @password = password || Qiwi.config.password @endpoint = endpoint || Qiwi.config.endpoint || ENDPOINT raise ArgumentError.new("Missing login or password") unless @login and @password end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
14 15 16 |
# File 'lib/qiwi/client.rb', line 14 def endpoint @endpoint end |
#login ⇒ Object (readonly)
Returns the value of attribute login.
14 15 16 |
# File 'lib/qiwi/client.rb', line 14 def login @login end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
14 15 16 |
# File 'lib/qiwi/client.rb', line 14 def password @password end |