class Paypal::Payment::Response::Info

Attributes

amount[RW]

Public Class Methods

new(attributes = {}) click to toggle source
# File lib/paypal/payment/response/info.rb, line 27
def initialize(attributes = {})
  attrs = attributes.dup
  @@attribute_mapping.each do |key, value|
    self.send "#{value}=", attrs.delete(key)
  end
  @amount = Common::Amount.new(
    :total => attrs.delete(:AMT),
    :fee => attrs.delete(:FEEAMT),
    :tax => attrs.delete(:TAXAMT)
  )

  # warn ignored params
  attrs.each do |key, value|
    Paypal.log "Ignored Parameter (#{self.class}): #{key}=#{value}", :warn
  end
end