All Verbs | /account/subscription | ||
---|---|---|---|
GET | /Subscriptions |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports MyApp.ServiceModel
Namespace Global
Namespace MyApp.ServiceModel
Public Partial Class OrderAnalyticData
Public Overridable Property ProductName As String
Public Overridable Property SubTotal As Integer
Public Overridable Property CouponId As String
Public Overridable Property Discount As Integer
Public Overridable Property Tax As Integer
Public Overridable Property Total As Integer
Public Overridable Property Paid As Boolean
Public Overridable Property CreatedDate As Date
Public Overridable Property ModifiedDate As Date
Public Overridable Property ModifiedBy As String
Public Overridable Property CancelledDate As Date?
Public Overridable Property CancelledReason As String
Public Overridable Property OrderDetails As List(Of OrderDetail)
End Class
Public Partial Class OrderDetail
Public Overridable Property Id As Integer
Public Overridable Property OrderId As Integer
Public Overridable Property SkuId As Integer
Public Overridable Property SkuType As SkuType
Public Overridable Property Price As Integer
Public Overridable Property Description As String
Public Overridable Property Quantity As Integer
Public Overridable Property Total As Integer
End Class
Public Partial Class Sku
Public Overridable Property Id As Integer
Public Overridable Property ProductId As Integer
Public Overridable Property Type As SkuType
Public Overridable Property Feature As LicenseFeature
Public Overridable Property Code As String
Public Overridable Property Name As String
Public Overridable Property Notes As String
<Ignore>
Public Overridable Property MinQty As Integer?
Public Overridable Property MaxQty As Integer?
Public Overridable Property Price As Integer
Public Overridable Property Plan As String
Public Overridable Property DiscountOff As Integer
Public Overridable Property DiscountLabelOff As String
Public Overridable Property ActualPrice As Integer
Public Overridable Property IsPlan As Boolean
Public Overridable Property IsRenewal As Boolean
Public Overridable Property SubscriptionDurationDays As Integer?
Public Overridable Property ExpiryDurationDays As Integer?
Public Overridable Property TrialPeriodDays As Integer?
Public Overridable Property SupportQty As Integer
Public Overridable Property CoresQty As Integer?
Public Overridable Property CreatedDate As Date
Public Overridable Property ModifiedDate As Date
Public Overridable Property LicenseType As LicenseType
Public Overridable Property Active As Boolean
End Class
Public Enum SkuType
Product
PerDev
PerCore
Site
Support
Training
Register
Payment
End Enum
Public Partial Class Subscription
Public Overridable Property Id As Integer
Public Overridable Property CustomerId As Integer
Public Overridable Property Email As String
Public Overridable Property SkuId As Integer
Public Overridable Property SkuName As String
Public Overridable Property SkuType As SkuType
Public Overridable Property Code As String
Public Overridable Property Quantity As Integer
Public Overridable Property SupportQuantity As Integer
Public Overridable Property Total As Integer
Public Overridable Property IsPlan As Boolean
Public Overridable Property IsRenewal As Boolean
Public Overridable Property SubscriptionDurationDays As Integer
Public Overridable Property RenewalDate As Date?
Public Overridable Property LicenseRef As String
Public Overridable Property LicenseName As String
Public Overridable Property LicenseAddress As String
Public Overridable Property LicenseType As LicenseType
Public Overridable Property ExpiryDate As Date
Public Overridable Property LicenseKey As LicenseKey
Public Overridable Property LicenseKeyText As String
Public Overridable Property CreatedDate As Date
Public Overridable Property ModifiedDate As Date
Public Overridable Property CancelledDate As Date?
Public Overridable Property StripeSubscriptionId As String
Public Overridable Property EmailId As Integer?
Public Overridable Property EmailRenewalId As Integer?
Public Overridable Property EmailExpiredId As Integer?
Public Overridable Property RenewalSubscriptionId As Integer?
Public Overridable Property ExternalRef As String
Public Overridable Property Notes As String
Public Overridable Property [Error] As String
End Class
Public Partial Class Subscriptions
Public Overridable Property Section As String
Public Overridable Property Success As Boolean
Public Overridable Property Activated As Boolean
Public Overridable Property PurchasedOrderId As Integer?
End Class
Public Partial Class SubscriptionsResponse
Public Overridable Property Section As String
Public Overridable Property SupportQuantity As Integer
Public Overridable Property ActiveSku As Sku
Public Overridable Property ActiveSubscription As Subscription
Public Overridable Property InActiveSubscriptions As List(Of Subscription)
Public Overridable Property PurchasedOrder As OrderAnalyticData
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
Namespace ServiceStack
<Flags>
Public Enum LicenseFeature
None = 0
Free = 0
Premium = 1
Text = 2
Client = 4
Common = 8
Redis = 16
RedisSku = 18
OrmLite = 32
OrmLiteSku = 34
ServiceStack = 64
Server = 128
Razor = 256
Admin = 512
Aws = 1024
AwsSku = 1026
All = 2047
End Enum
Public Partial Class LicenseKey
Public Overridable Property Ref As String
Public Overridable Property Name As String
Public Overridable Property Type As LicenseType
Public Overridable Property Meta As Long
Public Overridable Property Hash As String
Public Overridable Property Halg As String
Public Overridable Property Expiry As Date
End Class
Public Enum LicenseType
Free
FreeIndividual
FreeOpenSource
Indie
Business
Enterprise
TextIndie
TextBusiness
OrmLiteIndie
OrmLiteBusiness
RedisIndie
RedisBusiness
AwsIndie
AwsBusiness
Trial
Site
TextSite
RedisSite
OrmLiteSite
End Enum
End Namespace
End Namespace
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.
POST /account/subscription HTTP/1.1
Host: account.servicestack.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"section":"String","success":false,"activated":false,"purchasedOrderId":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"section":"String","supportQuantity":0,"activeSku":{"id":0,"productId":0,"type":"Product","feature":0,"code":"String","name":"String","notes":"String","maxQty":0,"price":0,"plan":"String","discountOff":0,"discountLabelOff":"String","actualPrice":0,"isPlan":false,"isRenewal":false,"subscriptionDurationDays":0,"expiryDurationDays":0,"trialPeriodDays":0,"supportQty":0,"coresQty":0,"createdDate":"\/Date(-62135596800000-0000)\/","modifiedDate":"\/Date(-62135596800000-0000)\/","licenseType":"Free","active":false},"activeSubscription":{"id":0,"customerId":0,"email":"String","skuId":0,"skuName":"String","skuType":"Product","code":"String","quantity":0,"supportQuantity":0,"total":0,"isPlan":false,"isRenewal":false,"subscriptionDurationDays":0,"renewalDate":"\/Date(-62135596800000-0000)\/","licenseRef":"String","licenseName":"String","licenseAddress":"String","licenseType":"Free","expiryDate":"\/Date(-62135596800000-0000)\/","licenseKey":{"ref":"String","name":"String","type":"Free","meta":0,"hash":"String","halg":"String","expiry":"\/Date(-62135596800000-0000)\/"},"licenseKeyText":"String","createdDate":"\/Date(-62135596800000-0000)\/","modifiedDate":"\/Date(-62135596800000-0000)\/","cancelledDate":"\/Date(-62135596800000-0000)\/","stripeSubscriptionId":"String","emailId":0,"emailRenewalId":0,"emailExpiredId":0,"renewalSubscriptionId":0,"externalRef":"String","notes":"String","error":"String"},"inActiveSubscriptions":[{"id":0,"customerId":0,"email":"String","skuId":0,"skuName":"String","skuType":"Product","code":"String","quantity":0,"supportQuantity":0,"total":0,"isPlan":false,"isRenewal":false,"subscriptionDurationDays":0,"renewalDate":"\/Date(-62135596800000-0000)\/","licenseRef":"String","licenseName":"String","licenseAddress":"String","licenseType":"Free","expiryDate":"\/Date(-62135596800000-0000)\/","licenseKey":{"ref":"String","name":"String","type":"Free","meta":0,"hash":"String","halg":"String","expiry":"\/Date(-62135596800000-0000)\/"},"licenseKeyText":"String","createdDate":"\/Date(-62135596800000-0000)\/","modifiedDate":"\/Date(-62135596800000-0000)\/","cancelledDate":"\/Date(-62135596800000-0000)\/","stripeSubscriptionId":"String","emailId":0,"emailRenewalId":0,"emailExpiredId":0,"renewalSubscriptionId":0,"externalRef":"String","notes":"String","error":"String"}],"purchasedOrder":{"productName":"String","subTotal":0,"couponId":"String","discount":0,"tax":0,"total":0,"paid":false,"createdDate":"\/Date(-62135596800000-0000)\/","modifiedDate":"\/Date(-62135596800000-0000)\/","modifiedBy":"String","cancelledDate":"\/Date(-62135596800000-0000)\/","cancelledReason":"String","orderDetails":[{"id":0,"orderId":0,"skuId":0,"skuType":"Product","price":0,"description":"String","quantity":0,"total":0}]},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}