Sha256: 96052e884e77118264ec7e109a082957d9adf372ccf37333b1c01c6e780b0a36

Contents?: true

Size: 678 Bytes

Versions: 1

Compression:

Stored size: 678 Bytes

Contents

#
# address.rb
# ConstantContact
#
# Copyright (c) 2013 Constant Contact. All rights reserved.

module ConstantContact
  module Components
    class Address < Component
      attr_accessor :id, :line1, :line2, :line3, :city, :address_type, :state_code,
                    :country_code, :postal_code, :sub_postal_code

			# Factory method to create an Address object from a json string
			# @param [Hash] props - array of properties to create object from
			# @return [Address]
			def self.create(props)
				obj = Address.new
				if props
					props.each do |key, value|
						obj.send("#{key}=", value) if obj.respond_to? key
					end
				end
				obj
			end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
constantcontact-1.0.2 lib/constantcontact/components/contacts/address.rb