Documentation
¶
Index ¶
- func URLEncode(urlToEncode string) string
- type Address
- type AddressValidateResponse
- type CarrierPickupAvailabilityResponse
- type CarrierPickupChangeResponse
- type CarrierPickupInquiryResponse
- type CityStateLookupResponse
- type Error
- type Package
- type PickUpInquiryRequest
- type PickUpRequest
- type PickupChangeRequest
- type RateRequest
- type RateV4Response
- type TrackResponse
- type USPS
- func (U *USPS) AddressVerification(address Address) AddressValidateResponse
- func (U *USPS) CityStateLookup(zipcode ZipCode) CityStateLookupResponse
- func (U *USPS) GetRequest(requestURL string) []byte
- func (U *USPS) GetRequestHTTPS(requestURL string) []byte
- func (U *USPS) PickupAvailability(pickup PickUpRequest) CarrierPickupAvailabilityResponse
- func (U *USPS) PickupChange(pickup PickupChangeRequest) CarrierPickupChangeResponse
- func (U *USPS) PickupInquiry(pickup PickUpInquiryRequest) CarrierPickupInquiryResponse
- func (U *USPS) RateDomestic(rate RateRequest) RateV4Response
- func (U *USPS) TrackPackage(trackingID string) TrackResponse
- func (U *USPS) ZipCodeLookup(address Address) ZipCodeLookupResponse
- type ZipCode
- type ZipCodeLookupResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddressValidateResponse ¶
type CarrierPickupAvailabilityResponse ¶
type CarrierPickupAvailabilityResponse struct {
FirmName string `xml:"FirmName"`
SuiteOrApt string `xml:"SuiteOrApt"`
Address2 string `xml:"Address2"`
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"`
Error string `xml:"Error"`
}
type CarrierPickupChangeResponse ¶
type CarrierPickupChangeResponse 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 `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"`
Status string `xml:"Status"`
Error string `xml:"Error"`
}
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 []Package `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"`
Error string `xml:"Error"`
}
type CityStateLookupResponse ¶
type PickUpInquiryRequest ¶
type PickUpInquiryRequest 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"`
}
type PickUpRequest ¶
type PickupChangeRequest ¶
type PickupChangeRequest 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 `xml:"Package"`
EstimatedWeight string `xml:"EstimatedWeight"`
PackageLocation string `xml:"PackageLocation"`
SpecialInstructions string `xml:"SpecialInstructions"`
ConfirmationNumber string `xml:"ConfirmationNumber"`
}
type RateRequest ¶
type RateRequest struct {
XMLName xml.Name `xml:Package"`
Revision string `xml:"Revision"`
Service string `xml:"Service"`
ZipOrigination string `xml:"ZipOrigination"`
ZipDestination string `xml:"ZipDestination"`
Pounds string `xml:"Pounds"`
Ounces string `xml:"Ounces"`
Container string `xml:"Container"`
Size string `xml:"Size"`
Width string `xml:"Width"`
Length string `xml:"Length"`
Height string `xml:"Height"`
Girth string `xml:"Girth"`
}
type RateV4Response ¶
type RateV4Response struct {
}
type TrackResponse ¶
type TrackResponse struct {
TrackInfo struct {
TrackSummary string `xml:"TrackSummary"`
} `xml:"TrackInfo"`
}
type USPS ¶
func (*USPS) AddressVerification ¶
func (U *USPS) AddressVerification(address Address) AddressValidateResponse
func (*USPS) CityStateLookup ¶
func (U *USPS) CityStateLookup(zipcode ZipCode) CityStateLookupResponse
func (*USPS) GetRequest ¶
func (*USPS) GetRequestHTTPS ¶
func (*USPS) PickupAvailability ¶
func (U *USPS) PickupAvailability(pickup PickUpRequest) CarrierPickupAvailabilityResponse
func (*USPS) PickupChange ¶
func (U *USPS) PickupChange(pickup PickupChangeRequest) CarrierPickupChangeResponse
func (*USPS) PickupInquiry ¶
func (U *USPS) PickupInquiry(pickup PickUpInquiryRequest) CarrierPickupInquiryResponse
func (*USPS) RateDomestic ¶
func (U *USPS) RateDomestic(rate RateRequest) RateV4Response
func (*USPS) TrackPackage ¶
func (U *USPS) TrackPackage(trackingID string) TrackResponse
func (*USPS) ZipCodeLookup ¶
func (U *USPS) ZipCodeLookup(address Address) ZipCodeLookupResponse
Click to show internal directories.
Click to hide internal directories.