Skip to content

Latest commit

 

History

History
336 lines (230 loc) · 11.1 KB

WebhookApi.md

File metadata and controls

336 lines (230 loc) · 11.1 KB

Reepay\WebhookApi

All URIs are relative to https://api.reepay.com

Method HTTP request Description
disableWebhooks POST /v1/webhook/disable Disable webhooks
getWebhook GET /v1/webhook/{id} Get webhooks
getWebhookRequests GET /v1/webhook/{id}/request Get webhook requests
getWebhooks GET /v1/webhook Get list of webhooks
resendJson POST /v1/webhook/resend Re-send webhooks
updateWebhooks POST /v1/webhook/update Update and resend webhooks

disableWebhooks

\Reepay\Model\Webhook[] disableWebhooks($body)

Disable webhooks

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apiKey
Reepay\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Reepay\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
// Configure HTTP basic authorization: basicAuth
Reepay\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Reepay\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$apiInstance = new Reepay\Api\WebhookApi();
$body = new \Reepay\Model\WebhookDisableRequest(); // \Reepay\Model\WebhookDisableRequest |

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

Parameters

Name Type Description Notes
body \Reepay\Model\WebhookDisableRequest [optional]

Return type

\Reepay\Model\Webhook[]

Authorization

apiKey, basicAuth

HTTP request headers

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

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

getWebhook

\Reepay\Model\Webhook[] getWebhook($id)

Get webhooks

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apiKey
Reepay\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Reepay\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
// Configure HTTP basic authorization: basicAuth
Reepay\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Reepay\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$apiInstance = new Reepay\Api\WebhookApi();
$id = "id_example"; // string | Webhook id or event id

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

Parameters

Name Type Description Notes
id string Webhook id or event id

Return type

\Reepay\Model\Webhook[]

Authorization

apiKey, basicAuth

HTTP request headers

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

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

getWebhookRequests

\Reepay\Model\WebhookRequest[] getWebhookRequests($id)

Get webhook requests

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apiKey
Reepay\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Reepay\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
// Configure HTTP basic authorization: basicAuth
Reepay\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Reepay\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$apiInstance = new Reepay\Api\WebhookApi();
$id = "id_example"; // string | Webhook id

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

Parameters

Name Type Description Notes
id string Webhook id

Return type

\Reepay\Model\WebhookRequest[]

Authorization

apiKey, basicAuth

HTTP request headers

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

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

getWebhooks

\Reepay\Model\Webhook[] getWebhooks($created_before, $size, $state)

Get list of webhooks

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apiKey
Reepay\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Reepay\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
// Configure HTTP basic authorization: basicAuth
Reepay\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Reepay\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$apiInstance = new Reepay\Api\WebhookApi();
$created_before = "created_before_example"; // string | Get webhooks created before this date, in [ISO-8601](http://en.wikipedia.org/wiki/ISO_8601) extended offset date-time format. Use last created date as filter for next page.
$size = 100; // int | Page size. A maximum of 100 is allowed.
$state = "state_example"; // string | Optional state to filter on, one of the following: `pending`, `disabled`, `failed`, `completed`

try {
    $result = $apiInstance->getWebhooks($created_before, $size, $state);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WebhookApi->getWebhooks: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
created_before string Get webhooks created before this date, in ISO-8601 extended offset date-time format. Use last created date as filter for next page.
size int Page size. A maximum of 100 is allowed. [optional] [default to 100]
state string Optional state to filter on, one of the following: pending, disabled, failed, completed [optional]

Return type

\Reepay\Model\Webhook[]

Authorization

apiKey, basicAuth

HTTP request headers

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

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

resendJson

\Reepay\Model\Webhook[] resendJson($body)

Re-send webhooks

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apiKey
Reepay\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Reepay\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
// Configure HTTP basic authorization: basicAuth
Reepay\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Reepay\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$apiInstance = new Reepay\Api\WebhookApi();
$body = new \Reepay\Model\WebhookResendRequest(); // \Reepay\Model\WebhookResendRequest |

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

Parameters

Name Type Description Notes
body \Reepay\Model\WebhookResendRequest [optional]

Return type

\Reepay\Model\Webhook[]

Authorization

apiKey, basicAuth

HTTP request headers

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

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

updateWebhooks

\Reepay\Model\Webhook[] updateWebhooks($body)

Update and resend webhooks

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apiKey
Reepay\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Reepay\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
// Configure HTTP basic authorization: basicAuth
Reepay\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Reepay\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$apiInstance = new Reepay\Api\WebhookApi();
$body = new \Reepay\Model\WebhookUpdateRequest(); // \Reepay\Model\WebhookUpdateRequest |

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

Parameters

Name Type Description Notes
body \Reepay\Model\WebhookUpdateRequest [optional]

Return type

\Reepay\Model\Webhook[]

Authorization

apiKey, basicAuth

HTTP request headers

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

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