| PUT | /customerarticle/{Id} | Update an existing CustomerArticle. | Update an existing CustomerArticle. |
|---|
// @ts-nocheck
export class BaseModel
{
public constructor(init?: Partial<BaseModel>) { (Object as any).assign(this, init); }
}
export class ArticleServiceRelation extends BaseModel
{
// @Required()
public CompanyId: string;
public Id: number;
// @Required()
public ServiceId: number;
// @Required()
public ArticleId: number;
public constructor(init?: Partial<ArticleServiceRelation>) { super(init); (Object as any).assign(this, init); }
}
export class ArticleResponse
{
public CompanyId: string;
public Id: number;
public Name: string;
public ArticleTypeId: number;
public Description: string;
public ImageUrl: string;
public Active: boolean;
public Amount: number;
public Price: number;
public CurrencyId: string;
public SortOrder: number;
public UpdatedDate: string;
public CreatedDate: string;
public Duration: number;
public Services: ArticleServiceRelation[] = [];
public ServiceIds: number[] = [];
public PriceSign: string;
public VAT?: number;
public ValidDays: number;
public SendNotification: boolean;
public NotificationEmail: string;
public constructor(init?: Partial<ArticleResponse>) { (Object as any).assign(this, init); }
}
export class CustomerArticleCustomerResponse
{
public Id: string;
public Firstname: string;
public Lastname: string;
public Email: string;
public Phone: string;
public constructor(init?: Partial<CustomerArticleCustomerResponse>) { (Object as any).assign(this, init); }
}
export class CustomerArticleCompanyResponse
{
public Id: string;
public Name: string;
public LogoType: string;
public Email: string;
public Phone: string;
public City: string;
public Street1: string;
public ZipCode: string;
public CountryId: string;
public constructor(init?: Partial<CustomerArticleCompanyResponse>) { (Object as any).assign(this, init); }
}
export class PaymentLogResponse
{
public Id: number;
public Amount?: number;
public AmountCredited?: number;
public CurrencyId: string;
public Comments: string;
public Created: string;
public Updated: string;
public constructor(init?: Partial<PaymentLogResponse>) { (Object as any).assign(this, init); }
}
export class CustomerArticleResponse
{
public Id: number;
public CompanyId: string;
public ArticleId?: number;
public Price?: number;
public VAT?: number;
public CurrencyId: string;
public StatusId: number;
public StatusName: string;
public CustomerId?: string;
public CreatedDate: string;
public UpdatedDate: string;
public Article: ArticleResponse;
public Customer: CustomerArticleCustomerResponse;
public Company: CustomerArticleCompanyResponse;
public PaymentLog: PaymentLogResponse[] = [];
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<CustomerArticleResponse>) { (Object as any).assign(this, init); }
}
export enum CustomerArticleStatusEnum
{
AwaitingPayment = 1,
AwaitingPaymentFromProvider = 2,
AwaitingPaymentNoTimeLimit = 3,
Active = 4,
Off = 5,
}
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
export class UpdateCustomerArticle implements ICompany
{
/** @description The customer article id */
// @ApiMember(Description="The customer article id", IsRequired=true, ParameterType="path")
public Id: number;
/** @description The company id, if empty will use the company id for the user you are logged in with. */
// @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
public CompanyId?: string;
/** @description The new status of the customer article */
// @ApiMember(Description="The new status of the customer article")
public StatusId?: CustomerArticleStatusEnum;
/** @description Updated price */
// @ApiMember(Description="Updated price")
public Price?: number;
/** @description Updated VAT */
// @ApiMember(Description="Updated VAT")
public VAT?: number;
/** @description Updated currency */
// @ApiMember(Description="Updated currency")
public CurrencyId: string;
public constructor(init?: Partial<UpdateCustomerArticle>) { (Object as any).assign(this, init); }
}
TypeScript UpdateCustomerArticle DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /customerarticle/{Id} HTTP/1.1
Host: api.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Id: 0,
CompanyId: 00000000-0000-0000-0000-000000000000,
StatusId: 0,
Price: 0,
VAT: 0,
CurrencyId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Id: 0,
ArticleId: 0,
Price: 0,
VAT: 0,
CurrencyId: String,
StatusId: 0,
StatusName: String,
CustomerId: 00000000-0000-0000-0000-000000000000,
Article:
{
Id: 0,
Name: String,
ArticleTypeId: 0,
Description: String,
ImageUrl: String,
Active: False,
Amount: 0,
Price: 0,
CurrencyId: String,
SortOrder: 0,
Duration: 0,
Services:
[
{
Id: 0,
ServiceId: 0,
ArticleId: 0
}
],
ServiceIds:
[
0
],
PriceSign: String,
VAT: 0,
ValidDays: 0,
SendNotification: False,
NotificationEmail: String
},
Customer:
{
Firstname: String,
Lastname: String,
Email: String,
Phone: String
},
Company:
{
Name: String,
LogoType: String,
Email: String,
Phone: String,
City: String,
Street1: String,
ZipCode: String,
CountryId: String
},
PaymentLog:
[
{
Id: 0,
Amount: 0,
AmountCredited: 0,
CurrencyId: String,
Comments: String
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}