BokaMera.API.Host

<back to all web services

UpdateCompanyInvoiceArticle

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/company/invoice/articleUpdate company invoice articleUpdate company invoice article.
import 'package:servicestack/servicestack.dart';

class CompanyInvoiceArticleQueryResponse implements IConvertible
{
    String? Name;
    int? LicenseTypeId;
    int? LicenseProductTypeId;
    bool? IsMainLicense;
    String? VossProductGroupId;
    int? Id;

    CompanyInvoiceArticleQueryResponse({this.Name,this.LicenseTypeId,this.LicenseProductTypeId,this.IsMainLicense,this.VossProductGroupId,this.Id});
    CompanyInvoiceArticleQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        LicenseTypeId = json['LicenseTypeId'];
        LicenseProductTypeId = json['LicenseProductTypeId'];
        IsMainLicense = json['IsMainLicense'];
        VossProductGroupId = json['VossProductGroupId'];
        Id = json['Id'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'LicenseTypeId': LicenseTypeId,
        'LicenseProductTypeId': LicenseProductTypeId,
        'IsMainLicense': IsMainLicense,
        'VossProductGroupId': VossProductGroupId,
        'Id': Id
    };

    getTypeName() => "CompanyInvoiceArticleQueryResponse";
    TypeContext? context = _ctx;
}

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
class UpdateCompanyInvoiceArticle implements IConvertible
{
    /**
    * Invoice article No in Db.
    */
    // @ApiMember(Description="Invoice article No in Db.", IsRequired=true)
    int? Id;

    /**
    * Invoice article Name
    */
    // @ApiMember(Description="Invoice article Name")
    String? Name;

    /**
    * Invoice article Name
    */
    // @ApiMember(Description="Invoice article Name")
    int? LicenseTypeId;

    /**
    * Invoice LicenseProductTypeId
    */
    // @ApiMember(Description="Invoice LicenseProductTypeId")
    int? LicenseProductTypeId;

    /**
    * Invoice article is TIER license
    */
    // @ApiMember(Description="Invoice article is TIER license")
    bool? IsMainLicense;

    /**
    * Invoice VossProductGroupId reference
    */
    // @ApiMember(Description="Invoice VossProductGroupId reference")
    String? VossProductGroupId;

    UpdateCompanyInvoiceArticle({this.Id,this.Name,this.LicenseTypeId,this.LicenseProductTypeId,this.IsMainLicense,this.VossProductGroupId});
    UpdateCompanyInvoiceArticle.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        LicenseTypeId = json['LicenseTypeId'];
        LicenseProductTypeId = json['LicenseProductTypeId'];
        IsMainLicense = json['IsMainLicense'];
        VossProductGroupId = json['VossProductGroupId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'LicenseTypeId': LicenseTypeId,
        'LicenseProductTypeId': LicenseProductTypeId,
        'IsMainLicense': IsMainLicense,
        'VossProductGroupId': VossProductGroupId
    };

    getTypeName() => "UpdateCompanyInvoiceArticle";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'CompanyInvoiceArticleQueryResponse': TypeInfo(TypeOf.Class, create:() => CompanyInvoiceArticleQueryResponse()),
    'UpdateCompanyInvoiceArticle': TypeInfo(TypeOf.Class, create:() => UpdateCompanyInvoiceArticle()),
});

Dart UpdateCompanyInvoiceArticle 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 /company/invoice/article HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Id":0,"Name":"String","LicenseTypeId":0,"LicenseProductTypeId":0,"IsMainLicense":false,"VossProductGroupId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Name":"String","LicenseTypeId":0,"LicenseProductTypeId":0,"IsMainLicense":false,"Id":0}