Documentation ¶
Index ¶
- Constants
- type Address
- type AddressInput
- type Batch
- type BatchInput
- type BatchObjectResults
- type BatchShipment
- type BatchShipmentInput
- type BatchShipmentList
- type CarrierAccount
- type CarrierAccountInput
- type CommonOutputFields
- type CustomsDeclaration
- type CustomsDeclarationInput
- type CustomsItem
- type CustomsItemInput
- type ListAPIOutput
- type Manifest
- type ManifestInput
- type OutputMessage
- type Parcel
- type ParcelCOD
- type ParcelExtra
- type ParcelInput
- type ParcelInsurance
- type Rate
- type Refund
- type RefundInput
- type ServiceLevel
- type Shipment
- type ShipmentBilling
- type ShipmentCOD
- type ShipmentExtra
- type ShipmentInput
- type ShipmentInsurance
- type TrackingStatus
- type TrackingStatusDict
- type TrackingStatusInput
- type TrackingStatusLocation
- type Transaction
- type TransactionInput
- type ValidationResults
Constants ¶
View Source
const ( AddressObjectSourceFullyEntered = "FULLY_ENTERED" AddressObjectSourcePartiallyEntered = "PARTIALLY_ENTERED" AddressObjectSourceValidator = "VALIDATOR" )
View Source
const ( CarrierAustraliaPost = "australia_post" CarrierCanadaPost = "canada_post" CarrierDeutschePost = "deutsche_post" CarrierDHLGermany = "dhl_germany" CarrierDHLeCommerce = "dhl_ecommerce" CarrierDHLExpress = "dhl_express" CarrierFedEx = "fedex" CarrierGLSGermany = "gls_de" CarrierGLSFrance = "gls_fr" CarrierLasership = "lasership" CarrierMondialRelay = "mondial_relay" CarrierNewgistics = "newgistics" CarrierOnTrac = "ontrac" CarrierPurolator = "purolator" CarrierUPS = "ups" CarrierUSPS = "usps" ObjectStateValid = "VALID" ObjectStateInvalid = "INVALID" StatusWaiting = "WAITING" StatusQueued = "QUEUED" StatusSuccess = "SUCCESS" StatusError = "ERROR" StatusRefunded = "REFUNDED" StatusRefundPending = "REFUNDPENDING" StatusRefundRejected = "REFUNDREJECTED" StatusPending = "PENDING" StatusValidating = "VALIDATING" StatusValid = "VALID" StatusInvalid = "INVALID" StatusPurchasing = "PURCHASING" StatusPurchased = "PURCHASED" StatusIncomplete = "INCOMPLETE" StatusTransactionFailed = "TRANSACTION_FAILED" InsuranceProviderFedEx = "FEDEX" InsuranceProviderUPS = "UPS" InsuranceProviderOnTrac = "ONTRAC" CODPaymentMethodSecuredFunds = "SECURED_FUNDS" CODPaymentMethodCash = "CASH" CODPaymentMethodAny = "ANY" DistanceUnitCentiMeter = "cm" DistanceUnitInch = "in" DistanceUnitFoot = "ft" DistanceUnitMilliMeter = "mm" DistanceUnitMeter = "m" DistanceUnitYard = "yd" MassUnitGram = "g" MassUnitOunce = "oz" MassUnitPound = "lb" MassUnitKiloGram = "kg" LabelFileTypePNG = "PNG" LabelFileTypePDF = "PDF" LabelFileTypePDF4X6 = "PDF_4X6" LabelFileTypeZPLII = "ZPLII" )
View Source
const ( CustomsNonDeliveryOptionAbandon = "ABANDON" CustomsNonDeliveryOptionReturn = "RETURN" CustomsContentsTypeDocuments = "DOCUMENTS" CustomsContentsTypeGift = "GIFT" CustomsContentsTypeSample = "SAMPLE" CustomsContentsTypeHumanitarianDonation = "HUMANITARIAN_DONATION" CustomsContentsTypeReturnMerchandise = "RETURN_MERCHANDISE" CustomsContentsTypeOther = "OTHER" CustomsEEL_PFC_NOEEI_30_37_A = "NOEEI_30_37_a" CustomsEEL_PFC_NOEEI_30_37_H = "NOEEI_30_37_h" CustomsEEL_PFC_NOEEI_30_37_F = "NOEEI_30_37_f" CustomsEEL_PFC_NOEEI_30_36 = "NOEEI_30_36" CustomsEEL_PFC_AES_ITN = "AES_ITN" CustomsIncotermDDP = "DDP" CustomsIncotermDDU = "DDU" CustomsIncotermCPT = "CPT" CustomsIncotermCIP = "CIP" )
View Source
const ( ShipmentExtraSignatureConfirmationStandard = "STANDARD" ShipmentExtraSignatureConfirmationAdult = "ADULT" ShipmentExtraSignatureConfirmationCertified = "CERTIFIED" ShipmentBillingTypeSender = "SENDER" ShipmentBillingTypeRecipient = "RECIPIENT" ShipmentBillingTypeThirdParty = "THIRD_PARTY" ShipmentUSPSSortTypeNDC = "NDC" ShipmentUSPSSortTypeFiveDigit = "FiveDigit" ShipmentUSPSSortTypeMixedNDC = "MixedNDC" ShipmentUSPSSortTypeNonPresorted = "Nonpresorted" ShipmentUSPSSortTypePresorted = "Presorted" ShipmentUSPSSortTypeSCF = "SCF" ShipmentUSPSSortTypeSinglePiece = "SinglePiece" ShipmentUSPSSortTypeThreeDigit = "ThreeDigit" ShipmentUSPSEntryFacilityDNDC = "DNDC" ShipmentUSPSEntryFacilityDDU = "DDU" ShipmentUSPSEntryFacilityDSCF = "DSCF" ShipmentUSPSEntryFacilityONDC = "ONDC" ShipmentUSPSEntryFacilityOther = "Other" ShipmentDangerousGoodsCode01 = "01" ShipmentDangerousGoodsCode02 = "02" ShipmentDangerousGoodsCode03 = "03" ShipmentDangerousGoodsCode04 = "04" ShipmentDangerousGoodsCode05 = "05" ShipmentDangerousGoodsCode06 = "06" ShipmentDangerousGoodsCode07 = "07" ShipmentDangerousGoodsCode08 = "08" ShipmentDangerousGoodsCode09 = "019" )
View Source
const ( TrackingStatusStatusUnknown = "UNKNOWN" TrackingStatusStatusDelivered = "DELIVERED" TrackingStatusStatusTransit = "TRANSIT" TrackingStatusStatusFailure = "FAILURE" TrackingStatusStatusReturned = "RETURNED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { AddressInput CommonOutputFields IsComplete bool `json:"is_complete"` Test bool `json:"test"` ValidationResults *ValidationResults `json:"validation_results"` }
type AddressInput ¶
type AddressInput struct { Name string `json:"name,omitempty"` Company string `json:"company,omitempty"` Street1 string `json:"street1,omitempty"` StreetNo string `json:"street_no,omitempty"` Street2 string `json:"street2,omitempty"` Street3 string `json:"street3,omitempty"` City string `json:"city,omitempty"` Zip string `json:"zip,omitempty"` State string `json:"state,omtiempty"` Country string `json:"country,omitempty"` Phone string `json:"phone,omitempty"` Email string `json:"email,omitempty"` IsResidential bool `json:"is_residential"` Validate bool `json:"validate"` Metadata string `json:"metadata,omitempty"` }
type Batch ¶
type Batch struct { //BatchInput // seems that output format is slightly different CommonOutputFields Status string `json:"status,omitempty"` DefaultCarrierAccount string `json:"default_carrier_account,omitempty"` DefaultServiceLevelToken string `json:"default_servicelevel_token,omitempty"` LabelFileType string `json:"label_filetype,omitempty"` Metadata string `json:"metadata,omitempty"` BatchShipments *BatchShipmentList `json:"batch_shipments"` LabelURL []string `json:"label_url"` ObjectResults *BatchObjectResults `json:"object_results"` }
type BatchInput ¶
type BatchInput struct { DefaultCarrierAccount string `json:"default_carrier_account,omitempty"` DefaultServiceLevelToken string `json:"default_servicelevel_token,omitempty"` LabelFileType string `json:"label_filetype,omitempty"` Metadata string `json:"metadata,omitempty"` BatchShipments []*BatchShipmentInput `json:"batch_shipments"` }
type BatchObjectResults ¶
type BatchShipment ¶
type BatchShipment struct { BatchShipmentInput CommonOutputFields Transaction string `json:"transaction"` Messages []json.RawMessage `json:"messages"` // cannot find format in documentation }
See https://goshippo.com/docs/reference#batches-batchshipments
type BatchShipmentInput ¶
type BatchShipmentInput struct { CarrierAccount string `json:"carrier_account,omitempty"` ServiceLevelToken string `json:"servicelevel_token,omitempty"` Shipment string `json:"shipment"` Metadata string `json:"metadata,omitempty"` }
See https://goshippo.com/docs/reference#batches-batchshipments
type BatchShipmentList ¶
type BatchShipmentList struct { Count int `json:"count"` Next string `json:"next,omitempty"` Previous string `json:"previous,omitempty"` Results []*BatchShipment `json:"results"` }
type CarrierAccount ¶
type CarrierAccount struct { CarrierAccountInput CommonOutputFields Test bool `json:"test"` }
type CarrierAccountInput ¶
type CommonOutputFields ¶
type CustomsDeclaration ¶
type CustomsDeclaration struct { CustomsDeclarationInput CommonOutputFields ObjectState string `json:"object_state,omitempty"` Test bool `json:"test"` }
type CustomsDeclarationInput ¶
type CustomsDeclarationInput struct { CertifySigner string `json:"certify_signer"` Certify bool `json:"certify"` Items interface{} `json:"items"` // []string or []*CustomsItemInput NonDeliveryOption string `json:"non_delivery_option"` ContentsType string `json:"contents_type"` ContentsExplanation string `json:"contents_explanation,omitempty"` ExporterReference string `json:"exporter_reference,omitempty"` Invoice string `json:"invoice,omitempty"` License string `json:"license,omitempty"` Certificate string `json:"certificate,omitempty"` Notes string `json:"notes,omitempty"` EEL_PFC string `json:"eel_pfc,omitempty"` AES_ITN string `json:"aes_itn,omitempty"` Incoterm string `json:"incoterm,omitempty"` Metadata string `json:"metadata,omitempty"` Disclaimer string `json:"disclaimer,omitempty"` // contains filtered or unexported fields }
type CustomsItem ¶
type CustomsItem struct { CustomsItemInput CommonOutputFields ObjectState string `json:"object_state,omitempty"` Test bool `json:"test"` }
type CustomsItemInput ¶
type CustomsItemInput struct { Description string `json:"description"` Quantity int `json:"quantity"` NetWeight string `json:"net_weight"` MassUnit string `json:"mass_unit"` ValueAmount string `json:"value_amount"` ValueCurrency string `json:"value_currency"` OriginCountry string `json:"origin_country"` TariffNumber string `json:"tariff_number,omitempty"` Metadata string `json:"metadata,omitempty"` }
type ListAPIOutput ¶
type ListAPIOutput struct { Count int `json:"count"` NextPageURL *string `json:"next"` PreviousPageURL *string `json:"previous"` Results []json.RawMessage `json:"results"` }
type Manifest ¶
type Manifest struct { ManifestInput CommonOutputFields State string `json:"state,omitempty"` }
type ManifestInput ¶
type ManifestInput struct { CarrierAccount string `json:"carrier_account,omitempty"` ShipmentDate time.Time `json:"shipment_date,omitempty"` AddressFrom string `json:"address_from,omitempty"` Transactions []string `json:"transactions,omitempty"` Documents []string `json:"documents,omitempty"` Async bool `json:"async"` }
type OutputMessage ¶
type Parcel ¶
type Parcel struct { ParcelInput CommonOutputFields ObjectState string `json:"object_state,omitempty"` Test bool `json:"test"` }
type ParcelExtra ¶
type ParcelExtra struct { COD *ParcelCOD `json:"COD,omitempty"` Insurance *ParcelInsurance `json:"insurance,omitempty"` Reference1 string `json:"reference_1,omitempty"` Reference2 string `json:"reference_2,omitempty"` }
type ParcelInput ¶
type ParcelInput struct { Length string `json:"length"` Width string `json:"width"` Height string `json:"height"` DistanceUnit string `json:"distance_unit"` Weight string `json:"weight"` MassUnit string `json:"mass_unit"` Template string `json:"template,omitempty"` // https://goshippo.com/docs/reference#parceltemplates Extra *ParcelExtra `json:"extra,omitempty"` Metadata string `json:"metadata,omitempty"` }
type ParcelInsurance ¶
type Rate ¶
type Rate struct { CommonOutputFields Attributes []string `json:"attributes"` AmountLocal string `json:"amount_local"` CurrencyLocal string `json:"currency_local"` Amount string `json:"amount"` Currency string `json:"currency"` Provider string `json:"provider"` ProviderImage75 string `json:"provider_image_75"` ProviderImage200 string `json:"provider_image_200"` ServiceLevel *ServiceLevel `json:"servicelevel"` Days int `json:"days"` DurationTerms string `json:"duration_terms"` CarrierAccount string `json:"carrier_account"` Zone string `json:"zone"` Messages []*OutputMessage `json:"messages"` Test bool `json:"test"` }
type Refund ¶
type Refund struct { RefundInput CommonOutputFields Status string `json:"status,omitempty"` Test bool `json:"test"` }
type RefundInput ¶
type ServiceLevel ¶
type ServiceLevel struct { Name string `json:"name"` Token string `json:"token"` // https://goshippo.com/docs/reference#servicelevels Terms string `json:"terms"` }
type Shipment ¶
type Shipment struct { CommonOutputFields Status string `json:"status,omitempty"` AddressFrom *Address `json:"address_from,omitempty"` AddressTo *Address `json:"address_to,omitempty"` Parcels []*Parcel `json:"parcels,omitempty"` AddressReturn *Address `json:"address_return,omitempty"` CustomsDeclaration *CustomsDeclaration `json:"customs_declaration,omitempty"` Rates []*Rate `json:"rates,omitempty"` Messages []*OutputMessage `json:"messages,omitempty"` Test bool `json:"test,omitempty"` }
type ShipmentBilling ¶
type ShipmentCOD ¶
type ShipmentExtra ¶
type ShipmentExtra struct { SignatureConfirmation string `json:"signature_confirmation,omitempty"` SaturdayDelivery bool `json:"saturday_delivery"` BypassAddressValidation bool `json:"bypass_address_validation"` RequestRetailRates bool `json:"request_retail_rates"` CustomerBranch string `json:"customer_branch,omitempty"` Billing *ShipmentBilling `json:"billing,omitempty"` COD *ShipmentCOD `json:"COD,omitempty"` Insurance *ShipmentInsurance `json:"insurance,omitempty"` USPSSortType string `json:"usps_sort_type,omitempty"` USPSEntryFacility string `json:"usps_entry_facility,omitempty"` DangerousGoodsCode string `json:"dangerous_goods_code,omitempty"` IsReturn bool `json:"is_return,omitempty"` Reference1 string `json:"reference_1,omitempty"` Reference2 string `json:"reference_2,omitempty"` }
type ShipmentInput ¶
type ShipmentInput struct { AddressFrom interface{} `json:"address_from"` // string or *AddressInput AddressTo interface{} `json:"address_to"` // string or *AddressInput Parcels interface{} `json:"parcels"` // string, []string, *ParcelInput, or []*ParcelInput AddressReturn interface{} `json:"address_return,omitempty"` // string or *AddressInput CustomsDeclaration interface{} `json:"customs_declaration,omitempty"` // string or *CustomsDeclarationInput ShipmentDate time.Time `json:"shipment_date,omitempty"` CarrierAccounts []string `json:"carrier_accounts,omitempty"` Metadata string `json:"metadata,omitempty"` Extra *ShipmentExtra `json:"extra,omitempty"` Async bool `json:"async"` }
type ShipmentInsurance ¶
type TrackingStatus ¶
type TrackingStatus struct { TrackingStatusInput AddressFrom *TrackingStatusLocation `json:"address_from,omitempty"` AddressTo *TrackingStatusLocation `json:"address_to,omitempty"` ETA time.Time `json:"eta"` ServiceLevel *ServiceLevel `json:"servicelevel,omitempty"` TrackingStatus *TrackingStatusDict `json:"tracking_status,omitempty"` TrackingHistory []*TrackingStatusDict `json:"tracking_history,omitempty"` }
type TrackingStatusDict ¶
type TrackingStatusDict struct { Status string `json:"status,omitempty"` StatusDetails string `json:"status_details,omitempty"` StatusDate time.Time `json:"status_date,omitempty"` Location *TrackingStatusLocation `json:"location,omitempty"` }
type TrackingStatusInput ¶
type TrackingStatusLocation ¶
type Transaction ¶
type Transaction struct { TransactionInput CommonOutputFields ObjectState string `json:"object_state,omitempty"` Status string `json:"status,omitempty"` Test bool `json:"test"` TrackingNumber string `json:"tracking_number,omitempty"` TrackingStatus string `json:"tracking_status,omitempty"` TrackingHistory []*TrackingStatusDict `json:"tracking_history,omitempty"` TrackingURLProvider string `json:"tracking_url_provider,omitempty"` LabelURL string `json:"label_url,omitempty"` CommercialInvoiceURL string `json:"commercial_invoice_url,omitempty"` Messages []*OutputMessage `json:"messages,omitempty"` Async bool `json:"async"` }
type TransactionInput ¶
type TransactionInput struct { Rate string `json:"rate,omitempty"` Metadata string `json:"metadata,omitempty"` LabelFileType string `json:"label_file_type"` Async bool `json:"async"` Shipment *ShipmentInput `json:"shipment,omitempty"` // instant call only: https://goshippo.com/docs/reference#transactions-create-instant CarrierAccount string `json:"carrier_account,omitempty"` // instant call only: https://goshippo.com/docs/reference#transactions-create-instant ServerLevelToken string `json:"servericelevel_token, omitempty"` // instant call only: https://goshippo.com/docs/reference#transactions-create-instant }
type ValidationResults ¶
type ValidationResults struct { IsValid bool `json:"is_valid"` Messages []*OutputMessage `json:"messages"` }
Click to show internal directories.
Click to hide internal directories.