-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some Plan, Price and Product api actions
- Loading branch information
Showing
30 changed files
with
396 additions
and
0 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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Action\Api\Resource; | ||
|
||
use FluxSE\PayumStripe\Request\Api\Resource\AllInterface; | ||
use FluxSE\PayumStripe\Request\Api\Resource\AllPlan; | ||
use Stripe\Service\AbstractService; | ||
use Stripe\StripeClient; | ||
|
||
final class AllPlanAction extends AbstractAllAction | ||
{ | ||
public function getStripeService(StripeClient $stripeClient): AbstractService | ||
{ | ||
return $stripeClient->plans; | ||
} | ||
|
||
public function supportAlso(AllInterface $request): bool | ||
{ | ||
return $request instanceof AllPlan; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Action\Api\Resource; | ||
|
||
use FluxSE\PayumStripe\Request\Api\Resource\AllInterface; | ||
use FluxSE\PayumStripe\Request\Api\Resource\AllPrice; | ||
use Stripe\Service\AbstractService; | ||
use Stripe\StripeClient; | ||
|
||
final class AllPriceAction extends AbstractAllAction | ||
{ | ||
public function getStripeService(StripeClient $stripeClient): AbstractService | ||
{ | ||
return $stripeClient->prices; | ||
} | ||
|
||
public function supportAlso(AllInterface $request): bool | ||
{ | ||
return $request instanceof AllPrice; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Action\Api\Resource; | ||
|
||
use FluxSE\PayumStripe\Request\Api\Resource\AllInterface; | ||
use FluxSE\PayumStripe\Request\Api\Resource\AllProduct; | ||
use Stripe\Service\AbstractService; | ||
use Stripe\StripeClient; | ||
|
||
final class AllProductAction extends AbstractAllAction | ||
{ | ||
public function getStripeService(StripeClient $stripeClient): AbstractService | ||
{ | ||
return $stripeClient->products; | ||
} | ||
|
||
public function supportAlso(AllInterface $request): bool | ||
{ | ||
return $request instanceof AllProduct; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Action\Api\Resource; | ||
|
||
use FluxSE\PayumStripe\Request\Api\Resource\CreatePrice; | ||
use FluxSE\PayumStripe\Request\Api\Resource\CreateInterface; | ||
use Stripe\Service\AbstractService; | ||
use Stripe\StripeClient; | ||
|
||
final class CreatePriceAction extends AbstractCreateAction | ||
{ | ||
public function getStripeService(StripeClient $stripeClient): AbstractService | ||
{ | ||
return $stripeClient->prices; | ||
} | ||
|
||
public function supportAlso(CreateInterface $request): bool | ||
{ | ||
return $request instanceof CreatePrice; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Action\Api\Resource; | ||
|
||
use FluxSE\PayumStripe\Request\Api\Resource\CreateProduct; | ||
use FluxSE\PayumStripe\Request\Api\Resource\CreateInterface; | ||
use Stripe\Service\AbstractService; | ||
use Stripe\StripeClient; | ||
|
||
final class CreateProductAction extends AbstractCreateAction | ||
{ | ||
public function getStripeService(StripeClient $stripeClient): AbstractService | ||
{ | ||
return $stripeClient->products; | ||
} | ||
|
||
public function supportAlso(CreateInterface $request): bool | ||
{ | ||
return $request instanceof CreateProduct; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Action\Api\Resource; | ||
|
||
use FluxSE\PayumStripe\Request\Api\Resource\DeleteInterface; | ||
use FluxSE\PayumStripe\Request\Api\Resource\DeleteProduct; | ||
use Stripe\Service\AbstractService; | ||
use Stripe\StripeClient; | ||
|
||
final class DeleteProductAction extends AbstractDeleteAction | ||
{ | ||
public function getStripeService(StripeClient $stripeClient): AbstractService | ||
{ | ||
return $stripeClient->products; | ||
} | ||
|
||
public function supportAlso(DeleteInterface $request): bool | ||
{ | ||
return $request instanceof DeleteProduct; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Action\Api\Resource; | ||
|
||
use FluxSE\PayumStripe\Request\Api\Resource\RetrieveInterface; | ||
use FluxSE\PayumStripe\Request\Api\Resource\RetrievePrice; | ||
use Stripe\Service\AbstractService; | ||
use Stripe\StripeClient; | ||
|
||
final class RetrievePriceAction extends AbstractRetrieveAction | ||
{ | ||
public function getStripeService(StripeClient $stripeClient): AbstractService | ||
{ | ||
return $stripeClient->prices; | ||
} | ||
|
||
public function supportAlso(RetrieveInterface $request): bool | ||
{ | ||
return $request instanceof RetrievePrice; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Action\Api\Resource; | ||
|
||
use FluxSE\PayumStripe\Request\Api\Resource\UpdateInterface; | ||
use FluxSE\PayumStripe\Request\Api\Resource\UpdatePlan; | ||
use Stripe\Service\AbstractService; | ||
use Stripe\StripeClient; | ||
|
||
final class UpdatePlanAction extends AbstractUpdateAction | ||
{ | ||
public function getStripeService(StripeClient $stripeClient): AbstractService | ||
{ | ||
return $stripeClient->plans; | ||
} | ||
|
||
public function supportAlso(UpdateInterface $request): bool | ||
{ | ||
return $request instanceof UpdatePlan; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Action\Api\Resource; | ||
|
||
use FluxSE\PayumStripe\Request\Api\Resource\UpdateInterface; | ||
use FluxSE\PayumStripe\Request\Api\Resource\UpdatePrice; | ||
use Stripe\Service\AbstractService; | ||
use Stripe\StripeClient; | ||
|
||
final class UpdatePriceAction extends AbstractUpdateAction | ||
{ | ||
public function getStripeService(StripeClient $stripeClient): AbstractService | ||
{ | ||
return $stripeClient->prices; | ||
} | ||
|
||
public function supportAlso(UpdateInterface $request): bool | ||
{ | ||
return $request instanceof UpdatePrice; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Action\Api\Resource; | ||
|
||
use FluxSE\PayumStripe\Request\Api\Resource\UpdateInterface; | ||
use FluxSE\PayumStripe\Request\Api\Resource\UpdateProduct; | ||
use Stripe\Service\AbstractService; | ||
use Stripe\StripeClient; | ||
|
||
final class UpdateProductAction extends AbstractUpdateAction | ||
{ | ||
public function getStripeService(StripeClient $stripeClient): AbstractService | ||
{ | ||
return $stripeClient->products; | ||
} | ||
|
||
public function supportAlso(UpdateInterface $request): bool | ||
{ | ||
return $request instanceof UpdateProduct; | ||
} | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Request\Api\Resource; | ||
|
||
final class AllPlan extends AbstractAll | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Request\Api\Resource; | ||
|
||
final class AllPrice extends AbstractAll | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Request\Api\Resource; | ||
|
||
final class AllProduct extends AbstractAll | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Request\Api\Resource; | ||
|
||
final class CreatePrice extends AbstractCreate | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Request\Api\Resource; | ||
|
||
final class CreateProduct extends AbstractCreate | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Request\Api\Resource; | ||
|
||
final class DeleteProduct extends AbstractDelete | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Request\Api\Resource; | ||
|
||
final class RetrievePrice extends AbstractRetrieve | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Request\Api\Resource; | ||
|
||
final class UpdatePlan extends AbstractUpdate | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Request\Api\Resource; | ||
|
||
final class UpdatePrice extends AbstractUpdate | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace FluxSE\PayumStripe\Request\Api\Resource; | ||
|
||
final class UpdateProduct extends AbstractUpdate | ||
{ | ||
} |
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
Oops, something went wrong.