-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass merchant timezone to Reporting Payment Activity API (#8743)
Co-authored-by: Jessy <[email protected]> Co-authored-by: Shendy <[email protected]>
- Loading branch information
1 parent
0809d03
commit 1d5b91a
Showing
7 changed files
with
79 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: dev | ||
Comment: Adding some fixes to the Payment Activity component, reporting controller aand associated classes. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
includes/core/server/request/class-get-reporting-payment-activity.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# `Get_Reporting_Payment_Activity` request class | ||
|
||
[ℹ️ This document is a part of __WooCommerce Payments Server Requests__](../README.md) | ||
|
||
## Description | ||
|
||
The `WCPay\Core\Server\Request\Get_Reporting_Payment_Activity` class is used to construct the request for retrieving payment activity. | ||
|
||
## Parameters | ||
|
||
| Parameter | Setter | Immutable | Required | Default value | | ||
|-------------|-------------------------------------------|:---------:|:--------:|:-------------:| | ||
| `date_start`| `set_date_start( string $date_start )` | No | Yes | - | | ||
| `date_end` | `set_date_end( string $date_end )` | No | Yes | - | | ||
| `timezone` | `set_timezone( string $timezone )` | No | Yes | - | | ||
|
||
The `date_start` and `date_end` parameters should be in the 'YYYY-MM-DDT00:00:00' format. | ||
The `timezone` parameter can be passed as an offset or as a [timezone name](https://www.php.net/manual/en/timezones.php). | ||
|
||
## Filter | ||
|
||
When using this request, provide the following filter and arguments: | ||
|
||
- Name: `wcpay_get_payment_activity` | ||
|
||
## Example: | ||
|
||
```php | ||
$request = Get_Reporting_Payment_Activity::create(); | ||
$request->set_date_start( $date_start ); | ||
$request->set_date_end( $date_end ); | ||
$request->set_timezone( $timezone ); | ||
$request->send(); | ||
``` | ||
|
||
## Exceptions | ||
|
||
- `Invalid_Request_Parameter_Exception` - Thrown when the provided date or timezone is not in expected format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters