Class: Qiwi::Client

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(login = nil, password = nil, endpoint = nil) ⇒ Client

Returns a new instance of Client.

Raises:

  • (ArgumentError)


15
16
17
18
19
20
# File 'lib/qiwi/client.rb', line 15

def initialize( = nil, password = nil, endpoint = nil)
  @login =  || Qiwi.config.
  @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

#endpointObject (readonly)

Returns the value of attribute endpoint.



14
15
16
# File 'lib/qiwi/client.rb', line 14

def endpoint
  @endpoint
end

#loginObject (readonly)

Returns the value of attribute login.



14
15
16
# File 'lib/qiwi/client.rb', line 14

def 
  @login
end

#passwordObject (readonly)

Returns the value of attribute password.



14
15
16
# File 'lib/qiwi/client.rb', line 14

def password
  @password
end