ballast-0.1.0.0: Shipwire API client

Safe HaskellNone
LanguageHaskell2010

Ballast.Types

Synopsis

Documentation

newtype Username Source #

Username type used for HTTP Basic authentication.

Constructors

Username 

newtype Password Source #

Password type used for HTTP Basic authentication.

Constructors

Password 

newtype SKU Source #

Constructors

SKU 

Fields

newtype City Source #

Constructors

City 

Fields

newtype Id Source #

Constructors

Id 

Fields

Instances

Eq Id Source # 

Methods

(==) :: Id -> Id -> Bool #

(/=) :: Id -> Id -> Bool #

Show Id Source # 

Methods

showsPrec :: Int -> Id -> ShowS #

show :: Id -> String #

showList :: [Id] -> ShowS #

ToJSON Id Source # 
FromJSON Id Source # 

data ShipwireRequest a b c Source #

Constructors

ShipwireRequest 

Fields

type family ShipwireReturn a :: * Source #

Instances

type ShipwireReturn ValidateAddressRequest Source # 
type ShipwireReturn GetOrderTrackingsRequest Source # 
type ShipwireReturn CancelOrderRequest Source # 
type ShipwireReturn CreateOrderRequest Source # 
type ShipwireReturn GetOrderRequest Source # 
type ShipwireReturn GetOrdersRequest Source # 
type ShipwireReturn RetireProductsRequest Source # 
type ShipwireReturn GetProductRequest Source # 
type ShipwireReturn ModifyProductRequest Source # 
type ShipwireReturn ModifyProductsRequest Source # 
type ShipwireReturn CreateProductsRequest Source # 
type ShipwireReturn GetProductsRequest Source # 
type ShipwireReturn GetReceivingLabelsRequest Source # 
type ShipwireReturn GetReceivingTrackingsRequest Source # 
type ShipwireReturn GetReceivingShipmentsRequest Source # 
type ShipwireReturn GetReceivingItemsRequest Source # 
type ShipwireReturn GetReceivingInstructionsRecipientsRequest Source # 
type ShipwireReturn GetReceivingHoldsRequest Source # 
type ShipwireReturn CancelReceivingLabelsRequest Source # 
type ShipwireReturn CancelReceivingRequest Source # 
type ShipwireReturn ModifyReceivingRequest Source # 
type ShipwireReturn GetReceivingRequest Source # 
type ShipwireReturn CreateReceivingRequest Source # 
type ShipwireReturn GetReceivingsRequest Source # 
type ShipwireReturn StockRequest Source # 
type ShipwireReturn RateRequest Source # 

newtype ParentId Source #

Constructors

ParentId 

Fields

newtype Total Source #

Constructors

Total 

Fields

newtype Next Source #

Constructors

Next 

Fields

Instances

newtype Limit Source #

Constructors

Limit 

Fields

Instances

Eq Limit Source # 

Methods

(==) :: Limit -> Limit -> Bool #

(/=) :: Limit -> Limit -> Bool #

Show Limit Source # 

Methods

showsPrec :: Int -> Limit -> ShowS #

show :: Limit -> String #

showList :: [Limit] -> ShowS #

data StockItemResource Source #

type Host = Text Source #

Either production or sandbox API host

data ShipwireConfig Source #

Shipwire authenticates through

Constructors

ShipwireConfig 

data Params b c Source #

Parameters for each request which include both the query and the body of a request

Constructors

Query TupleBS8 
Body ByteString 

Instances

Show (Params b c) Source # 

Methods

showsPrec :: Int -> Params b c -> ShowS #

show :: Params b c -> String #

showList :: [Params b c] -> ShowS #

type TupleBS8 = (ByteString, ByteString) Source #

Type alias for query parameters

(-&-) :: ShipwireHasParam request param => ShipwireRequest request b c -> param -> ShipwireRequest request b c Source #

Add an optional query parameter

filterBody :: [Params b c] -> ByteString Source #

Find the body from the list of [Params TupleBS8 BSL.ByteString]

filterQuery :: [Params (ByteString, ByteString) c] -> [(ByteString, ByteString)] Source #

Find the query parameters from the list of [Params TupleBS8 BSL.ByteString]

newtype UpdatedAfter Source #

ISO 8601 format, ex: "2014-05-30T13:08:29-07:00"

Constructors

UpdatedAfter 

newtype URL Source #

Constructors

URL 

Fields

Instances

Eq URL Source # 

Methods

(==) :: URL -> URL -> Bool #

(/=) :: URL -> URL -> Bool #

Show URL Source # 

Methods

showsPrec :: Int -> URL -> ShowS #

show :: URL -> String #

showList :: [URL] -> ShowS #

FromJSON URL Source # 

newtype Type Source #

Constructors

Type 

Fields

newtype Name Source #

Constructors

Name 

Fields

newtype Note Source #

Constructors

Note 

Fields

data BaseProductResponseResource Source #

newtype Status Source #

Constructors

Status 

Fields

newtype IdsParam Source #

Constructors

IdsParam 

Fields

newtype ProductError Source #

There is a separate error class for /products endpoint apparently. It returns back JSON with field names as object names and details hidden inside that object. It is not specified anywhere what those might be. So for now I treat them as an Object. There must be a better way of dealing with it. E.g.: "errors": { "myMarketingInsert": { "code": "productSubmitFailed", "externalId": null, "id": null, "sku": "myMarketingInsert", "message": { "sku": { "stringLengthTooLong": "SKU must be between 1 and 16 characters" }, "masterCase_sku": { "stringLengthTooLong": "Master case SKU must be between 1 and 16 characters" }, }, "type": { "sku": { "stringLengthTooLong": "error" }, "masterCase_sku": { "stringLengthTooLong": "error" }, } } }

Constructors

ProductError 

data Hold Source #

Constructors

Hold 
DontHold 

Instances

data GetOrdersResponseResourceItemResource Source #

data GetOrdersTrackingsResourceItemResource Source #

data CancelOrderRequest Source #

POST apiv3orders{id}cancel or apiv3ordersE{externalId}cancel

data GetOrderTrackingsRequest Source #

GET apiv3orders{id}trackings or apiv3ordersE{externalId}trackings

data GetOrderTrackingsResponseResourceItemResource Source #

data GetOrderRequest Source #

GET apiv3orders{id} or apiv3ordersE{externalId}