Class: Microbilt::Customer

Inherits:
Object
  • Object
show all
Defined in:
lib/microbilt/customer.rb

Constant Summary collapse

VALID_ACCOUNT_TYPES =
{ checking: 100, savings: 101, cd: 102, money_market: 103,
  credit_card: 200, line_of_credit: 201,
  taxable_investment: 300, tax_deferred_investment: 301,
  mortgage: 400, loan: 401,
  annuity: 500, whole_life: 501,
  rewards: 600, email: 650, biller: 675,
  term_insurance: 701, asset: 908, liability: 955, other: 999
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = nil) ⇒ Customer

Returns a new instance of Customer.



18
19
20
21
22
# File 'lib/microbilt/customer.rb', line 18

def initialize(options = nil)
  options.keys.each do |k|
    self.send("#{k}=", options[k])
  end if options
end

Instance Attribute Details

#account_typeObject

Returns the value of attribute account_type.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def 
  @account_type
end

#address1Object

Returns the value of attribute address1.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def address1
  @address1
end

#address2Object

Returns the value of attribute address2.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def address2
  @address2
end

#bank_accountObject

Returns the value of attribute bank_account.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def 
  
end

#bank_transitObject

Returns the value of attribute bank_transit.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def bank_transit
  @bank_transit
end

#cityObject

Returns the value of attribute city.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def city
  @city
end

#completion_emailObject

Returns the value of attribute completion_email.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def completion_email
  @completion_email
end

#countryObject

Returns the value of attribute country.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def country
  @country
end

#date_of_birthObject

Returns the value of attribute date_of_birth.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def date_of_birth
  @date_of_birth
end

#direct_deposit_amountObject

Returns the value of attribute direct_deposit_amount.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def direct_deposit_amount
  @direct_deposit_amount
end

#direct_deposit_pay_cycleObject

Returns the value of attribute direct_deposit_pay_cycle.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def direct_deposit_pay_cycle
  @direct_deposit_pay_cycle
end

#emailObject

Returns the value of attribute email.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def first_name
  @first_name
end

#home_phoneObject

Returns the value of attribute home_phone.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def home_phone
  @home_phone
end

#last_nameObject

Returns the value of attribute last_name.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def last_name
  @last_name
end

#mobile_phoneObject

Returns the value of attribute mobile_phone.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def mobile_phone
  @mobile_phone
end

#sinObject

Returns the value of attribute sin.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def sin
  @sin
end

#stateObject

Returns the value of attribute state.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def state
  @state
end

#work_phoneObject

Returns the value of attribute work_phone.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def work_phone
  @work_phone
end

#zip_codeObject

Returns the value of attribute zip_code.



4
5
6
# File 'lib/microbilt/customer.rb', line 4

def zip_code
  @zip_code
end

Instance Method Details

#to_paramsObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/microbilt/customer.rb', line 24

def to_params
  {
    'Customer.FirstName' => first_name,
    'Customer.LastName' => last_name,
    'Customer.SSN' => formatted_sin,
    'Customer.DOB' => formatted_date(date_of_birth),
    'Customer.Address' => formatted_address,
    'Customer.City' => city,
    'Customer.State' => state,
    'Customer.ZIP' => formatted_zip,
    'Customer.Country' => formatted_country,
    'Customer.Phone' => formatted_phone(home_phone),
    'Customer.WorkPhone' => formatted_phone(work_phone),
    'Customer.CellPhone' => formatted_phone(mobile_phone),
    'Customer.Email' => formatted_email,
    'Customer.ABAnumber' => bank_transit,
    'Customer.AccountNumber' => ,
    'Customer.DirectDepositAmount' => direct_deposit_amount,
    'Customer.DirectDepositPayCycle' => formatted_direct_deposit_pay_cycle,
    'Customer.CompletionEmail' => completion_email,
    'Customer.AccountType' => 
  }
end