types

package
v0.0.0-...-2cc5390 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressRequest

type AddressRequest struct {
	ID           string `xml:"ID,attr,omitempty"`      // ID for the individual address lookup
	FirmName     string `xml:"FirmName,omitempty"`     // Firm Name
	Address1     string `xml:"Address1"`               // Delivery Address in the destination address
	Address2     string `xml:"Address2"`               // Delivery Address in the destination address. Required for all mail and packages, however 11-digit Destination Delivery Point ZIP+4 Code can be provided as an alternative in the Detail 1 Record
	City         string `xml:"City"`                   // City name of the destination address
	State        string `xml:"State"`                  // Two-character state code of the destination address
	Urbanization string `xml:"Urbanization,omitempty"` // Urbanization. For Puerto Rico addresses only
	Zip5         string `xml:"Zip5"`                   // Destination 5-digit ZIP Code. Numeric values (0-9) only. If International, all zeroes.
	Zip4         string `xml:"Zip4"`                   // Destination ZIP+4 Numeric values (0-9) only. If International, all zeroes. Default to spaces if not available.
}

type AddressResponse

type AddressResponse struct {
	ID                   string `xml:"ID,attr,omitempty"`      // ID for the individual address lookup
	FirmName             string `xml:"FirmName,omitempty"`     // Firm Name
	Address1             string `xml:"Address1,omitempty"`     // Delivery Address in the destination address
	Address2             string `xml:"Address2,omitempty"`     // Delivery Address in the destination address. Required for all mail and packages, however 11-digit Destination Delivery Point ZIP+4 Code can be provided as an alternative in the Detail 1 Record
	City                 string `xml:"City,omitempty"`         // City name of the destination address
	State                string `xml:"State,omitempty"`        // Two-character state code of the destination address
	Urbanization         string `xml:"Urbanization,omitempty"` // Urbanization. For Puerto Rico addresses only
	Zip5                 string `xml:"Zip5,omitempty"`         // Destination 5-digit ZIP Code. Numeric values (0-9) only. If International, all zeroes.
	Zip4                 string `xml:"Zip4,omitempty"`         // Destination ZIP+4 Numeric values (0-9) only. If International, all zeroes. Default to spaces if not available.
	CityAbbreviation     string `xml:"CityAbbreviation,omitempty"`
	DeliveryPoint        string `xml:"DeliveryPoint,omitempty"`
	CarrierRoute         string `xml:"CarrierRoute,omitempty"`
	Footnotes            string `xml:"Footnotes,omitempty"`
	DPVConfirmation      string `xml:"DPVConfirmation,omitempty"`
	DPVCMRA              string `xml:"DPVCMRA,omitempty"`
	DPVFootnotes         string `xml:"DPVFootnotes,omitempty"`
	Business             string `xml:"Business,omitempty"`
	CentralDeliveryPoint string `xml:"CentralDeliveryPoint,omitempty"`
	Vacant               string `xml:"Vacant,omitempty"`
	Error                *Error `xml:"Error,omitempty"`
}

type AddressValidateRequest

type AddressValidateRequest struct {
	Revision           string            `xml:"Revision,omitempty"` // Integer value used to return of all available response fields. Set this value to 1 to return all currently documented response fields
	ProjectT           bool              `xml:"ProjectT,omitempty"`
	IncludeFraudList   bool              `xml:"IncludeFraudList,omitempty"`
	ReturnCarrierRoute bool              `xml:"ReturnCarrierRoute,omitempty"`
	Address            []*AddressRequest `xml:"Address"` // Up to 5 address verifications can be included per transaction.
	// contains filtered or unexported fields
}

func (*AddressValidateRequest) API

func (r *AddressValidateRequest) API() string

func (*AddressValidateRequest) SetUser

func (r *AddressValidateRequest) SetUser(USERID string)

Sets the USERID for the request.

type AddressValidateResponse

type AddressValidateResponse struct {
	Address []*AddressResponse `xml:"Address,omitempty"`
}

type CarrierPickupAvailabilityRequest

type CarrierPickupAvailabilityRequest struct {
	FirmName     string `xml:"FirmName,omitempty"`
	SuiteOrApt   string `xml:"SuiteOrApt"`
	Address2     string `xml:"Address2"`
	Urbanization string `xml:"Urbanization"`
	City         string `xml:"City"`
	State        string `xml:"State"`
	ZIP5         string `xml:"ZIP5"`
	ZIP4         string `xml:"ZIP4"`
	Date         string `xml:"Date,omitempty"`
	// contains filtered or unexported fields
}

func (*CarrierPickupAvailabilityRequest) API

func (*CarrierPickupAvailabilityRequest) SetUser

func (r *CarrierPickupAvailabilityRequest) SetUser(USERID string)

Sets the USERID for the request.

type CarrierPickupAvailabilityResponse

type CarrierPickupAvailabilityResponse struct {
	FirmName     string `xml:"FirmName,omitempty"`
	SuiteOrApt   string `xml:"SuiteOrApt"`
	Address2     string `xml:"Address2"`
	Urbanization string `xml:"Urbanization"`
	City         string `xml:"City"`
	State        string `xml:"State"`
	ZIP5         string `xml:"ZIP5"`
	ZIP4         string `xml:"ZIP4"`
	DayOfWeek    string `xml:"DayOfWeek"`
	Date         string `xml:"Date"`
	CarrierRoute string `xml:"CarrierRoute,omitempty"`
}

type CarrierPickupCancelRequest

type CarrierPickupCancelRequest struct {
	FirmName           string `xml:"FirmName,omitempty"`
	SuiteOrApt         string `xml:"SuiteOrApt"`
	Address2           string `xml:"Address2"`
	Urbanization       string `xml:"Urbanization"`
	City               string `xml:"City"`
	State              string `xml:"State"`
	ZIP5               string `xml:"ZIP5"`
	ZIP4               string `xml:"ZIP4"`
	ConfirmationNumber string `xml:"ConfirmationNumber"`
	// contains filtered or unexported fields
}

func (*CarrierPickupCancelRequest) API

func (*CarrierPickupCancelRequest) SetUser

func (r *CarrierPickupCancelRequest) SetUser(USERID string)

Sets the USERID for the request.

type CarrierPickupCancelResponse

type CarrierPickupCancelResponse struct {
	FirmName           string `xml:"FirmName"`
	SuiteOrApt         string `xml:"SuiteOrApt"`
	Address2           string `xml:"Address2"`
	Urbanization       string `xml:"Urbanization"`
	City               string `xml:"City"`
	State              string `xml:"State"`
	ZIP5               string `xml:"ZIP5"`
	ZIP4               string `xml:"ZIP4"`
	ConfirmationNumber string `xml:"ConfirmationNumber"`
	Status             string `xml:"Status"`
	// contains filtered or unexported fields
}

type CarrierPickupChangeRequest

type CarrierPickupChangeRequest struct {
	FirstName           string                  `xml:"FirstName"`
	LastName            string                  `xml:"LastName"`
	FirmName            string                  `xml:"FirmName,omitempty"`
	SuiteOrApt          string                  `xml:"SuiteOrApt,omitempty"`
	Address2            string                  `xml:"Address2"`
	Urbanization        string                  `xml:"Urbanization"`
	City                string                  `xml:"City"`
	State               string                  `xml:"State"`
	ZIP5                string                  `xml:"ZIP5"`
	ZIP4                string                  `xml:"ZIP4"`
	Phone               string                  `xml:"Phone"`
	Extension           string                  `xml:"Extension"`
	Package             []*CarrierPickupPackage `xml:"Package"`
	EstimatedWeight     string                  `xml:"EstimatedWeight"`
	PackageLocation     string                  `xml:"PackageLocation"`
	SpecialInstructions string                  `xml:"SpecialInstructions"`
	ConfirmationNumber  string                  `xml:"ConfirmationNumber,omitempty"`
	EmailAddress        string                  `xml:"EmailAddress,omitempty"`
	// contains filtered or unexported fields
}

func (*CarrierPickupChangeRequest) API

func (*CarrierPickupChangeRequest) SetUser

func (r *CarrierPickupChangeRequest) SetUser(USERID string)

Sets the USERID for the request.

type CarrierPickupChangeResponse

type CarrierPickupChangeResponse struct {
	FirstName           string                `xml:"FirstName"`
	LastName            string                `xml:"LastName"`
	FirmName            string                `xml:"FirmName,omitempty"`
	SuiteOrApt          string                `xml:"SuiteOrApt,omitempty"`
	Address2            string                `xml:"Address2"`
	Urbanization        string                `xml:"Urbanization"`
	City                string                `xml:"City"`
	State               string                `xml:"State"`
	ZIP5                string                `xml:"ZIP5"`
	ZIP4                string                `xml:"ZIP4"`
	Phone               string                `xml:"Phone"`
	Extension           string                `xml:"Extension"`
	Package             *CarrierPickupPackage `xml:"Package"`
	EstimatedWeight     string                `xml:"EstimatedWeight"`
	PackageLocation     string                `xml:"PackageLocation"`
	SpecialInstructions string                `xml:"SpecialInstructions"`
	ConfirmationNumber  string                `xml:"ConfirmationNumber,omitempty"`
	DayOfWeek           string                `xml:"DayOfWeek"`
	Date                string                `xml:"Date"`
	Status              string                `xml:"Status,omitempty"`
	EmailAddress        string                `xml:"EmailAddress,omitempty"`
}

type CarrierPickupInquiryRequest

type CarrierPickupInquiryRequest struct {
	FirmName           string `xml:"FirmName,omitempty"`
	SuiteOrApt         string `xml:"SuiteOrApt"`
	Address2           string `xml:"Address2"`
	Urbanization       string `xml:"Urbanization"`
	City               string `xml:"City"`
	State              string `xml:"State"`
	ZIP5               string `xml:"ZIP5"`
	ZIP4               string `xml:"ZIP4"`
	ConfirmationNumber string `xml:"ConfirmationNumber"`
	// contains filtered or unexported fields
}

func (*CarrierPickupInquiryRequest) SetUser

func (r *CarrierPickupInquiryRequest) SetUser(USERID string)

Sets the USERID for the request.

type CarrierPickupInquiryResponse

type CarrierPickupInquiryResponse struct {
	FirstName           string                  `xml:"FirstName"`
	LastName            string                  `xml:"LastName"`
	FirmName            string                  `xml:"FirmName"`
	SuiteOrApt          string                  `xml:"SuiteOrApt"`
	Address2            string                  `xml:"Address2"`
	Urbanization        string                  `xml:"Urbanization"`
	City                string                  `xml:"City"`
	State               string                  `xml:"State"`
	ZIP5                string                  `xml:"ZIP5"`
	ZIP4                string                  `xml:"ZIP4"`
	Phone               string                  `xml:"Phone"`
	Extension           string                  `xml:"Extension"`
	Package             []*CarrierPickupPackage `xml:"Package"`
	EstimatedWeight     string                  `xml:"EstimatedWeight"`
	PackageLocation     string                  `xml:"PackageLocation"`
	SpecialInstructions string                  `xml:"SpecialInstructions"`
	ConfirmationNumber  string                  `xml:"ConfirmationNumber"`
	DayOfWeek           string                  `xml:"DayOfWeek"`
	Date                string                  `xml:"Date"`
	EmailAddress        string                  `xml:"EmailAddress,omitempty"`
}

type CarrierPickupPackage

type CarrierPickupPackage struct {
	ServiceType string `xml:"ServiceType"`
	Count       string `xml:"Count"`
}

type CarrierPickupScheduleRequest

type CarrierPickupScheduleRequest struct {
	FirstName           string                  `xml:"FirstName"`
	LastName            string                  `xml:"LastName"`
	FirmName            string                  `xml:"FirmName,omitempty"`
	SuiteOrApt          string                  `xml:"SuiteOrApt"`
	Address2            string                  `xml:"Address2"`
	Urbanization        string                  `xml:"Urbanization"`
	City                string                  `xml:"City"`
	State               string                  `xml:"State"`
	ZIP5                string                  `xml:"ZIP5"`
	ZIP4                string                  `xml:"ZIP4"`
	Phone               string                  `xml:"Phone"`
	Extension           string                  `xml:"Extension,omitempty"`
	Package             []*CarrierPickupPackage `xml:"Package"`
	EstimatedWeight     string                  `xml:"EstimatedWeight"`
	PackageLocation     string                  `xml:"PackageLocation"`
	SpecialInstructions string                  `xml:"SpecialInstructions,omitempty"`
	EmailAddress        string                  `xml:"EmailAddress,omitempty"`
	// contains filtered or unexported fields
}

func (*CarrierPickupScheduleRequest) SetUser

func (r *CarrierPickupScheduleRequest) SetUser(USERID string)

Sets the USERID for the request.

type CarrierPickupScheduleResponse

type CarrierPickupScheduleResponse struct {
	FirstName           string                  `xml:"FirstName"`
	LastName            string                  `xml:"LastName"`
	FirmName            string                  `xml:"FirmName,omitempty"`
	SuiteOrApt          string                  `xml:"SuiteOrApt"`
	Address2            string                  `xml:"Address2"`
	Urbanization        string                  `xml:"Urbanization"`
	City                string                  `xml:"City"`
	State               string                  `xml:"State"`
	ZIP5                string                  `xml:"ZIP5"`
	ZIP4                string                  `xml:"ZIP4"`
	Phone               string                  `xml:"Phone"`
	Extension           string                  `xml:"Extension,omitempty"`
	Package             []*CarrierPickupPackage `xml:"Package"`
	EstimatedWeight     string                  `xml:"EstimatedWeight"`
	PackageLocation     string                  `xml:"PackageLocation"`
	SpecialInstructions string                  `xml:"SpecialInstructions"`
	ConfirmationNumber  string                  `xml:"ConfirmationNumber"`
	DayOfWeek           string                  `xml:"DayOfWeek"`
	Date                string                  `xml:"Date"`
	CarrierRoute        string                  `xml:"CarrierRoute,omitempty"`
	EmailAddress        string                  `xml:"EmailAddress,omitempty"`
}

type CityStateLookupRequest

type CityStateLookupRequest struct {
	ZIPCode []*Zip `xml:"ZipCode"`
	// contains filtered or unexported fields
}

func (*CityStateLookupRequest) API

func (r *CityStateLookupRequest) API() string

func (*CityStateLookupRequest) SetUser

func (r *CityStateLookupRequest) SetUser(USERID string)

Sets the USERID for the request.

type CityStateLookupResponse

type CityStateLookupResponse struct {
	ZipResponse []*ZipResponse `xml:"ZipCode"`
	// contains filtered or unexported fields
}

type CloseTimes

type CloseTimes struct {
	M  string `xml:"M,omitempty"`  // Close Time for Monday
	Tu string `xml:"Tu,omitempty"` // Close Time for Tuesday
	W  string `xml:"W,omitempty"`  // Close Time for Wednesday
	Th string `xml:"Th,omitempty"` // Close Time for Thursday
	F  string `xml:"F,omitempty"`  // Close Time for Friday
	Sa string `xml:"Sa,omitempty"` // Close Time for Saturday
	Su string `xml:"Su,omitempty"` // Close Time for Sunday
	H  string `xml:"H,omitempty"`  // Close Time for Holiday
}

type Error

type Error struct {
	Number      string `xml:"Number"`
	Description string `xml:"Description,omitempty"`
	Source      string `xml:"Source,omitempty"`
	HelpFile    string `xml:"HelpFile,omitempty"`
	HelpContext string `xml:"HelpContext,omitempty"`
}

Error is the response returned from USPS API when there is an issue with the request or other reasons.

func (*Error) Error

func (e *Error) Error() string

Error extends the default error with USPS Errors.

type Expedited

type Expedited struct {
	EAD               string                 `xml:"EAD,omitempty"`               // Effective Acceptance Date
	Commitment        []*ExpeditedCommitment `xml:"Commitment,omitempty"`        // Priority Mail Express and Priority Mail commitment information
	ExpeditedMessage  string                 `xml:"ExpeditedMessage,omitempty"`  // Expedited messaging
	ExpeditedTransMsg []*TransMsg            `xml:"ExpeditedTransMsg,omitempty"` // Expedited transportational messaging
}

type ExpeditedCommitment

type ExpeditedCommitment struct {
	MailClass string `xml:"MailClass,omitempty"` // Mail Class
	/*
		Commitment Name.

		Valid: "1-Day",	"2-Day", "3-Day", "DPO", "Military"

		Note: If a scenario exceeds a 3-day commitment then no value will be returned in the response field
	*/
	CommitmentName string `xml:"CommitmentName,omitempty"`
	CommitmentTime string `xml:"CommitmentTime,omitempty"` // Commitment Time. Value will only be returned for Priority Mail
	/*
		Commitment Sequence.

		Valid:

		"A0118", "B0118" = 1-Day at 6:00 PM

		"A0218", "B0218" = 2-Day at 6:00 PM
	*/
	CommitmentSeq string               `xml:"CommitmentSeq,omitempty"`
	Locations     []*ExpeditedLocation `xml:"Location,omitempty"` // Drop off location information
}

type ExpeditedLocation

type ExpeditedLocation struct {
	SDD     string `xml:"SDD,omitempty"`     // Scheduled Delivery Date
	COT     string `xml:"COT,omitempty"`     // Cut-off Time
	FacType string `xml:"FacType,omitempty"` // Facility Type
	Street  string `xml:"Street,omitempty"`  // Facility Street
	City    string `xml:"City,omitempty"`    // Facility City
	State   string `xml:"State,omitempty"`   // Facility State
	ZIP     string `xml:"ZIP,omitempty"`     // Facility Zip Code
	/*
		Indicates if Guarantee is offered for Priority Mail Express.

		Valid:

		“1” = Guaranteed

		“2” = No Guarantee

		“3” = Temporary No Guarantee
	*/
	IsGuaranteed string `xml:"IsGuaranteed,omitempty"`
}

type ExpressMailCommitment

type ExpressMailCommitment struct {
	Name     string                         `xml:"Name,omitempty"`
	Time     string                         `xml:"Time,omitempty"`
	Sequence string                         `xml:"Sequence,omitempty"`
	Location *ExpressMailCommitmentLocation `xml:"Location,omitempty"`
}

type ExpressMailCommitmentLocation

type ExpressMailCommitmentLocation struct {
	ScheduledDeliveryDate string `xml:"ScheduledDeliveryDate,omitempty"`
	CutOff                string `xml:"CutOff,omitempty"`
	Facility              string `xml:"Facility,omitempty"`
	Street                string `xml:"Street,omitempty"`
	City                  string `xml:"City,omitempty"`
	State                 string `xml:"State,omitempty"`
	Zip                   string `xml:"Zip,omitempty"`
	IsGuaranteed          string `xml:"IsGuaranteed,omitempty"`
}

type ExpressMailCommitmentRequest

type ExpressMailCommitmentRequest struct {
	OriginZIP      string `xml:"OriginZIP"`
	DestinationZIP string `xml:"DestinationZIP"`
	Date           string `xml:"Date"`
	DropOffTime    string `xml:"DropOffTime,omitempty"`
	ReturnDates    string `xml:"ReturnDates,omitempty"`
	PMGuarantee    string `xml:"PMGuarantee,omitempty"`
	// contains filtered or unexported fields
}

func (*ExpressMailCommitmentRequest) API

func (*ExpressMailCommitmentRequest) SetUser

func (r *ExpressMailCommitmentRequest) SetUser(USERID string)

Sets the USERID for the request.

type ExpressMailCommitmentResponse

type ExpressMailCommitmentResponse struct {
	OriginZip               string                   `xml:"OriginZip"`
	OriginCity              string                   `xml:"OriginCity"`
	OriginState             string                   `xml:"OriginState"`
	DestinationZip          string                   `xml:"DestinationZip"`
	DestinationCity         string                   `xml:"DestinationCity"`
	DestinationState        string                   `xml:"DestinationState"`
	Date                    string                   `xml:"Date"`
	Time                    string                   `xml:"Time"`
	ExpeditedTransMessage   string                   `xml:"ExpeditedTransMessage,omitempty"`
	MsgCode                 string                   `xml:"MsgCode,omitempty"`
	Msg                     string                   `xml:"Msg,omitempty"`
	EffectiveAcceptanceDate string                   `xml:"EffectiveAcceptanceDate,omitempty"`
	Commitment              []*ExpressMailCommitment `xml:"Commitment,omitempty"`
	Message                 string                   `xml:"Message,omitempty"`
}

type Facility

type Facility struct {
	FacilityID        string `xml:"FacilityID"`
	FacilityName      string `xml:"FacilityName"`
	FacilityAddress   string `xml:"FacilityAddress"`
	FacilityCity      string `xml:"FacilityCity"`
	FacilityState     string `xml:"FacilityState"`
	FacilityZIP       string `xml:"FacilityZIP"`
	FacilityZIP4      string `xml:"FacilityZIP4"`
	Has10amCommitment string `xml:"Has10amCommitment"`
}

type FirstClassMailRequest

type FirstClassMailRequest struct {
	OriginZIP       string `xml:"OriginZIP"`
	DestinationZIP  string `xml:"DestinationZIP"`
	DestinationType string `xml:"DestinationType,omitempty"`
	MailClass       string `xml:"MailClass"`
	// contains filtered or unexported fields
}

func (*FirstClassMailRequest) API

func (r *FirstClassMailRequest) API() string

func (*FirstClassMailRequest) SetUser

func (r *FirstClassMailRequest) SetUser(USERID string)

Sets the USERID for the request.

type FirstClassMailResponse

type FirstClassMailResponse struct {
	OriginZIP               string `xml:"OriginZIP"`
	DestinationZIP          string `xml:"DestinationZIP,omitempty"`
	Days                    string `xml:"Days,omitempty"`
	Message                 string `xml:"Message,omitempty"`
	EffectiveAcceptanceDate string `xml:"EffectiveAcceptanceDate,omitempty"`
	ScheduledDeliveryDate   string `xml:"ScheduledDeliveryDate,omitempty"`
}

type GlobalExcept

type GlobalExcept struct {
	PostCOT                    string    `xml:"PostCOT,omitempty"`              // Indicates if the mailpiece arrived after the Cut-Off Time
	OverMaxResults             string    `xml:"OverMaxResults,omitempty"`       // Indicates if more than the number of returned Hold for Pickup locations was found
	NoHFPULocInd               string    `xml:"NoHFPULocInd,omitempty"`         // Indicates if there were no locations found in the RAU that support Hold for Pickup
	NonExpeditedWTMsg          []string  `xml:"NonExpeditedWTMsg,omitempty"`    // Additional exception messaging
	GlobalNonExpeditedTransMsg *TransMsg `xml:"NonExpeditedTransMsg,omitempty"` // Non-Expedited Mail transportation messaging
}

type HFPFacilityInfoRequest

type HFPFacilityInfoRequest struct {
	PickupCity  string `xml:"PickupCity"`
	PickupState string `xml:"PickupState"`
	PickupZIP   string `xml:"PickupZIP"`
	PickupZIP4  string `xml:"PickupZIP4"`
	Service     string `xml:"Service,omitempty"`
	// contains filtered or unexported fields
}

func (*HFPFacilityInfoRequest) API

func (r *HFPFacilityInfoRequest) API() string

func (*HFPFacilityInfoRequest) SetUser

func (r *HFPFacilityInfoRequest) SetUser(USERID string)

Sets the USERID for the request.

type HFPFacilityInfoResponse

type HFPFacilityInfoResponse struct {
	*HFPFacilityInfoRequest
	USERID     string `xml:"-"`
	Facility   []*Facility
	LogMessage string `xml:"LogMessage,omitempty"`
}

func (HFPFacilityInfoResponse) SetUser

func (r HFPFacilityInfoResponse) SetUser(USERID string)

Sets the USERID for the request.

type HFPU

type HFPU struct {
	EAD             string           `xml:"EAD,omitempty"`              // Effective Acceptance Date
	COT             string           `xml:"COT,omitempty"`              // Cut-off time
	ServiceStandard *ServiceStandard `xml:"ServiceStandard,omitempty"`  // Hold for Pickup Service Standard Elements
	GlobalExcept    *GlobalExcept    `xml:"HFPUGlobalExcept,omitempty"` // Hold for Pickup Exception Elements
}

type NonExpedited

type NonExpedited struct {
	MailClass string `xml:"MailClass,omitempty"` // Mail Class
	/*
		Destination Type

		Valid:

		"1" = PO-Addressee - Street

		"2" = Destination - PO Box

		"3" = Hold for pickup (HFPU)
	*/
	NonExpeditedDestType   string                  `xml:"NonExpeditedDestType,omitempty"`
	EAD                    string                  `xml:"EAD,omitempty"`                    // Effective Acceptance Date
	SvcStdDays             string                  `xml:"SvcStdDays,omitempty"`             // Service Standard Days
	SchedDlvryDate         string                  `xml:"SchedDlvryDate,omitempty"`         // Scheduled Delivery Date
	HFPU                   *HFPU                   `xml:"HFPU,omitempty"`                   // Hold for Pickup information
	NonExpeditedExceptions *NonExpeditedExceptions `xml:"NonExpeditedExceptions,omitempty"` // Nonexpedited Exception Elements
}

type NonExpeditedExceptions

type NonExpeditedExceptions struct {
	NonExpeditedMsg      string    `xml:"NonExpeditedMsg,omitempty"`      // Additional exception messaging
	NonExpeditedTransMsg *TransMsg `xml:"NonExpeditedTransMsg,omitempty"` // Nonexpedited transportational messaging
}

type NonExpeditedLocation

type NonExpeditedLocation struct {
	ScheduledDeliveryDate string                  `xml:"SchedDlvryDate,omitempty"`         // Scheduled Delivery Date
	NonDeliveryDays       string                  `xml:"NonDeliveryDays,omitempty"`        // Non-Delivery Days
	RAUName               string                  `xml:"RAUName,omitempty"`                // RAU Name
	Street                string                  `xml:"Street,omitempty"`                 // RAU Street Address
	ZIP                   string                  `xml:"ZIP,omitempty"`                    // Facility ZIP Code
	City                  string                  `xml:"City,omitempty"`                   // RAU City
	State                 string                  `xml:"State,omitempty"`                  // RAU State.
	CloseTimes            *CloseTimes             `xml:"CloseTimes,omitempty"`             // Close times by day of the week for Hold for Pickup location
	NonExpeditedMsg       *NonExpeditedExceptions `xml:"NonExpeditedExceptions,omitempty"` // Additional exception messaging
}

type PriorityMailRequest

type PriorityMailRequest struct {
	OriginZIP       string `xml:"OriginZIP"`
	DestinationZIP  string `xml:"DestinationZIP"`
	DestinationType string `xml:"DestinationType,omitempty"`
	PMGuarantee     string `xml:"PMGuarantee,omitempty"`
	MailClass       string `xml:"MailClass"`
	// contains filtered or unexported fields
}

func (*PriorityMailRequest) API

func (r *PriorityMailRequest) API() string

func (*PriorityMailRequest) SetUser

func (r *PriorityMailRequest) SetUser(USERID string)

Sets the USERID for the request.

type PriorityMailResponse

type PriorityMailResponse struct {
	OriginZIP               string `xml:"OriginZIP"`
	DestinationZIP          string `xml:"DestinationZIP,omitempty"`
	Days                    string `xml:"Days,omitempty"`
	IsGuaranteed            string `xml:"IsGuaranteed,omitempty"`
	Message                 string `xml:"Message,omitempty"`
	EffectiveAcceptanceDate string `xml:"EffectiveAcceptanceDate,omitempty"`
	ScheduledDeliveryDate   string `xml:"ScheduledDeliveryDate,omitempty"`
	// contains filtered or unexported fields
}

type SDCGetLocationsRequest

type SDCGetLocationsRequest struct {

	/*
		Defines mail class for commitment data.

		Valid:

		"0" = All Mail Classes

		"1" = Priority Mail Express

		"2" = Priority Mail

		"3" = First Class Mail

		"4" = Marketing Mail

		"5" = Periodicals

		"6" = Package Services
	*/
	MailClass string `xml:"MailClass"`
	// The origin ZIP code. May be 3, 5, or 9 characters.
	OriginZIP string `xml:"OriginZIP"`
	// The destination Zip code. Must be a valid 5-character zip code.
	DestinationZIP string `xml:"DestinationZIP"`
	/*
	 The date the package will be mailed.
	 Acceptance date may be up to 30 days in advance.
	 Defaults to system date.

	 Format: YYYY-MM-DD

	 Example: "2014-09-23"
	*/
	AcceptDate string `xml:"AcceptDate,omitempty"`
	/*
		Time package will be accepted at a postal facility.
		Default value returned when no value is included in the request will be current time.

		Format: HHMM

		Example: "1600"
	*/
	AcceptTime string `xml:"AcceptTime,omitempty"`
	/*
		Returns additional detail for Non-Expedited mail classes when "True".
		Default: "False"
		Example:
	*/
	NonEMDetail string `xml:"NonEMDetail,omitempty"`
	/*
		Origin type indicator for non-Expedited shipments.

		Valid:

		"1" = Local Mail

		"2" = Destination Entered Mail
	*/
	NonEMOriginType string `xml:"NonEMOriginType,omitempty"`
	/*
		Destination type indicator for non-Expedited shipments.

		Valid:

		"1" = PO-Addressee - Street

		"2" = Destination - PO Box

		"3" = Hold for pickup (HFPU)
	*/
	NonEMDestType string `xml:"NonEMDestType,omitempty"`
	// Item weight
	Weight string `xml:"Weight,omitempty"`
	// contains filtered or unexported fields
}

SDCGetLocationsRequest is the request sent to the USPS ServiceDeliveryGetLocations API

func (*SDCGetLocationsRequest) API

func (r *SDCGetLocationsRequest) API() string

func (*SDCGetLocationsRequest) SetUser

func (r *SDCGetLocationsRequest) SetUser(USERID string)

Sets the USERID for the request.

type SDCGetLocationsResponse

type SDCGetLocationsResponse struct {
	Release                string          `xml:"Release"`                          // Release version
	CallerID               string          `xml:"CallerID"`                         // Caller ID
	SourceID               string          `xml:"SourceID"`                         // Source ID
	MailClass              string          `xml:"MailClass"`                        // MailClass from request
	OriginZIP              string          `xml:"OriginZIP"`                        // OriginZIP from request
	OriginCity             string          `xml:"OriginCity"`                       // Origin City
	OriginState            string          `xml:"OriginState"`                      // Origin State
	DestZIP                string          `xml:"DestZIP"`                          // Destination ZIP Code
	DestCity               string          `xml:"DestCity"`                         // Destination City
	DestState              string          `xml:"DestState"`                        // Destination State
	AcceptDate             string          `xml:"AcceptDate"`                       // Acceptance date at postal facility
	AcceptTime             string          `xml:"AcceptTime"`                       // Acceptance time at postal facility
	Weight                 string          `xml:"Weight,omitempty"`                 // Weight from request
	NonExpeditedOriginType string          `xml:"NonExpeditedOriginType,omitempty"` // Nonexpedited origin type from request
	Expedited              *Expedited      `xml:"Expedited,omitempty"`              // Groups Priority Mail Express Mail and Priority Mail Commitments and Effective Acceptance Dates
	NonExpedited           []*NonExpedited `xml:"NonExpedited,omitempty"`           // Non-Expedited Mail Class elements
}

SDCGetLocationsResponse is the expected response returned when sending SDCGetLocations request to USPS

type ServiceStandard

type ServiceStandard struct {
	ServiceStandardMessage string                `xml:"SvcStdMsg,omitempty"`  // Service Standard Message
	ServiceStandardDays    string                `xml:"SvcStdDays,omitempty"` // Service Standard Days
	Location               *NonExpeditedLocation `xml:"Location,omitempty"`   // Hold for Pickup Location information
}

type StandardBRequest

type StandardBRequest struct {
	OriginZIP       string `xml:"OriginZIP"`
	DestinationZIP  string `xml:"DestinationZIP"`
	DestinationType string `xml:"DestinationType,omitempty"`
	MailClass       string `xml:"MailClass"`
	// contains filtered or unexported fields
}

func (*StandardBRequest) API

func (r *StandardBRequest) API() string

func (*StandardBRequest) SetUser

func (r *StandardBRequest) SetUser(USERID string)

Sets the USERID for the request.

type StandardBResponse

type StandardBResponse struct {
	OriginZIP               string `xml:"OriginZIP"`
	DestinationZIP          string `xml:"DestinationZIP,omitempty"`
	Days                    string `xml:"Days,omitempty"`
	Message                 string `xml:"Message,omitempty"`
	EffectiveAcceptanceDate string `xml:"EffectiveAcceptanceDate,omitempty"`
	ScheduledDeliveryDate   string `xml:"ScheduledDeliveryDate,omitempty"`
	// contains filtered or unexported fields
}

type SundayHolidayRequest

type SundayHolidayRequest struct {
	SundayHoliday string `xml:"SundayHoliday"` // Select Sunday or Holiday
	FromZipCode   string `xml:"FromZipCode"`   // 5 digit zip code from ZipCode
	ToZipCode     string `xml:"ToZipCode"`     // 5 digit zip code to ZipCode
	// contains filtered or unexported fields
}

func (*SundayHolidayRequest) API

func (r *SundayHolidayRequest) API() string

func (*SundayHolidayRequest) SetUser

func (r *SundayHolidayRequest) SetUser(USERID string)

Sets the USERID for the request.

type SundayHolidayResponse

type SundayHolidayResponse struct {
	DeliveryAvailability string `xml:"DeliveryAvailability"` // Returns whether the lane Is eligible for delivery on day type selected.
	Error                string `xml:"Error,omitempty"`      // Returns error message if any.
}

type TransMsg

type TransMsg struct {
	MsgCode string `xml:"MsgCode,omitempty"` // Transportation messaging code
	Msg     string `xml:"Msg,omitempty"`     // Transportation messaging text
}

type Zip

type Zip struct {
	ID   string `xml:"ID,attr,omitempty"`
	ZIP5 string `xml:"Zip5"`
}

type ZipCodeLookupRequest

type ZipCodeLookupRequest struct {
	Address []*AddressRequest `xml:"Address"` // Up to 5 address verifications can be included per transaction.
	// contains filtered or unexported fields
}

func (*ZipCodeLookupRequest) API

func (r *ZipCodeLookupRequest) API() string

func (*ZipCodeLookupRequest) SetUser

func (r *ZipCodeLookupRequest) SetUser(USERID string)

Sets the USERID for the request.

type ZipCodeLookupResponse

type ZipCodeLookupResponse struct {
	Addresses []*AddressResponse `xml:"Address"`
}

type ZipResponse

type ZipResponse struct {
	*Zip
	City  string `xml:"City"`
	State string `xml:"State"`
}

Jump to

Keyboard shortcuts

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