Class: FioAPI::Payments::Xml::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/base/payments/xml/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(builder, payment) ⇒ Item

Returns a new instance of Item.



7
8
9
10
# File 'lib/base/payments/xml/item.rb', line 7

def initialize(builder, payment)
  @builder = builder
  @payment = payment
end

Instance Attribute Details

#builderObject (readonly)

Returns the value of attribute builder.



5
6
7
# File 'lib/base/payments/xml/item.rb', line 5

def builder
  @builder
end

#paymentObject (readonly)

Returns the value of attribute payment.



5
6
7
# File 'lib/base/payments/xml/item.rb', line 5

def payment
  @payment
end

Instance Method Details

#buildObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/base/payments/xml/item.rb', line 12

def build
  @build ||= builder.DomesticTransaction do
    builder.accountFrom payment.
    builder.currency payment.currency
    builder.amount payment.amount
    builder.accountTo payment.
    builder.bankCode payment.bank_code
    builder.ks payment.ks
    builder.vs payment.vs
    builder.ss payment.ss
    builder.date payment.date
    builder.messageForRecipient payment.message_for_recipient
    comment
    builder.paymentType payment.payment_type
  end
end