WC_Stripe_API_Operation
in package
Used as a wrapper for API requests to Stripe.
Allows method chaining so things like mode can be set intuitively.
Tags
Table of Contents
Properties
- $client : StripeClient
- $gateway : WC_Stripe_Gateway
- $mode : string
- $property : string
- $service : AbstractService
Methods
- __call() : mixed
- Wrapper for Stripe API operations.
- __construct() : mixed
- mode() : $this
- parse_args() : mixed
- Given an array of arguments, add method defaults to the array of args based on their existance.
- sanitize_request_args() : void
- Prevents any unwanted arguments from being added to a Stripe request.
Properties
$client
private
StripeClient
$client
$gateway
private
WC_Stripe_Gateway
$gateway
$mode
private
string
$mode
= ''
$property
private
string
$property
$service
private
AbstractService
$service
Methods
__call()
Wrapper for Stripe API operations.
public
__call(string $method, array<string|int, mixed> $args) : mixed
This way, all exceptions can be caught gracefully.
Parameters
- $method : string
- $args : array<string|int, mixed>
Tags
__construct()
public
__construct(WC_Stripe_Gateway $gateway, StripeClient $client, string $property) : mixed
Parameters
- $gateway : WC_Stripe_Gateway
- $client : StripeClient
- $property : string
Tags
mode()
public
mode(string $mode) : $this
Parameters
- $mode : string
Return values
$thisparse_args()
Given an array of arguments, add method defaults to the array of args based on their existance.
private
parse_args(array<string|int, mixed> $args, string $method) : mixed
Parameters
- $args : array<string|int, mixed>
- $method : string
sanitize_request_args()
Prevents any unwanted arguments from being added to a Stripe request.
private
sanitize_request_args(mixed $args, mixed $method) : void
Parameters
- $args : mixed
- $method : mixed