Field Squared API Services

<back to all web services

PricingList

Represents a DTO for a pricing list in a workspace. Calls without an ObjectId will retrieve an array of all active pricing list objects for the workspace.

The following routes are available for this service:
GET,POST,PUT,DELETE/{Workspace}/PricingList/{ObjectId}
GET/{Workspace}/PricingList
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Represents a DTO for a pricing list in a workspace.  Calls without an ObjectId will retrieve an array of all active pricing list objects for the workspace.
    */
    public static class PricingList
    {
        public String Workspace = null;
        public String ObjectId = null;
        public String VersionId = null;
        public String BasedOn = null;
        public String Name = null;
        public ArrayList<PricingListCat> Categories = null;
        public ArrayList<PricingListItem> Items = null;
        
        public String getWorkspace() { return Workspace; }
        public PricingList setWorkspace(String value) { this.Workspace = value; return this; }
        public String getObjectId() { return ObjectId; }
        public PricingList setObjectId(String value) { this.ObjectId = value; return this; }
        public String getVersionId() { return VersionId; }
        public PricingList setVersionId(String value) { this.VersionId = value; return this; }
        public String getBasedOn() { return BasedOn; }
        public PricingList setBasedOn(String value) { this.BasedOn = value; return this; }
        public String getName() { return Name; }
        public PricingList setName(String value) { this.Name = value; return this; }
        public ArrayList<PricingListCat> getCategories() { return Categories; }
        public PricingList setCategories(ArrayList<PricingListCat> value) { this.Categories = value; return this; }
        public ArrayList<PricingListItem> getItems() { return Items; }
        public PricingList setItems(ArrayList<PricingListItem> value) { this.Items = value; return this; }
    }

    public static class PricingListCat
    {
        public String ObjectId = null;
        public String Name = null;
        public ArrayList<PricingListCat> Categories = null;
        public ArrayList<PricingListItem> Items = null;
        
        public String getObjectId() { return ObjectId; }
        public PricingListCat setObjectId(String value) { this.ObjectId = value; return this; }
        public String getName() { return Name; }
        public PricingListCat setName(String value) { this.Name = value; return this; }
        public ArrayList<PricingListCat> getCategories() { return Categories; }
        public PricingListCat setCategories(ArrayList<PricingListCat> value) { this.Categories = value; return this; }
        public ArrayList<PricingListItem> getItems() { return Items; }
        public PricingListCat setItems(ArrayList<PricingListItem> value) { this.Items = value; return this; }
    }

    public static class PricingListItem
    {
        public String ObjectId = null;
        public String Description = null;
        public String Details = null;
        public String Manufacturer = null;
        public String Model = null;
        public String Photo = null;
        public Boolean IsTaxable = null;
        public String Unit = null;
        public Double UnitPrice = null;
        public String Barcode = null;
        
        public String getObjectId() { return ObjectId; }
        public PricingListItem setObjectId(String value) { this.ObjectId = value; return this; }
        public String getDescription() { return Description; }
        public PricingListItem setDescription(String value) { this.Description = value; return this; }
        public String getDetails() { return Details; }
        public PricingListItem setDetails(String value) { this.Details = value; return this; }
        public String getManufacturer() { return Manufacturer; }
        public PricingListItem setManufacturer(String value) { this.Manufacturer = value; return this; }
        public String getModel() { return Model; }
        public PricingListItem setModel(String value) { this.Model = value; return this; }
        public String getPhoto() { return Photo; }
        public PricingListItem setPhoto(String value) { this.Photo = value; return this; }
        public Boolean getIsTaxable() { return IsTaxable; }
        public PricingListItem setIsTaxable(Boolean value) { this.IsTaxable = value; return this; }
        public String getUnit() { return Unit; }
        public PricingListItem setUnit(String value) { this.Unit = value; return this; }
        public Double getUnitPrice() { return UnitPrice; }
        public PricingListItem setUnitPrice(Double value) { this.UnitPrice = value; return this; }
        public String getBarcode() { return Barcode; }
        public PricingListItem setBarcode(String value) { this.Barcode = value; return this; }
    }

}

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

POST /{Workspace}/PricingList/{ObjectId} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<PricingList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.PricingLists">
  <BasedOn>String</BasedOn>
  <Categories>
    <PricingListCat>
      <Categories>
        <PricingListCat>
          <Categories>
            <PricingListCat>
              <Categories i:nil="true" />
              <Items>
                <PricingListItem>
                  <Barcode>String</Barcode>
                  <Description>String</Description>
                  <Details>String</Details>
                  <IsTaxable>false</IsTaxable>
                  <Manufacturer>String</Manufacturer>
                  <Model>String</Model>
                  <ObjectId>String</ObjectId>
                  <Photo>String</Photo>
                  <Unit>String</Unit>
                  <UnitPrice>0</UnitPrice>
                </PricingListItem>
              </Items>
              <Name>String</Name>
              <ObjectId>String</ObjectId>
            </PricingListCat>
          </Categories>
          <Items>
            <PricingListItem>
              <Barcode>String</Barcode>
              <Description>String</Description>
              <Details>String</Details>
              <IsTaxable>false</IsTaxable>
              <Manufacturer>String</Manufacturer>
              <Model>String</Model>
              <ObjectId>String</ObjectId>
              <Photo>String</Photo>
              <Unit>String</Unit>
              <UnitPrice>0</UnitPrice>
            </PricingListItem>
          </Items>
          <Name>String</Name>
          <ObjectId>String</ObjectId>
        </PricingListCat>
      </Categories>
      <Items>
        <PricingListItem>
          <Barcode>String</Barcode>
          <Description>String</Description>
          <Details>String</Details>
          <IsTaxable>false</IsTaxable>
          <Manufacturer>String</Manufacturer>
          <Model>String</Model>
          <ObjectId>String</ObjectId>
          <Photo>String</Photo>
          <Unit>String</Unit>
          <UnitPrice>0</UnitPrice>
        </PricingListItem>
      </Items>
      <Name>String</Name>
      <ObjectId>String</ObjectId>
    </PricingListCat>
  </Categories>
  <Items>
    <PricingListItem>
      <Barcode>String</Barcode>
      <Description>String</Description>
      <Details>String</Details>
      <IsTaxable>false</IsTaxable>
      <Manufacturer>String</Manufacturer>
      <Model>String</Model>
      <ObjectId>String</ObjectId>
      <Photo>String</Photo>
      <Unit>String</Unit>
      <UnitPrice>0</UnitPrice>
    </PricingListItem>
  </Items>
  <Name>String</Name>
  <ObjectId>String</ObjectId>
  <VersionId>String</VersionId>
  <Workspace>String</Workspace>
</PricingList>