{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module RecurlyClient.Operations.List_transactions 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_transactions ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
List_transactionsParameters ->
RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response List_transactionsResponse)
list_transactions :: forall (m :: * -> *).
MonadHTTP m =>
List_transactionsParameters
-> ClientT m (Response List_transactionsResponse)
list_transactions List_transactionsParameters
parameters =
(Response ByteString -> Response List_transactionsResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response List_transactionsResponse)
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_transactionsResponse)
-> Response ByteString -> Response List_transactionsResponse
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_transactionsResponse)
-> (List_transactionsResponse -> List_transactionsResponse)
-> Either String List_transactionsResponse
-> List_transactionsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_transactionsResponse
List_transactionsResponseError List_transactionsResponse -> List_transactionsResponse
forall a. a -> a
GHC.Base.id
(Either String List_transactionsResponse
-> List_transactionsResponse)
-> (ByteString -> Either String List_transactionsResponse)
-> ByteString
-> List_transactionsResponse
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) ->
TransactionList -> List_transactionsResponse
List_transactionsResponse200
(TransactionList -> List_transactionsResponse)
-> Either String TransactionList
-> Either String List_transactionsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String TransactionList
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
TransactionList
)
| (\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_transactionsResponse
List_transactionsResponse400
(Error -> List_transactionsResponse)
-> Either String Error -> Either String List_transactionsResponse
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_transactionsResponse
List_transactionsResponse404
(Error -> List_transactionsResponse)
-> Either String Error -> Either String List_transactionsResponse
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_transactionsResponse
List_transactionsResponseDefault
(Error -> List_transactionsResponse)
-> Either String Error -> Either String List_transactionsResponse
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_transactionsResponse
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
"/transactions"
[ 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_transactionsParameters -> Maybe [Text]
list_transactionsParametersQueryIds List_transactionsParameters
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_transactionsParameters -> Maybe Int
list_transactionsParametersQueryLimit List_transactionsParameters
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_transactionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQueryOrder -> Value)
-> Maybe List_transactionsParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQueryOrder
list_transactionsParametersQueryOrder List_transactionsParameters
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_transactionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQuerySort -> Value)
-> Maybe List_transactionsParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQuerySort
list_transactionsParametersQuerySort List_transactionsParameters
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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryBegin_time List_transactionsParameters
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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryEnd_time List_transactionsParameters
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_transactionsParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQueryType -> Value)
-> Maybe List_transactionsParametersQueryType -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQueryType
list_transactionsParametersQueryType List_transactionsParameters
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
"success") (List_transactionsParametersQuerySuccess -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQuerySuccess -> Value)
-> Maybe List_transactionsParametersQuerySuccess -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQuerySuccess
list_transactionsParametersQuerySuccess List_transactionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
data List_transactionsParameters = List_transactionsParameters
{ List_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryBegin_time :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, List_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryEnd_time :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, List_transactionsParameters -> Maybe [Text]
list_transactionsParametersQueryIds :: (GHC.Maybe.Maybe [Data.Text.Internal.Text])
, List_transactionsParameters -> Maybe Int
list_transactionsParametersQueryLimit :: (GHC.Maybe.Maybe GHC.Types.Int)
, List_transactionsParameters
-> Maybe List_transactionsParametersQueryOrder
list_transactionsParametersQueryOrder :: (GHC.Maybe.Maybe List_transactionsParametersQueryOrder)
, List_transactionsParameters
-> Maybe List_transactionsParametersQuerySort
list_transactionsParametersQuerySort :: (GHC.Maybe.Maybe List_transactionsParametersQuerySort)
, List_transactionsParameters
-> Maybe List_transactionsParametersQuerySuccess
list_transactionsParametersQuerySuccess :: (GHC.Maybe.Maybe List_transactionsParametersQuerySuccess)
, List_transactionsParameters
-> Maybe List_transactionsParametersQueryType
list_transactionsParametersQueryType :: (GHC.Maybe.Maybe List_transactionsParametersQueryType)
}
deriving
( Int -> List_transactionsParameters -> ShowS
[List_transactionsParameters] -> ShowS
List_transactionsParameters -> String
(Int -> List_transactionsParameters -> ShowS)
-> (List_transactionsParameters -> String)
-> ([List_transactionsParameters] -> ShowS)
-> Show List_transactionsParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_transactionsParameters -> ShowS
showsPrec :: Int -> List_transactionsParameters -> ShowS
$cshow :: List_transactionsParameters -> String
show :: List_transactionsParameters -> String
$cshowList :: [List_transactionsParameters] -> ShowS
showList :: [List_transactionsParameters] -> ShowS
GHC.Show.Show
, List_transactionsParameters -> List_transactionsParameters -> Bool
(List_transactionsParameters
-> List_transactionsParameters -> Bool)
-> (List_transactionsParameters
-> List_transactionsParameters -> Bool)
-> Eq List_transactionsParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_transactionsParameters -> List_transactionsParameters -> Bool
== :: List_transactionsParameters -> List_transactionsParameters -> Bool
$c/= :: List_transactionsParameters -> List_transactionsParameters -> Bool
/= :: List_transactionsParameters -> List_transactionsParameters -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON List_transactionsParameters where
toJSON :: List_transactionsParameters -> Value
toJSON List_transactionsParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryBegin_time List_transactionsParameters
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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryEnd_time List_transactionsParameters
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_transactionsParameters -> Maybe [Text]
list_transactionsParametersQueryIds List_transactionsParameters
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_transactionsParameters -> Maybe Int
list_transactionsParametersQueryLimit List_transactionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_transactionsParametersQueryOrder -> [Pair])
-> Maybe List_transactionsParametersQueryOrder
-> [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_transactionsParametersQueryOrder -> Pair)
-> List_transactionsParametersQueryOrder
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryOrder" Key -> List_transactionsParametersQueryOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_transactionsParameters
-> Maybe List_transactionsParametersQueryOrder
list_transactionsParametersQueryOrder List_transactionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_transactionsParametersQuerySort -> [Pair])
-> Maybe List_transactionsParametersQuerySort
-> [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_transactionsParametersQuerySort -> Pair)
-> List_transactionsParametersQuerySort
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySort" Key -> List_transactionsParametersQuerySort -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_transactionsParameters
-> Maybe List_transactionsParametersQuerySort
list_transactionsParametersQuerySort List_transactionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_transactionsParametersQuerySuccess -> [Pair])
-> Maybe List_transactionsParametersQuerySuccess
-> [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_transactionsParametersQuerySuccess -> Pair)
-> List_transactionsParametersQuerySuccess
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySuccess" Key -> List_transactionsParametersQuerySuccess -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_transactionsParameters
-> Maybe List_transactionsParametersQuerySuccess
list_transactionsParametersQuerySuccess List_transactionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_transactionsParametersQueryType -> [Pair])
-> Maybe List_transactionsParametersQueryType
-> [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_transactionsParametersQueryType -> Pair)
-> List_transactionsParametersQueryType
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryType" Key -> List_transactionsParametersQueryType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_transactionsParameters
-> Maybe List_transactionsParametersQueryType
list_transactionsParametersQueryType List_transactionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
toEncoding :: List_transactionsParameters -> Encoding
toEncoding List_transactionsParameters
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 ([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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryBegin_time List_transactionsParameters
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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryEnd_time List_transactionsParameters
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_transactionsParameters -> Maybe [Text]
list_transactionsParametersQueryIds List_transactionsParameters
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_transactionsParameters -> Maybe Int
list_transactionsParametersQueryLimit List_transactionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_transactionsParametersQueryOrder -> [Series])
-> Maybe List_transactionsParametersQueryOrder
-> [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_transactionsParametersQueryOrder -> Series)
-> List_transactionsParametersQueryOrder
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryOrder" Key -> List_transactionsParametersQueryOrder -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_transactionsParameters
-> Maybe List_transactionsParametersQueryOrder
list_transactionsParametersQueryOrder List_transactionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_transactionsParametersQuerySort -> [Series])
-> Maybe List_transactionsParametersQuerySort
-> [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_transactionsParametersQuerySort -> Series)
-> List_transactionsParametersQuerySort
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySort" Key -> List_transactionsParametersQuerySort -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_transactionsParameters
-> Maybe List_transactionsParametersQuerySort
list_transactionsParametersQuerySort List_transactionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_transactionsParametersQuerySuccess -> [Series])
-> Maybe List_transactionsParametersQuerySuccess
-> [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_transactionsParametersQuerySuccess -> Series)
-> List_transactionsParametersQuerySuccess
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySuccess" Key -> List_transactionsParametersQuerySuccess -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_transactionsParameters
-> Maybe List_transactionsParametersQuerySuccess
list_transactionsParametersQuerySuccess List_transactionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_transactionsParametersQueryType -> [Series])
-> Maybe List_transactionsParametersQueryType
-> [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_transactionsParametersQueryType -> Series)
-> List_transactionsParametersQueryType
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryType" Key -> List_transactionsParametersQueryType -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_transactionsParameters
-> Maybe List_transactionsParametersQueryType
list_transactionsParametersQueryType List_transactionsParameters
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_transactionsParameters where
parseJSON :: Value -> Parser List_transactionsParameters
parseJSON = String
-> (Object -> Parser List_transactionsParameters)
-> Value
-> Parser List_transactionsParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"List_transactionsParameters" (\Object
obj -> ((((((((Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
-> Parser
(Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters
List_transactionsParameters Parser
(Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
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_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe [Text]
-> Maybe Int
-> Maybe List_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
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_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
-> Parser (Maybe [Text])
-> Parser
(Maybe Int
-> Maybe List_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
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_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
-> Parser (Maybe Int)
-> Parser
(Maybe List_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
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_transactionsParametersQueryOrder
-> Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
-> Parser (Maybe List_transactionsParametersQueryOrder)
-> Parser
(Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
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_transactionsParametersQueryOrder)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryOrder")) Parser
(Maybe List_transactionsParametersQuerySort
-> Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
-> Parser (Maybe List_transactionsParametersQuerySort)
-> Parser
(Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
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_transactionsParametersQuerySort)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"querySort")) Parser
(Maybe List_transactionsParametersQuerySuccess
-> Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
-> Parser (Maybe List_transactionsParametersQuerySuccess)
-> Parser
(Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
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_transactionsParametersQuerySuccess)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"querySuccess")) Parser
(Maybe List_transactionsParametersQueryType
-> List_transactionsParameters)
-> Parser (Maybe List_transactionsParametersQueryType)
-> Parser List_transactionsParameters
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_transactionsParametersQueryType)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryType"))
mkList_transactionsParameters :: List_transactionsParameters
mkList_transactionsParameters :: List_transactionsParameters
mkList_transactionsParameters =
List_transactionsParameters
{ list_transactionsParametersQueryBegin_time :: Maybe JsonDateTime
list_transactionsParametersQueryBegin_time = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, list_transactionsParametersQueryEnd_time :: Maybe JsonDateTime
list_transactionsParametersQueryEnd_time = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, list_transactionsParametersQueryIds :: Maybe [Text]
list_transactionsParametersQueryIds = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing
, list_transactionsParametersQueryLimit :: Maybe Int
list_transactionsParametersQueryLimit = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
, list_transactionsParametersQueryOrder :: Maybe List_transactionsParametersQueryOrder
list_transactionsParametersQueryOrder = Maybe List_transactionsParametersQueryOrder
forall a. Maybe a
GHC.Maybe.Nothing
, list_transactionsParametersQuerySort :: Maybe List_transactionsParametersQuerySort
list_transactionsParametersQuerySort = Maybe List_transactionsParametersQuerySort
forall a. Maybe a
GHC.Maybe.Nothing
, list_transactionsParametersQuerySuccess :: Maybe List_transactionsParametersQuerySuccess
list_transactionsParametersQuerySuccess = Maybe List_transactionsParametersQuerySuccess
forall a. Maybe a
GHC.Maybe.Nothing
, list_transactionsParametersQueryType :: Maybe List_transactionsParametersQueryType
list_transactionsParametersQueryType = Maybe List_transactionsParametersQueryType
forall a. Maybe a
GHC.Maybe.Nothing
}
data List_transactionsParametersQueryOrder
=
List_transactionsParametersQueryOrderOther Data.Aeson.Types.Internal.Value
|
List_transactionsParametersQueryOrderTyped Data.Text.Internal.Text
|
List_transactionsParametersQueryOrderEnumAsc
|
List_transactionsParametersQueryOrderEnumDesc
deriving (Int -> List_transactionsParametersQueryOrder -> ShowS
[List_transactionsParametersQueryOrder] -> ShowS
List_transactionsParametersQueryOrder -> String
(Int -> List_transactionsParametersQueryOrder -> ShowS)
-> (List_transactionsParametersQueryOrder -> String)
-> ([List_transactionsParametersQueryOrder] -> ShowS)
-> Show List_transactionsParametersQueryOrder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_transactionsParametersQueryOrder -> ShowS
showsPrec :: Int -> List_transactionsParametersQueryOrder -> ShowS
$cshow :: List_transactionsParametersQueryOrder -> String
show :: List_transactionsParametersQueryOrder -> String
$cshowList :: [List_transactionsParametersQueryOrder] -> ShowS
showList :: [List_transactionsParametersQueryOrder] -> ShowS
GHC.Show.Show, List_transactionsParametersQueryOrder
-> List_transactionsParametersQueryOrder -> Bool
(List_transactionsParametersQueryOrder
-> List_transactionsParametersQueryOrder -> Bool)
-> (List_transactionsParametersQueryOrder
-> List_transactionsParametersQueryOrder -> Bool)
-> Eq List_transactionsParametersQueryOrder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_transactionsParametersQueryOrder
-> List_transactionsParametersQueryOrder -> Bool
== :: List_transactionsParametersQueryOrder
-> List_transactionsParametersQueryOrder -> Bool
$c/= :: List_transactionsParametersQueryOrder
-> List_transactionsParametersQueryOrder -> Bool
/= :: List_transactionsParametersQueryOrder
-> List_transactionsParametersQueryOrder -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_transactionsParametersQueryOrder where
toJSON :: List_transactionsParametersQueryOrder -> Value
toJSON (List_transactionsParametersQueryOrderOther Value
val) = Value
val
toJSON (List_transactionsParametersQueryOrderTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_transactionsParametersQueryOrder
List_transactionsParametersQueryOrderEnumAsc) = Value
"asc"
toJSON (List_transactionsParametersQueryOrder
List_transactionsParametersQueryOrderEnumDesc) = Value
"desc"
instance Data.Aeson.Types.FromJSON.FromJSON List_transactionsParametersQueryOrder where
parseJSON :: Value -> Parser List_transactionsParametersQueryOrder
parseJSON Value
val =
List_transactionsParametersQueryOrder
-> Parser List_transactionsParametersQueryOrder
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_transactionsParametersQueryOrder
List_transactionsParametersQueryOrderEnumAsc
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"desc" -> List_transactionsParametersQueryOrder
List_transactionsParametersQueryOrderEnumDesc
| Bool
GHC.Base.otherwise -> Value -> List_transactionsParametersQueryOrder
List_transactionsParametersQueryOrderOther Value
val
)
data List_transactionsParametersQuerySort
=
List_transactionsParametersQuerySortOther Data.Aeson.Types.Internal.Value
|
List_transactionsParametersQuerySortTyped Data.Text.Internal.Text
|
List_transactionsParametersQuerySortEnumCreated_at
|
List_transactionsParametersQuerySortEnumUpdated_at
deriving (Int -> List_transactionsParametersQuerySort -> ShowS
[List_transactionsParametersQuerySort] -> ShowS
List_transactionsParametersQuerySort -> String
(Int -> List_transactionsParametersQuerySort -> ShowS)
-> (List_transactionsParametersQuerySort -> String)
-> ([List_transactionsParametersQuerySort] -> ShowS)
-> Show List_transactionsParametersQuerySort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_transactionsParametersQuerySort -> ShowS
showsPrec :: Int -> List_transactionsParametersQuerySort -> ShowS
$cshow :: List_transactionsParametersQuerySort -> String
show :: List_transactionsParametersQuerySort -> String
$cshowList :: [List_transactionsParametersQuerySort] -> ShowS
showList :: [List_transactionsParametersQuerySort] -> ShowS
GHC.Show.Show, List_transactionsParametersQuerySort
-> List_transactionsParametersQuerySort -> Bool
(List_transactionsParametersQuerySort
-> List_transactionsParametersQuerySort -> Bool)
-> (List_transactionsParametersQuerySort
-> List_transactionsParametersQuerySort -> Bool)
-> Eq List_transactionsParametersQuerySort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_transactionsParametersQuerySort
-> List_transactionsParametersQuerySort -> Bool
== :: List_transactionsParametersQuerySort
-> List_transactionsParametersQuerySort -> Bool
$c/= :: List_transactionsParametersQuerySort
-> List_transactionsParametersQuerySort -> Bool
/= :: List_transactionsParametersQuerySort
-> List_transactionsParametersQuerySort -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_transactionsParametersQuerySort where
toJSON :: List_transactionsParametersQuerySort -> Value
toJSON (List_transactionsParametersQuerySortOther Value
val) = Value
val
toJSON (List_transactionsParametersQuerySortTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_transactionsParametersQuerySort
List_transactionsParametersQuerySortEnumCreated_at) = Value
"created_at"
toJSON (List_transactionsParametersQuerySort
List_transactionsParametersQuerySortEnumUpdated_at) = Value
"updated_at"
instance Data.Aeson.Types.FromJSON.FromJSON List_transactionsParametersQuerySort where
parseJSON :: Value -> Parser List_transactionsParametersQuerySort
parseJSON Value
val =
List_transactionsParametersQuerySort
-> Parser List_transactionsParametersQuerySort
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_transactionsParametersQuerySort
List_transactionsParametersQuerySortEnumCreated_at
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"updated_at" -> List_transactionsParametersQuerySort
List_transactionsParametersQuerySortEnumUpdated_at
| Bool
GHC.Base.otherwise -> Value -> List_transactionsParametersQuerySort
List_transactionsParametersQuerySortOther Value
val
)
data List_transactionsParametersQuerySuccess
=
List_transactionsParametersQuerySuccessOther Data.Aeson.Types.Internal.Value
|
List_transactionsParametersQuerySuccessTyped Data.Text.Internal.Text
|
List_transactionsParametersQuerySuccessEnumTrue
deriving (Int -> List_transactionsParametersQuerySuccess -> ShowS
[List_transactionsParametersQuerySuccess] -> ShowS
List_transactionsParametersQuerySuccess -> String
(Int -> List_transactionsParametersQuerySuccess -> ShowS)
-> (List_transactionsParametersQuerySuccess -> String)
-> ([List_transactionsParametersQuerySuccess] -> ShowS)
-> Show List_transactionsParametersQuerySuccess
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_transactionsParametersQuerySuccess -> ShowS
showsPrec :: Int -> List_transactionsParametersQuerySuccess -> ShowS
$cshow :: List_transactionsParametersQuerySuccess -> String
show :: List_transactionsParametersQuerySuccess -> String
$cshowList :: [List_transactionsParametersQuerySuccess] -> ShowS
showList :: [List_transactionsParametersQuerySuccess] -> ShowS
GHC.Show.Show, List_transactionsParametersQuerySuccess
-> List_transactionsParametersQuerySuccess -> Bool
(List_transactionsParametersQuerySuccess
-> List_transactionsParametersQuerySuccess -> Bool)
-> (List_transactionsParametersQuerySuccess
-> List_transactionsParametersQuerySuccess -> Bool)
-> Eq List_transactionsParametersQuerySuccess
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_transactionsParametersQuerySuccess
-> List_transactionsParametersQuerySuccess -> Bool
== :: List_transactionsParametersQuerySuccess
-> List_transactionsParametersQuerySuccess -> Bool
$c/= :: List_transactionsParametersQuerySuccess
-> List_transactionsParametersQuerySuccess -> Bool
/= :: List_transactionsParametersQuerySuccess
-> List_transactionsParametersQuerySuccess -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_transactionsParametersQuerySuccess where
toJSON :: List_transactionsParametersQuerySuccess -> Value
toJSON (List_transactionsParametersQuerySuccessOther Value
val) = Value
val
toJSON (List_transactionsParametersQuerySuccessTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_transactionsParametersQuerySuccess
List_transactionsParametersQuerySuccessEnumTrue) = Bool -> Value
Data.Aeson.Types.Internal.Bool Bool
GHC.Types.True
instance Data.Aeson.Types.FromJSON.FromJSON List_transactionsParametersQuerySuccess where
parseJSON :: Value -> Parser List_transactionsParametersQuerySuccess
parseJSON Value
val =
List_transactionsParametersQuerySuccess
-> Parser List_transactionsParametersQuerySuccess
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.== Bool -> Value
Data.Aeson.Types.Internal.Bool Bool
GHC.Types.True -> List_transactionsParametersQuerySuccess
List_transactionsParametersQuerySuccessEnumTrue
| Bool
GHC.Base.otherwise -> Value -> List_transactionsParametersQuerySuccess
List_transactionsParametersQuerySuccessOther Value
val
)
data List_transactionsParametersQueryType
=
List_transactionsParametersQueryTypeOther Data.Aeson.Types.Internal.Value
|
List_transactionsParametersQueryTypeTyped Data.Text.Internal.Text
|
List_transactionsParametersQueryTypeEnumAuthorization
|
List_transactionsParametersQueryTypeEnumCapture
|
List_transactionsParametersQueryTypeEnumPayment
|
List_transactionsParametersQueryTypeEnumPurchase
|
List_transactionsParametersQueryTypeEnumRefund
|
List_transactionsParametersQueryTypeEnumVerify
deriving (Int -> List_transactionsParametersQueryType -> ShowS
[List_transactionsParametersQueryType] -> ShowS
List_transactionsParametersQueryType -> String
(Int -> List_transactionsParametersQueryType -> ShowS)
-> (List_transactionsParametersQueryType -> String)
-> ([List_transactionsParametersQueryType] -> ShowS)
-> Show List_transactionsParametersQueryType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_transactionsParametersQueryType -> ShowS
showsPrec :: Int -> List_transactionsParametersQueryType -> ShowS
$cshow :: List_transactionsParametersQueryType -> String
show :: List_transactionsParametersQueryType -> String
$cshowList :: [List_transactionsParametersQueryType] -> ShowS
showList :: [List_transactionsParametersQueryType] -> ShowS
GHC.Show.Show, List_transactionsParametersQueryType
-> List_transactionsParametersQueryType -> Bool
(List_transactionsParametersQueryType
-> List_transactionsParametersQueryType -> Bool)
-> (List_transactionsParametersQueryType
-> List_transactionsParametersQueryType -> Bool)
-> Eq List_transactionsParametersQueryType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_transactionsParametersQueryType
-> List_transactionsParametersQueryType -> Bool
== :: List_transactionsParametersQueryType
-> List_transactionsParametersQueryType -> Bool
$c/= :: List_transactionsParametersQueryType
-> List_transactionsParametersQueryType -> Bool
/= :: List_transactionsParametersQueryType
-> List_transactionsParametersQueryType -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_transactionsParametersQueryType where
toJSON :: List_transactionsParametersQueryType -> Value
toJSON (List_transactionsParametersQueryTypeOther Value
val) = Value
val
toJSON (List_transactionsParametersQueryTypeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumAuthorization) = Value
"authorization"
toJSON (List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumCapture) = Value
"capture"
toJSON (List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumPayment) = Value
"payment"
toJSON (List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumPurchase) = Value
"purchase"
toJSON (List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumRefund) = Value
"refund"
toJSON (List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumVerify) = Value
"verify"
instance Data.Aeson.Types.FromJSON.FromJSON List_transactionsParametersQueryType where
parseJSON :: Value -> Parser List_transactionsParametersQueryType
parseJSON Value
val =
List_transactionsParametersQueryType
-> Parser List_transactionsParametersQueryType
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
"authorization" -> List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumAuthorization
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"capture" -> List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumCapture
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"payment" -> List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumPayment
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"purchase" -> List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumPurchase
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"refund" -> List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumRefund
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verify" -> List_transactionsParametersQueryType
List_transactionsParametersQueryTypeEnumVerify
| Bool
GHC.Base.otherwise -> Value -> List_transactionsParametersQueryType
List_transactionsParametersQueryTypeOther Value
val
)
data List_transactionsResponse
=
List_transactionsResponseError GHC.Base.String
|
List_transactionsResponse200 TransactionList
|
List_transactionsResponse400 Error
|
List_transactionsResponse404 Error
|
List_transactionsResponseDefault Error
deriving (Int -> List_transactionsResponse -> ShowS
[List_transactionsResponse] -> ShowS
List_transactionsResponse -> String
(Int -> List_transactionsResponse -> ShowS)
-> (List_transactionsResponse -> String)
-> ([List_transactionsResponse] -> ShowS)
-> Show List_transactionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_transactionsResponse -> ShowS
showsPrec :: Int -> List_transactionsResponse -> ShowS
$cshow :: List_transactionsResponse -> String
show :: List_transactionsResponse -> String
$cshowList :: [List_transactionsResponse] -> ShowS
showList :: [List_transactionsResponse] -> ShowS
GHC.Show.Show, List_transactionsResponse -> List_transactionsResponse -> Bool
(List_transactionsResponse -> List_transactionsResponse -> Bool)
-> (List_transactionsResponse -> List_transactionsResponse -> Bool)
-> Eq List_transactionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_transactionsResponse -> List_transactionsResponse -> Bool
== :: List_transactionsResponse -> List_transactionsResponse -> Bool
$c/= :: List_transactionsResponse -> List_transactionsResponse -> Bool
/= :: List_transactionsResponse -> List_transactionsResponse -> Bool
GHC.Classes.Eq)
list_transactionsWithConfiguration ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
RecurlyClient.Common.Configuration ->
List_transactionsParameters ->
m (Network.HTTP.Client.Types.Response List_transactionsResponse)
list_transactionsWithConfiguration :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_transactionsParameters
-> m (Response List_transactionsResponse)
list_transactionsWithConfiguration
Configuration
config
List_transactionsParameters
parameters =
(Response ByteString -> Response List_transactionsResponse)
-> m (Response ByteString)
-> m (Response List_transactionsResponse)
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_transactionsResponse)
-> Response ByteString -> Response List_transactionsResponse
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_transactionsResponse)
-> (List_transactionsResponse -> List_transactionsResponse)
-> Either String List_transactionsResponse
-> List_transactionsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_transactionsResponse
List_transactionsResponseError List_transactionsResponse -> List_transactionsResponse
forall a. a -> a
GHC.Base.id
(Either String List_transactionsResponse
-> List_transactionsResponse)
-> (ByteString -> Either String List_transactionsResponse)
-> ByteString
-> List_transactionsResponse
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) ->
TransactionList -> List_transactionsResponse
List_transactionsResponse200
(TransactionList -> List_transactionsResponse)
-> Either String TransactionList
-> Either String List_transactionsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String TransactionList
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
TransactionList
)
| (\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_transactionsResponse
List_transactionsResponse400
(Error -> List_transactionsResponse)
-> Either String Error -> Either String List_transactionsResponse
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_transactionsResponse
List_transactionsResponse404
(Error -> List_transactionsResponse)
-> Either String Error -> Either String List_transactionsResponse
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_transactionsResponse
List_transactionsResponseDefault
(Error -> List_transactionsResponse)
-> Either String Error -> Either String List_transactionsResponse
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_transactionsResponse
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
"/transactions"
[ 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_transactionsParameters -> Maybe [Text]
list_transactionsParametersQueryIds List_transactionsParameters
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_transactionsParameters -> Maybe Int
list_transactionsParametersQueryLimit List_transactionsParameters
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_transactionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQueryOrder -> Value)
-> Maybe List_transactionsParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQueryOrder
list_transactionsParametersQueryOrder List_transactionsParameters
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_transactionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQuerySort -> Value)
-> Maybe List_transactionsParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQuerySort
list_transactionsParametersQuerySort List_transactionsParameters
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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryBegin_time List_transactionsParameters
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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryEnd_time List_transactionsParameters
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_transactionsParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQueryType -> Value)
-> Maybe List_transactionsParametersQueryType -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQueryType
list_transactionsParametersQueryType List_transactionsParameters
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
"success") (List_transactionsParametersQuerySuccess -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQuerySuccess -> Value)
-> Maybe List_transactionsParametersQuerySuccess -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQuerySuccess
list_transactionsParametersQuerySuccess List_transactionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
list_transactionsRaw ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
List_transactionsParameters ->
RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_transactionsRaw :: forall (m :: * -> *).
MonadHTTP m =>
List_transactionsParameters -> ClientT m (Response ByteString)
list_transactionsRaw List_transactionsParameters
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
"/transactions"
[ 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_transactionsParameters -> Maybe [Text]
list_transactionsParametersQueryIds List_transactionsParameters
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_transactionsParameters -> Maybe Int
list_transactionsParametersQueryLimit List_transactionsParameters
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_transactionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQueryOrder -> Value)
-> Maybe List_transactionsParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQueryOrder
list_transactionsParametersQueryOrder List_transactionsParameters
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_transactionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQuerySort -> Value)
-> Maybe List_transactionsParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQuerySort
list_transactionsParametersQuerySort List_transactionsParameters
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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryBegin_time List_transactionsParameters
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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryEnd_time List_transactionsParameters
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_transactionsParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQueryType -> Value)
-> Maybe List_transactionsParametersQueryType -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQueryType
list_transactionsParametersQueryType List_transactionsParameters
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
"success") (List_transactionsParametersQuerySuccess -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQuerySuccess -> Value)
-> Maybe List_transactionsParametersQuerySuccess -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQuerySuccess
list_transactionsParametersQuerySuccess List_transactionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
list_transactionsWithConfigurationRaw ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
RecurlyClient.Common.Configuration ->
List_transactionsParameters ->
m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_transactionsWithConfigurationRaw :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_transactionsParameters -> m (Response ByteString)
list_transactionsWithConfigurationRaw
Configuration
config
List_transactionsParameters
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
"/transactions"
[ 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_transactionsParameters -> Maybe [Text]
list_transactionsParametersQueryIds List_transactionsParameters
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_transactionsParameters -> Maybe Int
list_transactionsParametersQueryLimit List_transactionsParameters
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_transactionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQueryOrder -> Value)
-> Maybe List_transactionsParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQueryOrder
list_transactionsParametersQueryOrder List_transactionsParameters
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_transactionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQuerySort -> Value)
-> Maybe List_transactionsParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQuerySort
list_transactionsParametersQuerySort List_transactionsParameters
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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryBegin_time List_transactionsParameters
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_transactionsParameters -> Maybe JsonDateTime
list_transactionsParametersQueryEnd_time List_transactionsParameters
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_transactionsParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQueryType -> Value)
-> Maybe List_transactionsParametersQueryType -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQueryType
list_transactionsParametersQueryType List_transactionsParameters
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
"success") (List_transactionsParametersQuerySuccess -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_transactionsParametersQuerySuccess -> Value)
-> Maybe List_transactionsParametersQuerySuccess -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_transactionsParameters
-> Maybe List_transactionsParametersQuerySuccess
list_transactionsParametersQuerySuccess List_transactionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)