BokaMera.API.Host

<back to all web services

CreatePresetBehaviour

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
POST/voss/presetBehaviourcreate preset behaviour in voss
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
open class CreatePresetBehaviour
{
    /**
    * Company ids to create invoice. If none added invoice for all will be created
    */
    @ApiMember(Description="Company ids to create invoice. If none added invoice for all will be created")
    open var ChangeType:ChangeTypeEnum? = null

    open var ChangeOperation:ChangeOperationEnum? = null
    open var Timing:SubscriptionTimingEnum? = null
    open var PeriodAnchor:PeriodAnchorEnum? = null
    open var RenewalTiming:RenewalTimingEnum? = null
    open var DebitBehaviour:SubscriptionBehaviourEnum? = null
    open var CreditBehaviour:SubscriptionBehaviourEnum? = null
    open var CreditKind:CreditKindEnum? = null
    open var PeriodIterationCount:Int? = null
}

enum class ChangeTypeEnum
{
    Subscription,
    ProductGroup,
    License,
}

enum class ChangeOperationEnum
{
    Create,
    Terminate,
    Upgrade,
    Sidegrade,
    Downgrade,
    Migration,
}

enum class SubscriptionTimingEnum
{
    AtSubscriptionBillingPeriodEnd,
    AtBindingPeriodEnd,
    Immediately,
}

enum class PeriodAnchorEnum
{
    LatestPeriod,
    CurrentPeriod,
}

enum class RenewalTimingEnum
{
    UseCurrentPlanRenewalDate,
    UseScheduledPlanRenewalDate,
}

enum class SubscriptionBehaviourEnum
{
    Prorate,
    Full,
    None,
}

enum class CreditKindEnum
{
    Normal,
    Internal,
}

Kotlin CreatePresetBehaviour 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 /voss/presetBehaviour HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreatePresetBehaviour xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <ChangeOperation>Create</ChangeOperation>
  <ChangeType>Subscription</ChangeType>
  <CreditBehaviour>Prorate</CreditBehaviour>
  <CreditKind>Normal</CreditKind>
  <DebitBehaviour>Prorate</DebitBehaviour>
  <PeriodAnchor>LatestPeriod</PeriodAnchor>
  <PeriodIterationCount>0</PeriodIterationCount>
  <RenewalTiming>UseCurrentPlanRenewalDate</RenewalTiming>
  <Timing>AtSubscriptionBillingPeriodEnd</Timing>
</CreatePresetBehaviour>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />