Sha256: aedf7ab96c23d2418b5cb22d0e6bef67767f5e9a8599e7df4e883469c8989b44

Contents?: true

Size: 1.22 KB

Versions: 10

Compression:

Stored size: 1.22 KB

Contents

module GeoCerts
  class Order < ApiObject
    
    class Organization
      
      attr_accessor   :address,
                      :address_2,
                      :address_3,
                      :city,
                      :country,
                      :name,
                      :phone,
                      :postal_code,
                      :state
      
      def initialize(attributes = {})
        attributes.each_pair do |name, value|
          send("#{name}=", value) if respond_to?(name)
        end
      end
      
      def to_geocerts_hash
        {
          :organization_address     => GeoCerts.escape(self.address),
          :organization_address_2   => GeoCerts.escape(self.address_2),
          :organization_address_3   => GeoCerts.escape(self.address_3),
          :organization_city        => GeoCerts.escape(self.city),
          :organization_country     => GeoCerts.escape(self.country),
          :organization_name        => GeoCerts.escape(self.name),
          :organization_phone       => GeoCerts.escape(self.phone),
          :organization_postal_code => GeoCerts.escape(self.postal_code),
          :organization_state       => GeoCerts.escape(self.state)
        }
      end
      
    end
    
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
geocerts-0.0.20 lib/geo_certs/order/organization.rb
geocerts-0.0.19 lib/geo_certs/order/organization.rb
geocerts-0.0.18 lib/geo_certs/order/organization.rb
geocerts-0.0.17 lib/geo_certs/order/organization.rb
geocerts-0.0.16 lib/geo_certs/order/organization.rb
geocerts-0.0.15 lib/geo_certs/order/organization.rb
geocerts-0.0.14 lib/geo_certs/order/organization.rb
geocerts-0.0.13 lib/geo_certs/order/organization.rb
geocerts-0.0.12 lib/geo_certs/order/organization.rb
geocerts-0.0.11 lib/geo_certs/order/organization.rb