Module: Vindi::Rest::Period
- Included in:
- Vindi::Rest
- Defined in:
- lib/vindi/rest/period.rb
Overview
Methods for the periods API
Instance Method Summary collapse
-
#create_period_bill(period_id, options = {}) ⇒ Hash
Create a period for a merchant vindi.
-
#list_period_usages(period_id, options = {}) ⇒ Array<Hash>
List period usages.
-
#list_periods(options = {}) ⇒ Array<Hash>
List periods for the authenticate user.
-
#period(period_id, options = {}) ⇒ Hash
Get a single period from a merchant.
-
#update_period(period_id, options = {}) ⇒ Object
Edit a period.
Instance Method Details
#create_period_bill(period_id, options = {}) ⇒ Hash
Create a period for a merchant vindi
36 37 38 |
# File 'lib/vindi/rest/period.rb', line 36 def create_period_bill(period_id, = {}) post("periods/#{period_id}/bill", ) end |
#list_period_usages(period_id, options = {}) ⇒ Array<Hash>
List period usages
59 60 61 |
# File 'lib/vindi/rest/period.rb', line 59 def list_period_usages(period_id, = {}) get("periods/#{period_id}/usages", )[:usages] end |
#list_periods(options = {}) ⇒ Array<Hash>
List periods for the authenticate user
13 14 15 |
# File 'lib/vindi/rest/period.rb', line 13 def list_periods( = {}) get('periods', )[:periods] end |
#period(period_id, options = {}) ⇒ Hash
Get a single period from a merchant
24 25 26 |
# File 'lib/vindi/rest/period.rb', line 24 def period(period_id, = {}) get("periods/#{period_id}", )[:period] end |
#update_period(period_id, options = {}) ⇒ Object
Edit a period
47 48 49 |
# File 'lib/vindi/rest/period.rb', line 47 def update_period(period_id, = {}) put("periods/#{period_id}", )[:period] end |