BokaMera.API.Host

<back to all web services

GetVossPackage

The following routes are available for this service:
GET/voss/packagesget voss package
import 'package:servicestack/servicestack.dart';

enum PackageStatusEnum
{
    Draft,
    Staged,
    Published,
    Archived,
    Discarded,
}

enum ProductGroupTypeEnum
{
    Optional,
    Included,
}

enum TypeEnum
{
    AtSubscriptionBillingPeriodEnd,
    AtBindingPeriodEnd,
}

// @DataContract(Name="ProductGroupTagDto")
class ProductGroupTagDto implements IConvertible
{
    // @DataMember(Name="type", IsRequired=true)
    TypeEnum type;

    // @DataMember(Name="tag", IsRequired=true)
    String tag = "";

    ProductGroupTagDto({this.type,this.tag});
    ProductGroupTagDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        type = JsonConverters.fromJson(json['Type'],'TypeEnum',context!);
        tag = json['Tag'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'type': JsonConverters.toJson(type,'TypeEnum',context!),
        'tag': tag
    };

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

enum ProductTypeEnum
{
    Main,
    Addon,
    License,
    Usage,
}

enum StatusEnum
{
    Active,
    Terminated,
}

// @DataContract(Name="PackageProductDto")
class PackageProductDto implements IConvertible
{
    // @DataMember(Name="type", IsRequired=true)
    ProductTypeEnum type;

    // @DataMember(Name="status", IsRequired=true)
    StatusEnum status;

    // @DataMember(Name="id", IsRequired=true)
    String id = "";

    // @DataMember(Name="name", IsRequired=true)
    String name = "";

    // @DataMember(Name="externalId")
    String externalId = "";

    // @DataMember(Name="articleNumber")
    String articleNumber = "";

    PackageProductDto({this.type,this.status,this.id,this.name,this.externalId,this.articleNumber});
    PackageProductDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        type = JsonConverters.fromJson(json['ProductType'],'ProductTypeEnum',context!);
        status = JsonConverters.fromJson(json['Status'],'StatusEnum',context!);
        id = json['Id'];
        name = json['Name'];
        externalId = json['ExternalId'];
        articleNumber = json['ArticleNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'type': JsonConverters.toJson(type,'ProductTypeEnum',context!),
        'status': JsonConverters.toJson(status,'StatusEnum',context!),
        'id': id,
        'name': name,
        'externalId': externalId,
        'articleNumber': articleNumber
    };

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

// @DataContract(Name="PackageProductGroupDto")
class PackageProductGroupDto implements IConvertible
{
    // @DataMember(Name="productGroupType", IsRequired=true)
    ProductGroupTypeEnum productGroupType;

    // @DataMember(Name="id", IsRequired=true)
    String id = "";

    // @DataMember(Name="name", IsRequired=true)
    String name = "";

    // @DataMember(Name="externalId")
    String externalId = "";

    // @DataMember(Name="tags", EmitDefaultValue=false)
    List<ProductGroupTagDto> tags = [];

    // @DataMember(Name="products", EmitDefaultValue=false)
    List<PackageProductDto> products = [];

    PackageProductGroupDto({this.productGroupType,this.id,this.name,this.externalId,this.tags,this.products});
    PackageProductGroupDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        productGroupType = JsonConverters.fromJson(json['ProductGroupType'],'ProductGroupTypeEnum',context!);
        id = json['Id'];
        name = json['Name'];
        externalId = json['ExternalId'];
        tags = JsonConverters.fromJson(json['Tags'],'List<ProductGroupTagDto>',context!);
        products = JsonConverters.fromJson(json['Products'],'List<PackageProductDto>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'productGroupType': JsonConverters.toJson(productGroupType,'ProductGroupTypeEnum',context!),
        'id': id,
        'name': name,
        'externalId': externalId,
        'tags': JsonConverters.toJson(tags,'List<ProductGroupTagDto>',context!),
        'products': JsonConverters.toJson(products,'List<PackageProductDto>',context!)
    };

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

// @DataContract(Name="PackageTierDto")
class PackageTierDto implements IConvertible
{
    // @DataMember(Name="id", IsRequired=true)
    String id = "";

    // @DataMember(Name="name", IsRequired=true)
    String name = "";

    // @DataMember(Name="externalId")
    String externalId = "";

    // @DataMember(Name="productGroups", EmitDefaultValue=false)
    List<PackageProductGroupDto> productGroups = [];

    PackageTierDto({this.id,this.name,this.externalId,this.productGroups});
    PackageTierDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['Id'];
        name = json['Name'];
        externalId = json['ExternalId'];
        productGroups = JsonConverters.fromJson(json['ProductGroups'],'List<PackageProductGroupDto>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'externalId': externalId,
        'productGroups': JsonConverters.toJson(productGroups,'List<PackageProductGroupDto>',context!)
    };

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

enum PeriodEndActionEnum
{
    Renew,
    Terminate,
}

enum UnitEnum
{
    Day,
    Month,
    Year,
}

// @DataContract(Name="TimeLengthDto")
class TimeLengthDto implements IConvertible
{
    // @DataMember(Name="unit", IsRequired=true)
    UnitEnum unit;

    // @DataMember(Name="value", EmitDefaultValue=false)
    int value = 0;

    TimeLengthDto({this.unit,this.value});
    TimeLengthDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        unit = JsonConverters.fromJson(json['Unit'],'UnitEnum',context!);
        value = json['Value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'unit': JsonConverters.toJson(unit,'UnitEnum',context!),
        'value': value
    };

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

// @DataContract(Name="BindingPeriodCycleDto")
class BindingPeriodCycleDto implements IConvertible
{
    // @DataMember(Name="periodEndAction", IsRequired=true)
    PeriodEndActionEnum periodEndAction;

    // @DataMember(Name="length", IsRequired=true)
    TimeLengthDto length;

    BindingPeriodCycleDto({this.periodEndAction,this.length});
    BindingPeriodCycleDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        periodEndAction = JsonConverters.fromJson(json['PeriodEndAction'],'PeriodEndActionEnum',context!);
        length = JsonConverters.fromJson(json['Length'],'TimeLengthDto',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'periodEndAction': JsonConverters.toJson(periodEndAction,'PeriodEndActionEnum',context!),
        'length': JsonConverters.toJson(length,'TimeLengthDto',context!)
    };

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

enum PeriodAnchorEnum
{
    PeriodCreated,
    PeriodStart,
    PeriodEnd,
}

// @DataContract(Name="PeriodDateOffsetDto")
class PeriodDateOffsetDto implements IConvertible
{
    // @DataMember(Name="periodAnchor", IsRequired=true)
    PeriodAnchorEnum periodAnchor;

    // @DataMember(Name="length", IsRequired=true)
    TimeLengthDto length;

    // @DataMember(Name="valueAnchor")
    int? valueAnchor;

    PeriodDateOffsetDto({this.periodAnchor,this.length,this.valueAnchor});
    PeriodDateOffsetDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        periodAnchor = JsonConverters.fromJson(json['PeriodAnchor'],'PeriodAnchorEnum',context!);
        length = JsonConverters.fromJson(json['Length'],'TimeLengthDto',context!);
        valueAnchor = json['ValueAnchor'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'periodAnchor': JsonConverters.toJson(periodAnchor,'PeriodAnchorEnum',context!),
        'length': JsonConverters.toJson(length,'TimeLengthDto',context!),
        'valueAnchor': valueAnchor
    };

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

// @DataContract(Name="BillingPeriodCycleDto")
class BillingPeriodCycleDto implements IConvertible
{
    // @DataMember(Name="length", IsRequired=true)
    TimeLengthDto length;

    // @DataMember(Name="invoiceDateOffset", IsRequired=true)
    PeriodDateOffsetDto invoiceDateOffset;

    // @DataMember(Name="renewalDateOffset", IsRequired=true)
    PeriodDateOffsetDto renewalDateOffset;

    BillingPeriodCycleDto({this.length,this.invoiceDateOffset,this.renewalDateOffset});
    BillingPeriodCycleDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        length = JsonConverters.fromJson(json['Length'],'TimeLengthDto',context!);
        invoiceDateOffset = JsonConverters.fromJson(json['InvoiceDateOffset'],'PeriodDateOffsetDto',context!);
        renewalDateOffset = JsonConverters.fromJson(json['RenewalDateOffset'],'PeriodDateOffsetDto',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'length': JsonConverters.toJson(length,'TimeLengthDto',context!),
        'invoiceDateOffset': JsonConverters.toJson(invoiceDateOffset,'PeriodDateOffsetDto',context!),
        'renewalDateOffset': JsonConverters.toJson(renewalDateOffset,'PeriodDateOffsetDto',context!)
    };

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

// @DataContract(Name="PackagePlanDto")
class PackagePlanDto implements IConvertible
{
    // @DataMember(Name="id", IsRequired=true)
    String id = "";

    // @DataMember(Name="name", IsRequired=true)
    String name = "";

    // @DataMember(Name="externalId")
    String externalId = "";

    // @DataMember(Name="bindingPeriodCycle", IsRequired=true)
    BindingPeriodCycleDto bindingPeriodCycle;

    // @DataMember(Name="subscriptionBillingPeriodCycle", IsRequired=true)
    BillingPeriodCycleDto subscriptionBillingPeriodCycle;

    // @DataMember(Name="usageBillingPeriodCycle", IsRequired=true)
    BillingPeriodCycleDto usageBillingPeriodCycle;

    PackagePlanDto({this.id,this.name,this.externalId,this.bindingPeriodCycle,this.subscriptionBillingPeriodCycle,this.usageBillingPeriodCycle});
    PackagePlanDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['Id'];
        name = json['Name'];
        externalId = json['ExternalId'];
        bindingPeriodCycle = JsonConverters.fromJson(json['BindingPeriodCycle'],'BindingPeriodCycleDto',context!);
        subscriptionBillingPeriodCycle = JsonConverters.fromJson(json['SubscriptionBillingPeriodCycle'],'BillingPeriodCycleDto',context!);
        usageBillingPeriodCycle = JsonConverters.fromJson(json['UsageBillingPeriodCycle'],'BillingPeriodCycleDto',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'externalId': externalId,
        'bindingPeriodCycle': JsonConverters.toJson(bindingPeriodCycle,'BindingPeriodCycleDto',context!),
        'subscriptionBillingPeriodCycle': JsonConverters.toJson(subscriptionBillingPeriodCycle,'BillingPeriodCycleDto',context!),
        'usageBillingPeriodCycle': JsonConverters.toJson(usageBillingPeriodCycle,'BillingPeriodCycleDto',context!)
    };

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

enum PricingSchemeEnum
{
    UnitPricing,
    TierPricing,
}

// @DataContract(Name="ProductTierPricingDto")
class ProductTierPricingDto implements IConvertible
{
    // @DataMember(Name="index", EmitDefaultValue=false)
    int index = 0;

    // @DataMember(Name="unitPrice", EmitDefaultValue=false)
    double unitPrice = 0;

    // @DataMember(Name="flatPrice", EmitDefaultValue=false)
    double flatPrice = 0;

    // @DataMember(Name="repeatEvery")
    int? repeatEvery;

    // @DataMember(Name="upperLimit")
    int? upperLimit;

    ProductTierPricingDto({this.index,this.unitPrice,this.flatPrice,this.repeatEvery,this.upperLimit});
    ProductTierPricingDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        index = json['Index'];
        unitPrice = JsonConverters.toDouble(json['UnitPrice']);
        flatPrice = JsonConverters.toDouble(json['FlatPrice']);
        repeatEvery = json['RepeatEvery'];
        upperLimit = json['UpperLimit'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'index': index,
        'unitPrice': unitPrice,
        'flatPrice': flatPrice,
        'repeatEvery': repeatEvery,
        'upperLimit': upperLimit
    };

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

// @DataContract(Name="ProductPricingDto")
class ProductPricingDto implements IConvertible
{
    // @DataMember(Name="pricingScheme", IsRequired=true)
    PricingSchemeEnum pricingScheme;

    // @DataMember(Name="productId", IsRequired=true)
    String productId = "";

    // @DataMember(Name="includedQuantity")
    int? includedQuantity;

    // @DataMember(Name="maxQuantity")
    int? maxQuantity;

    // @DataMember(Name="unitPrice")
    double? unitPrice;

    // @DataMember(Name="tierPricing", EmitDefaultValue=false)
    List<ProductTierPricingDto> tierPricing = [];

    // @DataMember(Name="articleNumber")
    String articleNumber = "";

    ProductPricingDto({this.pricingScheme,this.productId,this.includedQuantity,this.maxQuantity,this.unitPrice,this.tierPricing,this.articleNumber});
    ProductPricingDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        pricingScheme = JsonConverters.fromJson(json['PricingScheme'],'PricingSchemeEnum',context!);
        productId = json['ProductId'];
        includedQuantity = json['IncludedQuantity'];
        maxQuantity = json['MaxQuantity'];
        unitPrice = JsonConverters.toDouble(json['UnitPrice']);
        tierPricing = JsonConverters.fromJson(json['TierPricing'],'List<ProductTierPricingDto>',context!);
        articleNumber = json['ArticleNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'pricingScheme': JsonConverters.toJson(pricingScheme,'PricingSchemeEnum',context!),
        'productId': productId,
        'includedQuantity': includedQuantity,
        'maxQuantity': maxQuantity,
        'unitPrice': unitPrice,
        'tierPricing': JsonConverters.toJson(tierPricing,'List<ProductTierPricingDto>',context!),
        'articleNumber': articleNumber
    };

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

// @DataContract(Name="ProductGroupPricingDto")
class ProductGroupPricingDto implements IConvertible
{
    // @DataMember(Name="productGroupId", IsRequired=true)
    String productGroupId = "";

    // @DataMember(Name="articleNumber", IsRequired=true)
    String articleNumber = "";

    // @DataMember(Name="price", EmitDefaultValue=false)
    double price = 0;

    // @DataMember(Name="productPricings", EmitDefaultValue=false)
    List<ProductPricingDto> productPricings = [];

    ProductGroupPricingDto({this.productGroupId,this.articleNumber,this.price,this.productPricings});
    ProductGroupPricingDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        productGroupId = json['ProductGroupId'];
        articleNumber = json['ArticleNumber'];
        price = JsonConverters.toDouble(json['Price']);
        productPricings = JsonConverters.fromJson(json['ProductPricings'],'List<ProductPricingDto>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'productGroupId': productGroupId,
        'articleNumber': articleNumber,
        'price': price,
        'productPricings': JsonConverters.toJson(productPricings,'List<ProductPricingDto>',context!)
    };

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

// @DataContract(Name="PackageChargePlanDto")
class PackageChargePlanDto implements IConvertible
{
    // @DataMember(Name="id", IsRequired=true)
    String id = "";

    // @DataMember(Name="tierId", IsRequired=true)
    String tierId = "";

    // @DataMember(Name="planId", IsRequired=true)
    String planId = "";

    // @DataMember(Name="productGroupPricings", IsRequired=true)
    List<ProductGroupPricingDto> productGroupPricings = [];

    PackageChargePlanDto({this.id,this.tierId,this.planId,this.productGroupPricings});
    PackageChargePlanDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['Id'];
        tierId = json['TierId'];
        planId = json['PlanId'];
        productGroupPricings = JsonConverters.fromJson(json['ProductGroupPricings'],'List<ProductGroupPricingDto>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'tierId': tierId,
        'planId': planId,
        'productGroupPricings': JsonConverters.toJson(productGroupPricings,'List<ProductGroupPricingDto>',context!)
    };

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

// @DataContract(Name="PackageSalesChannelDto")
class PackageSalesChannelDto implements IConvertible
{
    // @DataMember(Name="id", IsRequired=true)
    String id = "";

    // @DataMember(Name="name", IsRequired=true)
    String name = "";

    // @DataMember(Name="description")
    String description = "";

    // @DataMember(Name="validFrom")
    DateTime? validFrom;

    // @DataMember(Name="validTo")
    DateTime? validTo;

    PackageSalesChannelDto({this.id,this.name,this.description,this.validFrom,this.validTo});
    PackageSalesChannelDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['Id'];
        name = json['Name'];
        description = json['Description'];
        validFrom = JsonConverters.fromJson(json['ValidFrom'],'DateTime',context!);
        validTo = JsonConverters.fromJson(json['ValidTo'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'description': description,
        'validFrom': JsonConverters.toJson(validFrom,'DateTime',context!),
        'validTo': JsonConverters.toJson(validTo,'DateTime',context!)
    };

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

// @DataContract(Name="PackageTargetGroupDto")
class PackageTargetGroupDto implements IConvertible
{
    // @DataMember(Name="id", IsRequired=true)
    String id = "";

    // @DataMember(Name="name", IsRequired=true)
    String name = "";

    // @DataMember(Name="isDefault")
    bool isDefault;

    // @DataMember(Name="externalId")
    String externalId = "";

    PackageTargetGroupDto({this.id,this.name,this.isDefault,this.externalId});
    PackageTargetGroupDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['Id'];
        name = json['Name'];
        isDefault = json['IsDefault'];
        externalId = json['ExternalId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'isDefault': isDefault,
        'externalId': externalId
    };

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

// @DataContract(Name="PackageScheduledChangeResultDto")
class PackageScheduledChangeResultDto implements IConvertible
{
    // @DataMember(Name="status")
    PackageStatusEnum? status;

    // @DataMember(Name="name")
    String name = "";

    PackageScheduledChangeResultDto({this.status,this.name});
    PackageScheduledChangeResultDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        status = JsonConverters.fromJson(json['Status'],'PackageStatusEnum',context!);
        name = json['Name'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'status': JsonConverters.toJson(status,'PackageStatusEnum',context!),
        'name': name
    };

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

// @DataContract(Name="PackageScheduledChangeResult")
class PackageScheduledChangeResult implements IConvertible
{
    // @DataMember(Name="status", IsRequired=true)
    StatusEnum status;

    // @DataMember(Name="id", IsRequired=true)
    String id = "";

    // @DataMember(Name="versionId", IsRequired=true)
    String versionId = "";

    // @DataMember(Name="package", EmitDefaultValue=false)
    PackageScheduledChangeResultDto package;

    // @DataMember(Name="scheduledDate", IsRequired=true)
    DateTime scheduledDate = DateTime(0);

    PackageScheduledChangeResult({this.status,this.id,this.versionId,this.package,this.scheduledDate});
    PackageScheduledChangeResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        status = JsonConverters.fromJson(json['Status'],'StatusEnum',context!);
        id = json['Id'];
        versionId = json['VersionId'];
        package = JsonConverters.fromJson(json['Package'],'PackageScheduledChangeResultDto',context!);
        scheduledDate = JsonConverters.fromJson(json['ScheduledDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'status': JsonConverters.toJson(status,'StatusEnum',context!),
        'id': id,
        'versionId': versionId,
        'package': JsonConverters.toJson(package,'PackageScheduledChangeResultDto',context!),
        'scheduledDate': JsonConverters.toJson(scheduledDate,'DateTime',context!)
    };

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

// @DataContract(Name="PackageResult")
class PackageResult implements IConvertible
{
    // @DataMember(Name="status", IsRequired=true)
    PackageStatusEnum status;

    // @DataMember(Name="id", IsRequired=true)
    String id = "";

    // @DataMember(Name="versionId", IsRequired=true)
    String versionId = "";

    // @DataMember(Name="sourceVersionId")
    String? sourceVersionId;

    // @DataMember(Name="name", IsRequired=true)
    String name = "";

    // @DataMember(Name="externalId")
    String externalId = "";

    // @DataMember(Name="tiers", IsRequired=true)
    List<PackageTierDto> tiers = [];

    // @DataMember(Name="plans", IsRequired=true)
    List<PackagePlanDto> plans = [];

    // @DataMember(Name="chargePlans", IsRequired=true)
    List<PackageChargePlanDto> chargePlans = [];

    // @DataMember(Name="salesChannels", IsRequired=true)
    List<PackageSalesChannelDto> salesChannels = [];

    // @DataMember(Name="targetGroups", IsRequired=true)
    List<PackageTargetGroupDto> targetGroups = [];

    // @DataMember(Name="scheduledChanges", IsRequired=true)
    List<PackageScheduledChangeResult> scheduledChanges = [];

    PackageResult({this.status,this.id,this.versionId,this.sourceVersionId,this.name,this.externalId,this.tiers,this.plans,this.chargePlans,this.salesChannels,this.targetGroups,this.scheduledChanges});
    PackageResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        status = JsonConverters.fromJson(json['PackageStatus'],'PackageStatusEnum',context!);
        id = json['Id'];
        versionId = json['VersionId'];
        sourceVersionId = json['SourceVersionId'];
        name = json['Name'];
        externalId = json['ExternalId'];
        tiers = JsonConverters.fromJson(json['Tiers'],'List<PackageTierDto>',context!);
        plans = JsonConverters.fromJson(json['Plans'],'List<PackagePlanDto>',context!);
        chargePlans = JsonConverters.fromJson(json['ChargePlans'],'List<PackageChargePlanDto>',context!);
        salesChannels = JsonConverters.fromJson(json['SalesChannels'],'List<PackageSalesChannelDto>',context!);
        targetGroups = JsonConverters.fromJson(json['TargetGroups'],'List<PackageTargetGroupDto>',context!);
        scheduledChanges = JsonConverters.fromJson(json['ScheduledChanges'],'List<PackageScheduledChangeResult>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'status': JsonConverters.toJson(status,'PackageStatusEnum',context!),
        'id': id,
        'versionId': versionId,
        'sourceVersionId': sourceVersionId,
        'name': name,
        'externalId': externalId,
        'tiers': JsonConverters.toJson(tiers,'List<PackageTierDto>',context!),
        'plans': JsonConverters.toJson(plans,'List<PackagePlanDto>',context!),
        'chargePlans': JsonConverters.toJson(chargePlans,'List<PackageChargePlanDto>',context!),
        'salesChannels': JsonConverters.toJson(salesChannels,'List<PackageSalesChannelDto>',context!),
        'targetGroups': JsonConverters.toJson(targetGroups,'List<PackageTargetGroupDto>',context!),
        'scheduledChanges': JsonConverters.toJson(scheduledChanges,'List<PackageScheduledChangeResult>',context!)
    };

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

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
class GetVossPackage implements IConvertible
{
    /**
    * The package id; if not passed the configured BokaMera package will be used.
    */
    // @ApiMember(Description="The package id; if not passed the configured BokaMera package will be used.")
    String? PackageId;

    GetVossPackage({this.PackageId});
    GetVossPackage.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'PackageStatusEnum': TypeInfo(TypeOf.Enum, enumValues:PackageStatusEnum.values),
    'ProductGroupTypeEnum': TypeInfo(TypeOf.Enum, enumValues:ProductGroupTypeEnum.values),
    'TypeEnum': TypeInfo(TypeOf.Enum, enumValues:TypeEnum.values),
    'ProductGroupTagDto': TypeInfo(TypeOf.Class, create:() => ProductGroupTagDto()),
    'ProductTypeEnum': TypeInfo(TypeOf.Enum, enumValues:ProductTypeEnum.values),
    'StatusEnum': TypeInfo(TypeOf.Enum, enumValues:StatusEnum.values),
    'PackageProductDto': TypeInfo(TypeOf.Class, create:() => PackageProductDto()),
    'PackageProductGroupDto': TypeInfo(TypeOf.Class, create:() => PackageProductGroupDto()),
    'List<ProductGroupTagDto>': TypeInfo(TypeOf.Class, create:() => <ProductGroupTagDto>[]),
    'List<PackageProductDto>': TypeInfo(TypeOf.Class, create:() => <PackageProductDto>[]),
    'PackageTierDto': TypeInfo(TypeOf.Class, create:() => PackageTierDto()),
    'List<PackageProductGroupDto>': TypeInfo(TypeOf.Class, create:() => <PackageProductGroupDto>[]),
    'PeriodEndActionEnum': TypeInfo(TypeOf.Enum, enumValues:PeriodEndActionEnum.values),
    'UnitEnum': TypeInfo(TypeOf.Enum, enumValues:UnitEnum.values),
    'TimeLengthDto': TypeInfo(TypeOf.Class, create:() => TimeLengthDto()),
    'BindingPeriodCycleDto': TypeInfo(TypeOf.Class, create:() => BindingPeriodCycleDto()),
    'PeriodAnchorEnum': TypeInfo(TypeOf.Enum, enumValues:PeriodAnchorEnum.values),
    'PeriodDateOffsetDto': TypeInfo(TypeOf.Class, create:() => PeriodDateOffsetDto()),
    'BillingPeriodCycleDto': TypeInfo(TypeOf.Class, create:() => BillingPeriodCycleDto()),
    'PackagePlanDto': TypeInfo(TypeOf.Class, create:() => PackagePlanDto()),
    'PricingSchemeEnum': TypeInfo(TypeOf.Enum, enumValues:PricingSchemeEnum.values),
    'ProductTierPricingDto': TypeInfo(TypeOf.Class, create:() => ProductTierPricingDto()),
    'ProductPricingDto': TypeInfo(TypeOf.Class, create:() => ProductPricingDto()),
    'List<ProductTierPricingDto>': TypeInfo(TypeOf.Class, create:() => <ProductTierPricingDto>[]),
    'ProductGroupPricingDto': TypeInfo(TypeOf.Class, create:() => ProductGroupPricingDto()),
    'List<ProductPricingDto>': TypeInfo(TypeOf.Class, create:() => <ProductPricingDto>[]),
    'PackageChargePlanDto': TypeInfo(TypeOf.Class, create:() => PackageChargePlanDto()),
    'List<ProductGroupPricingDto>': TypeInfo(TypeOf.Class, create:() => <ProductGroupPricingDto>[]),
    'PackageSalesChannelDto': TypeInfo(TypeOf.Class, create:() => PackageSalesChannelDto()),
    'PackageTargetGroupDto': TypeInfo(TypeOf.Class, create:() => PackageTargetGroupDto()),
    'PackageScheduledChangeResultDto': TypeInfo(TypeOf.Class, create:() => PackageScheduledChangeResultDto()),
    'PackageScheduledChangeResult': TypeInfo(TypeOf.Class, create:() => PackageScheduledChangeResult()),
    'PackageResult': TypeInfo(TypeOf.Class, create:() => PackageResult()),
    'List<PackageTierDto>': TypeInfo(TypeOf.Class, create:() => <PackageTierDto>[]),
    'List<PackagePlanDto>': TypeInfo(TypeOf.Class, create:() => <PackagePlanDto>[]),
    'List<PackageChargePlanDto>': TypeInfo(TypeOf.Class, create:() => <PackageChargePlanDto>[]),
    'List<PackageSalesChannelDto>': TypeInfo(TypeOf.Class, create:() => <PackageSalesChannelDto>[]),
    'List<PackageTargetGroupDto>': TypeInfo(TypeOf.Class, create:() => <PackageTargetGroupDto>[]),
    'List<PackageScheduledChangeResult>': TypeInfo(TypeOf.Class, create:() => <PackageScheduledChangeResult>[]),
    'GetVossPackage': TypeInfo(TypeOf.Class, create:() => GetVossPackage()),
});

Dart GetVossPackage 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.

GET /voss/packages HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"status":"Draft","sourceVersionId":"00000000-0000-0000-0000-000000000000","name":"String","externalId":"String","tiers":[{}],"plans":[{}],"chargePlans":[{}],"salesChannels":[{}],"targetGroups":[{}],"scheduledChanges":[{}]}