Class: GlobalCollect::Builders::DoRefund::Payment
- Inherits:
-
Struct
- Object
- Struct
- GlobalCollect::Builders::DoRefund::Payment
- Defined in:
- lib/global_collect/builders/do_refund/payment.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#payment ⇒ Object
Returns the value of attribute payment.
Instance Method Summary collapse
- #build(node) ⇒ Object
-
#payment_fields ⇒ Object
WDL §5.28 Table 105 specifies general payment fields.
Instance Attribute Details
#payment ⇒ Object
Returns the value of attribute payment
2 3 4 |
# File 'lib/global_collect/builders/do_refund/payment.rb', line 2 def payment @payment end |
Instance Method Details
#build(node) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/global_collect/builders/do_refund/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 |
#payment_fields ⇒ Object
WDL §5.28 Table 105 specifies general payment fields
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/global_collect/builders/do_refund/payment.rb', line 12 def payment_fields %w[ ORDERID EFFORTID MERCHANTREFERENCE REFERENCEORIGPAYMENT CURRENCYCODE AMOUNT COUNTRYCODE REFUNDDATE SURNAME FIRSTNAME PREFIXSURNAME TITLE COMPANYNAME COMPANYDATA STREET HOUSENUMBER ADDITIONALADDRESSINFO ZIP CITY STATE EMAILADDRESS EMAILTYPEINDICATOR ] end |