Hmx Accounts

<back to all web services

GetPurchaseOrders

The following routes are available for this service:
GET/api/purchaseordersSearch for PurchaseOrders
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    public static class GetPurchaseOrders
    {
        public String userId = null;
        public Date fromDate = null;
        public Date toDate = null;
        @SerializedName("void") public Boolean Void = null;
        public Boolean paid = null;
        public String transactionIdentifier = null;
        public String couponCode = null;
        
        public String getUserId() { return userId; }
        public GetPurchaseOrders setUserId(String value) { this.userId = value; return this; }
        public Date getFromDate() { return fromDate; }
        public GetPurchaseOrders setFromDate(Date value) { this.fromDate = value; return this; }
        public Date getToDate() { return toDate; }
        public GetPurchaseOrders setToDate(Date value) { this.toDate = value; return this; }
        public Boolean isVoid() { return Void; }
        public GetPurchaseOrders setVoid(Boolean value) { this.Void = value; return this; }
        public Boolean isPaid() { return paid; }
        public GetPurchaseOrders setPaid(Boolean value) { this.paid = value; return this; }
        public String getTransactionIdentifier() { return transactionIdentifier; }
        public GetPurchaseOrders setTransactionIdentifier(String value) { this.transactionIdentifier = value; return this; }
        public String getCouponCode() { return couponCode; }
        public GetPurchaseOrders setCouponCode(String value) { this.couponCode = value; return this; }
    }

    public static class GetPurchaseOrdersResponse
    {
        public ArrayList<PurchaseOrderDto> results = null;
        
        public ArrayList<PurchaseOrderDto> getResults() { return results; }
        public GetPurchaseOrdersResponse setResults(ArrayList<PurchaseOrderDto> value) { this.results = value; return this; }
    }

    public static class PurchaseOrderDto
    {
        public Integer id = null;
        public String userId = null;
        public Date createdDate = null;
        public String paymentType = null;
        @SerializedName("void") public Boolean Void = null;
        public Boolean paid = null;
        public String transactionIdentifier = null;
        public String couponCode = null;
        public ArrayList<PurchaseOrderItem> orderItems = null;
        public String payer = null;
        public String billingAddressLine1 = null;
        public String billingAddressCity = null;
        public String billingAddressState = null;
        public String billingAddressPostalCode = null;
        public String billingAddressCountryCode = null;
        
        public Integer getId() { return id; }
        public PurchaseOrderDto setId(Integer value) { this.id = value; return this; }
        public String getUserId() { return userId; }
        public PurchaseOrderDto setUserId(String value) { this.userId = value; return this; }
        public Date getCreatedDate() { return createdDate; }
        public PurchaseOrderDto setCreatedDate(Date value) { this.createdDate = value; return this; }
        public String getPaymentType() { return paymentType; }
        public PurchaseOrderDto setPaymentType(String value) { this.paymentType = value; return this; }
        public Boolean isVoid() { return Void; }
        public PurchaseOrderDto setVoid(Boolean value) { this.Void = value; return this; }
        public Boolean isPaid() { return paid; }
        public PurchaseOrderDto setPaid(Boolean value) { this.paid = value; return this; }
        public String getTransactionIdentifier() { return transactionIdentifier; }
        public PurchaseOrderDto setTransactionIdentifier(String value) { this.transactionIdentifier = value; return this; }
        public String getCouponCode() { return couponCode; }
        public PurchaseOrderDto setCouponCode(String value) { this.couponCode = value; return this; }
        public ArrayList<PurchaseOrderItem> getOrderItems() { return orderItems; }
        public PurchaseOrderDto setOrderItems(ArrayList<PurchaseOrderItem> value) { this.orderItems = value; return this; }
        public String getPayer() { return payer; }
        public PurchaseOrderDto setPayer(String value) { this.payer = value; return this; }
        public String getBillingAddressLine1() { return billingAddressLine1; }
        public PurchaseOrderDto setBillingAddressLine1(String value) { this.billingAddressLine1 = value; return this; }
        public String getBillingAddressCity() { return billingAddressCity; }
        public PurchaseOrderDto setBillingAddressCity(String value) { this.billingAddressCity = value; return this; }
        public String getBillingAddressState() { return billingAddressState; }
        public PurchaseOrderDto setBillingAddressState(String value) { this.billingAddressState = value; return this; }
        public String getBillingAddressPostalCode() { return billingAddressPostalCode; }
        public PurchaseOrderDto setBillingAddressPostalCode(String value) { this.billingAddressPostalCode = value; return this; }
        public String getBillingAddressCountryCode() { return billingAddressCountryCode; }
        public PurchaseOrderDto setBillingAddressCountryCode(String value) { this.billingAddressCountryCode = value; return this; }
    }

    public static class PurchaseOrderItem
    {
        public Integer id = null;
        @References(PurchaseOrder.class)
        public Integer purchaseOrderId = null;

        @References(Product.class)
        public String productId = null;

        public String productName = null;
        public Integer quantity = null;
        public BigDecimal price = null;
        public String discountDescription = null;
        public String discountSource = null;
        public BigDecimal discount = null;
        public Date createdDate = null;
        
        public Integer getId() { return id; }
        public PurchaseOrderItem setId(Integer value) { this.id = value; return this; }
        public Integer getPurchaseOrderId() { return purchaseOrderId; }
        public PurchaseOrderItem setPurchaseOrderId(Integer value) { this.purchaseOrderId = value; return this; }
        public String getProductId() { return productId; }
        public PurchaseOrderItem setProductId(String value) { this.productId = value; return this; }
        public String getProductName() { return productName; }
        public PurchaseOrderItem setProductName(String value) { this.productName = value; return this; }
        public Integer getQuantity() { return quantity; }
        public PurchaseOrderItem setQuantity(Integer value) { this.quantity = value; return this; }
        public BigDecimal getPrice() { return price; }
        public PurchaseOrderItem setPrice(BigDecimal value) { this.price = value; return this; }
        public String getDiscountDescription() { return discountDescription; }
        public PurchaseOrderItem setDiscountDescription(String value) { this.discountDescription = value; return this; }
        public String getDiscountSource() { return discountSource; }
        public PurchaseOrderItem setDiscountSource(String value) { this.discountSource = value; return this; }
        public BigDecimal getDiscount() { return discount; }
        public PurchaseOrderItem setDiscount(BigDecimal value) { this.discount = value; return this; }
        public Date getCreatedDate() { return createdDate; }
        public PurchaseOrderItem setCreatedDate(Date value) { this.createdDate = value; return this; }
    }

}

Java GetPurchaseOrders 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.

GET /api/purchaseorders HTTP/1.1 
Host: accounts.dev.healthmonix.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetPurchaseOrdersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Hmx.Accounts.ServiceModels">
  <Results>
    <PurchaseOrderDto>
      <BillingAddressCity>String</BillingAddressCity>
      <BillingAddressCountryCode>String</BillingAddressCountryCode>
      <BillingAddressLine1>String</BillingAddressLine1>
      <BillingAddressPostalCode>String</BillingAddressPostalCode>
      <BillingAddressState>String</BillingAddressState>
      <CouponCode>String</CouponCode>
      <CreatedDate>0001-01-01T00:00:00</CreatedDate>
      <Id>0</Id>
      <OrderItems xmlns:d4p1="http://schemas.datacontract.org/2004/07/Hmx.Accounts.Models">
        <d4p1:PurchaseOrderItem>
          <d4p1:CreatedDate>0001-01-01T00:00:00</d4p1:CreatedDate>
          <d4p1:Discount>0</d4p1:Discount>
          <d4p1:DiscountDescription>String</d4p1:DiscountDescription>
          <d4p1:DiscountSource>String</d4p1:DiscountSource>
          <d4p1:Id>0</d4p1:Id>
          <d4p1:Price>0</d4p1:Price>
          <d4p1:ProductId>String</d4p1:ProductId>
          <d4p1:ProductName>String</d4p1:ProductName>
          <d4p1:PurchaseOrderId>0</d4p1:PurchaseOrderId>
          <d4p1:Quantity>0</d4p1:Quantity>
        </d4p1:PurchaseOrderItem>
      </OrderItems>
      <Paid>false</Paid>
      <Payer>String</Payer>
      <PaymentType>String</PaymentType>
      <TransactionIdentifier>String</TransactionIdentifier>
      <UserId>String</UserId>
      <Void>false</Void>
    </PurchaseOrderDto>
  </Results>
</GetPurchaseOrdersResponse>