Class: Qiwi::Request::CreateBill

Inherits:
Base
  • Object
show all
Defined in:
lib/qiwi/request.rb

Instance Method Summary collapse

Methods inherited from Base

attributes, #body, inherited, #method, #result_from_xml, #soap_body, #with_envelope

Constructor Details

#initialize(client, params) ⇒ CreateBill

Returns a new instance of CreateBill.

Parameters:

  • params (Hash)

Options Hash (params):

  • :user (String)

    e.g. a phone number

  • :amount (Float)
  • :comment (String)
  • :txn (String)

    unique bill identifier

  • :lifetime (String, Time)

    in “dd.MM.yyyy HH:mm:ss” format

  • :alarm (Fixnum)
  • :create (Boolean)


89
90
91
92
93
94
# File 'lib/qiwi/request.rb', line 89

def initialize(client, params)
  super
  @alarm ||= 0
  @create = true if @create.nil?
  @lifetime = @lifetime.strftime('%d.%m.%Y %H:%M:%S') if @lifetime.respond_to?(:strftime)
end