Module: BookingSync::API::Client::Periods
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/periods.rb
Instance Method Summary collapse
-
#create_period(season, options = {}) ⇒ BookingSync::API::Resource
Create a new period.
-
#delete_period(period) ⇒ NilClass
Delete a period.
-
#edit_period(period, options = {}) ⇒ BookingSync::API::Resource
Edit a period.
-
#periods(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List periods.
Instance Method Details
#create_period(season, options = {}) ⇒ BookingSync::API::Resource
Create a new period
27 28 29 |
# File 'lib/bookingsync/api/client/periods.rb', line 27 def create_period(season, = {}) post("seasons/#{season}/periods", periods: []).pop end |
#delete_period(period) ⇒ NilClass
Delete a period
50 51 52 |
# File 'lib/bookingsync/api/client/periods.rb', line 50 def delete_period(period) delete "periods/#{period}" end |
#edit_period(period, options = {}) ⇒ BookingSync::API::Resource
Edit a period
41 42 43 |
# File 'lib/bookingsync/api/client/periods.rb', line 41 def edit_period(period, = {}) put("periods/#{period}", periods: []).pop end |
#periods(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List periods
Returns periods for the account user is authenticated with.
17 18 19 |
# File 'lib/bookingsync/api/client/periods.rb', line 17 def periods( = {}, &block) paginate :periods, , &block end |