Module: Dcc::Base::ContactNotStrict

Included in:
V2::ContactNotStrict, V3::ContactNotStrict
Defined in:
lib/dcc/base/contact_not_strict.rb

Overview

dcc:contactNotStrictType — loose contact (location optional). Used for manufacturers and owners.

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/dcc/base/contact_not_strict.rb', line 8

def self.included(klass)
  klass.class_eval do
    attribute :id, :string
    attribute :ref_id, :string
    attribute :ref_type, :string
    attribute :name, :text
    attribute :e_mail, :string
    attribute :phone, :string
    attribute :fax, :string
    attribute :location, :location
    attribute :description_data, :text

    xml do
      namespace ::Dcc::Namespace::Dcc
      element "contactNotStrict"
      ordered
      map_attribute "id", to: :id
      map_attribute "refId", to: :ref_id
      map_attribute "refType", to: :ref_type
      map_element "name", to: :name
      map_element "eMail", to: :e_mail
      map_element "phone", to: :phone
      map_element "fax", to: :fax
      map_element "location", to: :location
      map_element "descriptionData", to: :description_data
    end
  end
end