{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module RecurlyClient.Operations.List_subscriptions where
import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString
import qualified Data.ByteString as Data.ByteString.Internal
import qualified Data.ByteString as Data.ByteString.Internal.Type
import qualified Data.Either
import qualified Data.Foldable
import qualified Data.Functor
import qualified Data.Maybe
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text as Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified Data.Vector
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified Network.HTTP.Client
import qualified Network.HTTP.Client as Network.HTTP.Client.Request
import qualified Network.HTTP.Client as Network.HTTP.Client.Types
import qualified Network.HTTP.Simple
import qualified Network.HTTP.Types
import qualified Network.HTTP.Types as Network.HTTP.Types.Status
import qualified Network.HTTP.Types as Network.HTTP.Types.URI
import qualified RecurlyClient.Common
import RecurlyClient.Types
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
list_subscriptions ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
List_subscriptionsParameters ->
RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response List_subscriptionsResponse)
list_subscriptions :: forall (m :: * -> *).
MonadHTTP m =>
List_subscriptionsParameters
-> ClientT m (Response List_subscriptionsResponse)
list_subscriptions List_subscriptionsParameters
parameters =
(Response ByteString -> Response List_subscriptionsResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response List_subscriptionsResponse)
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_subscriptionsResponse)
-> Response ByteString -> Response List_subscriptionsResponse
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_subscriptionsResponse)
-> (List_subscriptionsResponse -> List_subscriptionsResponse)
-> Either String List_subscriptionsResponse
-> List_subscriptionsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_subscriptionsResponse
List_subscriptionsResponseError List_subscriptionsResponse -> List_subscriptionsResponse
forall a. a -> a
GHC.Base.id
(Either String List_subscriptionsResponse
-> List_subscriptionsResponse)
-> (ByteString -> Either String List_subscriptionsResponse)
-> ByteString
-> List_subscriptionsResponse
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) ->
SubscriptionList -> List_subscriptionsResponse
List_subscriptionsResponse200
(SubscriptionList -> List_subscriptionsResponse)
-> Either String SubscriptionList
-> Either String List_subscriptionsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String SubscriptionList
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
SubscriptionList
)
| (\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_subscriptionsResponse
List_subscriptionsResponse400
(Error -> List_subscriptionsResponse)
-> Either String Error -> Either String List_subscriptionsResponse
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_subscriptionsResponse
List_subscriptionsResponse404
(Error -> List_subscriptionsResponse)
-> Either String Error -> Either String List_subscriptionsResponse
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_subscriptionsResponse
List_subscriptionsResponseDefault
(Error -> List_subscriptionsResponse)
-> Either String Error -> Either String List_subscriptionsResponse
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_subscriptionsResponse
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
"/subscriptions"
[ 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_subscriptionsParameters -> Maybe [Text]
list_subscriptionsParametersQueryIds List_subscriptionsParameters
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_subscriptionsParameters -> Maybe Int
list_subscriptionsParametersQueryLimit List_subscriptionsParameters
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_subscriptionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQueryOrder -> Value)
-> Maybe List_subscriptionsParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryOrder
list_subscriptionsParametersQueryOrder List_subscriptionsParameters
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_subscriptionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQuerySort -> Value)
-> Maybe List_subscriptionsParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQuerySort
list_subscriptionsParametersQuerySort List_subscriptionsParameters
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_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryBegin_time List_subscriptionsParameters
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_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryEnd_time List_subscriptionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"state") (List_subscriptionsParametersQueryState -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQueryState -> Value)
-> Maybe List_subscriptionsParametersQueryState -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryState
list_subscriptionsParametersQueryState List_subscriptionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
data List_subscriptionsParameters = List_subscriptionsParameters
{ List_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryBegin_time :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, List_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryEnd_time :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, List_subscriptionsParameters -> Maybe [Text]
list_subscriptionsParametersQueryIds :: (GHC.Maybe.Maybe [Data.Text.Internal.Text])
, List_subscriptionsParameters -> Maybe Int
list_subscriptionsParametersQueryLimit :: (GHC.Maybe.Maybe GHC.Types.Int)
, List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryOrder
list_subscriptionsParametersQueryOrder :: (GHC.Maybe.Maybe List_subscriptionsParametersQueryOrder)
, List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQuerySort
list_subscriptionsParametersQuerySort :: (GHC.Maybe.Maybe List_subscriptionsParametersQuerySort)
, List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryState
list_subscriptionsParametersQueryState :: (GHC.Maybe.Maybe List_subscriptionsParametersQueryState)
}
deriving
( Int -> List_subscriptionsParameters -> ShowS
[List_subscriptionsParameters] -> ShowS
List_subscriptionsParameters -> String
(Int -> List_subscriptionsParameters -> ShowS)
-> (List_subscriptionsParameters -> String)
-> ([List_subscriptionsParameters] -> ShowS)
-> Show List_subscriptionsParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_subscriptionsParameters -> ShowS
showsPrec :: Int -> List_subscriptionsParameters -> ShowS
$cshow :: List_subscriptionsParameters -> String
show :: List_subscriptionsParameters -> String
$cshowList :: [List_subscriptionsParameters] -> ShowS
showList :: [List_subscriptionsParameters] -> ShowS
GHC.Show.Show
, List_subscriptionsParameters
-> List_subscriptionsParameters -> Bool
(List_subscriptionsParameters
-> List_subscriptionsParameters -> Bool)
-> (List_subscriptionsParameters
-> List_subscriptionsParameters -> Bool)
-> Eq List_subscriptionsParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_subscriptionsParameters
-> List_subscriptionsParameters -> Bool
== :: List_subscriptionsParameters
-> List_subscriptionsParameters -> Bool
$c/= :: List_subscriptionsParameters
-> List_subscriptionsParameters -> Bool
/= :: List_subscriptionsParameters
-> List_subscriptionsParameters -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON List_subscriptionsParameters where
toJSON :: List_subscriptionsParameters -> Value
toJSON List_subscriptionsParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryBegin_time" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryBegin_time List_subscriptionsParameters
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_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryEnd_time List_subscriptionsParameters
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_subscriptionsParameters -> Maybe [Text]
list_subscriptionsParametersQueryIds List_subscriptionsParameters
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_subscriptionsParameters -> Maybe Int
list_subscriptionsParametersQueryLimit List_subscriptionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_subscriptionsParametersQueryOrder -> [Pair])
-> Maybe List_subscriptionsParametersQueryOrder
-> [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_subscriptionsParametersQueryOrder -> Pair)
-> List_subscriptionsParametersQueryOrder
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryOrder" Key -> List_subscriptionsParametersQueryOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryOrder
list_subscriptionsParametersQueryOrder List_subscriptionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_subscriptionsParametersQuerySort -> [Pair])
-> Maybe List_subscriptionsParametersQuerySort
-> [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_subscriptionsParametersQuerySort -> Pair)
-> List_subscriptionsParametersQuerySort
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySort" Key -> List_subscriptionsParametersQuerySort -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQuerySort
list_subscriptionsParametersQuerySort List_subscriptionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_subscriptionsParametersQueryState -> [Pair])
-> Maybe List_subscriptionsParametersQueryState
-> [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_subscriptionsParametersQueryState -> Pair)
-> List_subscriptionsParametersQueryState
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryState" Key -> List_subscriptionsParametersQueryState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryState
list_subscriptionsParametersQueryState List_subscriptionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
toEncoding :: List_subscriptionsParameters -> Encoding
toEncoding List_subscriptionsParameters
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ([Series] -> Series
forall a. Monoid a => [a] -> a
GHC.Base.mconcat ([[Series]] -> [Series]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryBegin_time" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryBegin_time List_subscriptionsParameters
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_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryEnd_time List_subscriptionsParameters
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_subscriptionsParameters -> Maybe [Text]
list_subscriptionsParametersQueryIds List_subscriptionsParameters
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_subscriptionsParameters -> Maybe Int
list_subscriptionsParametersQueryLimit List_subscriptionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_subscriptionsParametersQueryOrder -> [Series])
-> Maybe List_subscriptionsParametersQueryOrder
-> [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_subscriptionsParametersQueryOrder -> Series)
-> List_subscriptionsParametersQueryOrder
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryOrder" Key -> List_subscriptionsParametersQueryOrder -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryOrder
list_subscriptionsParametersQueryOrder List_subscriptionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_subscriptionsParametersQuerySort -> [Series])
-> Maybe List_subscriptionsParametersQuerySort
-> [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_subscriptionsParametersQuerySort -> Series)
-> List_subscriptionsParametersQuerySort
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySort" Key -> List_subscriptionsParametersQuerySort -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQuerySort
list_subscriptionsParametersQuerySort List_subscriptionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_subscriptionsParametersQueryState -> [Series])
-> Maybe List_subscriptionsParametersQueryState
-> [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_subscriptionsParametersQueryState -> Series)
-> List_subscriptionsParametersQueryState
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryState" Key -> List_subscriptionsParametersQueryState -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryState
list_subscriptionsParametersQueryState List_subscriptionsParameters
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_subscriptionsParameters where
parseJSON :: Value -> Parser List_subscriptionsParameters
parseJSON = String
-> (Object -> Parser List_subscriptionsParameters)
-> Value
-> Parser List_subscriptionsParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"List_subscriptionsParameters" (\Object
obj -> (((((((Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
-> Parser
(Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters
List_subscriptionsParameters Parser
(Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
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_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe [Text]
-> Maybe Int
-> Maybe List_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
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_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
-> Parser (Maybe [Text])
-> Parser
(Maybe Int
-> Maybe List_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
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_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
-> Parser (Maybe Int)
-> Parser
(Maybe List_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
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_subscriptionsParametersQueryOrder
-> Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
-> Parser (Maybe List_subscriptionsParametersQueryOrder)
-> Parser
(Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
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_subscriptionsParametersQueryOrder)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryOrder")) Parser
(Maybe List_subscriptionsParametersQuerySort
-> Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
-> Parser (Maybe List_subscriptionsParametersQuerySort)
-> Parser
(Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
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_subscriptionsParametersQuerySort)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"querySort")) Parser
(Maybe List_subscriptionsParametersQueryState
-> List_subscriptionsParameters)
-> Parser (Maybe List_subscriptionsParametersQueryState)
-> Parser List_subscriptionsParameters
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_subscriptionsParametersQueryState)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryState"))
mkList_subscriptionsParameters :: List_subscriptionsParameters
mkList_subscriptionsParameters :: List_subscriptionsParameters
mkList_subscriptionsParameters =
List_subscriptionsParameters
{ list_subscriptionsParametersQueryBegin_time :: Maybe JsonDateTime
list_subscriptionsParametersQueryBegin_time = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, list_subscriptionsParametersQueryEnd_time :: Maybe JsonDateTime
list_subscriptionsParametersQueryEnd_time = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, list_subscriptionsParametersQueryIds :: Maybe [Text]
list_subscriptionsParametersQueryIds = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing
, list_subscriptionsParametersQueryLimit :: Maybe Int
list_subscriptionsParametersQueryLimit = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
, list_subscriptionsParametersQueryOrder :: Maybe List_subscriptionsParametersQueryOrder
list_subscriptionsParametersQueryOrder = Maybe List_subscriptionsParametersQueryOrder
forall a. Maybe a
GHC.Maybe.Nothing
, list_subscriptionsParametersQuerySort :: Maybe List_subscriptionsParametersQuerySort
list_subscriptionsParametersQuerySort = Maybe List_subscriptionsParametersQuerySort
forall a. Maybe a
GHC.Maybe.Nothing
, list_subscriptionsParametersQueryState :: Maybe List_subscriptionsParametersQueryState
list_subscriptionsParametersQueryState = Maybe List_subscriptionsParametersQueryState
forall a. Maybe a
GHC.Maybe.Nothing
}
data List_subscriptionsParametersQueryOrder
=
List_subscriptionsParametersQueryOrderOther Data.Aeson.Types.Internal.Value
|
List_subscriptionsParametersQueryOrderTyped Data.Text.Internal.Text
|
List_subscriptionsParametersQueryOrderEnumAsc
|
List_subscriptionsParametersQueryOrderEnumDesc
deriving (Int -> List_subscriptionsParametersQueryOrder -> ShowS
[List_subscriptionsParametersQueryOrder] -> ShowS
List_subscriptionsParametersQueryOrder -> String
(Int -> List_subscriptionsParametersQueryOrder -> ShowS)
-> (List_subscriptionsParametersQueryOrder -> String)
-> ([List_subscriptionsParametersQueryOrder] -> ShowS)
-> Show List_subscriptionsParametersQueryOrder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_subscriptionsParametersQueryOrder -> ShowS
showsPrec :: Int -> List_subscriptionsParametersQueryOrder -> ShowS
$cshow :: List_subscriptionsParametersQueryOrder -> String
show :: List_subscriptionsParametersQueryOrder -> String
$cshowList :: [List_subscriptionsParametersQueryOrder] -> ShowS
showList :: [List_subscriptionsParametersQueryOrder] -> ShowS
GHC.Show.Show, List_subscriptionsParametersQueryOrder
-> List_subscriptionsParametersQueryOrder -> Bool
(List_subscriptionsParametersQueryOrder
-> List_subscriptionsParametersQueryOrder -> Bool)
-> (List_subscriptionsParametersQueryOrder
-> List_subscriptionsParametersQueryOrder -> Bool)
-> Eq List_subscriptionsParametersQueryOrder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_subscriptionsParametersQueryOrder
-> List_subscriptionsParametersQueryOrder -> Bool
== :: List_subscriptionsParametersQueryOrder
-> List_subscriptionsParametersQueryOrder -> Bool
$c/= :: List_subscriptionsParametersQueryOrder
-> List_subscriptionsParametersQueryOrder -> Bool
/= :: List_subscriptionsParametersQueryOrder
-> List_subscriptionsParametersQueryOrder -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_subscriptionsParametersQueryOrder where
toJSON :: List_subscriptionsParametersQueryOrder -> Value
toJSON (List_subscriptionsParametersQueryOrderOther Value
val) = Value
val
toJSON (List_subscriptionsParametersQueryOrderTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_subscriptionsParametersQueryOrder
List_subscriptionsParametersQueryOrderEnumAsc) = Value
"asc"
toJSON (List_subscriptionsParametersQueryOrder
List_subscriptionsParametersQueryOrderEnumDesc) = Value
"desc"
instance Data.Aeson.Types.FromJSON.FromJSON List_subscriptionsParametersQueryOrder where
parseJSON :: Value -> Parser List_subscriptionsParametersQueryOrder
parseJSON Value
val =
List_subscriptionsParametersQueryOrder
-> Parser List_subscriptionsParametersQueryOrder
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_subscriptionsParametersQueryOrder
List_subscriptionsParametersQueryOrderEnumAsc
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"desc" -> List_subscriptionsParametersQueryOrder
List_subscriptionsParametersQueryOrderEnumDesc
| Bool
GHC.Base.otherwise -> Value -> List_subscriptionsParametersQueryOrder
List_subscriptionsParametersQueryOrderOther Value
val
)
data List_subscriptionsParametersQuerySort
=
List_subscriptionsParametersQuerySortOther Data.Aeson.Types.Internal.Value
|
List_subscriptionsParametersQuerySortTyped Data.Text.Internal.Text
|
List_subscriptionsParametersQuerySortEnumCreated_at
|
List_subscriptionsParametersQuerySortEnumUpdated_at
deriving (Int -> List_subscriptionsParametersQuerySort -> ShowS
[List_subscriptionsParametersQuerySort] -> ShowS
List_subscriptionsParametersQuerySort -> String
(Int -> List_subscriptionsParametersQuerySort -> ShowS)
-> (List_subscriptionsParametersQuerySort -> String)
-> ([List_subscriptionsParametersQuerySort] -> ShowS)
-> Show List_subscriptionsParametersQuerySort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_subscriptionsParametersQuerySort -> ShowS
showsPrec :: Int -> List_subscriptionsParametersQuerySort -> ShowS
$cshow :: List_subscriptionsParametersQuerySort -> String
show :: List_subscriptionsParametersQuerySort -> String
$cshowList :: [List_subscriptionsParametersQuerySort] -> ShowS
showList :: [List_subscriptionsParametersQuerySort] -> ShowS
GHC.Show.Show, List_subscriptionsParametersQuerySort
-> List_subscriptionsParametersQuerySort -> Bool
(List_subscriptionsParametersQuerySort
-> List_subscriptionsParametersQuerySort -> Bool)
-> (List_subscriptionsParametersQuerySort
-> List_subscriptionsParametersQuerySort -> Bool)
-> Eq List_subscriptionsParametersQuerySort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_subscriptionsParametersQuerySort
-> List_subscriptionsParametersQuerySort -> Bool
== :: List_subscriptionsParametersQuerySort
-> List_subscriptionsParametersQuerySort -> Bool
$c/= :: List_subscriptionsParametersQuerySort
-> List_subscriptionsParametersQuerySort -> Bool
/= :: List_subscriptionsParametersQuerySort
-> List_subscriptionsParametersQuerySort -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_subscriptionsParametersQuerySort where
toJSON :: List_subscriptionsParametersQuerySort -> Value
toJSON (List_subscriptionsParametersQuerySortOther Value
val) = Value
val
toJSON (List_subscriptionsParametersQuerySortTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_subscriptionsParametersQuerySort
List_subscriptionsParametersQuerySortEnumCreated_at) = Value
"created_at"
toJSON (List_subscriptionsParametersQuerySort
List_subscriptionsParametersQuerySortEnumUpdated_at) = Value
"updated_at"
instance Data.Aeson.Types.FromJSON.FromJSON List_subscriptionsParametersQuerySort where
parseJSON :: Value -> Parser List_subscriptionsParametersQuerySort
parseJSON Value
val =
List_subscriptionsParametersQuerySort
-> Parser List_subscriptionsParametersQuerySort
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_subscriptionsParametersQuerySort
List_subscriptionsParametersQuerySortEnumCreated_at
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"updated_at" -> List_subscriptionsParametersQuerySort
List_subscriptionsParametersQuerySortEnumUpdated_at
| Bool
GHC.Base.otherwise -> Value -> List_subscriptionsParametersQuerySort
List_subscriptionsParametersQuerySortOther Value
val
)
data List_subscriptionsParametersQueryState
=
List_subscriptionsParametersQueryStateOther Data.Aeson.Types.Internal.Value
|
List_subscriptionsParametersQueryStateTyped Data.Text.Internal.Text
|
List_subscriptionsParametersQueryStateEnumActive
|
List_subscriptionsParametersQueryStateEnumCanceled
|
List_subscriptionsParametersQueryStateEnumExpired
|
List_subscriptionsParametersQueryStateEnumFuture
|
List_subscriptionsParametersQueryStateEnumIn_trial
|
List_subscriptionsParametersQueryStateEnumLive
deriving (Int -> List_subscriptionsParametersQueryState -> ShowS
[List_subscriptionsParametersQueryState] -> ShowS
List_subscriptionsParametersQueryState -> String
(Int -> List_subscriptionsParametersQueryState -> ShowS)
-> (List_subscriptionsParametersQueryState -> String)
-> ([List_subscriptionsParametersQueryState] -> ShowS)
-> Show List_subscriptionsParametersQueryState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_subscriptionsParametersQueryState -> ShowS
showsPrec :: Int -> List_subscriptionsParametersQueryState -> ShowS
$cshow :: List_subscriptionsParametersQueryState -> String
show :: List_subscriptionsParametersQueryState -> String
$cshowList :: [List_subscriptionsParametersQueryState] -> ShowS
showList :: [List_subscriptionsParametersQueryState] -> ShowS
GHC.Show.Show, List_subscriptionsParametersQueryState
-> List_subscriptionsParametersQueryState -> Bool
(List_subscriptionsParametersQueryState
-> List_subscriptionsParametersQueryState -> Bool)
-> (List_subscriptionsParametersQueryState
-> List_subscriptionsParametersQueryState -> Bool)
-> Eq List_subscriptionsParametersQueryState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_subscriptionsParametersQueryState
-> List_subscriptionsParametersQueryState -> Bool
== :: List_subscriptionsParametersQueryState
-> List_subscriptionsParametersQueryState -> Bool
$c/= :: List_subscriptionsParametersQueryState
-> List_subscriptionsParametersQueryState -> Bool
/= :: List_subscriptionsParametersQueryState
-> List_subscriptionsParametersQueryState -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_subscriptionsParametersQueryState where
toJSON :: List_subscriptionsParametersQueryState -> Value
toJSON (List_subscriptionsParametersQueryStateOther Value
val) = Value
val
toJSON (List_subscriptionsParametersQueryStateTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumActive) = Value
"active"
toJSON (List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumCanceled) = Value
"canceled"
toJSON (List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumExpired) = Value
"expired"
toJSON (List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumFuture) = Value
"future"
toJSON (List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumIn_trial) = Value
"in_trial"
toJSON (List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumLive) = Value
"live"
instance Data.Aeson.Types.FromJSON.FromJSON List_subscriptionsParametersQueryState where
parseJSON :: Value -> Parser List_subscriptionsParametersQueryState
parseJSON Value
val =
List_subscriptionsParametersQueryState
-> Parser List_subscriptionsParametersQueryState
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
"active" -> List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumActive
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"canceled" -> List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumCanceled
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"expired" -> List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumExpired
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"future" -> List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumFuture
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"in_trial" -> List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumIn_trial
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"live" -> List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateEnumLive
| Bool
GHC.Base.otherwise -> Value -> List_subscriptionsParametersQueryState
List_subscriptionsParametersQueryStateOther Value
val
)
data List_subscriptionsResponse
=
List_subscriptionsResponseError GHC.Base.String
|
List_subscriptionsResponse200 SubscriptionList
|
List_subscriptionsResponse400 Error
|
List_subscriptionsResponse404 Error
|
List_subscriptionsResponseDefault Error
deriving (Int -> List_subscriptionsResponse -> ShowS
[List_subscriptionsResponse] -> ShowS
List_subscriptionsResponse -> String
(Int -> List_subscriptionsResponse -> ShowS)
-> (List_subscriptionsResponse -> String)
-> ([List_subscriptionsResponse] -> ShowS)
-> Show List_subscriptionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_subscriptionsResponse -> ShowS
showsPrec :: Int -> List_subscriptionsResponse -> ShowS
$cshow :: List_subscriptionsResponse -> String
show :: List_subscriptionsResponse -> String
$cshowList :: [List_subscriptionsResponse] -> ShowS
showList :: [List_subscriptionsResponse] -> ShowS
GHC.Show.Show, List_subscriptionsResponse -> List_subscriptionsResponse -> Bool
(List_subscriptionsResponse -> List_subscriptionsResponse -> Bool)
-> (List_subscriptionsResponse
-> List_subscriptionsResponse -> Bool)
-> Eq List_subscriptionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_subscriptionsResponse -> List_subscriptionsResponse -> Bool
== :: List_subscriptionsResponse -> List_subscriptionsResponse -> Bool
$c/= :: List_subscriptionsResponse -> List_subscriptionsResponse -> Bool
/= :: List_subscriptionsResponse -> List_subscriptionsResponse -> Bool
GHC.Classes.Eq)
list_subscriptionsWithConfiguration ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
RecurlyClient.Common.Configuration ->
List_subscriptionsParameters ->
m (Network.HTTP.Client.Types.Response List_subscriptionsResponse)
list_subscriptionsWithConfiguration :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_subscriptionsParameters
-> m (Response List_subscriptionsResponse)
list_subscriptionsWithConfiguration
Configuration
config
List_subscriptionsParameters
parameters =
(Response ByteString -> Response List_subscriptionsResponse)
-> m (Response ByteString)
-> m (Response List_subscriptionsResponse)
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_subscriptionsResponse)
-> Response ByteString -> Response List_subscriptionsResponse
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_subscriptionsResponse)
-> (List_subscriptionsResponse -> List_subscriptionsResponse)
-> Either String List_subscriptionsResponse
-> List_subscriptionsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_subscriptionsResponse
List_subscriptionsResponseError List_subscriptionsResponse -> List_subscriptionsResponse
forall a. a -> a
GHC.Base.id
(Either String List_subscriptionsResponse
-> List_subscriptionsResponse)
-> (ByteString -> Either String List_subscriptionsResponse)
-> ByteString
-> List_subscriptionsResponse
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) ->
SubscriptionList -> List_subscriptionsResponse
List_subscriptionsResponse200
(SubscriptionList -> List_subscriptionsResponse)
-> Either String SubscriptionList
-> Either String List_subscriptionsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String SubscriptionList
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
SubscriptionList
)
| (\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_subscriptionsResponse
List_subscriptionsResponse400
(Error -> List_subscriptionsResponse)
-> Either String Error -> Either String List_subscriptionsResponse
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_subscriptionsResponse
List_subscriptionsResponse404
(Error -> List_subscriptionsResponse)
-> Either String Error -> Either String List_subscriptionsResponse
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_subscriptionsResponse
List_subscriptionsResponseDefault
(Error -> List_subscriptionsResponse)
-> Either String Error -> Either String List_subscriptionsResponse
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_subscriptionsResponse
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
"/subscriptions"
[ 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_subscriptionsParameters -> Maybe [Text]
list_subscriptionsParametersQueryIds List_subscriptionsParameters
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_subscriptionsParameters -> Maybe Int
list_subscriptionsParametersQueryLimit List_subscriptionsParameters
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_subscriptionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQueryOrder -> Value)
-> Maybe List_subscriptionsParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryOrder
list_subscriptionsParametersQueryOrder List_subscriptionsParameters
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_subscriptionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQuerySort -> Value)
-> Maybe List_subscriptionsParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQuerySort
list_subscriptionsParametersQuerySort List_subscriptionsParameters
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_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryBegin_time List_subscriptionsParameters
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_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryEnd_time List_subscriptionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"state") (List_subscriptionsParametersQueryState -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQueryState -> Value)
-> Maybe List_subscriptionsParametersQueryState -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryState
list_subscriptionsParametersQueryState List_subscriptionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
list_subscriptionsRaw ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
List_subscriptionsParameters ->
RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_subscriptionsRaw :: forall (m :: * -> *).
MonadHTTP m =>
List_subscriptionsParameters -> ClientT m (Response ByteString)
list_subscriptionsRaw List_subscriptionsParameters
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
"/subscriptions"
[ 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_subscriptionsParameters -> Maybe [Text]
list_subscriptionsParametersQueryIds List_subscriptionsParameters
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_subscriptionsParameters -> Maybe Int
list_subscriptionsParametersQueryLimit List_subscriptionsParameters
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_subscriptionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQueryOrder -> Value)
-> Maybe List_subscriptionsParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryOrder
list_subscriptionsParametersQueryOrder List_subscriptionsParameters
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_subscriptionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQuerySort -> Value)
-> Maybe List_subscriptionsParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQuerySort
list_subscriptionsParametersQuerySort List_subscriptionsParameters
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_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryBegin_time List_subscriptionsParameters
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_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryEnd_time List_subscriptionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"state") (List_subscriptionsParametersQueryState -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQueryState -> Value)
-> Maybe List_subscriptionsParametersQueryState -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryState
list_subscriptionsParametersQueryState List_subscriptionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
list_subscriptionsWithConfigurationRaw ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
RecurlyClient.Common.Configuration ->
List_subscriptionsParameters ->
m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_subscriptionsWithConfigurationRaw :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_subscriptionsParameters -> m (Response ByteString)
list_subscriptionsWithConfigurationRaw
Configuration
config
List_subscriptionsParameters
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
"/subscriptions"
[ 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_subscriptionsParameters -> Maybe [Text]
list_subscriptionsParametersQueryIds List_subscriptionsParameters
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_subscriptionsParameters -> Maybe Int
list_subscriptionsParametersQueryLimit List_subscriptionsParameters
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_subscriptionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQueryOrder -> Value)
-> Maybe List_subscriptionsParametersQueryOrder -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryOrder
list_subscriptionsParametersQueryOrder List_subscriptionsParameters
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_subscriptionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQuerySort -> Value)
-> Maybe List_subscriptionsParametersQuerySort -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQuerySort
list_subscriptionsParametersQuerySort List_subscriptionsParameters
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_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryBegin_time List_subscriptionsParameters
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_subscriptionsParameters -> Maybe JsonDateTime
list_subscriptionsParametersQueryEnd_time List_subscriptionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
, Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"state") (List_subscriptionsParametersQueryState -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_subscriptionsParametersQueryState -> Value)
-> Maybe List_subscriptionsParametersQueryState -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_subscriptionsParameters
-> Maybe List_subscriptionsParametersQueryState
list_subscriptionsParametersQueryState List_subscriptionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)