TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripIntlPolicyNormalDeleteRequest req = new AlitripIntlPolicyNormalDeleteRequest();
AlitripIntlPolicyNormalDeleteRequest.DeletePolicyIntlBatchDTO obj1 = new AlitripIntlPolicyNormalDeleteRequest.DeletePolicyIntlBatchDTO();
obj1.setAgentId(2052L);
AlitripIntlPolicyNormalDeleteRequest.IntlConditionDTO obj2 = new AlitripIntlPolicyNormalDeleteRequest.IntlConditionDTO();
AlitripIntlPolicyNormalDeleteRequest.IntlPolicyWhereDTO obj3 = new AlitripIntlPolicyNormalDeleteRequest.IntlPolicyWhereDTO();
obj3.setSaleModeCode(1L);
obj3.setPolicySource(1L);
obj3.setCabin("M1");
AlitripIntlPolicyNormalDeleteRequest.DatePair obj4 = new AlitripIntlPolicyNormalDeleteRequest.DatePair();
obj4.setStart(StringUtils.parseDateTime("2022-09-08 10:10:10"));
obj4.setEnd(StringUtils.parseDateTime("2022-09-08 10:10:10"));
obj3.setSaleDate(obj4);
obj3.setPolicyCode("123");
obj3.setOperatorName("张三");
AlitripIntlPolicyNormalDeleteRequest.DatePair obj5 = new AlitripIntlPolicyNormalDeleteRequest.DatePair();
obj5.setStart(StringUtils.parseDateTime("2022-09-08 10:10:10"));
obj3.setAllowTravelDate(obj5);
obj3.setTripType(1L);
obj3.setId(123L);
obj3.setAirline("CA");
obj3.setStatus(0L);
obj3.setDepart("PEK");
obj3.setArrive("PVG");
obj3.setDefaultType(0L);
obj2.setPolicyWhere(obj3);
obj1.setCondition(obj2);
obj1.setPolicyType(1L);
req.setDeletePolicyIntlBatchDto(obj1);
AlitripIntlPolicyNormalDeleteResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripIntlPolicyNormalDeleteRequest req = new AlitripIntlPolicyNormalDeleteRequest();
AlitripIntlPolicyNormalDeleteRequest.DeletePolicyIntlBatchDTODomain obj1 = new AlitripIntlPolicyNormalDeleteRequest.DeletePolicyIntlBatchDTODomain();
obj1.AgentId = 2052L;
AlitripIntlPolicyNormalDeleteRequest.IntlConditionDTODomain obj2 = new AlitripIntlPolicyNormalDeleteRequest.IntlConditionDTODomain();
AlitripIntlPolicyNormalDeleteRequest.IntlPolicyWhereDTODomain obj3 = new AlitripIntlPolicyNormalDeleteRequest.IntlPolicyWhereDTODomain();
obj3.SaleModeCode = 1L;
obj3.PolicySource = 1L;
obj3.Cabin = "M1";
AlitripIntlPolicyNormalDeleteRequest.DatePairDomain obj4 = new AlitripIntlPolicyNormalDeleteRequest.DatePairDomain();
obj4.Start = DateTime.Parse(2022-09-08 10:10:10");
obj4.End = DateTime.Parse(2022-09-08 10:10:10");
obj3.SaleDate= obj4;
obj3.PolicyCode = "123";
obj3.OperatorName = "张三";
AlitripIntlPolicyNormalDeleteRequest.DatePairDomain obj5 = new AlitripIntlPolicyNormalDeleteRequest.DatePairDomain();
obj5.Start = DateTime.Parse(2022-09-08 10:10:10");
obj3.AllowTravelDate= obj5;
obj3.TripType = 1L;
obj3.Id = 123L;
obj3.Airline = "CA";
obj3.Status = 0L;
obj3.Depart = "PEK";
obj3.Arrive = "PVG";
obj3.DefaultType = 0L;
obj2.PolicyWhere= obj3;
obj1.Condition= obj2;
obj1.PolicyType = 1L;
req.DeletePolicyIntlBatchDto_ = obj1;
AlitripIntlPolicyNormalDeleteResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripIntlPolicyNormalDeleteRequest;
$delete_policy_intl_batch_dto = new DeletePolicyIntlBatchDTO;
$delete_policy_intl_batch_dto->agent_id="2052";
$condition = new IntlConditionDTO;
$policy_where = new IntlPolicyWhereDTO;
$policy_where->sale_mode_code="1";
$policy_where->policy_source="1";
$policy_where->cabin="M1";
$sale_date = new DatePair;
$sale_date->start="2022-09-08 10:10:10";
$sale_date->end="2022-09-08 10:10:10";
$policy_where->sale_date = $sale_date;
$policy_where->policy_code="123";
$policy_where->operator_name="张三";
$allow_travel_date = new DatePair;
$allow_travel_date->start="2022-09-08 10:10:10";
$policy_where->allow_travel_date = $allow_travel_date;
$policy_where->trip_type="1";
$policy_where->id="123";
$policy_where->airline="CA";
$policy_where->status="0";
$policy_where->depart="PEK";
$policy_where->arrive="PVG";
$policy_where->default_type="0";
$condition->policy_where = $policy_where;
$delete_policy_intl_batch_dto->condition = $condition;
$delete_policy_intl_batch_dto->policy_type="1";
$req->setDeletePolicyIntlBatchDto(json_encode($delete_policy_intl_batch_dto));
$resp = $c->execute($req, $sessionKey);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alitrip.intl.policy.normal.delete' \
-d 'partner_id=apidoc' \
-d 'session=f190e349-b546-4f03-965a-2116bc881393' \
-d 'sign=3823EF935C42A8F03E7E98724C9FF347' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+17%3A22%3A27' \
-d 'v=2.0' \
-d 'delete_policy_intl_batch_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripIntlPolicyNormalDeleteRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.delete_policy_intl_batch_dto="数据结构示例JSON格式"
try:
resp= req.getResponse(sessionkey)
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alitrip.intl.policy.normal.delete");
add_param(pRequest,"delete_policy_intl_batch_dto","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alitrip.intl.policy.normal.delete', {
'delete_policy_intl_batch_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})