{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module RecurlyClient.Operations.List_account_invoices where
import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString
import qualified Data.ByteString as Data.ByteString.Internal
import qualified Data.ByteString as Data.ByteString.Internal.Type
import qualified Data.Either
import qualified Data.Foldable
import qualified Data.Functor
import qualified Data.Maybe
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text as Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified Data.Vector
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified Network.HTTP.Client
import qualified Network.HTTP.Client as Network.HTTP.Client.Request
import qualified Network.HTTP.Client as Network.HTTP.Client.Types
import qualified Network.HTTP.Simple
import qualified Network.HTTP.Types
import qualified Network.HTTP.Types as Network.HTTP.Types.Status
import qualified Network.HTTP.Types as Network.HTTP.Types.URI
import qualified RecurlyClient.Common
import RecurlyClient.Types
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
list_account_invoices ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
List_account_invoicesParameters ->
RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response List_account_invoicesResponse)
list_account_invoices :: forall (m :: * -> *).
MonadHTTP m =>
List_account_invoicesParameters
-> ClientT m (Response List_account_invoicesResponse)
list_account_invoices List_account_invoicesParameters
parameters =
(Response ByteString -> Response List_account_invoicesResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response List_account_invoicesResponse)
forall a b. (a -> b) -> ClientT m a -> ClientT m b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_0 ->
(ByteString -> List_account_invoicesResponse)
-> Response ByteString -> Response List_account_invoicesResponse
forall a b. (a -> b) -> Response a -> Response b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> List_account_invoicesResponse)
-> (List_account_invoicesResponse -> List_account_invoicesResponse)
-> Either String List_account_invoicesResponse
-> List_account_invoicesResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_account_invoicesResponse
List_account_invoicesResponseError List_account_invoicesResponse -> List_account_invoicesResponse
forall a. a -> a
GHC.Base.id
(Either String List_account_invoicesResponse
-> List_account_invoicesResponse)
-> (ByteString -> Either String List_account_invoicesResponse)
-> ByteString
-> List_account_invoicesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. ( \Response ByteString
response ByteString
body ->
if
| (\Status
status_1 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_1 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Int
200) (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
InvoiceList -> List_account_invoicesResponse
List_account_invoicesResponse200
(InvoiceList -> List_account_invoicesResponse)
-> Either String InvoiceList
-> Either String List_account_invoicesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String InvoiceList
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
InvoiceList
)
| (\Status
status_2 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_2 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Int
400) (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
Error -> List_account_invoicesResponse
List_account_invoicesResponse400
(Error -> List_account_invoicesResponse)
-> Either String Error
-> Either String List_account_invoicesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String Error
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
Error
)
| (\Status
status_3 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_3 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Int
404) (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
Error -> List_account_invoicesResponse
List_account_invoicesResponse404
(Error -> List_account_invoicesResponse)
-> Either String Error
-> Either String List_account_invoicesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String Error
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
Error
)
| Bool -> Status -> Bool
forall a b. a -> b -> a
GHC.Base.const Bool
GHC.Types.True (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
Error -> List_account_invoicesResponse
List_account_invoicesResponseDefault
(Error -> List_account_invoicesResponse)
-> Either String Error
-> Either String List_account_invoicesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String Error
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
Error
)
| Bool
GHC.Base.otherwise -> String -> Either String List_account_invoicesResponse
forall a b. a -> Either a b
Data.Either.Left String
"Missing default response type"
)
Response ByteString
response_0
)
Response ByteString
response_0
)
( Text -> Text -> [QueryParameter] -> ClientT m (Response ByteString)
forall (m :: * -> *).
MonadHTTP m =>
Text -> Text -> [QueryParameter] -> ClientT m (Response ByteString)
RecurlyClient.Common.doCallWithConfigurationM
(Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.Internal.pack String
"GET")
(Text
"/accounts/" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (ByteString -> Text
RecurlyClient.Common.byteToText (Bool -> ByteString -> ByteString
Network.HTTP.Types.URI.urlEncode Bool
GHC.Types.True (ByteString -> ByteString) -> ByteString -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ (Text -> ByteString
RecurlyClient.Common.textToByte (Text -> ByteString) -> Text -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> Text
forall a. ToJSON a => a -> Text
RecurlyClient.Common.stringifyModel (List_account_invoicesParameters -> Text
list_account_invoicesParametersPathAccount_id List_account_invoicesParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> Text
"/invoices"))
[ Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"ids") ([Text] -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON ([Text] -> Value) -> Maybe [Text] -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe [Text]
list_account_invoicesParametersQueryIds List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"state") (List_account_invoicesParametersQueryState -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryState -> Value)
-> Maybe List_account_invoicesParametersQueryState -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryState
list_account_invoicesParametersQueryState List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"limit") (Int -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Int -> Value) -> Maybe Int -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe Int
list_account_invoicesParametersQueryLimit List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"order") (List_account_invoicesParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryOrder -> Value)
-> Maybe List_account_invoicesParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryOrder
list_account_invoicesParametersQueryOrder List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"sort") (List_account_invoicesParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQuerySort -> Value)
-> Maybe List_account_invoicesParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQuerySort
list_account_invoicesParametersQuerySort List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"begin_time") (JsonDateTime -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (JsonDateTime -> Value) -> Maybe JsonDateTime -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryBegin_time List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"end_time") (JsonDateTime -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (JsonDateTime -> Value) -> Maybe JsonDateTime -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryEnd_time List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"type") (List_account_invoicesParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryType -> Value)
-> Maybe List_account_invoicesParametersQueryType -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryType
list_account_invoicesParametersQueryType List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
data List_account_invoicesParameters = List_account_invoicesParameters
{ List_account_invoicesParameters -> Text
list_account_invoicesParametersPathAccount_id :: Data.Text.Internal.Text
, List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryBegin_time :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryEnd_time :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, List_account_invoicesParameters -> Maybe [Text]
list_account_invoicesParametersQueryIds :: (GHC.Maybe.Maybe [Data.Text.Internal.Text])
, List_account_invoicesParameters -> Maybe Int
list_account_invoicesParametersQueryLimit :: (GHC.Maybe.Maybe GHC.Types.Int)
, List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryOrder
list_account_invoicesParametersQueryOrder :: (GHC.Maybe.Maybe List_account_invoicesParametersQueryOrder)
, List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQuerySort
list_account_invoicesParametersQuerySort :: (GHC.Maybe.Maybe List_account_invoicesParametersQuerySort)
, List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryState
list_account_invoicesParametersQueryState :: (GHC.Maybe.Maybe List_account_invoicesParametersQueryState)
, List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryType
list_account_invoicesParametersQueryType :: (GHC.Maybe.Maybe List_account_invoicesParametersQueryType)
}
deriving
( Int -> List_account_invoicesParameters -> ShowS
[List_account_invoicesParameters] -> ShowS
List_account_invoicesParameters -> String
(Int -> List_account_invoicesParameters -> ShowS)
-> (List_account_invoicesParameters -> String)
-> ([List_account_invoicesParameters] -> ShowS)
-> Show List_account_invoicesParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_invoicesParameters -> ShowS
showsPrec :: Int -> List_account_invoicesParameters -> ShowS
$cshow :: List_account_invoicesParameters -> String
show :: List_account_invoicesParameters -> String
$cshowList :: [List_account_invoicesParameters] -> ShowS
showList :: [List_account_invoicesParameters] -> ShowS
GHC.Show.Show
, List_account_invoicesParameters
-> List_account_invoicesParameters -> Bool
(List_account_invoicesParameters
-> List_account_invoicesParameters -> Bool)
-> (List_account_invoicesParameters
-> List_account_invoicesParameters -> Bool)
-> Eq List_account_invoicesParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_invoicesParameters
-> List_account_invoicesParameters -> Bool
== :: List_account_invoicesParameters
-> List_account_invoicesParameters -> Bool
$c/= :: List_account_invoicesParameters
-> List_account_invoicesParameters -> Bool
/= :: List_account_invoicesParameters
-> List_account_invoicesParameters -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON List_account_invoicesParameters where
toJSON :: List_account_invoicesParameters -> Value
toJSON List_account_invoicesParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Key
"pathAccount_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..= List_account_invoicesParameters -> Text
list_account_invoicesParametersPathAccount_id List_account_invoicesParameters
obj] [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryBegin_time" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryBegin_time List_account_invoicesParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryEnd_time" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryEnd_time List_account_invoicesParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> ([Text] -> [Pair]) -> Maybe [Text] -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> ([Text] -> Pair) -> [Text] -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryIds" Key -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters -> Maybe [Text]
list_account_invoicesParametersQueryIds List_account_invoicesParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Int -> [Pair]) -> Maybe Int -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Int -> Pair) -> Int -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryLimit" Key -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters -> Maybe Int
list_account_invoicesParametersQueryLimit List_account_invoicesParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_account_invoicesParametersQueryOrder -> [Pair])
-> Maybe List_account_invoicesParametersQueryOrder
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (List_account_invoicesParametersQueryOrder -> Pair)
-> List_account_invoicesParametersQueryOrder
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryOrder" Key -> List_account_invoicesParametersQueryOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryOrder
list_account_invoicesParametersQueryOrder List_account_invoicesParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_account_invoicesParametersQuerySort -> [Pair])
-> Maybe List_account_invoicesParametersQuerySort
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (List_account_invoicesParametersQuerySort -> Pair)
-> List_account_invoicesParametersQuerySort
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySort" Key -> List_account_invoicesParametersQuerySort -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQuerySort
list_account_invoicesParametersQuerySort List_account_invoicesParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_account_invoicesParametersQueryState -> [Pair])
-> Maybe List_account_invoicesParametersQueryState
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (List_account_invoicesParametersQueryState -> Pair)
-> List_account_invoicesParametersQueryState
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryState" Key -> List_account_invoicesParametersQueryState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryState
list_account_invoicesParametersQueryState List_account_invoicesParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_account_invoicesParametersQueryType -> [Pair])
-> Maybe List_account_invoicesParametersQueryType
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (List_account_invoicesParametersQueryType -> Pair)
-> List_account_invoicesParametersQueryType
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryType" Key -> List_account_invoicesParametersQueryType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryType
list_account_invoicesParametersQueryType List_account_invoicesParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
toEncoding :: List_account_invoicesParameters -> Encoding
toEncoding List_account_invoicesParameters
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ([Series] -> Series
forall a. Monoid a => [a] -> a
GHC.Base.mconcat ([[Series]] -> [Series]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Key
"pathAccount_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..= List_account_invoicesParameters -> Text
list_account_invoicesParametersPathAccount_id List_account_invoicesParameters
obj] [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryBegin_time" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryBegin_time List_account_invoicesParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryEnd_time" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryEnd_time List_account_invoicesParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> ([Text] -> [Series]) -> Maybe [Text] -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> ([Text] -> Series) -> [Text] -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryIds" Key -> [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters -> Maybe [Text]
list_account_invoicesParametersQueryIds List_account_invoicesParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Int -> [Series]) -> Maybe Int -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Int -> Series) -> Int -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryLimit" Key -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters -> Maybe Int
list_account_invoicesParametersQueryLimit List_account_invoicesParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_account_invoicesParametersQueryOrder -> [Series])
-> Maybe List_account_invoicesParametersQueryOrder
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (List_account_invoicesParametersQueryOrder -> Series)
-> List_account_invoicesParametersQueryOrder
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryOrder" Key -> List_account_invoicesParametersQueryOrder -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryOrder
list_account_invoicesParametersQueryOrder List_account_invoicesParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_account_invoicesParametersQuerySort -> [Series])
-> Maybe List_account_invoicesParametersQuerySort
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (List_account_invoicesParametersQuerySort -> Series)
-> List_account_invoicesParametersQuerySort
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySort" Key -> List_account_invoicesParametersQuerySort -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQuerySort
list_account_invoicesParametersQuerySort List_account_invoicesParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_account_invoicesParametersQueryState -> [Series])
-> Maybe List_account_invoicesParametersQueryState
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (List_account_invoicesParametersQueryState -> Series)
-> List_account_invoicesParametersQueryState
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryState" Key -> List_account_invoicesParametersQueryState -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryState
list_account_invoicesParametersQueryState List_account_invoicesParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_account_invoicesParametersQueryType -> [Series])
-> Maybe List_account_invoicesParametersQueryType
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (List_account_invoicesParametersQueryType -> Series)
-> List_account_invoicesParametersQueryType
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryType" Key -> List_account_invoicesParametersQueryType -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryType
list_account_invoicesParametersQueryType List_account_invoicesParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [[Series]]
forall a. Monoid a => a
GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON List_account_invoicesParameters where
parseJSON :: Value -> Parser List_account_invoicesParameters
parseJSON = String
-> (Object -> Parser List_account_invoicesParameters)
-> Value
-> Parser List_account_invoicesParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"List_account_invoicesParameters" (\Object
obj -> (((((((((Text
-> Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
-> Parser
(Text
-> Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Text
-> Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters
List_account_invoicesParameters Parser
(Text
-> Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
-> Parser Text
-> Parser
(Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
Data.Aeson.Types.FromJSON..: Key
"pathAccount_id")) Parser
(Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryBegin_time")) Parser
(Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe [Text]
-> Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryEnd_time")) Parser
(Maybe [Text]
-> Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
-> Parser (Maybe [Text])
-> Parser
(Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryIds")) Parser
(Maybe Int
-> Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
-> Parser (Maybe Int)
-> Parser
(Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryLimit")) Parser
(Maybe List_account_invoicesParametersQueryOrder
-> Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
-> Parser (Maybe List_account_invoicesParametersQueryOrder)
-> Parser
(Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Key -> Parser (Maybe List_account_invoicesParametersQueryOrder)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryOrder")) Parser
(Maybe List_account_invoicesParametersQuerySort
-> Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
-> Parser (Maybe List_account_invoicesParametersQuerySort)
-> Parser
(Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Key -> Parser (Maybe List_account_invoicesParametersQuerySort)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"querySort")) Parser
(Maybe List_account_invoicesParametersQueryState
-> Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
-> Parser (Maybe List_account_invoicesParametersQueryState)
-> Parser
(Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Key -> Parser (Maybe List_account_invoicesParametersQueryState)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryState")) Parser
(Maybe List_account_invoicesParametersQueryType
-> List_account_invoicesParameters)
-> Parser (Maybe List_account_invoicesParametersQueryType)
-> Parser List_account_invoicesParameters
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Key -> Parser (Maybe List_account_invoicesParametersQueryType)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryType"))
mkList_account_invoicesParameters ::
Data.Text.Internal.Text ->
List_account_invoicesParameters
mkList_account_invoicesParameters :: Text -> List_account_invoicesParameters
mkList_account_invoicesParameters Text
list_account_invoicesParametersPathAccount_id =
List_account_invoicesParameters
{ list_account_invoicesParametersPathAccount_id :: Text
list_account_invoicesParametersPathAccount_id = Text
list_account_invoicesParametersPathAccount_id
, list_account_invoicesParametersQueryBegin_time :: Maybe JsonDateTime
list_account_invoicesParametersQueryBegin_time = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, list_account_invoicesParametersQueryEnd_time :: Maybe JsonDateTime
list_account_invoicesParametersQueryEnd_time = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, list_account_invoicesParametersQueryIds :: Maybe [Text]
list_account_invoicesParametersQueryIds = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing
, list_account_invoicesParametersQueryLimit :: Maybe Int
list_account_invoicesParametersQueryLimit = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
, list_account_invoicesParametersQueryOrder :: Maybe List_account_invoicesParametersQueryOrder
list_account_invoicesParametersQueryOrder = Maybe List_account_invoicesParametersQueryOrder
forall a. Maybe a
GHC.Maybe.Nothing
, list_account_invoicesParametersQuerySort :: Maybe List_account_invoicesParametersQuerySort
list_account_invoicesParametersQuerySort = Maybe List_account_invoicesParametersQuerySort
forall a. Maybe a
GHC.Maybe.Nothing
, list_account_invoicesParametersQueryState :: Maybe List_account_invoicesParametersQueryState
list_account_invoicesParametersQueryState = Maybe List_account_invoicesParametersQueryState
forall a. Maybe a
GHC.Maybe.Nothing
, list_account_invoicesParametersQueryType :: Maybe List_account_invoicesParametersQueryType
list_account_invoicesParametersQueryType = Maybe List_account_invoicesParametersQueryType
forall a. Maybe a
GHC.Maybe.Nothing
}
data List_account_invoicesParametersQueryOrder
=
List_account_invoicesParametersQueryOrderOther Data.Aeson.Types.Internal.Value
|
List_account_invoicesParametersQueryOrderTyped Data.Text.Internal.Text
|
List_account_invoicesParametersQueryOrderEnumAsc
|
List_account_invoicesParametersQueryOrderEnumDesc
deriving (Int -> List_account_invoicesParametersQueryOrder -> ShowS
[List_account_invoicesParametersQueryOrder] -> ShowS
List_account_invoicesParametersQueryOrder -> String
(Int -> List_account_invoicesParametersQueryOrder -> ShowS)
-> (List_account_invoicesParametersQueryOrder -> String)
-> ([List_account_invoicesParametersQueryOrder] -> ShowS)
-> Show List_account_invoicesParametersQueryOrder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_invoicesParametersQueryOrder -> ShowS
showsPrec :: Int -> List_account_invoicesParametersQueryOrder -> ShowS
$cshow :: List_account_invoicesParametersQueryOrder -> String
show :: List_account_invoicesParametersQueryOrder -> String
$cshowList :: [List_account_invoicesParametersQueryOrder] -> ShowS
showList :: [List_account_invoicesParametersQueryOrder] -> ShowS
GHC.Show.Show, List_account_invoicesParametersQueryOrder
-> List_account_invoicesParametersQueryOrder -> Bool
(List_account_invoicesParametersQueryOrder
-> List_account_invoicesParametersQueryOrder -> Bool)
-> (List_account_invoicesParametersQueryOrder
-> List_account_invoicesParametersQueryOrder -> Bool)
-> Eq List_account_invoicesParametersQueryOrder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_invoicesParametersQueryOrder
-> List_account_invoicesParametersQueryOrder -> Bool
== :: List_account_invoicesParametersQueryOrder
-> List_account_invoicesParametersQueryOrder -> Bool
$c/= :: List_account_invoicesParametersQueryOrder
-> List_account_invoicesParametersQueryOrder -> Bool
/= :: List_account_invoicesParametersQueryOrder
-> List_account_invoicesParametersQueryOrder -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_account_invoicesParametersQueryOrder where
toJSON :: List_account_invoicesParametersQueryOrder -> Value
toJSON (List_account_invoicesParametersQueryOrderOther Value
val) = Value
val
toJSON (List_account_invoicesParametersQueryOrderTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_account_invoicesParametersQueryOrder
List_account_invoicesParametersQueryOrderEnumAsc) = Value
"asc"
toJSON (List_account_invoicesParametersQueryOrder
List_account_invoicesParametersQueryOrderEnumDesc) = Value
"desc"
instance Data.Aeson.Types.FromJSON.FromJSON List_account_invoicesParametersQueryOrder where
parseJSON :: Value -> Parser List_account_invoicesParametersQueryOrder
parseJSON Value
val =
List_account_invoicesParametersQueryOrder
-> Parser List_account_invoicesParametersQueryOrder
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"asc" -> List_account_invoicesParametersQueryOrder
List_account_invoicesParametersQueryOrderEnumAsc
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"desc" -> List_account_invoicesParametersQueryOrder
List_account_invoicesParametersQueryOrderEnumDesc
| Bool
GHC.Base.otherwise -> Value -> List_account_invoicesParametersQueryOrder
List_account_invoicesParametersQueryOrderOther Value
val
)
data List_account_invoicesParametersQuerySort
=
List_account_invoicesParametersQuerySortOther Data.Aeson.Types.Internal.Value
|
List_account_invoicesParametersQuerySortTyped Data.Text.Internal.Text
|
List_account_invoicesParametersQuerySortEnumCreated_at
|
List_account_invoicesParametersQuerySortEnumUpdated_at
deriving (Int -> List_account_invoicesParametersQuerySort -> ShowS
[List_account_invoicesParametersQuerySort] -> ShowS
List_account_invoicesParametersQuerySort -> String
(Int -> List_account_invoicesParametersQuerySort -> ShowS)
-> (List_account_invoicesParametersQuerySort -> String)
-> ([List_account_invoicesParametersQuerySort] -> ShowS)
-> Show List_account_invoicesParametersQuerySort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_invoicesParametersQuerySort -> ShowS
showsPrec :: Int -> List_account_invoicesParametersQuerySort -> ShowS
$cshow :: List_account_invoicesParametersQuerySort -> String
show :: List_account_invoicesParametersQuerySort -> String
$cshowList :: [List_account_invoicesParametersQuerySort] -> ShowS
showList :: [List_account_invoicesParametersQuerySort] -> ShowS
GHC.Show.Show, List_account_invoicesParametersQuerySort
-> List_account_invoicesParametersQuerySort -> Bool
(List_account_invoicesParametersQuerySort
-> List_account_invoicesParametersQuerySort -> Bool)
-> (List_account_invoicesParametersQuerySort
-> List_account_invoicesParametersQuerySort -> Bool)
-> Eq List_account_invoicesParametersQuerySort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_invoicesParametersQuerySort
-> List_account_invoicesParametersQuerySort -> Bool
== :: List_account_invoicesParametersQuerySort
-> List_account_invoicesParametersQuerySort -> Bool
$c/= :: List_account_invoicesParametersQuerySort
-> List_account_invoicesParametersQuerySort -> Bool
/= :: List_account_invoicesParametersQuerySort
-> List_account_invoicesParametersQuerySort -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_account_invoicesParametersQuerySort where
toJSON :: List_account_invoicesParametersQuerySort -> Value
toJSON (List_account_invoicesParametersQuerySortOther Value
val) = Value
val
toJSON (List_account_invoicesParametersQuerySortTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_account_invoicesParametersQuerySort
List_account_invoicesParametersQuerySortEnumCreated_at) = Value
"created_at"
toJSON (List_account_invoicesParametersQuerySort
List_account_invoicesParametersQuerySortEnumUpdated_at) = Value
"updated_at"
instance Data.Aeson.Types.FromJSON.FromJSON List_account_invoicesParametersQuerySort where
parseJSON :: Value -> Parser List_account_invoicesParametersQuerySort
parseJSON Value
val =
List_account_invoicesParametersQuerySort
-> Parser List_account_invoicesParametersQuerySort
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"created_at" -> List_account_invoicesParametersQuerySort
List_account_invoicesParametersQuerySortEnumCreated_at
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"updated_at" -> List_account_invoicesParametersQuerySort
List_account_invoicesParametersQuerySortEnumUpdated_at
| Bool
GHC.Base.otherwise -> Value -> List_account_invoicesParametersQuerySort
List_account_invoicesParametersQuerySortOther Value
val
)
data List_account_invoicesParametersQueryState
=
List_account_invoicesParametersQueryStateOther Data.Aeson.Types.Internal.Value
|
List_account_invoicesParametersQueryStateTyped Data.Text.Internal.Text
|
List_account_invoicesParametersQueryStateEnumPending
|
List_account_invoicesParametersQueryStateEnumPast_due
|
List_account_invoicesParametersQueryStateEnumPaid
|
List_account_invoicesParametersQueryStateEnumFailed
deriving (Int -> List_account_invoicesParametersQueryState -> ShowS
[List_account_invoicesParametersQueryState] -> ShowS
List_account_invoicesParametersQueryState -> String
(Int -> List_account_invoicesParametersQueryState -> ShowS)
-> (List_account_invoicesParametersQueryState -> String)
-> ([List_account_invoicesParametersQueryState] -> ShowS)
-> Show List_account_invoicesParametersQueryState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_invoicesParametersQueryState -> ShowS
showsPrec :: Int -> List_account_invoicesParametersQueryState -> ShowS
$cshow :: List_account_invoicesParametersQueryState -> String
show :: List_account_invoicesParametersQueryState -> String
$cshowList :: [List_account_invoicesParametersQueryState] -> ShowS
showList :: [List_account_invoicesParametersQueryState] -> ShowS
GHC.Show.Show, List_account_invoicesParametersQueryState
-> List_account_invoicesParametersQueryState -> Bool
(List_account_invoicesParametersQueryState
-> List_account_invoicesParametersQueryState -> Bool)
-> (List_account_invoicesParametersQueryState
-> List_account_invoicesParametersQueryState -> Bool)
-> Eq List_account_invoicesParametersQueryState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_invoicesParametersQueryState
-> List_account_invoicesParametersQueryState -> Bool
== :: List_account_invoicesParametersQueryState
-> List_account_invoicesParametersQueryState -> Bool
$c/= :: List_account_invoicesParametersQueryState
-> List_account_invoicesParametersQueryState -> Bool
/= :: List_account_invoicesParametersQueryState
-> List_account_invoicesParametersQueryState -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_account_invoicesParametersQueryState where
toJSON :: List_account_invoicesParametersQueryState -> Value
toJSON (List_account_invoicesParametersQueryStateOther Value
val) = Value
val
toJSON (List_account_invoicesParametersQueryStateTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_account_invoicesParametersQueryState
List_account_invoicesParametersQueryStateEnumPending) = Value
"pending"
toJSON (List_account_invoicesParametersQueryState
List_account_invoicesParametersQueryStateEnumPast_due) = Value
"past_due"
toJSON (List_account_invoicesParametersQueryState
List_account_invoicesParametersQueryStateEnumPaid) = Value
"paid"
toJSON (List_account_invoicesParametersQueryState
List_account_invoicesParametersQueryStateEnumFailed) = Value
"failed"
instance Data.Aeson.Types.FromJSON.FromJSON List_account_invoicesParametersQueryState where
parseJSON :: Value -> Parser List_account_invoicesParametersQueryState
parseJSON Value
val =
List_account_invoicesParametersQueryState
-> Parser List_account_invoicesParametersQueryState
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pending" -> List_account_invoicesParametersQueryState
List_account_invoicesParametersQueryStateEnumPending
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"past_due" -> List_account_invoicesParametersQueryState
List_account_invoicesParametersQueryStateEnumPast_due
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"paid" -> List_account_invoicesParametersQueryState
List_account_invoicesParametersQueryStateEnumPaid
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"failed" -> List_account_invoicesParametersQueryState
List_account_invoicesParametersQueryStateEnumFailed
| Bool
GHC.Base.otherwise -> Value -> List_account_invoicesParametersQueryState
List_account_invoicesParametersQueryStateOther Value
val
)
data List_account_invoicesParametersQueryType
=
List_account_invoicesParametersQueryTypeOther Data.Aeson.Types.Internal.Value
|
List_account_invoicesParametersQueryTypeTyped Data.Text.Internal.Text
|
List_account_invoicesParametersQueryTypeEnumCharge
|
List_account_invoicesParametersQueryTypeEnumCredit
|
List_account_invoicesParametersQueryTypeEnumLegacy
|
List_account_invoicesParametersQueryTypeEnumNon_legacy
deriving (Int -> List_account_invoicesParametersQueryType -> ShowS
[List_account_invoicesParametersQueryType] -> ShowS
List_account_invoicesParametersQueryType -> String
(Int -> List_account_invoicesParametersQueryType -> ShowS)
-> (List_account_invoicesParametersQueryType -> String)
-> ([List_account_invoicesParametersQueryType] -> ShowS)
-> Show List_account_invoicesParametersQueryType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_invoicesParametersQueryType -> ShowS
showsPrec :: Int -> List_account_invoicesParametersQueryType -> ShowS
$cshow :: List_account_invoicesParametersQueryType -> String
show :: List_account_invoicesParametersQueryType -> String
$cshowList :: [List_account_invoicesParametersQueryType] -> ShowS
showList :: [List_account_invoicesParametersQueryType] -> ShowS
GHC.Show.Show, List_account_invoicesParametersQueryType
-> List_account_invoicesParametersQueryType -> Bool
(List_account_invoicesParametersQueryType
-> List_account_invoicesParametersQueryType -> Bool)
-> (List_account_invoicesParametersQueryType
-> List_account_invoicesParametersQueryType -> Bool)
-> Eq List_account_invoicesParametersQueryType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_invoicesParametersQueryType
-> List_account_invoicesParametersQueryType -> Bool
== :: List_account_invoicesParametersQueryType
-> List_account_invoicesParametersQueryType -> Bool
$c/= :: List_account_invoicesParametersQueryType
-> List_account_invoicesParametersQueryType -> Bool
/= :: List_account_invoicesParametersQueryType
-> List_account_invoicesParametersQueryType -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_account_invoicesParametersQueryType where
toJSON :: List_account_invoicesParametersQueryType -> Value
toJSON (List_account_invoicesParametersQueryTypeOther Value
val) = Value
val
toJSON (List_account_invoicesParametersQueryTypeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_account_invoicesParametersQueryType
List_account_invoicesParametersQueryTypeEnumCharge) = Value
"charge"
toJSON (List_account_invoicesParametersQueryType
List_account_invoicesParametersQueryTypeEnumCredit) = Value
"credit"
toJSON (List_account_invoicesParametersQueryType
List_account_invoicesParametersQueryTypeEnumLegacy) = Value
"legacy"
toJSON (List_account_invoicesParametersQueryType
List_account_invoicesParametersQueryTypeEnumNon_legacy) = Value
"non-legacy"
instance Data.Aeson.Types.FromJSON.FromJSON List_account_invoicesParametersQueryType where
parseJSON :: Value -> Parser List_account_invoicesParametersQueryType
parseJSON Value
val =
List_account_invoicesParametersQueryType
-> Parser List_account_invoicesParametersQueryType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"charge" -> List_account_invoicesParametersQueryType
List_account_invoicesParametersQueryTypeEnumCharge
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"credit" -> List_account_invoicesParametersQueryType
List_account_invoicesParametersQueryTypeEnumCredit
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"legacy" -> List_account_invoicesParametersQueryType
List_account_invoicesParametersQueryTypeEnumLegacy
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"non-legacy" -> List_account_invoicesParametersQueryType
List_account_invoicesParametersQueryTypeEnumNon_legacy
| Bool
GHC.Base.otherwise -> Value -> List_account_invoicesParametersQueryType
List_account_invoicesParametersQueryTypeOther Value
val
)
data List_account_invoicesResponse
=
List_account_invoicesResponseError GHC.Base.String
|
List_account_invoicesResponse200 InvoiceList
|
List_account_invoicesResponse400 Error
|
List_account_invoicesResponse404 Error
|
List_account_invoicesResponseDefault Error
deriving (Int -> List_account_invoicesResponse -> ShowS
[List_account_invoicesResponse] -> ShowS
List_account_invoicesResponse -> String
(Int -> List_account_invoicesResponse -> ShowS)
-> (List_account_invoicesResponse -> String)
-> ([List_account_invoicesResponse] -> ShowS)
-> Show List_account_invoicesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_invoicesResponse -> ShowS
showsPrec :: Int -> List_account_invoicesResponse -> ShowS
$cshow :: List_account_invoicesResponse -> String
show :: List_account_invoicesResponse -> String
$cshowList :: [List_account_invoicesResponse] -> ShowS
showList :: [List_account_invoicesResponse] -> ShowS
GHC.Show.Show, List_account_invoicesResponse
-> List_account_invoicesResponse -> Bool
(List_account_invoicesResponse
-> List_account_invoicesResponse -> Bool)
-> (List_account_invoicesResponse
-> List_account_invoicesResponse -> Bool)
-> Eq List_account_invoicesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_invoicesResponse
-> List_account_invoicesResponse -> Bool
== :: List_account_invoicesResponse
-> List_account_invoicesResponse -> Bool
$c/= :: List_account_invoicesResponse
-> List_account_invoicesResponse -> Bool
/= :: List_account_invoicesResponse
-> List_account_invoicesResponse -> Bool
GHC.Classes.Eq)
list_account_invoicesWithConfiguration ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
RecurlyClient.Common.Configuration ->
List_account_invoicesParameters ->
m (Network.HTTP.Client.Types.Response List_account_invoicesResponse)
list_account_invoicesWithConfiguration :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_account_invoicesParameters
-> m (Response List_account_invoicesResponse)
list_account_invoicesWithConfiguration
Configuration
config
List_account_invoicesParameters
parameters =
(Response ByteString -> Response List_account_invoicesResponse)
-> m (Response ByteString)
-> m (Response List_account_invoicesResponse)
forall a b. (a -> b) -> m a -> m b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_4 ->
(ByteString -> List_account_invoicesResponse)
-> Response ByteString -> Response List_account_invoicesResponse
forall a b. (a -> b) -> Response a -> Response b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> List_account_invoicesResponse)
-> (List_account_invoicesResponse -> List_account_invoicesResponse)
-> Either String List_account_invoicesResponse
-> List_account_invoicesResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_account_invoicesResponse
List_account_invoicesResponseError List_account_invoicesResponse -> List_account_invoicesResponse
forall a. a -> a
GHC.Base.id
(Either String List_account_invoicesResponse
-> List_account_invoicesResponse)
-> (ByteString -> Either String List_account_invoicesResponse)
-> ByteString
-> List_account_invoicesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. ( \Response ByteString
response ByteString
body ->
if
| (\Status
status_5 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_5 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Int
200) (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
InvoiceList -> List_account_invoicesResponse
List_account_invoicesResponse200
(InvoiceList -> List_account_invoicesResponse)
-> Either String InvoiceList
-> Either String List_account_invoicesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String InvoiceList
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
InvoiceList
)
| (\Status
status_6 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_6 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Int
400) (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
Error -> List_account_invoicesResponse
List_account_invoicesResponse400
(Error -> List_account_invoicesResponse)
-> Either String Error
-> Either String List_account_invoicesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String Error
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
Error
)
| (\Status
status_7 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_7 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Int
404) (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
Error -> List_account_invoicesResponse
List_account_invoicesResponse404
(Error -> List_account_invoicesResponse)
-> Either String Error
-> Either String List_account_invoicesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String Error
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
Error
)
| Bool -> Status -> Bool
forall a b. a -> b -> a
GHC.Base.const Bool
GHC.Types.True (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
Error -> List_account_invoicesResponse
List_account_invoicesResponseDefault
(Error -> List_account_invoicesResponse)
-> Either String Error
-> Either String List_account_invoicesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String Error
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
Error
)
| Bool
GHC.Base.otherwise -> String -> Either String List_account_invoicesResponse
forall a b. a -> Either a b
Data.Either.Left String
"Missing default response type"
)
Response ByteString
response_4
)
Response ByteString
response_4
)
( Configuration
-> Text -> Text -> [QueryParameter] -> m (Response ByteString)
forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> Text -> Text -> [QueryParameter] -> m (Response ByteString)
RecurlyClient.Common.doCallWithConfiguration
Configuration
config
(Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.Internal.pack String
"GET")
(Text
"/accounts/" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (ByteString -> Text
RecurlyClient.Common.byteToText (Bool -> ByteString -> ByteString
Network.HTTP.Types.URI.urlEncode Bool
GHC.Types.True (ByteString -> ByteString) -> ByteString -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ (Text -> ByteString
RecurlyClient.Common.textToByte (Text -> ByteString) -> Text -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> Text
forall a. ToJSON a => a -> Text
RecurlyClient.Common.stringifyModel (List_account_invoicesParameters -> Text
list_account_invoicesParametersPathAccount_id List_account_invoicesParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> Text
"/invoices"))
[ Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"ids") ([Text] -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON ([Text] -> Value) -> Maybe [Text] -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe [Text]
list_account_invoicesParametersQueryIds List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"state") (List_account_invoicesParametersQueryState -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryState -> Value)
-> Maybe List_account_invoicesParametersQueryState -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryState
list_account_invoicesParametersQueryState List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"limit") (Int -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Int -> Value) -> Maybe Int -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe Int
list_account_invoicesParametersQueryLimit List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"order") (List_account_invoicesParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryOrder -> Value)
-> Maybe List_account_invoicesParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryOrder
list_account_invoicesParametersQueryOrder List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"sort") (List_account_invoicesParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQuerySort -> Value)
-> Maybe List_account_invoicesParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQuerySort
list_account_invoicesParametersQuerySort List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"begin_time") (JsonDateTime -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (JsonDateTime -> Value) -> Maybe JsonDateTime -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryBegin_time List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"end_time") (JsonDateTime -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (JsonDateTime -> Value) -> Maybe JsonDateTime -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryEnd_time List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"type") (List_account_invoicesParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryType -> Value)
-> Maybe List_account_invoicesParametersQueryType -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryType
list_account_invoicesParametersQueryType List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
list_account_invoicesRaw ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
List_account_invoicesParameters ->
RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_account_invoicesRaw :: forall (m :: * -> *).
MonadHTTP m =>
List_account_invoicesParameters -> ClientT m (Response ByteString)
list_account_invoicesRaw List_account_invoicesParameters
parameters =
ClientT m (Response ByteString) -> ClientT m (Response ByteString)
forall a. a -> a
GHC.Base.id
( Text -> Text -> [QueryParameter] -> ClientT m (Response ByteString)
forall (m :: * -> *).
MonadHTTP m =>
Text -> Text -> [QueryParameter] -> ClientT m (Response ByteString)
RecurlyClient.Common.doCallWithConfigurationM
(Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.Internal.pack String
"GET")
(Text
"/accounts/" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (ByteString -> Text
RecurlyClient.Common.byteToText (Bool -> ByteString -> ByteString
Network.HTTP.Types.URI.urlEncode Bool
GHC.Types.True (ByteString -> ByteString) -> ByteString -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ (Text -> ByteString
RecurlyClient.Common.textToByte (Text -> ByteString) -> Text -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> Text
forall a. ToJSON a => a -> Text
RecurlyClient.Common.stringifyModel (List_account_invoicesParameters -> Text
list_account_invoicesParametersPathAccount_id List_account_invoicesParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> Text
"/invoices"))
[ Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"ids") ([Text] -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON ([Text] -> Value) -> Maybe [Text] -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe [Text]
list_account_invoicesParametersQueryIds List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"state") (List_account_invoicesParametersQueryState -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryState -> Value)
-> Maybe List_account_invoicesParametersQueryState -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryState
list_account_invoicesParametersQueryState List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"limit") (Int -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Int -> Value) -> Maybe Int -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe Int
list_account_invoicesParametersQueryLimit List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"order") (List_account_invoicesParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryOrder -> Value)
-> Maybe List_account_invoicesParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryOrder
list_account_invoicesParametersQueryOrder List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"sort") (List_account_invoicesParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQuerySort -> Value)
-> Maybe List_account_invoicesParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQuerySort
list_account_invoicesParametersQuerySort List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"begin_time") (JsonDateTime -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (JsonDateTime -> Value) -> Maybe JsonDateTime -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryBegin_time List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"end_time") (JsonDateTime -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (JsonDateTime -> Value) -> Maybe JsonDateTime -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryEnd_time List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"type") (List_account_invoicesParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryType -> Value)
-> Maybe List_account_invoicesParametersQueryType -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryType
list_account_invoicesParametersQueryType List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
list_account_invoicesWithConfigurationRaw ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
RecurlyClient.Common.Configuration ->
List_account_invoicesParameters ->
m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_account_invoicesWithConfigurationRaw :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_account_invoicesParameters -> m (Response ByteString)
list_account_invoicesWithConfigurationRaw
Configuration
config
List_account_invoicesParameters
parameters =
m (Response ByteString) -> m (Response ByteString)
forall a. a -> a
GHC.Base.id
( Configuration
-> Text -> Text -> [QueryParameter] -> m (Response ByteString)
forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> Text -> Text -> [QueryParameter] -> m (Response ByteString)
RecurlyClient.Common.doCallWithConfiguration
Configuration
config
(Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.Internal.pack String
"GET")
(Text
"/accounts/" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (ByteString -> Text
RecurlyClient.Common.byteToText (Bool -> ByteString -> ByteString
Network.HTTP.Types.URI.urlEncode Bool
GHC.Types.True (ByteString -> ByteString) -> ByteString -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ (Text -> ByteString
RecurlyClient.Common.textToByte (Text -> ByteString) -> Text -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> Text
forall a. ToJSON a => a -> Text
RecurlyClient.Common.stringifyModel (List_account_invoicesParameters -> Text
list_account_invoicesParametersPathAccount_id List_account_invoicesParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> Text
"/invoices"))
[ Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"ids") ([Text] -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON ([Text] -> Value) -> Maybe [Text] -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe [Text]
list_account_invoicesParametersQueryIds List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"state") (List_account_invoicesParametersQueryState -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryState -> Value)
-> Maybe List_account_invoicesParametersQueryState -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryState
list_account_invoicesParametersQueryState List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"limit") (Int -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Int -> Value) -> Maybe Int -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe Int
list_account_invoicesParametersQueryLimit List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"order") (List_account_invoicesParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryOrder -> Value)
-> Maybe List_account_invoicesParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryOrder
list_account_invoicesParametersQueryOrder List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"sort") (List_account_invoicesParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQuerySort -> Value)
-> Maybe List_account_invoicesParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQuerySort
list_account_invoicesParametersQuerySort List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"begin_time") (JsonDateTime -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (JsonDateTime -> Value) -> Maybe JsonDateTime -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryBegin_time List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"end_time") (JsonDateTime -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (JsonDateTime -> Value) -> Maybe JsonDateTime -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters -> Maybe JsonDateTime
list_account_invoicesParametersQueryEnd_time List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"type") (List_account_invoicesParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_invoicesParametersQueryType -> Value)
-> Maybe List_account_invoicesParametersQueryType -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_invoicesParameters
-> Maybe List_account_invoicesParametersQueryType
list_account_invoicesParametersQueryType List_account_invoicesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)