Sha256: ac986c24cebb6502b3dbb4e8717d8860f077a37d4670f851fe0da6c39cac14bd

Contents?: true

Size: 806 Bytes

Versions: 6

Compression:

Stored size: 806 Bytes

Contents

require 'gecko/record/base'

module Gecko
  module Record
    class Address < Base
      belongs_to :company

      attribute :phone_number, String
      attribute :email,        String

      attribute :label,        String
      attribute :company_name, String
      attribute :address1,     String
      attribute :address2,     String
      attribute :suburb,       String
      attribute :city,         String
      attribute :state,        String
      attribute :country,      String
      attribute :zip_code,     String

      attribute :status,       String,  readonly: true

      alias_method :country_code, :country
    end

    class AddressAdapter < BaseAdapter
      # Override plural_path to properly pluralize address
      def plural_path
        'addresses'
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gecko-ruby-0.0.9 lib/gecko/record/address.rb
gecko-ruby-0.0.8 lib/gecko/record/address.rb
gecko-ruby-0.0.7 lib/gecko/record/address.rb
gecko-ruby-0.0.6 lib/gecko/record/address.rb
gecko-ruby-0.0.5 lib/gecko/record/address.rb
gecko-ruby-0.0.4 lib/gecko/record/address.rb