Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Payout Model
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Nexus
|
||||
* @since 10 Feb 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -319,4 +319,33 @@ abstract class _Payout extends \IPS\Patterns\ActiveRecord
|
||||
{
|
||||
return \IPS\Http\Url::internal( "app=nexus&module=payments&controller=payouts&do=view&id={$this->id}", 'admin' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get output for API
|
||||
*
|
||||
* @return array
|
||||
* @apiresponse int id ID number
|
||||
* @apiresponse string status Status: 'done' = Payment sent; 'pend' = Pending; 'canc' = Canceled
|
||||
* @apiresponse \IPS\nexus\Money amount Amount
|
||||
* @apiresponse string gateway The gateway that will process the withdrawal
|
||||
* @apiresponse string data The data provided by the member for the process. For example, if the gateway is PayPal, this will be their PayPal email address
|
||||
* @apiresponse datetime requestedDate Date withdrawal was requested
|
||||
* @apiresponse datetime completedDate Date withdrawal was completed
|
||||
* @apiresponse string gatewayId Any ID number provided by the gateway to identify the transaction on their end
|
||||
* @apiresponse \IPS\nexus\Customer customer Customer
|
||||
*/
|
||||
public function apiOutput()
|
||||
{
|
||||
return array(
|
||||
'id' => $this->id,
|
||||
'status' => $this->status,
|
||||
'amount' => $this->amount->apiOutput(),
|
||||
'member' => $this->member->apiOutput(),
|
||||
'gateway' => $this->gateway,
|
||||
'data' => $this->data,
|
||||
'requestedDate' => $this->date->rfc3339(),
|
||||
'completedDate' => $this->completed ? $this->completed->rfc3339() : null,
|
||||
'gatewayId' => $this->gw_id,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user