BokaMera.API.Host

<back to all web services

UpdateArticle

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/articles/{Id}Updates articleUpdates article for the currently logged in user
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class UpdateArticle implements ICompany
    {
        /**
        * 
        */
        @ApiMember(Description="", IsRequired=true, ParameterType="query")
        public Integer Id = null;

        /**
        * 
        */
        @ApiMember(Description="")
        public UUID CompanyId = null;

        /**
        * 
        */
        @ApiMember(Description="")
        public String Name = null;

        /**
        * 
        */
        @ApiMember(Description="")
        public Integer ArticleTypeId = null;

        /**
        * 
        */
        @ApiMember(Description="")
        public String Description = null;

        /**
        * 
        */
        @ApiMember(Description="")
        public Uri ImageUrl = null;

        /**
        * 
        */
        @ApiMember(Description="")
        public Boolean Active = null;

        /**
        * 
        */
        @ApiMember(Description="")
        public Integer Amount = null;

        /**
        * .
        */
        @ApiMember(Description=".")
        public Double Price = null;

        /**
        * The payment currency id
        */
        @ApiMember(Description="The payment currency id")
        public String CurrencyId = null;

        /**
        * Query for specific services.
        */
        @ApiMember(Description="Query for specific services.", ParameterType="query")
        public ArrayList<Integer> ServiceIds = null;
        
        public Integer getId() { return Id; }
        public UpdateArticle setId(Integer value) { this.Id = value; return this; }
        public UUID getCompanyId() { return CompanyId; }
        public UpdateArticle setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public String getName() { return Name; }
        public UpdateArticle setName(String value) { this.Name = value; return this; }
        public Integer getArticleTypeId() { return ArticleTypeId; }
        public UpdateArticle setArticleTypeId(Integer value) { this.ArticleTypeId = value; return this; }
        public String getDescription() { return Description; }
        public UpdateArticle setDescription(String value) { this.Description = value; return this; }
        public Uri getImageUrl() { return ImageUrl; }
        public UpdateArticle setImageUrl(Uri value) { this.ImageUrl = value; return this; }
        public Boolean isActive() { return Active; }
        public UpdateArticle setActive(Boolean value) { this.Active = value; return this; }
        public Integer getAmount() { return Amount; }
        public UpdateArticle setAmount(Integer value) { this.Amount = value; return this; }
        public Double getPrice() { return Price; }
        public UpdateArticle setPrice(Double value) { this.Price = value; return this; }
        public String getCurrencyId() { return CurrencyId; }
        public UpdateArticle setCurrencyId(String value) { this.CurrencyId = value; return this; }
        public ArrayList<Integer> getServiceIds() { return ServiceIds; }
        public UpdateArticle setServiceIds(ArrayList<Integer> value) { this.ServiceIds = value; return this; }
    }

    public static class ArticleResponse
    {
        public UUID CompanyId = null;
        public Integer Id = null;
        public String Name = null;
        public Integer ArticleTypeId = null;
        public String Description = null;
        public String ImageUrl = null;
        public Boolean Active = null;
        public Integer Amount = null;
        public Double Price = null;
        public String CurrencyId = null;
        public Date UpdatedDate = null;
        public Date CreatedDate = null;
        public ArrayList<ArticleServiceRelation> Services = null;
        public ArrayList<Integer> ServiceIds = null;
        public String PriceSign = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public ArticleResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getId() { return Id; }
        public ArticleResponse setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public ArticleResponse setName(String value) { this.Name = value; return this; }
        public Integer getArticleTypeId() { return ArticleTypeId; }
        public ArticleResponse setArticleTypeId(Integer value) { this.ArticleTypeId = value; return this; }
        public String getDescription() { return Description; }
        public ArticleResponse setDescription(String value) { this.Description = value; return this; }
        public String getImageUrl() { return ImageUrl; }
        public ArticleResponse setImageUrl(String value) { this.ImageUrl = value; return this; }
        public Boolean isActive() { return Active; }
        public ArticleResponse setActive(Boolean value) { this.Active = value; return this; }
        public Integer getAmount() { return Amount; }
        public ArticleResponse setAmount(Integer value) { this.Amount = value; return this; }
        public Double getPrice() { return Price; }
        public ArticleResponse setPrice(Double value) { this.Price = value; return this; }
        public String getCurrencyId() { return CurrencyId; }
        public ArticleResponse setCurrencyId(String value) { this.CurrencyId = value; return this; }
        public Date getUpdatedDate() { return UpdatedDate; }
        public ArticleResponse setUpdatedDate(Date value) { this.UpdatedDate = value; return this; }
        public Date getCreatedDate() { return CreatedDate; }
        public ArticleResponse setCreatedDate(Date value) { this.CreatedDate = value; return this; }
        public ArrayList<ArticleServiceRelation> getServices() { return Services; }
        public ArticleResponse setServices(ArrayList<ArticleServiceRelation> value) { this.Services = value; return this; }
        public ArrayList<Integer> getServiceIds() { return ServiceIds; }
        public ArticleResponse setServiceIds(ArrayList<Integer> value) { this.ServiceIds = value; return this; }
        public String getPriceSign() { return PriceSign; }
        public ArticleResponse setPriceSign(String value) { this.PriceSign = value; return this; }
    }

    public static class ArticleServiceRelation extends BaseModel
    {
        @Required()
        public UUID CompanyId = null;

        public Integer Id = null;
        @Required()
        public Integer ServiceId = null;

        @Required()
        public Integer ArticleId = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public ArticleServiceRelation setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getId() { return Id; }
        public ArticleServiceRelation setId(Integer value) { this.Id = value; return this; }
        public Integer getServiceId() { return ServiceId; }
        public ArticleServiceRelation setServiceId(Integer value) { this.ServiceId = value; return this; }
        public Integer getArticleId() { return ArticleId; }
        public ArticleServiceRelation setArticleId(Integer value) { this.ArticleId = value; return this; }
    }

    public static class BaseModel
    {
        
    }

}

Java UpdateArticle 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.

PUT /articles/{Id} HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Id":0,"CompanyId":"00000000-0000-0000-0000-000000000000","Name":"String","ArticleTypeId":0,"Description":"String","Active":false,"Amount":0,"Price":0,"CurrencyId":"String","ServiceIds":[0]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Id":0,"Name":"String","ArticleTypeId":0,"Description":"String","ImageUrl":"String","Active":false,"Amount":0,"Price":0,"CurrencyId":"String","Services":[{"Id":0,"ServiceId":0,"ArticleId":0}],"ServiceIds":[0],"PriceSign":"String"}