Class: GlobalCollect::Builders::InsertOrderWithPayment::Payment

Inherits:
Struct
  • Object
show all
Defined in:
lib/global_collect/builders/insert_order_with_payment/payment.rb

Direct Known Subclasses

CreditCardOnlinePayment

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) payment

Returns the value of attribute payment

Returns:

  • (Object)

    the current value of payment



2
3
4
# File 'lib/global_collect/builders/insert_order_with_payment/payment.rb', line 2

def payment
  @payment
end

Instance Method Details

- (Object) build(node)



3
4
5
6
7
8
9
# File 'lib/global_collect/builders/insert_order_with_payment/payment.rb', line 3

def build(node)
  node.tag!("PAYMENT") do |payment_node|
    payment_fields.each do |field|
      payment_node.tag!(field, payment[field]) if payment[field]
    end
  end
end

- (Object) payment_fields

WDL ??5.28 Table 105 specifies general payment fields



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/global_collect/builders/insert_order_with_payment/payment.rb', line 12

def payment_fields
  %w[
    PAYMENTPRODUCTID
    AMOUNT
    AMOUNTSIGN
    CURRENCYCODE
    LANGUAGECODE
    COUNTRYCODE
    HOSTEDINDICATOR
    RETURNURL
  ]
end