Documentation
¶
Overview ¶
Package rating 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 NewDeprecatedRateRequest(server string, deprecatedVersion string, requestoption string, ...) (*http.Request, error)
- func NewDeprecatedRateRequestWithBody(server string, deprecatedVersion string, requestoption string, ...) (*http.Request, error)
- func NewRateOpRequest(server string, version string, requestoption string, params *RateOpParams, ...) (*http.Request, error)
- func NewRateOpRequestWithBody(server string, version string, requestoption string, params *RateOpParams, ...) (*http.Request, error)
- type AdjustedHeightUnitOfMeasurement
- type AlertDetailElementLevelInformation
- type AlternateDeliveryAddressAddress
- type BillReceiverAddress
- type BillThirdPartyAddress
- type BillingWeightUnitOfMeasurement
- type CODCODAmount
- type Client
- func (c *Client) DeprecatedRate(ctx context.Context, deprecatedVersion string, requestoption string, ...) (*http.Response, error)
- func (c *Client) DeprecatedRateWithBody(ctx context.Context, deprecatedVersion string, requestoption string, ...) (*http.Response, error)
- func (c *Client) RateOp(ctx context.Context, version string, requestoption string, ...) (*http.Response, error)
- func (c *Client) RateOpWithBody(ctx context.Context, version string, requestoption string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DeprecatedRateWithBodyWithResponse(ctx context.Context, deprecatedVersion string, requestoption string, ...) (*DeprecatedRateResponse, error)
- func (c *ClientWithResponses) DeprecatedRateWithResponse(ctx context.Context, deprecatedVersion string, requestoption string, ...) (*DeprecatedRateResponse, error)
- func (c *ClientWithResponses) RateOpWithBodyWithResponse(ctx context.Context, version string, requestoption string, ...) (*RateOpResponse, error)
- func (c *ClientWithResponses) RateOpWithResponse(ctx context.Context, version string, requestoption string, ...) (*RateOpResponse, error)
- type ClientWithResponsesInterface
- type CommodityNMFC
- type CommonErrorResponse
- type DeliveryTimeInformationPickup
- type DeliveryTimeInformationReturnContractServices
- type DeprecatedRateJSONRequestBody
- type DeprecatedRateParams
- type DeprecatedRateResponse
- type DimWeightUnitOfMeasurement
- type DimensionsUnitOfMeasurement
- type DryIceDryIceWeight
- type DryIceWeightUnitOfMeasurement
- type ElementLevelInformationElementIdentifier
- type ErrorMessage
- type ErrorResponse
- type EstimatedArrivalArrival
- type EstimatedArrivalPickup
- type FRSPaymentInformationAddress
- type FRSPaymentInformationType
- type FRSShipmentDataFreightDensityRate
- type FRSShipmentDataHandlingUnits
- type FRSShipmentDataTransportationCharges
- type FreightDensityInfoAdjustedHeight
- type FreightDensityInfoHandlingUnits
- type FreightShipmentInformationFreightDensityInfo
- type HandlingUnitsAdjustedHeight
- type HandlingUnitsDimensions
- type HandlingUnitsType
- type HandlingUnitsUnitOfMeasurement
- type HazMatHazMatChemicalRecord
- type HttpRequestDoer
- type InsuranceBasicFlexibleParcelIndicator
- type InsuranceExtendedFlexibleParcelIndicator
- type InsurancePackageProtection
- type InsuranceTimeInTransitFlexibleParcelIndicator
- type NegotiatedChargesItemizedCharges
- type NegotiatedChargesRateModifier
- type NegotiatedRateChargesBaseServiceCharge
- type NegotiatedRateChargesItemizedCharges
- type NegotiatedRateChargesRateModifier
- type NegotiatedRateChargesTaxCharges
- type NegotiatedRateChargesTotalCharge
- type NegotiatedRateChargesTotalChargesWithTaxes
- type PackageCommodity
- type PackageDimWeight
- type PackageDimensions
- type PackagePackageServiceOptions
- type PackagePackageWeight
- type PackagePackagingType
- type PackageServiceOptionsAccessPointCOD
- type PackageServiceOptionsCOD
- type PackageServiceOptionsDeclaredValue
- type PackageServiceOptionsDeliveryConfirmation
- type PackageServiceOptionsDryIce
- type PackageServiceOptionsHazMat
- type PackageServiceOptionsInsurance
- type PackageServiceOptionsShipperDeclaredValue
- type PackageSimpleRate
- type PackageUPSPremier
- type PackageWeightUnitOfMeasurement
- type PaymentDetailsShipmentCharge
- type RATERequestWrapper
- type RATEResponseWrapper
- type RateOpJSONRequestBody
- type RateOpParams
- type RateOpResponse
- type RateRequest
- type RateRequestCustomerClassification
- type RateRequestPickupType
- type RateRequestRequest
- type RateRequestShipment
- type RateResponse
- type RateResponseRatedShipment
- type RateResponseResponse
- type RatedPackageAccessorial
- type RatedPackageBaseServiceCharge
- type RatedPackageBillingWeight
- type RatedPackageBillingWeightUnitOfMeasurement
- type RatedPackageItemizedCharges
- type RatedPackageNegotiatedCharges
- type RatedPackageRateModifier
- type RatedPackageServiceOptionsCharges
- type RatedPackageSimpleRate
- type RatedPackageTotalCharges
- type RatedPackageTransportationCharges
- type RatedShipmentBaseServiceCharge
- type RatedShipmentBillingWeight
- type RatedShipmentDisclaimer
- type RatedShipmentFRSShipmentData
- type RatedShipmentGuaranteedDelivery
- type RatedShipmentItemizedCharges
- type RatedShipmentNegotiatedRateCharges
- type RatedShipmentRatedPackage
- type RatedShipmentRatedShipmentAlert
- type RatedShipmentService
- type RatedShipmentServiceOptionsCharges
- type RatedShipmentTaxCharges
- type RatedShipmentTimeInTransit
- type RatedShipmentTotalCharges
- type RatedShipmentTotalChargesWithTaxes
- type RatedShipmentTransportationCharges
- type RequestEditorFn
- type RequestTransactionReference
- type ResponseAlert
- type ResponseAlertDetail
- type ResponseResponseStatus
- type ResponseTransactionReference
- type ServiceSummaryEstimatedArrival
- type ServiceSummaryService
- type ShipFromAddress
- type ShipToAddress
- type ShipmentAlternateDeliveryAddress
- type ShipmentChargeBillReceiver
- type ShipmentChargeBillShipper
- type ShipmentChargeBillThirdParty
- type ShipmentDeliveryTimeInformation
- type ShipmentFRSPaymentInformation
- type ShipmentFreightShipmentInformation
- type ShipmentInvoiceLineTotal
- type ShipmentPackage
- type ShipmentPaymentDetails
- type ShipmentPromotionalDiscountInformation
- type ShipmentService
- type ShipmentServiceOptionsAccessPointCOD
- type ShipmentServiceOptionsCOD
- type ShipmentServiceOptionsCODCODAmount
- type ShipmentServiceOptionsDeliveryConfirmation
- type ShipmentServiceOptionsDeliveryOptions
- type ShipmentServiceOptionsImportControl
- type ShipmentServiceOptionsPickupOptions
- type ShipmentServiceOptionsRestrictedArticles
- type ShipmentServiceOptionsReturnService
- type ShipmentServiceOptionsVerifiedDelivery
- type ShipmentShipFrom
- type ShipmentShipTo
- type ShipmentShipmentIndicationType
- type ShipmentShipmentRatingOptions
- type ShipmentShipmentServiceOptions
- type ShipmentShipmentTotalWeight
- type ShipmentShipper
- type ShipmentTotalWeightUnitOfMeasurement
- type ShipperAddress
- type TimeInTransitServiceSummary
- type TransportationChargesDiscountAmount
- type TransportationChargesGrossCharge
- type TransportationChargesNetCharge
Constants ¶
const (
OAuth2Scopes = "OAuth2.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewDeprecatedRateRequest ¶
func NewDeprecatedRateRequest(server string, deprecatedVersion string, requestoption string, params *DeprecatedRateParams, body DeprecatedRateJSONRequestBody) (*http.Request, error)
NewDeprecatedRateRequest calls the generic DeprecatedRate builder with application/json body
func NewDeprecatedRateRequestWithBody ¶
func NewDeprecatedRateRequestWithBody(server string, deprecatedVersion string, requestoption string, params *DeprecatedRateParams, contentType string, body io.Reader) (*http.Request, error)
NewDeprecatedRateRequestWithBody generates requests for DeprecatedRate with any type of body
func NewRateOpRequest ¶
func NewRateOpRequest(server string, version string, requestoption string, params *RateOpParams, body RateOpJSONRequestBody) (*http.Request, error)
NewRateOpRequest calls the generic RateOp builder with application/json body
Types ¶
type AdjustedHeightUnitOfMeasurement ¶
type AdjustedHeightUnitOfMeasurement struct {
// Code Code associated with Unit of Measurement for the Adjusted height. Valid value is IN Unit of measurement code for Adjusted height is validated only when Handling unit type is SKD = Skid or PLT = Pallet.
Code string `json:"Code"`
// Description Description for Code associated with Unit of Measurement for the Adjusted height.
Description string `json:"Description"`
}
AdjustedHeightUnitOfMeasurement Unit of Measurement container for the Adjusted height.
type AlertDetailElementLevelInformation ¶
type AlertDetailElementLevelInformation struct {
// ElementIdentifier Contains more information about the type of element. Returned if Level is 'P' or 'C'.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
ElementIdentifier *[]ElementLevelInformationElementIdentifier `json:"ElementIdentifier,omitempty"`
// Level Define type of element in request. Possible values are -
// - 'H' for the header details level,
// - 'S' for the shipment level,
// - 'P' for the package level,
// - 'C' for the commodity level.
Level string `json:"Level"`
}
AlertDetailElementLevelInformation Provides more information about the element that represents the alert.
type AlternateDeliveryAddressAddress ¶
type AlternateDeliveryAddressAddress struct {
// AddressLine The UPS Access Point's street address, including name and number (when applicable). Length is not validated.
AddressLine *[]string `json:"AddressLine,omitempty"`
// City UPS Access Point city.
City *string `json:"City,omitempty"`
// CountryCode UPS Access Point country or territory code.
CountryCode string `json:"CountryCode"`
// POBoxIndicator Presence/Absence Indicator. Any value inside is ignored.
//
// This field is a flag to indicate if the Alternate Delivery location is a PO box location.
//
// True if POBoxIndicator tag exists; false otherwise. Not valid with Shipment Indication Types:
// - 01 - Hold for Pickup at UPS Access Point
// - 02 - UPS Access Point™ Delivery
POBoxIndicator *string `json:"POBoxIndicator,omitempty"`
// PostalCode UPS Access Point Postal code.
PostalCode *string `json:"PostalCode,omitempty"`
// ResidentialAddressIndicator Presence/Absence Indicator. Any value inside is ignored.This field is a flag to indicate if the Alternate Delivery location is a residential location. True if ResidentialAddressIndicator tag exists. For future use.
ResidentialAddressIndicator *string `json:"ResidentialAddressIndicator,omitempty"`
// StateProvinceCode UPS Access Point State or Province code.
StateProvinceCode *string `json:"StateProvinceCode,omitempty"`
}
AlternateDeliveryAddressAddress Address container for Alternate Delivery Address.
type BillReceiverAddress ¶
type BillReceiverAddress struct {
// PostalCode The postal code for the UPS account's pickup address. The pickup postal code was entered in the UPS system when the account was set-up.
PostalCode *string `json:"PostalCode,omitempty"`
}
BillReceiverAddress Container for additional information for the bill receiver's UPS accounts address.
type BillThirdPartyAddress ¶
type BillThirdPartyAddress struct {
// AddressLine The origin street address including name and number (when applicable).
AddressLine *[]string `json:"AddressLine,omitempty"`
// City Origin city.
City *string `json:"City,omitempty"`
// CountryCode Origin country or territory code. Refer to the Supported Country or Territory Tables located in the Appendix.
CountryCode string `json:"CountryCode"`
// PostalCode Origin postal code. The postal code must be the same as the UPS account pickup address postal code. Required for United States and Canadian UPS accounts and/or if the UPS account pickup address has a postal code. If the UPS account's pickup country or territory is US or Puerto Rico, the postal code is 5 or 9 digits. The character '-' may be used to separate the first five digits and the last four digits. If the UPS account's pickup country or territory is CA, the postal code is 6 alphanumeric characters whose format is A#A#A# where A is an uppercase letter and # is a digit.
PostalCode *string `json:"PostalCode,omitempty"`
// StateProvinceCode Origin state code.
StateProvinceCode *string `json:"StateProvinceCode,omitempty"`
}
BillThirdPartyAddress Container for additional information for the third party UPS accounts address.
type BillingWeightUnitOfMeasurement ¶
type BillingWeightUnitOfMeasurement struct {
// Code The code associated with the unit of measure for the billable weight of a shipment. Possible values are KGS or LBS.
Code string `json:"Code"`
// Description The description for the billable weight associated with the shipment.
Description string `json:"Description"`
}
BillingWeightUnitOfMeasurement Unit Of Measurement Container.
type CODCODAmount ¶
type CODCODAmount struct {
// CurrencyCode Currency Code. Required if a value for the COD amount exists in the MonetaryValue tag. Must match one of the IATA currency codes. UPS does not support all international currency codes. Refer to Currency Codes in the Appendix for a list of valid codes.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The COD value for the package. Required if COD option is present. The maximum amount allowed is 50,000 USD.
MonetaryValue string `json:"MonetaryValue"`
}
CODCODAmount CODAmount Container.
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) DeprecatedRate ¶
func (c *Client) DeprecatedRate(ctx context.Context, deprecatedVersion string, requestoption string, params *DeprecatedRateParams, body DeprecatedRateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeprecatedRateWithBody ¶
func (*Client) RateOp ¶
func (c *Client) RateOp(ctx context.Context, version string, requestoption string, params *RateOpParams, body RateOpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RateOpWithBody ¶
type ClientInterface ¶
type ClientInterface interface {
// DeprecatedRateWithBody request with any body
DeprecatedRateWithBody(ctx context.Context, deprecatedVersion string, requestoption string, params *DeprecatedRateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
DeprecatedRate(ctx context.Context, deprecatedVersion string, requestoption string, params *DeprecatedRateParams, body DeprecatedRateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RateOpWithBody request with any body
RateOpWithBody(ctx context.Context, version string, requestoption string, params *RateOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RateOp(ctx context.Context, version string, requestoption string, params *RateOpParams, body RateOpJSONRequestBody, 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) DeprecatedRateWithBodyWithResponse ¶
func (c *ClientWithResponses) DeprecatedRateWithBodyWithResponse(ctx context.Context, deprecatedVersion string, requestoption string, params *DeprecatedRateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeprecatedRateResponse, error)
DeprecatedRateWithBodyWithResponse request with arbitrary body returning *DeprecatedRateResponse
func (*ClientWithResponses) DeprecatedRateWithResponse ¶
func (c *ClientWithResponses) DeprecatedRateWithResponse(ctx context.Context, deprecatedVersion string, requestoption string, params *DeprecatedRateParams, body DeprecatedRateJSONRequestBody, reqEditors ...RequestEditorFn) (*DeprecatedRateResponse, error)
func (*ClientWithResponses) RateOpWithBodyWithResponse ¶
func (c *ClientWithResponses) RateOpWithBodyWithResponse(ctx context.Context, version string, requestoption string, params *RateOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RateOpResponse, error)
RateOpWithBodyWithResponse request with arbitrary body returning *RateOpResponse
func (*ClientWithResponses) RateOpWithResponse ¶
func (c *ClientWithResponses) RateOpWithResponse(ctx context.Context, version string, requestoption string, params *RateOpParams, body RateOpJSONRequestBody, reqEditors ...RequestEditorFn) (*RateOpResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// DeprecatedRateWithBodyWithResponse request with any body
DeprecatedRateWithBodyWithResponse(ctx context.Context, deprecatedVersion string, requestoption string, params *DeprecatedRateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeprecatedRateResponse, error)
DeprecatedRateWithResponse(ctx context.Context, deprecatedVersion string, requestoption string, params *DeprecatedRateParams, body DeprecatedRateJSONRequestBody, reqEditors ...RequestEditorFn) (*DeprecatedRateResponse, error)
// RateOpWithBodyWithResponse request with any body
RateOpWithBodyWithResponse(ctx context.Context, version string, requestoption string, params *RateOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RateOpResponse, error)
RateOpWithResponse(ctx context.Context, version string, requestoption string, params *RateOpParams, body RateOpJSONRequestBody, reqEditors ...RequestEditorFn) (*RateOpResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CommodityNMFC ¶
type CommodityNMFC struct {
// PrimeCode Value of NMFC Prime. Contact your service representative if you need information concerning NMFC Codes. Required if NMFC Container is present. For GFP Only.
PrimeCode string `json:"PrimeCode"`
// SubCode Value of NMFC Sub. Contact your service representative if you need information concerning NMFC Codes. Needs to be provided when the SubCode associated with the PrimeCode is other than 00. API defaults the sub value to 00 if not provided. If provided the Sub Code should be associated with the PrimeCode of the NMFC.
SubCode *string `json:"SubCode,omitempty"`
}
CommodityNMFC NMFC Commodity container. For GFP Only.
type CommonErrorResponse ¶
type CommonErrorResponse struct {
// Errors The error array containing any errors that occurred.
Errors *[]ErrorMessage `json:"errors,omitempty"`
}
CommonErrorResponse The error response containing any errors that occurred.
type DeliveryTimeInformationPickup ¶
type DeliveryTimeInformationPickup struct {
// Date Shipment Date; The Pickup date is a Shipment Date and it is a required input field. The user is allowed to query up to 35 days into the past and 60 days into the future. Format: YYYYMMDD If a date is not provided, it will be defaulted to the current system date.
Date string `json:"Date"`
// Time Reflects the time the package is tendered to UPS for shipping (can be dropped off at UPS or picked up by UPS). Military Time Format HHMMSS or HHMM. Invalid pickup time will not be validated.
Time *string `json:"Time,omitempty"`
}
DeliveryTimeInformationPickup Pickup container.
type DeliveryTimeInformationReturnContractServices ¶
type DeliveryTimeInformationReturnContractServices struct {
// Code Return contract Service code. Valid Code "01" - Heavy Goods. If 01 will return Heavy Goods service transit times for a given origin and destination (if applicable) Invalid Code will be ignore.
Code string `json:"Code"`
// Description Return contract service Description
Description *string `json:"Description,omitempty"`
}
DeliveryTimeInformationReturnContractServices Return contract services container
type DeprecatedRateJSONRequestBody ¶
type DeprecatedRateJSONRequestBody = RATERequestWrapper
DeprecatedRateJSONRequestBody defines body for DeprecatedRate for application/json ContentType.
type DeprecatedRateParams ¶
type DeprecatedRateParams struct {
// Additionalinfo Valid Values: timeintransit = The server rates with transit time information combined with requestoption in URL.Rate is the only valid request option for Ground Freight Pricing requests. Length 15
Additionalinfo *string `form:"additionalinfo,omitempty" json:"additionalinfo,omitempty"`
// TransId An identifier unique to the request. Length 32
TransId *string `json:"transId,omitempty"`
// TransactionSrc An identifier of the client/source application that is making the request.Length 512
TransactionSrc *string `json:"transactionSrc,omitempty"`
}
DeprecatedRateParams defines parameters for DeprecatedRate.
type DeprecatedRateResponse ¶
type DeprecatedRateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *RATEResponseWrapper
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON403 *ErrorResponse
JSON429 *ErrorResponse
}
func ParseDeprecatedRateResponse ¶
func ParseDeprecatedRateResponse(rsp *http.Response) (*DeprecatedRateResponse, error)
ParseDeprecatedRateResponse parses an HTTP response from a DeprecatedRateWithResponse call
func (DeprecatedRateResponse) Status ¶
func (r DeprecatedRateResponse) Status() string
Status returns HTTPResponse.Status
func (DeprecatedRateResponse) StatusCode ¶
func (r DeprecatedRateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DimWeightUnitOfMeasurement ¶
type DimWeightUnitOfMeasurement struct {
// Code Code representing the unit of measure associated with the package weight.
//
// Valid values:
// - LBS - Pounds
// - KGS - Kilograms.
Code string `json:"Code"`
// Description Text description of the code representing the unit of measure associated with the package weight. Length and value are not validated.
Description string `json:"Description"`
}
DimWeightUnitOfMeasurement UnitOfMeasurement Container.
type DimensionsUnitOfMeasurement ¶
type DimensionsUnitOfMeasurement struct {
// Code Package dimensions unit of measurement code.
//
// Valid values:
// - IN
// - CM
Code string `json:"Code"`
// Description Text description of the code representing the UnitOfMeasurement associated with the package. This element is not validated.
Description string `json:"Description"`
}
DimensionsUnitOfMeasurement UnitOfMeasurement container.
type DryIceDryIceWeight ¶
type DryIceDryIceWeight struct {
// UnitOfMeasurement Container for Unit Of Measurement for Dry Ice.
UnitOfMeasurement DryIceWeightUnitOfMeasurement `json:"UnitOfMeasurement"`
// Weight Weight for Dry Ice. Cannot be more than package weight. Should be more than 0.0. Valid characters are 0-9 and "." (Decimal point). Limit to 1 digit after the decimal. The maximum length of the field is 5 including "." and can hold up to 1 decimal place.
Weight string `json:"Weight"`
}
DryIceDryIceWeight Container for Weight information for Dry Ice.
type DryIceWeightUnitOfMeasurement ¶
type DryIceWeightUnitOfMeasurement struct {
// Code DryIce weight unit of measurement code. Valid values:
// - 00 - KG (Metric Unit of Measurements) or KGS
// - 01 - LB (English Unit of Measurements) or LBS
Code string `json:"Code"`
// Description Text description of the code representing the unit of measure associated with the package.
Description string `json:"Description"`
}
DryIceWeightUnitOfMeasurement Container for Unit Of Measurement for Dry Ice.
type ElementLevelInformationElementIdentifier ¶
type ElementLevelInformationElementIdentifier struct {
// Code Represents the type of element. Possible values are 'P' and 'C'.
Code string `json:"Code"`
// Value Represents the value of element.
Value string `json:"Value"`
}
ElementLevelInformationElementIdentifier defines model for ElementLevelInformation_ElementIdentifier.
type ErrorMessage ¶
type ErrorMessage struct {
// Code The error code.
Code *string `json:"code,omitempty"`
// Message The error message.
Message *string `json:"message,omitempty"`
}
ErrorMessage The error response containing any errors that occurred.
type ErrorResponse ¶
type ErrorResponse struct {
// Response The error response containing any errors that occurred.
Response *CommonErrorResponse `json:"response,omitempty"`
}
ErrorResponse defines model for ErrorResponse.
type EstimatedArrivalArrival ¶
type EstimatedArrivalArrival struct {
// Date Scheduled Local Delivery Date. Format: YYYYMMDD
Date string `json:"Date"`
// Time The time UPS will pick up the shipment. This is commit Time. Military Time Format HHMMSS or HHMM
Time *string `json:"Time,omitempty"`
}
EstimatedArrivalArrival Container for the Time-In-Transit arrival information by service. This is the most accurate delivery information available via the Rating API and will reflect changes in delivery schedules due to peak business seasons or holidays.
type EstimatedArrivalPickup ¶
type EstimatedArrivalPickup struct {
// Date The date UPS picks up the package from the origin. Format: YYYYMMDD. In the event the Pickup date differs from the Ship On Date, provided in the request, a warning message will be returned.
Date string `json:"Date"`
// Time The time UPS will pick up the shipment. Military Time Format HHMMSS or HHMM
Time *string `json:"Time,omitempty"`
}
EstimatedArrivalPickup The date and pick up time container.
type FRSPaymentInformationAddress ¶
type FRSPaymentInformationAddress struct {
// CountryCode Country or Territory code for the UPS accounts & billing address. Country or Territory Code is required when the FRS Payment Information type = 02 and type= 03.
CountryCode string `json:"CountryCode"`
// PostalCode Postal Code for UPS accounts billing address. Postal Code may be present when the FRS Payment Information type = 02 and type = 03.
PostalCode *string `json:"PostalCode,omitempty"`
}
FRSPaymentInformationAddress Payer Address Container. Address container may be present for FRS Payment Information type = 02 and required when the FRS Payment Information type = 03.
type FRSPaymentInformationType ¶
type FRSPaymentInformationType struct {
// Code Payer Type code for FRS Rate request. Valid Values are: 01 = Prepaid 02 = FreightCollect 03 = BillThirdParty
Code string `json:"Code"`
// Description Text description of the code representing the GFP payment type.
Description *string `json:"Description,omitempty"`
}
FRSPaymentInformationType GFP Payment Information Type container. GFP only.
type FRSShipmentDataFreightDensityRate ¶
type FRSShipmentDataFreightDensityRate struct {
// Density Density is returned if the Shipper is eligible for Density based rate. Valid values:0 to 999.9
Density string `json:"Density"`
// TotalCubicFeet TotalCubic feet is returned if the Shipper is eligible for Density based rate. Valid values:0 to 99999.999
TotalCubicFeet string `json:"TotalCubicFeet"`
}
FRSShipmentDataFreightDensityRate FreightDensityRate container for Density based rating.
type FRSShipmentDataHandlingUnits ¶
type FRSShipmentDataHandlingUnits struct {
// AdjustedHeight Container to hold Adjusted Height information.
AdjustedHeight *HandlingUnitsAdjustedHeight `json:"AdjustedHeight,omitempty"`
// Dimensions Dimension of the HandlingUnit container for density based pricing.
Dimensions HandlingUnitsDimensions `json:"Dimensions"`
// Quantity Handling Unit Quantity for Density based rating.
Quantity string `json:"Quantity"`
// Type Handling Unit Type for Density based rating.
Type HandlingUnitsType `json:"Type"`
}
FRSShipmentDataHandlingUnits defines model for FRSShipmentData_HandlingUnits.
type FRSShipmentDataTransportationCharges ¶
type FRSShipmentDataTransportationCharges struct {
// DiscountAmount Discount Container
DiscountAmount TransportationChargesDiscountAmount `json:"DiscountAmount"`
// DiscountPercentage Discount Percentage
DiscountPercentage string `json:"DiscountPercentage"`
// GrossCharge Gross Transportation Charges Container
GrossCharge TransportationChargesGrossCharge `json:"GrossCharge"`
// NetCharge Net Transportation Rate Container
NetCharge TransportationChargesNetCharge `json:"NetCharge"`
}
FRSShipmentDataTransportationCharges Transportation Charges Container
type FreightDensityInfoAdjustedHeight ¶
type FreightDensityInfoAdjustedHeight struct {
// UnitOfMeasurement Unit of Measurement container for the Adjusted height.
UnitOfMeasurement AdjustedHeightUnitOfMeasurement `json:"UnitOfMeasurement"`
// Value Adjusted Height value for the handling unit.
Value string `json:"Value"`
}
FreightDensityInfoAdjustedHeight Container to hold Adjusted Height information. Required if AdjustedHeightIndicator is present.
type FreightDensityInfoHandlingUnits ¶
type FreightDensityInfoHandlingUnits struct {
// Dimensions Dimension of the HandlingUnit container for density based pricing.
Dimensions HandlingUnitsDimensions `json:"Dimensions"`
// Quantity Handling Unit Quantity for Density based rating.
Quantity string `json:"Quantity"`
// Type Handling Unit Type for Density based rating.
Type HandlingUnitsType `json:"Type"`
}
FreightDensityInfoHandlingUnits Handling Unit for Density based rating container.
type FreightShipmentInformationFreightDensityInfo ¶
type FreightShipmentInformationFreightDensityInfo struct {
// AdjustedHeight Container to hold Adjusted Height information. Required if AdjustedHeightIndicator is present.
AdjustedHeight *FreightDensityInfoAdjustedHeight `json:"AdjustedHeight,omitempty"`
// AdjustedHeightIndicator The presence of the AdjustedHeightIndicator allows UPS to do height reduction adjustment for density based rate request.
AdjustedHeightIndicator *string `json:"AdjustedHeightIndicator,omitempty"`
HandlingUnits []FreightDensityInfoHandlingUnits `json:"HandlingUnits"`
}
FreightShipmentInformationFreightDensityInfo Freight Density Info container. Required if DensityEligibleIndicator is present.
type HandlingUnitsAdjustedHeight ¶
type HandlingUnitsAdjustedHeight struct {
// UnitOfMeasurement Unit of Measurement container for the Adjusted height.
UnitOfMeasurement AdjustedHeightUnitOfMeasurement `json:"UnitOfMeasurement"`
// Value Adjusted Height value for the handling unit. Adjusted Height is done only when Handling unit type is SKD = Skid or PLT = Pallet.
Value string `json:"Value"`
}
HandlingUnitsAdjustedHeight Container to hold Adjusted Height information.
type HandlingUnitsDimensions ¶
type HandlingUnitsDimensions struct {
// Height The height of the line item used to determine dimensional weight.
Height string `json:"Height"`
// Length The length of the line item used to determine dimensional weight.
Length string `json:"Length"`
// UnitOfMeasurement UnitOfMeasurement container.
UnitOfMeasurement HandlingUnitsUnitOfMeasurement `json:"UnitOfMeasurement"`
// Width The width of the line item used to determine dimensional weight.
Width string `json:"Width"`
}
HandlingUnitsDimensions Dimension of the HandlingUnit container for density based pricing.
type HandlingUnitsType ¶
type HandlingUnitsType struct {
// Code The code associated with Handling Unit Type. Valid values: SKD = Skid CBY = CarboyPLT = PalletTOT = TotesLOO = LooseOTH = Other
Code string `json:"Code"`
// Description A description of the code for the Handling Unit type.
Description *string `json:"Description,omitempty"`
}
HandlingUnitsType Handling Unit Type for Density based rating.
type HandlingUnitsUnitOfMeasurement ¶
type HandlingUnitsUnitOfMeasurement struct {
// Code Code for UnitOfMeasurement for the line item dimension. Valid value - IN = Inches
Code string `json:"Code"`
// Description Description for UnitOfMeasurement for the line item dimension.
Description string `json:"Description"`
}
HandlingUnitsUnitOfMeasurement UnitOfMeasurement container.
type HazMatHazMatChemicalRecord ¶
type HazMatHazMatChemicalRecord struct {
// AdditionalDescription Additional remarks or special provision information. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation.
//
// Additional information that may be required by regulation about a hazardous material, such as, "Limited Quantity", DOT-SP numbers, EX numbers. Applies only if SubVersion is greater than or equal to 1701.
AdditionalDescription *string `json:"AdditionalDescription,omitempty"`
// ChemicalRecordIdentifier Identifies the Chemcial Record. Required if SubVersion is greater than or equal to 1701.
ChemicalRecordIdentifier *string `json:"ChemicalRecordIdentifier,omitempty"`
// ClassDivisionNumber This is the hazard class associated to the specified commodity. Required if CommodityRegulatedLevelCode is 'LQ' or 'FR' Applies only if SubVersion is greater than or equal to 1701.
ClassDivisionNumber *string `json:"ClassDivisionNumber,omitempty"`
// CommodityRegulatedLevelCode Indicates the type of commodity - Fully Regulated (FR), Limited Quantity (LQ), Excepted Quantity (EQ), Lightly Regulated (LR). Default value is FR.Valid values are LR, FR, LQ, EQ. Applies only if SubVersion is greater than or equal to 1701.
CommodityRegulatedLevelCode *string `json:"CommodityRegulatedLevelCode,omitempty"`
// EmergencyContact The emergency information, contact name and/or contact number, required to be communicated when a call is placed to the EmergencyPhoneNumber. The information is required if there is a value in the EmergencyPhoneNumber field above and the shipment is with a US50 or PR origin and/or destination and the RegulationSet is IATA. Applies only if SubVersion is greater than or equal to 1701.
EmergencyContact *string `json:"EmergencyContact,omitempty"`
// EmergencyPhone 24 Hour Emergency Phone Number of the shipper. Valid values for this field are (0) through (9) with trailing blanks. For numbers within the U.S., the layout is '1', area code, 7-digit number. For all other countries or territories the layout is country or territory code, area code, number. Applies only if SubVersion is greater than or equal to 1701.
EmergencyPhone *string `json:"EmergencyPhone,omitempty"`
// HazardLabelRequired Defines the type of label that is required on the package for the commodity. Not applicable if CommodityRegulatedLevelCode = LR or EQ. Applies only if SubVersion is greater than or equal to 1701.
HazardLabelRequired *string `json:"HazardLabelRequired,omitempty"`
// IDNumber This is the ID number (UN/NA/ID) for the specified commodity. Required if CommodityRegulatedLevelCode = LR, LQ or FR and if the field applies to the material by regulation. UN/NA/ID Identification Number assigned to the specified regulated good. (Include the UN/NA/ID as part of the entry). Applies only if SubVersion is greater than or equal to 1701.
IDNumber *string `json:"IDNumber,omitempty"`
// PackagingGroupType This is the packing group category associated to the specified commodity. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Must be shown in Roman Numerals.Valid values are:I, II,III,blank. Applies only if SubVersion is greater than or equal to 1701.
PackagingGroupType *string `json:"PackagingGroupType,omitempty"`
// PackagingInstructionCode The packing instructions related to the chemical record. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Applies only if SubVersion is greater than or equal to 1701.
PackagingInstructionCode *string `json:"PackagingInstructionCode,omitempty"`
// PackagingType The package type code identifying the type of packaging used for the commodity. (Ex: Fiberboard Box). Required if CommodityRegulatedLevelCode = LQ or FR. Applies only if SubVersion is greater than or equal to 1701.
PackagingType *string `json:"PackagingType,omitempty"`
// PackagingTypeQuantity The number of pieces of the specific commodity. Required if CommodityRegulatedLevelCode = LQ or FR.Valid values are 1 to 999. Applies only if SubVersion is greater than or equal to 1701.
PackagingTypeQuantity *string `json:"PackagingTypeQuantity,omitempty"`
// ProperShippingName The Proper Shipping Name assigned by ADR, CFR or IATA. Required if CommodityRegulatedLevelCode = LR, LQ or FR. Applies only if SubVersion is greater than or equal to 1701.
ProperShippingName *string `json:"ProperShippingName,omitempty"`
// Quantity Required if CommodityRegulatedLevelCode = LQ or FR. The numerical value of the mass capacity of the regulated good. Applies only if SubVersion is greater than or equal to 1701.
Quantity *string `json:"Quantity,omitempty"`
// RegulationSet The Regulatory set associated with every regulated shipment. It must be the same across the shipment. Valid values: ADR - For Europe to Europe Ground Movement CFR - For HazMat regulated by US Dept. of Transportation within the U.S. or ground shipments to Canada, IATA - For Worldwide Air movement TDG - For Canada to Canada ground movement or Canada to U.S. standard movement Applies only if SubVersion is greater than or equal to 1701. For multiple ChemicalRecords per package or multiple packages containing different RegulationSet, RegulationSet of first ChemicalRecord would be considered for validating and rating the entire shipment.
RegulationSet string `json:"RegulationSet"`
// ReportableQuantity Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. If reportable quantity is met, 'RQ' should be entered. Applies only if SubVersion is greater than or equal to 1701.
ReportableQuantity *string `json:"ReportableQuantity,omitempty"`
// SubRiskClass Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Secondary hazardous characteristics of a package. (There can be more than one – separate each with a comma). Applies only if SubVersion is greater than or equal to 1701.
SubRiskClass *string `json:"SubRiskClass,omitempty"`
// TechnicalName The technical name (when required) for the specified commodity. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Applies only if SubVersion is greater than or equal to 1701.
TechnicalName *string `json:"TechnicalName,omitempty"`
// TransportCategory Transport Category.Valid values are 0 to 4. Applies only if SubVersion is greater than or equal to 1701.
TransportCategory *string `json:"TransportCategory,omitempty"`
// TransportationMode The method of transport by which a shipment is approved to move and the regulations associated with that method. Only required when the CommodityRegulatedLevelCode is FR or LQ.Valid values: 01 - Highway02 - Ground03 - Passenger Aircraft04 - Cargo Aircraft Only Applies only if SubVersion is greater than or equal to 1701. For multiple ChemicalRecords per package having different TransportationMode, TransportationMode of first ChemicalRecord would be considered for validating and rating the package. All TransportationMode except for '04' are general service offering. If any chemical record contains '04' as TransportationMode, ShipperNumber needs to be authorized to use '04' as TransportationMode.
TransportationMode string `json:"TransportationMode"`
// TunnelRestrictionCode Defines what is restricted to pass through a tunnel. Applies only if SubVersion is greater than or equal to 1701.
TunnelRestrictionCode *string `json:"TunnelRestrictionCode,omitempty"`
// UOM Required if CommodityRegulatedLevelCode = LQ or FR. The unit of measure used for the mass capacity of the regulated good. For Example: ml, L, g, mg, kg, cylinder, pound, pint, quart, gallon, ounce etc. Applies only if SubVersion is greater than or equal to 1701.
UOM *string `json:"UOM,omitempty"`
}
HazMatHazMatChemicalRecord Container to hold HazMat Chemical Records.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InsuranceBasicFlexibleParcelIndicator ¶
type InsuranceBasicFlexibleParcelIndicator struct {
// CurrencyCode The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes. Valid for UPS World Wide Express Freight shipments.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The monetary value associated with the package. Valid for UPS World Wide Express Freight shipments.
MonetaryValue string `json:"MonetaryValue"`
}
InsuranceBasicFlexibleParcelIndicator Container to hold Basic Flexible Parcel Indicator information. Valid for UPS World Wide Express Freight shipments.
type InsuranceExtendedFlexibleParcelIndicator ¶
type InsuranceExtendedFlexibleParcelIndicator struct {
// CurrencyCode The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes. Valid for UPS World Wide Express Freight shipments.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The monetary value associated with the package. Valid for UPS World Wide Express Freight shipments.
MonetaryValue string `json:"MonetaryValue"`
}
InsuranceExtendedFlexibleParcelIndicator Container for Extended Flexible Parcel Indicator Valid for UPS World Wide Express Freight shipments.
type InsurancePackageProtection ¶
type InsurancePackageProtection struct {
// CurrencyCode Required if a value for the package declared value amount exists in the MonetaryValue tag. Must match one of the IATA currency codes. Length is not validated. UPS does not support all international currency codes. Refer to Currency Codes in the Appendix for a list of valid codes.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The monetary value for the PackageProtection amount associated with the package.
MonetaryValue string `json:"MonetaryValue"`
}
InsurancePackageProtection defines model for Insurance_PackageProtection.
type InsuranceTimeInTransitFlexibleParcelIndicator ¶
type InsuranceTimeInTransitFlexibleParcelIndicator struct {
// CurrencyCode The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes. Valid for UPS World Wide Express Freight shipments.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The monetary value associated with the package. Valid for UPS World Wide Express Freight shipments.
MonetaryValue string `json:"MonetaryValue"`
}
InsuranceTimeInTransitFlexibleParcelIndicator Container to hold Time In Transit Flexible Parcel Indicator information. Valid for UPS World Wide Express Freight shipments.
type NegotiatedChargesItemizedCharges ¶
type NegotiatedChargesItemizedCharges struct {
// Code Identification code for itemized charge.
Code string `json:"Code"`
// CurrencyCode The IATA currency code associated with the Itemized Charge costs for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// Description Description of Itemized Charge that had been charged.
Description *string `json:"Description,omitempty"`
// MonetaryValue The value for Itemized Charge costs associated with the shipment.
MonetaryValue string `json:"MonetaryValue"`
// SubType The sub-type of Itemized Charge type.
SubType *string `json:"SubType,omitempty"`
}
NegotiatedChargesItemizedCharges defines model for NegotiatedCharges_ItemizedCharges.
type NegotiatedChargesRateModifier ¶
type NegotiatedChargesRateModifier struct {
// Amount Amount. Example- "-1.00","0.25" It contains positive or negative values.
Amount string `json:"Amount"`
// ModifierDesc Rate Modifier Description. Example- "Origin Modifier".
ModifierDesc string `json:"ModifierDesc"`
// ModifierType Rate Modifier Type. Example- "ORM".
ModifierType string `json:"ModifierType"`
}
NegotiatedChargesRateModifier defines model for NegotiatedCharges_RateModifier.
type NegotiatedRateChargesBaseServiceCharge ¶
type NegotiatedRateChargesBaseServiceCharge struct {
// CurrencyCode The IATA currency code associated with the base service Charge.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The value for base service charge.
MonetaryValue string `json:"MonetaryValue"`
}
NegotiatedRateChargesBaseServiceCharge defines model for NegotiatedRateCharges_BaseServiceCharge.
type NegotiatedRateChargesItemizedCharges ¶
type NegotiatedRateChargesItemizedCharges struct {
// Code Identification code for itemized charge.
Code string `json:"Code"`
// CurrencyCode The IATA currency code associated with the Itemized Charge costs for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// Description Description of Itemized Charge that had been charged.
Description *string `json:"Description,omitempty"`
// MonetaryValue The value for Itemized Charge costs associated with the shipment.
MonetaryValue string `json:"MonetaryValue"`
// SubType The sub-type of Itemized Charge type.
SubType *string `json:"SubType,omitempty"`
}
NegotiatedRateChargesItemizedCharges defines model for NegotiatedRateCharges_ItemizedCharges.
type NegotiatedRateChargesRateModifier ¶
type NegotiatedRateChargesRateModifier struct {
// Amount Amount. Example- "-1.00","0.25" It contains positive or negative values.
Amount string `json:"Amount"`
// ModifierDesc Rate Modifier Description. Example- "Origin Modifier".
ModifierDesc string `json:"ModifierDesc"`
// ModifierType Rate Modifier Type. Example- "ORM".
ModifierType string `json:"ModifierType"`
}
NegotiatedRateChargesRateModifier defines model for NegotiatedRateCharges_RateModifier.
type NegotiatedRateChargesTaxCharges ¶
type NegotiatedRateChargesTaxCharges struct {
// MonetaryValue Tax Monetary Value represent the Tax amount. Valid values are from 0 to 99999999999999.99
MonetaryValue string `json:"MonetaryValue"`
// Type Tax Type code. The code represents the type of Tax applied to a shipment. Please refer to Appendix I for possible Tax Type codes.
Type string `json:"Type"`
}
NegotiatedRateChargesTaxCharges defines model for NegotiatedRateCharges_TaxCharges.
type NegotiatedRateChargesTotalCharge ¶
type NegotiatedRateChargesTotalCharge struct {
// CurrencyCode The IATA currency code associated with the Negotiated Rate total charges for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The value for the Negotiated Rate total charges associated with the shipment.
MonetaryValue string `json:"MonetaryValue"`
}
NegotiatedRateChargesTotalCharge Total Charges Container.
type NegotiatedRateChargesTotalChargesWithTaxes ¶
type NegotiatedRateChargesTotalChargesWithTaxes struct {
// CurrencyCode TotalChargesWithTaxes currency code type. The currency code used in the Shipment request is returned.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue TotalChargesWithTaxes monetary value amount. Valid values are from 0 to 99999999999999.99
MonetaryValue string `json:"MonetaryValue"`
}
NegotiatedRateChargesTotalChargesWithTaxes TotalChargesWithTaxes container would be returned only if TaxInformationIndicator is present in request. TotalChargesWithTaxes contains total charges including total taxes applied to a shipment.
type PackageCommodity ¶
type PackageCommodity struct {
// FreightClass Freight Classification. Freight class partially determines the freight rate for the article. See Appendix of the Rating Ground Freight Web Services Developers Guide for list of Freight classes. For GFP Only.
FreightClass string `json:"FreightClass"`
// NMFC NMFC Commodity container. For GFP Only.
NMFC *CommodityNMFC `json:"NMFC,omitempty"`
}
PackageCommodity Commodity Container. Required only for GFP rating when FRSShipmentIndicator is requested.
type PackageDimWeight ¶
type PackageDimWeight struct {
// UnitOfMeasurement UnitOfMeasurement Container.
UnitOfMeasurement *DimWeightUnitOfMeasurement `json:"UnitOfMeasurement,omitempty"`
// Weight Dimensional weight of the package. Decimal values are not accepted, however there is one implied decimal place for values in this field (i.e. 115 = 11.5).
Weight *string `json:"Weight,omitempty"`
}
PackageDimWeight Package Dimensional Weight container. Values in this container are ignored when package dimensions are provided. Please visit ups.com for instructions on calculating this value. Only used for non-US/CA/PR shipments.
type PackageDimensions ¶
type PackageDimensions struct {
// Height Height of the package used to determine dimensional weight. Required for GB to GB and Poland to Poland shipments.
//
// 6 digits in length with 2 digits of significance after the decimal point.
Height string `json:"Height"`
// Length Length of the package used to determine dimensional weight. Required for GB to GB and Poland to Poland shipments.
//
// 6 digits in length with 2 digits of significance after the decimal point.
Length string `json:"Length"`
// UnitOfMeasurement UnitOfMeasurement container.
UnitOfMeasurement DimensionsUnitOfMeasurement `json:"UnitOfMeasurement"`
// Width Width of the package used to determine dimensional weight. Required for GB to GB and Poland to Poland shipments.
//
// 6 digits in length with 2 digits of significance after the decimal point.
Width string `json:"Width"`
}
PackageDimensions Dimensions Container. This container is not applicable for GFP Rating request. Required for Heavy Goods service. Package Dimension will be ignored for Simple Rate
type PackagePackageServiceOptions ¶
type PackagePackageServiceOptions struct {
// AccessPointCOD Access Point COD indicates Package COD is requested for a shipment. Valid only for : 01 - Hold For Pickup At UPS Access Point, Shipment Indication type. Package Access Point COD is valid only for shipment without return service from US/PR to US/PR and CA to CA. Not valid with (Package) COD.
AccessPointCOD *PackageServiceOptionsAccessPointCOD `json:"AccessPointCOD,omitempty"`
// COD COD Container. Indicates COD is requested. Valid for the following country or territory combinations: US/PR to US/PRCA to CACA to USNot allowed for CA to US for packages that are designated as Letters or Envelopes.
COD *PackageServiceOptionsCOD `json:"COD,omitempty"`
// DeclaredValue Declared Value Container.
DeclaredValue *PackageServiceOptionsDeclaredValue `json:"DeclaredValue,omitempty"`
// DeliveryConfirmation Delivery Confirmation Container. For a list of valid origin/destination countries or territories please refer to appendix. DeliveryConfirmation and COD are mutually exclusive.
DeliveryConfirmation *PackageServiceOptionsDeliveryConfirmation `json:"DeliveryConfirmation,omitempty"`
// DryIce Container to hold Dry Ice information. Lane check will happen based on postal code/ city.
DryIce *PackageServiceOptionsDryIce `json:"DryIce,omitempty"`
// HazMat Container to hold HazMat information. Applies only if SubVersion is greater than or equal to 1701.
HazMat *PackageServiceOptionsHazMat `json:"HazMat,omitempty"`
// Insurance Insurance Accesorial. Only one type of insurance can exist at a time on the shipment. Valid for UPS World Wide Express Freight shipments.
Insurance *PackageServiceOptionsInsurance `json:"Insurance,omitempty"`
// ProactiveIndicator Any value associated with this element will be ignored. If present, the package is rated for UPS Proactive Response and proactive package tracking.Contractual accessorial for health care companies to allow package monitoring throughout the UPS system. Shippers account needs to have valid contract for UPS Proactive Response.
ProactiveIndicator *string `json:"ProactiveIndicator,omitempty"`
// RefrigerationIndicator Presence/Absence Indicator. Any value is ignored. If present, indicates that the package contains an item that needs refrigeration. Shippers account needs to have a valid contract for Refrigeration.
RefrigerationIndicator *string `json:"RefrigerationIndicator,omitempty"`
// ShipperDeclaredValue Shipper Paid Declared Value Charge at Package level. Valid for UPS World Wide Express Freight shipments.
ShipperDeclaredValue *PackageServiceOptionsShipperDeclaredValue `json:"ShipperDeclaredValue,omitempty"`
// ShipperReleaseIndicator The presence indicates that the package may be released by driver without a signature from the consignee. Empty Tag. Only available for US50/PR to US50/PR packages without return service.
ShipperReleaseIndicator *string `json:"ShipperReleaseIndicator,omitempty"`
// UPSPremiumCareIndicator The UPSPremiumCareIndicator indicates special handling is required for shipment having controlled substances. Empty Tag means indicator is present.
//
// Valid only for Canada to Canada movements.
//
// Available for the following Return Services:
// - Returns Exchange (available with a contract)
// - Print Return Label
// - Print and Mail
// - Electronic Return Label
// - Return Service Three Attempt
//
// May be requested with following UPS services:
// - UPS Express® Early
// - UPS Express
// - UPS Express Saver
// - UPS Standard.
//
// Not available for packages with the following:
// - Delivery Confirmation - Signature Required
// - Delivery Confirmation - Adult Signature Required.
UPSPremiumCareIndicator *string `json:"UPSPremiumCareIndicator,omitempty"`
}
PackagePackageServiceOptions PackageServiceOptions container.
type PackagePackageWeight ¶
type PackagePackageWeight struct {
// UnitOfMeasurement UnitOfMeasurement Container.
UnitOfMeasurement PackageWeightUnitOfMeasurement `json:"UnitOfMeasurement"`
// Weight Actual package weight. Weight accepted for letters/envelopes.
Weight string `json:"Weight"`
}
PackagePackageWeight Package Weight Container. Required for an GFP Rating request. Otherwise optional. Required for Heavy Goods service. Package Weight will be ignored for Simple Rate
type PackagePackagingType ¶
type PackagePackagingType struct {
// Code The code for the UPS packaging type associated with the package. Valid values:
// - 00 - UNKNOWN
// - 01 - UPS Letter
// - 02 - Package
// - 03 - Tube
// - 04 - Pak
// - 21 - Express Box
// - 24 - 25KG Box
// - 25 - 10KG Box
// - 30 - Pallet
// - 2a - Small Express Box
// - 2b - Medium Express Box
// - 2c - Large Express Box.
//
// For FRS rating requests the only valid value is customer supplied packaging “02”.
Code string `json:"Code"`
// Description A text description of the code for the UPS packaging type associated with the shipment. Length is not validated.
Description *string `json:"Description,omitempty"`
}
PackagePackagingType Packaging Type Container.
type PackageServiceOptionsAccessPointCOD ¶
type PackageServiceOptionsAccessPointCOD struct {
// CurrencyCode Access Point COD Currency Code. Required if Access Point COD container is present. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue Access Point COD Monetary Value. Required if Access Point COD container is present.
//
// 8 digits prior to the decimal place and 2 after.
MonetaryValue string `json:"MonetaryValue"`
}
PackageServiceOptionsAccessPointCOD Access Point COD indicates Package COD is requested for a shipment. Valid only for : 01 - Hold For Pickup At UPS Access Point, Shipment Indication type. Package Access Point COD is valid only for shipment without return service from US/PR to US/PR and CA to CA. Not valid with (Package) COD.
type PackageServiceOptionsCOD ¶
type PackageServiceOptionsCOD struct {
// CODAmount CODAmount Container.
CODAmount CODCODAmount `json:"CODAmount"`
// CODFundsCode Indicates the type of funds that will be used for the C.O.D. payment. For valid values, refer to Rating and Shipping COD Supported Countries or Territories in the Appendix.
CODFundsCode string `json:"CODFundsCode"`
}
PackageServiceOptionsCOD COD Container. Indicates COD is requested. Valid for the following country or territory combinations: US/PR to US/PRCA to CACA to USNot allowed for CA to US for packages that are designated as Letters or Envelopes.
type PackageServiceOptionsDeclaredValue ¶
type PackageServiceOptionsDeclaredValue struct {
// CurrencyCode The IATA currency code associated with the declared value amount for the package. Required if a value for the package declared value amount exists in the MonetaryValue tag. Must match one of the IATA currency codes. Length is not validated. UPS does not support all international currency codes. Refer to Currency Codes in the Appendix for a list of valid codes.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The monetary value for the declared value amount associated with the package. Max value of 5,000 USD for Local and 50,000 USD for Remote. Absolute maximum value is 21474836.47
MonetaryValue string `json:"MonetaryValue"`
}
PackageServiceOptionsDeclaredValue Declared Value Container.
type PackageServiceOptionsDeliveryConfirmation ¶
type PackageServiceOptionsDeliveryConfirmation struct {
// DCISType Type of delivery confirmation. Valid values: 1 - Unsupported 2 - Delivery Confirmation Signature Required 3 - Delivery Confirmation Adult Signature Required
DCISType string `json:"DCISType"`
}
PackageServiceOptionsDeliveryConfirmation Delivery Confirmation Container. For a list of valid origin/destination countries or territories please refer to appendix. DeliveryConfirmation and COD are mutually exclusive.
type PackageServiceOptionsDryIce ¶
type PackageServiceOptionsDryIce struct {
// AuditRequired Presence/Absence Indicator. Any value inside is ignored. Indicates a Dry Ice audit will be performed per the Regulation Set requirements. Empty tag means indicator is present.
AuditRequired *string `json:"AuditRequired,omitempty"`
// DryIceWeight Container for Weight information for Dry Ice.
DryIceWeight DryIceDryIceWeight `json:"DryIceWeight"`
// MedicalUseIndicator Presence/Absence Indicator. Any value inside is ignored. Relevant only in CFR regulation set. If present it is used to designate the Dry Ice is for any medical use and rates are adjusted for DryIce weight more than 2.5 KGS or 5.5 LBS.
MedicalUseIndicator *string `json:"MedicalUseIndicator,omitempty"`
// RegulationSet Regulation set for DryIce Shipment. Valid values: CFR = For HazMat regulated by US Dept of Transportation within the U.S. or ground shipments to Canada, IATA = For Worldwide Air movement, ADR = For EMEA Ground movement on Standard service. The following values are valid: CFR, IATA and ADR.
RegulationSet string `json:"RegulationSet"`
}
PackageServiceOptionsDryIce Container to hold Dry Ice information. Lane check will happen based on postal code/ city.
type PackageServiceOptionsHazMat ¶
type PackageServiceOptionsHazMat struct {
// AllPackedInOneIndicator Presence/Absence Indicator. Any value is ignored. Indicates the hazmat shipment/package is all packed in one. Applies only if SubVersion is greater than or equal to 1701.
AllPackedInOneIndicator *string `json:"AllPackedInOneIndicator,omitempty"`
HazMatChemicalRecord []HazMatHazMatChemicalRecord `json:"HazMatChemicalRecord"`
// OverPackedIndicator Presence/Absence Indicator. Any value is ignored. Presence indicates that shipment is overpack. Applies only if SubVersion is greater than or equal to 1701.
OverPackedIndicator *string `json:"OverPackedIndicator,omitempty"`
// PackageIdentifier Identifies the package containing Dangerous Goods. Required if SubVersion is greater than or equal to 1701.
PackageIdentifier *string `json:"PackageIdentifier,omitempty"`
// QValue QValue is required when a HazMat shipment specifies AllPackedInOneIndicator and the regulation set for that shipment is IATA. Applies only if SubVersion is greater than or equal to 1701. Valid values are : 0.1; 0.2; 0.3; 0.4; 0.5; 0.6; 0.7; 0.8; 0.9; 1.0
QValue *string `json:"QValue,omitempty"`
}
PackageServiceOptionsHazMat Container to hold HazMat information. Applies only if SubVersion is greater than or equal to 1701.
type PackageServiceOptionsInsurance ¶
type PackageServiceOptionsInsurance struct {
// BasicFlexibleParcelIndicator Container to hold Basic Flexible Parcel Indicator information. Valid for UPS World Wide Express Freight shipments.
BasicFlexibleParcelIndicator *InsuranceBasicFlexibleParcelIndicator `json:"BasicFlexibleParcelIndicator,omitempty"`
// ExtendedFlexibleParcelIndicator Container for Extended Flexible Parcel Indicator Valid for UPS World Wide Express Freight shipments.
ExtendedFlexibleParcelIndicator *InsuranceExtendedFlexibleParcelIndicator `json:"ExtendedFlexibleParcelIndicator,omitempty"`
PackageProtection *InsurancePackageProtection `json:"PackageProtection,omitempty"`
// TimeInTransitFlexibleParcelIndicator Container to hold Time In Transit Flexible Parcel Indicator information. Valid for UPS World Wide Express Freight shipments.
TimeInTransitFlexibleParcelIndicator *InsuranceTimeInTransitFlexibleParcelIndicator `json:"TimeInTransitFlexibleParcelIndicator,omitempty"`
}
PackageServiceOptionsInsurance Insurance Accesorial. Only one type of insurance can exist at a time on the shipment. Valid for UPS World Wide Express Freight shipments.
type PackageServiceOptionsShipperDeclaredValue ¶
type PackageServiceOptionsShipperDeclaredValue struct {
// CurrencyCode The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The monetary value for the amount associated with the package.
MonetaryValue string `json:"MonetaryValue"`
}
PackageServiceOptionsShipperDeclaredValue Shipper Paid Declared Value Charge at Package level. Valid for UPS World Wide Express Freight shipments.
type PackageSimpleRate ¶
type PackageSimpleRate struct {
// Code Simple Rate Package Size Valid values: XS - Extra Small S - Small M - Medium L - Large XL - Extra Large
Code string `json:"Code"`
// Description Simple Rate Package Size Description
Description *string `json:"Description,omitempty"`
}
PackageSimpleRate SimpleRate Container
type PackageUPSPremier ¶
type PackageUPSPremier struct {
// Category UPS Premier Category Valid values are 01,02,03 UPS Premier Silver - 01 UPS Premier Gold - 02 UPS Premier Platinum - 03
Category string `json:"Category"`
}
PackageUPSPremier UPS Premier
type PackageWeightUnitOfMeasurement ¶
type PackageWeightUnitOfMeasurement struct {
// Code Code representing the unit of measure associated with the package weight.
//
// Unit of Measurement "OZS" is the only valid UOM for Worldwide Economy DDU Shipments.
//
// Valid values:
// - LBS - Pounds (default)
// - KGS - Kilograms
// - OZS - Ounces
Code string `json:"Code"`
// Description Text description of the code representing the unit of measure associated with the package weight. Length and value are not validated.
Description string `json:"Description"`
}
PackageWeightUnitOfMeasurement UnitOfMeasurement Container.
type PaymentDetailsShipmentCharge ¶
type PaymentDetailsShipmentCharge struct {
// BillReceiver Container for the BillReceiver billing option. This element or its sibling element, BillShipper, BillThirdParty or Consignee Billed, must be present but no more than one can be present. For a return shipment, Bill Receiver is invalid for Transportation charges.
BillReceiver *ShipmentChargeBillReceiver `json:"BillReceiver,omitempty"`
// BillShipper Container for the BillShipper billing option. This element or its sibling element, BillReceiver, BillThirdParty or ConsigneeBilledIndicator, must be present but no more than one can be present.
BillShipper *ShipmentChargeBillShipper `json:"BillShipper,omitempty"`
// BillThirdParty Container for the third party billing option. This element or its sibling element, BillShipper, BillReceiver or Consignee Billed, must be present but no more than one can be present.
BillThirdParty *ShipmentChargeBillThirdParty `json:"BillThirdParty,omitempty"`
// ConsigneeBilledIndicator Consignee Billing payment option indicator. The presence indicates consignee billing option is selected. The absence indicates one of the other payment options is selected. Empty Tag. This element or its sibling element, BillShipper, BillReceiver or BillThirdParty, must be present but no more than one can be present. This billing option is valid for a shipment charge type of Transportation only. Only applies to US/PR and PR/US shipment origins and destination.
ConsigneeBilledIndicator *string `json:"ConsigneeBilledIndicator,omitempty"`
// Type Values are 01 = Transportation, 02 = Duties and Taxes
Type string `json:"Type"`
}
PaymentDetailsShipmentCharge Shipment charge container. If Duty and Tax charges are applicable to a shipment and a payer is not specified, the default payer of Duty and Tax charges is Bill to Receiver. There will be no default payer of Duty and Tax charges for DDU and DDP service.
type RATERequestWrapper ¶
type RATERequestWrapper struct {
// RateRequest Rate Request container.
RateRequest RateRequest `json:"RateRequest"`
}
RATERequestWrapper N/A
type RATEResponseWrapper ¶
type RATEResponseWrapper struct {
// RateResponse Rate Response Container.
RateResponse RateResponse `json:"RateResponse"`
}
RATEResponseWrapper N/A
type RateOpJSONRequestBody ¶
type RateOpJSONRequestBody = RATERequestWrapper
RateOpJSONRequestBody defines body for RateOp for application/json ContentType.
type RateOpParams ¶
type RateOpParams struct {
// Additionalinfo Valid Values: timeintransit = The server rates with transit time information combined with requestoption in URL.Rate is the only valid request option for Ground Freight Pricing requests. Length 15
Additionalinfo *string `form:"additionalinfo,omitempty" json:"additionalinfo,omitempty"`
// TransId An identifier unique to the request. Length 32
TransId *string `json:"transId,omitempty"`
// TransactionSrc An identifier of the client/source application that is making the request.Length 512
TransactionSrc *string `json:"transactionSrc,omitempty"`
}
RateOpParams defines parameters for RateOp.
type RateOpResponse ¶
type RateOpResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *RATEResponseWrapper
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON403 *ErrorResponse
JSON429 *ErrorResponse
}
func ParseRateOpResponse ¶
func ParseRateOpResponse(rsp *http.Response) (*RateOpResponse, error)
ParseRateOpResponse parses an HTTP response from a RateOpWithResponse call
func (RateOpResponse) Status ¶
func (r RateOpResponse) Status() string
Status returns HTTPResponse.Status
func (RateOpResponse) StatusCode ¶
func (r RateOpResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RateRequest ¶
type RateRequest struct {
// CustomerClassification Customer classification container. Valid if ShipFrom country or territory is "US"
CustomerClassification *RateRequestCustomerClassification `json:"CustomerClassification,omitempty"`
// PickupType Pickup Type container tag.
PickupType *RateRequestPickupType `json:"PickupType,omitempty"`
// Request Request container. N/A
Request RateRequestRequest `json:"Request"`
// Shipment Container for Shipment Information.
Shipment RateRequestShipment `json:"Shipment"`
}
RateRequest Rate Request container.
type RateRequestCustomerClassification ¶
type RateRequestCustomerClassification struct {
// Code Customer classification code. Valid values:00 - Rates Associated with Shipper Number01 - Daily Rates04 - Retail Rates05 - Regional Rates06 - General List Rates53 - Standard List RatesLength is not validated.If customer classification code is not a valid value please refer to Rate Types Table on page 11.
Code string `json:"Code"`
// Description Customer classification description of the code above. Ignored if provided in the Request. Length is not validated.
Description *string `json:"Description,omitempty"`
}
RateRequestCustomerClassification Customer classification container. Valid if ShipFrom country or territory is "US"
type RateRequestPickupType ¶
type RateRequestPickupType struct {
// Code Pickup Type Code. Valid values: 01 - Daily Pickup (Default - used when an invalid pickup type code is provided)03 - Customer Counter06 - One Time Pickup19 - Letter Center20 - Air Service CenterLength is not validated. When negotiated rates are requested, 07 (onCallAir) will be ignored.Refer to the Rate Types Table in the Appendix for rate type based on Pickup Type and Customer Classification Code.
Code string `json:"Code"`
// Description Pickup Type Description. Ignored if provided in the Request.
Description *string `json:"Description,omitempty"`
}
RateRequestPickupType Pickup Type container tag.
type RateRequestRequest ¶
type RateRequestRequest struct {
// SubVersion Indicates Rate API to display the new release features in Rate API response based on Rate release. See the What's New section for the latest Rate release. Supported values: 1601, 1607, 1701, 1707, 2108, 2205,2407,2409
SubVersion *string `json:"SubVersion,omitempty"`
// TransactionReference TransactionReference identifies transactions between client and server.
TransactionReference *RequestTransactionReference `json:"TransactionReference,omitempty"`
}
RateRequestRequest Request container. N/A
type RateRequestShipment ¶
type RateRequestShipment struct {
// AlternateDeliveryAddress Alternate Delivery Address container. Applies for deliveries to UPS Access Point™ locations.
//
// Required for the following ShipmentIndicationType values:
// - 01 - Hold for Pickup at UPS Access Point™
// - 02 - UPS Access Point™ Delivery
AlternateDeliveryAddress *ShipmentAlternateDeliveryAddress `json:"AlternateDeliveryAddress,omitempty"`
// DeliveryTimeInformation Container for requesting Time In Transit Information. Required to view time in transit information. Required to view any time in transit information.
DeliveryTimeInformation *ShipmentDeliveryTimeInformation `json:"DeliveryTimeInformation,omitempty"`
// DocumentsOnlyIndicator Valid values are Document and Non-document. If the indicator is present then the value is Document else Non-Document. Note: Not applicable for FRS rating requests. Empty Tag.
DocumentsOnlyIndicator *string `json:"DocumentsOnlyIndicator,omitempty"`
// FRSPaymentInformation UPS Ground Freight Pricing (GFP) Payment Information container. Required only for GFP and when the FRSIndicator is present.
FRSPaymentInformation *ShipmentFRSPaymentInformation `json:"FRSPaymentInformation,omitempty"`
// FreightShipmentInformation Container to hold Freight Shipment information.
FreightShipmentInformation *ShipmentFreightShipmentInformation `json:"FreightShipmentInformation,omitempty"`
// GoodsNotInFreeCirculationIndicator Goods Not In Free Circulation indicator. This is an empty tag, any value inside is ignored. This indicator is invalid for a package type of UPS Letter and DocumentsOnly.
GoodsNotInFreeCirculationIndicator *string `json:"GoodsNotInFreeCirculationIndicator,omitempty"`
// InvoiceLineTotal Container to hold InvoiceLineTotal Information. Required if the shipment is from US/PR Outbound to non US/PR destination with the PackagingType of UPS PAK(04).Required for international shipments when using request option "ratetimeintransit" or "shoptimeintransit".
InvoiceLineTotal *ShipmentInvoiceLineTotal `json:"InvoiceLineTotal,omitempty"`
// MasterCartonIndicator Presence/Absence Indicator. Any value inside is ignored. MasterCartonIndicator is an indicator and presence implies that shipment is Master Carton type. If present, the shipment will be rated as a Master Carton Type. If this indicator is requested with NegotiatedRatesIndicator, rates would be returned only for Negotiated Rates and not for Published Rates.
MasterCartonIndicator *string `json:"MasterCartonIndicator,omitempty"`
// NumOfPieces Total number of pieces in all pallets. Required for UPS Worldwide Express Freight and UPS Worldwide Express Freight Midday shipments.
NumOfPieces *string `json:"NumOfPieces,omitempty"`
// OriginRecordTransactionTimestamp The time that the request was made from the originating system. UTC time down to milliseconds. Example - 2016-07-14T12:01:33.999 Applicable only for HazMat request and with subversion greater than or equal to 1701.
OriginRecordTransactionTimestamp *string `json:"OriginRecordTransactionTimestamp,omitempty"`
Package []ShipmentPackage `json:"Package"`
// PaymentDetails Payment details container for detailed shipment charges. The two shipment charges that are available for specification are Transportation charges and Duties and Taxes. This container is used for Who Pays What functionality.
PaymentDetails *ShipmentPaymentDetails `json:"PaymentDetails,omitempty"`
// PromotionalDiscountInformation PromotionalDiscountInformation container. This container contains discount information that the customer wants to request each time while placing a shipment.
PromotionalDiscountInformation *ShipmentPromotionalDiscountInformation `json:"PromotionalDiscountInformation,omitempty"`
// RatingMethodRequestedIndicator Presence/Absence Indicator. Any value inside is ignored. RatingMethodRequestedIndicator is an indicator. If present, Billable Weight Calculation method and Rating Method information would be returned in response.
RatingMethodRequestedIndicator *string `json:"RatingMethodRequestedIndicator,omitempty"`
// Service Service Container. Only valid with RequestOption = Rate for both Small package and GFP Rating requests.
Service *ShipmentService `json:"Service,omitempty"`
// ShipFrom Ship From Container.
ShipFrom *ShipmentShipFrom `json:"ShipFrom,omitempty"`
// ShipTo Ship To Container
ShipTo ShipmentShipTo `json:"ShipTo"`
ShipmentIndicationType *[]ShipmentShipmentIndicationType `json:"ShipmentIndicationType,omitempty"`
// ShipmentRatingOptions Shipment Rating Options container.
ShipmentRatingOptions *ShipmentShipmentRatingOptions `json:"ShipmentRatingOptions,omitempty"`
// ShipmentServiceOptions Shipment level Accessorials are included in this container.
ShipmentServiceOptions *ShipmentShipmentServiceOptions `json:"ShipmentServiceOptions,omitempty"`
// ShipmentTotalWeight Shipment Total Weight Container. This container is only applicable for "ratetimeintransit" and "shoptimeintransit" request options. Required for all international shipments when retreiving time in transit information, including letters and documents shipments.
ShipmentTotalWeight *ShipmentShipmentTotalWeight `json:"ShipmentTotalWeight,omitempty"`
// Shipper Shipper container. Information associated with the UPS account number.
Shipper ShipmentShipper `json:"Shipper"`
// TaxInformationIndicator Presence/Absence Indicator. Any value inside is ignored. TaxInformationIndicator is an indicator. The Tax related information includes any type of Taxes, corresponding Monetary Values, Total Charges with Taxes and disclaimers (if applicable) would be returned in response. If present, any taxes that may be applicable to a shipment would be returned in response. If this indicator is requested with NegotiatedRatesIndicator, Tax related information, if applicable, would be returned only for Negotiated Rates and not for Published Rates.
TaxInformationIndicator *string `json:"TaxInformationIndicator,omitempty"`
// WWEShipmentIndicator Presence/Absence Indicator. Any value inside is ignored. WWEShipmentIndicator is an indicator and presence implies that WWE service details requested for RequestOption=Shop or RequestOption=Shoptimeintransit RequestOption=Shop or RequestOption=Shoptimeintransit
WWEShipmentIndicator *string `json:"WWEShipmentIndicator,omitempty"`
}
RateRequestShipment Container for Shipment Information.
type RateResponse ¶
type RateResponse struct {
// RatedShipment RatedShipment Container.
//
// **NOTE:** For versions >= v2409, this element will always be returned as an array. For requests using versions < v2409, this element will be returned as an array if there is more than one object and a single object if there is only 1.
RatedShipment []RateResponseRatedShipment `json:"RatedShipment"`
// Response Response Container.
Response RateResponseResponse `json:"Response"`
}
RateResponse Rate Response Container.
type RateResponseRatedShipment ¶
type RateResponseRatedShipment struct {
// BaseServiceCharge Base Service Charge Container. These charges would be returned only when subversion is greater than or equal to 1701
BaseServiceCharge *RatedShipmentBaseServiceCharge `json:"BaseServiceCharge,omitempty"`
// BillableWeightCalculationMethod Indicates whether the billable weight calculation method is utilized at the package or shipment level. This information will be returned only if RatingMethodRequestedIndicator is present in the request. Possible values:01 = Shipment Billable Weight02 = Package Billable Weight
BillableWeightCalculationMethod *string `json:"BillableWeightCalculationMethod,omitempty"`
// BillingWeight Billing Weight Container.
BillingWeight RatedShipmentBillingWeight `json:"BillingWeight"`
// Disclaimer Disclaimer is used to provide more information to the shipper regarding the processed shipment. It is used to notify the shipper about possible taxes and duties that might have been added or might apply to the shipment. Refer to the Appendix for various disclaimers. This field may be returned only if TaxInformationIndicator is present in the request.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
Disclaimer *[]RatedShipmentDisclaimer `json:"Disclaimer,omitempty"`
// FRSShipmentData FRSShipmentData container. Only returned when the FRSShipmentIIndicator is used. UPS Ground Freight Pricing Only.
FRSShipmentData *RatedShipmentFRSShipmentData `json:"FRSShipmentData,omitempty"`
// GuaranteedDelivery Guaranteed Delivery Container.
GuaranteedDelivery *RatedShipmentGuaranteedDelivery `json:"GuaranteedDelivery,omitempty"`
// ItemizedCharges Itemized Charges are returned only when the subversion element is present and greater than or equal to '1601'. These charges would be returned only when subversion is greater than or equal to 1601.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
ItemizedCharges *[]RatedShipmentItemizedCharges `json:"ItemizedCharges,omitempty"`
// NegotiatedRateCharges Negotiated Rate Charges Container. For tiered rates and promotional discounts, if a particular shipment based on zone, origin, destination or even shipment size doesn't qualify for the existing discount then no negotiated rates container will be returned. Published rates will be the applicable rate.
NegotiatedRateCharges *RatedShipmentNegotiatedRateCharges `json:"NegotiatedRateCharges,omitempty"`
// RateChart Rate Type with which Shipment is rated. Possible RateChart values for different regions will be:
//
// US 48 origin:
// - 1 – Daily Rates
// - 3 – Standard List Rates
// - 4 – Retail Rates.
//
// Alaska/Hawaii origin:
// - 1 – Daily Rates
// - 3 – Standard List Rates
// - 4 – Retail Rates.
//
// All Other origins:
// - 1 – Rates
// - 5 - Regional Rates
// - 6 - General List Rates.
// - 3 and 4 do not apply
RateChart *string `json:"RateChart,omitempty"`
// RatedPackage Rated Package Container.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
RatedPackage []RatedShipmentRatedPackage `json:"RatedPackage"`
// RatedShipmentAlert Rated Shipment Alert container. There can be zero to many RatedShipmentAlert containers with code and description.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
RatedShipmentAlert *[]RatedShipmentRatedShipmentAlert `json:"RatedShipmentAlert,omitempty"`
// RatingMethod Indicates whether the Shipment was rated at the shipment-level or the package-level. This information will be returned only if RatingMethodRequestedIndicator is present in the request. Possible values:01 = Shipment level02 = Package level
RatingMethod *string `json:"RatingMethod,omitempty"`
// RoarRatedIndicator Informational only
RoarRatedIndicator *string `json:"RoarRatedIndicator,omitempty"`
// Service Service Container.
Service RatedShipmentService `json:"Service"`
// ServiceOptionsCharges Service Options Charges Container.
ServiceOptionsCharges RatedShipmentServiceOptionsCharges `json:"ServiceOptionsCharges"`
// TaxCharges TaxCharges container are returned only when TaxInformationIndicator is present in request and when Negotiated Rates are not applicable. TaxCharges container contains Tax information for a given shipment.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
TaxCharges *[]RatedShipmentTaxCharges `json:"TaxCharges,omitempty"`
// TimeInTransit Container for returned Time in Transit information. Will only be returned if request option was either "ratetimeintransit" or "shoptimeintransit" and DeliveryTimeInformation container was present in request.
TimeInTransit *RatedShipmentTimeInTransit `json:"TimeInTransit,omitempty"`
// TotalCharges Total Charges Container.
TotalCharges RatedShipmentTotalCharges `json:"TotalCharges"`
// TotalChargesWithTaxes TotalChargesWithTaxes container would be returned only if TaxInformationIndicator is present in request and when Negotiated Rates are not applicable. TotalChargesWithTaxes contains total charges including total taxes applied to a shipment.
TotalChargesWithTaxes *RatedShipmentTotalChargesWithTaxes `json:"TotalChargesWithTaxes,omitempty"`
// TransportationCharges Transportation Charges Container.
TransportationCharges RatedShipmentTransportationCharges `json:"TransportationCharges"`
// Zone The Zone field will be returned in the Rate API response only when the latest subversion 2409 or greater
Zone *string `json:"Zone,omitempty"`
}
RateResponseRatedShipment defines model for RateResponse_RatedShipment.
type RateResponseResponse ¶
type RateResponseResponse struct {
// Alert Alert Container. There can be zero to many alert containers with code and description.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
Alert *[]ResponseAlert `json:"Alert,omitempty"`
// AlertDetail Alert Detail Container. Currently applies to and returned only for request containing HazMat and SubVersion greater than or equal to 1701.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
AlertDetail *[]ResponseAlertDetail `json:"AlertDetail,omitempty"`
// ResponseStatus Response Status Container.
ResponseStatus ResponseResponseStatus `json:"ResponseStatus"`
// TransactionReference Transaction Reference Container.
TransactionReference *ResponseTransactionReference `json:"TransactionReference,omitempty"`
}
RateResponseResponse Response Container.
type RatedPackageAccessorial ¶
type RatedPackageAccessorial struct {
// Code Code for Accessorial Indicator.
Code string `json:"Code"`
// Description Description for Accessorial Indicator.
Description *string `json:"Description,omitempty"`
}
RatedPackageAccessorial defines model for RatedPackage_Accessorial.
type RatedPackageBaseServiceCharge ¶
type RatedPackageBaseServiceCharge struct {
// CurrencyCode The IATA currency code associated with the base service charge costs for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The base value of the specific service for the shipment. This is equal to transportation charges - fuel surcharges.
MonetaryValue string `json:"MonetaryValue"`
}
RatedPackageBaseServiceCharge Base Service Charge Container. These charges would be returned only when subversion is greater than or equal to 1701
type RatedPackageBillingWeight ¶
type RatedPackageBillingWeight struct {
// UnitOfMeasurement Unit Of Measurement Container.
UnitOfMeasurement RatedPackageBillingWeightUnitOfMeasurement `json:"UnitOfMeasurement"`
// Weight The value for the billable weight associated with the package. When using a negotiated divisor different from the published UPS divisor (139 for inches and 5,000 for cm), the weight returned is based on the published divisor. Rates, however, are based on the negotiated divisor.
Weight string `json:"Weight"`
}
RatedPackageBillingWeight Billing Weight Container.
type RatedPackageBillingWeightUnitOfMeasurement ¶
type RatedPackageBillingWeightUnitOfMeasurement struct {
// Code The code associated with the unit of measure for the billable weight of a package.
Code string `json:"Code"`
// Description The Description for the Unit Of Measurement.
Description string `json:"Description"`
}
RatedPackageBillingWeightUnitOfMeasurement Unit Of Measurement Container.
type RatedPackageItemizedCharges ¶
type RatedPackageItemizedCharges struct {
// Code Identification code for itemized charge.
Code string `json:"Code"`
// CurrencyCode The IATA currency code associated with the Itemized Charge costs for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// Description Description of Itemized Charge that had been charged.
Description *string `json:"Description,omitempty"`
// MonetaryValue The value for Itemized Charge costs associated with the shipment.
MonetaryValue string `json:"MonetaryValue"`
// SubType The sub-type of Itemized Charge type.
SubType *string `json:"SubType,omitempty"`
}
RatedPackageItemizedCharges defines model for RatedPackage_ItemizedCharges.
type RatedPackageNegotiatedCharges ¶
type RatedPackageNegotiatedCharges struct {
// ItemizedCharges Negotiated Itemized Accessorial and Sur Charges. These charges would be returned only when subversion is greater than or equal to 1607.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
ItemizedCharges *[]NegotiatedChargesItemizedCharges `json:"ItemizedCharges,omitempty"`
// RateModifier RateModifier inside Negotiated charges container to hold Modifier charges at package level
//
// **Note:** Applies only if SubVersion is 2407 and greater (Rate OAuth)
RateModifier *[]NegotiatedChargesRateModifier `json:"RateModifier,omitempty"`
}
RatedPackageNegotiatedCharges Negotiated Rates container. These charges would be returned only when -1) subversion is greater than or equal to 16072) if negotiated rates were requested for GFP shipments and account number is eligible to receive negotiated rates.
type RatedPackageRateModifier ¶
type RatedPackageRateModifier struct {
// Amount Amount. Example: "-1.00","0.25". It contains positive or negative values. Applies only if SubVersion is 2205 or greater.
Amount string `json:"Amount"`
// ModifierDesc Rate Modifier Description. Example: "Origin Modifier". Applies only if SubVersion is 2205 or greater.
ModifierDesc string `json:"ModifierDesc"`
// ModifierType Rate Modifier Type. Example: "ORM". Applies only if SubVersion is 2205 or greater.
ModifierType string `json:"ModifierType"`
}
RatedPackageRateModifier defines model for RatedPackage_RateModifier.
type RatedPackageServiceOptionsCharges ¶
type RatedPackageServiceOptionsCharges struct {
// CurrencyCode The IATA currency code associated with the accessorial charges for the package.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The value for the accessorial charges associated with the package.
MonetaryValue string `json:"MonetaryValue"`
}
RatedPackageServiceOptionsCharges Service Options Charges Container.
type RatedPackageSimpleRate ¶
type RatedPackageSimpleRate struct {
// Code Simple Rate Code
// - XS = Extra Small
// - S = Small
// - M = Medium
// - L = Large
// - XL = Extra Large
Code string `json:"Code"`
}
RatedPackageSimpleRate SimpleRate will be returned if Simple Rate present in request
type RatedPackageTotalCharges ¶
type RatedPackageTotalCharges struct {
// CurrencyCode The IATA currency code associated with the total charges for the package.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The value for the total charges associated with the package.
MonetaryValue string `json:"MonetaryValue"`
}
RatedPackageTotalCharges Total Charges Container.
type RatedPackageTransportationCharges ¶
type RatedPackageTransportationCharges struct {
// CurrencyCode The IATA currency code associated with the transportation costs for the package.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The value for the transportation costs associated with the package.
MonetaryValue string `json:"MonetaryValue"`
}
RatedPackageTransportationCharges Transportation Charges Container.
type RatedShipmentBaseServiceCharge ¶
type RatedShipmentBaseServiceCharge struct {
// CurrencyCode The IATA currency code associated with the base service charge costs for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The base value of the specific service for the shipment. This is equal to transportation charges - fuel surcharges.
MonetaryValue string `json:"MonetaryValue"`
}
RatedShipmentBaseServiceCharge Base Service Charge Container. These charges would be returned only when subversion is greater than or equal to 1701
type RatedShipmentBillingWeight ¶
type RatedShipmentBillingWeight struct {
// UnitOfMeasurement Unit Of Measurement Container.
UnitOfMeasurement BillingWeightUnitOfMeasurement `json:"UnitOfMeasurement"`
// Weight The value for the billable weight associated with the shipment. When using a negotiated divisor different from the published UPS divisor (139 for inches and 5,000 for cm), the weight returned is based on the published divisor. Rates, however, are based on the negotiated divisor.
Weight string `json:"Weight"`
}
RatedShipmentBillingWeight Billing Weight Container.
type RatedShipmentDisclaimer ¶
type RatedShipmentDisclaimer struct {
// Code Code representing type of Disclaimer. Refer to the Appendix for possible code values.
Code string `json:"Code"`
// Description Disclaimer description. Please refer to Appendix for possible descriptions.
Description string `json:"Description"`
}
RatedShipmentDisclaimer defines model for RatedShipment_Disclaimer.
type RatedShipmentFRSShipmentData ¶
type RatedShipmentFRSShipmentData struct {
// FreightDensityRate FreightDensityRate container for Density based rating.
FreightDensityRate *FRSShipmentDataFreightDensityRate `json:"FreightDensityRate,omitempty"`
// HandlingUnits Handling Unit for Density based rating container.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
HandlingUnits *[]FRSShipmentDataHandlingUnits `json:"HandlingUnits,omitempty"`
// TransportationCharges Transportation Charges Container
TransportationCharges FRSShipmentDataTransportationCharges `json:"TransportationCharges"`
}
RatedShipmentFRSShipmentData FRSShipmentData container. Only returned when the FRSShipmentIIndicator is used. UPS Ground Freight Pricing Only.
type RatedShipmentGuaranteedDelivery ¶
type RatedShipmentGuaranteedDelivery struct {
// BusinessDaysInTransit The rated shipments guaranteed delivery date. Denotes UPS published guarantee times. (i.e. 3DaySelect = 3)
BusinessDaysInTransit *string `json:"BusinessDaysInTransit,omitempty"`
// DeliveryByTime The rated shipments committed delivery time.
DeliveryByTime *string `json:"DeliveryByTime,omitempty"`
// ScheduledDeliveryDate The rated shipments scheduled delivery date.
ScheduledDeliveryDate *string `json:"ScheduledDeliveryDate,omitempty"`
}
RatedShipmentGuaranteedDelivery Guaranteed Delivery Container.
type RatedShipmentItemizedCharges ¶
type RatedShipmentItemizedCharges struct {
// Code Identification code for itemized charge.
Code string `json:"Code"`
// CurrencyCode The IATA currency code associated with the Itemized Charge costs for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// Description Description of Itemized Charge that had been charged.
Description *string `json:"Description,omitempty"`
// MonetaryValue The value for Itemized Charge costs associated with the shipment.
MonetaryValue string `json:"MonetaryValue"`
// SubType The sub-type of Itemized Charge type.
SubType *string `json:"SubType,omitempty"`
}
RatedShipmentItemizedCharges defines model for RatedShipment_ItemizedCharges.
type RatedShipmentNegotiatedRateCharges ¶
type RatedShipmentNegotiatedRateCharges struct {
// BaseServiceCharge Negotiated base service charge container.These charges would be returned only when subversion is greater than or equal to 2201.
BaseServiceCharge *NegotiatedRateChargesBaseServiceCharge `json:"BaseServiceCharge,omitempty"`
// ItemizedCharges Itemized Charges are returned only when the subversion element is present and greater than or equal to '1601'. These charges would be returned only when subversion is greater than or equal to 1601.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
ItemizedCharges *[]NegotiatedRateChargesItemizedCharges `json:"ItemizedCharges,omitempty"`
// RateModifier RateModifier inside Negotiated charges container to hold Modifier charges at package level
//
// **Note:** Applies only if SubVersion is 2407 and greater (Rate OAuth)
RateModifier *[]NegotiatedRateChargesRateModifier `json:"RateModifier,omitempty"`
// TaxCharges TaxCharges container are returned only when TaxInformationIndicator is present in request. TaxCharges container contains Tax information for a given shipment.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
TaxCharges *[]NegotiatedRateChargesTaxCharges `json:"TaxCharges,omitempty"`
// TotalCharge Total Charges Container.
TotalCharge NegotiatedRateChargesTotalCharge `json:"TotalCharge"`
// TotalChargesWithTaxes TotalChargesWithTaxes container would be returned only if TaxInformationIndicator is present in request. TotalChargesWithTaxes contains total charges including total taxes applied to a shipment.
TotalChargesWithTaxes *NegotiatedRateChargesTotalChargesWithTaxes `json:"TotalChargesWithTaxes,omitempty"`
}
RatedShipmentNegotiatedRateCharges Negotiated Rate Charges Container. For tiered rates and promotional discounts, if a particular shipment based on zone, origin, destination or even shipment size doesn't qualify for the existing discount then no negotiated rates container will be returned. Published rates will be the applicable rate.
type RatedShipmentRatedPackage ¶
type RatedShipmentRatedPackage struct {
// Accessorial The container for Accessorial indicators. This information would be returned only if ItemizedChargesRequested was present during Rate request. This is valid only for UPS Worldwide Express Freight and UPS Worldwide Express Freight Mid-day service request with Dry Ice or Oversize Pallet and SubVersion greater than or equal to 1707. This is valid only for UPS Worldwide Express Freight and UPS Worldwide Express Freight Middday Service.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
Accessorial *[]RatedPackageAccessorial `json:"Accessorial,omitempty"`
// BaseServiceCharge Base Service Charge Container. These charges would be returned only when subversion is greater than or equal to 1701
BaseServiceCharge *RatedPackageBaseServiceCharge `json:"BaseServiceCharge,omitempty"`
// BillingWeight Billing Weight Container.
BillingWeight *RatedPackageBillingWeight `json:"BillingWeight,omitempty"`
// ItemizedCharges Itemized Charges are returned only when the subversion element is present and greater than or equal to '1607'. These charges would be returned only when subversion is greater than or equal to 1607.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
ItemizedCharges *[]RatedPackageItemizedCharges `json:"ItemizedCharges,omitempty"`
// NegotiatedCharges Negotiated Rates container. These charges would be returned only when -1) subversion is greater than or equal to 16072) if negotiated rates were requested for GFP shipments and account number is eligible to receive negotiated rates.
NegotiatedCharges *RatedPackageNegotiatedCharges `json:"NegotiatedCharges,omitempty"`
// RateModifier Container for returned Rate Modifier information. Applies only if SubVersion is 2205 or greater.
//
// **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1.
RateModifier *[]RatedPackageRateModifier `json:"RateModifier,omitempty"`
// ServiceOptionsCharges Service Options Charges Container.
ServiceOptionsCharges *RatedPackageServiceOptionsCharges `json:"ServiceOptionsCharges,omitempty"`
// SimpleRate SimpleRate will be returned if Simple Rate present in request
SimpleRate *RatedPackageSimpleRate `json:"SimpleRate,omitempty"`
// TotalCharges Total Charges Container.
TotalCharges *RatedPackageTotalCharges `json:"TotalCharges,omitempty"`
// TransportationCharges Transportation Charges Container.
TransportationCharges *RatedPackageTransportationCharges `json:"TransportationCharges,omitempty"`
// Weight The weight of the package in the rated Package.
Weight *string `json:"Weight,omitempty"`
}
RatedShipmentRatedPackage defines model for RatedShipment_RatedPackage.
type RatedShipmentRatedShipmentAlert ¶
type RatedShipmentRatedShipmentAlert struct {
// Code The rated shipments warning code returned by the system.
Code string `json:"Code"`
// Description The rated shipment warning Description returned by the system.
Description string `json:"Description"`
}
RatedShipmentRatedShipmentAlert defines model for RatedShipment_RatedShipmentAlert.
type RatedShipmentService ¶
type RatedShipmentService struct {
// Code The UPS service code.
Code string `json:"Code"`
// Description The UPS service Description.
Description *string `json:"Description,omitempty"`
}
RatedShipmentService Service Container.
type RatedShipmentServiceOptionsCharges ¶
type RatedShipmentServiceOptionsCharges struct {
// CurrencyCode The IATA currency code associated with the accessorial charges for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The value for the accessorial charges associated with the shipment.
MonetaryValue string `json:"MonetaryValue"`
}
RatedShipmentServiceOptionsCharges Service Options Charges Container.
type RatedShipmentTaxCharges ¶
type RatedShipmentTaxCharges struct {
// MonetaryValue Tax Monetary Value represent the Tax amount. Valid values are from 0 to 99999999999999.99
MonetaryValue string `json:"MonetaryValue"`
// Type Tax Type code. The code represents the type of Tax applied to a shipment. Please refer to Appendix I for possible Tax Type codes.
Type string `json:"Type"`
}
RatedShipmentTaxCharges defines model for RatedShipment_TaxCharges.
type RatedShipmentTimeInTransit ¶
type RatedShipmentTimeInTransit struct {
// AutoDutyCode Required output for International requests. If Documents indicator is set for Non-document a duty is automatically calculated. The possible values to be returned are: 01 - Dutiable02 - Non-Dutiable03 - Low-value04 - Courier Remission05 - Gift06 - Military07 - Exception08 - Line Release09 - Section 321 low value.
AutoDutyCode *string `json:"AutoDutyCode,omitempty"`
// Disclaimer The Disclaimer is provided based upon the origin and destination country or territory codes provided in the request document. The possible disclaimers that can be returned are available in the Service Guaranteed Disclaimers table.
Disclaimer *string `json:"Disclaimer,omitempty"`
// DocumentsOnlyIndicator If the indicator is present then the shipment was processed as Document Only.
DocumentsOnlyIndicator *string `json:"DocumentsOnlyIndicator,omitempty"`
// PackageBillType Package bill type for the shipment. Valid values:02 - Document only 03 - Non-Document04 - Pallet
PackageBillType *string `json:"PackageBillType,omitempty"`
// PickupDate The date the user requests UPS to pickup the package from the origin. Format: YYYYMMDD. In the event this Pickup date differs from the Pickup date in the Estimated Arrival Container, a warning will be returned. In the event this Pickup date differs from the Pickup date in the Estimated Arrival Container, a warning will be returned.
PickupDate string `json:"PickupDate"`
// ServiceSummary Container for all available service information.
ServiceSummary TimeInTransitServiceSummary `json:"ServiceSummary"`
}
RatedShipmentTimeInTransit Container for returned Time in Transit information. Will only be returned if request option was either "ratetimeintransit" or "shoptimeintransit" and DeliveryTimeInformation container was present in request.
type RatedShipmentTotalCharges ¶
type RatedShipmentTotalCharges struct {
// CurrencyCode The IATA currency code associated with the total charges for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The value for the total charges associated with the shipment.
MonetaryValue string `json:"MonetaryValue"`
}
RatedShipmentTotalCharges Total Charges Container.
type RatedShipmentTotalChargesWithTaxes ¶
type RatedShipmentTotalChargesWithTaxes struct {
// CurrencyCode TotalChargesWithTaxes currency code type. The currency code used in the Shipment request is returned.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue TotalChargesWithTaxes monetary value amount. Valid values are from 0 to 99999999999999.99
MonetaryValue string `json:"MonetaryValue"`
}
RatedShipmentTotalChargesWithTaxes TotalChargesWithTaxes container would be returned only if TaxInformationIndicator is present in request and when Negotiated Rates are not applicable. TotalChargesWithTaxes contains total charges including total taxes applied to a shipment.
type RatedShipmentTransportationCharges ¶
type RatedShipmentTransportationCharges struct {
// CurrencyCode The IATA currency code associated with the transportation costs for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue The value for the transportation costs associated with the shipment.
MonetaryValue string `json:"MonetaryValue"`
}
RatedShipmentTransportationCharges Transportation Charges Container.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequestTransactionReference ¶
type RequestTransactionReference struct {
// CustomerContext May be used to synchronize request/response pairs. Information in the request element is echoed back in the response.
CustomerContext *string `json:"CustomerContext,omitempty"`
}
RequestTransactionReference TransactionReference identifies transactions between client and server.
type ResponseAlert ¶
type ResponseAlert struct {
// Code Warning code returned by the system.
Code string `json:"Code"`
// Description Warning messages returned by the system.
Description string `json:"Description"`
}
ResponseAlert Alert container. There can be zero to many alert containers with code and description.
type ResponseAlertDetail ¶
type ResponseAlertDetail struct {
// Code Warning code returned by the system.
Code string `json:"Code"`
// Description Warning messages returned by the system.
Description string `json:"Description"`
// ElementLevelInformation Provides more information about the element that represents the alert.
ElementLevelInformation *AlertDetailElementLevelInformation `json:"ElementLevelInformation,omitempty"`
}
ResponseAlertDetail defines model for Response_AlertDetail.
type ResponseResponseStatus ¶
type ResponseResponseStatus struct {
// Code Identifies the success or failure of the transaction. 1 = Successful
Code string `json:"Code"`
// Description Describes Response Status Code. Returns text of "Success" for a valid request.
Description string `json:"Description"`
}
ResponseResponseStatus Response Status Container.
type ResponseTransactionReference ¶
type ResponseTransactionReference struct {
// CustomerContext The CustomerContext Information which will be echoed during response.
CustomerContext *string `json:"CustomerContext,omitempty"`
}
ResponseTransactionReference Transaction Reference Container.
type ServiceSummaryEstimatedArrival ¶
type ServiceSummaryEstimatedArrival struct {
// Arrival Container for the Time-In-Transit arrival information by service. This is the most accurate delivery information available via the Rating API and will reflect changes in delivery schedules due to peak business seasons or holidays.
Arrival EstimatedArrivalArrival `json:"Arrival"`
// BusinessDaysInTransit Number of business days from Origin to Destination Locations.
BusinessDaysInTransit string `json:"BusinessDaysInTransit"`
// CustomerCenterCutoff Customer Service call time. Returned for domestic as well as international requests.
CustomerCenterCutoff *string `json:"CustomerCenterCutoff,omitempty"`
// DayOfWeek Day of week for arrival. Valid values are: MONTUEWEDTHUFRISAT
DayOfWeek string `json:"DayOfWeek"`
// DelayCount Number of days delayed at customs. Returned for International requests.
DelayCount *string `json:"DelayCount,omitempty"`
// HolidayCount Number of National holidays during transit. Returned for International requests.
HolidayCount *string `json:"HolidayCount,omitempty"`
// Pickup The date and pick up time container.
Pickup EstimatedArrivalPickup `json:"Pickup"`
// RestDays Number of rest days, i.e. non movement. Returned for International requests.
RestDays *string `json:"RestDays,omitempty"`
// TotalTransitDays The total number of days in transit from one location to the next. Returned for International requests.
TotalTransitDays *string `json:"TotalTransitDays,omitempty"`
}
ServiceSummaryEstimatedArrival Container for the Time-In-Transit arrival information by service
type ServiceSummaryService ¶
type ServiceSummaryService struct {
// Description Optional. Description of service. Example, UPS Next Day Air, UPS Ground etc, as referenced by the Service Code.
Description *string `json:"Description,omitempty"`
}
ServiceSummaryService Container for the the UPS service selected for a shipment.
type ShipFromAddress ¶
type ShipFromAddress struct {
// AddressLine The origin street address including name and number (when applicable). Length is not validated.
AddressLine *[]string `json:"AddressLine,omitempty"`
// City Origin city. Required if country or territory does not utilize postal codes. Length is not validated.
City *string `json:"City,omitempty"`
// CountryCode Origin country or territory code. Refer to the Supported Country or Territory Tables located in the Appendix. Required, but defaults to US.
CountryCode string `json:"CountryCode"`
// PostalCode Origin postal code. Required if country or territory utilizes postal codes (e.g. US and PR).
PostalCode *string `json:"PostalCode,omitempty"`
// StateProvinceCode Origin state code. A StateProvinceCode and valid account number are required when requesting negotiated rates. Otherwise the StateProvinceCode is optional.
//
// If the TaxInformationIndicator flag is present in the request, a StateProvinceCode must be entered for tax charges to be accurately calculated in the response.
StateProvinceCode *string `json:"StateProvinceCode,omitempty"`
}
ShipFromAddress Address container for Ship From. Address Container
type ShipToAddress ¶
type ShipToAddress struct {
// AddressLine Destination street address including name and number (when applicable). Max Occurrence can be 3. Length is not validated. Note:Required if requesting Roadie Service
AddressLine []string `json:"AddressLine"`
// City Destination city. Required if country or territory does not utilize postal codes. Length is not validated.
City *string `json:"City,omitempty"`
// CountryCode Destination country or territory code. Refer to the Supported Country or Territory Tables located in the Appendix.
CountryCode string `json:"CountryCode"`
// PostalCode Destination postal code. Required if country or territory utilizes postal codes (i.e. US and PR).
PostalCode *string `json:"PostalCode,omitempty"`
// ResidentialAddressIndicator Residential Address flag. This field is a flag to indicate if the destination is a residential location. True if ResidentialAddressIndicator tag exists; false otherwise. This element does not require a value and if one is entered it will be ignored.
//
// Note: When requesting TimeInTransit information, this indicator must be passed to determine if Three Day Select or Ground shipment is eligible for Saturday Delivery at no charge. If this indicator is not present, address will be considered as commercial. Empty Tag.
ResidentialAddressIndicator *string `json:"ResidentialAddressIndicator,omitempty"`
// StateProvinceCode Destination state code.
StateProvinceCode *string `json:"StateProvinceCode,omitempty"`
}
ShipToAddress Address Container.
type ShipmentAlternateDeliveryAddress ¶
type ShipmentAlternateDeliveryAddress struct {
// Address Address container for Alternate Delivery Address.
Address AlternateDeliveryAddressAddress `json:"Address"`
// Name UPS Access Point location name.
Name *string `json:"Name,omitempty"`
}
ShipmentAlternateDeliveryAddress Alternate Delivery Address container. Applies for deliveries to UPS Access Point™ locations.
Required for the following ShipmentIndicationType values: - 01 - Hold for Pickup at UPS Access Point™ - 02 - UPS Access Point™ Delivery
type ShipmentChargeBillReceiver ¶
type ShipmentChargeBillReceiver struct {
// AccountNumber The UPS account number. The account must be a valid UPS account number that is active. For US, PR and CA accounts, the account must be a daily pickup account, an occasional account, a customer B.I.N account, or a dropper shipper account. All other accounts must be either a daily pickup account, an occasional account, a drop shipper account, or a non-shipping account.
AccountNumber string `json:"AccountNumber"`
// Address Container for additional information for the bill receiver's UPS accounts address.
Address *BillReceiverAddress `json:"Address,omitempty"`
}
ShipmentChargeBillReceiver Container for the BillReceiver billing option. This element or its sibling element, BillShipper, BillThirdParty or Consignee Billed, must be present but no more than one can be present. For a return shipment, Bill Receiver is invalid for Transportation charges.
type ShipmentChargeBillShipper ¶
type ShipmentChargeBillShipper struct {
// AccountNumber UPS account number Must be the same UPS account number as the one provided in Shipper/ShipperNumber.
AccountNumber string `json:"AccountNumber"`
}
ShipmentChargeBillShipper Container for the BillShipper billing option. This element or its sibling element, BillReceiver, BillThirdParty or ConsigneeBilledIndicator, must be present but no more than one can be present.
type ShipmentChargeBillThirdParty ¶
type ShipmentChargeBillThirdParty struct {
// AccountNumber The UPS account number of the third party shipper. The account must be a valid UPS account number that is active. For US, PR and CA accounts, the account must be either a daily pickup account, an occasional account, or a customer B.I.N account, or a drop shipper account. All other accounts must be either a daily pickup account, an occasional account, a drop shipper account, or a non-shipping account.
AccountNumber string `json:"AccountNumber"`
// Address Container for additional information for the third party UPS accounts address.
Address BillThirdPartyAddress `json:"Address"`
}
ShipmentChargeBillThirdParty Container for the third party billing option. This element or its sibling element, BillShipper, BillReceiver or Consignee Billed, must be present but no more than one can be present.
type ShipmentDeliveryTimeInformation ¶
type ShipmentDeliveryTimeInformation struct {
// PackageBillType Valid values are:
// - 02 - Document only
// - 03 - Non-Document
// - 04 - WWEF Pallet
// - 07 - Domestic Pallet
//
// If 04 is included, Worldwide Express Freight and UPS Worldwide Express Freight Midday services (if applicable) will be included in the response.
PackageBillType string `json:"PackageBillType"`
// Pickup Pickup container.
Pickup *DeliveryTimeInformationPickup `json:"Pickup,omitempty"`
ReturnContractServices *[]DeliveryTimeInformationReturnContractServices `json:"ReturnContractServices,omitempty"`
}
ShipmentDeliveryTimeInformation Container for requesting Time In Transit Information. Required to view time in transit information. Required to view any time in transit information.
type ShipmentFRSPaymentInformation ¶
type ShipmentFRSPaymentInformation struct {
// AccountNumber UPS Account Number.
AccountNumber *string `json:"AccountNumber,omitempty"`
// Address Payer Address Container. Address container may be present for FRS Payment Information type = 02 and required when the FRS Payment Information type = 03.
Address *FRSPaymentInformationAddress `json:"Address,omitempty"`
// Type GFP Payment Information Type container. GFP only.
Type FRSPaymentInformationType `json:"Type"`
}
ShipmentFRSPaymentInformation UPS Ground Freight Pricing (GFP) Payment Information container. Required only for GFP and when the FRSIndicator is present.
type ShipmentFreightShipmentInformation ¶
type ShipmentFreightShipmentInformation struct {
// DensityEligibleIndicator The presence of the tag indicates that the rate request is density based.For Density Based Rating (DBR), the customer must have DBR Contract Service.
DensityEligibleIndicator *string `json:"DensityEligibleIndicator,omitempty"`
// FreightDensityInfo Freight Density Info container. Required if DensityEligibleIndicator is present.
FreightDensityInfo *FreightShipmentInformationFreightDensityInfo `json:"FreightDensityInfo,omitempty"`
}
ShipmentFreightShipmentInformation Container to hold Freight Shipment information.
type ShipmentInvoiceLineTotal ¶
type ShipmentInvoiceLineTotal struct {
// CurrencyCode Invoice Line Total Currency type. The Currency code should match the origin country's or territory's currency code, otherwise the currency code entered will be ignored. Note: UPS doesn't support all international currency codes. Please check the developer guides for Supported Currency codes.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue Total amount of the invoice accompanying the shipment. Required when the InvoiceLineTotal container exists in the rate request. Valid values are from 1 to 99999999.
MonetaryValue string `json:"MonetaryValue"`
}
ShipmentInvoiceLineTotal Container to hold InvoiceLineTotal Information. Required if the shipment is from US/PR Outbound to non US/PR destination with the PackagingType of UPS PAK(04).Required for international shipments when using request option "ratetimeintransit" or "shoptimeintransit".
type ShipmentPackage ¶
type ShipmentPackage struct {
// AdditionalHandlingIndicator A flag indicating if the packages require additional handling. True if AdditionalHandlingIndicator tag exists; false otherwise. Additional Handling indicator indicates it's a non-corrugated package. Empty Tag.
AdditionalHandlingIndicator *string `json:"AdditionalHandlingIndicator,omitempty"`
// Commodity Commodity Container. Required only for GFP rating when FRSShipmentIndicator is requested.
Commodity *PackageCommodity `json:"Commodity,omitempty"`
// DimWeight Package Dimensional Weight container. Values in this container are ignored when package dimensions are provided. Please visit ups.com for instructions on calculating this value. Only used for non-US/CA/PR shipments.
DimWeight *PackageDimWeight `json:"DimWeight,omitempty"`
// Dimensions Dimensions Container. This container is not applicable for GFP Rating request. Required for Heavy Goods service. Package Dimension will be ignored for Simple Rate
Dimensions *PackageDimensions `json:"Dimensions,omitempty"`
// LargePackageIndicator This element does not require a value and if one is entered it will be ignored. If present, it indicates the shipment will be categorized as a Large Package.
LargePackageIndicator *string `json:"LargePackageIndicator,omitempty"`
// MinimumBillableWeightIndicator Presence/Absence Indicator. Any value inside is ignored. It indicates if packge is qualified for minimum billable weight. Applicable for UPS Worldwide Economy DDU service
MinimumBillableWeightIndicator *string `json:"MinimumBillableWeightIndicator,omitempty"`
// OversizeIndicator Presence/Absence Indicator. Any value inside is ignored. It indicates if packge is oversized. Applicable for UPS Worldwide Economy DDU service
OversizeIndicator *string `json:"OversizeIndicator,omitempty"`
// PackageServiceOptions PackageServiceOptions container.
PackageServiceOptions *PackagePackageServiceOptions `json:"PackageServiceOptions,omitempty"`
// PackageWeight Package Weight Container. Required for an GFP Rating request. Otherwise optional. Required for Heavy Goods service. Package Weight will be ignored for Simple Rate
PackageWeight *PackagePackageWeight `json:"PackageWeight,omitempty"`
// PackagingType Packaging Type Container.
PackagingType *PackagePackagingType `json:"PackagingType,omitempty"`
// SimpleRate SimpleRate Container
SimpleRate *PackageSimpleRate `json:"SimpleRate,omitempty"`
// UPSPremier UPS Premier
UPSPremier *PackageUPSPremier `json:"UPSPremier,omitempty"`
}
ShipmentPackage Package Container. Only one Package allowed for Simple Rate
type ShipmentPaymentDetails ¶
type ShipmentPaymentDetails struct {
ShipmentCharge []PaymentDetailsShipmentCharge `json:"ShipmentCharge"`
// SplitDutyVATIndicator Split Duty VAT Indicator. The presence indicates the payer specified for Transportation Charges will pay transportation charges and any duties that apply to the shipment. The payer specified for Duties and Taxes will pay the VAT (Value-Added Tax) only. Empty Tag. The payment method for Transportation charges must be UPS account. The UPS account must be a daily pickup account or an occasional account.
SplitDutyVATIndicator *string `json:"SplitDutyVATIndicator,omitempty"`
}
ShipmentPaymentDetails Payment details container for detailed shipment charges. The two shipment charges that are available for specification are Transportation charges and Duties and Taxes. This container is used for Who Pays What functionality.
type ShipmentPromotionalDiscountInformation ¶
type ShipmentPromotionalDiscountInformation struct {
// PromoAliasCode Promotion Alias code Required if PromotionalDiscountInformation container is present.
PromoAliasCode string `json:"PromoAliasCode"`
// PromoCode Promotion Code. A discount that is applied to the user. Required if PromotionalDiscountInformation container is present.
PromoCode string `json:"PromoCode"`
}
ShipmentPromotionalDiscountInformation PromotionalDiscountInformation container. This container contains discount information that the customer wants to request each time while placing a shipment.
type ShipmentService ¶
type ShipmentService struct {
// Code The code for the UPS Service associated with the shipment.
//
// NOTE: For a complete listing of values, refer to Service Codes in the Appendix
//
// Valid domestic values:
// - 01 = Next Day Air
// - 02 = 2nd Day Air
// - 03 = Ground
// - 12 = 3 Day Select
// - 13 = Next Day Air Saver
// - 14 = UPS Next Day Air Early
// - 59 = 2nd Day Air A.M.
// - 75 = UPS Heavy Goods
//
// Valid international values:
// - 07 = Worldwide Express
// - 08 = Worldwide Expedited
// - 11= Standard
// - 54 = Worldwide Express Plus
// - 65 = Saver
// - 96 = UPS Worldwide Express Freight
// - 71 = UPS Worldwide Express Freight Midday
//
// Required for Rating and ignored for Shopping.
Code string `json:"Code"`
// Description A text description of the UPS Service associated with the shipment. Length is not validated.
Description *string `json:"Description,omitempty"`
}
ShipmentService Service Container. Only valid with RequestOption = Rate for both Small package and GFP Rating requests.
type ShipmentServiceOptionsAccessPointCOD ¶
type ShipmentServiceOptionsAccessPointCOD struct {
// CurrencyCode Access Point COD Currency Code. Required if Access Point COD container is present. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue Access Point COD Monetary Value. Required if Access Point COD container is present.
//
// 8 digits prior to the decimal place and 2 after.
MonetaryValue string `json:"MonetaryValue"`
}
ShipmentServiceOptionsAccessPointCOD Access Point COD indicates Shipment level Access Point COD is requested for a shipment. Valid only for "01 - Hold For Pickup At UPS Access Point" Shipment Indication type.
Shipment Access Point COD is valid only for countries or territories within E.U.
Not valid with (Shipment) COD.
Not available to shipment with return service.
type ShipmentServiceOptionsCOD ¶
type ShipmentServiceOptionsCOD struct {
// CODAmount CODAmount Container. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
CODAmount ShipmentServiceOptionsCODCODAmount `json:"CODAmount"`
// CODFundsCode For valid values, refer to Rating and Shipping COD Supported Countries or Territories in the Appendix.
CODFundsCode string `json:"CODFundsCode"`
}
ShipmentServiceOptionsCOD If present, indicates C.O.D. is requested for the shipment. Shipment level C.O.D. is only available for EU origin countries or territories.C.O.D. shipments are only available for Shippers with Daily Pickup and Drop Shipping accounts.
type ShipmentServiceOptionsCODCODAmount ¶
type ShipmentServiceOptionsCODCODAmount struct {
// CurrencyCode COD amount currency code type.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue COD Amount.
MonetaryValue string `json:"MonetaryValue"`
}
ShipmentServiceOptionsCODCODAmount CODAmount Container. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
type ShipmentServiceOptionsDeliveryConfirmation ¶
type ShipmentServiceOptionsDeliveryConfirmation struct {
// DCISType Type of delivery confirmation. Valid values: 1 - Delivery Confirmation Signature Required 2 - Delivery Confirmation Adult Signature Required
DCISType string `json:"DCISType"`
}
ShipmentServiceOptionsDeliveryConfirmation Delivery Confirmation Container. DeliveryConfirmation and C.O.D. are mutually exclusive. Refer to the Appendix for a list of valid origin-destination country or territory pairs associated with each confirmation type.
type ShipmentServiceOptionsDeliveryOptions ¶
type ShipmentServiceOptionsDeliveryOptions struct {
// DropOffAtUPSFacilityIndicator The presence of the tag DropOffAtUPSFacilityIndicator indicates the package will be dropped at a UPS facility for shipment.
DropOffAtUPSFacilityIndicator *string `json:"DropOffAtUPSFacilityIndicator,omitempty"`
// LiftGateAtDeliveryIndicator The presence of the tag LiftGateAtDeliveryIndicator indicates that the shipment requires a lift gate for delivery.
LiftGateAtDeliveryIndicator *string `json:"LiftGateAtDeliveryIndicator,omitempty"`
}
ShipmentServiceOptionsDeliveryOptions Shipment Service Delivery Options Container. Valid for UPS Worldwide Express Freight and UPS Worldwide Express Freight Midday shipments.
type ShipmentServiceOptionsImportControl ¶
type ShipmentServiceOptionsImportControl struct {
// Code Code for type of Import Control shipment. Valid values are: ImportControl One-Attempt '03' = ImportControl Three-Attempt'04' = ImportControl Electronic Label '05' = ImportControl Print Label.
Code string `json:"Code"`
// Description Text description of the code representing the Import Control associated with the shipment.
Description *string `json:"Description,omitempty"`
}
ShipmentServiceOptionsImportControl Container for type of Import Control shipments.
type ShipmentServiceOptionsPickupOptions ¶
type ShipmentServiceOptionsPickupOptions struct {
// HoldForPickupIndicator The presence of the tag HoldForPickupIndicator indicates that the user opted to hold the shipment at UPS location for pickup.
HoldForPickupIndicator *string `json:"HoldForPickupIndicator,omitempty"`
// LiftGateAtPickupIndicator The presence of the tag LiftGatePickupRequiredIndicator indicates that the shipment requires a lift gate for pickup.
LiftGateAtPickupIndicator *string `json:"LiftGateAtPickupIndicator,omitempty"`
}
ShipmentServiceOptionsPickupOptions Shipment Service Pickup Options Container. Valid for UPS Worldwide Express Freight and UPS Worldwide Express Freight Midday shipments.
type ShipmentServiceOptionsRestrictedArticles ¶
type ShipmentServiceOptionsRestrictedArticles struct {
// AlcoholicBeveragesIndicator This field is a flag to indicate if the package has Alcohol. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
AlcoholicBeveragesIndicator *string `json:"AlcoholicBeveragesIndicator,omitempty"`
// DiagnosticSpecimensIndicator This field is a flag to indicate if the package has Biological substances. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments. Lane check will happen based on postal code/ city.
DiagnosticSpecimensIndicator *string `json:"DiagnosticSpecimensIndicator,omitempty"`
// ECigarettesIndicator This field is a flag to indicate if the package has E-Cigarettes. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
ECigarettesIndicator *string `json:"ECigarettesIndicator,omitempty"`
// HempCBDIndicator This field is a flag to indicate if the package has Hemp/CBD. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
HempCBDIndicator *string `json:"HempCBDIndicator,omitempty"`
// PerishablesIndicator This field is a flag to indicate if the package has Perishables. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
PerishablesIndicator *string `json:"PerishablesIndicator,omitempty"`
// PlantsIndicator This field is a flag to indicate if the package has Plants. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
PlantsIndicator *string `json:"PlantsIndicator,omitempty"`
// SeedsIndicator This field is a flag to indicate if the package has Seeds. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
SeedsIndicator *string `json:"SeedsIndicator,omitempty"`
// SpecialExceptionsIndicator This field is a flag to indicate if the package has Special Exceptions Restricted Materials. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
SpecialExceptionsIndicator *string `json:"SpecialExceptionsIndicator,omitempty"`
// TobaccoIndicator This field is a flag to indicate if the package has Tobacco. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
TobaccoIndicator *string `json:"TobaccoIndicator,omitempty"`
}
ShipmentServiceOptionsRestrictedArticles Restricted Articles container. Valid for UPS World Wide Express Freight shipments.
type ShipmentServiceOptionsReturnService ¶
type ShipmentServiceOptionsReturnService struct {
// Code Code for type of Return shipment. Valid values are:'3' =UPS One-Attempt Return Label'5' = UPS Three Attempt Return Label'8' = UPS Electronic Return Label'9' = UPS Print Return Label'10' = UPS Exchange Print Return Label '11' = UPS Pack & Collect Service 1-Attempt Box 1 '12' = UPS Pack & Collect Service 1-Attempt Box 2 '13' = UPS Pack & Collect Service 1-Attempt Box 3 '14' = UPS Pack & Collect Service 1-Attempt Box 4 '15' = UPS Pack & Collect Service 1-Attempt Box 5 '16' = UPS Pack & Collect Service 3-Attempt Box 1 '17' = UPS Pack & Collect Service 3-Attempt Box 2 '18' = UPS Pack & Collect Service 3-Attempt Box 3 '19' = UPS Pack & Collect Service 3-Attempt Box 4 '20' = UPS Pack & Collect Service 3-Attempt Box 5 10 = UPS Exchange Print Return Label and 5 = UPS Three Attempt Return Label are not valid for UPS WorldWide Express Freight and UPS Worldwide Express Freight Midday Services. 3 = UPS One-Attempt Return Label is not valid return service with UPS Premium Care accessorial.
Code string `json:"Code"`
// Description Description for type of Return Service.
Description *string `json:"Description,omitempty"`
}
ShipmentServiceOptionsReturnService Container for type of Return Services.
type ShipmentServiceOptionsVerifiedDelivery ¶
type ShipmentServiceOptionsVerifiedDelivery struct {
// SecurePINType Specifies the type of Secure PIN. Valid value is 2, which represents VDS (Shipper Generated PIN). This field is required.
SecurePINType string `json:"SecurePINType"`
}
ShipmentServiceOptionsVerifiedDelivery Protected Delivery container required for Secure Pin Delivery. Protected Delivery will offer shippers extra security to ensure their packages are delivered to the intended recipient.
type ShipmentShipFrom ¶
type ShipmentShipFrom struct {
// Address Address container for Ship From. Address Container
Address ShipFromAddress `json:"Address"`
// AttentionName Origin attention name. Length is not validated.
AttentionName *string `json:"AttentionName,omitempty"`
// Name Origin attention name or company name. Length is not validated.
Name *string `json:"Name,omitempty"`
}
ShipmentShipFrom Ship From Container.
type ShipmentShipTo ¶
type ShipmentShipTo struct {
// Address Address Container.
Address ShipToAddress `json:"Address"`
// AttentionName Destination attention name. Length is not validated.
AttentionName *string `json:"AttentionName,omitempty"`
// Name Destination attention name or company name. Length is not validated.
Name *string `json:"Name,omitempty"`
}
ShipmentShipTo Ship To Container
type ShipmentShipmentIndicationType ¶
type ShipmentShipmentIndicationType struct {
// Code Code for Shipment Indication Type.
//
// Valid values:
// - 01 - Hold for Pickup at UPS Access Point
// - 02 - UPS Access Point™ Delivery
Code string `json:"Code"`
// Description Description for Shipment Indication Type. Length is not Validated.
Description *string `json:"Description,omitempty"`
}
ShipmentShipmentIndicationType Container to hold shipment indication type.
type ShipmentShipmentRatingOptions ¶
type ShipmentShipmentRatingOptions struct {
// FRSShipmentIndicator FRS Indicator. The indicator is required to obtain rates for UPS Ground Freight Pricing (GFP). The account number must be enabled for GFP.
FRSShipmentIndicator *string `json:"FRSShipmentIndicator,omitempty"`
// NegotiatedRatesIndicator NegotiatedRatesIndicator - Required to display two types of discounts: 1) Bids or Account Based Rates2) Web/Promotional Discounts BidsAccount Based Rates: If the indicator is present, the Shipper is authorized, and the Rating API XML Request is configured to return Negotiated Rates, then Negotiated Rates should be returned in the response. Web/Promotional Discounts: If the indicator is present, the Shipper is authorized for Web/Promotional Discounts then Negotiated Rates should be returned in the response.
NegotiatedRatesIndicator *string `json:"NegotiatedRatesIndicator,omitempty"`
// RateChartIndicator RateChartIndicator - If present in a request, the response will contain a RateChart element.
RateChartIndicator *string `json:"RateChartIndicator,omitempty"`
// TPFCNegotiatedRatesIndicator This indicator applies for a third party (3P) / Freight collect (FC) shipment only. For 3P/FC shipment if the shipper wishes to request for the negotiated rates of the third party then this indicator should be included in the request. If authorized the 3P/FC negotiated rates will be applied to the shipment and rates will be returned in response.
TPFCNegotiatedRatesIndicator *string `json:"TPFCNegotiatedRatesIndicator,omitempty"`
// UserLevelDiscountIndicator UserLevelDiscountIndicator - required to obtain rates for User Level Promotions. This is required to obtain User Level Discounts. There must also be no ShipperNumber in the Shipper container.
UserLevelDiscountIndicator *string `json:"UserLevelDiscountIndicator,omitempty"`
}
ShipmentShipmentRatingOptions Shipment Rating Options container.
type ShipmentShipmentServiceOptions ¶
type ShipmentShipmentServiceOptions struct {
// AccessPointCOD Access Point COD indicates Shipment level Access Point COD is requested for a shipment. Valid only for "01 - Hold For Pickup At UPS Access Point" Shipment Indication type.
//
// Shipment Access Point COD is valid only for countries or territories within E.U.
//
// Not valid with (Shipment) COD.
//
// Not available to shipment with return service.
AccessPointCOD *ShipmentServiceOptionsAccessPointCOD `json:"AccessPointCOD,omitempty"`
// AvailableServicesOption If we need diferent available services in response, this option is used for shop request option. SaturdayDeliveryIndicator/ SundayDeliveryIndicator will be ignored in that case. Valid Values:1- Weekday+Saturday services2- Weekday+Sunday services3- Weekday+Sat services+Sun services
AvailableServicesOption *string `json:"AvailableServicesOption,omitempty"`
// COD If present, indicates C.O.D. is requested for the shipment. Shipment level C.O.D. is only available for EU origin countries or territories.C.O.D. shipments are only available for Shippers with Daily Pickup and Drop Shipping accounts.
COD *ShipmentServiceOptionsCOD `json:"COD,omitempty"`
// CertificateOfOriginIndicator The empty tag in request indicates that customer would be using UPS prepared SED form. Valid for UPS World Wide Express Freight shipments.
CertificateOfOriginIndicator *string `json:"CertificateOfOriginIndicator,omitempty"`
// CommercialInvoiceRemovalIndicator Presence/Absence Indicator. Any value inside is ignored. CommercialInvoiceRemovalIndicator - empty tag means indicator is present. CommercialInvoiceRemovalIndicator allows a shipper to dictate that UPS remove the Commercial Invoice from the user's shipment before the shipment is delivered to the ultimate consignee.
CommercialInvoiceRemovalIndicator *string `json:"CommercialInvoiceRemovalIndicator,omitempty"`
// DeliverToAddresseeOnlyIndicator Presence/Absence Indicator. Any value inside is ignored.
//
// DeliverToAddresseeOnlyIndicator is shipper specified restriction that requires the addressee to be the one who takes final delivery of the "Hold For PickUp at UPS Access Point" package.
//
// Presence of indicator means shipper restriction will apply to the shipment. Only valid for Shipment Indication type "01 - Hold For PickUp at UPS Access Point".
DeliverToAddresseeOnlyIndicator *string `json:"DeliverToAddresseeOnlyIndicator,omitempty"`
// DeliveryConfirmation Delivery Confirmation Container. DeliveryConfirmation and C.O.D. are mutually exclusive. Refer to the Appendix for a list of valid origin-destination country or territory pairs associated with each confirmation type.
DeliveryConfirmation *ShipmentServiceOptionsDeliveryConfirmation `json:"DeliveryConfirmation,omitempty"`
// DeliveryOptions Shipment Service Delivery Options Container. Valid for UPS Worldwide Express Freight and UPS Worldwide Express Freight Midday shipments.
DeliveryOptions *ShipmentServiceOptionsDeliveryOptions `json:"DeliveryOptions,omitempty"`
// DirectDeliveryOnlyIndicator Presence/Absence Indicator. Any value inside is ignored. Direct Delivery Only (DDO) accessorial in a request would ensure that delivery is made only to the Ship To address on the shipping label. This accessorial is not valid with Shipment Indication Types:
// - 01 - Hold For Pickup At UPS Access Point
// - 02 - UPS Access Point™ Delivery
DirectDeliveryOnlyIndicator *string `json:"DirectDeliveryOnlyIndicator,omitempty"`
// EPRAIndicator For valid values, refer to Rating and Shipping COD Supported Countries or Territories in the Appendix.Presence/Absence Indicator. Any value inside is ignored. This field is a flag to indicate Package Release Code is requested for shipment.
//
// This accessorial is only valid with ShipmentIndicationType '01' - Hold for Pickup at UPS Access Point™.
EPRAIndicator *string `json:"EPRAIndicator,omitempty"`
// GlobalCheckoutIndicator A flag indicating if the shipment requires a GlobalCheckoutIndicator. True if GlobalCheckoutIndicator tag exists; false otherwise Empty Tag.
GlobalCheckoutIndicator *string `json:"GlobalCheckoutIndicator,omitempty"`
// ImportControl Container for type of Import Control shipments.
ImportControl *ShipmentServiceOptionsImportControl `json:"ImportControl,omitempty"`
// InsideDelivery Inside Delivery accessory. Valid values:
// - 01 - White Glove
// - 02 - Room of Choice
// - 03 - Installation Shippers account needs to have a valid contract for Heavy Goods Service.
InsideDelivery *string `json:"InsideDelivery,omitempty"`
// ItemDisposalIndicator Presence/Absence Indicator. Any value inside is ignored. If present, indicates that the customer would like items disposed. Shippers account needs to have a valid contract for Heavy Goods Service.
ItemDisposalIndicator *string `json:"ItemDisposalIndicator,omitempty"`
// PickupOptions Shipment Service Pickup Options Container. Valid for UPS Worldwide Express Freight and UPS Worldwide Express Freight Midday shipments.
PickupOptions *ShipmentServiceOptionsPickupOptions `json:"PickupOptions,omitempty"`
// RestrictedArticles Restricted Articles container. Valid for UPS World Wide Express Freight shipments.
RestrictedArticles *ShipmentServiceOptionsRestrictedArticles `json:"RestrictedArticles,omitempty"`
// ReturnOfDocumentIndicator Return of Documents Indicator - If the flag is present, the shipper has requested the ReturnOfDocument accessorial be added to the shipment Valid for Poland to Poland shipment.
ReturnOfDocumentIndicator *string `json:"ReturnOfDocumentIndicator,omitempty"`
// ReturnService Container for type of Return Services.
ReturnService *ShipmentServiceOptionsReturnService `json:"ReturnService,omitempty"`
// SDLShipmentIndicator Empty Tag means the indicator is present. This field is a flag to indicate if the receiver needs SDL rates in response. True if SDLShipmentIndicator tag exists; false otherwise. If present, the State Department License (SDL) rates will be returned in the response.This service requires that the account number is enabled for SDL.
SDLShipmentIndicator *string `json:"SDLShipmentIndicator,omitempty"`
// SaturdayDeliveryIndicator A flag indicating if a shipment must be delivered on a Saturday. True if SaturdayDeliveryIndicator tag exists; false otherwise Empty Tag.
SaturdayDeliveryIndicator *string `json:"SaturdayDeliveryIndicator,omitempty"`
// SaturdayPickupIndicator A flag indicating if the shipment requires a Saturday pickup. True if SaturdayPickupIndicator tag exists; false otherwise. Not available for GFP rating requests. Empty Tag.
SaturdayPickupIndicator *string `json:"SaturdayPickupIndicator,omitempty"`
// ShipperExportDeclarationIndicator The empty tag in request indicates that customer would be using UPS prepared SED form. Valid for UPS World Wide Express Freight shipments.
ShipperExportDeclarationIndicator *string `json:"ShipperExportDeclarationIndicator,omitempty"`
// SundayDeliveryIndicator A flag indicating if a shipment must be delivered on a Sunday. True if SundayDeliveryIndicator tag exists; false otherwise Empty Tag.
SundayDeliveryIndicator *string `json:"SundayDeliveryIndicator,omitempty"`
// UPScarbonneutralIndicator UPS carbon neutral indicator. Indicates the shipment will be rated as carbon neutral.
UPScarbonneutralIndicator *string `json:"UPScarbonneutralIndicator,omitempty"`
// VerifiedDelivery Protected Delivery container required for Secure Pin Delivery. Protected Delivery will offer shippers extra security to ensure their packages are delivered to the intended recipient.
VerifiedDelivery *ShipmentServiceOptionsVerifiedDelivery `json:"VerifiedDelivery,omitempty"`
}
ShipmentShipmentServiceOptions Shipment level Accessorials are included in this container.
type ShipmentShipmentTotalWeight ¶
type ShipmentShipmentTotalWeight struct {
// UnitOfMeasurement UnitOfMeasurement Container.
UnitOfMeasurement ShipmentTotalWeightUnitOfMeasurement `json:"UnitOfMeasurement"`
// Weight Non-zero total weight of all packages in the shipment.
Weight string `json:"Weight"`
}
ShipmentShipmentTotalWeight Shipment Total Weight Container. This container is only applicable for "ratetimeintransit" and "shoptimeintransit" request options. Required for all international shipments when retreiving time in transit information, including letters and documents shipments.
type ShipmentShipper ¶
type ShipmentShipper struct {
// Address Address Container. If the ShipFrom container is not present then this address will be used as the ShipFrom. If this address is used as the ShipFrom, the shipment will be rated from this origin address.
Address ShipperAddress `json:"Address"`
// AttentionName Shipper's attention name. Length is not validated.
AttentionName *string `json:"AttentionName,omitempty"`
// Name Shipper's name or company name. Length is not validated.
Name *string `json:"Name,omitempty"`
// ShipperNumber Shipper's UPS account number. A valid account number is required to receive negotiated rates. Optional otherwise. Cannot be present when requesting UserLevelDiscount.
ShipperNumber *string `json:"ShipperNumber,omitempty"`
}
ShipmentShipper Shipper container. Information associated with the UPS account number.
type ShipmentTotalWeightUnitOfMeasurement ¶
type ShipmentTotalWeightUnitOfMeasurement struct {
// Code Code representing the unit of measure associated with the package weight.
//
// Valid values:
// - LBS = Pounds
// - KGS = Kilograms.
Code string `json:"Code"`
// Description Text description of the code representing the unit of measure associated with the shipment weight.
Description string `json:"Description"`
}
ShipmentTotalWeightUnitOfMeasurement UnitOfMeasurement Container.
type ShipperAddress ¶
type ShipperAddress struct {
// AddressLine Shipper's street address including name and number (when applicable). Maximum Occurrence should be three. Length is not validated. Note:Required if requesting Roadie Service
AddressLine []string `json:"AddressLine"`
// City Shipper's city. Required if country or territory does not utilize postal codes. Length is not validated.
City *string `json:"City,omitempty"`
// CountryCode Country or Territory code. Refer to the Supported Country or Territory Tables located in Appendix.
CountryCode string `json:"CountryCode"`
// PostalCode Shipper's postal code. Length is not validated.
PostalCode *string `json:"PostalCode,omitempty"`
// StateProvinceCode Shipper's state code. Length is not validated.
StateProvinceCode *string `json:"StateProvinceCode,omitempty"`
}
ShipperAddress Address Container. If the ShipFrom container is not present then this address will be used as the ShipFrom. If this address is used as the ShipFrom, the shipment will be rated from this origin address.
type TimeInTransitServiceSummary ¶
type TimeInTransitServiceSummary struct {
// Disclaimer The Disclaimer is provided based upon the origin and destination country or territory codes provided in the request document. The disclaimer is returned as a conditional statement to the validity of the service being guaranteed. The possible disclaimers that can be returned are available in the Service Guaranteed Disclaimers table.
Disclaimer *string `json:"Disclaimer,omitempty"`
// EstimatedArrival Container for the Time-In-Transit arrival information by service
EstimatedArrival ServiceSummaryEstimatedArrival `json:"EstimatedArrival"`
// GuaranteedIndicator Empty Tag. Indicates whether the service will be guaranteed or not. Required for International Requests.
GuaranteedIndicator *string `json:"GuaranteedIndicator,omitempty"`
// SaturdayDelivery Saturday delivery information for a service. Values are1 - Saturday Delivery Available with additional charges 0 - Saturday Delivery not available or no additional charge, please check Delivery Date to confirm if the Delivery will be SaturdayPlease see Saturday Delivery business rules section for more information.
SaturdayDelivery *string `json:"SaturdayDelivery,omitempty"`
// SaturdayDeliveryDisclaimer Saturday delivery disclaimer message.
SaturdayDeliveryDisclaimer *string `json:"SaturdayDeliveryDisclaimer,omitempty"`
// Service Container for the the UPS service selected for a shipment.
Service ServiceSummaryService `json:"Service"`
// SundayDelivery Sunday delivery information for a service. Values are1 - Sunday Delivery Available with additional charges 0 - Sunday Delivery not available or no additional charge, please check Delivery Date to confirm if the Delivery will be SundayPlease see Saturday Delivery business rules section for more information. Applies only if SubVersion is greater than or equal to 2007
SundayDelivery *string `json:"SundayDelivery,omitempty"`
// SundayDeliveryDisclaimer Sunday delivery disclaimer message. Applies only if SubVersion is greater than or equal to 2007
SundayDeliveryDisclaimer *string `json:"SundayDeliveryDisclaimer,omitempty"`
}
TimeInTransitServiceSummary Container for all available service information.
type TransportationChargesDiscountAmount ¶
type TransportationChargesDiscountAmount struct {
// CurrencyCode The IATA currency code associated with the transportation costs for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue Total charges Monetary value. Valid values are from 0 to 9999999999999999.99
MonetaryValue string `json:"MonetaryValue"`
}
TransportationChargesDiscountAmount Discount Container
type TransportationChargesGrossCharge ¶
type TransportationChargesGrossCharge struct {
// CurrencyCode The IATA currency code associated with the transportation costs for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue Total charges Monetary value. Valid values are from 0 to 9999999999999999.99
MonetaryValue string `json:"MonetaryValue"`
}
TransportationChargesGrossCharge Gross Transportation Charges Container
type TransportationChargesNetCharge ¶
type TransportationChargesNetCharge struct {
// CurrencyCode The IATA currency code associated with the transportation costs for the shipment.
CurrencyCode string `json:"CurrencyCode"`
// MonetaryValue Total charges Monetary value. Valid values are from 0 to 9999999999999999.99
MonetaryValue string `json:"MonetaryValue"`
}
TransportationChargesNetCharge Net Transportation Rate Container