Documentation
¶
Overview ¶
Package tracking provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- Constants
- func NewGetSingleTrackResponseUsingGETRequest(server string, inquiryNumber string, ...) (*http.Request, error)
- func NewReferenceTrackingAPIRequest(server string, referenceNumber string, params *ReferenceTrackingAPIParams) (*http.Request, error)
- func NewShipmentTrackingAPIRequest(server string, inquiryNumber string, params *ShipmentTrackingAPIParams) (*http.Request, error)
- type AccessPointInformation
- type Activity
- type Address
- type AlternateTrackingNumber
- type Client
- func (c *Client) GetSingleTrackResponseUsingGET(ctx context.Context, inquiryNumber string, ...) (*http.Response, error)
- func (c *Client) ReferenceTrackingAPI(ctx context.Context, referenceNumber string, ...) (*http.Response, error)
- func (c *Client) ShipmentTrackingAPI(ctx context.Context, inquiryNumber string, params *ShipmentTrackingAPIParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetSingleTrackResponseUsingGETWithResponse(ctx context.Context, inquiryNumber string, ...) (*GetSingleTrackResponseUsingGETResponse, error)
- func (c *ClientWithResponses) ReferenceTrackingAPIWithResponse(ctx context.Context, referenceNumber string, ...) (*ReferenceTrackingAPIResponse, error)
- func (c *ClientWithResponses) ShipmentTrackingAPIWithResponse(ctx context.Context, inquiryNumber string, params *ShipmentTrackingAPIParams, ...) (*ShipmentTrackingAPIResponse, error)
- type ClientWithResponsesInterface
- type DeliveryDate
- type DeliveryInformation
- type DeliveryPhoto
- type DeliveryTime
- type Dimension
- type Error
- type ErrorResponse
- type GetSingleTrackResponseUsingGETParams
- type GetSingleTrackResponseUsingGETResponse
- type HttpRequestDoer
- type Location
- type Milestones
- type Package
- type PackageAddress
- type PaymentInformation
- type ReferenceNumber
- type ReferenceTrackingAPIParams
- type ReferenceTrackingAPIResponse
- type RequestEditorFn
- type Response
- type Service
- type Shipment
- type ShipmentTrackingAPIParams
- type ShipmentTrackingAPIResponse
- type Signature
- type Status
- type SubMilestone
- type TrackApiResponse
- type TrackResponse
- type Warning
- type Weight
Constants ¶
const (
OAuth2Scopes = "OAuth2.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewGetSingleTrackResponseUsingGETRequest ¶
func NewGetSingleTrackResponseUsingGETRequest(server string, inquiryNumber string, params *GetSingleTrackResponseUsingGETParams) (*http.Request, error)
NewGetSingleTrackResponseUsingGETRequest generates requests for GetSingleTrackResponseUsingGET
func NewReferenceTrackingAPIRequest ¶
func NewReferenceTrackingAPIRequest(server string, referenceNumber string, params *ReferenceTrackingAPIParams) (*http.Request, error)
NewReferenceTrackingAPIRequest generates requests for ReferenceTrackingAPI
func NewShipmentTrackingAPIRequest ¶
func NewShipmentTrackingAPIRequest(server string, inquiryNumber string, params *ShipmentTrackingAPIParams) (*http.Request, error)
NewShipmentTrackingAPIRequest generates requests for ShipmentTrackingAPI
Types ¶
type AccessPointInformation ¶
type AccessPointInformation struct {
PickupByDate *string `json:"pickupByDate,omitempty"`
}
AccessPointInformation The container that has all the information related to the access point where the package is destined for/delivered to.
type Activity ¶
type Activity struct {
// Date The date of the activity. Format: YYYYMMDD
Date *string `json:"date,omitempty"`
// GmtDate gmtDate
GmtDate *string `json:"gmtDate,omitempty"`
// GmtOffset gmtOffset
GmtOffset *string `json:"gmtOffset,omitempty"`
// GmtTime gmtTime
GmtTime *string `json:"gmtTime,omitempty"`
Location *Location `json:"location,omitempty"`
// LogicalScan This indicates whether shipment event is physical or logical event. Valid values: 'true' for logical event. 'false' for physical event
LogicalScan *bool `json:"logicalScan,omitempty"`
// Status The container which has the current package status
Status *Status `json:"status,omitempty"`
// Time The time of the activity. Format: HHMMSS (24 hr)
Time *string `json:"time,omitempty"`
}
Activity Container with all activities associated with the package. Activities are returned in chronological order, with the most recent activity first.
type Address ¶
type Address struct {
// AddressLine1 The physical street address line 1.
AddressLine1 *string `json:"addressLine1,omitempty"`
// AddressLine2 The physical street address line 2.
AddressLine2 *string `json:"addressLine2,omitempty"`
// AddressLine3 The physical street address line 3.
AddressLine3 *string `json:"addressLine3,omitempty"`
// City The physical address city.
City *string `json:"city,omitempty"`
// Country The physical address country.
Country *string `json:"country,omitempty"`
// CountryCode The physical address country code.
CountryCode *string `json:"countryCode,omitempty"`
// PostalCode The physical address postal code.
PostalCode *string `json:"postalCode,omitempty"`
// StateProvince The physical address state or province.
StateProvince *string `json:"stateProvince,omitempty"`
}
Address The container which has the physical address.
type AlternateTrackingNumber ¶
type AlternateTrackingNumber struct {
// Number The alternate tracking number.
Number *string `json:"number,omitempty"`
// Type The type of alternate number. Non-typed numbers are typically UPS tracking numbers.
Type *string `json:"type,omitempty"`
}
AlternateTrackingNumber The list of alternate tracking numbers associated with the package.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetSingleTrackResponseUsingGET ¶
func (c *Client) GetSingleTrackResponseUsingGET(ctx context.Context, inquiryNumber string, params *GetSingleTrackResponseUsingGETParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ReferenceTrackingAPI ¶
func (c *Client) ReferenceTrackingAPI(ctx context.Context, referenceNumber string, params *ReferenceTrackingAPIParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ShipmentTrackingAPI ¶
func (c *Client) ShipmentTrackingAPI(ctx context.Context, inquiryNumber string, params *ShipmentTrackingAPIParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// GetSingleTrackResponseUsingGET request
GetSingleTrackResponseUsingGET(ctx context.Context, inquiryNumber string, params *GetSingleTrackResponseUsingGETParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReferenceTrackingAPI request
ReferenceTrackingAPI(ctx context.Context, referenceNumber string, params *ReferenceTrackingAPIParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ShipmentTrackingAPI request
ShipmentTrackingAPI(ctx context.Context, inquiryNumber string, params *ShipmentTrackingAPIParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetSingleTrackResponseUsingGETWithResponse ¶
func (c *ClientWithResponses) GetSingleTrackResponseUsingGETWithResponse(ctx context.Context, inquiryNumber string, params *GetSingleTrackResponseUsingGETParams, reqEditors ...RequestEditorFn) (*GetSingleTrackResponseUsingGETResponse, error)
GetSingleTrackResponseUsingGETWithResponse request returning *GetSingleTrackResponseUsingGETResponse
func (*ClientWithResponses) ReferenceTrackingAPIWithResponse ¶
func (c *ClientWithResponses) ReferenceTrackingAPIWithResponse(ctx context.Context, referenceNumber string, params *ReferenceTrackingAPIParams, reqEditors ...RequestEditorFn) (*ReferenceTrackingAPIResponse, error)
ReferenceTrackingAPIWithResponse request returning *ReferenceTrackingAPIResponse
func (*ClientWithResponses) ShipmentTrackingAPIWithResponse ¶
func (c *ClientWithResponses) ShipmentTrackingAPIWithResponse(ctx context.Context, inquiryNumber string, params *ShipmentTrackingAPIParams, reqEditors ...RequestEditorFn) (*ShipmentTrackingAPIResponse, error)
ShipmentTrackingAPIWithResponse request returning *ShipmentTrackingAPIResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetSingleTrackResponseUsingGETWithResponse request
GetSingleTrackResponseUsingGETWithResponse(ctx context.Context, inquiryNumber string, params *GetSingleTrackResponseUsingGETParams, reqEditors ...RequestEditorFn) (*GetSingleTrackResponseUsingGETResponse, error)
// ReferenceTrackingAPIWithResponse request
ReferenceTrackingAPIWithResponse(ctx context.Context, referenceNumber string, params *ReferenceTrackingAPIParams, reqEditors ...RequestEditorFn) (*ReferenceTrackingAPIResponse, error)
// ShipmentTrackingAPIWithResponse request
ShipmentTrackingAPIWithResponse(ctx context.Context, inquiryNumber string, params *ShipmentTrackingAPIParams, reqEditors ...RequestEditorFn) (*ShipmentTrackingAPIResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DeliveryDate ¶
type DeliveryDate struct {
// Date The date of this delivery detail. Format - YYYYMMDD
Date *string `json:"date,omitempty"`
// Type The list of delivery dates associated with the package. Valid values: SDD - Scheduled Delivery Date RDD - Rescheduled Delivery Date DEL - Delivered Date
Type *string `json:"type,omitempty"`
}
DeliveryDate The list of delivery dates associated with the package.
type DeliveryInformation ¶
type DeliveryInformation struct {
// DeliveryPhoto Container with all information related to the delivery photo of the package.
DeliveryPhoto *DeliveryPhoto `json:"deliveryPhoto,omitempty"`
// Location The location where the package was dropped off. For example: 'Front Door'
Location *string `json:"location,omitempty"`
// Pod Container which contains Proof of Delivery.
Pod *struct {
// Content The base64 encoded string representation of the Delivery Proof. Note: This is considered sensitive data and may only be returned for a user that has rights to the package.
Content *string `json:"content,omitempty"`
} `json:"pod,omitempty"`
// ReceivedBy The individual who took possession of the package at delivery.
ReceivedBy *string `json:"receivedBy,omitempty"`
// Signature Container with all the signature information associated to the package being delivered.
Signature *Signature `json:"signature,omitempty"`
}
DeliveryInformation Container with all information related to the delivery of the package. Populated only when the package is delivered.
type DeliveryPhoto ¶
type DeliveryPhoto struct {
// IsNonPostalCodeCountry The indication if the country does not use postal code. Valid values: 'true' this country does not use postal code. 'false' this country uses postal code
IsNonPostalCodeCountry *bool `json:"isNonPostalCodeCountry,omitempty"`
Photo *string `json:"photo,omitempty"`
// PhotoCaptureInd The photo capture indicator. Valid values: 'Y' the photo is an photo capture. 'N' the photo is not a capture
PhotoCaptureInd *string `json:"photoCaptureInd,omitempty"`
// PhotoDispositionCode The photo disposition code. Valid values: 'V' the photo is viewable. 'N' the photo is not viewable. 'U' the photo is not stored
PhotoDispositionCode *string `json:"photoDispositionCode,omitempty"`
}
DeliveryPhoto Container with all information related to the delivery photo of the package.
type DeliveryTime ¶
type DeliveryTime struct {
// EndTime The end time of a window or the committed time or the delivered time. Only returned when the type is “EDW” or “CDW” or “IDW” or “CMT” or “DEL”. Format: HHMMSS (24 hr)
EndTime *string `json:"endTime,omitempty"`
// StartTime The start time of a delivery. Only returned when the type is “EDW” or “CDW” or “IDW”. Format: HHMMSS (24 hr).
StartTime *string `json:"startTime,omitempty"`
// Type The date of this delivery detail.
// Valid values:
//
// EOD - End of Day
// CMT - Commit Time
// EDW - Estimated Delivery Window **
// CDW - Confirmed Delivery Window **
// IDW - Imminent Delivery Window **
// DEL - Delivered Time
Type *string `json:"type,omitempty"`
}
DeliveryTime The container which has all delivery times associated with the package.
type Dimension ¶
type Dimension struct {
// Height Height of the package
Height *string `json:"height,omitempty"`
// Length Length of the package
Length *string `json:"length,omitempty"`
// UnitOfDimension The unit of the dimensions
UnitOfDimension *string `json:"unitOfDimension,omitempty"`
// Width Width of the package
Width *string `json:"width,omitempty"`
}
Dimension defines model for Dimension.
type Error ¶
type Error struct {
Code *string `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
}
Error defines model for Error.
type ErrorResponse ¶
type ErrorResponse struct {
Errors *[]Error `json:"errors,omitempty"`
}
ErrorResponse defines model for ErrorResponse.
type GetSingleTrackResponseUsingGETParams ¶
type GetSingleTrackResponseUsingGETParams struct {
// Locale Language and country code of the user, separated by an underscore. Default value is 'en_US'
Locale *string `form:"locale,omitempty" json:"locale,omitempty"`
// ReturnSignature Indicator requesting that the delivery signature image be included as part of the response (by default the image will not be returned). Returns image bytecodes of the signature.
ReturnSignature *string `form:"returnSignature,omitempty" json:"returnSignature,omitempty"`
// ReturnMilestones returnMilestones
ReturnMilestones *string `form:"returnMilestones,omitempty" json:"returnMilestones,omitempty"`
// ReturnPOD Return Proof of Delivery
ReturnPOD *string `form:"returnPOD,omitempty" json:"returnPOD,omitempty"`
// TransId An identifier unique to the request.
TransId string `json:"transId"`
// TransactionSrc Identifies the client/source application that is calling
TransactionSrc string `json:"transactionSrc"`
}
GetSingleTrackResponseUsingGETParams defines parameters for GetSingleTrackResponseUsingGET.
type GetSingleTrackResponseUsingGETResponse ¶
type GetSingleTrackResponseUsingGETResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *TrackApiResponse
JSON400 *Response
JSON403 *Response
JSON404 *Response
JSON500 *Response
JSON503 *Response
}
func ParseGetSingleTrackResponseUsingGETResponse ¶
func ParseGetSingleTrackResponseUsingGETResponse(rsp *http.Response) (*GetSingleTrackResponseUsingGETResponse, error)
ParseGetSingleTrackResponseUsingGETResponse parses an HTTP response from a GetSingleTrackResponseUsingGETWithResponse call
func (GetSingleTrackResponseUsingGETResponse) Status ¶
func (r GetSingleTrackResponseUsingGETResponse) Status() string
Status returns HTTPResponse.Status
func (GetSingleTrackResponseUsingGETResponse) StatusCode ¶
func (r GetSingleTrackResponseUsingGETResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Location ¶
type Location struct {
// Address The container which has the physical address.
Address *Address `json:"address,omitempty"`
// Slic Site Location Indicator Code (SLIC)
Slic *string `json:"slic,omitempty"`
}
Location defines model for Location.
type Milestones ¶
type Milestones struct {
// Category The milestone category. This will be present only when a milestone is in a COMPLETE state.
Category *string `json:"category,omitempty"`
// Code The milestone code.
Code *string `json:"code,omitempty"`
// Current The indication if the milestone represents the current state of the package. Valid values: 'true' this milestone is the current state of the package. 'false' this milestone is not current.
Current *bool `json:"current,omitempty"`
// Description The milestone description. Note: this is not translated at this time and is returned in US English.
Description *string `json:"description,omitempty"`
// LinkedActivity The 0-based index of the activity that triggered this milestone. This will be returned only when a milestone is in a COMPLETE state. For example the most recent activity on the response is index 0.
LinkedActivity *string `json:"linkedActivity,omitempty"`
// State The milestone state. Valid values: 'This milestone has already occurred'/'This milestone has not yet been completed'.
State *string `json:"state,omitempty"`
// SubMilestone The sub-milestone container containing information on a child milestone. Will be present only if a child milestone exists.
SubMilestone *SubMilestone `json:"subMilestone,omitempty"`
}
Milestones The list of milestones associated with the package. Milestones will be returned in chronological order, with the oldest first and most recent/future milestones last.
type Package ¶
type Package struct {
// AccessPointInformation The container that has all the information related to the access point where the package is destined for/delivered to.
AccessPointInformation *AccessPointInformation `json:"accessPointInformation,omitempty"`
Activity *[]Activity `json:"activity,omitempty"`
// AdditionalAttributes The list of additional attributes that may be associated with the package. Presence of any element indicates the package has that attribute.
AdditionalAttributes *[]string `json:"additionalAttributes,omitempty"`
// AdditionalServices The list of additional services that may be associated with the package. Presence of any element indicates that the package has that service.
AdditionalServices *[]string `json:"additionalServices,omitempty"`
AlternateTrackingNumber *[]AlternateTrackingNumber `json:"alternateTrackingNumber,omitempty"`
// CurrentStatus The container which has the current package status
CurrentStatus *Status `json:"currentStatus,omitempty"`
DeliveryDate *[]DeliveryDate `json:"deliveryDate,omitempty"`
// DeliveryInformation Container with all information related to the delivery of the package. Populated only when the package is delivered.
DeliveryInformation *DeliveryInformation `json:"deliveryInformation,omitempty"`
// DeliveryTime The container which has all delivery times associated with the package.
DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"`
Dimension *Dimension `json:"dimension,omitempty"`
// IsSmartPackage Indicator of whether the package is a smart package
IsSmartPackage *bool `json:"isSmartPackage,omitempty"`
// Milestones milestones
Milestones *[]Milestones `json:"milestones,omitempty"`
PackageAddress *[]PackageAddress `json:"packageAddress,omitempty"`
// PackageCount The total number of packages in the shipment. Note that this number may be greater than the number of returned packages in the response. In such cases subsequent calls are needed to get additional packages.
PackageCount *int32 `json:"packageCount,omitempty"`
PaymentInformation *[]PaymentInformation `json:"paymentInformation,omitempty"`
ReferenceNumber *[]ReferenceNumber `json:"referenceNumber,omitempty"`
// Service The container which has the package service information.
Service *Service `json:"service,omitempty"`
StatusCode *string `json:"statusCode,omitempty"`
// StatusDescription The activity status description. Note: this field will be translated based on the locale provided in the request.
StatusDescription *string `json:"statusDescription,omitempty"`
// SuppressionIndicators Contains values which signify that certain data should be suppressed or hidden. Valid values: Tracking activity details should be hidden. Note: this is mainly intended for use by UPS.com applications.
SuppressionIndicators *[]string `json:"suppressionIndicators,omitempty"`
TrackingNumber *string `json:"trackingNumber,omitempty"`
// UcixStatus This indicator provides UCIX (UPS Customer Information Exchange) status Valid values: 'O' means open. 'C' means closed.
UcixStatus *string `json:"ucixStatus,omitempty"`
// Weight The weight container for the package.
Weight *Weight `json:"weight,omitempty"`
}
Package defines model for Package.
type PackageAddress ¶
type PackageAddress struct {
// Address The container which has the physical address.
Address *Address `json:"address,omitempty"`
// AttentionName The specific name of an individual associated with the address segment.
AttentionName *string `json:"attentionName,omitempty"`
// Name Ship-to name.
Name *string `json:"name,omitempty"`
// Type The type of address.
Type *string `json:"type,omitempty"`
}
PackageAddress The container array that has all the addresses associated with the package, such as the ship from (shipper), ship to (consignee), and delivery addresses
type PaymentInformation ¶
type PaymentInformation struct {
// Amount The payment amount. This value will contain the amount in dollars and cents, separated by a period (.) Example: '1025.50'.9
Amount *string `json:"amount,omitempty"`
// Currency The payment currency code (see API codes for possible values).
Currency *string `json:"currency,omitempty"`
// Id The payment internal ID. This may be used in other systems to retrieve additional information on the payment.
Id *string `json:"id,omitempty"`
// Paid The indication for whether the payment is paid or not. Valid values: 'true' the payment is paid. 'false' the payment is not paid.
Paid *bool `json:"paid,omitempty"`
// PaymentMethod The applicable payment methods.
PaymentMethod *string `json:"paymentMethod,omitempty"`
// Type The payment type.
Type *string `json:"type,omitempty"`
}
PaymentInformation The container array that has all the payment information associated with the package, such as 'Collect on Delivery payment'.
type ReferenceNumber ¶
type ReferenceNumber struct {
// Number The reference number.
Number *string `json:"number,omitempty"`
// Type The type of reference number. Specifies how the reference number is associated with the package.
Type *string `json:"type,omitempty"`
}
ReferenceNumber The list of reference numbers associated with the package.
type ReferenceTrackingAPIParams ¶
type ReferenceTrackingAPIParams struct {
// Locale Language and country code of the user, separated by an underscore. Default value is 'en_US'
Locale *string `form:"locale,omitempty" json:"locale,omitempty"`
// FromPickUpDate The tracking information for the above reference number will be searched from this date
FromPickUpDate *string `form:"fromPickUpDate,omitempty" json:"fromPickUpDate,omitempty"`
// ToPickUpDate The tracking information for the above reference number will be searched till this date
ToPickUpDate *string `form:"toPickUpDate,omitempty" json:"toPickUpDate,omitempty"`
// DestCountry The Destination Country associated with above reference number
DestCountry *string `form:"destCountry,omitempty" json:"destCountry,omitempty"`
// DestZip The Destination Zip associated with above reference number
DestZip *string `form:"destZip,omitempty" json:"destZip,omitempty"`
// ShipperNum The Shipper Number (Account Number) associated with above reference number
ShipperNum *string `form:"shipperNum,omitempty" json:"shipperNum,omitempty"`
// RefNumType The Reference number type which will define the tracking information is related to small package or fgv
RefNumType *string `form:"refNumType,omitempty" json:"refNumType,omitempty"`
// TransId An identifier unique to the request.
TransId string `json:"transId"`
// TransactionSrc Identifies the client/source application that is calling
TransactionSrc string `json:"transactionSrc"`
}
ReferenceTrackingAPIParams defines parameters for ReferenceTrackingAPI.
type ReferenceTrackingAPIResponse ¶
type ReferenceTrackingAPIResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *TrackApiResponse
JSON400 *Response
JSON403 *Response
JSON404 *Response
JSON500 *Response
JSON503 *Response
}
func ParseReferenceTrackingAPIResponse ¶
func ParseReferenceTrackingAPIResponse(rsp *http.Response) (*ReferenceTrackingAPIResponse, error)
ParseReferenceTrackingAPIResponse parses an HTTP response from a ReferenceTrackingAPIWithResponse call
func (ReferenceTrackingAPIResponse) Status ¶
func (r ReferenceTrackingAPIResponse) Status() string
Status returns HTTPResponse.Status
func (ReferenceTrackingAPIResponse) StatusCode ¶
func (r ReferenceTrackingAPIResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Response ¶
type Response struct {
Response *ErrorResponse `json:"response,omitempty"`
}
Response defines model for Response.
type Service ¶
type Service struct {
// Code The service name code.
Code *string `json:"code,omitempty"`
// Description The service name description. Note that this field will be translated based on the locale provided in the request.
Description *string `json:"description,omitempty"`
// LevelCode levelCode
LevelCode *string `json:"levelCode,omitempty"`
}
Service The container which has the package service information.
type Shipment ¶
type Shipment struct {
// InquiryNumber inquiryNumber
InquiryNumber *string `json:"inquiryNumber,omitempty"`
Package *[]Package `json:"package,omitempty"`
// UserRelation The relationship of the user to the package(s) in the shipment. No value means that the user has no relationship to the package. Note that this check is only done when the request contains the 'Username' and package rights checking is performed. Valid values:<br />'MYC_HOME' - My Choice for Home<br />'MYC_BUS_OUTBOUND' - My Choice for Business Outbound<br />'MYC_BUS_INBOUND' - My Choice for Business Inbound<br />'SHIPPER' - Shipper
UserRelation *[]string `json:"userRelation,omitempty"`
Warnings *[]Warning `json:"warnings,omitempty"`
}
Shipment defines model for Shipment.
type ShipmentTrackingAPIParams ¶
type ShipmentTrackingAPIParams struct {
// Locale Language and country code of the user, separated by an underscore. Default value is 'en_US'
Locale *string `form:"locale,omitempty" json:"locale,omitempty"`
// Offset This is used to support pagination of package results. The offset is a 0-based index which defines the starting record to be returned.
Offset *string `form:"offset,omitempty" json:"offset,omitempty"`
// Count This is used to support pagination of package results. The count is the maximum number of packages to return starting with the offset.
Count *string `form:"count,omitempty" json:"count,omitempty"`
// TransId An identifier unique to the request.
TransId string `json:"transId"`
// TransactionSrc Identifies the client/source application that is calling
TransactionSrc string `json:"transactionSrc"`
}
ShipmentTrackingAPIParams defines parameters for ShipmentTrackingAPI.
type ShipmentTrackingAPIResponse ¶
type ShipmentTrackingAPIResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *TrackApiResponse
JSON400 *Response
JSON403 *Response
JSON404 *Response
JSON500 *Response
JSON503 *Response
}
func ParseShipmentTrackingAPIResponse ¶
func ParseShipmentTrackingAPIResponse(rsp *http.Response) (*ShipmentTrackingAPIResponse, error)
ParseShipmentTrackingAPIResponse parses an HTTP response from a ShipmentTrackingAPIWithResponse call
func (ShipmentTrackingAPIResponse) Status ¶
func (r ShipmentTrackingAPIResponse) Status() string
Status returns HTTPResponse.Status
func (ShipmentTrackingAPIResponse) StatusCode ¶
func (r ShipmentTrackingAPIResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Signature ¶
type Signature struct {
// Image The base64 encoded string representation of the signature image. Note: This is considered sensitive data and may only be returned for a user that has rights to the package.
Image *string `json:"image,omitempty"`
}
Signature Container with all the signature information associated to the package being delivered.
type Status ¶
type Status struct {
// Code The current status code.
Code *string `json:"code,omitempty"`
// Description The current status description. Note that this field will be translated based on the locale provided in the request.
Description *string `json:"description,omitempty"`
// SimplifiedTextDescription The current status in simplified text. This is a supplementary description providing additional information on the status of the package. Note that this field will be translated based on the locale provided in the request.
SimplifiedTextDescription *string `json:"simplifiedTextDescription,omitempty"`
// StatusCode The activity package detail status code see API Codes for possible values.
StatusCode *string `json:"statusCode,omitempty"`
// Type The activity status type.
Type *string `json:"type,omitempty"`
}
Status The container which has the current package status
type SubMilestone ¶
type SubMilestone struct {
// Category The sub-milestone category.
Category *string `json:"category,omitempty"`
}
SubMilestone The sub-milestone container containing information on a child milestone. Will be present only if a child milestone exists.
type TrackApiResponse ¶
type TrackApiResponse struct {
TrackResponse *TrackResponse `json:"trackResponse,omitempty"`
}
TrackApiResponse defines model for TrackApiResponse.
type TrackResponse ¶
type TrackResponse struct {
Shipment *[]Shipment `json:"shipment,omitempty"`
}
TrackResponse defines model for TrackResponse.
type Warning ¶
type Warning struct {
Code *string `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
}
Warning defines model for Warning.
type Weight ¶
type Weight struct {
// UnitOfMeasurement The weight units of measurement. Valid values: 'LBS' - pounds. 'KGS' - kilograms.
UnitOfMeasurement *string `json:"unitOfMeasurement,omitempty"`
// Weight The weight units of measurement. Valid values: 'LBS' - pounds. 'KGS' - kilograms.
Weight *string `json:"weight,omitempty"`
}
Weight The weight container for the package.