Hmx Accounts

<back to all web services

GetDiscountedPurchaseOrderItems

The following routes are available for this service:
POST/api/purchaseorder/discounteditemsGets the discounted items in Order for checkout
namespace Hmx.Accounts.ServiceModels

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type ShoppingCartItemDto() = 
        member val Id:String = null with get,set
        member val Name:String = null with get,set
        member val Quantity:Int32 = new Int32() with get,set
        member val Price:Decimal = new Decimal() with get,set
        member val DiscountDescription:String = null with get,set
        member val DiscountSource:String = null with get,set
        member val Discount:Decimal = new Decimal() with get,set
        member val Total:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type ShoppingCartDto() = 
        member val CouponCode:String = null with get,set
        member val Items:ResizeArray<ShoppingCartItemDto> = new ResizeArray<ShoppingCartItemDto>() with get,set
        member val Total:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type GetDiscountedPurchaseOrderItemsResponse() = 
        member val ShoppingCart:ShoppingCartDto = null with get,set
        member val Message:String = null with get,set
        member val Status:HttpStatusCode = new HttpStatusCode() with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

    [<AllowNullLiteral>]
    type GetDiscountedPurchaseOrderItems() = 
        member val ShoppingCart:ShoppingCartDto = null with get,set

F# GetDiscountedPurchaseOrderItems DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + 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
		}
	}
}