Sha256: a7f42fb411cc84c2001a548a2480e99fb6aa20d165c11cc792b1ea2aacb1cd83

Contents?: true

Size: 1.23 KB

Versions: 7

Compression:

Stored size: 1.23 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 #:nodoc:
        {
          :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

7 entries across 7 versions & 1 rubygems

Version Path
geocerts-1.0.1 lib/geo_certs/order/organization.rb
geocerts-1.0.0 lib/geo_certs/order/organization.rb
geocerts-0.0.25 lib/geo_certs/order/organization.rb
geocerts-0.0.24 lib/geo_certs/order/organization.rb
geocerts-0.0.23 lib/geo_certs/order/organization.rb
geocerts-0.0.22 lib/geo_certs/order/organization.rb
geocerts-0.0.21 lib/geo_certs/order/organization.rb