BokaMera.API.Host

<back to all web services

EAccountingUpdatePricesMapping

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/eaccounting/article/mappingsUpdate price mappings only for E-Accounting;Update price mappings for E-Accounting prices
import 'package:servicestack/servicestack.dart';

class ServicePriceMappingResponse implements IConvertible
{
    /**
    * The company id
    */
    // @ApiMember(Description="The company id")
    String? CompanyId;

    String? Id;
    /**
    * The price id
    */
    // @ApiMember(Description="The price id")
    int? PriceId;

    /**
    * The external reference
    */
    // @ApiMember(Description="The external reference")
    String? ExternalReference;

    /**
    * The Reference Type
    */
    // @ApiMember(Description="The Reference Type")
    String? ReferenceType;

    ServicePriceMappingResponse({this.CompanyId,this.Id,this.PriceId,this.ExternalReference,this.ReferenceType});
    ServicePriceMappingResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        Id = json['Id'];
        PriceId = json['PriceId'];
        ExternalReference = json['ExternalReference'];
        ReferenceType = json['ReferenceType'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'Id': Id,
        'PriceId': PriceId,
        'ExternalReference': ExternalReference,
        'ReferenceType': ReferenceType
    };

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

class ServicePriceMapping implements IConvertible
{
    /**
    * The id
    */
    // @ApiMember(Description="The id")
    String? Id;

    /**
    * The price id
    */
    // @ApiMember(Description="The price id")
    int? PriceId;

    /**
    * The Reference Type
    */
    // @ApiMember(Description="The Reference Type")
    String? ReferenceType;

    /**
    * The external reference; Values for e-accounting; EAccountingCustomerId, EAccountingArticle, EAccountingInvoice, EAccountingDraftInvoice
    */
    // @ApiMember(Description="The external reference; Values for e-accounting; EAccountingCustomerId, EAccountingArticle, EAccountingInvoice, EAccountingDraftInvoice")
    String? ExternalReference;

    ServicePriceMapping({this.Id,this.PriceId,this.ReferenceType,this.ExternalReference});
    ServicePriceMapping.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        PriceId = json['PriceId'];
        ReferenceType = json['ReferenceType'];
        ExternalReference = json['ExternalReference'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'PriceId': PriceId,
        'ReferenceType': ReferenceType,
        'ExternalReference': ExternalReference
    };

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

// @ValidateRequest(Validator="IsAuthenticated")
class EAccountingUpdatePricesMapping implements ICompany, IConvertible
{
    List<ServicePriceMapping>? ServicePriceMappings;
    /**
    * Company to show services for
    */
    // @ApiMember(Description="Company to show services for")
    String? CompanyId;

    EAccountingUpdatePricesMapping({this.ServicePriceMappings,this.CompanyId});
    EAccountingUpdatePricesMapping.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ServicePriceMappings = JsonConverters.fromJson(json['ServicePriceMappings'],'List<ServicePriceMapping>',context!);
        CompanyId = json['CompanyId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ServicePriceMappings': JsonConverters.toJson(ServicePriceMappings,'List<ServicePriceMapping>',context!),
        'CompanyId': CompanyId
    };

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

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'ServicePriceMappingResponse': TypeInfo(TypeOf.Class, create:() => ServicePriceMappingResponse()),
    'ServicePriceMapping': TypeInfo(TypeOf.Class, create:() => ServicePriceMapping()),
    'EAccountingUpdatePricesMapping': TypeInfo(TypeOf.Class, create:() => EAccountingUpdatePricesMapping()),
    'List<ServicePriceMapping>': TypeInfo(TypeOf.Class, create:() => <ServicePriceMapping>[]),
});

Dart EAccountingUpdatePricesMapping DTOs

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

HTTP + OTHER

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

PUT /eaccounting/article/mappings HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"ServicePriceMappings":[{"Id":"00000000-0000-0000-0000-000000000000","PriceId":0,"ReferenceType":"String","ExternalReference":"String"}],"CompanyId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"PriceId":0,"ExternalReference":"String","ReferenceType":"String"}