Class: Customer

Inherits:
Object
  • Object
show all
Defined in:
lib/model/Customer.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Customer) initialize(hash)

Returns a new instance of Customer



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/model/Customer.rb', line 25

def initialize(hash)
	res = hash["CST"]
	@customerCode = res["CSTC"]
	@firstName = res["FN"]
	@lastName = res["LN"]
	@fullName = res["FLN"]
	@companyName = res["CO"]
	@address = res["ADD"]
	@city = res["CTY"]
	@state = res["ST"]
	@country = res["CNT"]
	@zipCode = res["ZC"]
	@phoneNumber = res["PH"]
	@mobileNumber = res["MB"]
	@fax = res["FX"]
	@email = res["EM"]
	@comment = res["CM"]

	unless res["RCR"].nil?
		@recurring = Recurring.new(res["RCR"])	
	end

	unless res["AC1"].nil?
		@accountType1 = AccountType1.new(res["AC1"])	
	end

	unless res["AC2"].nil?
		@accountType2 = AccountType2.new(res["AC2"])	
	end
	
end

Instance Attribute Details

- (Object) accountType1

Returns the value of attribute accountType1



22
23
24
# File 'lib/model/Customer.rb', line 22

def accountType1
  @accountType1
end

- (Object) accountType2

Returns the value of attribute accountType2



23
24
25
# File 'lib/model/Customer.rb', line 23

def accountType2
  @accountType2
end

- (Object) address

Returns the value of attribute address



11
12
13
# File 'lib/model/Customer.rb', line 11

def address
  @address
end

- (Object) city

Returns the value of attribute city



12
13
14
# File 'lib/model/Customer.rb', line 12

def city
  @city
end

- (Object) comment

Returns the value of attribute comment



20
21
22
# File 'lib/model/Customer.rb', line 20

def comment
  @comment
end

- (Object) companyName

Returns the value of attribute companyName



10
11
12
# File 'lib/model/Customer.rb', line 10

def companyName
  @companyName
end

- (Object) country

Returns the value of attribute country



14
15
16
# File 'lib/model/Customer.rb', line 14

def country
  @country
end

- (Object) customerCode

Returns the value of attribute customerCode



6
7
8
# File 'lib/model/Customer.rb', line 6

def customerCode
  @customerCode
end

- (Object) email

Returns the value of attribute email



19
20
21
# File 'lib/model/Customer.rb', line 19

def email
  @email
end

- (Object) fax

Returns the value of attribute fax



18
19
20
# File 'lib/model/Customer.rb', line 18

def fax
  @fax
end

- (Object) firstName

Returns the value of attribute firstName



8
9
10
# File 'lib/model/Customer.rb', line 8

def firstName
  @firstName
end

- (Object) fullName

Returns the value of attribute fullName



7
8
9
# File 'lib/model/Customer.rb', line 7

def fullName
  @fullName
end

- (Object) lastName

Returns the value of attribute lastName



9
10
11
# File 'lib/model/Customer.rb', line 9

def lastName
  @lastName
end

- (Object) mobileNumber

Returns the value of attribute mobileNumber



17
18
19
# File 'lib/model/Customer.rb', line 17

def mobileNumber
  @mobileNumber
end

- (Object) phoneNumber

Returns the value of attribute phoneNumber



16
17
18
# File 'lib/model/Customer.rb', line 16

def phoneNumber
  @phoneNumber
end

- (Object) recurring

Returns the value of attribute recurring



21
22
23
# File 'lib/model/Customer.rb', line 21

def recurring
  @recurring
end

- (Object) state

Returns the value of attribute state



13
14
15
# File 'lib/model/Customer.rb', line 13

def state
  @state
end

- (Object) zipCode

Returns the value of attribute zipCode



15
16
17
# File 'lib/model/Customer.rb', line 15

def zipCode
  @zipCode
end