Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /licenses/company | Add product to company invoicing | Add new product to company invoicing. Sends that product to VOSS System. |
---|
namespace BokaMera.API.ServiceModel.Dtos
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type ProductGroupTypeEnum =
| Optional = 1
| Included = 2
type StatusEnum =
| Active = 1
| Terminated = 2
[<DataContract(Name="SubscriptionProductGroupProductResultDto")>]
[<AllowNullLiteral>]
type SubscriptionProductGroupProductResultDto() =
[<DataMember(Name="id", IsRequired=true)>]
member val Id:Guid = new Guid() with get,set
[<DataMember(Name="name", IsRequired=true)>]
member val Name:String = null with get,set
[<DataMember(Name="externalId")>]
member val ExternalId:String = null with get,set
[<DataMember(Name="articleNumber", IsRequired=true)>]
member val ArticleNumber:String = null with get,set
type TypeEnum =
| AtSubscriptionBillingPeriodEnd = 1
| AtBindingPeriodEnd = 2
| Immediately = 3
type SourceEnum =
| Direct = 1
| Plan = 2
| CustomerExpiration = 3
| Update = 4
| Unpaid = 5
[<DataContract(Name="SubscriptionItemTerminationReasonDto")>]
[<AllowNullLiteral>]
type SubscriptionItemTerminationReasonDto() =
[<DataMember(Name="reasonId", IsRequired=true)>]
member val ReasonId:Guid = new Guid() with get,set
[<DataMember(Name="reasonName", IsRequired=true)>]
member val ReasonName:String = null with get,set
[<DataMember(Name="reasonExternalId")>]
member val ReasonExternalId:String = null with get,set
[<DataMember(Name="subReasonId")>]
member val SubReasonId:Nullable<Guid> = new Nullable<Guid>() with get,set
[<DataMember(Name="subReasonName")>]
member val SubReasonName:String = null with get,set
[<DataMember(Name="subReasonExternalId")>]
member val SubReasonExternalId:String = null with get,set
[<DataMember(Name="comment", IsRequired=true)>]
member val Comment:String = null with get,set
type BehaviourEnum =
| Prorate = 1
| Full = 2
| None = 3
type CreditKindEnum =
| Normal = 1
| Internal = 2
[<DataContract(Name="CreditOptionsDto")>]
[<AllowNullLiteral>]
type CreditOptionsDto() =
[<DataMember(Name="behaviour", IsRequired=true)>]
member val Behaviour:BehaviourEnum = new BehaviourEnum() with get,set
[<DataMember(Name="creditKind", IsRequired=true)>]
member val CreditKind:CreditKindEnum = new CreditKindEnum() with get,set
[<DataMember(Name="prorateTimeAnchor")>]
member val ProrateTimeAnchor:Nullable<DateTime> = new Nullable<DateTime>() with get,set
[<DataContract(Name="SubscriptionItemTerminationDto")>]
[<AllowNullLiteral>]
type SubscriptionItemTerminationDto() =
[<DataMember(Name="type")>]
member val Type:TypeEnum = new TypeEnum() with get,set
[<DataMember(Name="source", IsRequired=true)>]
member val Source:SourceEnum = new SourceEnum() with get,set
[<DataMember(Name="scheduledDate", IsRequired=true)>]
member val ScheduledDate:DateTime = new DateTime() with get,set
[<DataMember(Name="reason")>]
member val Reason:SubscriptionItemTerminationReasonDto = null with get,set
[<DataMember(Name="creditOptions", IsRequired=true)>]
member val CreditOptions:CreditOptionsDto = null with get,set
[<DataContract(Name="CustomerBalanceChangeItemDto")>]
[<AllowNullLiteral>]
type CustomerBalanceChangeItemDto() =
[<DataMember(Name="type", IsRequired=true)>]
member val Type:TypeEnum = new TypeEnum() with get,set
[<DataMember(Name="id", IsRequired=true)>]
member val Id:Guid = new Guid() with get,set
[<DataMember(Name="name", IsRequired=true)>]
member val Name:String = null with get,set
[<DataMember(Name="productGroupId", IsRequired=true)>]
member val ProductGroupId:Guid = new Guid() with get,set
[<DataMember(Name="productGroupName", IsRequired=true)>]
member val ProductGroupName:String = null with get,set
[<DataMember(Name="quantity", IsRequired=true)>]
member val Quantity:Double = new Double() with get,set
[<DataMember(Name="amount", IsRequired=true)>]
member val Amount:Double = new Double() with get,set
[<DataMember(Name="discountAmount", IsRequired=true)>]
member val DiscountAmount:Double = new Double() with get,set
[<DataMember(Name="totalAmount", EmitDefaultValue=false)>]
member val TotalAmount:Double = new Double() with get,set
[<DataMember(Name="invoiceRecipientCustomerId", IsRequired=true)>]
member val InvoiceRecipientCustomerId:Guid = new Guid() with get,set
[<DataContract(Name="CustomerBalanceChangeDto")>]
[<AllowNullLiteral>]
type CustomerBalanceChangeDto() =
[<DataMember(Name="items", EmitDefaultValue=false)>]
member val Items:ResizeArray<CustomerBalanceChangeItemDto> = new ResizeArray<CustomerBalanceChangeItemDto>() with get,set
[<DataMember(Name="totalAmount", EmitDefaultValue=false)>]
member val TotalAmount:Double = new Double() with get,set
[<DataMember(Name="totalDiscountAmount", EmitDefaultValue=false)>]
member val TotalDiscountAmount:Double = new Double() with get,set
[<DataContract(Name="CreateSubscriptionProductGroupResult")>]
[<AllowNullLiteral>]
type CreateSubscriptionProductGroupResult() =
[<DataMember(Name="productGroupType", IsRequired=true)>]
member val ProductGroupType:ProductGroupTypeEnum = new ProductGroupTypeEnum() with get,set
[<DataMember(Name="status", IsRequired=true)>]
member val Status:StatusEnum = new StatusEnum() with get,set
[<DataMember(Name="id", IsRequired=true)>]
member val Id:Guid = new Guid() with get,set
[<DataMember(Name="name", IsRequired=true)>]
member val Name:String = null with get,set
[<DataMember(Name="products", EmitDefaultValue=false)>]
member val Products:ResizeArray<SubscriptionProductGroupProductResultDto> = new ResizeArray<SubscriptionProductGroupProductResultDto>() with get,set
[<DataMember(Name="termination")>]
member val Termination:SubscriptionItemTerminationDto = null with get,set
[<DataMember(Name="created", IsRequired=true)>]
member val Created:DateTime = new DateTime() with get,set
[<DataMember(Name="customerBalanceChange", IsRequired=true)>]
member val CustomerBalanceChange:CustomerBalanceChangeDto = null with get,set
[<ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)>]
[<ValidateRequest(Validator="IsAuthenticated")>]
[<AllowNullLiteral>]
type CreateNonLicenseProduct() =
///<summary>
///The company id
///</summary>
[<ApiMember(Description="The company id")>]
member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set
///<summary>
///Invoice article No in Db.
///</summary>
[<ApiMember(Description="Invoice article No in Db.", IsRequired=true)>]
member val InvoiceArticleId:Int32 = new Int32() with get,set
F# CreateNonLicenseProduct 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 /licenses/company HTTP/1.1
Host: testapi.bokamera.se
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","InvoiceArticleId":0}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {Unable to show example output for type 'CreateSubscriptionProductGroupResult' using the custom 'other' filter}No parameterless constructor defined for type 'VossIntegration.ApiTools.Model.CreateSubscriptionProductGroupResult'.