POST | /api/purchaseorder/discounteditems | Gets the discounted items in Order for checkout |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Hmx.Accounts.ServiceModels
Namespace Global
Namespace Hmx.Accounts.ServiceModels
Public Partial Class GetDiscountedPurchaseOrderItems
Public Overridable Property ShoppingCart As ShoppingCartDto
End Class
Public Partial Class GetDiscountedPurchaseOrderItemsResponse
Public Overridable Property ShoppingCart As ShoppingCartDto
Public Overridable Property Message As String
Public Overridable Property Status As HttpStatusCode
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class ShoppingCartDto
Public Sub New()
Items = New List(Of ShoppingCartItemDto)
End Sub
Public Overridable Property CouponCode As String
Public Overridable Property Items As List(Of ShoppingCartItemDto)
Public Overridable Property Total As Decimal
End Class
Public Partial Class ShoppingCartItemDto
Public Overridable Property Id As String
Public Overridable Property Name As String
Public Overridable Property Quantity As Integer
Public Overridable Property Price As Decimal
Public Overridable Property DiscountDescription As String
Public Overridable Property DiscountSource As String
Public Overridable Property Discount As Decimal
Public Overridable Property Total As Decimal
End Class
End Namespace
End Namespace
VB.NET GetDiscountedPurchaseOrderItems DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/purchaseorder/discounteditems HTTP/1.1
Host: accounts.dev.healthmonix.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
shoppingCart:
{
couponCode: String,
items:
[
{
id: String,
name: String,
quantity: 0,
price: 0,
discountDescription: String,
discountSource: String,
discount: 0,
total: 0
}
],
total: 0
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { shoppingCart: { couponCode: String, items: [ { id: String, name: String, quantity: 0, price: 0, discountDescription: String, discountSource: String, discount: 0, total: 0 } ], total: 0 }, message: String, status: Continue, responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } } }