class PaymentRecipes::PayPal::REST::Payer

Attributes

funding_instruments[R]
payment_method[R]
raw_payer[R]

Public Class Methods

new(paypal_payer) click to toggle source
# File lib/payment_recipes/paypal/rest/payer.rb, line 11
def initialize(paypal_payer)
  unless paypal_payer.is_a?(::PayPal::SDK::REST::DataTypes::Payer)
    raise Exception, "#{ self.class.name } must be initialized with a PayPal Payer" 
  end

  @payment_method = convert_to_symbol(paypal_payer.payment_method)
  @raw_payer      = paypal_payer
end

Public Instance Methods

funding_instrument() click to toggle source
# File lib/payment_recipes/paypal/rest/payer.rb, line 20
def funding_instrument
  @funding_instruments.first
end
inspect() click to toggle source
# File lib/payment_recipes/paypal/rest/payer.rb, line 24
def inspect
  to_str
end
to_s() click to toggle source
# File lib/payment_recipes/paypal/rest/payer.rb, line 28
def to_s
  to_str
end
to_str() click to toggle source
# File lib/payment_recipes/paypal/rest/payer.rb, line 32
def to_str
  "<#{ self.class.name } payment_method=#{ @payment_method }>"
end