Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

@@ -347,6 +347,7 @@ class _Order extends \IPS\Patterns\ActiveRecord
/**
* Get output for API
*
* @param \IPS\Member|NULL $authorizedMember The member making the API request or NULL for API Key / client_credentials
* @return array
* @apiresponse int id ID number
* @apiresponse string status Status: 'done' = Shipped; 'pend' = Waiting to be shipped; 'canc' = Canceled
@@ -358,7 +359,7 @@ class _Order extends \IPS\Patterns\ActiveRecord
* @apiresponse \IPS\GeoLocation address The delivery address
* @apiresponse string trackingUrl The URL to view tracking information, if available
*/
public function apiOutput()
public function apiOutput( \IPS\Member $authorizedMember = NULL )
{
$items = array();
foreach ( $this->items as $item )
@@ -377,11 +378,11 @@ class _Order extends \IPS\Patterns\ActiveRecord
'id' => $this->id,
'status' => $this->status,
'invoiceId' => $this->invoice->id,
'method' => $this->method ? $this->method->apiOutput() : null,
'method' => $this->method ? $this->method->apiOutput( $authorizedMember ) : null,
'items' => $items,
'requestDate' => $this->date->rfc3339(),
'shipDate' => $this->shipped_date ? $this->shipped_date->rfc3339() : null,
'address' => $this->address()->apiOutput(),
'address' => $this->address()->apiOutput( $authorizedMember ),
'trackingUrl' => $this->trackingUrl() ? ( (string) $this->trackingUrl() ) : null
);
}