Class: Docdata::Order::StartRequest
- Defined in:
- lib/docdata/order/request.rb
Overview
Start a payment order (Webdirect).
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
Methods inherited from Request
Constructor Details
This class inherits a constructor from Docdata::Order::Request
Instance Method Details
#build_request(builder) ⇒ Object
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/docdata/order/request.rb', line 218 def build_request(builder) # Payment order key belonging to the order for which a transaction needs to be started. builder.paymentOrderKey(order_key) builder.payment do |payment| payment.paymentMethod(payment_method) case payment_method when PaymentMethod::IDEAL payment.iDealPaymentInput do |input| input.issuerId(issuer_id) end when PaymentMethod::SEPA_DIRECT_DEBIT payment.directDebitPaymentInput do |input| input.holderName(account_name) input.iban(account_iban) input.bic(account_bic) if account_bic end else raise ArgumentError, "Payment method not supported: #{payment_method}" end end end |