-
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.
Merge pull request #37 from FLUX-SE/php-stripe-v12
Use StripeClient class
- Loading branch information
Showing
97 changed files
with
1,044 additions
and
255 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
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
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
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
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
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.