Class: EwayRapid::Message::Convert::PaymentToPaymentDetails
- Inherits:
-
Object
- Object
- EwayRapid::Message::Convert::PaymentToPaymentDetails
- Defined in:
- lib/eway_rapid/message/convert/payment_to_payment_details.rb
Instance Method Summary collapse
Instance Method Details
#do_convert(payment) ⇒ Models::PaymentDetails
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/eway_rapid/message/convert/payment_to_payment_details.rb', line 8 def do_convert(payment) detail = Models::PaymentDetails.new if payment detail.currency_code = payment.currency_code detail.invoice_description = payment.invoice_description detail.invoice_number = payment.invoice_number detail.invoice_reference = payment.invoice_reference detail.total_amount = payment.total_amount else detail.total_amount = 0 end detail end |