| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| PUT | /voss/subscriptions/{SubscriptionId}/scheduledChanges/{Id} | Update voss subscription scheduled change | Update a pending subscription scheduled change in the VOSS System. Already executed scheduled changes cannot be updated. |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
using BokaMera.VossIntegration.ApiTools.Model;
namespace BokaMera.API.ServiceModel.Dtos
{
[ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)]
public partial class UpdateVossSubscriptionScheduledChange
{
///<summary>
///The subscription id
///</summary>
[ApiMember(Description="The subscription id", IsRequired=true)]
public virtual Guid SubscriptionId { get; set; }
///<summary>
///The subscription scheduled change id
///</summary>
[ApiMember(Description="The subscription scheduled change id", IsRequired=true)]
public virtual Guid Id { get; set; }
///<summary>
///Controls when the scheduled change will be executed: <br />AtSubscriptionBillingPeriodEnd - after the currently latest subscription billing period ends <br />AtBindingPeriodEnd - after the currently latest subscription binding period ends
///</summary>
[ApiMember(Description="Controls when the scheduled change will be executed: <br />AtSubscriptionBillingPeriodEnd - after the currently latest subscription billing period ends <br />AtBindingPeriodEnd - after the currently latest subscription binding period ends", IsRequired=true)]
public virtual TypeEnum Type { get; set; }
///<summary>
///Optional package version id; if omitted the current version of the subscription package is used
///</summary>
[ApiMember(Description="Optional package version id; if omitted the current version of the subscription package is used")]
public virtual Guid? VersionId { get; set; }
///<summary>
///The id of a package which will be active after the scheduled change is executed; if provided the tier id and plan id have to be provided as well
///</summary>
[ApiMember(Description="The id of a package which will be active after the scheduled change is executed; if provided the tier id and plan id have to be provided as well")]
public virtual Guid? PackageId { get; set; }
///<summary>
///The id of a tier which will be active after the scheduled change is executed; can be omitted if PlanId is provided instead
///</summary>
[ApiMember(Description="The id of a tier which will be active after the scheduled change is executed; can be omitted if PlanId is provided instead")]
public virtual Guid? TierId { get; set; }
///<summary>
///The id of a plan which will be active after the scheduled change is executed; can be omitted if TierId is provided instead
///</summary>
[ApiMember(Description="The id of a plan which will be active after the scheduled change is executed; can be omitted if TierId is provided instead")]
public virtual Guid? PlanId { get; set; }
///<summary>
///How many periods (counting from the latest period) must pass before the scheduled change is executed; if omitted the change is executed on the latest period end
///</summary>
[ApiMember(Description="How many periods (counting from the latest period) must pass before the scheduled change is executed; if omitted the change is executed on the latest period end")]
public virtual int? PeriodIterationCount { get; set; }
}
}
namespace BokaMera.VossIntegration.ApiTools.Model
{
[DataContract(Name="SubscriptionScheduledChangePackageResult")]
public partial class SubscriptionScheduledChangePackageResult
{
[DataMember(Name="id", IsRequired=true)]
public virtual Guid Id { get; set; }
[DataMember(Name="versionId", IsRequired=true)]
public virtual Guid VersionId { get; set; }
[DataMember(Name="name", IsRequired=true)]
public virtual string Name { get; set; }
}
[DataContract(Name="SubscriptionScheduledChangePlanResult")]
public partial class SubscriptionScheduledChangePlanResult
{
[DataMember(Name="id", IsRequired=true)]
public virtual Guid Id { get; set; }
[DataMember(Name="name", IsRequired=true)]
public virtual string Name { get; set; }
}
[DataContract(Name="SubscriptionScheduledChangeResult")]
public partial class SubscriptionScheduledChangeResult
{
[DataMember(Name="type")]
public virtual TypeEnum Type { get; set; }
[DataMember(Name="status", IsRequired=true)]
public virtual StatusEnum Status { get; set; }
[DataMember(Name="id", IsRequired=true)]
public virtual Guid Id { get; set; }
[DataMember(Name="package")]
public virtual SubscriptionScheduledChangePackageResult Package { get; set; }
[DataMember(Name="tier")]
public virtual SubscriptionScheduledChangeTierResult Tier { get; set; }
[DataMember(Name="plan")]
public virtual SubscriptionScheduledChangePlanResult Plan { get; set; }
[DataMember(Name="scheduledDate", IsRequired=true)]
public virtual DateTime ScheduledDate { get; set; }
[DataMember(Name="salesInformation")]
public virtual SubscriptionScheduledChangeSalesInformationResult SalesInformation { get; set; }
public enum TypeEnum
{
AtSubscriptionBillingPeriodEnd,
AtBindingPeriodEnd,
}
public enum StatusEnum
{
Active,
Terminated,
}
}
[DataContract(Name="SubscriptionScheduledChangeSalesInformationResult")]
public partial class SubscriptionScheduledChangeSalesInformationResult
{
[DataMember(Name="salesPersonId")]
public virtual string SalesPersonId { get; set; }
[DataMember(Name="salesDepartmentId")]
public virtual string SalesDepartmentId { get; set; }
}
[DataContract(Name="SubscriptionScheduledChangeTierResult")]
public partial class SubscriptionScheduledChangeTierResult
{
[DataMember(Name="id", IsRequired=true)]
public virtual Guid Id { get; set; }
[DataMember(Name="name", IsRequired=true)]
public virtual string Name { get; set; }
}
}
C# UpdateVossSubscriptionScheduledChange DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /voss/subscriptions/{SubscriptionId}/scheduledChanges/{Id} HTTP/1.1
Host: testapi.bokamera.se
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Type":"AtSubscriptionBillingPeriodEnd","VersionId":"00000000-0000-0000-0000-000000000000","PackageId":"00000000-0000-0000-0000-000000000000","TierId":"00000000-0000-0000-0000-000000000000","PlanId":"00000000-0000-0000-0000-000000000000","PeriodIterationCount":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"type":"AtSubscriptionBillingPeriodEnd","status":"Pending"}