Class: Microbilt::Customer
- Inherits:
-
Object
- Object
- Microbilt::Customer
- 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
-
#account_type ⇒ Object
Returns the value of attribute account_type.
-
#address1 ⇒ Object
Returns the value of attribute address1.
-
#address2 ⇒ Object
Returns the value of attribute address2.
-
#bank_account ⇒ Object
Returns the value of attribute bank_account.
-
#bank_transit ⇒ Object
Returns the value of attribute bank_transit.
-
#city ⇒ Object
Returns the value of attribute city.
-
#completion_email ⇒ Object
Returns the value of attribute completion_email.
-
#country ⇒ Object
Returns the value of attribute country.
-
#date_of_birth ⇒ Object
Returns the value of attribute date_of_birth.
-
#direct_deposit_amount ⇒ Object
Returns the value of attribute direct_deposit_amount.
-
#direct_deposit_pay_cycle ⇒ Object
Returns the value of attribute direct_deposit_pay_cycle.
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#home_phone ⇒ Object
Returns the value of attribute home_phone.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#mobile_phone ⇒ Object
Returns the value of attribute mobile_phone.
-
#sin ⇒ Object
Returns the value of attribute sin.
-
#state ⇒ Object
Returns the value of attribute state.
-
#work_phone ⇒ Object
Returns the value of attribute work_phone.
-
#zip_code ⇒ Object
Returns the value of attribute zip_code.
Instance Method Summary collapse
-
#initialize(options = nil) ⇒ Customer
constructor
A new instance of Customer.
- #to_params ⇒ Object
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( = nil) .keys.each do |k| self.send("#{k}=", [k]) end if end |
Instance Attribute Details
#account_type ⇒ Object
Returns the value of attribute account_type.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def account_type @account_type end |
#address1 ⇒ Object
Returns the value of attribute address1.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def address1 @address1 end |
#address2 ⇒ Object
Returns the value of attribute address2.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def address2 @address2 end |
#bank_account ⇒ Object
Returns the value of attribute bank_account.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def bank_account @bank_account end |
#bank_transit ⇒ Object
Returns the value of attribute bank_transit.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def bank_transit @bank_transit end |
#city ⇒ Object
Returns the value of attribute city.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def city @city end |
#completion_email ⇒ Object
Returns the value of attribute completion_email.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def completion_email @completion_email end |
#country ⇒ Object
Returns the value of attribute country.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def country @country end |
#date_of_birth ⇒ Object
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_amount ⇒ Object
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_cycle ⇒ Object
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 |
#email ⇒ Object
Returns the value of attribute email.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def first_name @first_name end |
#home_phone ⇒ Object
Returns the value of attribute home_phone.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def home_phone @home_phone end |
#last_name ⇒ Object
Returns the value of attribute last_name.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def last_name @last_name end |
#mobile_phone ⇒ Object
Returns the value of attribute mobile_phone.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def mobile_phone @mobile_phone end |
#sin ⇒ Object
Returns the value of attribute sin.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def sin @sin end |
#state ⇒ Object
Returns the value of attribute state.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def state @state end |
#work_phone ⇒ Object
Returns the value of attribute work_phone.
4 5 6 |
# File 'lib/microbilt/customer.rb', line 4 def work_phone @work_phone end |
#zip_code ⇒ Object
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_params ⇒ Object
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' => bank_account, 'Customer.DirectDepositAmount' => direct_deposit_amount, 'Customer.DirectDepositPayCycle' => formatted_direct_deposit_pay_cycle, 'Customer.CompletionEmail' => completion_email, 'Customer.AccountType' => formatted_account_type } end |