-
Notifications
You must be signed in to change notification settings - Fork 1
Countries
Ilya Krukowski edited this page Apr 10, 2022
·
3 revisions
Countries endpoint, supports pagination.
Providing pagination data or search params is optional:
countries = client.countries itemsPerPage: 2, name: 'Бе'
countries.first.name # => "Беларусь'
Provide country ID:
country = client.country 20
country.name # => Нидерланды
country = client.create_country name: 'Тестовая страна'
country.name # => 'Тестовая страна'
Provide country ID and its data:
country = client.update_country 20, name: 'Лирия'
country.name # => 'Лирия'
Alternatively:
country = client.country 20
country.update name: 'Обновлённая страна'
Provide country ID:
client.delete_country 1
Please note that the response has status code 204 and does not contain any data.
Alternatively:
country = client.country 20
country.destroy