Class: PayPal::AdaptivePayments::Response::Pay
- Inherits:
-
Object
- Object
- PayPal::AdaptivePayments::Response::Pay
- Includes:
- Common::Response
- Defined in:
- lib/paypal/adaptive_payments/response/pay.rb
Instance Attribute Summary collapse
-
#default_funding_plan ⇒ Object
Returns the value of attribute default_funding_plan.
-
#pay_error_list ⇒ Object
Returns the value of attribute pay_error_list.
-
#pay_key ⇒ Object
Returns the value of attribute pay_key.
-
#payment_exec_status ⇒ Object
Returns the value of attribute payment_exec_status.
-
#warning_data_list ⇒ Object
Returns the value of attribute warning_data_list.
Attributes included from Common::Response
Instance Method Summary collapse
- #completed? ⇒ Boolean
- #errors ⇒ Object
- #pay_errors ⇒ Object
- #payment_url ⇒ Object
- #set_pay_error_list(value) ⇒ Object
Methods included from Common::Response
#set_error, #set_response_envelope, #success?, #valid?
Methods included from Common::Base
#after_initialize, #build_datetime, #build_value, #camelize, #hash_keys, #initialize, #request, #to_hash, #to_json, #underscore
Instance Attribute Details
#default_funding_plan ⇒ Object
Returns the value of attribute default_funding_plan.
8 9 10 |
# File 'lib/paypal/adaptive_payments/response/pay.rb', line 8 def default_funding_plan @default_funding_plan end |
#pay_error_list ⇒ Object
Returns the value of attribute pay_error_list.
6 7 8 |
# File 'lib/paypal/adaptive_payments/response/pay.rb', line 6 def pay_error_list @pay_error_list end |
#pay_key ⇒ Object
Returns the value of attribute pay_key.
5 6 7 |
# File 'lib/paypal/adaptive_payments/response/pay.rb', line 5 def pay_key @pay_key end |
#payment_exec_status ⇒ Object
Returns the value of attribute payment_exec_status.
7 8 9 |
# File 'lib/paypal/adaptive_payments/response/pay.rb', line 7 def payment_exec_status @payment_exec_status end |
#warning_data_list ⇒ Object
Returns the value of attribute warning_data_list.
9 10 11 |
# File 'lib/paypal/adaptive_payments/response/pay.rb', line 9 def warning_data_list @warning_data_list end |
Instance Method Details
#completed? ⇒ Boolean
27 28 29 |
# File 'lib/paypal/adaptive_payments/response/pay.rb', line 27 def completed? self.payment_exec_status == 'COMPLETED' end |
#errors ⇒ Object
19 20 21 |
# File 'lib/paypal/adaptive_payments/response/pay.rb', line 19 def errors super + pay_errors end |
#pay_errors ⇒ Object
15 16 17 |
# File 'lib/paypal/adaptive_payments/response/pay.rb', line 15 def pay_errors (self.pay_error_list && self.pay_error_list.errors) || [] end |
#payment_url ⇒ Object
23 24 25 |
# File 'lib/paypal/adaptive_payments/response/pay.rb', line 23 def payment_url "#{PayPal::Api.site_endpoint}?cmd=_ap-payment&paykey=#{self.pay_key}" end |
#set_pay_error_list(value) ⇒ Object
11 12 13 |
# File 'lib/paypal/adaptive_payments/response/pay.rb', line 11 def set_pay_error_list(value) self.pay_error_list = build_value(PayErrorList, value) end |