Module: Phones
- Included in:
- DashboardAPI
- Defined in:
- lib/phones.rb
Overview
Phones section of the Meraki Dashboard API
Instance Method Summary collapse
-
#add_phone_contact(network_id, options) ⇒ Hash
Add a single phone contact.
-
#delete_phone_contact(network_id, contact_id) ⇒ Integer
Delete a single phone contact.
-
#list_phone_contacts(network_id) ⇒ Array
Get list of phone contacts.
-
#update_phone_contact(network_id, contact_id, options) ⇒ Hash
Update a single phone contact.
Instance Method Details
#add_phone_contact(network_id, options) ⇒ Hash
Add a single phone contact
16 17 18 19 20 |
# File 'lib/phones.rb', line 16 def add_phone_contact(network_id, ) raise 'Options were not passed as a Hash' if !.is_a?(Hash) self.make_api_call("/networks/#{network_id}/phoneContacts", 'POST', ) end |
#delete_phone_contact(network_id, contact_id) ⇒ Integer
Delete a single phone contact
37 38 39 |
# File 'lib/phones.rb', line 37 def delete_phone_contact(network_id, contact_id) self.make_api_call("/networks/#{network_id}/phoneContacts/#{contact_id}", 'DELETE') end |
#list_phone_contacts(network_id) ⇒ Array
Get list of phone contacts
8 9 10 |
# File 'lib/phones.rb', line 8 def list_phone_contacts(network_id) self.make_api_call("/networks/#{network_id}/phoneContacts", 'GET') end |
#update_phone_contact(network_id, contact_id, options) ⇒ Hash
Update a single phone contact
27 28 29 30 31 |
# File 'lib/phones.rb', line 27 def update_phone_contact(network_id, contact_id, ) raise 'Options were not passed as a Hash' if !.is_a?(Hash) self.make_api_call("/networks/#{network_id}/phoneContacts/#{contact_id}", 'PUT', ) end |