Module: NgpVan::Client::Events
- Included in:
- NgpVan::Client
- Defined in:
- lib/ngp_van/client/events.rb
Instance Method Summary collapse
- #create_event(body: {}) ⇒ Object
- #create_event_shift(id:, body: {}) ⇒ Object
- #delete_event(id:) ⇒ Object
- #event(id:, params: {}) ⇒ Object
- #events(params: {}) ⇒ Object
- #update_event(id:, body: {}) ⇒ Object
Instance Method Details
#create_event(body: {}) ⇒ Object
6 7 8 |
# File 'lib/ngp_van/client/events.rb', line 6 def create_event(body: {}) post(path: 'events', body: body) end |
#create_event_shift(id:, body: {}) ⇒ Object
10 11 12 13 |
# File 'lib/ngp_van/client/events.rb', line 10 def create_event_shift(id:, body: {}) verify_id(id) post(path: "events/#{id}/shifts", body: body) end |
#delete_event(id:) ⇒ Object
29 30 31 32 |
# File 'lib/ngp_van/client/events.rb', line 29 def delete_event(id:) verify_id(id) delete(path: "events/#{id}") end |
#event(id:, params: {}) ⇒ Object
15 16 17 18 |
# File 'lib/ngp_van/client/events.rb', line 15 def event(id:, params: {}) verify_id(id) get(path: "events/#{id}", params: params) end |
#events(params: {}) ⇒ Object
20 21 22 |
# File 'lib/ngp_van/client/events.rb', line 20 def events(params: {}) get(path: 'events', params: params) end |
#update_event(id:, body: {}) ⇒ Object
24 25 26 27 |
# File 'lib/ngp_van/client/events.rb', line 24 def update_event(id:, body: {}) verify_id(id) put(path: "events/#{id}", body: body) end |