| 1 |
<?php |
| 2 |
|
| 3 |
namespace Give\Framework\PaymentGateways\Commands; |
| 4 |
|
| 5 |
use Give\Donations\Models\Donation; |
| 6 |
use Give\Subscriptions\Models\Subscription; |
| 7 |
|
| 8 |
/** |
| 9 |
* @since 2.33.0 |
| 10 |
*/ |
| 11 |
class SubscriptionSynced implements GatewayCommand |
| 12 |
{ |
| 13 |
/** |
| 14 |
* @since 2.33.0 |
| 15 |
* |
| 16 |
* @var Subscription |
| 17 |
*/ |
| 18 |
public $subscription; |
| 19 |
|
| 20 |
/** |
| 21 |
* @since 2.33.0 |
| 22 |
* |
| 23 |
* @var array |
| 24 |
*/ |
| 25 |
public $missingDonations; |
| 26 |
|
| 27 |
/** |
| 28 |
* @since 2.33.0 |
| 29 |
* |
| 30 |
* @var array |
| 31 |
*/ |
| 32 |
public $presentDonations; |
| 33 |
|
| 34 |
/** |
| 35 |
* @since 2.33.0 |
| 36 |
* |
| 37 |
* @var string |
| 38 |
*/ |
| 39 |
public $notice; |
| 40 |
|
| 41 |
/** |
| 42 |
* @since 2.33.0 |
| 43 |
* |
| 44 |
* @param Subscription $subscription Do not save the subscription, just return it so the API can see what's dirty |
| 45 |
* @param Donation[] $missingDonations The missing donations added to the subscription |
| 46 |
* @param Donation[] $presentDonations Optional. The already present donations of the subscription |
| 47 |
* @param string $notice Optional. Use to notify users about some limitation or specificity of the gateway |
| 48 |
*/ |
| 49 |
public function __construct( |
| 50 |
Subscription $subscription, |
| 51 |
array $missingDonations, |
| 52 |
array $presentDonations = [], |
| 53 |
string $notice = '' |
| 54 |
) { |
| 55 |
$this->subscription = $subscription; |
| 56 |
$this->missingDonations = $missingDonations; |
| 57 |
$this->presentDonations = $presentDonations; |
| 58 |
$this->notice = $notice; |
| 59 |
} |
| 60 |
} |
| 61 |
|