Api >

Service Portal REST API

Change Customer options as Admin
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Another%20Rating%20Profile"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/Europe.Berlin"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "THREE_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 2
  }, {
    "name": "deviceCreationPassword",
    "value": "p@55123W0r))"
  }, {
    "name": "evnMode",
    "value": "FULL"
  }, {
    "name": "projectNumberLength",
    "value": 4
  }, {
    "name": "contractType",
    "value": "vollVersion"
  }, {
    "name": "ctiBillingMode",
    "value": "OFF"
  }, {
    "name": "clickToDialState",
    "value": "ON"
  }, {
    "name": "nmeeting",
    "value": "UNITS"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 6
  }, {
    "name": "vmPasswordLengthMax",
    "value": 10
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": false
  }, {
    "name": "portLock",
    "value": false
  }, {
    "name": "intercomEnabled",
    "value": false
  }, {
    "name": "betaTester",
    "value": false
  }, {
    "name": "betaDeviceTester",
    "value": false
  }, {
    "name": "aastra31NewLayout",
    "value": false
  }, {
    "name": "sipCustomPort",
    "value": false
  }, {
    "name": "ccbs",
    "value": false
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": false
  }, {
    "name": "blockedOutbound",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": true
  }, {
    "name": "language",
    "value": "de"
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Another%20Rating%20Profile"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/Europe.Berlin"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "THREE_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 2
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "FULL"
  }, {
    "name": "projectNumberLength",
    "value": 4
  }, {
    "name": "contractType",
    "value": "vollVersion"
  }, {
    "name": "ctiBillingMode",
    "value": "OFF"
  }, {
    "name": "clickToDialState",
    "value": "ON"
  }, {
    "name": "nmeeting",
    "value": "UNITS"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 6
  }, {
    "name": "vmPasswordLengthMax",
    "value": 10
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": false
  }, {
    "name": "portLock",
    "value": false
  }, {
    "name": "intercomEnabled",
    "value": false
  }, {
    "name": "betaTester",
    "value": false
  }, {
    "name": "betaDeviceTester",
    "value": false
  }, {
    "name": "aastra31NewLayout",
    "value": false
  }, {
    "name": "sipCustomPort",
    "value": false
  }, {
    "name": "ccbs",
    "value": false
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": false
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": false
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": false
  }, {
    "name": "trialPeriod",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": null
  }, {
    "name": "ratingProfileName",
    "value": "Another Rating Profile"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": true
  }, {
    "name": "language",
    "value": "de"
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }]
}
Change Customer options as Operator
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Operator C0002
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "links": [{
    "rel": "timezone",
    "href": "/api/time-zones/Europe.Berlin"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "THREE_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 2
  }, {
    "name": "deviceCreationPassword",
    "value": "p@55123W0r))"
  }, {
    "name": "evnMode",
    "value": "FULL"
  }, {
    "name": "projectNumberLength",
    "value": 4
  }, {
    "name": "ctiBillingMode",
    "value": "OFF"
  }, {
    "name": "clickToDialState",
    "value": "ON"
  }, {
    "name": "nmeeting",
    "value": "UNITS"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 6
  }, {
    "name": "vmPasswordLengthMax",
    "value": 10
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": false
  }, {
    "name": "portLock",
    "value": false
  }, {
    "name": "intercomEnabled",
    "value": false
  }, {
    "name": "aastra31NewLayout",
    "value": false
  }, {
    "name": "sipCustomPort",
    "value": false
  }, {
    "name": "ccbs",
    "value": false
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": false
  }, {
    "name": "blockedOutbound",
    "value": false
  }, {
    "name": "language",
    "value": "de"
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile%201"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/Europe.Berlin"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "THREE_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 2
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "FULL"
  }, {
    "name": "projectNumberLength",
    "value": 4
  }, {
    "name": "contractType",
    "value": "nconnect"
  }, {
    "name": "ctiBillingMode",
    "value": "OFF"
  }, {
    "name": "clickToDialState",
    "value": "ON"
  }, {
    "name": "nmeeting",
    "value": "UNITS"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 6
  }, {
    "name": "vmPasswordLengthMax",
    "value": 10
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": false
  }, {
    "name": "portLock",
    "value": false
  }, {
    "name": "intercomEnabled",
    "value": false
  }, {
    "name": "betaTester",
    "value": true
  }, {
    "name": "betaDeviceTester",
    "value": true
  }, {
    "name": "aastra31NewLayout",
    "value": false
  }, {
    "name": "sipCustomPort",
    "value": false
  }, {
    "name": "ccbs",
    "value": false
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": false
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": false
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": false
  }, {
    "name": "trialPeriod",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": null
  }, {
    "name": "ratingProfileName",
    "value": "Rating Profile 1"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": false
  }, {
    "name": "language",
    "value": "de"
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }]
}
Change Customer options as System Integrator
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "countOfTrunks",
    "value": "THREE_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 2
  }, {
    "name": "deviceCreationPassword",
    "value": "p@55123W0r))"
  }, {
    "name": "evnMode",
    "value": "FULL"
  }, {
    "name": "projectNumberLength",
    "value": 4
  }, {
    "name": "ctiBillingMode",
    "value": "OFF"
  }, {
    "name": "clickToDialState",
    "value": "ON"
  }, {
    "name": "nmeeting",
    "value": "UNITS"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 6
  }, {
    "name": "vmPasswordLengthMax",
    "value": 10
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": false
  }, {
    "name": "portLock",
    "value": false
  }, {
    "name": "intercomEnabled",
    "value": false
  }, {
    "name": "sipCustomPort",
    "value": false
  }, {
    "name": "ccbs",
    "value": false
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": false
  }, {
    "name": "language",
    "value": "de"
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile%201"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/UTC"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "THREE_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 2
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "FULL"
  }, {
    "name": "projectNumberLength",
    "value": 4
  }, {
    "name": "contractType",
    "value": "nconnect"
  }, {
    "name": "ctiBillingMode",
    "value": "OFF"
  }, {
    "name": "clickToDialState",
    "value": "ON"
  }, {
    "name": "nmeeting",
    "value": "UNITS"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 6
  }, {
    "name": "vmPasswordLengthMax",
    "value": 10
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": false
  }, {
    "name": "portLock",
    "value": false
  }, {
    "name": "intercomEnabled",
    "value": false
  }, {
    "name": "betaTester",
    "value": true
  }, {
    "name": "betaDeviceTester",
    "value": true
  }, {
    "name": "aastra31NewLayout",
    "value": true
  }, {
    "name": "sipCustomPort",
    "value": false
  }, {
    "name": "ccbs",
    "value": false
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": false
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": false
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": null
  }, {
    "name": "ratingProfileName",
    "value": "Rating Profile 1"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": false
  }, {
    "name": "language",
    "value": "de"
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }]
}
Change Customer options as Customer
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Customer K0002
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "links": [{
    "rel": "timezone",
    "href": "/api/time-zones/Europe.Berlin"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "THREE_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 2
  }, {
    "name": "deviceCreationPassword",
    "value": "p@55123W0r))"
  }, {
    "name": "evnMode",
    "value": "FULL"
  }, {
    "name": "projectNumberLength",
    "value": 4
  }, {
    "name": "clickToDialState",
    "value": "ON"
  }, {
    "name": "nmeeting",
    "value": "UNITS"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 6
  }, {
    "name": "vmPasswordLengthMax",
    "value": 10
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": false
  }, {
    "name": "portLock",
    "value": false
  }, {
    "name": "intercomEnabled",
    "value": false
  }, {
    "name": "ccbs",
    "value": false
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": false
  }, {
    "name": "language",
    "value": "de"
  }, {
    "name": "voicemailNotificationMode",
    "value": "OFF"
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile%201"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/Europe.Berlin"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "THREE_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 2
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "FULL"
  }, {
    "name": "projectNumberLength",
    "value": 4
  }, {
    "name": "contractType",
    "value": "nconnect"
  }, {
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }, {
    "name": "clickToDialState",
    "value": "ON"
  }, {
    "name": "nmeeting",
    "value": "UNITS"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 6
  }, {
    "name": "vmPasswordLengthMax",
    "value": 10
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": false
  }, {
    "name": "portLock",
    "value": false
  }, {
    "name": "intercomEnabled",
    "value": false
  }, {
    "name": "betaTester",
    "value": true
  }, {
    "name": "betaDeviceTester",
    "value": true
  }, {
    "name": "aastra31NewLayout",
    "value": true
  }, {
    "name": "sipCustomPort",
    "value": true
  }, {
    "name": "ccbs",
    "value": false
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": false
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": false
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": true
  }, {
    "name": "trialPeriod",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": null
  }, {
    "name": "ratingProfileName",
    "value": "Rating Profile 1"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": false
  }, {
    "name": "language",
    "value": "de"
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }, {
    "name": "voicemailNotificationMode",
    "value": "OFF"
  }]
}
Cannot Change some Customer options as Operator
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Operator C0002
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "betaTester",
    "value": false
  }, {
    "name": "betaDeviceTester",
    "value": false
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "detail": "Could not create or update resource due to constraint violations",
  "title": "Validation error",
  "errors": [{
    "message": "Cannot update field with current privileges",
    "path": "betaTester",
    "value": "false"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "betaDeviceTester",
    "value": "false"
  }],
  "described_by": "http://api.nfon.net/probs/validation-error"
}
Cannot Change some Customer options as System Integrator
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Another%20Rating%20Profile"
  }],
  "data": [{
    "name": "betaTester",
    "value": false
  }, {
    "name": "betaDeviceTester",
    "value": false
  }, {
    "name": "contractType",
    "value": "vollVersion"
  }, {
    "name": "aastra31NewLayout",
    "value": false
  }, {
    "name": "blockedOutbound",
    "value": false
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Cannot update field with current privileges",
    "path": "betaTester"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "betaDeviceTester"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "ratingProfile"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "contractType"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "aastra31NewLayout"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "blockedOutbound"
  }]
}
Cannot Change some Customer options as Customer
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Customer K0002
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Another%20Rating%20Profile"
  }],
  "data": [{
    "name": "betaTester",
    "value": false
  }, {
    "name": "betaDeviceTester",
    "value": false
  }, {
    "name": "contractType",
    "value": "vollVersion"
  }, {
    "name": "aastra31NewLayout",
    "value": false
  }, {
    "name": "blockedOutbound",
    "value": false
  }, {
    "name": "sipCustomPort",
    "value": false
  }, {
    "name": "ctiBillingMode",
    "value": "OFF"
  }, {
    "name": "voicemailNotificationMode",
    "value": "BOOM"
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Cannot update field with current privileges",
    "path": "betaTester"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "betaDeviceTester"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "ratingProfile"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "contractType"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "aastra31NewLayout"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "blockedOutbound"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "sipCustomPort"
  }, {
    "message": "Cannot update field with current privileges",
    "path": "ctiBillingMode"
  }, {
    "message": "Value is invalid. must be one of: OFF,FULL",
    "path": "voicemailNotificationMode",
    "value": "BOOM"
  }]
}
Cannot Change some Customer options for blocked Customer
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Customer K0002
and it has:
  • blockedAt set to 2014-01-01T12:00:00+0100
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Another%20Rating%20Profile"
  }],
  "data": [{
    "name": "betaTester",
    "value": false
  }, {
    "name": "betaDeviceTester",
    "value": false
  }, {
    "name": "contractType",
    "value": "vollVersion"
  }, {
    "name": "aastra31NewLayout",
    "value": false
  }, {
    "name": "blockedOutbound",
    "value": false
  }, {
    "name": "sipCustomPort",
    "value": false
  }, {
    "name": "ctiBillingMode",
    "value": "OFF"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Customer 'K0002' is blocked. This operation is not allowed",
  "title": "Customer is blocked",
  "described_by": "http://api.nfon.net/probs/customer-is-blocked"
}
Cannot change Customer options with invalid enum values
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "countOfTrunks",
    "value": "INVALID"
  }, {
    "name": "evnMode",
    "value": "INVALID"
  }, {
    "name": "contractType",
    "value": "INVALID"
  }, {
    "name": "ctiBillingMode",
    "value": "INVALID"
  }, {
    "name": "clickToDialState",
    "value": "INVALID"
  }, {
    "name": "nmeeting",
    "value": "INVALID"
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "detail": "Could not create or update resource due to constraint violations",
  "title": "Validation error",
  "errors": [{
    "message": "Unknown enum value. Allowed values: [ONE_DIGIT, TWO_DIGIT, THREE_DIGIT, FOUR_DIGIT]",
    "path": "countOfTrunks",
    "value": "INVALID"
  }, {
    "message": "Value cannot be null",
    "path": "countOfTrunks",
    "value": null
  }, {
    "message": "Unknown enum value. Allowed values: [NEVER, SHORTEN, FULL]",
    "path": "evnMode",
    "value": "INVALID"
  }, {
    "message": "Value cannot be null",
    "path": "evnMode",
    "value": null
  }, {
    "message": "Unknown enum value. Allowed values: [nvoice, nbasic, ncomplete, nlight, nconnect, globalapp, vollVersion, nhospitalityBasic, nhospitalityStandard, nhospitalityPro, nfonBusiness, business_standard, business_premium, siptrunk, nconnect_voice, centrexx30, centrexx30_premium, CloudPBX2025]",
    "path": "contractType",
    "value": "INVALID"
  }, {
    "message": "Value cannot be null",
    "path": "contractType",
    "value": null
  }, {
    "message": "Unknown enum value. Allowed values: [ON, OFF, TRIAL]",
    "path": "ctiBillingMode",
    "value": "INVALID"
  }, {
    "message": "Value cannot be null",
    "path": "ctiBillingMode",
    "value": null
  }, {
    "message": "Unknown enum value. Allowed values: [OFF, ON_FIXED_NUMBER, ON, DEFAULT, UNKNOWN]",
    "path": "clickToDialState",
    "value": "INVALID"
  }, {
    "message": "Value cannot be null",
    "path": "clickToDialState",
    "value": null
  }, {
    "message": "Unknown enum value. Allowed values: [DEACTIVATED, UNITS, FLATRATE, FLATRATE_UNITS]",
    "path": "nmeeting",
    "value": "INVALID"
  }, {
    "message": "Value cannot be null",
    "path": "nmeeting",
    "value": null
  }],
  "described_by": "http://api.nfon.net/probs/validation-error"
}
Cannot change Customer options with null properties
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "links": [{
    "rel": "ratingProfile",
    "href": null
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": null
  }, {
    "name": "speedDialLength",
    "value": null
  }, {
    "name": "deviceCreationPassword",
    "value": null
  }, {
    "name": "evnMode",
    "value": null
  }, {
    "name": "projectNumberLength",
    "value": null
  }, {
    "name": "contractType",
    "value": null
  }, {
    "name": "ctiBillingMode",
    "value": null
  }, {
    "name": "clickToDialState",
    "value": null
  }, {
    "name": "nmeeting",
    "value": null
  }, {
    "name": "lockDeviceWebserver",
    "value": null
  }, {
    "name": "portLock",
    "value": null
  }, {
    "name": "intercomEnabled",
    "value": null
  }, {
    "name": "betaTester",
    "value": null
  }, {
    "name": "betaDeviceTester",
    "value": null
  }, {
    "name": "aastra31NewLayout",
    "value": null
  }, {
    "name": "sipCustomPort",
    "value": null
  }, {
    "name": "ccbs",
    "value": null
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": null
  }, {
    "name": "vlanProvisioning",
    "value": null
  }, {
    "name": "blockedOutbound",
    "value": null
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Value cannot be null",
    "path": "countOfTrunks",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "speedDialLength",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "deviceCreationPassword",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "evnMode",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "projectNumberLength",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "contractType",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "ctiBillingMode",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "clickToDialState",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "nmeeting",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "lockDeviceWebserver",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "portLock",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "intercomEnabled",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "betaTester",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "betaDeviceTester",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "aastra31NewLayout",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "sipCustomPort",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "ccbs",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "mediaGatewayEmergencyDialplanEnabled",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "vlanProvisioning",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "blockedOutbound",
    "value": null
  }, {
    "message": "Value cannot be null",
    "path": "ratingProfile",
    "value": null
  }]
}
Speed dial length must be between 0 and 4
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "speedDialLength",
    "value": -1
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Value must be between 0 and 4",
    "path": "speedDialLength",
    "value": -1
  }]
}
Project number length must be between 0 and 6
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "projectNumberLength",
    "value": 7
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Value must be between 0 and 6",
    "path": "projectNumberLength",
    "value": 7
  }]
}
Password Length Max must be between 4 and 32
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "vmPasswordLengthMax",
    "value": 3
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Value must be between 4 and 32",
    "path": "vmPasswordLengthMax",
    "value": 3
  }]
}
Password Length Min must be between 4 and 32
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "vmPasswordLengthMin",
    "value": 33
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Value must be between 4 and 32",
    "path": "vmPasswordLengthMin",
    "value": 33
  }]
}
Password Length Min and Max can be set to null
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "vmPasswordLengthMax",
    "value": null
  }, {
    "name": "vmPasswordLengthMin",
    "value": null
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as Customer K0002
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
and body with following fields:
{
  "data": [{
    "name": "vmPasswordLengthMin",
    "value": null
  }, {
    "name": "vmPasswordLengthMax",
    "value": null
  }]
}
Password Length Min must lower then Max
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "vmPasswordLengthMin",
    "value": 31
  }, {
    "name": "vmPasswordLengthMax",
    "value": 12
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Password minimum length has to be less than maximum",
    "path": "vmPasswordLengthMin",
    "value": 31
  }, {
    "message": "Password minimum length has to be less than maximum",
    "path": "vmPasswordLengthMax",
    "value": 12
  }]
}
Device Creation Password must have at least 8 characters
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "deviceCreationPassword",
    "value": "wrong"
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Password must be at least 8 characters long",
    "path": "deviceCreationPassword",
    "value": "wrong"
  }]
}
Device Creation Password must contain lowercase, uppercase, number and special character
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "deviceCreationPassword",
    "value": "stillwronggg"
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Password must contain lowercase, uppercase, number and special character",
    "path": "deviceCreationPassword",
    "value": "stillwronggg"
  }]
}
Device Creation Password cannot contain invalid characters
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "deviceCreationPassword",
    "value": "sT!1wron|{{{"
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Only letters (without special characters and umlauts), numbers and the characters \\!#$%()*+,-./;<@'_\" are allowed.",
    "path": "deviceCreationPassword",
    "value": "sT!1wron|{{{"
  }]
}
Rating profile must belong to the same Operator as Customer
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0003/rating-profiles/Rating%20Profile%202"
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Rating Profile [Rating Profile 2] does not belong to Operator [C0002]",
    "path": "ratingProfile",
    "value": "/api/operators/C0003/rating-profiles/Rating%20Profile%202"
  }]
}
Changing cti billing mode to TRIAL while cti period end is still ongoing will update the trial period end date to todays date + 1 month
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile%201"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/UTC"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "TWO_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 3
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "SHORTEN"
  }, {
    "name": "projectNumberLength",
    "value": 5
  }, {
    "name": "contractType",
    "value": "nconnect"
  }, {
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }, {
    "name": "clickToDialState",
    "value": "ON_FIXED_NUMBER"
  }, {
    "name": "nmeeting",
    "value": "FLATRATE"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 22
  }, {
    "name": "vmPasswordLengthMax",
    "value": 31
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": true
  }, {
    "name": "portLock",
    "value": true
  }, {
    "name": "intercomEnabled",
    "value": true
  }, {
    "name": "betaTester",
    "value": true
  }, {
    "name": "betaDeviceTester",
    "value": true
  }, {
    "name": "aastra31NewLayout",
    "value": true
  }, {
    "name": "sipCustomPort",
    "value": true
  }, {
    "name": "ccbs",
    "value": true
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": true
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": true
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": true
  }, {
    "name": "trialPeriod",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": null
  }, {
    "name": "ratingProfileName",
    "value": "Rating Profile 1"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": false
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }]
}
Changing cti billing mode to TRIAL while cti period end is still ongoing will not change the trial period end date
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Operator C0002
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile%201"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/UTC"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/UTC"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "TWO_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 3
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "SHORTEN"
  }, {
    "name": "projectNumberLength",
    "value": 5
  }, {
    "name": "contractType",
    "value": "nconnect"
  }, {
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }, {
    "name": "clickToDialState",
    "value": "ON_FIXED_NUMBER"
  }, {
    "name": "nmeeting",
    "value": "FLATRATE"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 22
  }, {
    "name": "vmPasswordLengthMax",
    "value": 31
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": true
  }, {
    "name": "portLock",
    "value": true
  }, {
    "name": "intercomEnabled",
    "value": true
  }, {
    "name": "betaTester",
    "value": true
  }, {
    "name": "betaDeviceTester",
    "value": true
  }, {
    "name": "aastra31NewLayout",
    "value": true
  }, {
    "name": "sipCustomPort",
    "value": true
  }, {
    "name": "ccbs",
    "value": true
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": true
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": true
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": true
  }, {
    "name": "trialPeriod",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": null
  }, {
    "name": "ratingProfileName",
    "value": "Rating Profile 1"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": false
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }]
}
Changing cti billing mode to TRIAL while cti period end is still ongoing will not change the trial period end date
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as System Integrator S0002
and there is a customer K0002
with:
  • trialPeriodEnd set to 2099,6,14
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile%201"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/UTC"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "TWO_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 3
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "SHORTEN"
  }, {
    "name": "projectNumberLength",
    "value": 5
  }, {
    "name": "contractType",
    "value": "nconnect"
  }, {
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }, {
    "name": "clickToDialState",
    "value": "ON_FIXED_NUMBER"
  }, {
    "name": "nmeeting",
    "value": "FLATRATE"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 22
  }, {
    "name": "vmPasswordLengthMax",
    "value": 31
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": true
  }, {
    "name": "portLock",
    "value": true
  }, {
    "name": "intercomEnabled",
    "value": true
  }, {
    "name": "betaTester",
    "value": true
  }, {
    "name": "betaDeviceTester",
    "value": true
  }, {
    "name": "aastra31NewLayout",
    "value": true
  }, {
    "name": "sipCustomPort",
    "value": true
  }, {
    "name": "ccbs",
    "value": true
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": true
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": true
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": true
  }, {
    "name": "trialPeriod",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": null
  }, {
    "name": "ratingProfileName",
    "value": "Rating Profile 1"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": false
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }]
}
Changing cti billing mode to TRIAL while trial period end date is null trial period end will be updated to current date + 1 month
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as admin
and there is a customer K0002
with:
  • trialPeriodEnd set to NULL
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile%201"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/UTC"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "TWO_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 3
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "SHORTEN"
  }, {
    "name": "projectNumberLength",
    "value": 5
  }, {
    "name": "contractType",
    "value": "nconnect"
  }, {
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }, {
    "name": "clickToDialState",
    "value": "ON_FIXED_NUMBER"
  }, {
    "name": "nmeeting",
    "value": "FLATRATE"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 22
  }, {
    "name": "vmPasswordLengthMax",
    "value": 31
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": true
  }, {
    "name": "portLock",
    "value": true
  }, {
    "name": "intercomEnabled",
    "value": true
  }, {
    "name": "betaTester",
    "value": true
  }, {
    "name": "betaDeviceTester",
    "value": true
  }, {
    "name": "aastra31NewLayout",
    "value": true
  }, {
    "name": "sipCustomPort",
    "value": true
  }, {
    "name": "ccbs",
    "value": true
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": true
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": true
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": true
  }, {
    "name": "trialPeriod",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": null
  }, {
    "name": "ratingProfileName",
    "value": "Rating Profile 1"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": false
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }]
}
Changing cti billing mode to TRIAL while trial period end date is null trial period end will be updated to current date + 1 month
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Operator C0002
and there is a customer K0002
with:
  • trialPeriodEnd set to NULL
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile%201"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/UTC"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "TWO_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 3
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "SHORTEN"
  }, {
    "name": "projectNumberLength",
    "value": 5
  }, {
    "name": "contractType",
    "value": "nconnect"
  }, {
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }, {
    "name": "clickToDialState",
    "value": "ON_FIXED_NUMBER"
  }, {
    "name": "nmeeting",
    "value": "FLATRATE"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 22
  }, {
    "name": "vmPasswordLengthMax",
    "value": 31
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": true
  }, {
    "name": "portLock",
    "value": true
  }, {
    "name": "intercomEnabled",
    "value": true
  }, {
    "name": "betaTester",
    "value": true
  }, {
    "name": "betaDeviceTester",
    "value": true
  }, {
    "name": "aastra31NewLayout",
    "value": true
  }, {
    "name": "sipCustomPort",
    "value": true
  }, {
    "name": "ccbs",
    "value": true
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": true
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": true
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": true
  }, {
    "name": "trialPeriod",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": null
  }, {
    "name": "ratingProfileName",
    "value": "Rating Profile 1"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": false
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }]
}
Changing cti billing mode to TRIAL while trial period end date is null trial period end will be updated to current date + 1 month
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as System Integrator S0002
and there is a customer K0002
with:
  • trialPeriodEnd set to NULL
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile%201"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/UTC"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "TWO_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 3
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "SHORTEN"
  }, {
    "name": "projectNumberLength",
    "value": 5
  }, {
    "name": "contractType",
    "value": "nconnect"
  }, {
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }, {
    "name": "clickToDialState",
    "value": "ON_FIXED_NUMBER"
  }, {
    "name": "nmeeting",
    "value": "FLATRATE"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 22
  }, {
    "name": "vmPasswordLengthMax",
    "value": 31
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": true
  }, {
    "name": "portLock",
    "value": true
  }, {
    "name": "intercomEnabled",
    "value": true
  }, {
    "name": "betaTester",
    "value": true
  }, {
    "name": "betaDeviceTester",
    "value": true
  }, {
    "name": "aastra31NewLayout",
    "value": true
  }, {
    "name": "sipCustomPort",
    "value": true
  }, {
    "name": "ccbs",
    "value": true
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": true
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": true
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": true
  }, {
    "name": "trialPeriod",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": null
  }, {
    "name": "ratingProfileName",
    "value": "Rating Profile 1"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": false
  }, {
    "name": "coachingEnabled",
    "value": false
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }]
}
set transcription as enabled with the requisite preview allowed and enabled, transcription allowed and contract type business_premium
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Customer K0002
and
  • preview feature allowed 1
  • voicemail transcription feature allowed 1
  • contractType set to one that is allowed to use transcription business_premium
  • customer preview flag enabled true
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "voicemailTranscriptionEnabled",
    "value": true
  }]
}
Then I should receive HTTP/1.1 204 No Content

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "data": [{
    "name": "voicemailTranscriptionEnabled",
    "value": true
  }]
}
set transcription as enabled with the requisite preview allowed and enabled, failed with blocked customer
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Customer K0002
and
  • preview feature allowed 1
  • voicemail transcription feature allowed 1
  • contractType set to one that is allowed to use transcription business_premium
  • customer preview flag enabled true
and it has:
  • blockedAt set to 2014-01-01T12:00:00+0100
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "voicemailTranscriptionEnabled",
    "value": true
  }]
}
Then I should receive HTTP/1.1 403 Forbidden

Given I am authenticated as admin
When I send /api/customers/K0002/options
Then I should receive HTTP/1.1 200 OK
with following body:
{
  "href": "/api/customers/K0002/options",
  "links": [{
    "rel": "ratingProfile",
    "href": "/api/operators/C0002/rating-profiles/Rating%20Profile%201"
  }, {
    "rel": "availableRatingProfiles",
    "href": "/api/operators/C0002/rating-profiles/available"
  }, {
    "rel": "availableCountOfTrunks",
    "href": "/api/customers/K0002/count-of-trunks"
  }, {
    "rel": "availableEvnModes",
    "href": "/api/customers/K0002/evn-modes"
  }, {
    "rel": "availableContractTypes",
    "href": "/api/contract-types"
  }, {
    "rel": "availableCtiBillingModes",
    "href": "/api/customers/K0002/cti-billing-modes"
  }, {
    "rel": "availableClickToDialStates",
    "href": "/api/customers/K0002/click-to-dial-states"
  }, {
    "rel": "availableNmeetingOptions",
    "href": "/api/customers/K0002/nmeeting-options"
  }, {
    "rel": "timezone",
    "href": "/api/time-zones/UTC"
  }],
  "data": [{
    "name": "countOfTrunks",
    "value": "TWO_DIGIT"
  }, {
    "name": "speedDialLength",
    "value": 3
  }, {
    "name": "deviceCreationPassword",
    "value": "***"
  }, {
    "name": "evnMode",
    "value": "SHORTEN"
  }, {
    "name": "projectNumberLength",
    "value": 5
  }, {
    "name": "contractType",
    "value": "business_premium"
  }, {
    "name": "ctiBillingMode",
    "value": "TRIAL"
  }, {
    "name": "clickToDialState",
    "value": "ON_FIXED_NUMBER"
  }, {
    "name": "nmeeting",
    "value": "FLATRATE"
  }, {
    "name": "vmPasswordLengthMin",
    "value": 22
  }, {
    "name": "vmPasswordLengthMax",
    "value": 31
  }, {
    "name": "operatorVmPasswordLengthMin",
    "value": 6
  }, {
    "name": "operatorVmPasswordLengthMax",
    "value": 12
  }, {
    "name": "sipTransport",
    "value": "UDP"
  }, {
    "name": "lockDeviceWebserver",
    "value": true
  }, {
    "name": "portLock",
    "value": true
  }, {
    "name": "intercomEnabled",
    "value": true
  }, {
    "name": "betaTester",
    "value": true
  }, {
    "name": "betaDeviceTester",
    "value": true
  }, {
    "name": "aastra31NewLayout",
    "value": true
  }, {
    "name": "sipCustomPort",
    "value": true
  }, {
    "name": "ccbs",
    "value": true
  }, {
    "name": "mediaGatewayEmergencyDialplanEnabled",
    "value": true
  }, {
    "name": "nmqEnabled",
    "value": false
  }, {
    "name": "vlanProvisioning",
    "value": true
  }, {
    "name": "acureusBilling",
    "value": true
  }, {
    "name": "blockedOutbound",
    "value": true
  }, {
    "name": "trialPeriod",
    "value": true
  }, {
    "name": "trialPermanent",
    "value": false
  }, {
    "name": "newBss",
    "value": false
  }, {
    "name": "blockedAt",
    "value": "2014-01-01T12:00:00+0100"
  }, {
    "name": "ratingProfileName",
    "value": "Rating Profile 1"
  }, {
    "name": "dialWithoutPrefix",
    "value": false
  }, {
    "name": "dialPrefix",
    "value": "0"
  }, {
    "name": "disableT38",
    "value": false
  }, {
    "name": "previewFeatureEnabled",
    "value": true
  }, {
    "name": "coachingEnabled",
    "value": false
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "voicemailTranscriptionEnabled",
    "value": false
  }, {
    "name": "operatorTPSAvailable",
    "value": false
  }, {
    "name": "presenceTeamsConnectorEnabled",
    "value": false
  }, {
    "name": "voicemailNotificationMode",
    "value": "FULL"
  }, {
    "name": "operatorLdapVisible",
    "value": false
  }, {
    "name": "operatorNmqEnabled",
    "value": false
  }]
}
cannot set transcription as enabled without the requisite preview allowed and enabled, transcription allowed and contract type business_premium
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Customer K0002
and
  • preview feature allowed 0
  • voicemail transcription feature allowed 0
  • contractType set to one that is allowed to use transcription nconnect
  • customer preview flag enabled false
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "voicemailTranscriptionEnabled",
    "value": true
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
{}
cannot set transcription as enabled without the requisite preview allowed and enabled, transcription allowed and contract type business_premium for blocked customer
Test setup
Given there is a Customer with ID K0002 with:
  • countOfTrunks set to TWO_DIGIT
  • speedDialLength set to 3
  • deviceCreationPassword set to p@ss123W0r)
  • evnMode set to SHORTEN
  • projectNumberLength set to 5
  • contractType set to nconnect
  • ctiBillingMode set to TRIAL
  • clickToDialState set to ON_FIXED_NUMBER
  • nmeeting set to FLATRATE
  • vmPasswordLengthMin set to 22
  • vmPasswordLengthMax set to 31
  • lockDeviceWebserver set to true
  • portLock set to true
  • intercomEnabled set to true
  • betaTester set to true
  • betaDeviceTester set to true
  • aastra31NewLayout set to true
  • sipCustomPort set to true
  • ccbs set to true
  • timezone set to UTC
  • mediaGatewayEmergencyDialplanEnabled set to true
  • vlanProvisioning set to true
  • acureusBilling set to true
  • blockedOutbound set to true
  • trialPeriod set to true
  • language set to en
And there is rating profile with name Another Rating Profile
And this rating profile is assigned to operator C0002
Given I am authenticated as Customer K0002
and
  • preview feature allowed 0
  • voicemail transcription feature allowed 0
  • contractType set to one that is allowed to use transcription nconnect
  • customer preview flag enabled false
and it has:
  • blockedAt set to 2014-01-01T12:00:00+0100
When I send /api/customers/K0002/options
with application/json; charset=UTF-8 and following body"
{
  "data": [{
    "name": "voicemailTranscriptionEnabled",
    "value": true
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
{}