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
- add_expanded_properties() : mixed
- parse_args() : mixed
- Given an array of arguments, add method defaults to the array of args based on their existance.
- prepare_request_args() : array<string|int, mixed>
- Prevents any unwanted arguments from being added to a Stripe request.
- sanitize_intent_params() : mixed
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
$thisadd_expanded_properties()
private
add_expanded_properties(mixed $params, mixed $properties) : mixed
Parameters
- $params : mixed
- $properties : mixed
parse_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
prepare_request_args()
Prevents any unwanted arguments from being added to a Stripe request.
private
prepare_request_args(mixed $args, mixed $method) : array<string|int, mixed>
Parameters
- $args : mixed
- $method : mixed
Tags
Return values
array<string|int, mixed>sanitize_intent_params()
private
sanitize_intent_params(mixed $params, mixed $method) : mixed
Parameters
- $params : mixed
- $method : mixed