Skip to content

Latest commit

 

History

History
257 lines (177 loc) · 8.67 KB

ApiKeysApi.md

File metadata and controls

257 lines (177 loc) · 8.67 KB

conekta.api.ApiKeysApi

Load the API package

import 'package:conekta/api.dart';

All URIs are relative to https://api.conekta.io

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

ApiKeyCreateResponse createApiKey(apiKeyRequest, acceptLanguage, xChildCompanyId)

Create Api Key

Create a api key

Example

import 'package:conekta/api.dart';

final api = Conekta().getApiKeysApi();
final ApiKeyRequest apiKeyRequest = ; // ApiKeyRequest | requested field for a api keys
final String acceptLanguage = es; // String | Use for knowing which language to use
final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case of a holding company, the company id of the child company to which will process the request.

try {
    final response = api.createApiKey(apiKeyRequest, acceptLanguage, xChildCompanyId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ApiKeysApi->createApiKey: $e\n');
}

Parameters

Name Type Description Notes
apiKeyRequest ApiKeyRequest requested field for a api keys
acceptLanguage String Use for knowing which language to use [optional] [default to 'es']
xChildCompanyId String In the case of a holding company, the company id of the child company to which will process the request. [optional]

Return type

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

DeleteApiKeysResponse deleteApiKey(id, acceptLanguage)

Delete Api Key

Deletes a api key that corresponds to a api key ID

Example

import 'package:conekta/api.dart';

final api = Conekta().getApiKeysApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final String acceptLanguage = es; // String | Use for knowing which language to use

try {
    final response = api.deleteApiKey(id, acceptLanguage);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ApiKeysApi->deleteApiKey: $e\n');
}

Parameters

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

Return type

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

ApiKeyResponse getApiKey(id, acceptLanguage, xChildCompanyId)

Get Api Key

Gets a api key that corresponds to a api key ID

Example

import 'package:conekta/api.dart';

final api = Conekta().getApiKeysApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final String acceptLanguage = es; // String | Use for knowing which language to use
final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case of a holding company, the company id of the child company to which will process the request.

try {
    final response = api.getApiKey(id, acceptLanguage, xChildCompanyId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ApiKeysApi->getApiKey: $e\n');
}

Parameters

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

Return type

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

GetApiKeysResponse getApiKeys(acceptLanguage, xChildCompanyId, limit, next, previous, search)

Get list of Api Keys

Consume the list of api keys you have

Example

import 'package:conekta/api.dart';

final api = Conekta().getApiKeysApi();
final String acceptLanguage = es; // String | Use for knowing which language to use
final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case of a holding company, the company id of the child company to which will process the request.
final int limit = 56; // int | The numbers of items to return, the maximum value is 250
final String next = next_example; // String | next page
final String previous = previous_example; // String | previous page
final String search = search_example; // String | General search, e.g. by id, description, prefix

try {
    final response = api.getApiKeys(acceptLanguage, xChildCompanyId, limit, next, previous, search);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ApiKeysApi->getApiKeys: $e\n');
}

Parameters

Name Type Description Notes
acceptLanguage String Use for knowing which language to use [optional] [default to 'es']
xChildCompanyId 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

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

ApiKeyResponse updateApiKey(id, acceptLanguage, apiKeyUpdateRequest)

Update Api Key

Update an existing api key

Example

import 'package:conekta/api.dart';

final api = Conekta().getApiKeysApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final String acceptLanguage = es; // String | Use for knowing which language to use
final ApiKeyUpdateRequest apiKeyUpdateRequest = ; // ApiKeyUpdateRequest | 

try {
    final response = api.updateApiKey(id, acceptLanguage, apiKeyUpdateRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ApiKeysApi->updateApiKey: $e\n');
}

Parameters

Name Type Description Notes
id String Identifier of the resource
acceptLanguage String Use for knowing which language to use [optional] [default to 'es']
apiKeyUpdateRequest ApiKeyUpdateRequest [optional]

Return type

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]