Module: RatingChgkV2::Rest::Countries
- Included in:
- RatingChgkV2::Rest
- Defined in:
- lib/rating_chgk_v2/rest/countries.rb
Instance Method Summary collapse
- #countries(params = {}) ⇒ Object
- #country(id) ⇒ Object
- #create_country(params) ⇒ Object
- #delete_country(id) ⇒ Object
- #update_country(id, params) ⇒ Object
Instance Method Details
#countries(params = {}) ⇒ Object
6 7 8 |
# File 'lib/rating_chgk_v2/rest/countries.rb', line 6 def countries(params = {}) collection_load name: 'Countries', ep_params: [[], params] end |
#country(id) ⇒ Object
10 11 12 |
# File 'lib/rating_chgk_v2/rest/countries.rb', line 10 def country(id) model_load name: 'Country', ep_name: 'Countries', ep_params: id end |
#create_country(params) ⇒ Object
14 15 16 |
# File 'lib/rating_chgk_v2/rest/countries.rb', line 14 def create_country(params) model_load name: 'Country', ep_name: 'Countries', ep_params: [[], params], method: :do_post end |
#delete_country(id) ⇒ Object
22 23 24 |
# File 'lib/rating_chgk_v2/rest/countries.rb', line 22 def delete_country(id) endpoint('Countries', id).do_delete end |
#update_country(id, params) ⇒ Object
18 19 20 |
# File 'lib/rating_chgk_v2/rest/countries.rb', line 18 def update_country(id, params) model_load name: 'Country', ep_name: 'Countries', ep_params: [id, params], method: :do_patch end |