Class: Ovchipkaart::Api
- Inherits:
-
Object
- Object
- Ovchipkaart::Api
- Defined in:
- lib/ovchipkaart/api.rb
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Instance Method Summary collapse
- #additions ⇒ Object
- #balance ⇒ Object
- #checkins ⇒ Object
- #forgotten_checkouts ⇒ Object
-
#initialize ⇒ Api
constructor
A new instance of Api.
- #journeys ⇒ Object
- #last_updated ⇒ Object
- #products ⇒ Object
- #unclassified ⇒ Object
Constructor Details
#initialize ⇒ Api
Returns a new instance of Api.
6 7 8 |
# File 'lib/ovchipkaart/api.rb', line 6 def initialize @parser = parse_transactions end |
Instance Attribute Details
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
4 5 6 |
# File 'lib/ovchipkaart/api.rb', line 4 def parser @parser end |
Instance Method Details
#additions ⇒ Object
30 31 32 |
# File 'lib/ovchipkaart/api.rb', line 30 def additions parser.additions end |
#balance ⇒ Object
10 11 12 |
# File 'lib/ovchipkaart/api.rb', line 10 def balance balance_and_date[:balance] end |
#checkins ⇒ Object
22 23 24 |
# File 'lib/ovchipkaart/api.rb', line 22 def checkins parser.check_ins end |
#forgotten_checkouts ⇒ Object
26 27 28 |
# File 'lib/ovchipkaart/api.rb', line 26 def forgotten_checkouts parser.forgotten_check_outs end |
#journeys ⇒ Object
18 19 20 |
# File 'lib/ovchipkaart/api.rb', line 18 def journeys parser.journeys end |
#last_updated ⇒ Object
14 15 16 |
# File 'lib/ovchipkaart/api.rb', line 14 def last_updated balance_and_date[:date] end |
#products ⇒ Object
34 35 36 |
# File 'lib/ovchipkaart/api.rb', line 34 def products parser.products end |
#unclassified ⇒ Object
38 39 40 |
# File 'lib/ovchipkaart/api.rb', line 38 def unclassified parser.others end |