cartCheckoutUuidPost
完成订单并结账
CM 接收到完成订单并结账的请求
/cart/checkout/{uuid}
用法和 SDK 示例
curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//cart/checkout/{uuid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CartApi;
import java.io.File;
import java.util.*;
public class CartApiExample {
public static void main(String[] args) {
CartApi apiInstance = new CartApi();
Checkout_uuid_body body = ; // Checkout_uuid_body |
String uuid = uuid_example; // String | The uuid to be used by CM
try {
executeActionResponse result = apiInstance.cartCheckoutUuidPost(body, uuid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CartApi#cartCheckoutUuidPost");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CartApi;
public class CartApiExample {
public static void main(String[] args) {
CartApi apiInstance = new CartApi();
Checkout_uuid_body body = ; // Checkout_uuid_body |
String uuid = uuid_example; // String | The uuid to be used by CM
try {
executeActionResponse result = apiInstance.cartCheckoutUuidPost(body, uuid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CartApi#cartCheckoutUuidPost");
e.printStackTrace();
}
}
}
Checkout_uuid_body *body = ; //
String *uuid = uuid_example; // The uuid to be used by CM
CartApi *apiInstance = [[CartApi alloc] init];
// Complete the order and checkout
[apiInstance cartCheckoutUuidPostWith:body
uuid:uuid
completionHandler: ^(executeActionResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var TokkioCartManager = require('tokkio_cart_manager');
var api = new TokkioCartManager.CartApi()
var body = ; // {{Checkout_uuid_body}}
var uuid = uuid_example; // {{String}} The uuid to be used by CM
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.cartCheckoutUuidPost(bodyuuid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class cartCheckoutUuidPostExample
{
public void main()
{
var apiInstance = new CartApi();
var body = new Checkout_uuid_body(); // Checkout_uuid_body |
var uuid = uuid_example; // String | The uuid to be used by CM
try
{
// Complete the order and checkout
executeActionResponse result = apiInstance.cartCheckoutUuidPost(body, uuid);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CartApi.cartCheckoutUuidPost: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiCartApi();
$body = ; // Checkout_uuid_body |
$uuid = uuid_example; // String | The uuid to be used by CM
try {
$result = $api_instance->cartCheckoutUuidPost($body, $uuid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CartApi->cartCheckoutUuidPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CartApi;
my $api_instance = WWW::SwaggerClient::CartApi->new();
my $body = WWW::SwaggerClient::Object::Checkout_uuid_body->new(); # Checkout_uuid_body |
my $uuid = uuid_example; # String | The uuid to be used by CM
eval {
my $result = $api_instance->cartCheckoutUuidPost(body => $body, uuid => $uuid);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CartApi->cartCheckoutUuidPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.CartApi()
body = # Checkout_uuid_body |
uuid = uuid_example # String | The uuid to be used by CM
try:
# Complete the order and checkout
api_response = api_instance.cart_checkout_uuid_post(body, uuid)
pprint(api_response)
except ApiException as e:
print("Exception when calling CartApi->cartCheckoutUuidPost: %s\n" % e)
参数
路径参数
名称 | 描述 |
---|---|
uuid* |
字符串
CM 使用的 uuid
必需
|
请求体参数
名称 | 描述 |
---|---|
body * |