/api/customers/K0002/targets/group-services/345/inbound-trunk-numbers
with application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "trunk",
"href": "/api/customers/K0002/trunks/0048.22.1111.0-9"
}],
"data": [{
"name": "didExtension",
"value": "5"
}]
}
Then I should receive HTTP/1.1 201 Created http://localhost:9998/api/customers/K0002/targets/group-services/345/inbound-trunk-numbers/0048.22.1111-5 /api/customers/K0002/targets/group-services/345/inbound-trunk-numbers
with application/json; charset=UTF-8
and following body:
{
"links": [{
"rel": "trunk",
"href": "/api/customers/K0002/trunks/0048.22.1111.0-9"
}],
"data": [{
"name": "didExtension",
"value": "404"
}]
}
Then I should receive HTTP/1.1 400 Bad Request with following body
{
"errors": [{
"message": "Invalid trunk or extension number"
}]
}
/api/customers/K0002/targets/group-services/404/inbound-trunk-numbers
with header application/json; charset=UTF-8 {
"links": [{
"rel": "trunk",
"href": "/api/customers/K0002/trunks/0048.22.1111.0-9"
}],
"data": [{
"name": "didExtension",
"value": "5"
}]
}
Then I should receive HTTP/1.1 404 Not Found with body including
{
"title": "Group not found",
"detail": "Group with serviceNumber 404 not found",
"described_by": "http://api.nfon.net/probs/group-not-found"
}
/api/customers/K0002/targets/group-services/5/inbound-trunk-numbers
with header application/json; charset=UTF-8 {
"data": [{
"name": "didExtension",
"value": "5"
}]
}
Then I should get HTTP/1.1 400 Bad Request with following body:
{
"errors": [{
"message": "Value must be provided",
"path": "trunk"
}]
}
/api/customers/K0002/targets/group-services/5/inbound-trunk-numbers
with header application/json; charset=UTF-8 {
"links": [{
"rel": "trunk",
"href": "/api/customers/K0003/trunks/0048.22.1111.0-9"
}],
"data": [{
"name": "didExtension",
"value": "5"
}]
}
Then I should receive HTTP/1.1 403 Forbidden{
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0002/targets/group-services/5/inbound-trunk-numbers
with header application/json; charset=UTF-8 {
"links": [{
"rel": "trunk",
"href": "/api/customers/K0003/trunks/0048.22.1111.0-9"
}],
"data": [{
"name": "didExtension",
"value": "5"
}]
}
Then I should receive HTTP/1.1 400 Bad Request{
"errors": [{
"message": "Invalid trunk or extension number"
}]
}
/api/customers/K0002/targets/group-services/5/inbound-trunk-numbers
with header application/json; charset=UTF-8 {
"links": [{
"rel": "trunk",
"href": "/api/customers/K0002/trunks/0048.22.1111.0-9"
}],
"data": [{
"name": "didExtension",
"value": "5"
}]
}
Then I should get HTTP/1.1 404 Not Found with following body:
{
"title": "Trunk not found",
"detail": "Trunk with number 0048.22.1111.0-9 has not been found",
"described_by": "http://api.nfon.net/probs/trunk-not-found"
}
/api/customers/K404/targets/group-services/345/inbound-trunk-numbers
with header application/json; charset=UTF-8 {
"links": [{
"rel": "trunk",
"href": "/api/customers/K0404/trunks/0048.22.1111.0-9"
}],
"data": [{
"name": "didExtension",
"value": "5"
}]
}
Then I should get HTTP/1.1 404 Not Found {
"title": "Customer not found",
"detail": "Customer with identifier K404 has not been found",
"described_by": "http://api.nfon.net/probs/customer-not-found"
}
/api/customers/K0002/targets/group-services/345/inbound-trunk-numbers
with header application/json; charset=UTF-8 {
"links": [{
"rel": "trunk",
"href": "/api/customers/K0002/trunks/0048.22.1111.0-9"
}],
"data": [{
"name": "didExtension",
"value": "5"
}]
}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0002]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0003/targets/group-services/345/inbound-trunk-numbers
with header application/json; charset=UTF-8 {
"links": [{
"rel": "trunk",
"href": "/api/customers/K0003/trunks/0048.22.1111.0-9"
}],
"data": [{
"name": "didExtension",
"value": "5"
}]
}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0003/targets/group-services/345/inbound-trunk-numbers
with header application/json; charset=UTF-8 {
"links": [{
"rel": "trunk",
"href": "/api/customers/K0003/trunks/0048.22.1111.0-9"
}],
"data": [{
"name": "didExtension",
"value": "5"
}]
}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}