/api/customers/K0002/dids/0048.22.123456-0/destination application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "destination",
"href": "/api/customers/K0002/targets/queue-services/345"
}]
}
Then I should receive HTTP/1.1 204 No Content /api/customers/K0002/dids/0048.22.123456-0/destination HTTP/1.1 200 OK {
"links": [{
"rel": "destination",
"href": "/api/customers/K0002/targets/queue-services/345"
}]
}
/api/customers/K0002/targets/queue-services/345/inbound-trunk-numbers/0048.22.123456-0 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/targets/queue-services/345/inbound-trunk-numbers/0048.22.123456-0",
"links": [{
"rel": "trunk",
"href": "/api/customers/K0002/trunks/0048.22.123456.0-1"
}],
"data": [{
"name": "didExtension",
"value": "0"
}]
}
/api/customers/K0002/dids/0048.22.123456-0/destination application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "destination",
"href": null
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "destination is required",
"path": "destination",
"value": null
}]
}
/api/customers/K0002/dids/0048.22.123456-0/destination application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "destination",
"href": "/api/customers/K0002/targets/NO_ACTION"
}]
}
Then I should receive HTTP/1.1 204 No Content /api/customers/K0002/dids/0048.22.123456-0/destination application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "destination",
"href": "/api/customers/K0002/targets/NO_ACTION"
}]
}
Then I should receive HTTP/1.1 204 No Content /api/customers/K0002/dids/0048.22.123456-0/destination application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "destination",
"href": "/api/customers/K0002/targets/BUSY"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Destination [BUSY] is not allowed",
"path": "destination",
"value": "/api/customers/K0002/targets/BUSY"
}]
}
/api/customers/K0002/dids/0048.22.123456-0/destination application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "destination",
"href": "/api/customers/K0002/targets/phone-extensions/777"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"detail": "Cannot modify destination of DID that has Lync Option attached",
"described_by": "http://api.nfon.net/probs/did-has-lync-option"
}
/api/customers/K0002/dids/0048.22.123456-0/destination application/json; charset=UTF-8
and body:
{
"links": [{
"rel": "destination",
"href": "/api/customers/K0003/targets/queue-services/345"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Destination with ID 200 does not belong to Customer K0002",
"path": "destination",
"value": "/api/customers/K0003/targets/queue-services/345"
}]
}