regis

<back to all web services

FinanceCreateSaleRequest

Requires Authentication
Required permission:CreatePayments
The following routes are available for this service:
POST/Dynamics/CreateSale/{regent_id}
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class FinanceCreateSaleRequest
    {
        public Integer regent_id = null;
        public BigDecimal amount = null;
        public String code = null;
        public String rebate_code = null;
        public BigDecimal rebate_amount = null;
        public String payment_id = null;
        public String reporting_term = null;
        public ArrayList<FinanceCreateSaleItemsRequest> sale_items = null;
        
        public Integer getRegentId() { return regent_id; }
        public FinanceCreateSaleRequest setRegentId(Integer value) { this.regent_id = value; return this; }
        public BigDecimal getAmount() { return amount; }
        public FinanceCreateSaleRequest setAmount(BigDecimal value) { this.amount = value; return this; }
        public String getCode() { return code; }
        public FinanceCreateSaleRequest setCode(String value) { this.code = value; return this; }
        public String getRebateCode() { return rebate_code; }
        public FinanceCreateSaleRequest setRebateCode(String value) { this.rebate_code = value; return this; }
        public BigDecimal getRebateAmount() { return rebate_amount; }
        public FinanceCreateSaleRequest setRebateAmount(BigDecimal value) { this.rebate_amount = value; return this; }
        public String getPaymentId() { return payment_id; }
        public FinanceCreateSaleRequest setPaymentId(String value) { this.payment_id = value; return this; }
        public String getReportingTerm() { return reporting_term; }
        public FinanceCreateSaleRequest setReportingTerm(String value) { this.reporting_term = value; return this; }
        public ArrayList<FinanceCreateSaleItemsRequest> getSaleItems() { return sale_items; }
        public FinanceCreateSaleRequest setSaleItems(ArrayList<FinanceCreateSaleItemsRequest> value) { this.sale_items = value; return this; }
    }

    public static class FinanceCreateSaleItemsRequest
    {
        public BigDecimal amount = null;
        public String code = null;
        
        public BigDecimal getAmount() { return amount; }
        public FinanceCreateSaleItemsRequest setAmount(BigDecimal value) { this.amount = value; return this; }
        public String getCode() { return code; }
        public FinanceCreateSaleItemsRequest setCode(String value) { this.code = value; return this; }
    }

}

Java FinanceCreateSaleRequest 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 /Dynamics/CreateSale/{regent_id} HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	regent_id: 0,
	amount: 0,
	code: String,
	rebate_code: String,
	rebate_amount: 0,
	payment_id: String,
	reporting_term: String,
	sale_items: 
	[
		{
			amount: 0,
			code: String
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	errorCode: String,
	message: String,
	stackTrace: String,
	errors: 
	[
		{
			errorCode: String,
			fieldName: String,
			message: String,
			meta: 
			{
				String: String
			}
		}
	],
	meta: 
	{
		String: String
	}
}