usps v0.1.0 Usps.Operation View Source

Operation structs are used to construct a HTTP(S) request. Operations are made up of the following parts:

  • api - The USPS API being requested
  • element - The XML document for the request
  • parser - An anonymous function used to parse the response
  • configuration - A Configuration struct used to build the request

Link to this section Summary

Functions

Returns a new Operation struct with the given arguments.

Link to this section Types

Link to this type

t()

View Source
t() :: %Usps.Operation{
  api: nil | binary(),
  configuration: nil | Usps.Configuration.t(),
  element: nil | term(),
  parser: nil | binary()
}

Link to this section Functions

Link to this function

new(api, element, parser, configuration)

View Source
new(
  api :: binary(),
  element :: term(),
  parser :: (... -> any()),
  configuration :: Usps.Configuration.t()
) :: t()

Returns a new Operation struct with the given arguments.