All URIs are relative to https://my.yoast.test
Method | HTTP request | Description |
---|---|---|
cancelSubscription | POST /api/provisioning/subscriptions/{id}/cancel | Cancel a single subscription |
create | POST /api/provisioning/subscriptions/create | Create a subscription |
getOne | GET /api/provisioning/subscriptions/{id} | Get a subscription |
refundSubscription | POST /api/provisioning/subscriptions/{id}/refund | Refund a single subscription |
renewSubscription | POST /api/provisioning/subscriptions/{id}/renew | Renew a subscription |
setSiteForSubscription | POST /api/provisioning/subscriptions/{id}/set-site | Link a subscription to a site |
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto cancelSubscription($body, $id)
Cancel a single subscription
Cancel the subscription when the period ends, or immediately if that is requested, or the subscription is not valid
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\SubscriptionProvisioningApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$body = new \Yoast\MyYoastApiClient\Model\CancelProvisionedSubscriptionDto(); // \Yoast\MyYoastApiClient\Model\CancelProvisionedSubscriptionDto |
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$result = $apiInstance->cancelSubscription($body, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionProvisioningApi->cancelSubscription: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\CancelProvisionedSubscriptionDto | ||
id | string |
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto create($body)
Create a subscription
Creates a subscription for a customer.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\SubscriptionProvisioningApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$body = new \Yoast\MyYoastApiClient\Model\CreateProvisionedSubscriptionDto(); // \Yoast\MyYoastApiClient\Model\CreateProvisionedSubscriptionDto |
try {
$result = $apiInstance->create($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionProvisioningApi->create: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\CreateProvisionedSubscriptionDto |
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto getOne($id)
Get a subscription
Get a single subscription that was provisioned for a third party
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\SubscriptionProvisioningApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$result = $apiInstance->getOne($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionProvisioningApi->getOne: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string |
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto refundSubscription($id)
Refund a single subscription
Refund the subscription.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\SubscriptionProvisioningApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$result = $apiInstance->refundSubscription($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionProvisioningApi->refundSubscription: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string |
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto renewSubscription($id)
Renew a subscription
Renew the subscription for a new period.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\SubscriptionProvisioningApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$result = $apiInstance->renewSubscription($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionProvisioningApi->renewSubscription: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string |
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto setSiteForSubscription($body, $id)
Link a subscription to a site
Links the subscription to a customer's website. Setting a site the the subscription will remove the site if already set.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\SubscriptionProvisioningApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$body = new \Yoast\MyYoastApiClient\Model\SetProvisionedSiteDto(); // \Yoast\MyYoastApiClient\Model\SetProvisionedSiteDto |
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$result = $apiInstance->setSiteForSubscription($body, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionProvisioningApi->setSiteForSubscription: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\SetProvisionedSiteDto | ||
id | string |
\Yoast\MyYoastApiClient\Model\SubscriptionProvisioningResponseDto
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]