Class: PayPal::ExpressCheckout::Response::Details

Inherits:
Base
  • Object
show all
Defined in:
lib/paypal/express_checkout/response/details.rb

Constant Summary

Constants included from Fields

Fields::ASSOCIATIONS, Fields::ATTRIBUTES

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#build_association, #build_billings, #build_fmfs, #build_payment_items, #build_payments, #build_shipping_options, #build_values, #errors, #initialize, #params, #success?, #valid?

Methods included from Utils

#convert_to_time, #mapping

Methods included from Fields

#field_map, #group_collect, #group_fields, #has_fields?, #has_many?, included, #inverted_field_map

Constructor Details

This class inherits a constructor from PayPal::ExpressCheckout::Response::Base

Instance Method Details

#agreed?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/paypal/express_checkout/response/details.rb', line 29

def agreed?
  params["BILLINGAGREEMENTACCEPTEDSTATUS"] == "1"
end

#amountObject



17
18
19
# File 'lib/paypal/express_checkout/response/details.rb', line 17

def amount
  payment && payment.amount
end

#currencyObject



25
26
27
# File 'lib/paypal/express_checkout/response/details.rb', line 25

def currency
  payment && payment.currency
end

#descriptionObject



21
22
23
# File 'lib/paypal/express_checkout/response/details.rb', line 21

def description
  payment && payment.description
end

#notify_urlObject



13
14
15
# File 'lib/paypal/express_checkout/response/details.rb', line 13

def notify_url
  payment && payment.notify_url
end

#paymentObject



9
10
11
# File 'lib/paypal/express_checkout/response/details.rb', line 9

def payment
  @payment ||= payments.first
end