Sha256: 382104bf55aef2f8f173bfe70809c4874be48c856c70aa2b8a3bf6575cc06b4e

Contents?: true

Size: 450 Bytes

Versions: 68

Compression:

Stored size: 450 Bytes

Contents

module Paypal
  class Base
    include AttrRequired, AttrOptional, Util

    def initialize(attributes = {})
      if attributes.is_a?(Hash)
        (required_attributes + optional_attributes).each do |key|
          value = if numeric_attribute?(key)
            Util.to_numeric(attributes[key])
          else
            attributes[key]
          end
          self.send "#{key}=", value
        end
      end
      attr_missing!
    end
  end
end

Version data entries

68 entries across 68 versions & 4 rubygems

Version Path
ianfleeton-paypal-express-1.1.0 lib/paypal/base.rb
ianfleeton-paypal-express-1.0.0 lib/paypal/base.rb
ianfleeton-paypal-express-0.8.7 lib/paypal/base.rb
ianfleeton-paypal-express-0.8.6 lib/paypal/base.rb
ianfleeton-paypal-express-0.8.5 lib/paypal/base.rb
ianfleeton-paypal-express-0.8.4 lib/paypal/base.rb
creative-paypal-express-1.4.1 lib/paypal/base.rb
creative-paypal-express-1.4.0 lib/paypal/base.rb
creative-paypal-express-1.3.0 lib/paypal/base.rb
ianfleeton-paypal-express-0.8.3 lib/paypal/base.rb
ianfleeton-paypal-express-0.8.2 lib/paypal/base.rb
creative-paypal-express-1.2.1 lib/paypal/base.rb
creative-paypal-express-1.2.0 lib/paypal/base.rb
creative-paypal-express-1.1.0 lib/paypal/base.rb
dfg-paypal-0.8.2 lib/paypal/base.rb
creative-paypal-express-1.0.1.dev2 lib/paypal/base.rb
creative-paypal-express-1.0.1.dev1 lib/paypal/base.rb
creative-paypal-express-1.0.0 lib/paypal/base.rb
creative-paypal-express-0.8.2.4 lib/paypal/base.rb
creative-paypal-express-0.8.2.3 lib/paypal/base.rb