TotalPaymentsVolumeProcessor
in package
implements
RuleProcessorInterface
Rule processor that passes when a store's payments volume exceeds a provided amount.
Interfaces, Classes and Traits
- RuleProcessorInterface
- Rule processor interface
Table of Contents
- $date_time_provider : DateTimeProviderInterface
- The DateTime provider.
- __construct() : mixed
- Constructor.
- process() : bool
- Compare against the store's total payments volume.
- validate() : bool
- Validates the rule.
- get_reports_query() : Query
- Get the report query.
Properties
$date_time_provider
The DateTime provider.
protected
DateTimeProviderInterface
$date_time_provider
Methods
__construct()
Constructor.
public
__construct([DateTimeProviderInterface|null $date_time_provider = null ]) : mixed
Parameters
- $date_time_provider : DateTimeProviderInterface|null = null
-
The DateTime provider.
Return values
mixed —process()
Compare against the store's total payments volume.
public
process(object $rule, object $stored_state) : bool
Parameters
- $rule : object
-
The rule being processed by this rule processor.
- $stored_state : object
-
Stored state.
Return values
bool — The result of the operation.validate()
Validates the rule.
public
validate(object $rule) : bool
Parameters
- $rule : object
-
The rule to validate.
Return values
bool — Pass/fail.get_reports_query()
Get the report query.
protected
get_reports_query(array<string|int, mixed> $args) : Query
Parameters
- $args : array<string|int, mixed>
-
The query args.
