BokaMera.API.Host

<back to all web services

CreateArticleRebateCode

The following routes are available for this service:
POST/rebatecodes/fromarticleCreate RebateCode.Create RebateCode.
import 'package:servicestack/servicestack.dart';

class DaysOfWeekResponse implements IConvertible
{
    int Id = 0;
    String DayOfWeek = "";
    String DayOfWeekTranslation = "";
    bool? DayOfWeekActive;
    int? DayOfWeekSortOrder;

    DaysOfWeekResponse({this.Id,this.DayOfWeek,this.DayOfWeekTranslation,this.DayOfWeekActive,this.DayOfWeekSortOrder});
    DaysOfWeekResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        DayOfWeek = json['DayOfWeek'];
        DayOfWeekTranslation = json['DayOfWeekTranslation'];
        DayOfWeekActive = json['DayOfWeekActive'];
        DayOfWeekSortOrder = json['DayOfWeekSortOrder'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'DayOfWeek': DayOfWeek,
        'DayOfWeekTranslation': DayOfWeekTranslation,
        'DayOfWeekActive': DayOfWeekActive,
        'DayOfWeekSortOrder': DayOfWeekSortOrder
    };

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

class RebateCodeServiceResponse implements IConvertible
{
    int Id = 0;
    String Name = "";
    String Description = "";
    bool Active;

    RebateCodeServiceResponse({this.Id,this.Name,this.Description,this.Active});
    RebateCodeServiceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Description = json['Description'];
        Active = json['Active'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Description': Description,
        'Active': Active
    };

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

class BaseModel implements IConvertible
{
    BaseModel();
    BaseModel.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "BaseModel";
    TypeContext? context = _ctx;
}

class ArticleServiceRelation extends BaseModel implements IConvertible
{
    // @Required()
    String CompanyId = "";

    int Id = 0;
    // @Required()
    int ServiceId = 0;

    // @Required()
    int ArticleId = 0;

    ArticleServiceRelation({this.CompanyId,this.Id,this.ServiceId,this.ArticleId});
    ArticleServiceRelation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        CompanyId = json['CompanyId'];
        Id = json['Id'];
        ServiceId = json['ServiceId'];
        ArticleId = json['ArticleId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'CompanyId': CompanyId,
        'Id': Id,
        'ServiceId': ServiceId,
        'ArticleId': ArticleId
    });

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

class ArticleResponse implements IConvertible
{
    String CompanyId = "";
    int Id = 0;
    String Name = "";
    int ArticleTypeId = 0;
    String Description = "";
    String ImageUrl = "";
    bool Active;
    int Amount = 0;
    double Price = 0;
    String CurrencyId = "";
    int SortOrder = 0;
    DateTime UpdatedDate = DateTime(0);
    DateTime CreatedDate = DateTime(0);
    List<ArticleServiceRelation> Services = [];
    List<int> ServiceIds = [];
    String PriceSign = "";
    double? VAT;

    ArticleResponse({this.CompanyId,this.Id,this.Name,this.ArticleTypeId,this.Description,this.ImageUrl,this.Active,this.Amount,this.Price,this.CurrencyId,this.SortOrder,this.UpdatedDate,this.CreatedDate,this.Services,this.ServiceIds,this.PriceSign,this.VAT});
    ArticleResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        Id = json['Id'];
        Name = json['Name'];
        ArticleTypeId = json['ArticleTypeId'];
        Description = json['Description'];
        ImageUrl = json['ImageUrl'];
        Active = json['Active'];
        Amount = json['Amount'];
        Price = JsonConverters.toDouble(json['Price']);
        CurrencyId = json['CurrencyId'];
        SortOrder = json['SortOrder'];
        UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!);
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        Services = JsonConverters.fromJson(json['Services'],'List<ArticleServiceRelation>',context!);
        ServiceIds = JsonConverters.fromJson(json['ServiceIds'],'List<int>',context!);
        PriceSign = json['PriceSign'];
        VAT = JsonConverters.toDouble(json['VAT']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'Id': Id,
        'Name': Name,
        'ArticleTypeId': ArticleTypeId,
        'Description': Description,
        'ImageUrl': ImageUrl,
        'Active': Active,
        'Amount': Amount,
        'Price': Price,
        'CurrencyId': CurrencyId,
        'SortOrder': SortOrder,
        'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!),
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'Services': JsonConverters.toJson(Services,'List<ArticleServiceRelation>',context!),
        'ServiceIds': JsonConverters.toJson(ServiceIds,'List<int>',context!),
        'PriceSign': PriceSign,
        'VAT': VAT
    };

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

class RebateCodeCustomerResponse implements IConvertible
{
    String Id = "";
    String Firstname = "";
    String Lastname = "";
    String Email = "";
    String Phone = "";
    String ImageUrl = "";

    RebateCodeCustomerResponse({this.Id,this.Firstname,this.Lastname,this.Email,this.Phone,this.ImageUrl});
    RebateCodeCustomerResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Firstname = json['Firstname'];
        Lastname = json['Lastname'];
        Email = json['Email'];
        Phone = json['Phone'];
        ImageUrl = json['ImageUrl'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Firstname': Firstname,
        'Lastname': Lastname,
        'Email': Email,
        'Phone': Phone,
        'ImageUrl': ImageUrl
    };

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

class RebateCodeTransactionQueryResponse implements IConvertible
{
    int Id = 0;
    String CompanyId = "";
    String Note = "";
    int RebateCodeId = 0;
    String RebateCodeSign = "";
    int? RebateCodeTypeId;
    String RebateCodeTypeName = "";
    double Amount = 0;
    String Usage = "";
    int? BookingId;
    DateTime UpdatedDate = DateTime(0);
    DateTime CreatedDate = DateTime(0);
    RebateCodeServiceResponse Service;
    RebateCodeCustomerResponse Customer;
    String PriceSign = "";

    RebateCodeTransactionQueryResponse({this.Id,this.CompanyId,this.Note,this.RebateCodeId,this.RebateCodeSign,this.RebateCodeTypeId,this.RebateCodeTypeName,this.Amount,this.Usage,this.BookingId,this.UpdatedDate,this.CreatedDate,this.Service,this.Customer,this.PriceSign});
    RebateCodeTransactionQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        CompanyId = json['CompanyId'];
        Note = json['Note'];
        RebateCodeId = json['RebateCodeId'];
        RebateCodeSign = json['RebateCodeSign'];
        RebateCodeTypeId = json['RebateCodeTypeId'];
        RebateCodeTypeName = json['RebateCodeTypeName'];
        Amount = JsonConverters.toDouble(json['Amount']);
        Usage = json['Usage'];
        BookingId = json['BookingId'];
        UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!);
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        Service = JsonConverters.fromJson(json['Service'],'RebateCodeServiceResponse',context!);
        Customer = JsonConverters.fromJson(json['Customer'],'RebateCodeCustomerResponse',context!);
        PriceSign = json['PriceSign'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CompanyId': CompanyId,
        'Note': Note,
        'RebateCodeId': RebateCodeId,
        'RebateCodeSign': RebateCodeSign,
        'RebateCodeTypeId': RebateCodeTypeId,
        'RebateCodeTypeName': RebateCodeTypeName,
        'Amount': Amount,
        'Usage': Usage,
        'BookingId': BookingId,
        'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!),
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'Service': JsonConverters.toJson(Service,'RebateCodeServiceResponse',context!),
        'Customer': JsonConverters.toJson(Customer,'RebateCodeCustomerResponse',context!),
        'PriceSign': PriceSign
    };

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

class RebateCodeCompanyResponse implements IConvertible
{
    String SitePath = "";
    int? PaymentProviderId;

    RebateCodeCompanyResponse({this.SitePath,this.PaymentProviderId});
    RebateCodeCompanyResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        SitePath = json['SitePath'];
        PaymentProviderId = json['PaymentProviderId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'SitePath': SitePath,
        'PaymentProviderId': PaymentProviderId
    };

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

class RebateCodeResponse implements IConvertible
{
    int Id = 0;
    String? CompanyId;
    DateTime ValidFrom = DateTime(0);
    DateTime ValidTo = DateTime(0);
    /**
    * If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.
    */
    // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.")
    Duration FromTime;

    /**
    * If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.
    */
    // @ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.")
    Duration ToTime;

    String CreatedBy = "";
    DateTime Created = DateTime(0);
    String UpdatedBy = "";
    DateTime Updated = DateTime(0);
    String PersonalNote = "";
    String RebateCodeSign = "";
    int RebateCodeValue = 0;
    int RebateCodeTypeId = 0;
    String Name = "";
    int RebateCodeStatusId = 0;
    String StatusName = "";
    int MaxNumberOfUses = 0;
    int MaxNumberOfUsesPerCustomer = 0;
    int NumberOfUsesUsed = 0;
    List<DaysOfWeekResponse> DaysOfWeek = [];
    List<RebateCodeServiceResponse> Services = [];
    ArticleResponse Article;
    List<RebateCodeTransactionQueryResponse> Transactions = [];
    double? RemainingAmount;
    int? RemainingUsage;
    List<RebateCodeCustomerResponse> Customers = [];
    ResponseStatus ResponseStatus;
    bool PaymentReceived;
    String RebateCodeCurrencySign = "";
    bool ActiveByStatus;
    String PriceSign = "";
    String RebateCodeTypeName = "";
    RebateCodeCompanyResponse Company;

    RebateCodeResponse({this.Id,this.CompanyId,this.ValidFrom,this.ValidTo,this.FromTime,this.ToTime,this.CreatedBy,this.Created,this.UpdatedBy,this.Updated,this.PersonalNote,this.RebateCodeSign,this.RebateCodeValue,this.RebateCodeTypeId,this.Name,this.RebateCodeStatusId,this.StatusName,this.MaxNumberOfUses,this.MaxNumberOfUsesPerCustomer,this.NumberOfUsesUsed,this.DaysOfWeek,this.Services,this.Article,this.Transactions,this.RemainingAmount,this.RemainingUsage,this.Customers,this.ResponseStatus,this.PaymentReceived,this.RebateCodeCurrencySign,this.ActiveByStatus,this.PriceSign,this.RebateCodeTypeName,this.Company});
    RebateCodeResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        CompanyId = json['CompanyId'];
        ValidFrom = JsonConverters.fromJson(json['ValidFrom'],'DateTime',context!);
        ValidTo = JsonConverters.fromJson(json['ValidTo'],'DateTime',context!);
        FromTime = JsonConverters.fromJson(json['FromTime'],'Duration',context!);
        ToTime = JsonConverters.fromJson(json['ToTime'],'Duration',context!);
        CreatedBy = json['CreatedBy'];
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        UpdatedBy = json['UpdatedBy'];
        Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!);
        PersonalNote = json['PersonalNote'];
        RebateCodeSign = json['RebateCodeSign'];
        RebateCodeValue = json['RebateCodeValue'];
        RebateCodeTypeId = json['RebateCodeTypeId'];
        Name = json['Name'];
        RebateCodeStatusId = json['RebateCodeStatusId'];
        StatusName = json['StatusName'];
        MaxNumberOfUses = json['MaxNumberOfUses'];
        MaxNumberOfUsesPerCustomer = json['MaxNumberOfUsesPerCustomer'];
        NumberOfUsesUsed = json['NumberOfUsesUsed'];
        DaysOfWeek = JsonConverters.fromJson(json['DaysOfWeek'],'List<DaysOfWeekResponse>',context!);
        Services = JsonConverters.fromJson(json['Services'],'List<RebateCodeServiceResponse>',context!);
        Article = JsonConverters.fromJson(json['Article'],'ArticleResponse',context!);
        Transactions = JsonConverters.fromJson(json['Transactions'],'List<RebateCodeTransactionQueryResponse>',context!);
        RemainingAmount = JsonConverters.toDouble(json['RemainingAmount']);
        RemainingUsage = json['RemainingUsage'];
        Customers = JsonConverters.fromJson(json['Customers'],'List<RebateCodeCustomerResponse>',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        PaymentReceived = json['PaymentReceived'];
        RebateCodeCurrencySign = json['RebateCodeCurrencySign'];
        ActiveByStatus = json['ActiveByStatus'];
        PriceSign = json['PriceSign'];
        RebateCodeTypeName = json['RebateCodeTypeName'];
        Company = JsonConverters.fromJson(json['Company'],'RebateCodeCompanyResponse',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CompanyId': CompanyId,
        'ValidFrom': JsonConverters.toJson(ValidFrom,'DateTime',context!),
        'ValidTo': JsonConverters.toJson(ValidTo,'DateTime',context!),
        'FromTime': JsonConverters.toJson(FromTime,'Duration',context!),
        'ToTime': JsonConverters.toJson(ToTime,'Duration',context!),
        'CreatedBy': CreatedBy,
        'Created': JsonConverters.toJson(Created,'DateTime',context!),
        'UpdatedBy': UpdatedBy,
        'Updated': JsonConverters.toJson(Updated,'DateTime',context!),
        'PersonalNote': PersonalNote,
        'RebateCodeSign': RebateCodeSign,
        'RebateCodeValue': RebateCodeValue,
        'RebateCodeTypeId': RebateCodeTypeId,
        'Name': Name,
        'RebateCodeStatusId': RebateCodeStatusId,
        'StatusName': StatusName,
        'MaxNumberOfUses': MaxNumberOfUses,
        'MaxNumberOfUsesPerCustomer': MaxNumberOfUsesPerCustomer,
        'NumberOfUsesUsed': NumberOfUsesUsed,
        'DaysOfWeek': JsonConverters.toJson(DaysOfWeek,'List<DaysOfWeekResponse>',context!),
        'Services': JsonConverters.toJson(Services,'List<RebateCodeServiceResponse>',context!),
        'Article': JsonConverters.toJson(Article,'ArticleResponse',context!),
        'Transactions': JsonConverters.toJson(Transactions,'List<RebateCodeTransactionQueryResponse>',context!),
        'RemainingAmount': RemainingAmount,
        'RemainingUsage': RemainingUsage,
        'Customers': JsonConverters.toJson(Customers,'List<RebateCodeCustomerResponse>',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'PaymentReceived': PaymentReceived,
        'RebateCodeCurrencySign': RebateCodeCurrencySign,
        'ActiveByStatus': ActiveByStatus,
        'PriceSign': PriceSign,
        'RebateCodeTypeName': RebateCodeTypeName,
        'Company': JsonConverters.toJson(Company,'RebateCodeCompanyResponse',context!)
    };

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

class CustomerBase implements ICustomerBase, IConvertible
{
    String? CustomerId;
    String Firstname = "";
    String Lastname = "";
    String Email = "";
    String Phone = "";
    bool SubscribedToNewsletter;
    String PersonalIdentityNumber = "";

    CustomerBase({this.CustomerId,this.Firstname,this.Lastname,this.Email,this.Phone,this.SubscribedToNewsletter,this.PersonalIdentityNumber});
    CustomerBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CustomerId = json['CustomerId'];
        Firstname = json['Firstname'];
        Lastname = json['Lastname'];
        Email = json['Email'];
        Phone = json['Phone'];
        SubscribedToNewsletter = json['SubscribedToNewsletter'];
        PersonalIdentityNumber = json['PersonalIdentityNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CustomerId': CustomerId,
        'Firstname': Firstname,
        'Lastname': Lastname,
        'Email': Email,
        'Phone': Phone,
        'SubscribedToNewsletter': SubscribedToNewsletter,
        'PersonalIdentityNumber': PersonalIdentityNumber
    };

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

class CustomerToHandle extends CustomerBase implements IConvertible
{
    CustomerToHandle();
    CustomerToHandle.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "CustomerToHandle";
    TypeContext? context = _ctx;
}

class InvoiceAddressToHandle implements IInvoiceAddress, IConvertible
{
    String CorporateIdentityNumber = "";
    String InvoiceAddress1 = "";
    String InvoiceAddress2 = "";
    String InvoiceCity = "";
    String InvoicePostalCode = "";
    String InvoiceCountryCode = "";

    InvoiceAddressToHandle({this.CorporateIdentityNumber,this.InvoiceAddress1,this.InvoiceAddress2,this.InvoiceCity,this.InvoicePostalCode,this.InvoiceCountryCode});
    InvoiceAddressToHandle.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CorporateIdentityNumber = json['CorporateIdentityNumber'];
        InvoiceAddress1 = json['InvoiceAddress1'];
        InvoiceAddress2 = json['InvoiceAddress2'];
        InvoiceCity = json['InvoiceCity'];
        InvoicePostalCode = json['InvoicePostalCode'];
        InvoiceCountryCode = json['InvoiceCountryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CorporateIdentityNumber': CorporateIdentityNumber,
        'InvoiceAddress1': InvoiceAddress1,
        'InvoiceAddress2': InvoiceAddress2,
        'InvoiceCity': InvoiceCity,
        'InvoicePostalCode': InvoicePostalCode,
        'InvoiceCountryCode': InvoiceCountryCode
    };

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

class PromoCodeReceiver implements IConvertible
{
    String? CustomerId;
    String Firstname = "";
    String Lastname = "";
    String Email = "";
    String ReceiverMessage = "";

    PromoCodeReceiver({this.CustomerId,this.Firstname,this.Lastname,this.Email,this.ReceiverMessage});
    PromoCodeReceiver.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CustomerId = json['CustomerId'];
        Firstname = json['Firstname'];
        Lastname = json['Lastname'];
        Email = json['Email'];
        ReceiverMessage = json['ReceiverMessage'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CustomerId': CustomerId,
        'Firstname': Firstname,
        'Lastname': Lastname,
        'Email': Email,
        'ReceiverMessage': ReceiverMessage
    };

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

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
class CreateArticleRebateCode implements ICompany, IConvertible
{
    /**
    * 
    */
    // @ApiMember(Description="")
    String? CompanyId;

    /**
    * Article ID for the rebate code
    */
    // @ApiMember(Description="Article ID for the rebate code", IsRequired=true)
    int ArticleId = 0;

    /**
    * Customer information
    */
    // @ApiMember(Description="Customer information")
    CustomerToHandle Customer;

    /**
    * If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinairy profile. 
    */
    // @ApiMember(Description="If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinairy profile. ")
    InvoiceAddressToHandle InvoiceAddress;

    /**
    * Promo code receiver information
    */
    // @ApiMember(Description="Promo code receiver information")
    PromoCodeReceiver Receiver;

    CreateArticleRebateCode({this.CompanyId,this.ArticleId,this.Customer,this.InvoiceAddress,this.Receiver});
    CreateArticleRebateCode.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        ArticleId = json['ArticleId'];
        Customer = JsonConverters.fromJson(json['Customer'],'CustomerToHandle',context!);
        InvoiceAddress = JsonConverters.fromJson(json['InvoiceAddress'],'InvoiceAddressToHandle',context!);
        Receiver = JsonConverters.fromJson(json['Receiver'],'PromoCodeReceiver',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'ArticleId': ArticleId,
        'Customer': JsonConverters.toJson(Customer,'CustomerToHandle',context!),
        'InvoiceAddress': JsonConverters.toJson(InvoiceAddress,'InvoiceAddressToHandle',context!),
        'Receiver': JsonConverters.toJson(Receiver,'PromoCodeReceiver',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'DaysOfWeekResponse': TypeInfo(TypeOf.Class, create:() => DaysOfWeekResponse()),
    'RebateCodeServiceResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeServiceResponse()),
    'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()),
    'ArticleServiceRelation': TypeInfo(TypeOf.Class, create:() => ArticleServiceRelation()),
    'ArticleResponse': TypeInfo(TypeOf.Class, create:() => ArticleResponse()),
    'List<ArticleServiceRelation>': TypeInfo(TypeOf.Class, create:() => <ArticleServiceRelation>[]),
    'RebateCodeCustomerResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeCustomerResponse()),
    'RebateCodeTransactionQueryResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeTransactionQueryResponse()),
    'RebateCodeCompanyResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeCompanyResponse()),
    'RebateCodeResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeResponse()),
    'List<DaysOfWeekResponse>': TypeInfo(TypeOf.Class, create:() => <DaysOfWeekResponse>[]),
    'List<RebateCodeServiceResponse>': TypeInfo(TypeOf.Class, create:() => <RebateCodeServiceResponse>[]),
    'List<RebateCodeTransactionQueryResponse>': TypeInfo(TypeOf.Class, create:() => <RebateCodeTransactionQueryResponse>[]),
    'List<RebateCodeCustomerResponse>': TypeInfo(TypeOf.Class, create:() => <RebateCodeCustomerResponse>[]),
    'CustomerBase': TypeInfo(TypeOf.Class, create:() => CustomerBase()),
    'CustomerToHandle': TypeInfo(TypeOf.Class, create:() => CustomerToHandle()),
    'InvoiceAddressToHandle': TypeInfo(TypeOf.Class, create:() => InvoiceAddressToHandle()),
    'PromoCodeReceiver': TypeInfo(TypeOf.Class, create:() => PromoCodeReceiver()),
    'CreateArticleRebateCode': TypeInfo(TypeOf.Class, create:() => CreateArticleRebateCode()),
});

Dart CreateArticleRebateCode DTOs

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

HTTP + XML

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

POST /rebatecodes/fromarticle HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateArticleRebateCode xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <ArticleId>0</ArticleId>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <Customer>
    <CustomerId xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">00000000-0000-0000-0000-000000000000</CustomerId>
    <Email xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">String</Email>
    <Firstname xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">String</Firstname>
    <Lastname xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">String</Lastname>
    <PersonalIdentityNumber xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">String</PersonalIdentityNumber>
    <Phone xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">String</Phone>
    <SubscribedToNewsletter xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos.Commons">false</SubscribedToNewsletter>
  </Customer>
  <InvoiceAddress>
    <CorporateIdentityNumber>String</CorporateIdentityNumber>
    <InvoiceAddress1>String</InvoiceAddress1>
    <InvoiceAddress2>String</InvoiceAddress2>
    <InvoiceCity>String</InvoiceCity>
    <InvoiceCountryCode>String</InvoiceCountryCode>
    <InvoicePostalCode>String</InvoicePostalCode>
  </InvoiceAddress>
  <Receiver>
    <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
    <Email>String</Email>
    <Firstname>String</Firstname>
    <Lastname>String</Lastname>
    <ReceiverMessage>String</ReceiverMessage>
  </Receiver>
</CreateArticleRebateCode>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<RebateCodeResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <ActiveByStatus>false</ActiveByStatus>
  <Article>
    <Active>false</Active>
    <Amount>0</Amount>
    <ArticleTypeId>0</ArticleTypeId>
    <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
    <CreatedDate>0001-01-01T00:00:00</CreatedDate>
    <CurrencyId>String</CurrencyId>
    <Description>String</Description>
    <Id>0</Id>
    <ImageUrl>String</ImageUrl>
    <Name>String</Name>
    <Price>0</Price>
    <PriceSign>String</PriceSign>
    <ServiceIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>0</d3p1:int>
    </ServiceIds>
    <Services xmlns:d3p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Db">
      <d3p1:ArticleServiceRelation>
        <d3p1:ArticleId>0</d3p1:ArticleId>
        <d3p1:CompanyId>00000000-0000-0000-0000-000000000000</d3p1:CompanyId>
        <d3p1:Id>0</d3p1:Id>
        <d3p1:ServiceId>0</d3p1:ServiceId>
      </d3p1:ArticleServiceRelation>
    </Services>
    <SortOrder>0</SortOrder>
    <UpdatedDate>0001-01-01T00:00:00</UpdatedDate>
    <VAT>0</VAT>
  </Article>
  <Company>
    <PaymentProviderId>0</PaymentProviderId>
    <SitePath>String</SitePath>
  </Company>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <Created>0001-01-01T00:00:00</Created>
  <CreatedBy>String</CreatedBy>
  <Customers>
    <RebateCodeCustomerResponse>
      <Email>String</Email>
      <Firstname>String</Firstname>
      <Id>00000000-0000-0000-0000-000000000000</Id>
      <ImageUrl>String</ImageUrl>
      <Lastname>String</Lastname>
      <Phone>String</Phone>
    </RebateCodeCustomerResponse>
  </Customers>
  <DaysOfWeek>
    <DaysOfWeekResponse>
      <DayOfWeek>String</DayOfWeek>
      <DayOfWeekActive>false</DayOfWeekActive>
      <DayOfWeekSortOrder>0</DayOfWeekSortOrder>
      <DayOfWeekTranslation>String</DayOfWeekTranslation>
      <Id>0</Id>
    </DaysOfWeekResponse>
  </DaysOfWeek>
  <FromTime>PT0S</FromTime>
  <Id>0</Id>
  <MaxNumberOfUses>0</MaxNumberOfUses>
  <MaxNumberOfUsesPerCustomer>0</MaxNumberOfUsesPerCustomer>
  <Name>String</Name>
  <NumberOfUsesUsed>0</NumberOfUsesUsed>
  <PaymentReceived>false</PaymentReceived>
  <PersonalNote>String</PersonalNote>
  <PriceSign>String</PriceSign>
  <RebateCodeCurrencySign>String</RebateCodeCurrencySign>
  <RebateCodeSign>String</RebateCodeSign>
  <RebateCodeStatusId>0</RebateCodeStatusId>
  <RebateCodeTypeId>0</RebateCodeTypeId>
  <RebateCodeTypeName>String</RebateCodeTypeName>
  <RebateCodeValue>0</RebateCodeValue>
  <RemainingAmount>0</RemainingAmount>
  <RemainingUsage>0</RemainingUsage>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <Services>
    <RebateCodeServiceResponse>
      <Active>false</Active>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </RebateCodeServiceResponse>
  </Services>
  <StatusName>String</StatusName>
  <ToTime>PT0S</ToTime>
  <Transactions>
    <RebateCodeTransactionQueryResponse>
      <Amount>0</Amount>
      <BookingId>0</BookingId>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <CreatedDate>0001-01-01T00:00:00</CreatedDate>
      <Customer>
        <Email>String</Email>
        <Firstname>String</Firstname>
        <Id>00000000-0000-0000-0000-000000000000</Id>
        <ImageUrl>String</ImageUrl>
        <Lastname>String</Lastname>
        <Phone>String</Phone>
      </Customer>
      <Id>0</Id>
      <Note>String</Note>
      <PriceSign>String</PriceSign>
      <RebateCodeId>0</RebateCodeId>
      <RebateCodeSign>String</RebateCodeSign>
      <RebateCodeTypeId>0</RebateCodeTypeId>
      <RebateCodeTypeName>String</RebateCodeTypeName>
      <Service>
        <Active>false</Active>
        <Description>String</Description>
        <Id>0</Id>
        <Name>String</Name>
      </Service>
      <UpdatedDate>0001-01-01T00:00:00</UpdatedDate>
      <Usage>String</Usage>
    </RebateCodeTransactionQueryResponse>
  </Transactions>
  <Updated>0001-01-01T00:00:00</Updated>
  <UpdatedBy>String</UpdatedBy>
  <ValidFrom>0001-01-01T00:00:00</ValidFrom>
  <ValidTo>0001-01-01T00:00:00</ValidTo>
</RebateCodeResponse>