Skip to content

Latest commit

 

History

History
336 lines (233 loc) · 11 KB

ApiKeysApi.md

File metadata and controls

336 lines (233 loc) · 11 KB

Conekta\ApiKeysApi

All URIs are relative to https://api.conekta.io, except if the operation defines another base path.

Method HTTP request Description
createApiKey() POST /api_keys Create Api Key
deleteApiKey() DELETE /api_keys/{id} Delete Api Key
getApiKey() GET /api_keys/{id} Get Api Key
getApiKeys() GET /api_keys Get list of Api Keys
updateApiKey() PUT /api_keys/{id} Update Api Key

createApiKey()

createApiKey($api_key_request, $accept_language, $x_child_company_id): \Conekta\Model\ApiKeyCreateResponse

Create Api Key

Create a api key

Example

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


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\ApiKeysApi(
    // 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
);
$api_key_request = new \Conekta\Model\ApiKeyRequest(); // \Conekta\Model\ApiKeyRequest | requested field for a api keys
$accept_language = es; // string | Use for knowing which language to use
$x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request.

try {
    $result = $apiInstance->createApiKey($api_key_request, $accept_language, $x_child_company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApiKeysApi->createApiKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
api_key_request \Conekta\Model\ApiKeyRequest requested field for a api keys
accept_language string Use for knowing which language to use [optional] [default to 'es']
x_child_company_id string In the case of a holding company, the company id of the child company to which will process the request. [optional]

Return type

\Conekta\Model\ApiKeyCreateResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.conekta-v2.1.0+json

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

deleteApiKey()

deleteApiKey($id, $accept_language): \Conekta\Model\DeleteApiKeysResponse

Delete Api Key

Deletes a api key that corresponds to a api key ID

Example

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


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\ApiKeysApi(
    // 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 = 6307a60c41de27127515a575; // string | Identifier of the resource
$accept_language = es; // string | Use for knowing which language to use

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

Parameters

Name Type Description Notes
id string Identifier of the resource
accept_language string Use for knowing which language to use [optional] [default to 'es']

Return type

\Conekta\Model\DeleteApiKeysResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

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

getApiKey()

getApiKey($id, $accept_language, $x_child_company_id): \Conekta\Model\ApiKeyResponse

Get Api Key

Gets a api key that corresponds to a api key ID

Example

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


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\ApiKeysApi(
    // 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 = 6307a60c41de27127515a575; // string | Identifier of the resource
$accept_language = es; // string | Use for knowing which language to use
$x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request.

try {
    $result = $apiInstance->getApiKey($id, $accept_language, $x_child_company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApiKeysApi->getApiKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Identifier of the resource
accept_language string Use for knowing which language to use [optional] [default to 'es']
x_child_company_id string In the case of a holding company, the company id of the child company to which will process the request. [optional]

Return type

\Conekta\Model\ApiKeyResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

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

getApiKeys()

getApiKeys($accept_language, $x_child_company_id, $limit, $next, $previous, $search): \Conekta\Model\GetApiKeysResponse

Get list of Api Keys

Consume the list of api keys you have

Example

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


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\ApiKeysApi(
    // 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
);
$accept_language = es; // string | Use for knowing which language to use
$x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request.
$limit = 20; // int | The numbers of items to return, the maximum value is 250
$next = 'next_example'; // string | next page
$previous = 'previous_example'; // string | previous page
$search = 'search_example'; // string | General search, e.g. by id, description, prefix

try {
    $result = $apiInstance->getApiKeys($accept_language, $x_child_company_id, $limit, $next, $previous, $search);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApiKeysApi->getApiKeys: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
accept_language string Use for knowing which language to use [optional] [default to 'es']
x_child_company_id string In the case of a holding company, the company id of the child company to which will process the request. [optional]
limit int The numbers of items to return, the maximum value is 250 [optional] [default to 20]
next string next page [optional]
previous string previous page [optional]
search string General search, e.g. by id, description, prefix [optional]

Return type

\Conekta\Model\GetApiKeysResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

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

updateApiKey()

updateApiKey($id, $accept_language, $api_key_update_request): \Conekta\Model\ApiKeyResponse

Update Api Key

Update an existing api key

Example

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


// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\ApiKeysApi(
    // 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 = 6307a60c41de27127515a575; // string | Identifier of the resource
$accept_language = es; // string | Use for knowing which language to use
$api_key_update_request = new \Conekta\Model\ApiKeyUpdateRequest(); // \Conekta\Model\ApiKeyUpdateRequest

try {
    $result = $apiInstance->updateApiKey($id, $accept_language, $api_key_update_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApiKeysApi->updateApiKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Identifier of the resource
accept_language string Use for knowing which language to use [optional] [default to 'es']
api_key_update_request \Conekta\Model\ApiKeyUpdateRequest [optional]

Return type

\Conekta\Model\ApiKeyResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.conekta-v2.1.0+json

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