| 1 |
<?php |
| 2 |
|
| 3 |
namespace Give\PaymentGateways\Stripe\DataTransferObjects; |
| 4 |
|
| 5 |
/** |
| 6 |
* Class SetDefaultStripeAccountDto |
| 7 |
* @package Give\PaymentGateways\Stripe\DataTransferObjects |
| 8 |
* |
| 9 |
* @since 2.13.0 |
| 10 |
*/ |
| 11 |
final class SetDefaultStripeAccountDto |
| 12 |
{ |
| 13 |
/** |
| 14 |
* @var mixed|string |
| 15 |
*/ |
| 16 |
public $accountSlug; |
| 17 |
|
| 18 |
/** |
| 19 |
* @var int|string |
| 20 |
*/ |
| 21 |
public $formId; |
| 22 |
|
| 23 |
/** |
| 24 |
* @since 2.13.0 |
| 25 |
* |
| 26 |
* @param array $array |
| 27 |
*/ |
| 28 |
public static function fromArray($array) |
| 29 |
{ |
| 30 |
$self = new static(); |
| 31 |
|
| 32 |
$self->accountSlug = ! empty($array['account_slug']) ? $array['account_slug'] : ''; |
| 33 |
$self->formId = ! empty($array['form_id']) ? absint($array['form_id']) : ''; |
| 34 |
|
| 35 |
return $self; |
| 36 |
} |
| 37 |
} |
| 38 |
|