Trendsic Platform Service

<back to all web services

ClientWorkerRestrictionByWorkerRequest

Requires Authentication
The following routes are available for this service:
GET/v1/coverage/restriction/byworker/{WorkerContactID}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class ClientWorkerRestrictionByWorkerRequest
    {
        public Integer WorkerContactID = null;
        
        public Integer getWorkerContactID() { return WorkerContactID; }
        public ClientWorkerRestrictionByWorkerRequest setWorkerContactID(Integer value) { this.WorkerContactID = value; return this; }
    }

    public static class ClientWorkerRestrictionsResponse
    {
        public ArrayList<ClientWorkerRestriction> Restrictions = new ArrayList<ClientWorkerRestriction>();
        public ArrayList<RestrictionParty> Clients = new ArrayList<RestrictionParty>();
        public ArrayList<RestrictionParty> Workers = new ArrayList<RestrictionParty>();
        public ResponseStatus ResponseStatus = null;
        
        public ArrayList<ClientWorkerRestriction> getRestrictions() { return Restrictions; }
        public ClientWorkerRestrictionsResponse setRestrictions(ArrayList<ClientWorkerRestriction> value) { this.Restrictions = value; return this; }
        public ArrayList<RestrictionParty> getClients() { return Clients; }
        public ClientWorkerRestrictionsResponse setClients(ArrayList<RestrictionParty> value) { this.Clients = value; return this; }
        public ArrayList<RestrictionParty> getWorkers() { return Workers; }
        public ClientWorkerRestrictionsResponse setWorkers(ArrayList<RestrictionParty> value) { this.Workers = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public ClientWorkerRestrictionsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

    public static class ClientWorkerRestriction
    {
        public Integer ClientWorkerRestrictionID = null;
        public UUID BranchId = null;
        public Integer ClientContactID = null;
        public Integer WorkerContactID = null;
        public String RestrictionLevel = null;
        public String Reason = null;
        public Integer SourceRatingID = null;
        public String CreatedBy = null;
        public Date CreatedAt = null;
        public Date UpdatedAt = null;
        public String ClientName = null;
        public String WorkerName = null;
        public String LevelLabel = null;
        
        public Integer getClientWorkerRestrictionID() { return ClientWorkerRestrictionID; }
        public ClientWorkerRestriction setClientWorkerRestrictionID(Integer value) { this.ClientWorkerRestrictionID = value; return this; }
        public UUID getBranchId() { return BranchId; }
        public ClientWorkerRestriction setBranchId(UUID value) { this.BranchId = value; return this; }
        public Integer getClientContactID() { return ClientContactID; }
        public ClientWorkerRestriction setClientContactID(Integer value) { this.ClientContactID = value; return this; }
        public Integer getWorkerContactID() { return WorkerContactID; }
        public ClientWorkerRestriction setWorkerContactID(Integer value) { this.WorkerContactID = value; return this; }
        public String getRestrictionLevel() { return RestrictionLevel; }
        public ClientWorkerRestriction setRestrictionLevel(String value) { this.RestrictionLevel = value; return this; }
        public String getReason() { return Reason; }
        public ClientWorkerRestriction setReason(String value) { this.Reason = value; return this; }
        public Integer getSourceRatingID() { return SourceRatingID; }
        public ClientWorkerRestriction setSourceRatingID(Integer value) { this.SourceRatingID = value; return this; }
        public String getCreatedBy() { return CreatedBy; }
        public ClientWorkerRestriction setCreatedBy(String value) { this.CreatedBy = value; return this; }
        public Date getCreatedAt() { return CreatedAt; }
        public ClientWorkerRestriction setCreatedAt(Date value) { this.CreatedAt = value; return this; }
        public Date getUpdatedAt() { return UpdatedAt; }
        public ClientWorkerRestriction setUpdatedAt(Date value) { this.UpdatedAt = value; return this; }
        public String getClientName() { return ClientName; }
        public ClientWorkerRestriction setClientName(String value) { this.ClientName = value; return this; }
        public String getWorkerName() { return WorkerName; }
        public ClientWorkerRestriction setWorkerName(String value) { this.WorkerName = value; return this; }
        public String getLevelLabel() { return LevelLabel; }
        public ClientWorkerRestriction setLevelLabel(String value) { this.LevelLabel = value; return this; }
    }

    public static class RestrictionParty
    {
        public Integer ContactId = null;
        public String Name = null;
        
        public Integer getContactId() { return ContactId; }
        public RestrictionParty setContactId(Integer value) { this.ContactId = value; return this; }
        public String getName() { return Name; }
        public RestrictionParty setName(String value) { this.Name = value; return this; }
    }

}

Java ClientWorkerRestrictionByWorkerRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/coverage/restriction/byworker/{WorkerContactID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Restrictions":[{"ClientWorkerRestrictionID":0,"BranchId":"00000000000000000000000000000000","ClientContactID":0,"WorkerContactID":0,"RestrictionLevel":"String","Reason":"String","SourceRatingID":0,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","ClientName":"String","WorkerName":"String","LevelLabel":"String"}],"Clients":[{"ContactId":0,"Name":"String"}],"Workers":[{"ContactId":0,"Name":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}