Class: Itch::Purchases
- Inherits:
-
Object
- Object
- Itch::Purchases
- Includes:
- Request, RequireAuth, SimpleInspect
- Defined in:
- lib/itch/purchases.rb
Overview
Return purchase history and history by date
Instance Method Summary collapse
- #history ⇒ Object
- #history_by_month(month, year) ⇒ Object
- #history_by_year(year) ⇒ Object
-
#initialize(agent) ⇒ Purchases
constructor
A new instance of Purchases.
Methods included from Request
Methods included from SimpleInspect
#exclude_inspection, #inspect, #pretty_print_instance_variables
Methods included from RequireAuth
Constructor Details
#initialize(agent) ⇒ Purchases
Returns a new instance of Purchases.
15 16 17 |
# File 'lib/itch/purchases.rb', line 15 def initialize(agent) @agent = agent end |
Instance Method Details
#history ⇒ Object
27 28 29 |
# File 'lib/itch/purchases.rb', line 27 def history fetch_csv Itch::URL::PURCHASES_CSV end |
#history_by_month(month, year) ⇒ Object
19 20 21 |
# File 'lib/itch/purchases.rb', line 19 def history_by_month(month, year) fetch_csv format(Itch::URL::MONTH_PURCHASES_CSV, month: month, year: year) end |
#history_by_year(year) ⇒ Object
23 24 25 |
# File 'lib/itch/purchases.rb', line 23 def history_by_year(year) fetch_csv format(Itch::URL::YEAR_PURCHASES_CSV, year: year) end |