Retrieving Lines of a Transaction (lines in the Transaction's Cart)
Line UUID is currently the only key supported
pepperi.api.transactionLines.get(​{ key: {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8"} ,fields: [ "UnitsQuantity" , "Item.ExternalID"] } )
Returns:
{success: true,object:{UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" ,UnitsQuantity: 34 , Item.ExternalID: "ABCD123"}}
Example:
pepperi.api.transactionLines.search ( {fields: [ "UUID", "ExternalID" , "MyTSA"] ,filter: { Operation : "AND", LeftNode: {ApiName: "APIName1", Operation : ">",Values : ["7"]},RightNode:{ApiName: "ApiName2",Operation: "InTheLast", Values: ["4","Weeks"]} } ,sort : [{Field: "MyTSA",Ascending: true},{Field: "MyTSA2",Ascending: true }] } ,pageSize : 1000 , page: 1 } )
Returns:
{success: true, objects:[ {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , ExternalID: "abc123", MyTSA: 12.8},{UUID: "aefb5346-74ac-4041-8bb1-a76a3b5e734h" , ExternalID: "abc456", MyTSA: 34.5}] }
The purpose of this function is to enable fetching transaction lines of transactions not loaded yet to memory.
THIS FUNCTION IS NOT IMPLEMENTED YET - PLANNED FOR NEXT VERSION
pepperi.api.transactionLines.search (fields: [ "UUID", "ExternalID" , "MyTSA"] ,transactionFilter : { Operation : "AND", LeftNode: {ApiName: "APIName1", Operation : ">",Values : ["7"]},RightNode:{ApiName: "ApiName2",Operation: "InTheLast", Values: ["4","Weeks"]} }filter: { Operation : "AND", LeftNode: {ApiName: "APIName1", Operation : ">",Values : ["7"]},RightNode:{ApiName: "ApiName2",Operation: "InTheLast", Values: ["4","Weeks"]} } ,sort : [{Field: "MyTSA",Ascending: true},{Field: "MyTSA2",Ascending: true }] } ,pageSize : 1000 , page: 1)
Returns:
{success: true, objects:[ {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , ExternalID: "abc123", MyTSA: 12.8},{UUID: "aefb5346-74ac-4041-8bb1-a76a3b5e734h" , ExternalID: "abc456", MyTSA: 34.5}] }