| Requires any of the roles: | bookingsupplier-administrator-write, superadmin | 
| PUT | /services/prices/mappings | Update price mappings for service prices | Update price mappings for service 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: StripeArticle = 1, EAccountingArticle = 2
    */
    // @ApiMember(Description="The Reference Type: StripeArticle = 1, EAccountingArticle = 2")
    String? ReferenceType;
    /**
    * The external reference; Values for EAccountingArticle, StripeArticle
    */
    // @ApiMember(Description="The external reference; Values for EAccountingArticle, StripeArticle")
    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 UpdateServicePricesMapping implements ICompany, IConvertible
{
    /**
    * Company to show services for
    */
    // @ApiMember(Description="Company to show services for")
    String? CompanyId;
    List<ServicePriceMapping>? ServicePriceMappings = [];
    UpdateServicePricesMapping({this.CompanyId,this.ServicePriceMappings});
    UpdateServicePricesMapping.fromJson(Map<String, dynamic> json) { fromMap(json); }
    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        ServicePriceMappings = JsonConverters.fromJson(json['ServicePriceMappings'],'List<ServicePriceMapping>',context!);
        return this;
    }
    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'ServicePriceMappings': JsonConverters.toJson(ServicePriceMappings,'List<ServicePriceMapping>',context!)
    };
    getTypeName() => "UpdateServicePricesMapping";
    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()),
    'UpdateServicePricesMapping': TypeInfo(TypeOf.Class, create:() => UpdateServicePricesMapping()),
    'List<ServicePriceMapping>': TypeInfo(TypeOf.Class, create:() => <ServicePriceMapping>[]),
});
Dart UpdateServicePricesMapping DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /services/prices/mappings HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","ServicePriceMappings":[{"Id":"00000000-0000-0000-0000-000000000000","PriceId":0,"ReferenceType":"String","ExternalReference":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"PriceId":0,"ExternalReference":"String","ReferenceType":"String"}