Class: Elmas::Address

Inherits:
Object
  • Object
show all
Includes:
Resource
Defined in:
lib/elmas/resources/address.rb

Instance Attribute Summary

Attributes included from Resource

#attributes, #response, #url

Instance Method Summary collapse

Methods included from Resource

#delete, #find, #find_all, #find_by, #get, #id, #id?, #initialize, #method_missing, #save, #valid?

Methods included from Resource::Sanitizer

#sanitize, #sanitize_date_time, #sanitize_has_many, #sanitize_relationship

Methods included from Resource::UriMethods

#apply_filters, #apply_order, #apply_select, #base_filter, #basic_identifier_uri, #query_attribute, #sanitize_value, #uri

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Elmas::Resource

Instance Method Details

#base_pathObject



6
7
8
# File 'lib/elmas/resources/address.rb', line 6

def base_path
  "crm/Addresses"
end

#mandatory_attributesObject



10
11
12
# File 'lib/elmas/resources/address.rb', line 10

def mandatory_attributes
  [:type]
end

#other_attributesObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/elmas/resources/address.rb', line 15

def other_attributes # rubocop:disable Metrics/MethodLength
  [
    :account, :account_is_supplier, :account_name,
    :address_line1, :address_line2, :address_line3, 
    :city, :contact, :contact_name, 
    :country, :country_name, :created, 
    :creator, :creator_full_name, :division,
    :fax, :free_bool_field_01, :free_bool_field_02,
    :free_bool_field_03, :free_bool_field_04, :free_bool_field_05,
    :free_date_field_01, :free_date_field_02, :free_date_field_03, 
    :free_date_field_04, :free_date_field_05, :free_number_field_01,
    :free_number_field_02, :free_number_field_03, :free_number_field_04,
    :free_number_field_05, :free_text_field_01, :free_text_field_02,
    :free_text_field_03, :free_text_field_04, :free_text_field_05,
    :mailbox, :main, :modified, :modifier, :modifier_full_name, 
    :nic_number, :notes, :phone, :phone_extension, :postcode,
    :state, :state_description, :type, 
    :warehouse, :warehouse_code, :warehouse_description
  ]
end