/api/customers/K0002/speed-dials/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "SpeedDial-changed"
}, {
"name": "destination",
"value": "*999#999"
}, {
"name": "code",
"value": "99"
}]
}
Then I should receive HTTP/1.1 204 No Content /api/customers/K0002/speed-dials/100 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/speed-dials/100",
"links": [],
"data": [{
"name": "destination",
"value": "*999#999"
}, {
"name": "name",
"value": "SpeedDial-changed"
}, {
"name": "code",
"value": "99"
}, {
"name": "outwardDialOverwrite",
"value": false
}]
}
/api/customers/K0002/speed-dials/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": ""
}, {
"name": "destination",
"value": ""
}, {
"name": "code",
"value": ""
}]
}
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": "value is missing",
"path": "name",
"value": ""
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/speed-dials/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "invalid=name"
}]
}
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": "value has invalid characters",
"path": "name",
"value": "invalid=name"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/speed-dials/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "name",
"value": "very long, long, long, long, long, long, long, long name"
}]
}
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": "value has invalid length",
"path": "name",
"value": "very long, long, long, long, long, long, long, long name"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/speed-dials/100 application/json; charset=UTF-8
and following body:
{
"data": [{
"name": "destination",
"value": "(66) 1234-555"
}]
}
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": "must match \"^(\\*{0,2}\\d+)?(\\#\\d+)?\"",
"path": "destination",
"value": "(66) 1234-555"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/speed-dials/404 application/json; charset=UTF-8
and following body:
{}
Then I should receive HTTP/1.1 404 Not Found {
"detail": "Speed Dial with ID 404 has not been found",
"title": "Speed Dial not found",
"described_by": "http://api.nfon.net/probs/speed-dial-not-found"
}
/api/customers/K0404/speed-dials/100 application/json; charset=UTF-8
and following body:
{}
Then I should receive HTTP/1.1 404 Not Found {
"detail": "Customer with identifier K0404 has not been found",
"title": "Customer not found",
"described_by": "http://api.nfon.net/probs/customer-not-found"
}
/api/customers/K0002/speed-dials/100 application/json; charset=UTF-8
and following body:
{}
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/speed-dials/100 application/json; charset=UTF-8
and following body:
{}
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/speed-dials/100 application/json; charset=UTF-8
and following body:
{}
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"
}