Skip to content

Latest commit

 

History

History
176 lines (125 loc) · 5.05 KB

RefundApi.md

File metadata and controls

176 lines (125 loc) · 5.05 KB

Yoast\MyYoastApiClient\RefundApi

All URIs are relative to https://my.yoast.test

Method HTTP request Description
export GET /api/Refunds/export Get refunds
getMany GET /api/Refunds Get refunds
getOne GET /api/Refunds/{id} Get a refund

export

\Yoast\MyYoastApiClient\Model\Refund[] export($startDate, $endDate)

Get refunds

A large export of refunds between dates

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\RefundApi(
    // 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(),
    $config
);
$startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | 
$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | 

try {
    $result = $apiInstance->export($startDate, $endDate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RefundApi->export: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
startDate \DateTime
endDate \DateTime

Return type

\Yoast\MyYoastApiClient\Model\Refund[]

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMany

\Yoast\MyYoastApiClient\Model\Refund[] getMany($filter)

Get refunds

Get and filter refunds

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\RefundApi(
    // 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(),
    $config
);
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getMany($filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RefundApi->getMany: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Refund[]

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getOne

\Yoast\MyYoastApiClient\Model\Refund getOne($id, $filter)

Get a refund

Get a single refund

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\RefundApi(
    // 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(),
    $config
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 
$filter = new \stdClass; // object | Used for filtering/joining the results.

try {
    $result = $apiInstance->getOne($id, $filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RefundApi->getOne: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Refund

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]