Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rakeshkumar125/5d33bb1b769f863f61616e651eb7ef58 to your computer and use it in GitHub Desktop.
Save rakeshkumar125/5d33bb1b769f863f61616e651eb7ef58 to your computer and use it in GitHub Desktop.
function for populate values REF, INV, PO
function addPackageLineItem($input)
{
$packageLineItem = array
(
'SequenceNumber' => 1,
'GroupPackageCount' => 1,
'Weight' => array
(
'Value' => $input['Weight'],
'Units' => 'LB'
),
'Dimensions' => array
(
'Length' => $input['Length'],
'Width' => $input['Width'],
'Height' => $input['Height'],
'Units' => 'IN'
),
'CustomerReferences' => array(
'0' => array('CustomerReferenceType' => 'CUSTOMER_REFERENCE','Value' => 'CR1234'),
'1' => array('CustomerReferenceType' => 'INVOICE_NUMBER','Value' => 'IV1234'),
'2' => array('CustomerReferenceType' => 'P_O_NUMBER','Value' => 'PO1234')
)
);
return $packageLineItem;
} // end of function addPackageLineItem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment