PurchaseSyncInterface.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Integrations\Contracts; |
| 4 | |
| 5 | interface PurchaseSyncInterface { |
| 6 | /** |
| 7 | * Method is run when the purchase is created. |
| 8 | * |
| 9 | * @param \SureCart\Models\Integration $integration The integrations. |
| 10 | * @param \WP_User $wp_user The user. |
| 11 | * |
| 12 | * @return boolean|void Returns true if the updation was successful otherwise false. |
| 13 | */ |
| 14 | public function onPurchaseCreated( $integration, $wp_user ); |
| 15 | |
| 16 | /** |
| 17 | * Method is run when the purchase is invoked |
| 18 | * |
| 19 | * @param \SureCart\Models\Integration $integration The integrations. |
| 20 | * @param \WP_User $wp_user The user. |
| 21 | * |
| 22 | * @return boolean|void Returns true if the updation was successful otherwise false. |
| 23 | */ |
| 24 | public function onPurchaseInvoked( $integration, $wp_user ); |
| 25 | |
| 26 | /** |
| 27 | * Method is run when the purchase is revoked. |
| 28 | * |
| 29 | * @param \SureCart\Models\Integration $integration The integrations. |
| 30 | * @param \WP_User $wp_user The user. |
| 31 | * |
| 32 | * @return boolean|void Returns true if the updation was successful otherwise false. |
| 33 | */ |
| 34 | public function onPurchaseRevoked( $integration, $wp_user ); |
| 35 | } |
| 36 |