lib/amazon_flex_pay/model.rb
def assign(hash)
      hash.each do |k, v|
        send("#{k.to_s.underscore}=", v.respond_to?(:strip) ? v.strip : v)
      end
    end
def assign(hash)
      hash.each do |k, v|
        send("#{k.to_s.underscore}=", v.respond_to?(:strip) ? v.strip : v)
      end
    end
Allows easy initialization for a model by assigning attributes from a hash.