Module: Buckaruby::TransactionResponse
- Included in:
- PushResponse, RecurrentTransactionResponse, RefundTransactionResponse, SetupTransactionResponse, StatusResponse
- Defined in:
- lib/buckaruby/response.rb
Overview
Base for a transaction response.
Instance Method Summary collapse
- #collect_date ⇒ Object
- #consumer_bic ⇒ Object
- #consumer_iban ⇒ Object
- #consumer_name ⇒ Object
- #invoicenumber ⇒ Object
- #mandate_reference ⇒ Object
- #payment_id ⇒ Object
- #payment_method ⇒ Object
- #transaction_id ⇒ Object
- #transaction_status ⇒ Object
- #transaction_type ⇒ Object
Instance Method Details
#collect_date ⇒ Object
115 116 117 118 119 |
# File 'lib/buckaruby/response.rb', line 115 def collect_date if payment_method == PaymentMethod::SEPA_DIRECT_DEBIT parse_date(params[:brq_service_sepadirectdebit_collectdate]) end end |
#consumer_bic ⇒ Object
82 83 84 85 86 87 88 89 90 91 |
# File 'lib/buckaruby/response.rb', line 82 def consumer_bic case payment_method when PaymentMethod::IDEAL params[:brq_service_ideal_consumerbic] when PaymentMethod::IDEAL_PROCESSING params[:brq_service_idealprocessing_consumerbic] when PaymentMethod::SEPA_DIRECT_DEBIT params[:brq_service_sepadirectdebit_customerbic] end end |
#consumer_iban ⇒ Object
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/buckaruby/response.rb', line 93 def consumer_iban case payment_method when PaymentMethod::IDEAL params[:brq_service_ideal_consumeriban] when PaymentMethod::IDEAL_PROCESSING params[:brq_service_idealprocessing_consumeriban] when PaymentMethod::SEPA_DIRECT_DEBIT params[:brq_service_sepadirectdebit_customeriban] end end |
#consumer_name ⇒ Object
104 105 106 107 108 109 110 111 112 113 |
# File 'lib/buckaruby/response.rb', line 104 def consumer_name case payment_method when PaymentMethod::IDEAL params[:brq_service_ideal_consumername] || params[:brq_customer_name] when PaymentMethod::IDEAL_PROCESSING params[:brq_service_idealprocessing_consumername] || params[:brq_customer_name] when PaymentMethod::SEPA_DIRECT_DEBIT params[:brq_service_sepadirectdebit_customername] || params[:brq_customer_name] end end |
#invoicenumber ⇒ Object
121 122 123 |
# File 'lib/buckaruby/response.rb', line 121 def invoicenumber params[:brq_invoicenumber] end |
#mandate_reference ⇒ Object
125 126 127 128 129 |
# File 'lib/buckaruby/response.rb', line 125 def mandate_reference if payment_method == PaymentMethod::SEPA_DIRECT_DEBIT params[:brq_service_sepadirectdebit_mandatereference] end end |
#payment_id ⇒ Object
131 132 133 |
# File 'lib/buckaruby/response.rb', line 131 def payment_id params[:brq_payment] end |
#payment_method ⇒ Object
135 136 137 |
# File 'lib/buckaruby/response.rb', line 135 def payment_method parse_payment_method(params[:brq_payment_method] || params[:brq_transaction_method]) end |
#transaction_id ⇒ Object
139 140 141 |
# File 'lib/buckaruby/response.rb', line 139 def transaction_id params[:brq_transactions] end |
#transaction_status ⇒ Object
143 144 145 |
# File 'lib/buckaruby/response.rb', line 143 def transaction_status status end |
#transaction_type ⇒ Object
147 148 149 |
# File 'lib/buckaruby/response.rb', line 147 def transaction_type TransactionType.parse(params[:brq_transaction_type], params[:brq_recurring]) end |