Class: PayPal::AdaptivePayments::Response::Details

Inherits:
Payment
  • Object
show all
Includes:
Common::Response
Defined in:
lib/paypal/adaptive_payments/response/details.rb

Instance Attribute Summary

Attributes included from Common::Response

#error, #response_envelope

Attributes inherited from Payment

#action_type, #cancel_url, #client_details, #currency_code, #fees_payer, #funding_constraint, #ipn_notification_url, #memo, #pay_key, #payment_info_list, #pin, #preapproval_key, #receiver_list, #response, #return_url, #reverse_all_parallel_payments_on_error, #sender, #sender_email, #tracking_id, #transaction_id

Attributes inherited from Base

#request_envelope

Instance Method Summary collapse

Methods included from Common::Response

#errors, #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

Methods inherited from Payment

#create, #details, #pay, #pay_primary, #payment_url, #receiver=, #refund, #run_execute, #run_pay, #set_funding_constraint, #set_payment_info_list, #set_receiver, #set_sender, #shipping_addresses

Methods inherited from Base

#request

Instance Method Details

#payment_infoObject



7
8
9
# File 'lib/paypal/adaptive_payments/response/details.rb', line 7

def payment_info
  @payment_info ||= (payment_info_list && payment_info_list.payment_info) || []
end

#receiverObject



15
16
17
# File 'lib/paypal/adaptive_payments/response/details.rb', line 15

def receiver
  @receiver ||= receivers.first
end

#receiversObject



11
12
13
# File 'lib/paypal/adaptive_payments/response/details.rb', line 11

def receivers
  @receivers ||= payment_info.map { |pi| pi.receiver }
end