{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.
{-# LANGUAGE OverloadedStrings #-}

-- | Contains the different functions to run the operation list_account_transactions
module RecurlyClient.Operations.List_account_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

{- | > GET /accounts/{account_id}/transactions

See the [Pagination Guide](\/developers\/guides\/pagination.html) to learn how to use pagination in the API and Client Libraries.
-}
list_account_transactions ::
    forall m.
    (RecurlyClient.Common.MonadHTTP m) =>
    -- | Contains all available parameters of this operation (query and path parameters)
    List_account_transactionsParameters ->
    -- | Monadic computation which returns the result of the operation
    RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response List_account_transactionsResponse)
list_account_transactions :: forall (m :: * -> *).
MonadHTTP m =>
List_account_transactionsParameters
-> ClientT m (Response List_account_transactionsResponse)
list_account_transactions List_account_transactionsParameters
parameters =
    (Response ByteString -> Response List_account_transactionsResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response List_account_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_account_transactionsResponse)
-> Response ByteString
-> Response List_account_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_account_transactionsResponse)
-> (List_account_transactionsResponse
    -> List_account_transactionsResponse)
-> Either String List_account_transactionsResponse
-> List_account_transactionsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_account_transactionsResponse
List_account_transactionsResponseError List_account_transactionsResponse
-> List_account_transactionsResponse
forall a. a -> a
GHC.Base.id
                    (Either String List_account_transactionsResponse
 -> List_account_transactionsResponse)
-> (ByteString -> Either String List_account_transactionsResponse)
-> ByteString
-> List_account_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_account_transactionsResponse
List_account_transactionsResponse200
                                                (TransactionList -> List_account_transactionsResponse)
-> Either String TransactionList
-> Either String List_account_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_account_transactionsResponse
List_account_transactionsResponse400
                                                (Error -> List_account_transactionsResponse)
-> Either String Error
-> Either String List_account_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_account_transactionsResponse
List_account_transactionsResponse404
                                                (Error -> List_account_transactionsResponse)
-> Either String Error
-> Either String List_account_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_account_transactionsResponse
List_account_transactionsResponseDefault
                                                (Error -> List_account_transactionsResponse)
-> Either String Error
-> Either String List_account_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_account_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
"/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_transactionsParameters -> Text
list_account_transactionsParametersPathAccount_id List_account_transactionsParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> 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_account_transactionsParameters -> Maybe [Text]
list_account_transactionsParametersQueryIds List_account_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_account_transactionsParameters -> Maybe Int
list_account_transactionsParametersQueryLimit List_account_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_account_transactionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQueryOrder -> Value)
-> Maybe List_account_transactionsParametersQueryOrder
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryOrder
list_account_transactionsParametersQueryOrder List_account_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_account_transactionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQuerySort -> Value)
-> Maybe List_account_transactionsParametersQuerySort
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySort
list_account_transactionsParametersQuerySort List_account_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_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryBegin_time List_account_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_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryEnd_time List_account_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_account_transactionsParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQueryType -> Value)
-> Maybe List_account_transactionsParametersQueryType
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryType
list_account_transactionsParametersQueryType List_account_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_account_transactionsParametersQuerySuccess -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQuerySuccess -> Value)
-> Maybe List_account_transactionsParametersQuerySuccess
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySuccess
list_account_transactionsParametersQuerySuccess List_account_transactionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
            ]
        )

-- | Defines the object schema located at @paths.\/accounts\/{account_id}\/transactions.GET.parameters@ in the specification.
data List_account_transactionsParameters = List_account_transactionsParameters
    { List_account_transactionsParameters -> Text
list_account_transactionsParametersPathAccount_id :: Data.Text.Internal.Text
    -- ^ pathAccount_id: Represents the parameter named \'account_id\'
    --
    -- Account ID or code. For ID no prefix is used e.g. \`e28zov4fw0v2\`. For code use prefix \`code-\`, e.g. \`code-bob\`.
    , List_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryBegin_time :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
    -- ^ queryBegin_time: Represents the parameter named \'begin_time\'
    --
    -- Inclusively filter by begin_time when \`sort=created_at\` or \`sort=updated_at\`.
    -- **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
    , List_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryEnd_time :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
    -- ^ queryEnd_time: Represents the parameter named \'end_time\'
    --
    -- Inclusively filter by end_time when \`sort=created_at\` or \`sort=updated_at\`.
    -- **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
    , List_account_transactionsParameters -> Maybe [Text]
list_account_transactionsParametersQueryIds :: (GHC.Maybe.Maybe [Data.Text.Internal.Text])
    -- ^ queryIds: Represents the parameter named \'ids\'
    --
    -- Filter results by their IDs. Up to 200 IDs can be passed at once using
    -- commas as separators, e.g. \`ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6\`.
    --
    -- **Important notes:**
    --
    -- * The \`ids\` parameter cannot be used with any other ordering or filtering
    --   parameters (\`limit\`, \`order\`, \`sort\`, \`begin_time\`, \`end_time\`, etc)
    -- * Invalid or unknown IDs will be ignored, so you should check that the
    --   results correspond to your request.
    -- * Records are returned in an arbitrary order. Since results are all
    --   returned at once you can sort the records yourself.
    , List_account_transactionsParameters -> Maybe Int
list_account_transactionsParametersQueryLimit :: (GHC.Maybe.Maybe GHC.Types.Int)
    -- ^ queryLimit: Represents the parameter named \'limit\'
    --
    -- Limit number of records 1-200.
    --
    -- Constraints:
    --
    -- * Maxium  of 200.0
    -- * Minimum  of 1.0
    , List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryOrder
list_account_transactionsParametersQueryOrder :: (GHC.Maybe.Maybe List_account_transactionsParametersQueryOrder)
    -- ^ queryOrder: Represents the parameter named \'order\'
    --
    -- Sort order.
    , List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySort
list_account_transactionsParametersQuerySort :: (GHC.Maybe.Maybe List_account_transactionsParametersQuerySort)
    -- ^ querySort: Represents the parameter named \'sort\'
    --
    -- Sort field. You *really* only want to sort by \`updated_at\` in ascending
    -- order. In descending order updated records will move behind the cursor and could
    -- prevent some records from being returned.
    , List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySuccess
list_account_transactionsParametersQuerySuccess :: (GHC.Maybe.Maybe List_account_transactionsParametersQuerySuccess)
    -- ^ querySuccess: Represents the parameter named \'success\'
    --
    -- Filter by success field.
    , List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryType
list_account_transactionsParametersQueryType :: (GHC.Maybe.Maybe List_account_transactionsParametersQueryType)
    -- ^ queryType: Represents the parameter named \'type\'
    --
    -- Filter by type field. The value \`payment\` will return both \`purchase\` and \`capture\` transactions.
    }
    deriving
        ( Int -> List_account_transactionsParameters -> ShowS
[List_account_transactionsParameters] -> ShowS
List_account_transactionsParameters -> String
(Int -> List_account_transactionsParameters -> ShowS)
-> (List_account_transactionsParameters -> String)
-> ([List_account_transactionsParameters] -> ShowS)
-> Show List_account_transactionsParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_transactionsParameters -> ShowS
showsPrec :: Int -> List_account_transactionsParameters -> ShowS
$cshow :: List_account_transactionsParameters -> String
show :: List_account_transactionsParameters -> String
$cshowList :: [List_account_transactionsParameters] -> ShowS
showList :: [List_account_transactionsParameters] -> ShowS
GHC.Show.Show
        , List_account_transactionsParameters
-> List_account_transactionsParameters -> Bool
(List_account_transactionsParameters
 -> List_account_transactionsParameters -> Bool)
-> (List_account_transactionsParameters
    -> List_account_transactionsParameters -> Bool)
-> Eq List_account_transactionsParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_transactionsParameters
-> List_account_transactionsParameters -> Bool
== :: List_account_transactionsParameters
-> List_account_transactionsParameters -> Bool
$c/= :: List_account_transactionsParameters
-> List_account_transactionsParameters -> Bool
/= :: List_account_transactionsParameters
-> List_account_transactionsParameters -> Bool
GHC.Classes.Eq
        )

instance Data.Aeson.Types.ToJSON.ToJSON List_account_transactionsParameters where
    toJSON :: List_account_transactionsParameters -> Value
toJSON List_account_transactionsParameters
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_transactionsParameters -> Text
list_account_transactionsParametersPathAccount_id List_account_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
"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_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryBegin_time List_account_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_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryEnd_time List_account_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_account_transactionsParameters -> Maybe [Text]
list_account_transactionsParametersQueryIds List_account_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_account_transactionsParameters -> Maybe Int
list_account_transactionsParametersQueryLimit List_account_transactionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_account_transactionsParametersQueryOrder -> [Pair])
-> Maybe List_account_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_account_transactionsParametersQueryOrder -> Pair)
-> List_account_transactionsParametersQueryOrder
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryOrder" Key -> List_account_transactionsParametersQueryOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryOrder
list_account_transactionsParametersQueryOrder List_account_transactionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_account_transactionsParametersQuerySort -> [Pair])
-> Maybe List_account_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_account_transactionsParametersQuerySort -> Pair)
-> List_account_transactionsParametersQuerySort
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySort" Key -> List_account_transactionsParametersQuerySort -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySort
list_account_transactionsParametersQuerySort List_account_transactionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_account_transactionsParametersQuerySuccess -> [Pair])
-> Maybe List_account_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_account_transactionsParametersQuerySuccess -> Pair)
-> List_account_transactionsParametersQuerySuccess
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySuccess" Key -> List_account_transactionsParametersQuerySuccess -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySuccess
list_account_transactionsParametersQuerySuccess List_account_transactionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_account_transactionsParametersQueryType -> [Pair])
-> Maybe List_account_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_account_transactionsParametersQueryType -> Pair)
-> List_account_transactionsParametersQueryType
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryType" Key -> List_account_transactionsParametersQueryType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryType
list_account_transactionsParametersQueryType List_account_transactionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
    toEncoding :: List_account_transactionsParameters -> Encoding
toEncoding List_account_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 ([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_transactionsParameters -> Text
list_account_transactionsParametersPathAccount_id List_account_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
"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_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryBegin_time List_account_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_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryEnd_time List_account_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_account_transactionsParameters -> Maybe [Text]
list_account_transactionsParametersQueryIds List_account_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_account_transactionsParameters -> Maybe Int
list_account_transactionsParametersQueryLimit List_account_transactionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_account_transactionsParametersQueryOrder -> [Series])
-> Maybe List_account_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_account_transactionsParametersQueryOrder -> Series)
-> List_account_transactionsParametersQueryOrder
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryOrder" Key -> List_account_transactionsParametersQueryOrder -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryOrder
list_account_transactionsParametersQueryOrder List_account_transactionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_account_transactionsParametersQuerySort -> [Series])
-> Maybe List_account_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_account_transactionsParametersQuerySort -> Series)
-> List_account_transactionsParametersQuerySort
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySort" Key -> List_account_transactionsParametersQuerySort -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySort
list_account_transactionsParametersQuerySort List_account_transactionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_account_transactionsParametersQuerySuccess -> [Series])
-> Maybe List_account_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_account_transactionsParametersQuerySuccess -> Series)
-> List_account_transactionsParametersQuerySuccess
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySuccess" Key -> List_account_transactionsParametersQuerySuccess -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySuccess
list_account_transactionsParametersQuerySuccess List_account_transactionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_account_transactionsParametersQueryType -> [Series])
-> Maybe List_account_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_account_transactionsParametersQueryType -> Series)
-> List_account_transactionsParametersQueryType
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryType" Key -> List_account_transactionsParametersQueryType -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryType
list_account_transactionsParametersQueryType List_account_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_account_transactionsParameters where
    parseJSON :: Value -> Parser List_account_transactionsParameters
parseJSON = String
-> (Object -> Parser List_account_transactionsParameters)
-> Value
-> Parser List_account_transactionsParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"List_account_transactionsParameters" (\Object
obj -> (((((((((Text
 -> Maybe JsonDateTime
 -> Maybe JsonDateTime
 -> Maybe [Text]
 -> Maybe Int
 -> Maybe List_account_transactionsParametersQueryOrder
 -> Maybe List_account_transactionsParametersQuerySort
 -> Maybe List_account_transactionsParametersQuerySuccess
 -> Maybe List_account_transactionsParametersQueryType
 -> List_account_transactionsParameters)
-> Parser
     (Text
      -> Maybe JsonDateTime
      -> Maybe JsonDateTime
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe List_account_transactionsParametersQueryOrder
      -> Maybe List_account_transactionsParametersQuerySort
      -> Maybe List_account_transactionsParametersQuerySuccess
      -> Maybe List_account_transactionsParametersQueryType
      -> List_account_transactionsParameters)
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_transactionsParametersQueryOrder
-> Maybe List_account_transactionsParametersQuerySort
-> Maybe List_account_transactionsParametersQuerySuccess
-> Maybe List_account_transactionsParametersQueryType
-> List_account_transactionsParameters
List_account_transactionsParameters Parser
  (Text
   -> Maybe JsonDateTime
   -> Maybe JsonDateTime
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe List_account_transactionsParametersQueryOrder
   -> Maybe List_account_transactionsParametersQuerySort
   -> Maybe List_account_transactionsParametersQuerySuccess
   -> Maybe List_account_transactionsParametersQueryType
   -> List_account_transactionsParameters)
-> Parser Text
-> Parser
     (Maybe JsonDateTime
      -> Maybe JsonDateTime
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe List_account_transactionsParametersQueryOrder
      -> Maybe List_account_transactionsParametersQuerySort
      -> Maybe List_account_transactionsParametersQuerySuccess
      -> Maybe List_account_transactionsParametersQueryType
      -> List_account_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 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_transactionsParametersQueryOrder
   -> Maybe List_account_transactionsParametersQuerySort
   -> Maybe List_account_transactionsParametersQuerySuccess
   -> Maybe List_account_transactionsParametersQueryType
   -> List_account_transactionsParameters)
-> Parser (Maybe JsonDateTime)
-> Parser
     (Maybe JsonDateTime
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe List_account_transactionsParametersQueryOrder
      -> Maybe List_account_transactionsParametersQuerySort
      -> Maybe List_account_transactionsParametersQuerySuccess
      -> Maybe List_account_transactionsParametersQueryType
      -> List_account_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_account_transactionsParametersQueryOrder
   -> Maybe List_account_transactionsParametersQuerySort
   -> Maybe List_account_transactionsParametersQuerySuccess
   -> Maybe List_account_transactionsParametersQueryType
   -> List_account_transactionsParameters)
-> Parser (Maybe JsonDateTime)
-> Parser
     (Maybe [Text]
      -> Maybe Int
      -> Maybe List_account_transactionsParametersQueryOrder
      -> Maybe List_account_transactionsParametersQuerySort
      -> Maybe List_account_transactionsParametersQuerySuccess
      -> Maybe List_account_transactionsParametersQueryType
      -> List_account_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_account_transactionsParametersQueryOrder
   -> Maybe List_account_transactionsParametersQuerySort
   -> Maybe List_account_transactionsParametersQuerySuccess
   -> Maybe List_account_transactionsParametersQueryType
   -> List_account_transactionsParameters)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Int
      -> Maybe List_account_transactionsParametersQueryOrder
      -> Maybe List_account_transactionsParametersQuerySort
      -> Maybe List_account_transactionsParametersQuerySuccess
      -> Maybe List_account_transactionsParametersQueryType
      -> List_account_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_account_transactionsParametersQueryOrder
   -> Maybe List_account_transactionsParametersQuerySort
   -> Maybe List_account_transactionsParametersQuerySuccess
   -> Maybe List_account_transactionsParametersQueryType
   -> List_account_transactionsParameters)
-> Parser (Maybe Int)
-> Parser
     (Maybe List_account_transactionsParametersQueryOrder
      -> Maybe List_account_transactionsParametersQuerySort
      -> Maybe List_account_transactionsParametersQuerySuccess
      -> Maybe List_account_transactionsParametersQueryType
      -> List_account_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_account_transactionsParametersQueryOrder
   -> Maybe List_account_transactionsParametersQuerySort
   -> Maybe List_account_transactionsParametersQuerySuccess
   -> Maybe List_account_transactionsParametersQueryType
   -> List_account_transactionsParameters)
-> Parser (Maybe List_account_transactionsParametersQueryOrder)
-> Parser
     (Maybe List_account_transactionsParametersQuerySort
      -> Maybe List_account_transactionsParametersQuerySuccess
      -> Maybe List_account_transactionsParametersQueryType
      -> List_account_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_account_transactionsParametersQueryOrder)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryOrder")) Parser
  (Maybe List_account_transactionsParametersQuerySort
   -> Maybe List_account_transactionsParametersQuerySuccess
   -> Maybe List_account_transactionsParametersQueryType
   -> List_account_transactionsParameters)
-> Parser (Maybe List_account_transactionsParametersQuerySort)
-> Parser
     (Maybe List_account_transactionsParametersQuerySuccess
      -> Maybe List_account_transactionsParametersQueryType
      -> List_account_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_account_transactionsParametersQuerySort)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"querySort")) Parser
  (Maybe List_account_transactionsParametersQuerySuccess
   -> Maybe List_account_transactionsParametersQueryType
   -> List_account_transactionsParameters)
-> Parser (Maybe List_account_transactionsParametersQuerySuccess)
-> Parser
     (Maybe List_account_transactionsParametersQueryType
      -> List_account_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_account_transactionsParametersQuerySuccess)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"querySuccess")) Parser
  (Maybe List_account_transactionsParametersQueryType
   -> List_account_transactionsParameters)
-> Parser (Maybe List_account_transactionsParametersQueryType)
-> Parser List_account_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_account_transactionsParametersQueryType)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryType"))

-- | Create a new 'List_account_transactionsParameters' with all required fields.
mkList_account_transactionsParameters ::
    -- | 'list_account_transactionsParametersPathAccount_id'
    Data.Text.Internal.Text ->
    List_account_transactionsParameters
mkList_account_transactionsParameters :: Text -> List_account_transactionsParameters
mkList_account_transactionsParameters Text
list_account_transactionsParametersPathAccount_id =
    List_account_transactionsParameters
        { list_account_transactionsParametersPathAccount_id :: Text
list_account_transactionsParametersPathAccount_id = Text
list_account_transactionsParametersPathAccount_id
        , list_account_transactionsParametersQueryBegin_time :: Maybe JsonDateTime
list_account_transactionsParametersQueryBegin_time = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
        , list_account_transactionsParametersQueryEnd_time :: Maybe JsonDateTime
list_account_transactionsParametersQueryEnd_time = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
        , list_account_transactionsParametersQueryIds :: Maybe [Text]
list_account_transactionsParametersQueryIds = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing
        , list_account_transactionsParametersQueryLimit :: Maybe Int
list_account_transactionsParametersQueryLimit = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
        , list_account_transactionsParametersQueryOrder :: Maybe List_account_transactionsParametersQueryOrder
list_account_transactionsParametersQueryOrder = Maybe List_account_transactionsParametersQueryOrder
forall a. Maybe a
GHC.Maybe.Nothing
        , list_account_transactionsParametersQuerySort :: Maybe List_account_transactionsParametersQuerySort
list_account_transactionsParametersQuerySort = Maybe List_account_transactionsParametersQuerySort
forall a. Maybe a
GHC.Maybe.Nothing
        , list_account_transactionsParametersQuerySuccess :: Maybe List_account_transactionsParametersQuerySuccess
list_account_transactionsParametersQuerySuccess = Maybe List_account_transactionsParametersQuerySuccess
forall a. Maybe a
GHC.Maybe.Nothing
        , list_account_transactionsParametersQueryType :: Maybe List_account_transactionsParametersQueryType
list_account_transactionsParametersQueryType = Maybe List_account_transactionsParametersQueryType
forall a. Maybe a
GHC.Maybe.Nothing
        }

{- | Defines the enum schema located at @paths.\/accounts\/{account_id}\/transactions.GET.parameters.properties.queryOrder@ in the specification.

Represents the parameter named \'order\'

Sort order.
-}
data List_account_transactionsParametersQueryOrder
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      List_account_transactionsParametersQueryOrderOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      List_account_transactionsParametersQueryOrderTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"asc"@
      List_account_transactionsParametersQueryOrderEnumAsc
    | -- | Represents the JSON value @"desc"@
      List_account_transactionsParametersQueryOrderEnumDesc
    deriving (Int -> List_account_transactionsParametersQueryOrder -> ShowS
[List_account_transactionsParametersQueryOrder] -> ShowS
List_account_transactionsParametersQueryOrder -> String
(Int -> List_account_transactionsParametersQueryOrder -> ShowS)
-> (List_account_transactionsParametersQueryOrder -> String)
-> ([List_account_transactionsParametersQueryOrder] -> ShowS)
-> Show List_account_transactionsParametersQueryOrder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_transactionsParametersQueryOrder -> ShowS
showsPrec :: Int -> List_account_transactionsParametersQueryOrder -> ShowS
$cshow :: List_account_transactionsParametersQueryOrder -> String
show :: List_account_transactionsParametersQueryOrder -> String
$cshowList :: [List_account_transactionsParametersQueryOrder] -> ShowS
showList :: [List_account_transactionsParametersQueryOrder] -> ShowS
GHC.Show.Show, List_account_transactionsParametersQueryOrder
-> List_account_transactionsParametersQueryOrder -> Bool
(List_account_transactionsParametersQueryOrder
 -> List_account_transactionsParametersQueryOrder -> Bool)
-> (List_account_transactionsParametersQueryOrder
    -> List_account_transactionsParametersQueryOrder -> Bool)
-> Eq List_account_transactionsParametersQueryOrder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_transactionsParametersQueryOrder
-> List_account_transactionsParametersQueryOrder -> Bool
== :: List_account_transactionsParametersQueryOrder
-> List_account_transactionsParametersQueryOrder -> Bool
$c/= :: List_account_transactionsParametersQueryOrder
-> List_account_transactionsParametersQueryOrder -> Bool
/= :: List_account_transactionsParametersQueryOrder
-> List_account_transactionsParametersQueryOrder -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON List_account_transactionsParametersQueryOrder where
    toJSON :: List_account_transactionsParametersQueryOrder -> Value
toJSON (List_account_transactionsParametersQueryOrderOther Value
val) = Value
val
    toJSON (List_account_transactionsParametersQueryOrderTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (List_account_transactionsParametersQueryOrder
List_account_transactionsParametersQueryOrderEnumAsc) = Value
"asc"
    toJSON (List_account_transactionsParametersQueryOrder
List_account_transactionsParametersQueryOrderEnumDesc) = Value
"desc"
instance Data.Aeson.Types.FromJSON.FromJSON List_account_transactionsParametersQueryOrder where
    parseJSON :: Value -> Parser List_account_transactionsParametersQueryOrder
parseJSON Value
val =
        List_account_transactionsParametersQueryOrder
-> Parser List_account_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_account_transactionsParametersQueryOrder
List_account_transactionsParametersQueryOrderEnumAsc
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"desc" -> List_account_transactionsParametersQueryOrder
List_account_transactionsParametersQueryOrderEnumDesc
                | Bool
GHC.Base.otherwise -> Value -> List_account_transactionsParametersQueryOrder
List_account_transactionsParametersQueryOrderOther Value
val
            )

{- | Defines the enum schema located at @paths.\/accounts\/{account_id}\/transactions.GET.parameters.properties.querySort@ in the specification.

Represents the parameter named \'sort\'

Sort field. You *really* only want to sort by \`updated_at\` in ascending
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
-}
data List_account_transactionsParametersQuerySort
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      List_account_transactionsParametersQuerySortOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      List_account_transactionsParametersQuerySortTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"created_at"@
      List_account_transactionsParametersQuerySortEnumCreated_at
    | -- | Represents the JSON value @"updated_at"@
      List_account_transactionsParametersQuerySortEnumUpdated_at
    deriving (Int -> List_account_transactionsParametersQuerySort -> ShowS
[List_account_transactionsParametersQuerySort] -> ShowS
List_account_transactionsParametersQuerySort -> String
(Int -> List_account_transactionsParametersQuerySort -> ShowS)
-> (List_account_transactionsParametersQuerySort -> String)
-> ([List_account_transactionsParametersQuerySort] -> ShowS)
-> Show List_account_transactionsParametersQuerySort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_transactionsParametersQuerySort -> ShowS
showsPrec :: Int -> List_account_transactionsParametersQuerySort -> ShowS
$cshow :: List_account_transactionsParametersQuerySort -> String
show :: List_account_transactionsParametersQuerySort -> String
$cshowList :: [List_account_transactionsParametersQuerySort] -> ShowS
showList :: [List_account_transactionsParametersQuerySort] -> ShowS
GHC.Show.Show, List_account_transactionsParametersQuerySort
-> List_account_transactionsParametersQuerySort -> Bool
(List_account_transactionsParametersQuerySort
 -> List_account_transactionsParametersQuerySort -> Bool)
-> (List_account_transactionsParametersQuerySort
    -> List_account_transactionsParametersQuerySort -> Bool)
-> Eq List_account_transactionsParametersQuerySort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_transactionsParametersQuerySort
-> List_account_transactionsParametersQuerySort -> Bool
== :: List_account_transactionsParametersQuerySort
-> List_account_transactionsParametersQuerySort -> Bool
$c/= :: List_account_transactionsParametersQuerySort
-> List_account_transactionsParametersQuerySort -> Bool
/= :: List_account_transactionsParametersQuerySort
-> List_account_transactionsParametersQuerySort -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON List_account_transactionsParametersQuerySort where
    toJSON :: List_account_transactionsParametersQuerySort -> Value
toJSON (List_account_transactionsParametersQuerySortOther Value
val) = Value
val
    toJSON (List_account_transactionsParametersQuerySortTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (List_account_transactionsParametersQuerySort
List_account_transactionsParametersQuerySortEnumCreated_at) = Value
"created_at"
    toJSON (List_account_transactionsParametersQuerySort
List_account_transactionsParametersQuerySortEnumUpdated_at) = Value
"updated_at"
instance Data.Aeson.Types.FromJSON.FromJSON List_account_transactionsParametersQuerySort where
    parseJSON :: Value -> Parser List_account_transactionsParametersQuerySort
parseJSON Value
val =
        List_account_transactionsParametersQuerySort
-> Parser List_account_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_account_transactionsParametersQuerySort
List_account_transactionsParametersQuerySortEnumCreated_at
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"updated_at" -> List_account_transactionsParametersQuerySort
List_account_transactionsParametersQuerySortEnumUpdated_at
                | Bool
GHC.Base.otherwise -> Value -> List_account_transactionsParametersQuerySort
List_account_transactionsParametersQuerySortOther Value
val
            )

{- | Defines the enum schema located at @paths.\/accounts\/{account_id}\/transactions.GET.parameters.properties.querySuccess@ in the specification.

Represents the parameter named \'success\'

Filter by success field.
-}
data List_account_transactionsParametersQuerySuccess
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      List_account_transactionsParametersQuerySuccessOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      List_account_transactionsParametersQuerySuccessTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @true@
      List_account_transactionsParametersQuerySuccessEnumTrue
    deriving (Int -> List_account_transactionsParametersQuerySuccess -> ShowS
[List_account_transactionsParametersQuerySuccess] -> ShowS
List_account_transactionsParametersQuerySuccess -> String
(Int -> List_account_transactionsParametersQuerySuccess -> ShowS)
-> (List_account_transactionsParametersQuerySuccess -> String)
-> ([List_account_transactionsParametersQuerySuccess] -> ShowS)
-> Show List_account_transactionsParametersQuerySuccess
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_transactionsParametersQuerySuccess -> ShowS
showsPrec :: Int -> List_account_transactionsParametersQuerySuccess -> ShowS
$cshow :: List_account_transactionsParametersQuerySuccess -> String
show :: List_account_transactionsParametersQuerySuccess -> String
$cshowList :: [List_account_transactionsParametersQuerySuccess] -> ShowS
showList :: [List_account_transactionsParametersQuerySuccess] -> ShowS
GHC.Show.Show, List_account_transactionsParametersQuerySuccess
-> List_account_transactionsParametersQuerySuccess -> Bool
(List_account_transactionsParametersQuerySuccess
 -> List_account_transactionsParametersQuerySuccess -> Bool)
-> (List_account_transactionsParametersQuerySuccess
    -> List_account_transactionsParametersQuerySuccess -> Bool)
-> Eq List_account_transactionsParametersQuerySuccess
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_transactionsParametersQuerySuccess
-> List_account_transactionsParametersQuerySuccess -> Bool
== :: List_account_transactionsParametersQuerySuccess
-> List_account_transactionsParametersQuerySuccess -> Bool
$c/= :: List_account_transactionsParametersQuerySuccess
-> List_account_transactionsParametersQuerySuccess -> Bool
/= :: List_account_transactionsParametersQuerySuccess
-> List_account_transactionsParametersQuerySuccess -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON List_account_transactionsParametersQuerySuccess where
    toJSON :: List_account_transactionsParametersQuerySuccess -> Value
toJSON (List_account_transactionsParametersQuerySuccessOther Value
val) = Value
val
    toJSON (List_account_transactionsParametersQuerySuccessTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (List_account_transactionsParametersQuerySuccess
List_account_transactionsParametersQuerySuccessEnumTrue) = Bool -> Value
Data.Aeson.Types.Internal.Bool Bool
GHC.Types.True
instance Data.Aeson.Types.FromJSON.FromJSON List_account_transactionsParametersQuerySuccess where
    parseJSON :: Value -> Parser List_account_transactionsParametersQuerySuccess
parseJSON Value
val =
        List_account_transactionsParametersQuerySuccess
-> Parser List_account_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_account_transactionsParametersQuerySuccess
List_account_transactionsParametersQuerySuccessEnumTrue
                | Bool
GHC.Base.otherwise -> Value -> List_account_transactionsParametersQuerySuccess
List_account_transactionsParametersQuerySuccessOther Value
val
            )

{- | Defines the enum schema located at @paths.\/accounts\/{account_id}\/transactions.GET.parameters.properties.queryType@ in the specification.

Represents the parameter named \'type\'

Filter by type field. The value \`payment\` will return both \`purchase\` and \`capture\` transactions.
-}
data List_account_transactionsParametersQueryType
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      List_account_transactionsParametersQueryTypeOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      List_account_transactionsParametersQueryTypeTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"authorization"@
      List_account_transactionsParametersQueryTypeEnumAuthorization
    | -- | Represents the JSON value @"capture"@
      List_account_transactionsParametersQueryTypeEnumCapture
    | -- | Represents the JSON value @"payment"@
      List_account_transactionsParametersQueryTypeEnumPayment
    | -- | Represents the JSON value @"purchase"@
      List_account_transactionsParametersQueryTypeEnumPurchase
    | -- | Represents the JSON value @"refund"@
      List_account_transactionsParametersQueryTypeEnumRefund
    | -- | Represents the JSON value @"verify"@
      List_account_transactionsParametersQueryTypeEnumVerify
    deriving (Int -> List_account_transactionsParametersQueryType -> ShowS
[List_account_transactionsParametersQueryType] -> ShowS
List_account_transactionsParametersQueryType -> String
(Int -> List_account_transactionsParametersQueryType -> ShowS)
-> (List_account_transactionsParametersQueryType -> String)
-> ([List_account_transactionsParametersQueryType] -> ShowS)
-> Show List_account_transactionsParametersQueryType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_transactionsParametersQueryType -> ShowS
showsPrec :: Int -> List_account_transactionsParametersQueryType -> ShowS
$cshow :: List_account_transactionsParametersQueryType -> String
show :: List_account_transactionsParametersQueryType -> String
$cshowList :: [List_account_transactionsParametersQueryType] -> ShowS
showList :: [List_account_transactionsParametersQueryType] -> ShowS
GHC.Show.Show, List_account_transactionsParametersQueryType
-> List_account_transactionsParametersQueryType -> Bool
(List_account_transactionsParametersQueryType
 -> List_account_transactionsParametersQueryType -> Bool)
-> (List_account_transactionsParametersQueryType
    -> List_account_transactionsParametersQueryType -> Bool)
-> Eq List_account_transactionsParametersQueryType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_transactionsParametersQueryType
-> List_account_transactionsParametersQueryType -> Bool
== :: List_account_transactionsParametersQueryType
-> List_account_transactionsParametersQueryType -> Bool
$c/= :: List_account_transactionsParametersQueryType
-> List_account_transactionsParametersQueryType -> Bool
/= :: List_account_transactionsParametersQueryType
-> List_account_transactionsParametersQueryType -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON List_account_transactionsParametersQueryType where
    toJSON :: List_account_transactionsParametersQueryType -> Value
toJSON (List_account_transactionsParametersQueryTypeOther Value
val) = Value
val
    toJSON (List_account_transactionsParametersQueryTypeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumAuthorization) = Value
"authorization"
    toJSON (List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumCapture) = Value
"capture"
    toJSON (List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumPayment) = Value
"payment"
    toJSON (List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumPurchase) = Value
"purchase"
    toJSON (List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumRefund) = Value
"refund"
    toJSON (List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumVerify) = Value
"verify"
instance Data.Aeson.Types.FromJSON.FromJSON List_account_transactionsParametersQueryType where
    parseJSON :: Value -> Parser List_account_transactionsParametersQueryType
parseJSON Value
val =
        List_account_transactionsParametersQueryType
-> Parser List_account_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_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumAuthorization
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"capture" -> List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumCapture
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"payment" -> List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumPayment
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"purchase" -> List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumPurchase
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"refund" -> List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumRefund
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verify" -> List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeEnumVerify
                | Bool
GHC.Base.otherwise -> Value -> List_account_transactionsParametersQueryType
List_account_transactionsParametersQueryTypeOther Value
val
            )

{- | Represents a response of the operation 'list_account_transactions'.

The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), 'List_account_transactionsResponseError' is used.
-}
data List_account_transactionsResponse
    = -- | Means either no matching case available or a parse error
      List_account_transactionsResponseError GHC.Base.String
    | -- | A list of the account\'s transactions.
      List_account_transactionsResponse200 TransactionList
    | -- | Invalid or unpermitted parameter.
      List_account_transactionsResponse400 Error
    | -- | Incorrect site or subscription ID.
      List_account_transactionsResponse404 Error
    | -- | Unexpected error.
      List_account_transactionsResponseDefault Error
    deriving (Int -> List_account_transactionsResponse -> ShowS
[List_account_transactionsResponse] -> ShowS
List_account_transactionsResponse -> String
(Int -> List_account_transactionsResponse -> ShowS)
-> (List_account_transactionsResponse -> String)
-> ([List_account_transactionsResponse] -> ShowS)
-> Show List_account_transactionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_transactionsResponse -> ShowS
showsPrec :: Int -> List_account_transactionsResponse -> ShowS
$cshow :: List_account_transactionsResponse -> String
show :: List_account_transactionsResponse -> String
$cshowList :: [List_account_transactionsResponse] -> ShowS
showList :: [List_account_transactionsResponse] -> ShowS
GHC.Show.Show, List_account_transactionsResponse
-> List_account_transactionsResponse -> Bool
(List_account_transactionsResponse
 -> List_account_transactionsResponse -> Bool)
-> (List_account_transactionsResponse
    -> List_account_transactionsResponse -> Bool)
-> Eq List_account_transactionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_transactionsResponse
-> List_account_transactionsResponse -> Bool
== :: List_account_transactionsResponse
-> List_account_transactionsResponse -> Bool
$c/= :: List_account_transactionsResponse
-> List_account_transactionsResponse -> Bool
/= :: List_account_transactionsResponse
-> List_account_transactionsResponse -> Bool
GHC.Classes.Eq)

{- | > GET /accounts/{account_id}/transactions

The same as 'list_account_transactions' but accepts an explicit configuration.
-}
list_account_transactionsWithConfiguration ::
    forall m.
    (RecurlyClient.Common.MonadHTTP m) =>
    -- | The configuration to use in the request
    RecurlyClient.Common.Configuration ->
    -- | Contains all available parameters of this operation (query and path parameters)
    List_account_transactionsParameters ->
    -- | Monadic computation which returns the result of the operation
    m (Network.HTTP.Client.Types.Response List_account_transactionsResponse)
list_account_transactionsWithConfiguration :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_account_transactionsParameters
-> m (Response List_account_transactionsResponse)
list_account_transactionsWithConfiguration
    Configuration
config
    List_account_transactionsParameters
parameters =
        (Response ByteString -> Response List_account_transactionsResponse)
-> m (Response ByteString)
-> m (Response List_account_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_account_transactionsResponse)
-> Response ByteString
-> Response List_account_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_account_transactionsResponse)
-> (List_account_transactionsResponse
    -> List_account_transactionsResponse)
-> Either String List_account_transactionsResponse
-> List_account_transactionsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_account_transactionsResponse
List_account_transactionsResponseError List_account_transactionsResponse
-> List_account_transactionsResponse
forall a. a -> a
GHC.Base.id
                        (Either String List_account_transactionsResponse
 -> List_account_transactionsResponse)
-> (ByteString -> Either String List_account_transactionsResponse)
-> ByteString
-> List_account_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_account_transactionsResponse
List_account_transactionsResponse200
                                                    (TransactionList -> List_account_transactionsResponse)
-> Either String TransactionList
-> Either String List_account_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_account_transactionsResponse
List_account_transactionsResponse400
                                                    (Error -> List_account_transactionsResponse)
-> Either String Error
-> Either String List_account_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_account_transactionsResponse
List_account_transactionsResponse404
                                                    (Error -> List_account_transactionsResponse)
-> Either String Error
-> Either String List_account_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_account_transactionsResponse
List_account_transactionsResponseDefault
                                                    (Error -> List_account_transactionsResponse)
-> Either String Error
-> Either String List_account_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_account_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
"/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_transactionsParameters -> Text
list_account_transactionsParametersPathAccount_id List_account_transactionsParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> 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_account_transactionsParameters -> Maybe [Text]
list_account_transactionsParametersQueryIds List_account_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_account_transactionsParameters -> Maybe Int
list_account_transactionsParametersQueryLimit List_account_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_account_transactionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQueryOrder -> Value)
-> Maybe List_account_transactionsParametersQueryOrder
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryOrder
list_account_transactionsParametersQueryOrder List_account_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_account_transactionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQuerySort -> Value)
-> Maybe List_account_transactionsParametersQuerySort
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySort
list_account_transactionsParametersQuerySort List_account_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_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryBegin_time List_account_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_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryEnd_time List_account_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_account_transactionsParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQueryType -> Value)
-> Maybe List_account_transactionsParametersQueryType
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryType
list_account_transactionsParametersQueryType List_account_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_account_transactionsParametersQuerySuccess -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQuerySuccess -> Value)
-> Maybe List_account_transactionsParametersQuerySuccess
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySuccess
list_account_transactionsParametersQuerySuccess List_account_transactionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
                ]
            )

{- | > GET /accounts/{account_id}/transactions

The same as 'list_account_transactions' but returns the raw 'Data.ByteString.ByteString'.
-}
list_account_transactionsRaw ::
    forall m.
    (RecurlyClient.Common.MonadHTTP m) =>
    -- | Contains all available parameters of this operation (query and path parameters)
    List_account_transactionsParameters ->
    -- | Monadic computation which returns the result of the operation
    RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_account_transactionsRaw :: forall (m :: * -> *).
MonadHTTP m =>
List_account_transactionsParameters
-> ClientT m (Response ByteString)
list_account_transactionsRaw List_account_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
"/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_transactionsParameters -> Text
list_account_transactionsParametersPathAccount_id List_account_transactionsParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> 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_account_transactionsParameters -> Maybe [Text]
list_account_transactionsParametersQueryIds List_account_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_account_transactionsParameters -> Maybe Int
list_account_transactionsParametersQueryLimit List_account_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_account_transactionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQueryOrder -> Value)
-> Maybe List_account_transactionsParametersQueryOrder
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryOrder
list_account_transactionsParametersQueryOrder List_account_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_account_transactionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQuerySort -> Value)
-> Maybe List_account_transactionsParametersQuerySort
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySort
list_account_transactionsParametersQuerySort List_account_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_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryBegin_time List_account_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_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryEnd_time List_account_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_account_transactionsParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQueryType -> Value)
-> Maybe List_account_transactionsParametersQueryType
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryType
list_account_transactionsParametersQueryType List_account_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_account_transactionsParametersQuerySuccess -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQuerySuccess -> Value)
-> Maybe List_account_transactionsParametersQuerySuccess
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySuccess
list_account_transactionsParametersQuerySuccess List_account_transactionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
            ]
        )

{- | > GET /accounts/{account_id}/transactions

The same as 'list_account_transactions' but accepts an explicit configuration and returns the raw 'Data.ByteString.ByteString'.
-}
list_account_transactionsWithConfigurationRaw ::
    forall m.
    (RecurlyClient.Common.MonadHTTP m) =>
    -- | The configuration to use in the request
    RecurlyClient.Common.Configuration ->
    -- | Contains all available parameters of this operation (query and path parameters)
    List_account_transactionsParameters ->
    -- | Monadic computation which returns the result of the operation
    m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_account_transactionsWithConfigurationRaw :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_account_transactionsParameters -> m (Response ByteString)
list_account_transactionsWithConfigurationRaw
    Configuration
config
    List_account_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
"/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_transactionsParameters -> Text
list_account_transactionsParametersPathAccount_id List_account_transactionsParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> 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_account_transactionsParameters -> Maybe [Text]
list_account_transactionsParametersQueryIds List_account_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_account_transactionsParameters -> Maybe Int
list_account_transactionsParametersQueryLimit List_account_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_account_transactionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQueryOrder -> Value)
-> Maybe List_account_transactionsParametersQueryOrder
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryOrder
list_account_transactionsParametersQueryOrder List_account_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_account_transactionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQuerySort -> Value)
-> Maybe List_account_transactionsParametersQuerySort
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySort
list_account_transactionsParametersQuerySort List_account_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_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryBegin_time List_account_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_account_transactionsParameters -> Maybe JsonDateTime
list_account_transactionsParametersQueryEnd_time List_account_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_account_transactionsParametersQueryType -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQueryType -> Value)
-> Maybe List_account_transactionsParametersQueryType
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQueryType
list_account_transactionsParametersQueryType List_account_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_account_transactionsParametersQuerySuccess -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_account_transactionsParametersQuerySuccess -> Value)
-> Maybe List_account_transactionsParametersQuerySuccess
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_account_transactionsParameters
-> Maybe List_account_transactionsParametersQuerySuccess
list_account_transactionsParametersQuerySuccess List_account_transactionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
                ]
            )