Class: Sunnyside::ClientData
- Inherits:
-
ParseInvoice
- Object
- ParseInvoice
- Sunnyside::ClientData
- Defined in:
- lib/sunnyside/ledger/auth_report.rb
Instance Attribute Summary collapse
-
#authorization ⇒ Object
readonly
Returns the value of attribute authorization.
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#dob ⇒ Object
readonly
Returns the value of attribute dob.
-
#recipient_id ⇒ Object
readonly
Returns the value of attribute recipient_id.
-
#service_id ⇒ Object
readonly
Returns the value of attribute service_id.
Attributes inherited from ParseInvoice
Instance Method Summary collapse
-
#date_of_birth ⇒ Object
Not parsing correctly.
-
#initialize(client) ⇒ ClientData
constructor
A new instance of ClientData.
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
#authorization ⇒ Object (readonly)
Returns the value of attribute authorization.
90 91 92 |
# File 'lib/sunnyside/ledger/auth_report.rb', line 90 def @authorization end |
#client_id ⇒ Object (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 |
#dob ⇒ Object (readonly)
Returns the value of attribute dob.
90 91 92 |
# File 'lib/sunnyside/ledger/auth_report.rb', line 90 def dob @dob end |
#recipient_id ⇒ Object (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_id ⇒ Object (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_birth ⇒ Object
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 |