mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
✨ New DTO to define plugin setup configuration
This commit is contained in:
parent
0728f80281
commit
cda49d87e2
1 changed files with 47 additions and 0 deletions
47
modules/ppcp-settings/src/DTO/ConfigurationFlagsDTO.php
Normal file
47
modules/ppcp-settings/src/DTO/ConfigurationFlagsDTO.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
/**
|
||||
* Data transfer object. Stores flags that are relevant for the default plugin
|
||||
* configuration at the end of the onboarding process.
|
||||
*
|
||||
* @package WooCommerce\PayPalCommerce\Settings\DTO;
|
||||
*/
|
||||
|
||||
declare( strict_types = 1 );
|
||||
|
||||
namespace WooCommerce\PayPalCommerce\Settings\DTO;
|
||||
|
||||
/**
|
||||
* DTO that represents a plugin configuration.
|
||||
*
|
||||
* Intentionally has no internal logic, sanitation or validation.
|
||||
*/
|
||||
class ConfigurationFlagsDTO {
|
||||
/**
|
||||
* The merchant's country, which indicates availability of certain features.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public string $country_code = '';
|
||||
|
||||
/**
|
||||
* Whether we configure a business account.
|
||||
* If false, a personal (casual seller) account is set up.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public bool $is_business_seller = false;
|
||||
|
||||
/**
|
||||
* Whether credit card payments should be handled by our plugin.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public bool $use_card_payments = false;
|
||||
|
||||
/**
|
||||
* If the shop needs to process subscription payments.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public bool $use_subscriptions = false;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue