import 'package:conekta/api.dart';
All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
cancelSubscription | POST /customers/{id}/subscription/cancel | Cancel Subscription |
createSubscription | POST /customers/{id}/subscription | Create Subscription |
getAllEventsFromSubscription | GET /customers/{id}/subscription/events | Get Events By Subscription |
getSubscription | GET /customers/{id}/subscription | Get Subscription |
pauseSubscription | POST /customers/{id}/subscription/pause | Pause Subscription |
resumeSubscription | POST /customers/{id}/subscription/resume | Resume Subscription |
updateSubscription | PUT /customers/{id}/subscription | Update Subscription |
SubscriptionResponse cancelSubscription(id, acceptLanguage, xChildCompanyId)
Cancel Subscription
You can cancel the subscription to stop the plans that your customers consume
import 'package:conekta/api.dart';
final api = Conekta().getSubscriptionsApi();
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.cancelSubscription(id, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling SubscriptionsApi->cancelSubscription: $e\n');
}
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] |
- 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]
SubscriptionResponse createSubscription(id, subscriptionRequest, acceptLanguage, xChildCompanyId)
Create Subscription
You can create the subscription to include the plans that your customers consume
import 'package:conekta/api.dart';
final api = Conekta().getSubscriptionsApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final SubscriptionRequest subscriptionRequest = ; // SubscriptionRequest | requested field for subscriptions
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.createSubscription(id, subscriptionRequest, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling SubscriptionsApi->createSubscription: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
subscriptionRequest | SubscriptionRequest | requested field for subscriptions | |
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] |
- 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]
SubscriptionEventsResponse getAllEventsFromSubscription(id, acceptLanguage, xChildCompanyId)
Get Events By Subscription
You can get the events of the subscription(s) of a client, with the customer id
import 'package:conekta/api.dart';
final api = Conekta().getSubscriptionsApi();
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.getAllEventsFromSubscription(id, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling SubscriptionsApi->getAllEventsFromSubscription: $e\n');
}
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] |
- 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]
SubscriptionResponse getSubscription(id, acceptLanguage)
Get Subscription
import 'package:conekta/api.dart';
final api = Conekta().getSubscriptionsApi();
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.getSubscription(id, acceptLanguage);
print(response);
} catch on DioException (e) {
print('Exception when calling SubscriptionsApi->getSubscription: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
acceptLanguage | String | Use for knowing which language to use | [optional] [default to 'es'] |
- 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]
SubscriptionResponse pauseSubscription(id, acceptLanguage, xChildCompanyId)
Pause Subscription
You can pause the subscription to stop the plans that your customers consume
import 'package:conekta/api.dart';
final api = Conekta().getSubscriptionsApi();
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.pauseSubscription(id, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling SubscriptionsApi->pauseSubscription: $e\n');
}
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] |
- 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]
SubscriptionResponse resumeSubscription(id, acceptLanguage, xChildCompanyId)
Resume Subscription
You can resume the subscription to start the plans that your customers consume
import 'package:conekta/api.dart';
final api = Conekta().getSubscriptionsApi();
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.resumeSubscription(id, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling SubscriptionsApi->resumeSubscription: $e\n');
}
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] |
- 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]
SubscriptionResponse updateSubscription(id, subscriptionUpdateRequest, acceptLanguage, xChildCompanyId)
Update Subscription
You can modify the subscription to change the plans that your customers consume
import 'package:conekta/api.dart';
final api = Conekta().getSubscriptionsApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final SubscriptionUpdateRequest subscriptionUpdateRequest = ; // SubscriptionUpdateRequest | requested field for update a subscription
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.updateSubscription(id, subscriptionUpdateRequest, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling SubscriptionsApi->updateSubscription: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
subscriptionUpdateRequest | SubscriptionUpdateRequest | requested field for update a subscription | |
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] |
- 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]