Class: YandexKassa::Requests::Deposition

Inherits:
Object
  • Object
show all
Defined in:
lib/yandex_kassa/requests.rb

Direct Known Subclasses

Balance, MakeDeposition, TestDeposition

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}, &block) ⇒ Deposition

Returns a new instance of Deposition.



22
23
24
25
# File 'lib/yandex_kassa/requests.rb', line 22

def initialize(params = {}, &block)
  params.each { |method, value| instance_variable_set("@#{method}", value) }
  block.call(self) if block_given?
end

Instance Attribute Details

#agent_idObject

Returns the value of attribute agent_id.



20
21
22
# File 'lib/yandex_kassa/requests.rb', line 20

def agent_id
  @agent_id
end

#amountObject

Returns the value of attribute amount.



20
21
22
# File 'lib/yandex_kassa/requests.rb', line 20

def amount
  @amount
end

#client_order_idObject

Returns the value of attribute client_order_id.



20
21
22
# File 'lib/yandex_kassa/requests.rb', line 20

def client_order_id
  @client_order_id
end

#contractObject

Returns the value of attribute contract.



20
21
22
# File 'lib/yandex_kassa/requests.rb', line 20

def contract
  @contract
end

#currencyObject

Returns the value of attribute currency.



20
21
22
# File 'lib/yandex_kassa/requests.rb', line 20

def currency
  @currency
end

#dst_accountObject

Returns the value of attribute dst_account.



20
21
22
# File 'lib/yandex_kassa/requests.rb', line 20

def 
  @dst_account
end

#request_dtObject

Returns the value of attribute request_dt.



20
21
22
# File 'lib/yandex_kassa/requests.rb', line 20

def request_dt
  @request_dt
end

Instance Method Details

#extra_paramsObject



31
# File 'lib/yandex_kassa/requests.rb', line 31

def extra_params; end

#request_nameObject



27
# File 'lib/yandex_kassa/requests.rb', line 27

def request_name; end

#request_pathObject



29
# File 'lib/yandex_kassa/requests.rb', line 29

def request_path; end

#xml_request_bodyObject



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/yandex_kassa/requests.rb', line 33

def xml_request_body
<<XML
<?xml version="1.0" encoding="UTF-8"?>
<#{request_name} agentId="#{agent_id}"
clientOrderId="#{client_order_id}"
requestDT="#{request_dt}"
dstAccount="#{}"
amount="#{amount}"
currency="#{currency}"
contract="#{contract}">#{extra_params}
</#{request_name}>
XML
end