ship

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ship 包含船票API相关结构体

https://open.taobao.com/API.htm?docType=2&docId=48055

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlitripshipordernotifyAPIRequest added in v1.3.1

type AlitripshipordernotifyAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

AlitripshipordernotifyAPIRequest 订单信息回填(出票回调) API请求 alitrip.ship.order.notify

此接口为接入商调用飞猪旅行接口回填票号、密码(验证码)等订单信息。接口根据alitripOrderId幂等。若第一次调用失败,后续调用仍然可以回填票号、密码(验证码)成功。第一次调用成功后,后续调用会直接返回第一次的调用结果,不会再产生更新操作。多张票同时出票回填时,保证原子性,只允许全部成功或者全部失败,不能存在部分成功或者失败

func NewAlitripshipordernotifyRequest added in v1.3.1

func NewAlitripshipordernotifyRequest() *AlitripshipordernotifyAPIRequest

NewAlitripshipordernotifyRequest 初始化AlitripshipordernotifyAPIRequest对象

func (AlitripshipordernotifyAPIRequest) GetApiMethodName added in v1.3.1

func (r AlitripshipordernotifyAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlitripshipordernotifyAPIRequest) GetApiParams added in v1.3.1

func (r AlitripshipordernotifyAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (AlitripshipordernotifyAPIRequest) GetConfirmBookRQ added in v1.3.1

GetConfirmBookRQ ConfirmBookRQ Getter

func (AlitripshipordernotifyAPIRequest) GetRawParams added in v1.3.1

GetRawParams IRequest interface 方法, 获取API原始参数

func (*AlitripshipordernotifyAPIRequest) SetConfirmBookRQ added in v1.3.1

func (r *AlitripshipordernotifyAPIRequest) SetConfirmBookRQ(_confirmBookRQ *ShipAgentConfirmBookRq) error

SetConfirmBookRQ is ConfirmBookRQ Setter 出票入参

type AlitripshipordernotifyAPIResponse added in v1.3.1

type AlitripshipordernotifyAPIResponse struct {
	model.CommonResponse
	AlitripshipordernotifyAPIResponseModel
}

AlitripshipordernotifyAPIResponse 订单信息回填(出票回调) API返回值 alitrip.ship.order.notify

此接口为接入商调用飞猪旅行接口回填票号、密码(验证码)等订单信息。接口根据alitripOrderId幂等。若第一次调用失败,后续调用仍然可以回填票号、密码(验证码)成功。第一次调用成功后,后续调用会直接返回第一次的调用结果,不会再产生更新操作。多张票同时出票回填时,保证原子性,只允许全部成功或者全部失败,不能存在部分成功或者失败

type AlitripshipordernotifyAPIResponseModel added in v1.3.1

type AlitripshipordernotifyAPIResponseModel struct {
	XMLName xml.Name `xml:"alitrip_ship_order_notify_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 错误码
	RetCode string `json:"ret_code,omitempty" xml:"ret_code,omitempty"`
	// 错误描述
	RetMsg string `json:"ret_msg,omitempty" xml:"ret_msg,omitempty"`
	// 是否成功
	RetSuccess bool `json:"ret_success,omitempty" xml:"ret_success,omitempty"`
}

AlitripshipordernotifyAPIResponseModel is 订单信息回填(出票回调) 成功返回结果

type AlitripshipproductsyncbaseAPIRequest added in v1.3.1

type AlitripshipproductsyncbaseAPIRequest struct {
	model.Params
}

AlitripshipproductsyncbaseAPIRequest 基础信息修改回调 API请求 alitrip.ship.product.syncbase

基础信息修改回调

func NewAlitripshipproductsyncbaseRequest added in v1.3.1

func NewAlitripshipproductsyncbaseRequest() *AlitripshipproductsyncbaseAPIRequest

NewAlitripshipproductsyncbaseRequest 初始化AlitripshipproductsyncbaseAPIRequest对象

func (AlitripshipproductsyncbaseAPIRequest) GetApiMethodName added in v1.3.1

func (r AlitripshipproductsyncbaseAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlitripshipproductsyncbaseAPIRequest) GetApiParams added in v1.3.1

func (r AlitripshipproductsyncbaseAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (AlitripshipproductsyncbaseAPIRequest) GetRawParams added in v1.3.1

GetRawParams IRequest interface 方法, 获取API原始参数

type AlitripshipproductsyncbaseAPIResponse added in v1.3.1

type AlitripshipproductsyncbaseAPIResponse struct {
	model.CommonResponse
	AlitripshipproductsyncbaseAPIResponseModel
}

AlitripshipproductsyncbaseAPIResponse 基础信息修改回调 API返回值 alitrip.ship.product.syncbase

基础信息修改回调

type AlitripshipproductsyncbaseAPIResponseModel added in v1.3.1

type AlitripshipproductsyncbaseAPIResponseModel struct {
	XMLName xml.Name `xml:"alitrip_ship_product_syncbase_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 错误码
	ResultCode string `json:"result_code,omitempty" xml:"result_code,omitempty"`
	// 错误描述
	ResultMsg string `json:"result_msg,omitempty" xml:"result_msg,omitempty"`
	// 成功
	IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}

AlitripshipproductsyncbaseAPIResponseModel is 基础信息修改回调 成功返回结果

type AlitripshipproductsynccallAPIRequest added in v1.3.1

type AlitripshipproductsynccallAPIRequest struct {
	model.Params
}

AlitripshipproductsynccallAPIRequest 全量同步回调 API请求 alitrip.ship.product.synccall

全量同步接口

func NewAlitripshipproductsynccallRequest added in v1.3.1

func NewAlitripshipproductsynccallRequest() *AlitripshipproductsynccallAPIRequest

NewAlitripshipproductsynccallRequest 初始化AlitripshipproductsynccallAPIRequest对象

func (AlitripshipproductsynccallAPIRequest) GetApiMethodName added in v1.3.1

func (r AlitripshipproductsynccallAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlitripshipproductsynccallAPIRequest) GetApiParams added in v1.3.1

func (r AlitripshipproductsynccallAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (AlitripshipproductsynccallAPIRequest) GetRawParams added in v1.3.1

GetRawParams IRequest interface 方法, 获取API原始参数

type AlitripshipproductsynccallAPIResponse added in v1.3.1

type AlitripshipproductsynccallAPIResponse struct {
	model.CommonResponse
	AlitripshipproductsynccallAPIResponseModel
}

AlitripshipproductsynccallAPIResponse 全量同步回调 API返回值 alitrip.ship.product.synccall

全量同步接口

type AlitripshipproductsynccallAPIResponseModel added in v1.3.1

type AlitripshipproductsynccallAPIResponseModel struct {
	XMLName xml.Name `xml:"alitrip_ship_product_synccall_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 错误码
	ResultCode string `json:"result_code,omitempty" xml:"result_code,omitempty"`
	// 错误描述
	ResultMsg string `json:"result_msg,omitempty" xml:"result_msg,omitempty"`
	// 成功
	IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}

AlitripshipproductsynccallAPIResponseModel is 全量同步回调 成功返回结果

type AlitripshipproductsyncnunberAPIRequest added in v1.3.1

type AlitripshipproductsyncnunberAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

AlitripshipproductsyncnunberAPIRequest 船票班次变更回调 API请求 alitrip.ship.product.syncnunber

船票班次变更回调

func NewAlitripshipproductsyncnunberRequest added in v1.3.1

func NewAlitripshipproductsyncnunberRequest() *AlitripshipproductsyncnunberAPIRequest

NewAlitripshipproductsyncnunberRequest 初始化AlitripshipproductsyncnunberAPIRequest对象

func (AlitripshipproductsyncnunberAPIRequest) GetApiMethodName added in v1.3.1

func (r AlitripshipproductsyncnunberAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlitripshipproductsyncnunberAPIRequest) GetApiParams added in v1.3.1

func (r AlitripshipproductsyncnunberAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (AlitripshipproductsyncnunberAPIRequest) GetCityCode added in v1.3.1

GetCityCode CityCode Getter

func (AlitripshipproductsyncnunberAPIRequest) GetCityName added in v1.3.1

GetCityName CityName Getter

func (AlitripshipproductsyncnunberAPIRequest) GetFromStationCode added in v1.3.1

func (r AlitripshipproductsyncnunberAPIRequest) GetFromStationCode() string

GetFromStationCode FromStationCode Getter

func (AlitripshipproductsyncnunberAPIRequest) GetFromStationName added in v1.3.1

func (r AlitripshipproductsyncnunberAPIRequest) GetFromStationName() string

GetFromStationName FromStationName Getter

func (AlitripshipproductsyncnunberAPIRequest) GetRawParams added in v1.3.1

GetRawParams IRequest interface 方法, 获取API原始参数

func (*AlitripshipproductsyncnunberAPIRequest) SetCityCode added in v1.3.1

func (r *AlitripshipproductsyncnunberAPIRequest) SetCityCode(_cityCode string) error

SetCityCode is CityCode Setter 出发城市code

func (*AlitripshipproductsyncnunberAPIRequest) SetCityName added in v1.3.1

func (r *AlitripshipproductsyncnunberAPIRequest) SetCityName(_cityName string) error

SetCityName is CityName Setter 出发城市

func (*AlitripshipproductsyncnunberAPIRequest) SetFromStationCode added in v1.3.1

func (r *AlitripshipproductsyncnunberAPIRequest) SetFromStationCode(_fromStationCode string) error

SetFromStationCode is FromStationCode Setter 出发港口编号

func (*AlitripshipproductsyncnunberAPIRequest) SetFromStationName added in v1.3.1

func (r *AlitripshipproductsyncnunberAPIRequest) SetFromStationName(_fromStationName string) error

SetFromStationName is FromStationName Setter 出发港口

type AlitripshipproductsyncnunberAPIResponse added in v1.3.1

type AlitripshipproductsyncnunberAPIResponse struct {
	model.CommonResponse
	AlitripshipproductsyncnunberAPIResponseModel
}

AlitripshipproductsyncnunberAPIResponse 船票班次变更回调 API返回值 alitrip.ship.product.syncnunber

船票班次变更回调

type AlitripshipproductsyncnunberAPIResponseModel added in v1.3.1

type AlitripshipproductsyncnunberAPIResponseModel struct {
	XMLName xml.Name `xml:"alitrip_ship_product_syncnunber_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 错误码
	ResultCode string `json:"result_code,omitempty" xml:"result_code,omitempty"`
	// 错误描述
	ResultMsg string `json:"result_msg,omitempty" xml:"result_msg,omitempty"`
	// 成功状态
	IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}

AlitripshipproductsyncnunberAPIResponseModel is 船票班次变更回调 成功返回结果

type AlitripshipreturnnotifyAPIRequest added in v1.3.1

type AlitripshipreturnnotifyAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

AlitripshipreturnnotifyAPIRequest 船票退票退款回填接口 API请求 alitrip.ship.return.notify

此接口为接入商调用飞猪接口回填退票状态,飞猪平台给用户进行退票退款。飞猪平台保证数据幂等。

func NewAlitripshipreturnnotifyRequest added in v1.3.1

func NewAlitripshipreturnnotifyRequest() *AlitripshipreturnnotifyAPIRequest

NewAlitripshipreturnnotifyRequest 初始化AlitripshipreturnnotifyAPIRequest对象

func (AlitripshipreturnnotifyAPIRequest) GetApiMethodName added in v1.3.1

func (r AlitripshipreturnnotifyAPIRequest) GetApiMethodName() string

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlitripshipreturnnotifyAPIRequest) GetApiParams added in v1.3.1

func (r AlitripshipreturnnotifyAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (AlitripshipreturnnotifyAPIRequest) GetConfirmRefundRQ added in v1.3.1

GetConfirmRefundRQ ConfirmRefundRQ Getter

func (AlitripshipreturnnotifyAPIRequest) GetRawParams added in v1.3.1

GetRawParams IRequest interface 方法, 获取API原始参数

func (*AlitripshipreturnnotifyAPIRequest) SetConfirmRefundRQ added in v1.3.1

func (r *AlitripshipreturnnotifyAPIRequest) SetConfirmRefundRQ(_confirmRefundRQ *ShipAgentConfirmRefundRq) error

SetConfirmRefundRQ is ConfirmRefundRQ Setter 退票请求入参

type AlitripshipreturnnotifyAPIResponse added in v1.3.1

type AlitripshipreturnnotifyAPIResponse struct {
	model.CommonResponse
	AlitripshipreturnnotifyAPIResponseModel
}

AlitripshipreturnnotifyAPIResponse 船票退票退款回填接口 API返回值 alitrip.ship.return.notify

此接口为接入商调用飞猪接口回填退票状态,飞猪平台给用户进行退票退款。飞猪平台保证数据幂等。

type AlitripshipreturnnotifyAPIResponseModel added in v1.3.1

type AlitripshipreturnnotifyAPIResponseModel struct {
	XMLName xml.Name `xml:"alitrip_ship_return_notify_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 错误码
	RetCode string `json:"ret_code,omitempty" xml:"ret_code,omitempty"`
	// 错误描述
	RetMsg string `json:"ret_msg,omitempty" xml:"ret_msg,omitempty"`
	// 结果
	RetSuccess bool `json:"ret_success,omitempty" xml:"ret_success,omitempty"`
}

AlitripshipreturnnotifyAPIResponseModel is 船票退票退款回填接口 成功返回结果

type ShipAgentConfirmBookPassengerInfo

type ShipAgentConfirmBookPassengerInfo struct {
	// 票信息
	TicketList []ShipAgentConfirmBookTicketInfo `json:"ticket_list,omitempty" xml:"ticket_list>ship_agent_confirm_book_ticket_info,omitempty"`
	// 乘客证件号
	PassengerCertNo string `json:"passenger_cert_no,omitempty" xml:"passenger_cert_no,omitempty"`
	// 乘客证件类型
	PassengerCertType string `json:"passenger_cert_type,omitempty" xml:"passenger_cert_type,omitempty"`
	// 乘客id
	PassengerId string `json:"passenger_id,omitempty" xml:"passenger_id,omitempty"`
	// 乘客姓名
	PassengerName string `json:"passenger_name,omitempty" xml:"passenger_name,omitempty"`
}

ShipAgentConfirmBookPassengerInfo 结构体

type ShipAgentConfirmBookRq

type ShipAgentConfirmBookRq struct {
	// 乘客列表
	PassengerList []ShipAgentConfirmBookPassengerInfo `json:"passenger_list,omitempty" xml:"passenger_list>ship_agent_confirm_book_passenger_info,omitempty"`
	// 商家订单id
	AgentOrderId string `json:"agent_order_id,omitempty" xml:"agent_order_id,omitempty"`
	// 飞猪订单id
	AlitripOrderId string `json:"alitrip_order_id,omitempty" xml:"alitrip_order_id,omitempty"`
	// 取票地址信息
	FetchTicketsAddress string `json:"fetch_tickets_address,omitempty" xml:"fetch_tickets_address,omitempty"`
	// 取票号
	FetchTicketsNumber string `json:"fetch_tickets_number,omitempty" xml:"fetch_tickets_number,omitempty"`
	// 取票密码
	FetchTicketsPwd string `json:"fetch_tickets_pwd,omitempty" xml:"fetch_tickets_pwd,omitempty"`
	// 取票短信内容
	Message string `json:"message,omitempty" xml:"message,omitempty"`
	// 扩展属性
	OrderAttr string `json:"order_attr,omitempty" xml:"order_attr,omitempty"`
	// 检票口
	TicketWicket string `json:"ticket_wicket,omitempty" xml:"ticket_wicket,omitempty"`
	// 出票失败错误码
	FailedCode string `json:"failed_code,omitempty" xml:"failed_code,omitempty"`
	// 淘宝订单Id
	MainBizOrderId int64 `json:"main_biz_order_id,omitempty" xml:"main_biz_order_id,omitempty"`
	// 票数
	TicketCount int64 `json:"ticket_count,omitempty" xml:"ticket_count,omitempty"`
	// 总价
	TotalPrice int64 `json:"total_price,omitempty" xml:"total_price,omitempty"`
	// 出票结果
	Success bool `json:"success,omitempty" xml:"success,omitempty"`
}

ShipAgentConfirmBookRq 结构体

type ShipAgentConfirmBookTicketInfo

type ShipAgentConfirmBookTicketInfo struct {
	// 电子票号
	ETicketNo string `json:"e_ticket_no,omitempty" xml:"e_ticket_no,omitempty"`
	// 票描述
	TicketDesc string `json:"ticket_desc,omitempty" xml:"ticket_desc,omitempty"`
	// 票Id
	TicketId string `json:"ticket_id,omitempty" xml:"ticket_id,omitempty"`
	// 票号
	TicketNo string `json:"ticket_no,omitempty" xml:"ticket_no,omitempty"`
	// 取票密码
	TicketPwd string `json:"ticket_pwd,omitempty" xml:"ticket_pwd,omitempty"`
	// 座位号
	TicketSeatNo string `json:"ticket_seat_no,omitempty" xml:"ticket_seat_no,omitempty"`
	// 票状态:1-出票中2-已出票3-无票4-退票中5-已退票6-退票失败
	TicketStatus string `json:"ticket_status,omitempty" xml:"ticket_status,omitempty"`
	// 子票种类型11-去程;12-往返;21普通门票;31酒店
	TicketSubType string `json:"ticket_sub_type,omitempty" xml:"ticket_sub_type,omitempty"`
	// 票标题
	TicketTitle string `json:"ticket_title,omitempty" xml:"ticket_title,omitempty"`
	// 票种类别1-船票;2-门票;3-酒店;4-其他
	TicketType string `json:"ticket_type,omitempty" xml:"ticket_type,omitempty"`
	// 扩展属性数据
	ExtAttr string `json:"ext_attr,omitempty" xml:"ext_attr,omitempty"`
	// 过期时间
	ExpireTime string `json:"expire_time,omitempty" xml:"expire_time,omitempty"`
	// 票价格(分)
	TicketPrice int64 `json:"ticket_price,omitempty" xml:"ticket_price,omitempty"`
}

ShipAgentConfirmBookTicketInfo 结构体

type ShipAgentConfirmRefundRq

type ShipAgentConfirmRefundRq struct {
	// 扩展属性
	AgentExtAttr string `json:"agent_ext_attr,omitempty" xml:"agent_ext_attr,omitempty"`
	// 商家订单id
	AgentOrderId string `json:"agent_order_id,omitempty" xml:"agent_order_id,omitempty"`
	// 退款资金号唯一ID
	AgentRefundTransId string `json:"agent_refund_trans_id,omitempty" xml:"agent_refund_trans_id,omitempty"`
	// offline:线下退票;online:线上退票
	AgentReturnMode string `json:"agent_return_mode,omitempty" xml:"agent_return_mode,omitempty"`
	// 退票时间
	AgentReturnTime string `json:"agent_return_time,omitempty" xml:"agent_return_time,omitempty"`
	// 按票的维度进行退票时,商家票号或者乘客Id必填一个,按单退填写订单号
	AgentTicketId string `json:"agent_ticket_id,omitempty" xml:"agent_ticket_id,omitempty"`
	// 乘客Id
	PassengerId string `json:"passenger_id,omitempty" xml:"passenger_id,omitempty"`
	// 退款金额(分)
	AgentRefundAmount int64 `json:"agent_refund_amount,omitempty" xml:"agent_refund_amount,omitempty"`
	// 退票结果编码,(退票失败时必填,参考标准错误码)
	AgentReturnTicketCode int64 `json:"agent_return_ticket_code,omitempty" xml:"agent_return_ticket_code,omitempty"`
	// 商家退票状态;1-成功,2-失败
	AgentReturnTicketStatus int64 `json:"agent_return_ticket_status,omitempty" xml:"agent_return_ticket_status,omitempty"`
	// 商家退票类型;0-按票退,1-按单退
	AgentReturnTicketType int64 `json:"agent_return_ticket_type,omitempty" xml:"agent_return_ticket_type,omitempty"`
	// 飞猪订单号
	AlitripOrderId int64 `json:"alitrip_order_id,omitempty" xml:"alitrip_order_id,omitempty"`
}

ShipAgentConfirmRefundRq 结构体

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL