/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}],
"data": [{
"name": "penalty",
"value": 9
}]
}
Then I should receive HTTP/1.1 201 Createdhttp://localhost:9998/api/customers/K0002/targets/queue-services/345/members/712
and body:
{
"href": "/api/customers/K0002/targets/queue-services/345/members/712"
}
/api/customers/K0002/targets/queue-services/345/members/712 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/targets/queue-services/345/members/712",
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}],
"data": [{
"name": "penalty",
"value": 9
}, {
"name": "displayName",
"value": "Extension #712"
}, {
"name": "extensionNumber",
"value": "712"
}]
}
/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 201 Created/api/customers/K0002/targets/queue-services/345/members/712 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/targets/queue-services/345/members/712",
"data": [{
"name": "penalty",
"value": 0
}]
}
/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "new name"
}],
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "A readonly field is being modified with different value.",
"path": "displayName",
"value": "new name"
}]
}
/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"data": [{
"name": "penalty",
"value": 13
}],
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "must be less than or equal to 9",
"path": "penalty",
"value": "13"
}]
}
/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "PhoneExtension is required",
"path": "phoneExtension",
"value": null
}]
}
/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"data": [{
"name": "displayName",
"value": "new display name"
}],
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "A readonly field is being modified with different value.",
"path": "displayName",
"value": "new display name"
}]
}
/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"data": [{
"name": "extensionNumber",
"value": "999"
}],
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "A readonly field is being modified with different value.",
"path": "extensionNumber",
"value": "999"
}]
}
/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 201 Created/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"title": "Queue member already exists",
"detail": "There is queue member for phone extension: /api/customers/K0002/targets/phone-extensions/712",
"described_by": "http://api.nfon.net/probs/queue-member-already-exists"
}
/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 201 Created{
"href": "/api/customers/K0002/targets/queue-services/345/members/712"
}
/api/customers/K0002/targets/queue-services/344/members application/json; charset=UTF-8{
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 400 Bad Request{
"detail": "Could not create or update resource due to constraint violations",
"title": "Validation error",
"errors": [{
"message": "Phone extension is already configured to use an outbound queue. Assigning a second outbound queue isn't possible.",
"path": "phoneExtension",
"value": {
"refId": 10,
"null": false,
"notNull": true,
"id": 10
}
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/skill-services/344/members application/json; charset=UTF-8{
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 201 Createdhttp://localhost:9998/api/customers/K0002/targets/skill-services/344/members/712
and body:
{
"href": "/api/customers/K0002/targets/skill-services/344/members/712",
"links": [],
"data": null
}
/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0002/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 400 Bad Request{
"detail": "Could not create or update resource due to constraint violations",
"title": "Validation error",
"errors": [{
"message": "Phone extension is already configured to use an outbound queue. Assigning a second outbound queue isn't possible.",
"path": "phoneExtension",
"value": {
"refId": 10,
"null": false,
"notNull": true,
"id": 10
}
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/queue-services/404/members application/json; charset=UTF-8{
"data": []
}
Then I should receive HTTP/1.1 404 Not Found {
"title": "Queue not found",
"detail": "Queue with serviceNumber 404 not found",
"described_by": "http://api.nfon.net/probs/queue-not-found"
}
/api/customers/K404/targets/queue-services/345/members application/json; charset=UTF-8{
"data": []
}
Then I should receive 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/queue-services/345/members application/json; charset=UTF-8{
"links": [{
"rel": "phoneExtension",
"href": "/api/customers/K0003/targets/phone-extensions/712"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"title": "Customers do not match",
"detail": "Customers do not match",
"described_by": "http://api.nfon.net/probs/queue-member-customer-do-not-match"
}
/api/customers/K0002/targets/queue-services/345/members application/json; charset=UTF-8{
"data": []
}
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/queue-services/345/members application/json; charset=UTF-8{
"data": []
}
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/queue-services/345/members application/json; charset=UTF-8{
"data": []
}
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"
}