{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module RecurlyClient.Operations.List_custom_field_definitions 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_custom_field_definitions ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
List_custom_field_definitionsParameters ->
RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response List_custom_field_definitionsResponse)
list_custom_field_definitions :: forall (m :: * -> *).
MonadHTTP m =>
List_custom_field_definitionsParameters
-> ClientT m (Response List_custom_field_definitionsResponse)
list_custom_field_definitions List_custom_field_definitionsParameters
parameters =
(Response ByteString
-> Response List_custom_field_definitionsResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response List_custom_field_definitionsResponse)
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_custom_field_definitionsResponse)
-> Response ByteString
-> Response List_custom_field_definitionsResponse
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_custom_field_definitionsResponse)
-> (List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse)
-> Either String List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_custom_field_definitionsResponse
List_custom_field_definitionsResponseError List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse
forall a. a -> a
GHC.Base.id
(Either String List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse)
-> (ByteString
-> Either String List_custom_field_definitionsResponse)
-> ByteString
-> List_custom_field_definitionsResponse
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) ->
CustomFieldDefinitionList -> List_custom_field_definitionsResponse
List_custom_field_definitionsResponse200
(CustomFieldDefinitionList
-> List_custom_field_definitionsResponse)
-> Either String CustomFieldDefinitionList
-> Either String List_custom_field_definitionsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String CustomFieldDefinitionList
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
CustomFieldDefinitionList
)
| (\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_custom_field_definitionsResponse
List_custom_field_definitionsResponse400
(Error -> List_custom_field_definitionsResponse)
-> Either String Error
-> Either String List_custom_field_definitionsResponse
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_custom_field_definitionsResponse
List_custom_field_definitionsResponse404
(Error -> List_custom_field_definitionsResponse)
-> Either String Error
-> Either String List_custom_field_definitionsResponse
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_custom_field_definitionsResponse
List_custom_field_definitionsResponseDefault
(Error -> List_custom_field_definitionsResponse)
-> Either String Error
-> Either String List_custom_field_definitionsResponse
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_custom_field_definitionsResponse
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
"/custom_field_definitions"
[ 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_custom_field_definitionsParameters -> Maybe [Text]
list_custom_field_definitionsParametersQueryIds List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe Int
list_custom_field_definitionsParametersQueryLimit List_custom_field_definitionsParameters
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_custom_field_definitionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQueryOrder -> Value)
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryOrder
list_custom_field_definitionsParametersQueryOrder List_custom_field_definitionsParameters
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_custom_field_definitionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQuerySort -> Value)
-> Maybe List_custom_field_definitionsParametersQuerySort
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQuerySort
list_custom_field_definitionsParametersQuerySort List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryBegin_time List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryEnd_time List_custom_field_definitionsParameters
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
"related_type") (List_custom_field_definitionsParametersQueryRelated_type -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQueryRelated_type -> Value)
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
list_custom_field_definitionsParametersQueryRelated_type List_custom_field_definitionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
data List_custom_field_definitionsParameters = List_custom_field_definitionsParameters
{ List_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryBegin_time :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, List_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryEnd_time :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
, List_custom_field_definitionsParameters -> Maybe [Text]
list_custom_field_definitionsParametersQueryIds :: (GHC.Maybe.Maybe [Data.Text.Internal.Text])
, List_custom_field_definitionsParameters -> Maybe Int
list_custom_field_definitionsParametersQueryLimit :: (GHC.Maybe.Maybe GHC.Types.Int)
, List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryOrder
list_custom_field_definitionsParametersQueryOrder :: (GHC.Maybe.Maybe List_custom_field_definitionsParametersQueryOrder)
, List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
list_custom_field_definitionsParametersQueryRelated_type :: (GHC.Maybe.Maybe List_custom_field_definitionsParametersQueryRelated_type)
, List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQuerySort
list_custom_field_definitionsParametersQuerySort :: (GHC.Maybe.Maybe List_custom_field_definitionsParametersQuerySort)
}
deriving
( Int -> List_custom_field_definitionsParameters -> ShowS
[List_custom_field_definitionsParameters] -> ShowS
List_custom_field_definitionsParameters -> String
(Int -> List_custom_field_definitionsParameters -> ShowS)
-> (List_custom_field_definitionsParameters -> String)
-> ([List_custom_field_definitionsParameters] -> ShowS)
-> Show List_custom_field_definitionsParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_custom_field_definitionsParameters -> ShowS
showsPrec :: Int -> List_custom_field_definitionsParameters -> ShowS
$cshow :: List_custom_field_definitionsParameters -> String
show :: List_custom_field_definitionsParameters -> String
$cshowList :: [List_custom_field_definitionsParameters] -> ShowS
showList :: [List_custom_field_definitionsParameters] -> ShowS
GHC.Show.Show
, List_custom_field_definitionsParameters
-> List_custom_field_definitionsParameters -> Bool
(List_custom_field_definitionsParameters
-> List_custom_field_definitionsParameters -> Bool)
-> (List_custom_field_definitionsParameters
-> List_custom_field_definitionsParameters -> Bool)
-> Eq List_custom_field_definitionsParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_custom_field_definitionsParameters
-> List_custom_field_definitionsParameters -> Bool
== :: List_custom_field_definitionsParameters
-> List_custom_field_definitionsParameters -> Bool
$c/= :: List_custom_field_definitionsParameters
-> List_custom_field_definitionsParameters -> Bool
/= :: List_custom_field_definitionsParameters
-> List_custom_field_definitionsParameters -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON List_custom_field_definitionsParameters where
toJSON :: List_custom_field_definitionsParameters -> Value
toJSON List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryBegin_time List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryEnd_time List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe [Text]
list_custom_field_definitionsParametersQueryIds List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe Int
list_custom_field_definitionsParametersQueryLimit List_custom_field_definitionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_custom_field_definitionsParametersQueryOrder -> [Pair])
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> [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_custom_field_definitionsParametersQueryOrder -> Pair)
-> List_custom_field_definitionsParametersQueryOrder
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryOrder" Key -> List_custom_field_definitionsParametersQueryOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryOrder
list_custom_field_definitionsParametersQueryOrder List_custom_field_definitionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_custom_field_definitionsParametersQueryRelated_type
-> [Pair])
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> [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_custom_field_definitionsParametersQueryRelated_type
-> Pair)
-> List_custom_field_definitionsParametersQueryRelated_type
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryRelated_type" Key
-> List_custom_field_definitionsParametersQueryRelated_type -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
list_custom_field_definitionsParametersQueryRelated_type List_custom_field_definitionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (List_custom_field_definitionsParametersQuerySort -> [Pair])
-> Maybe List_custom_field_definitionsParametersQuerySort
-> [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_custom_field_definitionsParametersQuerySort -> Pair)
-> List_custom_field_definitionsParametersQuerySort
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySort" Key -> List_custom_field_definitionsParametersQuerySort -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQuerySort
list_custom_field_definitionsParametersQuerySort List_custom_field_definitionsParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
toEncoding :: List_custom_field_definitionsParameters -> Encoding
toEncoding List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryBegin_time List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryEnd_time List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe [Text]
list_custom_field_definitionsParametersQueryIds List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe Int
list_custom_field_definitionsParametersQueryLimit List_custom_field_definitionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_custom_field_definitionsParametersQueryOrder -> [Series])
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> [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_custom_field_definitionsParametersQueryOrder -> Series)
-> List_custom_field_definitionsParametersQueryOrder
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryOrder" Key -> List_custom_field_definitionsParametersQueryOrder -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryOrder
list_custom_field_definitionsParametersQueryOrder List_custom_field_definitionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_custom_field_definitionsParametersQueryRelated_type
-> [Series])
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> [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_custom_field_definitionsParametersQueryRelated_type
-> Series)
-> List_custom_field_definitionsParametersQueryRelated_type
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryRelated_type" Key
-> List_custom_field_definitionsParametersQueryRelated_type
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
list_custom_field_definitionsParametersQueryRelated_type List_custom_field_definitionsParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (List_custom_field_definitionsParametersQuerySort -> [Series])
-> Maybe List_custom_field_definitionsParametersQuerySort
-> [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_custom_field_definitionsParametersQuerySort -> Series)
-> List_custom_field_definitionsParametersQuerySort
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"querySort" Key -> List_custom_field_definitionsParametersQuerySort -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQuerySort
list_custom_field_definitionsParametersQuerySort List_custom_field_definitionsParameters
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_custom_field_definitionsParameters where
parseJSON :: Value -> Parser List_custom_field_definitionsParameters
parseJSON = String
-> (Object -> Parser List_custom_field_definitionsParameters)
-> Value
-> Parser List_custom_field_definitionsParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"List_custom_field_definitionsParameters" (\Object
obj -> (((((((Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
-> Parser
(Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
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_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters
List_custom_field_definitionsParameters Parser
(Maybe JsonDateTime
-> Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe JsonDateTime
-> Maybe [Text]
-> Maybe Int
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
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_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
-> Parser (Maybe JsonDateTime)
-> Parser
(Maybe [Text]
-> Maybe Int
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
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_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
-> Parser (Maybe [Text])
-> Parser
(Maybe Int
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
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_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
-> Parser (Maybe Int)
-> Parser
(Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
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_custom_field_definitionsParametersQueryOrder
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
-> Parser (Maybe List_custom_field_definitionsParametersQueryOrder)
-> Parser
(Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
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_custom_field_definitionsParametersQueryOrder)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryOrder")) Parser
(Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
-> Parser
(Maybe List_custom_field_definitionsParametersQueryRelated_type)
-> Parser
(Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
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_custom_field_definitionsParametersQueryRelated_type)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryRelated_type")) Parser
(Maybe List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParameters)
-> Parser (Maybe List_custom_field_definitionsParametersQuerySort)
-> Parser List_custom_field_definitionsParameters
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_custom_field_definitionsParametersQuerySort)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"querySort"))
mkList_custom_field_definitionsParameters :: List_custom_field_definitionsParameters
mkList_custom_field_definitionsParameters :: List_custom_field_definitionsParameters
mkList_custom_field_definitionsParameters =
List_custom_field_definitionsParameters
{ list_custom_field_definitionsParametersQueryBegin_time :: Maybe JsonDateTime
list_custom_field_definitionsParametersQueryBegin_time = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, list_custom_field_definitionsParametersQueryEnd_time :: Maybe JsonDateTime
list_custom_field_definitionsParametersQueryEnd_time = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
, list_custom_field_definitionsParametersQueryIds :: Maybe [Text]
list_custom_field_definitionsParametersQueryIds = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing
, list_custom_field_definitionsParametersQueryLimit :: Maybe Int
list_custom_field_definitionsParametersQueryLimit = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
, list_custom_field_definitionsParametersQueryOrder :: Maybe List_custom_field_definitionsParametersQueryOrder
list_custom_field_definitionsParametersQueryOrder = Maybe List_custom_field_definitionsParametersQueryOrder
forall a. Maybe a
GHC.Maybe.Nothing
, list_custom_field_definitionsParametersQueryRelated_type :: Maybe List_custom_field_definitionsParametersQueryRelated_type
list_custom_field_definitionsParametersQueryRelated_type = Maybe List_custom_field_definitionsParametersQueryRelated_type
forall a. Maybe a
GHC.Maybe.Nothing
, list_custom_field_definitionsParametersQuerySort :: Maybe List_custom_field_definitionsParametersQuerySort
list_custom_field_definitionsParametersQuerySort = Maybe List_custom_field_definitionsParametersQuerySort
forall a. Maybe a
GHC.Maybe.Nothing
}
data List_custom_field_definitionsParametersQueryOrder
=
List_custom_field_definitionsParametersQueryOrderOther Data.Aeson.Types.Internal.Value
|
List_custom_field_definitionsParametersQueryOrderTyped Data.Text.Internal.Text
|
List_custom_field_definitionsParametersQueryOrderEnumAsc
|
List_custom_field_definitionsParametersQueryOrderEnumDesc
deriving (Int -> List_custom_field_definitionsParametersQueryOrder -> ShowS
[List_custom_field_definitionsParametersQueryOrder] -> ShowS
List_custom_field_definitionsParametersQueryOrder -> String
(Int -> List_custom_field_definitionsParametersQueryOrder -> ShowS)
-> (List_custom_field_definitionsParametersQueryOrder -> String)
-> ([List_custom_field_definitionsParametersQueryOrder] -> ShowS)
-> Show List_custom_field_definitionsParametersQueryOrder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_custom_field_definitionsParametersQueryOrder -> ShowS
showsPrec :: Int -> List_custom_field_definitionsParametersQueryOrder -> ShowS
$cshow :: List_custom_field_definitionsParametersQueryOrder -> String
show :: List_custom_field_definitionsParametersQueryOrder -> String
$cshowList :: [List_custom_field_definitionsParametersQueryOrder] -> ShowS
showList :: [List_custom_field_definitionsParametersQueryOrder] -> ShowS
GHC.Show.Show, List_custom_field_definitionsParametersQueryOrder
-> List_custom_field_definitionsParametersQueryOrder -> Bool
(List_custom_field_definitionsParametersQueryOrder
-> List_custom_field_definitionsParametersQueryOrder -> Bool)
-> (List_custom_field_definitionsParametersQueryOrder
-> List_custom_field_definitionsParametersQueryOrder -> Bool)
-> Eq List_custom_field_definitionsParametersQueryOrder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_custom_field_definitionsParametersQueryOrder
-> List_custom_field_definitionsParametersQueryOrder -> Bool
== :: List_custom_field_definitionsParametersQueryOrder
-> List_custom_field_definitionsParametersQueryOrder -> Bool
$c/= :: List_custom_field_definitionsParametersQueryOrder
-> List_custom_field_definitionsParametersQueryOrder -> Bool
/= :: List_custom_field_definitionsParametersQueryOrder
-> List_custom_field_definitionsParametersQueryOrder -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_custom_field_definitionsParametersQueryOrder where
toJSON :: List_custom_field_definitionsParametersQueryOrder -> Value
toJSON (List_custom_field_definitionsParametersQueryOrderOther Value
val) = Value
val
toJSON (List_custom_field_definitionsParametersQueryOrderTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_custom_field_definitionsParametersQueryOrder
List_custom_field_definitionsParametersQueryOrderEnumAsc) = Value
"asc"
toJSON (List_custom_field_definitionsParametersQueryOrder
List_custom_field_definitionsParametersQueryOrderEnumDesc) = Value
"desc"
instance Data.Aeson.Types.FromJSON.FromJSON List_custom_field_definitionsParametersQueryOrder where
parseJSON :: Value -> Parser List_custom_field_definitionsParametersQueryOrder
parseJSON Value
val =
List_custom_field_definitionsParametersQueryOrder
-> Parser List_custom_field_definitionsParametersQueryOrder
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_custom_field_definitionsParametersQueryOrder
List_custom_field_definitionsParametersQueryOrderEnumAsc
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"desc" -> List_custom_field_definitionsParametersQueryOrder
List_custom_field_definitionsParametersQueryOrderEnumDesc
| Bool
GHC.Base.otherwise -> Value -> List_custom_field_definitionsParametersQueryOrder
List_custom_field_definitionsParametersQueryOrderOther Value
val
)
data List_custom_field_definitionsParametersQueryRelated_type
=
List_custom_field_definitionsParametersQueryRelated_typeOther Data.Aeson.Types.Internal.Value
|
List_custom_field_definitionsParametersQueryRelated_typeTyped Data.Text.Internal.Text
|
List_custom_field_definitionsParametersQueryRelated_typeEnumAccount
|
List_custom_field_definitionsParametersQueryRelated_typeEnumItem
|
List_custom_field_definitionsParametersQueryRelated_typeEnumPlan
|
List_custom_field_definitionsParametersQueryRelated_typeEnumSubscription
|
List_custom_field_definitionsParametersQueryRelated_typeEnumCharge
deriving (Int
-> List_custom_field_definitionsParametersQueryRelated_type
-> ShowS
[List_custom_field_definitionsParametersQueryRelated_type] -> ShowS
List_custom_field_definitionsParametersQueryRelated_type -> String
(Int
-> List_custom_field_definitionsParametersQueryRelated_type
-> ShowS)
-> (List_custom_field_definitionsParametersQueryRelated_type
-> String)
-> ([List_custom_field_definitionsParametersQueryRelated_type]
-> ShowS)
-> Show List_custom_field_definitionsParametersQueryRelated_type
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int
-> List_custom_field_definitionsParametersQueryRelated_type
-> ShowS
showsPrec :: Int
-> List_custom_field_definitionsParametersQueryRelated_type
-> ShowS
$cshow :: List_custom_field_definitionsParametersQueryRelated_type -> String
show :: List_custom_field_definitionsParametersQueryRelated_type -> String
$cshowList :: [List_custom_field_definitionsParametersQueryRelated_type] -> ShowS
showList :: [List_custom_field_definitionsParametersQueryRelated_type] -> ShowS
GHC.Show.Show, List_custom_field_definitionsParametersQueryRelated_type
-> List_custom_field_definitionsParametersQueryRelated_type -> Bool
(List_custom_field_definitionsParametersQueryRelated_type
-> List_custom_field_definitionsParametersQueryRelated_type
-> Bool)
-> (List_custom_field_definitionsParametersQueryRelated_type
-> List_custom_field_definitionsParametersQueryRelated_type
-> Bool)
-> Eq List_custom_field_definitionsParametersQueryRelated_type
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_custom_field_definitionsParametersQueryRelated_type
-> List_custom_field_definitionsParametersQueryRelated_type -> Bool
== :: List_custom_field_definitionsParametersQueryRelated_type
-> List_custom_field_definitionsParametersQueryRelated_type -> Bool
$c/= :: List_custom_field_definitionsParametersQueryRelated_type
-> List_custom_field_definitionsParametersQueryRelated_type -> Bool
/= :: List_custom_field_definitionsParametersQueryRelated_type
-> List_custom_field_definitionsParametersQueryRelated_type -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_custom_field_definitionsParametersQueryRelated_type where
toJSON :: List_custom_field_definitionsParametersQueryRelated_type -> Value
toJSON (List_custom_field_definitionsParametersQueryRelated_typeOther Value
val) = Value
val
toJSON (List_custom_field_definitionsParametersQueryRelated_typeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeEnumAccount) = Value
"account"
toJSON (List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeEnumItem) = Value
"item"
toJSON (List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeEnumPlan) = Value
"plan"
toJSON (List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeEnumSubscription) = Value
"subscription"
toJSON (List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeEnumCharge) = Value
"charge"
instance Data.Aeson.Types.FromJSON.FromJSON List_custom_field_definitionsParametersQueryRelated_type where
parseJSON :: Value
-> Parser List_custom_field_definitionsParametersQueryRelated_type
parseJSON Value
val =
List_custom_field_definitionsParametersQueryRelated_type
-> Parser List_custom_field_definitionsParametersQueryRelated_type
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
"account" -> List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeEnumAccount
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"item" -> List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeEnumItem
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"plan" -> List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeEnumPlan
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"subscription" -> List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeEnumSubscription
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"charge" -> List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeEnumCharge
| Bool
GHC.Base.otherwise -> Value -> List_custom_field_definitionsParametersQueryRelated_type
List_custom_field_definitionsParametersQueryRelated_typeOther Value
val
)
data List_custom_field_definitionsParametersQuerySort
=
List_custom_field_definitionsParametersQuerySortOther Data.Aeson.Types.Internal.Value
|
List_custom_field_definitionsParametersQuerySortTyped Data.Text.Internal.Text
|
List_custom_field_definitionsParametersQuerySortEnumCreated_at
|
List_custom_field_definitionsParametersQuerySortEnumUpdated_at
deriving (Int -> List_custom_field_definitionsParametersQuerySort -> ShowS
[List_custom_field_definitionsParametersQuerySort] -> ShowS
List_custom_field_definitionsParametersQuerySort -> String
(Int -> List_custom_field_definitionsParametersQuerySort -> ShowS)
-> (List_custom_field_definitionsParametersQuerySort -> String)
-> ([List_custom_field_definitionsParametersQuerySort] -> ShowS)
-> Show List_custom_field_definitionsParametersQuerySort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_custom_field_definitionsParametersQuerySort -> ShowS
showsPrec :: Int -> List_custom_field_definitionsParametersQuerySort -> ShowS
$cshow :: List_custom_field_definitionsParametersQuerySort -> String
show :: List_custom_field_definitionsParametersQuerySort -> String
$cshowList :: [List_custom_field_definitionsParametersQuerySort] -> ShowS
showList :: [List_custom_field_definitionsParametersQuerySort] -> ShowS
GHC.Show.Show, List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParametersQuerySort -> Bool
(List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParametersQuerySort -> Bool)
-> (List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParametersQuerySort -> Bool)
-> Eq List_custom_field_definitionsParametersQuerySort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParametersQuerySort -> Bool
== :: List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParametersQuerySort -> Bool
$c/= :: List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParametersQuerySort -> Bool
/= :: List_custom_field_definitionsParametersQuerySort
-> List_custom_field_definitionsParametersQuerySort -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON List_custom_field_definitionsParametersQuerySort where
toJSON :: List_custom_field_definitionsParametersQuerySort -> Value
toJSON (List_custom_field_definitionsParametersQuerySortOther Value
val) = Value
val
toJSON (List_custom_field_definitionsParametersQuerySortTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (List_custom_field_definitionsParametersQuerySort
List_custom_field_definitionsParametersQuerySortEnumCreated_at) = Value
"created_at"
toJSON (List_custom_field_definitionsParametersQuerySort
List_custom_field_definitionsParametersQuerySortEnumUpdated_at) = Value
"updated_at"
instance Data.Aeson.Types.FromJSON.FromJSON List_custom_field_definitionsParametersQuerySort where
parseJSON :: Value -> Parser List_custom_field_definitionsParametersQuerySort
parseJSON Value
val =
List_custom_field_definitionsParametersQuerySort
-> Parser List_custom_field_definitionsParametersQuerySort
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_custom_field_definitionsParametersQuerySort
List_custom_field_definitionsParametersQuerySortEnumCreated_at
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"updated_at" -> List_custom_field_definitionsParametersQuerySort
List_custom_field_definitionsParametersQuerySortEnumUpdated_at
| Bool
GHC.Base.otherwise -> Value -> List_custom_field_definitionsParametersQuerySort
List_custom_field_definitionsParametersQuerySortOther Value
val
)
data List_custom_field_definitionsResponse
=
List_custom_field_definitionsResponseError GHC.Base.String
|
List_custom_field_definitionsResponse200 CustomFieldDefinitionList
|
List_custom_field_definitionsResponse400 Error
|
List_custom_field_definitionsResponse404 Error
|
List_custom_field_definitionsResponseDefault Error
deriving (Int -> List_custom_field_definitionsResponse -> ShowS
[List_custom_field_definitionsResponse] -> ShowS
List_custom_field_definitionsResponse -> String
(Int -> List_custom_field_definitionsResponse -> ShowS)
-> (List_custom_field_definitionsResponse -> String)
-> ([List_custom_field_definitionsResponse] -> ShowS)
-> Show List_custom_field_definitionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_custom_field_definitionsResponse -> ShowS
showsPrec :: Int -> List_custom_field_definitionsResponse -> ShowS
$cshow :: List_custom_field_definitionsResponse -> String
show :: List_custom_field_definitionsResponse -> String
$cshowList :: [List_custom_field_definitionsResponse] -> ShowS
showList :: [List_custom_field_definitionsResponse] -> ShowS
GHC.Show.Show, List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse -> Bool
(List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse -> Bool)
-> (List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse -> Bool)
-> Eq List_custom_field_definitionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse -> Bool
== :: List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse -> Bool
$c/= :: List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse -> Bool
/= :: List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse -> Bool
GHC.Classes.Eq)
list_custom_field_definitionsWithConfiguration ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
RecurlyClient.Common.Configuration ->
List_custom_field_definitionsParameters ->
m (Network.HTTP.Client.Types.Response List_custom_field_definitionsResponse)
list_custom_field_definitionsWithConfiguration :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_custom_field_definitionsParameters
-> m (Response List_custom_field_definitionsResponse)
list_custom_field_definitionsWithConfiguration
Configuration
config
List_custom_field_definitionsParameters
parameters =
(Response ByteString
-> Response List_custom_field_definitionsResponse)
-> m (Response ByteString)
-> m (Response List_custom_field_definitionsResponse)
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_custom_field_definitionsResponse)
-> Response ByteString
-> Response List_custom_field_definitionsResponse
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_custom_field_definitionsResponse)
-> (List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse)
-> Either String List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_custom_field_definitionsResponse
List_custom_field_definitionsResponseError List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse
forall a. a -> a
GHC.Base.id
(Either String List_custom_field_definitionsResponse
-> List_custom_field_definitionsResponse)
-> (ByteString
-> Either String List_custom_field_definitionsResponse)
-> ByteString
-> List_custom_field_definitionsResponse
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) ->
CustomFieldDefinitionList -> List_custom_field_definitionsResponse
List_custom_field_definitionsResponse200
(CustomFieldDefinitionList
-> List_custom_field_definitionsResponse)
-> Either String CustomFieldDefinitionList
-> Either String List_custom_field_definitionsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String CustomFieldDefinitionList
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
CustomFieldDefinitionList
)
| (\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_custom_field_definitionsResponse
List_custom_field_definitionsResponse400
(Error -> List_custom_field_definitionsResponse)
-> Either String Error
-> Either String List_custom_field_definitionsResponse
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_custom_field_definitionsResponse
List_custom_field_definitionsResponse404
(Error -> List_custom_field_definitionsResponse)
-> Either String Error
-> Either String List_custom_field_definitionsResponse
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_custom_field_definitionsResponse
List_custom_field_definitionsResponseDefault
(Error -> List_custom_field_definitionsResponse)
-> Either String Error
-> Either String List_custom_field_definitionsResponse
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_custom_field_definitionsResponse
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
"/custom_field_definitions"
[ 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_custom_field_definitionsParameters -> Maybe [Text]
list_custom_field_definitionsParametersQueryIds List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe Int
list_custom_field_definitionsParametersQueryLimit List_custom_field_definitionsParameters
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_custom_field_definitionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQueryOrder -> Value)
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryOrder
list_custom_field_definitionsParametersQueryOrder List_custom_field_definitionsParameters
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_custom_field_definitionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQuerySort -> Value)
-> Maybe List_custom_field_definitionsParametersQuerySort
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQuerySort
list_custom_field_definitionsParametersQuerySort List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryBegin_time List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryEnd_time List_custom_field_definitionsParameters
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
"related_type") (List_custom_field_definitionsParametersQueryRelated_type -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQueryRelated_type -> Value)
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
list_custom_field_definitionsParametersQueryRelated_type List_custom_field_definitionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
list_custom_field_definitionsRaw ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
List_custom_field_definitionsParameters ->
RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_custom_field_definitionsRaw :: forall (m :: * -> *).
MonadHTTP m =>
List_custom_field_definitionsParameters
-> ClientT m (Response ByteString)
list_custom_field_definitionsRaw List_custom_field_definitionsParameters
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
"/custom_field_definitions"
[ 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_custom_field_definitionsParameters -> Maybe [Text]
list_custom_field_definitionsParametersQueryIds List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe Int
list_custom_field_definitionsParametersQueryLimit List_custom_field_definitionsParameters
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_custom_field_definitionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQueryOrder -> Value)
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryOrder
list_custom_field_definitionsParametersQueryOrder List_custom_field_definitionsParameters
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_custom_field_definitionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQuerySort -> Value)
-> Maybe List_custom_field_definitionsParametersQuerySort
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQuerySort
list_custom_field_definitionsParametersQuerySort List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryBegin_time List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryEnd_time List_custom_field_definitionsParameters
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
"related_type") (List_custom_field_definitionsParametersQueryRelated_type -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQueryRelated_type -> Value)
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
list_custom_field_definitionsParametersQueryRelated_type List_custom_field_definitionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)
list_custom_field_definitionsWithConfigurationRaw ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
RecurlyClient.Common.Configuration ->
List_custom_field_definitionsParameters ->
m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_custom_field_definitionsWithConfigurationRaw :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_custom_field_definitionsParameters
-> m (Response ByteString)
list_custom_field_definitionsWithConfigurationRaw
Configuration
config
List_custom_field_definitionsParameters
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
"/custom_field_definitions"
[ 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_custom_field_definitionsParameters -> Maybe [Text]
list_custom_field_definitionsParametersQueryIds List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe Int
list_custom_field_definitionsParametersQueryLimit List_custom_field_definitionsParameters
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_custom_field_definitionsParametersQueryOrder -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQueryOrder -> Value)
-> Maybe List_custom_field_definitionsParametersQueryOrder
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryOrder
list_custom_field_definitionsParametersQueryOrder List_custom_field_definitionsParameters
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_custom_field_definitionsParametersQuerySort -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQuerySort -> Value)
-> Maybe List_custom_field_definitionsParametersQuerySort
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQuerySort
list_custom_field_definitionsParametersQuerySort List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryBegin_time List_custom_field_definitionsParameters
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_custom_field_definitionsParameters -> Maybe JsonDateTime
list_custom_field_definitionsParametersQueryEnd_time List_custom_field_definitionsParameters
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
"related_type") (List_custom_field_definitionsParametersQueryRelated_type -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (List_custom_field_definitionsParametersQueryRelated_type -> Value)
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> List_custom_field_definitionsParameters
-> Maybe List_custom_field_definitionsParametersQueryRelated_type
list_custom_field_definitionsParametersQueryRelated_type List_custom_field_definitionsParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False
]
)