Class: RatingChgkV2::Models::VenueModel

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/rating_chgk_v2/models/venue_model.rb

Instance Attribute Summary

Attributes inherited from BaseModel

#endpoint

Instance Method Summary collapse

Methods inherited from BaseModel

inherited, #initialize, load

Constructor Details

This class inherits a constructor from RatingChgkV2::Models::BaseModel

Instance Method Details

#destroyObject



11
12
13
# File 'lib/rating_chgk_v2/models/venue_model.rb', line 11

def destroy
  endpoint.do_delete
end

#requests(params = {}) ⇒ Object



15
16
17
18
# File 'lib/rating_chgk_v2/models/venue_model.rb', line 15

def requests(params = {})
  endpoint.reinitialize new_params: params, add_query: :requests
  RatingChgkV2::Collections::TournamentRequestsCollection.load :do_get, endpoint
end

#update(params = {}) ⇒ Object



6
7
8
9
# File 'lib/rating_chgk_v2/models/venue_model.rb', line 6

def update(params = {})
  endpoint.reinitialize new_params: params
  self.class.load :do_put, endpoint
end