Documentation
¶
Overview ¶
Package uspsinternal 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 NewGetAddressRequest(server string, params *GetAddressParams) (*http.Request, error)
- func NewGetCityStateRequest(server string, params *GetCityStateParams) (*http.Request, error)
- func NewGetZIPCodeRequest(server string, params *GetZIPCodeParams) (*http.Request, error)
- type Address
- type AddressAdditionalInfo
- type AddressAdditionalInfoBusiness
- type AddressAdditionalInfoCentralDeliveryPoint
- type AddressAdditionalInfoDPVCMRA
- type AddressAdditionalInfoDPVConfirmation
- type AddressAdditionalInfoVacant
- type AddressCorrections
- type AddressMatches
- type AddressResponse
- type CityAndState
- type CityStateResponse
- type Client
- func (c *Client) GetAddress(ctx context.Context, params *GetAddressParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCityState(ctx context.Context, params *GetCityStateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetZIPCode(ctx context.Context, params *GetZIPCodeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetAddressWithResponse(ctx context.Context, params *GetAddressParams, reqEditors ...RequestEditorFn) (*GetAddressResponse, error)
- func (c *ClientWithResponses) GetCityStateWithResponse(ctx context.Context, params *GetCityStateParams, reqEditors ...RequestEditorFn) (*GetCityStateResponse, error)
- func (c *ClientWithResponses) GetZIPCodeWithResponse(ctx context.Context, params *GetZIPCodeParams, reqEditors ...RequestEditorFn) (*GetZIPCodeResponse, error)
- type ClientWithResponsesInterface
- type DomesticAddress
- type ErrorMessage
- type ErrorMessage_Error
- type ErrorMessage_Error_Errors_Item
- func (a ErrorMessage_Error_Errors_Item) Get(fieldName string) (value interface{}, found bool)
- func (a ErrorMessage_Error_Errors_Item) MarshalJSON() ([]byte, error)
- func (a *ErrorMessage_Error_Errors_Item) Set(fieldName string, value interface{})
- func (a *ErrorMessage_Error_Errors_Item) UnmarshalJSON(b []byte) error
- type ErrorMessage_Error_Errors_Source
- func (a ErrorMessage_Error_Errors_Source) Get(fieldName string) (value interface{}, found bool)
- func (a ErrorMessage_Error_Errors_Source) MarshalJSON() ([]byte, error)
- func (a *ErrorMessage_Error_Errors_Source) Set(fieldName string, value interface{})
- func (a *ErrorMessage_Error_Errors_Source) UnmarshalJSON(b []byte) error
- type GetAddressParams
- type GetAddressResponse
- type GetCityStateParams
- type GetCityStateResponse
- type GetZIPCodeParams
- type GetZIPCodeResponse
- type HttpRequestDoer
- type RequestEditorFn
- type State
- type ZIPCodeResponse
Constants ¶
const (
OAuthScopes = "OAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewGetAddressRequest ¶
func NewGetAddressRequest(server string, params *GetAddressParams) (*http.Request, error)
NewGetAddressRequest generates requests for GetAddress
func NewGetCityStateRequest ¶
func NewGetCityStateRequest(server string, params *GetCityStateParams) (*http.Request, error)
NewGetCityStateRequest generates requests for GetCityState
func NewGetZIPCodeRequest ¶
func NewGetZIPCodeRequest(server string, params *GetZIPCodeParams) (*http.Request, error)
NewGetZIPCodeRequest generates requests for GetZIPCode
Types ¶
type Address ¶
type Address struct {
// CityAbbreviation This is the abbreviation of the city name for the address.
CityAbbreviation *string `json:"cityAbbreviation,omitempty"`
// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building. For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
SecondaryAddress *string `json:"secondaryAddress,omitempty"`
// StreetAddress The number of a building along with the name of the road or street on which it is located.
StreetAddress *string `json:"streetAddress,omitempty"`
// StreetAddressAbbreviation This is the abbreviation of the primary street address line for the address.
StreetAddressAbbreviation *string `json:"streetAddressAbbreviation,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
Address Address fields standard to all locations.
func (Address) Get ¶
Getter for additional properties for Address. Returns the specified element and whether it was found
func (Address) MarshalJSON ¶
Override default JSON handling for Address to handle AdditionalProperties
func (*Address) UnmarshalJSON ¶
Override default JSON handling for Address to handle AdditionalProperties
type AddressAdditionalInfo ¶
type AddressAdditionalInfo struct {
// DPVCMRA Indicates if the location is a [Commercial Mail Receiving Agency (CMRA)](https://faq.usps.com/s/article/Commercial-Mail-Receiving-Agency-CMRA).
// * `Y` - Address was found in the CMRA table.
// * `N` - Address was not found in the CMRA table.
DPVCMRA *AddressAdditionalInfoDPVCMRA `json:"DPVCMRA,omitempty"`
// DPVConfirmation The DPV Confirmation indicator identifies whether the address provided maps to a known USPS address record, whether the USPS delivers to the address or not. If the USPS does not deliver to the address, the USPS may deliver to a PO Box instead. `carrierRoute` values of `R777` and `R779`, for example, may require the shipper to ask the recipient where they receive their USPS mail, which may be different than their physical address.
//
// * `Y` - Address was DPV confirmed for both primary and (if present) secondary numbers. A value of `Y` does not necessarily imply that USPS delivers to that address.
// * `D` - Address was DPV confirmed for the primary number only, and the secondary number information was missing.
// * `S` - Address was DPV confirmed for the primary number only, and the secondary number information was present but not confirmed.
// * `N` - Both primary and (if present) secondary number information failed to DPV confirm.
DPVConfirmation *AddressAdditionalInfoDPVConfirmation `json:"DPVConfirmation,omitempty"`
// Business Indicates whether this is a business address.
// * `Y` - The address is a business address.
// * `N` - The address is not a business address.
Business *AddressAdditionalInfoBusiness `json:"business,omitempty"`
// CarrierRoute This is the carrier route code (values unspecified).
CarrierRoute *string `json:"carrierRoute,omitempty"`
// CentralDeliveryPoint Central Delivery is for all business office buildings and/or industrial/professional parks. This may include call windows, horizontal locked mail receptacles, and cluster box units.
// * `Y` - The address is a central delivery point.
// * `N` - The address is not a central delivery point.
CentralDeliveryPoint *AddressAdditionalInfoCentralDeliveryPoint `json:"centralDeliveryPoint,omitempty"`
// DeliveryPoint A specific set of digits between 00 and 99 is assigned to every address that is combined with the ZIP + 4® Code to provide a unique identifier for every delivery address.
//
// A street address does not necessarily represent a single delivery point because a street address such as one for an apartment building may have several delivery points.
DeliveryPoint *string `json:"deliveryPoint,omitempty"`
// Vacant Indicates whether the location designated by the address is occupied.
// * `Y` - The address is not occupied.
// * `N` - The address is occupied.
Vacant *AddressAdditionalInfoVacant `json:"vacant,omitempty"`
}
AddressAdditionalInfo Extra information about the request.
type AddressAdditionalInfoBusiness ¶
type AddressAdditionalInfoBusiness string
AddressAdditionalInfoBusiness Indicates whether this is a business address. * `Y` - The address is a business address. * `N` - The address is not a business address.
const ( AddressAdditionalInfoBusinessN AddressAdditionalInfoBusiness = "N" AddressAdditionalInfoBusinessY AddressAdditionalInfoBusiness = "Y" )
Defines values for AddressAdditionalInfoBusiness.
type AddressAdditionalInfoCentralDeliveryPoint ¶
type AddressAdditionalInfoCentralDeliveryPoint string
AddressAdditionalInfoCentralDeliveryPoint Central Delivery is for all business office buildings and/or industrial/professional parks. This may include call windows, horizontal locked mail receptacles, and cluster box units. * `Y` - The address is a central delivery point. * `N` - The address is not a central delivery point.
const ( AddressAdditionalInfoCentralDeliveryPointN AddressAdditionalInfoCentralDeliveryPoint = "N" AddressAdditionalInfoCentralDeliveryPointY AddressAdditionalInfoCentralDeliveryPoint = "Y" )
Defines values for AddressAdditionalInfoCentralDeliveryPoint.
type AddressAdditionalInfoDPVCMRA ¶
type AddressAdditionalInfoDPVCMRA string
AddressAdditionalInfoDPVCMRA Indicates if the location is a [Commercial Mail Receiving Agency (CMRA)](https://faq.usps.com/s/article/Commercial-Mail-Receiving-Agency-CMRA).
- `Y` - Address was found in the CMRA table.
- `N` - Address was not found in the CMRA table.
const ( AddressAdditionalInfoDPVCMRAN AddressAdditionalInfoDPVCMRA = "N" AddressAdditionalInfoDPVCMRAY AddressAdditionalInfoDPVCMRA = "Y" )
Defines values for AddressAdditionalInfoDPVCMRA.
type AddressAdditionalInfoDPVConfirmation ¶
type AddressAdditionalInfoDPVConfirmation string
AddressAdditionalInfoDPVConfirmation The DPV Confirmation indicator identifies whether the address provided maps to a known USPS address record, whether the USPS delivers to the address or not. If the USPS does not deliver to the address, the USPS may deliver to a PO Box instead. `carrierRoute` values of `R777` and `R779`, for example, may require the shipper to ask the recipient where they receive their USPS mail, which may be different than their physical address.
* `Y` - Address was DPV confirmed for both primary and (if present) secondary numbers. A value of `Y` does not necessarily imply that USPS delivers to that address. * `D` - Address was DPV confirmed for the primary number only, and the secondary number information was missing. * `S` - Address was DPV confirmed for the primary number only, and the secondary number information was present but not confirmed. * `N` - Both primary and (if present) secondary number information failed to DPV confirm.
const ( AddressAdditionalInfoDPVConfirmationD AddressAdditionalInfoDPVConfirmation = "D" AddressAdditionalInfoDPVConfirmationN AddressAdditionalInfoDPVConfirmation = "N" AddressAdditionalInfoDPVConfirmationS AddressAdditionalInfoDPVConfirmation = "S" AddressAdditionalInfoDPVConfirmationY AddressAdditionalInfoDPVConfirmation = "Y" )
Defines values for AddressAdditionalInfoDPVConfirmation.
type AddressAdditionalInfoVacant ¶
type AddressAdditionalInfoVacant string
AddressAdditionalInfoVacant Indicates whether the location designated by the address is occupied. * `Y` - The address is not occupied. * `N` - The address is occupied.
const ( N AddressAdditionalInfoVacant = "N" Y AddressAdditionalInfoVacant = "Y" )
Defines values for AddressAdditionalInfoVacant.
type AddressCorrections ¶
type AddressCorrections = []struct {
// Code The code corresponding to the address correction.
Code *string `json:"code,omitempty"`
// Text This is the description of the address correction.
Text *string `json:"text,omitempty"`
}
AddressCorrections Codes that indicate how to improve the address input to get a better match.
Code `32` will indicate "Default address: The address you entered was found but more information is needed (such as an apartment, suite, or box number." The recommended change would be to add additional information, such as an apartment, suite, or box number, to match to a specific address.
Code `22` will indicate "Multiple addresses were found for the information you entered, and no default exists." The address could not be resolved as entered and more information would be needed to identify the address.
type AddressMatches ¶
type AddressMatches = []struct {
Code *string `json:"code,omitempty"`
Text *string `json:"text,omitempty"`
}
AddressMatches Codes that indicate if an address is an exact match.
Code `31` will be returned "Single Response - exact match" indicating that the address was correctly matched to a ZIP+4 record.
type AddressResponse ¶
type AddressResponse struct {
// AdditionalInfo Extra information about the request.
AdditionalInfo *AddressAdditionalInfo `json:"additionalInfo,omitempty"`
// Address Address fields for US locations
Address *DomesticAddress `json:"address,omitempty"`
// Corrections Codes that indicate how to improve the address input to get a better match.
//
// Code `32` will indicate "Default address: The address you entered was found but more information is needed (such as an apartment, suite, or box number." The recommended change would be to add additional information, such as an apartment, suite, or box number, to match to a specific address.
//
// Code `22` will indicate "Multiple addresses were found for the information you entered, and no default exists." The address could not be resolved as entered and more information would be needed to identify the address.
Corrections *AddressCorrections `json:"corrections,omitempty"`
// Firm This is the firm/business name at the address.
Firm *string `json:"firm,omitempty"`
// Matches Codes that indicate if an address is an exact match.
//
// Code `31` will be returned "Single Response - exact match" indicating that the address was correctly matched to a ZIP+4 record.
Matches *AddressMatches `json:"matches,omitempty"`
Warnings *[]string `json:"warnings,omitempty"`
}
AddressResponse Standardizes street addresses including city and street abbreviations, and provides missing information such as ZIP Code™ and ZIP + 4®.
type CityAndState ¶
type CityAndState struct {
// ZIPCode This is the ZIP Code of the address.
ZIPCode *string `json:"ZIPCode,omitempty"`
// City This is the city name of the address.
City *string `json:"city,omitempty"`
// State This is two-character state code of the address.
State *string `json:"state,omitempty"`
}
CityAndState defines model for CityAndState.
type CityStateResponse ¶
type CityStateResponse = CityAndState
CityStateResponse defines model for CityStateResponse.
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) GetAddress ¶
func (c *Client) GetAddress(ctx context.Context, params *GetAddressParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetCityState ¶
func (c *Client) GetCityState(ctx context.Context, params *GetCityStateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetZIPCode ¶
func (c *Client) GetZIPCode(ctx context.Context, params *GetZIPCodeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// GetAddress request
GetAddress(ctx context.Context, params *GetAddressParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCityState request
GetCityState(ctx context.Context, params *GetCityStateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetZIPCode request
GetZIPCode(ctx context.Context, params *GetZIPCodeParams, 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) GetAddressWithResponse ¶
func (c *ClientWithResponses) GetAddressWithResponse(ctx context.Context, params *GetAddressParams, reqEditors ...RequestEditorFn) (*GetAddressResponse, error)
GetAddressWithResponse request returning *GetAddressResponse
func (*ClientWithResponses) GetCityStateWithResponse ¶
func (c *ClientWithResponses) GetCityStateWithResponse(ctx context.Context, params *GetCityStateParams, reqEditors ...RequestEditorFn) (*GetCityStateResponse, error)
GetCityStateWithResponse request returning *GetCityStateResponse
func (*ClientWithResponses) GetZIPCodeWithResponse ¶
func (c *ClientWithResponses) GetZIPCodeWithResponse(ctx context.Context, params *GetZIPCodeParams, reqEditors ...RequestEditorFn) (*GetZIPCodeResponse, error)
GetZIPCodeWithResponse request returning *GetZIPCodeResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetAddressWithResponse request
GetAddressWithResponse(ctx context.Context, params *GetAddressParams, reqEditors ...RequestEditorFn) (*GetAddressResponse, error)
// GetCityStateWithResponse request
GetCityStateWithResponse(ctx context.Context, params *GetCityStateParams, reqEditors ...RequestEditorFn) (*GetCityStateResponse, error)
// GetZIPCodeWithResponse request
GetZIPCodeWithResponse(ctx context.Context, params *GetZIPCodeParams, reqEditors ...RequestEditorFn) (*GetZIPCodeResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DomesticAddress ¶
type DomesticAddress struct {
// ZIPCode This is the 5-digit ZIP code.
ZIPCode *string `json:"ZIPCode,omitempty"`
// ZIPPlus4 This is the 4-digit component of the ZIP+4 code. Using the correct ZIP+4 reduces the number of times your mail is handled and can decrease the chance of a misdelivery or error.
ZIPPlus4 *string `json:"ZIPPlus4"`
// City This is the city name of the address.
City *string `json:"city,omitempty"`
// CityAbbreviation This is the abbreviation of the city name for the address.
CityAbbreviation *string `json:"cityAbbreviation,omitempty"`
// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building. For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
SecondaryAddress *string `json:"secondaryAddress,omitempty"`
// State The two-character state code.
State *State `json:"state,omitempty"`
// StreetAddress The number of a building along with the name of the road or street on which it is located.
StreetAddress *string `json:"streetAddress,omitempty"`
// StreetAddressAbbreviation This is the abbreviation of the primary street address line for the address.
StreetAddressAbbreviation *string `json:"streetAddressAbbreviation,omitempty"`
// Urbanization An area, sector, or residential development within a geographic area (typically used for addresses in Puerto Rico).
Urbanization *string `json:"urbanization,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
DomesticAddress defines model for DomesticAddress.
func (DomesticAddress) Get ¶
func (a DomesticAddress) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for DomesticAddress. Returns the specified element and whether it was found
func (DomesticAddress) MarshalJSON ¶
func (a DomesticAddress) MarshalJSON() ([]byte, error)
Override default JSON handling for DomesticAddress to handle AdditionalProperties
func (*DomesticAddress) Set ¶
func (a *DomesticAddress) Set(fieldName string, value interface{})
Setter for additional properties for DomesticAddress
func (*DomesticAddress) UnmarshalJSON ¶
func (a *DomesticAddress) UnmarshalJSON(b []byte) error
Override default JSON handling for DomesticAddress to handle AdditionalProperties
type ErrorMessage ¶
type ErrorMessage struct {
// ApiVersion The version of the API that was used and that raised the error.
ApiVersion *string `json:"apiVersion,omitempty"`
// Error The high-level error that has occurred as indicated by the status code.
Error *ErrorMessage_Error `json:"error,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ErrorMessage Standard error message response.
func (ErrorMessage) Get ¶
func (a ErrorMessage) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessage. Returns the specified element and whether it was found
func (ErrorMessage) MarshalJSON ¶
func (a ErrorMessage) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessage to handle AdditionalProperties
func (*ErrorMessage) Set ¶
func (a *ErrorMessage) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessage
func (*ErrorMessage) UnmarshalJSON ¶
func (a *ErrorMessage) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessage to handle AdditionalProperties
type ErrorMessage_Error ¶
type ErrorMessage_Error struct {
// Code The error status code that has been returned in response to the request.
Code *string `json:"code,omitempty"`
Errors *[]ErrorMessage_Error_Errors_Item `json:"errors,omitempty"`
// Message A human-readable message describing the error.
Message *string `json:"message,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ErrorMessage_Error The high-level error that has occurred as indicated by the status code.
func (ErrorMessage_Error) Get ¶
func (a ErrorMessage_Error) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessage_Error. Returns the specified element and whether it was found
func (ErrorMessage_Error) MarshalJSON ¶
func (a ErrorMessage_Error) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessage_Error to handle AdditionalProperties
func (*ErrorMessage_Error) Set ¶
func (a *ErrorMessage_Error) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessage_Error
func (*ErrorMessage_Error) UnmarshalJSON ¶
func (a *ErrorMessage_Error) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessage_Error to handle AdditionalProperties
type ErrorMessage_Error_Errors_Item ¶
type ErrorMessage_Error_Errors_Item struct {
// Code An internal subordinate code used for error diagnosis.
Code *string `json:"code,omitempty"`
// Detail A human-readable description of the error that occurred.
Detail *string `json:"detail,omitempty"`
// Source The element that is suspected of originating the error. Helps to pinpoint the problem.
Source *ErrorMessage_Error_Errors_Source `json:"source,omitempty"`
// Status The status code response returned to the client.
Status *string `json:"status,omitempty"`
// Title A human-readable title that identifies the error.
Title *string `json:"title,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ErrorMessage_Error_Errors_Item defines model for ErrorMessage.Error.Errors.Item.
func (ErrorMessage_Error_Errors_Item) Get ¶
func (a ErrorMessage_Error_Errors_Item) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessage_Error_Errors_Item. Returns the specified element and whether it was found
func (ErrorMessage_Error_Errors_Item) MarshalJSON ¶
func (a ErrorMessage_Error_Errors_Item) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessage_Error_Errors_Item to handle AdditionalProperties
func (*ErrorMessage_Error_Errors_Item) Set ¶
func (a *ErrorMessage_Error_Errors_Item) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessage_Error_Errors_Item
func (*ErrorMessage_Error_Errors_Item) UnmarshalJSON ¶
func (a *ErrorMessage_Error_Errors_Item) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessage_Error_Errors_Item to handle AdditionalProperties
type ErrorMessage_Error_Errors_Source ¶
type ErrorMessage_Error_Errors_Source struct {
// Example An example of a valid value for the input parameter.
Example *string `json:"example,omitempty"`
// Parameter The input in the request which caused an error.
Parameter *string `json:"parameter,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ErrorMessage_Error_Errors_Source The element that is suspected of originating the error. Helps to pinpoint the problem.
func (ErrorMessage_Error_Errors_Source) Get ¶
func (a ErrorMessage_Error_Errors_Source) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessage_Error_Errors_Source. Returns the specified element and whether it was found
func (ErrorMessage_Error_Errors_Source) MarshalJSON ¶
func (a ErrorMessage_Error_Errors_Source) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessage_Error_Errors_Source to handle AdditionalProperties
func (*ErrorMessage_Error_Errors_Source) Set ¶
func (a *ErrorMessage_Error_Errors_Source) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessage_Error_Errors_Source
func (*ErrorMessage_Error_Errors_Source) UnmarshalJSON ¶
func (a *ErrorMessage_Error_Errors_Source) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessage_Error_Errors_Source to handle AdditionalProperties
type GetAddressParams ¶
type GetAddressParams struct {
// Firm Firm/business corresponding to the address.
Firm *string `form:"firm,omitempty" json:"firm,omitempty"`
// StreetAddress The number of a building along with the name of the road or street on which it is located.
StreetAddress string `form:"streetAddress" json:"streetAddress"`
// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building. For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
SecondaryAddress *string `form:"secondaryAddress,omitempty" json:"secondaryAddress,omitempty"`
// City This is the city name of the address.
City *string `form:"city,omitempty" json:"city,omitempty"`
// State The two-character state code of the address.
State string `form:"state" json:"state"`
// Urbanization This is the urbanization code relevant only for Puerto Rico addresses.
Urbanization *string `form:"urbanization,omitempty" json:"urbanization,omitempty"`
// ZIPCode This is the 5-digit ZIP code.
ZIPCode *string `form:"ZIPCode,omitempty" json:"ZIPCode,omitempty"`
// ZIPPlus4 This is the 4-digit component of the ZIP+4 code. Using the correct ZIP+4 reduces the number of times your mail is handled and can decrease the chance of a misdelivery or error.
ZIPPlus4 *string `form:"ZIPPlus4,omitempty" json:"ZIPPlus4,omitempty"`
}
GetAddressParams defines parameters for GetAddress.
type GetAddressResponse ¶
type GetAddressResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AddressResponse
XML200 *AddressResponse
JSON400 *ErrorMessage
XML400 *ErrorMessage
JSON401 *ErrorMessage
XML401 *ErrorMessage
JSON403 *ErrorMessage
XML403 *ErrorMessage
JSON404 *ErrorMessage
XML404 *ErrorMessage
JSON429 *ErrorMessage
XML429 *ErrorMessage
JSON503 *ErrorMessage
XML503 *ErrorMessage
}
func ParseGetAddressResponse ¶
func ParseGetAddressResponse(rsp *http.Response) (*GetAddressResponse, error)
ParseGetAddressResponse parses an HTTP response from a GetAddressWithResponse call
func (GetAddressResponse) Status ¶
func (r GetAddressResponse) Status() string
Status returns HTTPResponse.Status
func (GetAddressResponse) StatusCode ¶
func (r GetAddressResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCityStateParams ¶
type GetCityStateParams struct {
// ZIPCode This is the 5-digit ZIP code.
ZIPCode string `form:"ZIPCode" json:"ZIPCode"`
}
GetCityStateParams defines parameters for GetCityState.
type GetCityStateResponse ¶
type GetCityStateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CityStateResponse
XML200 *CityStateResponse
JSON400 *ErrorMessage
XML400 *ErrorMessage
JSON401 *ErrorMessage
XML401 *ErrorMessage
JSON403 *ErrorMessage
XML403 *ErrorMessage
JSON429 *ErrorMessage
XML429 *ErrorMessage
JSON503 *ErrorMessage
XML503 *ErrorMessage
}
func ParseGetCityStateResponse ¶
func ParseGetCityStateResponse(rsp *http.Response) (*GetCityStateResponse, error)
ParseGetCityStateResponse parses an HTTP response from a GetCityStateWithResponse call
func (GetCityStateResponse) Status ¶
func (r GetCityStateResponse) Status() string
Status returns HTTPResponse.Status
func (GetCityStateResponse) StatusCode ¶
func (r GetCityStateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetZIPCodeParams ¶
type GetZIPCodeParams struct {
// Firm Firm/business corresponding to the address.
Firm *string `form:"firm,omitempty" json:"firm,omitempty"`
// StreetAddress The number of a building along with the name of the road or street on which it is located.
StreetAddress string `form:"streetAddress" json:"streetAddress"`
// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building. For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
SecondaryAddress *string `form:"secondaryAddress,omitempty" json:"secondaryAddress,omitempty"`
// City This is the city name of the address.
City string `form:"city" json:"city"`
// State This is the two-character state code of the address.
State string `form:"state" json:"state"`
// ZIPCode This is the 5-digit ZIP code.
ZIPCode *string `form:"ZIPCode,omitempty" json:"ZIPCode,omitempty"`
// ZIPPlus4 This is the 4-digit component of the ZIP+4 code. Using the correct ZIP+4 reduces the number of times your mail is handled and can decrease the chance of a misdelivery or error.
ZIPPlus4 *string `form:"ZIPPlus4,omitempty" json:"ZIPPlus4,omitempty"`
}
GetZIPCodeParams defines parameters for GetZIPCode.
type GetZIPCodeResponse ¶
type GetZIPCodeResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ZIPCodeResponse
XML200 *ZIPCodeResponse
JSON400 *ErrorMessage
XML400 *ErrorMessage
JSON401 *ErrorMessage
XML401 *ErrorMessage
JSON403 *ErrorMessage
XML403 *ErrorMessage
JSON429 *ErrorMessage
XML429 *ErrorMessage
JSON503 *ErrorMessage
XML503 *ErrorMessage
}
func ParseGetZIPCodeResponse ¶
func ParseGetZIPCodeResponse(rsp *http.Response) (*GetZIPCodeResponse, error)
ParseGetZIPCodeResponse parses an HTTP response from a GetZIPCodeWithResponse call
func (GetZIPCodeResponse) Status ¶
func (r GetZIPCodeResponse) Status() string
Status returns HTTPResponse.Status
func (GetZIPCodeResponse) StatusCode ¶
func (r GetZIPCodeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ZIPCodeResponse ¶
type ZIPCodeResponse struct {
// Address Address fields for US locations
Address *DomesticAddress `json:"address,omitempty"`
// Firm This is the firm/business name at the address.
Firm *string `json:"firm,omitempty"`
}
ZIPCodeResponse The address to validate the ZIP Code™ for.