TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripIeAgentTicketIssueRequest req = new AlitripIeAgentTicketIssueRequest();
req.setAgentId(123L);
AlitripIeAgentTicketIssueRequest.IeIssueTicketVO obj1 = new AlitripIeAgentTicketIssueRequest.IeIssueTicketVO();
obj1.setBookOrderId(123L);
List<AlitripIeAgentTicketIssueRequest.IePassengerTicketVO> list3 = new ArrayList<AlitripIeAgentTicketIssueRequest.IePassengerTicketVO>();
AlitripIeAgentTicketIssueRequest.IePassengerTicketVO obj4 = new AlitripIeAgentTicketIssueRequest.IePassengerTicketVO();
list3.add(obj4);
obj4.setCertNo("demo");
obj4.setPassengerName("demo");
obj4.setTicketNos(""hello","world"");
obj4.setCpnr("VPN123");
obj4.setBpnr("VPN123");
obj4.setChannel("1E");
obj1.setPassengerTicketVos(list3);
List<AlitripIeAgentTicketIssueRequest.IeBookPnrVo> list6 = new ArrayList<AlitripIeAgentTicketIssueRequest.IeBookPnrVo>();
AlitripIeAgentTicketIssueRequest.IeBookPnrVo obj7 = new AlitripIeAgentTicketIssueRequest.IeBookPnrVo();
list6.add(obj7);
obj7.setId(123L);
obj7.setPnrNo("VPN123");
obj7.setPnrType("demo");
obj1.setUpdatePnrVos(list6);
obj1.setMemo("memo");
req.setIssueTicketVO(obj1);
AlitripIeAgentTicketIssueResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripIeAgentTicketIssueRequest req = new AlitripIeAgentTicketIssueRequest();
req.AgentId = 123L;
AlitripIeAgentTicketIssueRequest.IeIssueTicketVODomain obj1 = new AlitripIeAgentTicketIssueRequest.IeIssueTicketVODomain();
obj1.BookOrderId = 123L;
List<AlitripIeAgentTicketIssueRequest.IePassengerTicketVODomain> list3 = new List<AlitripIeAgentTicketIssueRequest.IePassengerTicketVODomain>();
AlitripIeAgentTicketIssueRequest.IePassengerTicketVODomain obj4 = new AlitripIeAgentTicketIssueRequest.IePassengerTicketVODomain();
list3.Add(obj4);
obj4.CertNo = "demo";
obj4.PassengerName = "demo";
obj4.TicketNos = ""hello","world"";
obj4.Cpnr = "VPN123";
obj4.Bpnr = "VPN123";
obj4.Channel = "1E";
obj1.PassengerTicketVos= list3;
List<AlitripIeAgentTicketIssueRequest.IeBookPnrVoDomain> list6 = new List<AlitripIeAgentTicketIssueRequest.IeBookPnrVoDomain>();
AlitripIeAgentTicketIssueRequest.IeBookPnrVoDomain obj7 = new AlitripIeAgentTicketIssueRequest.IeBookPnrVoDomain();
list6.Add(obj7);
obj7.Id = 123L;
obj7.PnrNo = "VPN123";
obj7.PnrType = "demo";
obj1.UpdatePnrVos= list6;
obj1.Memo = "memo";
req.IssueTicketVO_ = obj1;
AlitripIeAgentTicketIssueResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripIeAgentTicketIssueRequest;
$req->setAgentId("123");
$issue_ticket_v_o = new IeIssueTicketVO;
$issue_ticket_v_o->book_order_id="123";
$passenger_ticket_vos = new IePassengerTicketVO;
$passenger_ticket_vos->cert_no="demo";
$passenger_ticket_vos->passenger_name="demo";
$passenger_ticket_vos->ticket_nos="[\"hello\",\"world\"]";
$passenger_ticket_vos->cpnr="VPN123";
$passenger_ticket_vos->bpnr="VPN123";
$passenger_ticket_vos->channel="1E";
$issue_ticket_v_o->passenger_ticket_vos = $passenger_ticket_vos;
$update_pnr_vos = new IeBookPnrVo;
$update_pnr_vos->id="123";
$update_pnr_vos->pnr_no="VPN123";
$update_pnr_vos->pnr_type="demo";
$issue_ticket_v_o->update_pnr_vos = $update_pnr_vos;
$issue_ticket_v_o->memo="memo";
$req->setIssueTicketVO(json_encode($issue_ticket_v_o));
$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.alitrip.ie.agent.ticket.issue' \
-d 'partner_id=apidoc' \
-d 'session=abe696fc-265c-4f6d-95a3-364d40644be1' \
-d 'sign=E6A9823A4FB84D3262FD08EC12B6682F' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+21%3A42%3A30' \
-d 'v=2.0' \
-d 'agent_id=123' \
-d 'issue_ticket_v_o=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripIeAgentTicketIssueRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.agent_id=123
req.issue_ticket_v_o=""
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.alitrip.ie.agent.ticket.issue");
add_param(pRequest,"agent_id","123");
add_param(pRequest,"issue_ticket_v_o","数据结构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.alitrip.ie.agent.ticket.issue', {
'agent_id':'123',
'issue_ticket_v_o':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})