import 'package:conekta/api.dart';
All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
ordersCreateDiscountLine | POST /orders/{id}/discount_lines | Create Discount |
ordersDeleteDiscountLines | DELETE /orders/{id}/discount_lines/{discount_lines_id} | Delete Discount |
ordersGetDiscountLine | GET /orders/{id}/discount_lines/{discount_lines_id} | Get Discount |
ordersGetDiscountLines | GET /orders/{id}/discount_lines | Get a List of Discount |
ordersUpdateDiscountLines | PUT /orders/{id}/discount_lines/{discount_lines_id} | Update Discount |
DiscountLinesResponse ordersCreateDiscountLine(id, orderDiscountLinesRequest, acceptLanguage, xChildCompanyId)
Create Discount
Create discount lines for an existing orden
import 'package:conekta/api.dart';
final api = Conekta().getDiscountsApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final OrderDiscountLinesRequest orderDiscountLinesRequest = ; // OrderDiscountLinesRequest | requested field for a discount lines
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.ordersCreateDiscountLine(id, orderDiscountLinesRequest, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling DiscountsApi->ordersCreateDiscountLine: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
orderDiscountLinesRequest | OrderDiscountLinesRequest | requested field for a discount lines | |
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]
DiscountLinesResponse ordersDeleteDiscountLines(id, discountLinesId, acceptLanguage, xChildCompanyId)
Delete Discount
Delete an existing discount lines for an existing orden
import 'package:conekta/api.dart';
final api = Conekta().getDiscountsApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final String discountLinesId = dis_lin_2tQ974hSHcsdeSZHG; // String | discount line id identifier
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.ordersDeleteDiscountLines(id, discountLinesId, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling DiscountsApi->ordersDeleteDiscountLines: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
discountLinesId | String | discount line id identifier | |
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]
DiscountLinesResponse ordersGetDiscountLine(id, discountLinesId, acceptLanguage, xChildCompanyId)
Get Discount
Get an existing discount lines for an existing orden
import 'package:conekta/api.dart';
final api = Conekta().getDiscountsApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final String discountLinesId = dis_lin_2tQ974hSHcsdeSZHG; // String | discount line id identifier
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.ordersGetDiscountLine(id, discountLinesId, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling DiscountsApi->ordersGetDiscountLine: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
discountLinesId | String | discount line id identifier | |
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]
GetOrderDiscountLinesResponse ordersGetDiscountLines(id, acceptLanguage, xChildCompanyId, limit, search, next, previous)
Get a List of Discount
Get discount lines for an existing orden
import 'package:conekta/api.dart';
final api = Conekta().getDiscountsApi();
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.
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.ordersGetDiscountLines(id, acceptLanguage, xChildCompanyId, limit, search, next, previous);
print(response);
} catch on DioException (e) {
print('Exception when calling DiscountsApi->ordersGetDiscountLines: $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] |
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] |
- 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]
DiscountLinesResponse ordersUpdateDiscountLines(id, discountLinesId, updateOrderDiscountLinesRequest, acceptLanguage, xChildCompanyId)
Update Discount
Update an existing discount lines for an existing orden
import 'package:conekta/api.dart';
final api = Conekta().getDiscountsApi();
final String id = 6307a60c41de27127515a575; // String | Identifier of the resource
final String discountLinesId = dis_lin_2tQ974hSHcsdeSZHG; // String | discount line id identifier
final UpdateOrderDiscountLinesRequest updateOrderDiscountLinesRequest = ; // UpdateOrderDiscountLinesRequest | requested field for a discount lines
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.ordersUpdateDiscountLines(id, discountLinesId, updateOrderDiscountLinesRequest, acceptLanguage, xChildCompanyId);
print(response);
} catch on DioException (e) {
print('Exception when calling DiscountsApi->ordersUpdateDiscountLines: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
discountLinesId | String | discount line id identifier | |
updateOrderDiscountLinesRequest | UpdateOrderDiscountLinesRequest | requested field for a discount lines | |
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]