Class: InvisibleCollector::Model::Customer

Inherits:
AbstractModel show all
Defined in:
lib/invisible_collector/models/customer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ModelAttributes

#to_h, #to_json

Constructor Details

#initialize(options = {}) ⇒ Customer

Returns a new instance of Customer.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/invisible_collector/models/customer.rb', line 18

def initialize(options = {})
  options = options.with_indifferent_access
  @name = options[:name]
  @vat_number = options[:vat_number]
  @gid = options[:gid]
  @external_id = options[:external_id]
  @email = options[:email]
  @phone = options[:phone]
  @mobile = options[:mobile]
  @address = options[:address]
  @zip_code = options[:zip_code]
  @city = options[:city]
  @country = options[:country]
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



13
14
15
# File 'lib/invisible_collector/models/customer.rb', line 13

def address
  @address
end

#cityObject

Returns the value of attribute city.



15
16
17
# File 'lib/invisible_collector/models/customer.rb', line 15

def city
  @city
end

#countryObject

Returns the value of attribute country.



16
17
18
# File 'lib/invisible_collector/models/customer.rb', line 16

def country
  @country
end

#emailObject

Returns the value of attribute email.



10
11
12
# File 'lib/invisible_collector/models/customer.rb', line 10

def email
  @email
end

#external_idObject

Returns the value of attribute external_id.



9
10
11
# File 'lib/invisible_collector/models/customer.rb', line 9

def external_id
  @external_id
end

#gidObject

Returns the value of attribute gid.



8
9
10
# File 'lib/invisible_collector/models/customer.rb', line 8

def gid
  @gid
end

#mobileObject

Returns the value of attribute mobile.



12
13
14
# File 'lib/invisible_collector/models/customer.rb', line 12

def mobile
  @mobile
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/invisible_collector/models/customer.rb', line 6

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



11
12
13
# File 'lib/invisible_collector/models/customer.rb', line 11

def phone
  @phone
end

#vat_numberObject

Returns the value of attribute vat_number.



7
8
9
# File 'lib/invisible_collector/models/customer.rb', line 7

def vat_number
  @vat_number
end

#zip_codeObject

Returns the value of attribute zip_code.



14
15
16
# File 'lib/invisible_collector/models/customer.rb', line 14

def zip_code
  @zip_code
end