TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TrainAgentChangeissueConfirmVtwoRequest req = new TrainAgentChangeissueConfirmVtwoRequest();
TrainAgentChangeissueConfirmVtwoRequest.ChangeIssueRQ obj1 = new TrainAgentChangeissueConfirmVtwoRequest.ChangeIssueRQ();
obj1.setIssueFailCode(8L);
obj1.setAgentId(222333444L);
obj1.setChangeFromStation("北京");
obj1.setChangeApplyId(53333111L);
obj1.setChangeSettlementMode(1L);
obj1.setTpOrderId(43333222111L);
obj1.setAlipayTradeNo("1111111111111111");
obj1.setTtpOrderId(43333222111L);
obj1.setAlipayAccount("123@alipay.com");
obj1.setChangeToStation("北京北");
obj1.setIssueStatus(1L);
obj1.setSequenceNo("E1W123456");
obj1.setChangeFromDateTime("2023-01-01 12:00:00");
obj1.setChangeToDateTime("2023-01-01 12:00:00");
obj1.setChangeTrainDate("2023-01-01");
obj1.setChangeTrainCode("G1");
List<TrainAgentChangeissueConfirmVtwoRequest.ChangeTicketDTO> list3 = new ArrayList<TrainAgentChangeissueConfirmVtwoRequest.ChangeTicketDTO>();
TrainAgentChangeissueConfirmVtwoRequest.ChangeTicketDTO obj4 = new TrainAgentChangeissueConfirmVtwoRequest.ChangeTicketDTO();
list3.add(obj4);
obj4.setChangeSeatTypeName("二等座");
obj4.setChangeApplyId(53232323234L);
obj4.setHandingFee(100L);
obj4.setChangeSeatTypeCode("o");
obj4.setChangeSeatNo("001");
obj4.setSubOrderId(5342332323L);
obj4.setChangeCoachNo("01");
obj4.setTicketTypeCode("1");
obj4.setChangeCoachName("01");
obj4.setTicketTypeName("成人票");
obj4.setChangeTicketPrice("1000");
obj4.setChangeCost(200L);
obj4.setChangeRate(5L);
obj1.setChangeTickets(list3);
obj1.setIssueFailMsg("余票不足");
req.setChangeIssueRq(obj1);
TrainAgentChangeissueConfirmVtwoResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TrainAgentChangeissueConfirmVtwoRequest req = new TrainAgentChangeissueConfirmVtwoRequest();
TrainAgentChangeissueConfirmVtwoRequest.ChangeIssueRQDomain obj1 = new TrainAgentChangeissueConfirmVtwoRequest.ChangeIssueRQDomain();
obj1.IssueFailCode = 8L;
obj1.AgentId = 222333444L;
obj1.ChangeFromStation = "北京";
obj1.ChangeApplyId = 53333111L;
obj1.ChangeSettlementMode = 1L;
obj1.TpOrderId = 43333222111L;
obj1.AlipayTradeNo = "1111111111111111";
obj1.TtpOrderId = 43333222111L;
obj1.AlipayAccount = "123@alipay.com";
obj1.ChangeToStation = "北京北";
obj1.IssueStatus = 1L;
obj1.SequenceNo = "E1W123456";
obj1.ChangeFromDateTime = "2023-01-01 12:00:00";
obj1.ChangeToDateTime = "2023-01-01 12:00:00";
obj1.ChangeTrainDate = "2023-01-01";
obj1.ChangeTrainCode = "G1";
List<TrainAgentChangeissueConfirmVtwoRequest.ChangeTicketDTODomain> list3 = new List<TrainAgentChangeissueConfirmVtwoRequest.ChangeTicketDTODomain>();
TrainAgentChangeissueConfirmVtwoRequest.ChangeTicketDTODomain obj4 = new TrainAgentChangeissueConfirmVtwoRequest.ChangeTicketDTODomain();
list3.Add(obj4);
obj4.ChangeSeatTypeName = "二等座";
obj4.ChangeApplyId = 53232323234L;
obj4.HandingFee = 100L;
obj4.ChangeSeatTypeCode = "o";
obj4.ChangeSeatNo = "001";
obj4.SubOrderId = 5342332323L;
obj4.ChangeCoachNo = "01";
obj4.TicketTypeCode = "1";
obj4.ChangeCoachName = "01";
obj4.TicketTypeName = "成人票";
obj4.ChangeTicketPrice = "1000";
obj4.ChangeCost = 200L;
obj4.ChangeRate = 5L;
obj1.ChangeTickets= list3;
obj1.IssueFailMsg = "余票不足";
req.ChangeIssueRq_ = obj1;
TrainAgentChangeissueConfirmVtwoResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TrainAgentChangeissueConfirmVtwoRequest;
$change_issue_rq = new ChangeIssueRQ;
$change_issue_rq->issue_fail_code="8";
$change_issue_rq->agent_id="222333444";
$change_issue_rq->change_from_station="北京";
$change_issue_rq->change_apply_id="53333111";
$change_issue_rq->change_settlement_mode="1";
$change_issue_rq->tp_order_id="43333222111";
$change_issue_rq->alipay_trade_no="1111111111111111";
$change_issue_rq->ttp_order_id="43333222111";
$change_issue_rq->alipay_account="123@alipay.com";
$change_issue_rq->change_to_station="北京北";
$change_issue_rq->issue_status="1";
$change_issue_rq->sequence_no="E1W123456";
$change_issue_rq->change_from_date_time="2023-01-01 12:00:00";
$change_issue_rq->change_to_date_time="2023-01-01 12:00:00";
$change_issue_rq->change_train_date="2023-01-01";
$change_issue_rq->change_train_code="G1";
$change_tickets = new ChangeTicketDTO;
$change_tickets->change_seat_type_name="二等座";
$change_tickets->change_apply_id="53232323234";
$change_tickets->handing_fee="100";
$change_tickets->change_seat_type_code="o";
$change_tickets->change_seat_no="001";
$change_tickets->sub_order_id="5342332323";
$change_tickets->change_coach_no="01";
$change_tickets->ticket_type_code="1";
$change_tickets->change_coach_name="01";
$change_tickets->ticket_type_name="成人票";
$change_tickets->change_ticket_price="1000";
$change_tickets->change_cost="200";
$change_tickets->change_rate="5";
$change_issue_rq->change_tickets = $change_tickets;
$change_issue_rq->issue_fail_msg="余票不足";
$req->setChangeIssueRq(json_encode($change_issue_rq));
$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=taobao.train.agent.changeissue.confirm.vtwo' \
-d 'partner_id=apidoc' \
-d 'session=dddaf28c-eb20-4650-9be0-973c11c79e16' \
-d 'sign=80CF644C0C38173DBCA9E3926BA454D3' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-29+08%3A13%3A11' \
-d 'v=2.0' \
-d 'change_issue_rq=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TrainAgentChangeissueConfirmVtwoRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.change_issue_rq="数据结构示例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,"taobao.train.agent.changeissue.confirm.vtwo");
add_param(pRequest,"change_issue_rq","数据结构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('taobao.train.agent.changeissue.confirm.vtwo', {
'change_issue_rq':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})