Class: Sunnyside::ClientData

Inherits:
ParseInvoice show all
Defined in:
lib/sunnyside/ledger/auth_report.rb

Instance Attribute Summary collapse

Attributes inherited from ParseInvoice

#client_line, #visits

Instance Method Summary collapse

Methods inherited from ParseInvoice

#client_data, #invoice_lines, #process

Constructor Details

#initialize(client) ⇒ ClientData

Returns a new instance of ClientData.



92
93
94
# File 'lib/sunnyside/ledger/auth_report.rb', line 92

def initialize(client)
  @client_id, @service_id, @dob, @recipient_id, @authorization = client.split.map { |line| line.strip }
end

Instance Attribute Details

#authorizationObject (readonly)

Returns the value of attribute authorization.



90
91
92
# File 'lib/sunnyside/ledger/auth_report.rb', line 90

def authorization
  @authorization
end

#client_idObject (readonly)

Returns the value of attribute client_id.



90
91
92
# File 'lib/sunnyside/ledger/auth_report.rb', line 90

def client_id
  @client_id
end

#dobObject (readonly)

Returns the value of attribute dob.



90
91
92
# File 'lib/sunnyside/ledger/auth_report.rb', line 90

def dob
  @dob
end

#recipient_idObject (readonly)

Returns the value of attribute recipient_id.



90
91
92
# File 'lib/sunnyside/ledger/auth_report.rb', line 90

def recipient_id
  @recipient_id
end

#service_idObject (readonly)

Returns the value of attribute service_id.



90
91
92
# File 'lib/sunnyside/ledger/auth_report.rb', line 90

def service_id
  @service_id
end

Instance Method Details

#date_of_birthObject

Not parsing correctly.



98
99
100
# File 'lib/sunnyside/ledger/auth_report.rb', line 98

def date_of_birth
  Date.strptime(dob, '%m/%d/%Y')
end