Class: FastSpring::Customer

Inherits:
Object
  • Object
show all
Defined in:
lib/fastspring-saasy/customer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(details) ⇒ Customer

Returns a new instance of Customer.



5
6
7
8
9
10
11
# File 'lib/fastspring-saasy/customer.rb', line 5

def initialize(details)
  @first_name = details.fetch('firstName', '')
  @last_name = details.fetch('lastName', '') 
  @company = details.fetch('company', '') 
  @email = details.fetch('email')
  @phone_number = details.fetch('phoneNumber', '')
end

Instance Attribute Details

#companyObject

Returns the value of attribute company.



3
4
5
# File 'lib/fastspring-saasy/customer.rb', line 3

def company
  @company
end

#emailObject

Returns the value of attribute email.



3
4
5
# File 'lib/fastspring-saasy/customer.rb', line 3

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name.



3
4
5
# File 'lib/fastspring-saasy/customer.rb', line 3

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



3
4
5
# File 'lib/fastspring-saasy/customer.rb', line 3

def last_name
  @last_name
end

#phone_numberObject

Returns the value of attribute phone_number.



3
4
5
# File 'lib/fastspring-saasy/customer.rb', line 3

def phone_number
  @phone_number
end