| PUT | /users_boxes/{Id} |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class UsersBoxesEdit
{
@DataMember(Order=1)
@Validate(Validator="NotNull")
public Long id = null;
@DataMember(Order=2)
@Validate(Validator="NotNull")
public Long appUserId = null;
@DataMember(Order=3)
@Validate(Validator="NotNull")
public Long authAppUserId = null;
@DataMember(Order=4)
@Validate(Validator="NotNull")
public Date deploymentDate = null;
@DataMember(Order=5)
@Validate(Validator="NotNull")
public Integer numberBoxes = null;
@DataMember(Order=6)
@Validate(Validator="NotNull")
public String recipientType = null;
@DataMember(Order=7)
public Long foodGardensId = null;
@DataMember(Order=8)
public String otherDescription = null;
public Long getId() { return id; }
public UsersBoxesEdit setId(Long value) { this.id = value; return this; }
public Long getAppUserId() { return appUserId; }
public UsersBoxesEdit setAppUserId(Long value) { this.appUserId = value; return this; }
public Long getAuthAppUserId() { return authAppUserId; }
public UsersBoxesEdit setAuthAppUserId(Long value) { this.authAppUserId = value; return this; }
public Date getDeploymentDate() { return deploymentDate; }
public UsersBoxesEdit setDeploymentDate(Date value) { this.deploymentDate = value; return this; }
public Integer getNumberBoxes() { return numberBoxes; }
public UsersBoxesEdit setNumberBoxes(Integer value) { this.numberBoxes = value; return this; }
public String getRecipientType() { return recipientType; }
public UsersBoxesEdit setRecipientType(String value) { this.recipientType = value; return this; }
public Long getFoodGardensId() { return foodGardensId; }
public UsersBoxesEdit setFoodGardensId(Long value) { this.foodGardensId = value; return this; }
public String getOtherDescription() { return otherDescription; }
public UsersBoxesEdit setOtherDescription(String value) { this.otherDescription = value; return this; }
}
public static class UsersBoxesEditResponse
{
@DataMember(Order=1)
public Long id = null;
@DataMember(Order=2)
public Long appUserId = null;
@DataMember(Order=3)
public Long authAppUserId = null;
@DataMember(Order=4)
public Date deploymentDate = null;
@DataMember(Order=5)
public Integer numberBoxes = null;
@DataMember(Order=6)
public String recipientType = null;
@DataMember(Order=7)
public Long foodGardensId = null;
@DataMember(Order=8)
public String otherDescription = null;
@DataMember(Order=10)
public ResponseStatus responseStatus = null;
public Long getId() { return id; }
public UsersBoxesEditResponse setId(Long value) { this.id = value; return this; }
public Long getAppUserId() { return appUserId; }
public UsersBoxesEditResponse setAppUserId(Long value) { this.appUserId = value; return this; }
public Long getAuthAppUserId() { return authAppUserId; }
public UsersBoxesEditResponse setAuthAppUserId(Long value) { this.authAppUserId = value; return this; }
public Date getDeploymentDate() { return deploymentDate; }
public UsersBoxesEditResponse setDeploymentDate(Date value) { this.deploymentDate = value; return this; }
public Integer getNumberBoxes() { return numberBoxes; }
public UsersBoxesEditResponse setNumberBoxes(Integer value) { this.numberBoxes = value; return this; }
public String getRecipientType() { return recipientType; }
public UsersBoxesEditResponse setRecipientType(String value) { this.recipientType = value; return this; }
public Long getFoodGardensId() { return foodGardensId; }
public UsersBoxesEditResponse setFoodGardensId(Long value) { this.foodGardensId = value; return this; }
public String getOtherDescription() { return otherDescription; }
public UsersBoxesEditResponse setOtherDescription(String value) { this.otherDescription = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public UsersBoxesEditResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /users_boxes/{Id} HTTP/1.1
Host: sfgboxapi.dev.scadsoftware.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"id":0,"appUserId":0,"authAppUserId":0,"deploymentDate":"\/Date(-62135596800000-0000)\/","numberBoxes":0,"recipientType":"String","foodGardensId":0,"otherDescription":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"id":0,"appUserId":0,"authAppUserId":0,"deploymentDate":"\/Date(-62135596800000-0000)\/","numberBoxes":0,"recipientType":"String","foodGardensId":0,"otherDescription":"String","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}