fedex

package module
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 7 Imported by: 0

README

fedex

Some Fedex API support for GoLang (ATM just for tracking)

Fedex API's are one of those WDSL SOAP monster documented in a gigantic PDF file, don't we all love those.

I did not bother dealing with all of that here and only created what I needed so far.

I might add more over time but for now it provides:

  • Retrieving Tracking info by either: Tracking number, PO number, or shipper reference number (~order ID) The data is unmarshalled from SOAP into Go structures for more practical usage.

See fedex_example.go for usage examples

Note that you will need an API key and Password as well as Accont and Meter numbers from Fedex. See: http://images.fedex.com/ca_english/businesstools/webservices/Web_Services_Guide_ENG.pdf

Documentation

Overview

Package fedex provides access to () FedEx Soap API's and unmarshal answers into Go structures

Index

Constants

View Source
const (
	FedexAPIURL               = "https://ws.fedex.com:443/web-services"
	FedexAPITestURL           = "https://wsbeta.fedex.com:443/web-services"
	CarrierCodeExpress        = "FDXE"
	CarrierCodeGround         = "FDXG"
	CarrierCodeFreight        = "FXFR"
	CarrierCodeSmartPost      = "FXSP"
	CarrierCodeCustomCritical = "FXCC"
)

Convenience constants for standard Fedex API URLs

Variables

This section is empty.

Functions

This section is empty.

Types

type Fedex

type Fedex struct {
	api.API
}

Fedex : Utility to retrieve data from Fedex API Bypassing painful proper SOAP implementation and just crafting minimal XML messages to get the data we need. Fedex WSDL docs here: http://images.fedex.com/us/developer/product/WebServices/MyWebHelp/DeveloperGuide2012.pdf

func (Fedex) CreatePickup

func (f Fedex) CreatePickup(pickup *models.Pickup, startTime time.Time, endTime time.Time) (*models.PickupSuccess, error)

Retry logic is expected to be implemented by the caller

func (Fedex) Ship

func (f Fedex) Ship(shipment *models.Shipment) (*models.ProcessShipmentReply, error)

Directories

Path Synopsis
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
main uploads letterhead.png and signature.png to FedEx prod
main uploads letterhead.png and signature.png to FedEx prod

Jump to

Keyboard shortcuts

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