Skip to content

Latest commit

 

History

History
363 lines (253 loc) · 14.6 KB

CustomersApi.md

File metadata and controls

363 lines (253 loc) · 14.6 KB

conekta.api.CustomersApi

Load the API package

import 'package:conekta/api.dart';

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

Method HTTP request Description
createCustomer POST /customers Create customer
createCustomerFiscalEntities POST /customers/{id}/fiscal_entities Create Fiscal Entity
deleteCustomerById DELETE /customers/{id} Delete Customer
getCustomerById GET /customers/{id} Get Customer
getCustomers GET /customers Get a list of customers
updateCustomer PUT /customers/{id} Update customer
updateCustomerFiscalEntities PUT /customers/{id}/fiscal_entities/{fiscal_entities_id} Update Fiscal Entity

createCustomer

CustomerResponse createCustomer(customer, acceptLanguage, xChildCompanyId)

Create customer

The purpose of business is to create and keep a customer, you will learn what elements you need to create a customer. Remember the credit and debit card tokenization process: https://developers.conekta.com/page/web-checkout-tokenizer

Example

import 'package:conekta/api.dart';

final api = Conekta().getCustomersApi();
final Customer customer = ; // Customer | requested field for customer
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.createCustomer(customer, acceptLanguage, xChildCompanyId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CustomersApi->createCustomer: $e\n');
}

Parameters

Name Type Description Notes
customer Customer requested field for customer
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

CustomerResponse

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]

createCustomerFiscalEntities

CreateCustomerFiscalEntitiesResponse createCustomerFiscalEntities(id, customerFiscalEntitiesRequest, acceptLanguage, xChildCompanyId)

Create Fiscal Entity

Create Fiscal entity resource that corresponds to a customer ID.

Example

import 'package:conekta/api.dart';

final api = Conekta().getCustomersApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final CustomerFiscalEntitiesRequest customerFiscalEntitiesRequest = ; // CustomerFiscalEntitiesRequest | requested field for customer fiscal entities
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.createCustomerFiscalEntities(id, customerFiscalEntitiesRequest, acceptLanguage, xChildCompanyId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CustomersApi->createCustomerFiscalEntities: $e\n');
}

Parameters

Name Type Description Notes
id String Identifier of the resource
customerFiscalEntitiesRequest CustomerFiscalEntitiesRequest requested field for customer fiscal entities
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

CreateCustomerFiscalEntitiesResponse

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]

deleteCustomerById

CustomerResponse deleteCustomerById(id, acceptLanguage, xChildCompanyId)

Delete Customer

Deleted a customer resource that corresponds to a customer ID.

Example

import 'package:conekta/api.dart';

final api = Conekta().getCustomersApi();
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.deleteCustomerById(id, acceptLanguage, xChildCompanyId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CustomersApi->deleteCustomerById: $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

CustomerResponse

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]

getCustomerById

CustomerResponse getCustomerById(id, acceptLanguage, xChildCompanyId)

Get Customer

Gets a customer resource that corresponds to a customer ID.

Example

import 'package:conekta/api.dart';

final api = Conekta().getCustomersApi();
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.getCustomerById(id, acceptLanguage, xChildCompanyId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CustomersApi->getCustomerById: $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

CustomerResponse

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]

getCustomers

CustomersResponse getCustomers(acceptLanguage, xChildCompanyId, limit, search, next, previous)

Get a list of customers

The purpose of business is to create and maintain a client, you will learn what elements you need to obtain a list of clients, which can be paged.

Example

import 'package:conekta/api.dart';

final api = Conekta().getCustomersApi();
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 search = search_example; // String | General order search, e.g. by mail, reference etc.
final String next = next_example; // String | next page
final String previous = previous_example; // String | previous page

try {
    final response = api.getCustomers(acceptLanguage, xChildCompanyId, limit, search, next, previous);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CustomersApi->getCustomers: $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]
search String General order search, e.g. by mail, reference etc. [optional]
next String next page [optional]
previous String previous page [optional]

Return type

CustomersResponse

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]

updateCustomer

CustomerResponse updateCustomer(id, updateCustomer, acceptLanguage, xChildCompanyId)

Update customer

You can update customer-related data

Example

import 'package:conekta/api.dart';

final api = Conekta().getCustomersApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final UpdateCustomer updateCustomer = ; // UpdateCustomer | requested field for customer
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.updateCustomer(id, updateCustomer, acceptLanguage, xChildCompanyId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CustomersApi->updateCustomer: $e\n');
}

Parameters

Name Type Description Notes
id String Identifier of the resource
updateCustomer UpdateCustomer requested field for customer
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

CustomerResponse

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]

updateCustomerFiscalEntities

UpdateCustomerFiscalEntitiesResponse updateCustomerFiscalEntities(id, fiscalEntitiesId, customerUpdateFiscalEntitiesRequest, acceptLanguage, xChildCompanyId)

Update Fiscal Entity

Update Fiscal Entity resource that corresponds to a customer ID.

Example

import 'package:conekta/api.dart';

final api = Conekta().getCustomersApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final String fiscalEntitiesId = fis_ent_2tQ8HkkfbauaKP9Ho; // String | identifier
final CustomerUpdateFiscalEntitiesRequest customerUpdateFiscalEntitiesRequest = ; // CustomerUpdateFiscalEntitiesRequest | requested field for customer update fiscal entities
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.updateCustomerFiscalEntities(id, fiscalEntitiesId, customerUpdateFiscalEntitiesRequest, acceptLanguage, xChildCompanyId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling CustomersApi->updateCustomerFiscalEntities: $e\n');
}

Parameters

Name Type Description Notes
id String Identifier of the resource
fiscalEntitiesId String identifier
customerUpdateFiscalEntitiesRequest CustomerUpdateFiscalEntitiesRequest requested field for customer update fiscal entities
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

UpdateCustomerFiscalEntitiesResponse

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]