Documentation
¶
Index ¶
- type Activate
- type ActivateParams
- type CancelledOrder
- type DetailOrder
- type DomesticOrder
- func CreateDomesticOrder(params *DomesticOrderParams) (DomesticOrder, error)
- func CreateDomesticOrderWithContext(ctx context.Context, params *DomesticOrderParams) (DomesticOrder, error)
- func GetTrackingID(orderID string) (DomesticOrder, error)
- func GetTrackingIDWithContext(ctx context.Context, orderID string) (DomesticOrder, error)
- type DomesticOrderParams
- type InternationalOrder
- type InternationalOrderParams
- type ItemName
- type UpdateOrderParams
- type UpdatedOrder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activate ¶
type Activate struct { Status string `json:"status"` Data struct { Message string `json:"message"` StatusCode int `json:"statusCode"` } `json:"data"` }
Activate struct contains response from API ActivateOrder.
func ActivateOrder ¶
func ActivateOrder(orderID string, params *ActivateParams) (Activate, error)
ActivateOrder activates (initiate Shipper's pickup process) or Deactivate an Order.
func ActivateOrderWithContext ¶
func ActivateOrderWithContext(ctx context.Context, orderID string, params *ActivateParams) (Activate, error)
ActivateOrderWithContext activates (initiate Shipper's pickup process) or Deactivate an Order with context.
type ActivateParams ¶
type ActivateParams struct { Active int `json:"active" validate:"required"` AgentID int `json:"agentId"` }
ActivateParams struct contains request parameter for API ActivateOrder.
type CancelledOrder ¶
type CancelledOrder struct { Status string `json:"status"` Data struct { Title string `json:"title"` Message string `json:"message"` StatusCode int `json:"statusCode"` } `json:"data"` }
CancelledOrder struct contains response from API CancelOrder.
func CancelOrder ¶
func CancelOrder(orderID string) (CancelledOrder, error)
CancelOrder cancels specific created order.
func CancelOrderWithContext ¶
func CancelOrderWithContext(ctx context.Context, orderID string) (CancelledOrder, error)
CancelOrderWithContext cancels specific created order with context.
type DetailOrder ¶
type DetailOrder struct { Status string `json:"status"` Data struct { Title string `json:"title"` Content string `json:"content"` Order struct { Tracking []tracking `json:"tracking"` Detail struct { ID string `json:"_id"` TrackingID string `json:"id"` GroupID int `json:"groupID"` SpecialID string `json:"specialID"` ExternalID string `json:"externalID"` LabelChecksum string `json:"labelChecksum"` Consigner struct { ID string `json:"id"` Name string `json:"name"` PhoneNumber string `json:"phoneNumber"` } Consignee struct { ID string `json:"id"` Name string `json:"name"` PhoneNumber string `json:"phoneNumber"` } BatchID int `json:"batchID"` AWBNumber string `json:"awbNumber"` StickerNumber string `json:"stickerNumber"` ShipmentStatus shipmentStatus `json:"shipmentStatus"` InternalStatus shipmentStatus `json:"internalStatus"` ExternalStatus shipmentStatus `json:"externalStatus"` Origin origin `json:"origin"` Destination origin `json:"destination"` Package struct { ItemType string `json:"itemType"` Contents string `json:"contents"` Price item `json:"price"` ItemName int `json:"itemName"` Dimension struct { Length item `json:"length"` Width item `json:"width"` Height item `json:"height"` } `json:"dimension"` Weight item `json:"weight"` CubicalWeight item `json:"cubicalWeight"` Fragile int `json:"fragile"` Type int `json:"type"` IsConfirmed int `json:"isConfirmed"` PictureURL string `json:"pictureURL"` Details []struct { ItemID int `json:"itemID"` ItemName string `json:"itemName"` ItemPrice int `json:"itemPrice"` ItemQTY int `json:"itemQTY"` } `json:"details"` } `json:"package"` Driver struct { ID int `json:"id"` Name string `json:"name"` PhoneNumber string `json:"phoneNumber"` VehicleType string `json:"vehicleType"` VehicleNumber string `json:"vehicleNumber"` IsPaymentCollected int `json:"isPaymentCollected"` Feedback struct { Score int `json:"score"` Comment string `json:"comment"` } `json:"feedback"` AgentID int `json:"agentID"` AgentName string `json:"agentName"` AgentCityID int `json:"agentCityID"` } `json:"driver"` Courier struct { ID int `json:"id"` Name string `json:"name"` RateID int `json:"rate_id"` RateName string `json:"rate_name"` ShipmentType int `json:"shipmentType"` ActualID int `json:"actualID"` MinDay int `json:"min_day"` MaxDay int `json:"max_day"` Rate item `json:"rate"` ActualRate struct { ID int `json:"id"` // contains filtered or unexported fields } `json:"actualRate"` } `json:"courier"` Rates struct { Shipment item `json:"shipment"` PaidShipment item `json:"paidShipment"` ActualShipment item `json:"actualShipment"` Insurance item `json:"insurance"` PaidInsurance item `json:"paidInsurance"` ActualInsurance item `json:"actualInsurance"` EscrowCost item `json:"escrowCost"` FulfillmentCost item `json:"fulfillmentCost"` ItemPrice item `json:"itemPrice"` Discount item `json:"discount"` } `json:"rates"` UseInsurance int `json:"useInsurance"` IsLabelPrinted int `json:"isLabelPrinted"` PaymentType string `json:"paymentType"` Source string `json:"source"` IsActive int `json:"isActive"` IsAutoTrack int `json:"isAutoTrack"` IsCustomAWB int `json:"isCustomAWB"` ReadyTime string `json:"readyTime"` PickUpTime string `json:"pickUpTime"` CreationDate string `json:"creationDate"` ActiveDate string `json:"activeDate"` LastUpdatedDate string `json:"lastUpdatedDate"` CreatedBy int `json:"createdBy"` ShipmentArea string `json:"shipmentArea"` COD struct { Order int `json:"order"` FreeDelivery int `json:"freeDelivery"` } `json:"cod"` Voucher string `json:"voucher"` Whitelabel string `json:"whitelabel"` JOBNumber string `json:"JOBNumber"` Domain string `json:"domain"` IsAutomateOrder int `json:"isAutomateOrder"` Channel string `json:"channel"` IsHubless int `json:"isHubless"` ZonaID int `json:"zonaID"` IsJobMarketplace int `json:"isJobMarketplace"` RequestID string `json:"requestID"` PartitionKey int `json:"partitionKey"` HandlerIDs []int `json:"handler_ids"` } `json:"detail"` } `json:"order"` StatusCode int `json:"statusCode"` } `json:"data"` }
DetailOrder struct contains response from API GetOrderDetail.
func GetOrderDetail ¶
func GetOrderDetail(orderID string) (DetailOrder, error)
GetOrderDetail gets created order's detail.
func GetOrderDetailWithContext ¶
func GetOrderDetailWithContext(ctx context.Context, orderID string) (DetailOrder, error)
GetOrderDetailWithContext gets created order's detail with context.
type DomesticOrder ¶
type DomesticOrder struct { Status string `json:"status"` Data struct { Title string `json:"title"` Content string `json:"content"` StatusCode int `json:"statusCode"` ID string `json:"id"` } `json:"data"` }
DomesticOrder struct contains response from API CreateDomesticOrder.
func CreateDomesticOrder ¶
func CreateDomesticOrder(params *DomesticOrderParams) (DomesticOrder, error)
CreateDomesticOrder creates Shipper domestic order.
func CreateDomesticOrderWithContext ¶
func CreateDomesticOrderWithContext(ctx context.Context, params *DomesticOrderParams) (DomesticOrder, error)
CreateDomesticOrderWithContext creates Shipper domestic order with context.
func GetTrackingID ¶
func GetTrackingID(orderID string) (DomesticOrder, error)
GetTrackingID gets the Tracking ID based on submitted order ID.
func GetTrackingIDWithContext ¶
func GetTrackingIDWithContext(ctx context.Context, orderID string) (DomesticOrder, error)
GetTrackingIDWithContext gets the Tracking ID based on submitted order ID with context.
type DomesticOrderParams ¶
type DomesticOrderParams struct { Origin int `json:"o" validate:"required"` Destination int `json:"d" validate:"required"` Length float64 `json:"l" validate:"required"` Width float64 `json:"w" validate:"required"` Height float64 `json:"h" validate:"required"` WeightTotal float64 `json:"wt" validate:"required"` Value float64 `json:"v" validate:"required"` RateID int `json:"rateID" validate:"required"` ConsigneeName string `json:"consigneeName" validate:"required"` ConsigneePhoneNumber string `json:"consigneePhoneNumber" validate:"required"` ConsignerName string `json:"consignerName"` ConsignerPhoneNumber string `json:"consignerPhoneNumber"` OriginAddress string `json:"originAddress" validate:"required"` OriginDirection string `json:"originDirection" validate:"required"` DestinationAddress string `json:"destinationAddress" validate:"required"` DestinationDirection string `json:"destinationDirection" validate:"required"` ItemName []ItemName `json:"itemName" validate:"required"` Contents string `json:"contents" validate:"required"` UseInsurance int `json:"useInsurance"` ExternalID string `json:"externalID"` PaymentType string `json:"paymentType"` PackageType int `json:"packageType" validate:"required"` COD int `json:"cod"` OriginCoordinate *string `json:"originCoord"` DestinationCoordinate *string `json:"destinationCoord"` }
DomesticOrderParams struct contains request parameter for API CreateDomesticOrder.
type InternationalOrder ¶
type InternationalOrder struct { Status string `json:"status"` Data struct { Title string `json:"title"` Content string `json:"content"` StatusCode int `json:"statusCode"` ID string `json:"id"` } `json:"data"` }
InternationalOrder struct contains response from API CreateInternationalOrder.
func CreateInternationalOrder ¶
func CreateInternationalOrder(params *InternationalOrderParams) (InternationalOrder, error)
CreateInternationalOrder creates Shipper international order.
func CreateInternationalOrderWithContext ¶
func CreateInternationalOrderWithContext(ctx context.Context, params *InternationalOrderParams) (InternationalOrder, error)
CreateInternationalOrderWithContext creates Shipper international order with context.
type InternationalOrderParams ¶
type InternationalOrderParams struct { Origin int `json:"o" validate:"required"` Destination int `json:"d" validate:"required"` Length float64 `json:"l" validate:"required"` Width float64 `json:"w" validate:"required"` Height float64 `json:"h" validate:"required"` WeightTotal float64 `json:"wt" validate:"required"` Value float64 `json:"v" validate:"required"` RateID int `json:"rateID" validate:"required"` ConsigneeName string `json:"consigneeName" validate:"required"` ConsigneePhoneNumber string `json:"consigneePhoneNumber" validate:"required"` ConsignerName string `json:"consignerName"` ConsignerPhoneNumber string `json:"consignerPhoneNumber"` OriginAddress string `json:"originAddress" validate:"required"` OriginDirection string `json:"originDirection" validate:"required"` DestinationAddress string `json:"destinationAddress" validate:"required"` DestinationDirection string `json:"destinationDirection" validate:"required"` DestinationArea string `json:"destinationArea"` DestinationSuburb string `json:"destinationSuburb"` DestinationCity string `json:"destinationCity"` DestinationProvince string `json:"destinationProvince"` DestinationPostCode string `json:"destinationPostcode"` ItemName []ItemName `json:"itemName" validate:"required"` Contents string `json:"contents" validate:"required"` UseInsurance int `json:"useInsurance"` ExternalID string `json:"externalID"` PaymentType string `json:"paymentType"` PackageType int `json:"packageType" validate:"required"` }
InternationalOrderParams struct contains request parameter for API CreateInternationalOrder.
type UpdateOrderParams ¶
type UpdateOrderParams struct { Length float64 `json:"l" validate:"required"` Width float64 `json:"w" validate:"required"` Height float64 `json:"h" validate:"required"` WeightTotal float64 `json:"wt" validate:"required"` }
UpdateOrderParams struct contains request parameter for API UpdateOrder.
type UpdatedOrder ¶
type UpdatedOrder struct { Status string `json:"status"` Data struct { Title string `json:"title"` Content string `json:"content"` CorrectedFields struct { Weight float64 `json:"weight"` VolumeWeight float64 `json:"volumeWeight"` Length float64 `json:"length"` Height float64 `json:"height"` Width float64 `json:"width"` CompulsoryInsurance int `json:"compulsoryInsurance"` Insurance int `json:"insurance"` FinalRate int `json:"finalRate"` } `json:"correctedFields"` StatusCode int `json:"statusCode"` } `json:"data"` }
UpdatedOrder struct contains response from API UpdateOrder.
func UpdateOrder ¶
func UpdateOrder(orderID string, params *UpdateOrderParams) (UpdatedOrder, error)
UpdateOrder updates specific created order.
func UpdateOrderWithContext ¶
func UpdateOrderWithContext(ctx context.Context, orderID string, params *UpdateOrderParams) (UpdatedOrder, error)
UpdateOrderWithContext updates specific created order with context.