Skip to content

Commit 40d2843

Browse files
committed
Support API CreateOrder.
1 parent 413813c commit 40d2843

File tree

6 files changed

+273
-1
lines changed

6 files changed

+273
-1
lines changed

intlmarket-20250812/ChangeLog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2025-08-15 Version: 1.1.0
2+
- Support API CreateOrder.
3+
4+
15
2025-08-14 Version: 1.0.0
26
- Generated java 2025-08-12 for IntlMarket.
37

intlmarket-20250812/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.aliyun</groupId>
55
<artifactId>intlmarket20250812</artifactId>
6-
<version>1.0.0</version>
6+
<version>1.1.0</version>
77
<packaging>jar</packaging>
88
<name>intlmarket20250812</name>
99
<description>Alibaba Cloud IntlMarket (20250812) SDK for Java

intlmarket-20250812/src/main/java/com/aliyun/intlmarket20250812/Client.java

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,70 @@ public String getEndpoint(String productId, String regionId, String endpointRule
2626
return com.aliyun.endpointutil.Client.getEndpointRules(productId, regionId, endpointRule, network, suffix);
2727
}
2828

29+
/**
30+
* <b>summary</b> :
31+
* <p>创建云市场订单</p>
32+
*
33+
* @param request CreateOrderRequest
34+
* @param runtime runtime options for this request RuntimeOptions
35+
* @return CreateOrderResponse
36+
*/
37+
public CreateOrderResponse createOrderWithOptions(CreateOrderRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
38+
com.aliyun.teautil.Common.validateModel(request);
39+
java.util.Map<String, Object> query = new java.util.HashMap<>();
40+
if (!com.aliyun.teautil.Common.isUnset(request.clientToken)) {
41+
query.put("ClientToken", request.clientToken);
42+
}
43+
44+
if (!com.aliyun.teautil.Common.isUnset(request.commodity)) {
45+
query.put("Commodity", request.commodity);
46+
}
47+
48+
if (!com.aliyun.teautil.Common.isUnset(request.orderSouce)) {
49+
query.put("OrderSouce", request.orderSouce);
50+
}
51+
52+
if (!com.aliyun.teautil.Common.isUnset(request.orderType)) {
53+
query.put("OrderType", request.orderType);
54+
}
55+
56+
if (!com.aliyun.teautil.Common.isUnset(request.ownerId)) {
57+
query.put("OwnerId", request.ownerId);
58+
}
59+
60+
if (!com.aliyun.teautil.Common.isUnset(request.paymentType)) {
61+
query.put("PaymentType", request.paymentType);
62+
}
63+
64+
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
65+
new TeaPair("query", com.aliyun.openapiutil.Client.query(query))
66+
));
67+
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
68+
new TeaPair("action", "CreateOrder"),
69+
new TeaPair("version", "2025-08-12"),
70+
new TeaPair("protocol", "HTTPS"),
71+
new TeaPair("pathname", "/"),
72+
new TeaPair("method", "POST"),
73+
new TeaPair("authType", "AK"),
74+
new TeaPair("style", "RPC"),
75+
new TeaPair("reqBodyType", "formData"),
76+
new TeaPair("bodyType", "json")
77+
));
78+
return TeaModel.toModel(this.callApi(params, req, runtime), new CreateOrderResponse());
79+
}
80+
81+
/**
82+
* <b>summary</b> :
83+
* <p>创建云市场订单</p>
84+
*
85+
* @param request CreateOrderRequest
86+
* @return CreateOrderResponse
87+
*/
88+
public CreateOrderResponse createOrder(CreateOrderRequest request) throws Exception {
89+
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
90+
return this.createOrderWithOptions(request, runtime);
91+
}
92+
2993
/**
3094
* <b>summary</b> :
3195
* <p>询价</p>
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
// This file is auto-generated, don't edit it. Thanks.
2+
package com.aliyun.intlmarket20250812.models;
3+
4+
import com.aliyun.tea.*;
5+
6+
public class CreateOrderRequest extends TeaModel {
7+
/**
8+
* <p>This parameter is required.</p>
9+
*
10+
* <strong>example:</strong>
11+
* <p>dhjggh7</p>
12+
*/
13+
@NameInMap("ClientToken")
14+
public String clientToken;
15+
16+
/**
17+
* <p>This parameter is required.</p>
18+
*
19+
* <strong>example:</strong>
20+
* <p>{\&quot;productCode\&quot;:\&quot;cmgj00063418\&quot;,\&quot;skuCode\&quot;:\&quot;postpay\&quot;,\&quot;pricingCycle\&quot;:\&quot;YEAR\&quot;}</p>
21+
*/
22+
@NameInMap("Commodity")
23+
public String commodity;
24+
25+
/**
26+
* <strong>example:</strong>
27+
* <p>ros</p>
28+
*/
29+
@NameInMap("OrderSouce")
30+
public String orderSouce;
31+
32+
/**
33+
* <p>This parameter is required.</p>
34+
*
35+
* <strong>example:</strong>
36+
* <p>INSTANCE_BUY</p>
37+
*/
38+
@NameInMap("OrderType")
39+
public String orderType;
40+
41+
@NameInMap("OwnerId")
42+
public String ownerId;
43+
44+
/**
45+
* <p>This parameter is required.</p>
46+
*
47+
* <strong>example:</strong>
48+
* <p>Subscription</p>
49+
*/
50+
@NameInMap("PaymentType")
51+
public String paymentType;
52+
53+
public static CreateOrderRequest build(java.util.Map<String, ?> map) throws Exception {
54+
CreateOrderRequest self = new CreateOrderRequest();
55+
return TeaModel.build(map, self);
56+
}
57+
58+
public CreateOrderRequest setClientToken(String clientToken) {
59+
this.clientToken = clientToken;
60+
return this;
61+
}
62+
public String getClientToken() {
63+
return this.clientToken;
64+
}
65+
66+
public CreateOrderRequest setCommodity(String commodity) {
67+
this.commodity = commodity;
68+
return this;
69+
}
70+
public String getCommodity() {
71+
return this.commodity;
72+
}
73+
74+
public CreateOrderRequest setOrderSouce(String orderSouce) {
75+
this.orderSouce = orderSouce;
76+
return this;
77+
}
78+
public String getOrderSouce() {
79+
return this.orderSouce;
80+
}
81+
82+
public CreateOrderRequest setOrderType(String orderType) {
83+
this.orderType = orderType;
84+
return this;
85+
}
86+
public String getOrderType() {
87+
return this.orderType;
88+
}
89+
90+
public CreateOrderRequest setOwnerId(String ownerId) {
91+
this.ownerId = ownerId;
92+
return this;
93+
}
94+
public String getOwnerId() {
95+
return this.ownerId;
96+
}
97+
98+
public CreateOrderRequest setPaymentType(String paymentType) {
99+
this.paymentType = paymentType;
100+
return this;
101+
}
102+
public String getPaymentType() {
103+
return this.paymentType;
104+
}
105+
106+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// This file is auto-generated, don't edit it. Thanks.
2+
package com.aliyun.intlmarket20250812.models;
3+
4+
import com.aliyun.tea.*;
5+
6+
public class CreateOrderResponse extends TeaModel {
7+
@NameInMap("headers")
8+
public java.util.Map<String, String> headers;
9+
10+
@NameInMap("statusCode")
11+
public Integer statusCode;
12+
13+
@NameInMap("body")
14+
public CreateOrderResponseBody body;
15+
16+
public static CreateOrderResponse build(java.util.Map<String, ?> map) throws Exception {
17+
CreateOrderResponse self = new CreateOrderResponse();
18+
return TeaModel.build(map, self);
19+
}
20+
21+
public CreateOrderResponse setHeaders(java.util.Map<String, String> headers) {
22+
this.headers = headers;
23+
return this;
24+
}
25+
public java.util.Map<String, String> getHeaders() {
26+
return this.headers;
27+
}
28+
29+
public CreateOrderResponse setStatusCode(Integer statusCode) {
30+
this.statusCode = statusCode;
31+
return this;
32+
}
33+
public Integer getStatusCode() {
34+
return this.statusCode;
35+
}
36+
37+
public CreateOrderResponse setBody(CreateOrderResponseBody body) {
38+
this.body = body;
39+
return this;
40+
}
41+
public CreateOrderResponseBody getBody() {
42+
return this.body;
43+
}
44+
45+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// This file is auto-generated, don't edit it. Thanks.
2+
package com.aliyun.intlmarket20250812.models;
3+
4+
import com.aliyun.tea.*;
5+
6+
public class CreateOrderResponseBody extends TeaModel {
7+
@NameInMap("InstanceIds")
8+
public java.util.List<String> instanceIds;
9+
10+
/**
11+
* <strong>example:</strong>
12+
* <p>12809858</p>
13+
*/
14+
@NameInMap("OrderId")
15+
public String orderId;
16+
17+
/**
18+
* <strong>example:</strong>
19+
* <p>054AF571-C86F-533F-8A7B-F62206FA4367</p>
20+
*/
21+
@NameInMap("RequestId")
22+
public String requestId;
23+
24+
public static CreateOrderResponseBody build(java.util.Map<String, ?> map) throws Exception {
25+
CreateOrderResponseBody self = new CreateOrderResponseBody();
26+
return TeaModel.build(map, self);
27+
}
28+
29+
public CreateOrderResponseBody setInstanceIds(java.util.List<String> instanceIds) {
30+
this.instanceIds = instanceIds;
31+
return this;
32+
}
33+
public java.util.List<String> getInstanceIds() {
34+
return this.instanceIds;
35+
}
36+
37+
public CreateOrderResponseBody setOrderId(String orderId) {
38+
this.orderId = orderId;
39+
return this;
40+
}
41+
public String getOrderId() {
42+
return this.orderId;
43+
}
44+
45+
public CreateOrderResponseBody setRequestId(String requestId) {
46+
this.requestId = requestId;
47+
return this;
48+
}
49+
public String getRequestId() {
50+
return this.requestId;
51+
}
52+
53+
}

0 commit comments

Comments
 (0)