{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Operations.GetRecipients 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.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Either
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified 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 StripeAPI.Common
import StripeAPI.Types
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
getRecipients ::
forall m.
StripeAPI.Common.MonadHTTP m =>
GetRecipientsParameters ->
StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response GetRecipientsResponse)
getRecipients :: GetRecipientsParameters
-> ClientT m (Response GetRecipientsResponse)
getRecipients GetRecipientsParameters
parameters =
(Response ByteString -> Response GetRecipientsResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response GetRecipientsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_0 ->
(ByteString -> GetRecipientsResponse)
-> Response ByteString -> Response GetRecipientsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> GetRecipientsResponse)
-> (GetRecipientsResponse -> GetRecipientsResponse)
-> Either String GetRecipientsResponse
-> GetRecipientsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> GetRecipientsResponse
GetRecipientsResponseError GetRecipientsResponse -> GetRecipientsResponse
forall a. a -> a
GHC.Base.id
(Either String GetRecipientsResponse -> GetRecipientsResponse)
-> (ByteString -> Either String GetRecipientsResponse)
-> ByteString
-> GetRecipientsResponse
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) ->
GetRecipientsResponseBody200 -> GetRecipientsResponse
GetRecipientsResponse200
(GetRecipientsResponseBody200 -> GetRecipientsResponse)
-> Either String GetRecipientsResponseBody200
-> Either String GetRecipientsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String GetRecipientsResponseBody200
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
GetRecipientsResponseBody200
)
| 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 -> GetRecipientsResponse
GetRecipientsResponseDefault
(Error -> GetRecipientsResponse)
-> Either String Error -> Either String GetRecipientsResponse
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 GetRecipientsResponse
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)
StripeAPI.Common.doCallWithConfigurationM
(Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.pack String
"GET")
(String -> Text
Data.Text.pack String
"/v1/recipients")
[ Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"created") (GetRecipientsParametersQueryCreated'Variants -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (GetRecipientsParametersQueryCreated'Variants -> Value)
-> Maybe GetRecipientsParametersQueryCreated'Variants
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetRecipientsParameters
-> Maybe GetRecipientsParametersQueryCreated'Variants
getRecipientsParametersQueryCreated GetRecipientsParameters
parameters) (String -> Text
Data.Text.pack String
"deepObject") Bool
GHC.Types.True,
Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"ending_before") (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.<$> GetRecipientsParameters -> Maybe Text
getRecipientsParametersQueryEndingBefore GetRecipientsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True,
Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"expand") ([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.<$> GetRecipientsParameters -> Maybe [Text]
getRecipientsParametersQueryExpand GetRecipientsParameters
parameters) (String -> Text
Data.Text.pack String
"deepObject") Bool
GHC.Types.True,
Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.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.<$> GetRecipientsParameters -> Maybe Int
getRecipientsParametersQueryLimit GetRecipientsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True,
Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"starting_after") (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.<$> GetRecipientsParameters -> Maybe Text
getRecipientsParametersQueryStartingAfter GetRecipientsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True,
Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"type") (GetRecipientsParametersQueryType' -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (GetRecipientsParametersQueryType' -> Value)
-> Maybe GetRecipientsParametersQueryType' -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetRecipientsParameters -> Maybe GetRecipientsParametersQueryType'
getRecipientsParametersQueryType GetRecipientsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True,
Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"verified") (Bool -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Bool -> Value) -> Maybe Bool -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetRecipientsParameters -> Maybe Bool
getRecipientsParametersQueryVerified GetRecipientsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True
]
)
data GetRecipientsParameters = GetRecipientsParameters
{
GetRecipientsParameters
-> Maybe GetRecipientsParametersQueryCreated'Variants
getRecipientsParametersQueryCreated :: (GHC.Maybe.Maybe GetRecipientsParametersQueryCreated'Variants),
GetRecipientsParameters -> Maybe Text
getRecipientsParametersQueryEndingBefore :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
GetRecipientsParameters -> Maybe [Text]
getRecipientsParametersQueryExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
GetRecipientsParameters -> Maybe Int
getRecipientsParametersQueryLimit :: (GHC.Maybe.Maybe GHC.Types.Int),
GetRecipientsParameters -> Maybe Text
getRecipientsParametersQueryStartingAfter :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
GetRecipientsParameters -> Maybe GetRecipientsParametersQueryType'
getRecipientsParametersQueryType :: (GHC.Maybe.Maybe GetRecipientsParametersQueryType'),
GetRecipientsParameters -> Maybe Bool
getRecipientsParametersQueryVerified :: (GHC.Maybe.Maybe GHC.Types.Bool)
}
deriving
( Int -> GetRecipientsParameters -> ShowS
[GetRecipientsParameters] -> ShowS
GetRecipientsParameters -> String
(Int -> GetRecipientsParameters -> ShowS)
-> (GetRecipientsParameters -> String)
-> ([GetRecipientsParameters] -> ShowS)
-> Show GetRecipientsParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRecipientsParameters] -> ShowS
$cshowList :: [GetRecipientsParameters] -> ShowS
show :: GetRecipientsParameters -> String
$cshow :: GetRecipientsParameters -> String
showsPrec :: Int -> GetRecipientsParameters -> ShowS
$cshowsPrec :: Int -> GetRecipientsParameters -> ShowS
GHC.Show.Show,
GetRecipientsParameters -> GetRecipientsParameters -> Bool
(GetRecipientsParameters -> GetRecipientsParameters -> Bool)
-> (GetRecipientsParameters -> GetRecipientsParameters -> Bool)
-> Eq GetRecipientsParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRecipientsParameters -> GetRecipientsParameters -> Bool
$c/= :: GetRecipientsParameters -> GetRecipientsParameters -> Bool
== :: GetRecipientsParameters -> GetRecipientsParameters -> Bool
$c== :: GetRecipientsParameters -> GetRecipientsParameters -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsParameters where
toJSON :: GetRecipientsParameters -> Value
toJSON GetRecipientsParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"queryCreated" Text -> Maybe GetRecipientsParametersQueryCreated'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters
-> Maybe GetRecipientsParametersQueryCreated'Variants
getRecipientsParametersQueryCreated GetRecipientsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryEnding_before" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe Text
getRecipientsParametersQueryEndingBefore GetRecipientsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryExpand" Text -> Maybe [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe [Text]
getRecipientsParametersQueryExpand GetRecipientsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryLimit" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe Int
getRecipientsParametersQueryLimit GetRecipientsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryStarting_after" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe Text
getRecipientsParametersQueryStartingAfter GetRecipientsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryType" Text -> Maybe GetRecipientsParametersQueryType' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe GetRecipientsParametersQueryType'
getRecipientsParametersQueryType GetRecipientsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryVerified" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe Bool
getRecipientsParametersQueryVerified GetRecipientsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: GetRecipientsParameters -> Encoding
toEncoding GetRecipientsParameters
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"queryCreated" Text
-> Maybe GetRecipientsParametersQueryCreated'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters
-> Maybe GetRecipientsParametersQueryCreated'Variants
getRecipientsParametersQueryCreated GetRecipientsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryEnding_before" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe Text
getRecipientsParametersQueryEndingBefore GetRecipientsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryExpand" Text -> Maybe [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe [Text]
getRecipientsParametersQueryExpand GetRecipientsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryLimit" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe Int
getRecipientsParametersQueryLimit GetRecipientsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryStarting_after" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe Text
getRecipientsParametersQueryStartingAfter GetRecipientsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryType" Text -> Maybe GetRecipientsParametersQueryType' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe GetRecipientsParametersQueryType'
getRecipientsParametersQueryType GetRecipientsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"queryVerified" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParameters -> Maybe Bool
getRecipientsParametersQueryVerified GetRecipientsParameters
obj)))))))
instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsParameters where
parseJSON :: Value -> Parser GetRecipientsParameters
parseJSON = String
-> (Object -> Parser GetRecipientsParameters)
-> Value
-> Parser GetRecipientsParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetRecipientsParameters" (\Object
obj -> (((((((Maybe GetRecipientsParametersQueryCreated'Variants
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
-> Parser
(Maybe GetRecipientsParametersQueryCreated'Variants
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe GetRecipientsParametersQueryCreated'Variants
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters
GetRecipientsParameters Parser
(Maybe GetRecipientsParametersQueryCreated'Variants
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
-> Parser (Maybe GetRecipientsParametersQueryCreated'Variants)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe GetRecipientsParametersQueryCreated'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"queryCreated")) Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"queryEnding_before")) Parser
(Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
-> Parser (Maybe [Text])
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"queryExpand")) Parser
(Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"queryLimit")) Parser
(Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters)
-> Parser (Maybe Text)
-> Parser
(Maybe GetRecipientsParametersQueryType'
-> Maybe Bool -> GetRecipientsParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"queryStarting_after")) Parser
(Maybe GetRecipientsParametersQueryType'
-> Maybe Bool -> GetRecipientsParameters)
-> Parser (Maybe GetRecipientsParametersQueryType')
-> Parser (Maybe Bool -> GetRecipientsParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe GetRecipientsParametersQueryType')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"queryType")) Parser (Maybe Bool -> GetRecipientsParameters)
-> Parser (Maybe Bool) -> Parser GetRecipientsParameters
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"queryVerified"))
mkGetRecipientsParameters :: GetRecipientsParameters
mkGetRecipientsParameters :: GetRecipientsParameters
mkGetRecipientsParameters =
GetRecipientsParameters :: Maybe GetRecipientsParametersQueryCreated'Variants
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe GetRecipientsParametersQueryType'
-> Maybe Bool
-> GetRecipientsParameters
GetRecipientsParameters
{ getRecipientsParametersQueryCreated :: Maybe GetRecipientsParametersQueryCreated'Variants
getRecipientsParametersQueryCreated = Maybe GetRecipientsParametersQueryCreated'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
getRecipientsParametersQueryEndingBefore :: Maybe Text
getRecipientsParametersQueryEndingBefore = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
getRecipientsParametersQueryExpand :: Maybe [Text]
getRecipientsParametersQueryExpand = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
getRecipientsParametersQueryLimit :: Maybe Int
getRecipientsParametersQueryLimit = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
getRecipientsParametersQueryStartingAfter :: Maybe Text
getRecipientsParametersQueryStartingAfter = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
getRecipientsParametersQueryType :: Maybe GetRecipientsParametersQueryType'
getRecipientsParametersQueryType = Maybe GetRecipientsParametersQueryType'
forall a. Maybe a
GHC.Maybe.Nothing,
getRecipientsParametersQueryVerified :: Maybe Bool
getRecipientsParametersQueryVerified = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
}
data GetRecipientsParametersQueryCreated'OneOf1 = GetRecipientsParametersQueryCreated'OneOf1
{
GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Gt :: (GHC.Maybe.Maybe GHC.Types.Int),
GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Gte :: (GHC.Maybe.Maybe GHC.Types.Int),
GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Lt :: (GHC.Maybe.Maybe GHC.Types.Int),
GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Lte :: (GHC.Maybe.Maybe GHC.Types.Int)
}
deriving
( Int -> GetRecipientsParametersQueryCreated'OneOf1 -> ShowS
[GetRecipientsParametersQueryCreated'OneOf1] -> ShowS
GetRecipientsParametersQueryCreated'OneOf1 -> String
(Int -> GetRecipientsParametersQueryCreated'OneOf1 -> ShowS)
-> (GetRecipientsParametersQueryCreated'OneOf1 -> String)
-> ([GetRecipientsParametersQueryCreated'OneOf1] -> ShowS)
-> Show GetRecipientsParametersQueryCreated'OneOf1
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRecipientsParametersQueryCreated'OneOf1] -> ShowS
$cshowList :: [GetRecipientsParametersQueryCreated'OneOf1] -> ShowS
show :: GetRecipientsParametersQueryCreated'OneOf1 -> String
$cshow :: GetRecipientsParametersQueryCreated'OneOf1 -> String
showsPrec :: Int -> GetRecipientsParametersQueryCreated'OneOf1 -> ShowS
$cshowsPrec :: Int -> GetRecipientsParametersQueryCreated'OneOf1 -> ShowS
GHC.Show.Show,
GetRecipientsParametersQueryCreated'OneOf1
-> GetRecipientsParametersQueryCreated'OneOf1 -> Bool
(GetRecipientsParametersQueryCreated'OneOf1
-> GetRecipientsParametersQueryCreated'OneOf1 -> Bool)
-> (GetRecipientsParametersQueryCreated'OneOf1
-> GetRecipientsParametersQueryCreated'OneOf1 -> Bool)
-> Eq GetRecipientsParametersQueryCreated'OneOf1
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRecipientsParametersQueryCreated'OneOf1
-> GetRecipientsParametersQueryCreated'OneOf1 -> Bool
$c/= :: GetRecipientsParametersQueryCreated'OneOf1
-> GetRecipientsParametersQueryCreated'OneOf1 -> Bool
== :: GetRecipientsParametersQueryCreated'OneOf1
-> GetRecipientsParametersQueryCreated'OneOf1 -> Bool
$c== :: GetRecipientsParametersQueryCreated'OneOf1
-> GetRecipientsParametersQueryCreated'OneOf1 -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsParametersQueryCreated'OneOf1 where
toJSON :: GetRecipientsParametersQueryCreated'OneOf1 -> Value
toJSON GetRecipientsParametersQueryCreated'OneOf1
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"gt" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Gt GetRecipientsParametersQueryCreated'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"gte" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Gte GetRecipientsParametersQueryCreated'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"lt" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Lt GetRecipientsParametersQueryCreated'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"lte" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Lte GetRecipientsParametersQueryCreated'OneOf1
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: GetRecipientsParametersQueryCreated'OneOf1 -> Encoding
toEncoding GetRecipientsParametersQueryCreated'OneOf1
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"gt" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Gt GetRecipientsParametersQueryCreated'OneOf1
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"gte" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Gte GetRecipientsParametersQueryCreated'OneOf1
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"lt" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Lt GetRecipientsParametersQueryCreated'OneOf1
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"lte" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsParametersQueryCreated'OneOf1 -> Maybe Int
getRecipientsParametersQueryCreated'OneOf1Lte GetRecipientsParametersQueryCreated'OneOf1
obj))))
instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsParametersQueryCreated'OneOf1 where
parseJSON :: Value -> Parser GetRecipientsParametersQueryCreated'OneOf1
parseJSON = String
-> (Object -> Parser GetRecipientsParametersQueryCreated'OneOf1)
-> Value
-> Parser GetRecipientsParametersQueryCreated'OneOf1
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetRecipientsParametersQueryCreated'OneOf1" (\Object
obj -> ((((Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> GetRecipientsParametersQueryCreated'OneOf1)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> GetRecipientsParametersQueryCreated'OneOf1)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> GetRecipientsParametersQueryCreated'OneOf1
GetRecipientsParametersQueryCreated'OneOf1 Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> GetRecipientsParametersQueryCreated'OneOf1)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> GetRecipientsParametersQueryCreated'OneOf1)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"gt")) Parser
(Maybe Int
-> Maybe Int
-> Maybe Int
-> GetRecipientsParametersQueryCreated'OneOf1)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int -> GetRecipientsParametersQueryCreated'OneOf1)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"gte")) Parser
(Maybe Int
-> Maybe Int -> GetRecipientsParametersQueryCreated'OneOf1)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> GetRecipientsParametersQueryCreated'OneOf1)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"lt")) Parser (Maybe Int -> GetRecipientsParametersQueryCreated'OneOf1)
-> Parser (Maybe Int)
-> Parser GetRecipientsParametersQueryCreated'OneOf1
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"lte"))
mkGetRecipientsParametersQueryCreated'OneOf1 :: GetRecipientsParametersQueryCreated'OneOf1
mkGetRecipientsParametersQueryCreated'OneOf1 :: GetRecipientsParametersQueryCreated'OneOf1
mkGetRecipientsParametersQueryCreated'OneOf1 =
GetRecipientsParametersQueryCreated'OneOf1 :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> GetRecipientsParametersQueryCreated'OneOf1
GetRecipientsParametersQueryCreated'OneOf1
{ getRecipientsParametersQueryCreated'OneOf1Gt :: Maybe Int
getRecipientsParametersQueryCreated'OneOf1Gt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
getRecipientsParametersQueryCreated'OneOf1Gte :: Maybe Int
getRecipientsParametersQueryCreated'OneOf1Gte = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
getRecipientsParametersQueryCreated'OneOf1Lt :: Maybe Int
getRecipientsParametersQueryCreated'OneOf1Lt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
getRecipientsParametersQueryCreated'OneOf1Lte :: Maybe Int
getRecipientsParametersQueryCreated'OneOf1Lte = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
}
data GetRecipientsParametersQueryCreated'Variants
= GetRecipientsParametersQueryCreated'GetRecipientsParametersQueryCreated'OneOf1 GetRecipientsParametersQueryCreated'OneOf1
| GetRecipientsParametersQueryCreated'Int GHC.Types.Int
deriving (Int -> GetRecipientsParametersQueryCreated'Variants -> ShowS
[GetRecipientsParametersQueryCreated'Variants] -> ShowS
GetRecipientsParametersQueryCreated'Variants -> String
(Int -> GetRecipientsParametersQueryCreated'Variants -> ShowS)
-> (GetRecipientsParametersQueryCreated'Variants -> String)
-> ([GetRecipientsParametersQueryCreated'Variants] -> ShowS)
-> Show GetRecipientsParametersQueryCreated'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRecipientsParametersQueryCreated'Variants] -> ShowS
$cshowList :: [GetRecipientsParametersQueryCreated'Variants] -> ShowS
show :: GetRecipientsParametersQueryCreated'Variants -> String
$cshow :: GetRecipientsParametersQueryCreated'Variants -> String
showsPrec :: Int -> GetRecipientsParametersQueryCreated'Variants -> ShowS
$cshowsPrec :: Int -> GetRecipientsParametersQueryCreated'Variants -> ShowS
GHC.Show.Show, GetRecipientsParametersQueryCreated'Variants
-> GetRecipientsParametersQueryCreated'Variants -> Bool
(GetRecipientsParametersQueryCreated'Variants
-> GetRecipientsParametersQueryCreated'Variants -> Bool)
-> (GetRecipientsParametersQueryCreated'Variants
-> GetRecipientsParametersQueryCreated'Variants -> Bool)
-> Eq GetRecipientsParametersQueryCreated'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRecipientsParametersQueryCreated'Variants
-> GetRecipientsParametersQueryCreated'Variants -> Bool
$c/= :: GetRecipientsParametersQueryCreated'Variants
-> GetRecipientsParametersQueryCreated'Variants -> Bool
== :: GetRecipientsParametersQueryCreated'Variants
-> GetRecipientsParametersQueryCreated'Variants -> Bool
$c== :: GetRecipientsParametersQueryCreated'Variants
-> GetRecipientsParametersQueryCreated'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsParametersQueryCreated'Variants where
toJSON :: GetRecipientsParametersQueryCreated'Variants -> Value
toJSON (GetRecipientsParametersQueryCreated'GetRecipientsParametersQueryCreated'OneOf1 GetRecipientsParametersQueryCreated'OneOf1
a) = GetRecipientsParametersQueryCreated'OneOf1 -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON GetRecipientsParametersQueryCreated'OneOf1
a
toJSON (GetRecipientsParametersQueryCreated'Int Int
a) = Int -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Int
a
instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsParametersQueryCreated'Variants where
parseJSON :: Value -> Parser GetRecipientsParametersQueryCreated'Variants
parseJSON Value
val = case (GetRecipientsParametersQueryCreated'OneOf1
-> GetRecipientsParametersQueryCreated'Variants
GetRecipientsParametersQueryCreated'GetRecipientsParametersQueryCreated'OneOf1 (GetRecipientsParametersQueryCreated'OneOf1
-> GetRecipientsParametersQueryCreated'Variants)
-> Result GetRecipientsParametersQueryCreated'OneOf1
-> Result GetRecipientsParametersQueryCreated'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result GetRecipientsParametersQueryCreated'OneOf1
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result GetRecipientsParametersQueryCreated'Variants
-> Result GetRecipientsParametersQueryCreated'Variants
-> Result GetRecipientsParametersQueryCreated'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Int -> GetRecipientsParametersQueryCreated'Variants
GetRecipientsParametersQueryCreated'Int (Int -> GetRecipientsParametersQueryCreated'Variants)
-> Result Int
-> Result GetRecipientsParametersQueryCreated'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Int
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result GetRecipientsParametersQueryCreated'Variants
-> Result GetRecipientsParametersQueryCreated'Variants
-> Result GetRecipientsParametersQueryCreated'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result GetRecipientsParametersQueryCreated'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success GetRecipientsParametersQueryCreated'Variants
a -> GetRecipientsParametersQueryCreated'Variants
-> Parser GetRecipientsParametersQueryCreated'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure GetRecipientsParametersQueryCreated'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser GetRecipientsParametersQueryCreated'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data GetRecipientsParametersQueryType'
=
GetRecipientsParametersQueryType'Other Data.Aeson.Types.Internal.Value
|
GetRecipientsParametersQueryType'Typed Data.Text.Internal.Text
|
GetRecipientsParametersQueryType'EnumCorporation
|
GetRecipientsParametersQueryType'EnumIndividual
deriving (Int -> GetRecipientsParametersQueryType' -> ShowS
[GetRecipientsParametersQueryType'] -> ShowS
GetRecipientsParametersQueryType' -> String
(Int -> GetRecipientsParametersQueryType' -> ShowS)
-> (GetRecipientsParametersQueryType' -> String)
-> ([GetRecipientsParametersQueryType'] -> ShowS)
-> Show GetRecipientsParametersQueryType'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRecipientsParametersQueryType'] -> ShowS
$cshowList :: [GetRecipientsParametersQueryType'] -> ShowS
show :: GetRecipientsParametersQueryType' -> String
$cshow :: GetRecipientsParametersQueryType' -> String
showsPrec :: Int -> GetRecipientsParametersQueryType' -> ShowS
$cshowsPrec :: Int -> GetRecipientsParametersQueryType' -> ShowS
GHC.Show.Show, GetRecipientsParametersQueryType'
-> GetRecipientsParametersQueryType' -> Bool
(GetRecipientsParametersQueryType'
-> GetRecipientsParametersQueryType' -> Bool)
-> (GetRecipientsParametersQueryType'
-> GetRecipientsParametersQueryType' -> Bool)
-> Eq GetRecipientsParametersQueryType'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRecipientsParametersQueryType'
-> GetRecipientsParametersQueryType' -> Bool
$c/= :: GetRecipientsParametersQueryType'
-> GetRecipientsParametersQueryType' -> Bool
== :: GetRecipientsParametersQueryType'
-> GetRecipientsParametersQueryType' -> Bool
$c== :: GetRecipientsParametersQueryType'
-> GetRecipientsParametersQueryType' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsParametersQueryType' where
toJSON :: GetRecipientsParametersQueryType' -> Value
toJSON (GetRecipientsParametersQueryType'Other Value
val) = Value
val
toJSON (GetRecipientsParametersQueryType'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (GetRecipientsParametersQueryType'
GetRecipientsParametersQueryType'EnumCorporation) = Value
"corporation"
toJSON (GetRecipientsParametersQueryType'
GetRecipientsParametersQueryType'EnumIndividual) = Value
"individual"
instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsParametersQueryType' where
parseJSON :: Value -> Parser GetRecipientsParametersQueryType'
parseJSON Value
val =
GetRecipientsParametersQueryType'
-> Parser GetRecipientsParametersQueryType'
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
"corporation" -> GetRecipientsParametersQueryType'
GetRecipientsParametersQueryType'EnumCorporation
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"individual" -> GetRecipientsParametersQueryType'
GetRecipientsParametersQueryType'EnumIndividual
| Bool
GHC.Base.otherwise -> Value -> GetRecipientsParametersQueryType'
GetRecipientsParametersQueryType'Other Value
val
)
data GetRecipientsResponse
=
GetRecipientsResponseError GHC.Base.String
|
GetRecipientsResponse200 GetRecipientsResponseBody200
|
GetRecipientsResponseDefault Error
deriving (Int -> GetRecipientsResponse -> ShowS
[GetRecipientsResponse] -> ShowS
GetRecipientsResponse -> String
(Int -> GetRecipientsResponse -> ShowS)
-> (GetRecipientsResponse -> String)
-> ([GetRecipientsResponse] -> ShowS)
-> Show GetRecipientsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRecipientsResponse] -> ShowS
$cshowList :: [GetRecipientsResponse] -> ShowS
show :: GetRecipientsResponse -> String
$cshow :: GetRecipientsResponse -> String
showsPrec :: Int -> GetRecipientsResponse -> ShowS
$cshowsPrec :: Int -> GetRecipientsResponse -> ShowS
GHC.Show.Show, GetRecipientsResponse -> GetRecipientsResponse -> Bool
(GetRecipientsResponse -> GetRecipientsResponse -> Bool)
-> (GetRecipientsResponse -> GetRecipientsResponse -> Bool)
-> Eq GetRecipientsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRecipientsResponse -> GetRecipientsResponse -> Bool
$c/= :: GetRecipientsResponse -> GetRecipientsResponse -> Bool
== :: GetRecipientsResponse -> GetRecipientsResponse -> Bool
$c== :: GetRecipientsResponse -> GetRecipientsResponse -> Bool
GHC.Classes.Eq)
data GetRecipientsResponseBody200 = GetRecipientsResponseBody200
{
GetRecipientsResponseBody200 -> [Recipient]
getRecipientsResponseBody200Data :: ([Recipient]),
GetRecipientsResponseBody200 -> Bool
getRecipientsResponseBody200HasMore :: GHC.Types.Bool,
GetRecipientsResponseBody200 -> Text
getRecipientsResponseBody200Url :: Data.Text.Internal.Text
}
deriving
( Int -> GetRecipientsResponseBody200 -> ShowS
[GetRecipientsResponseBody200] -> ShowS
GetRecipientsResponseBody200 -> String
(Int -> GetRecipientsResponseBody200 -> ShowS)
-> (GetRecipientsResponseBody200 -> String)
-> ([GetRecipientsResponseBody200] -> ShowS)
-> Show GetRecipientsResponseBody200
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRecipientsResponseBody200] -> ShowS
$cshowList :: [GetRecipientsResponseBody200] -> ShowS
show :: GetRecipientsResponseBody200 -> String
$cshow :: GetRecipientsResponseBody200 -> String
showsPrec :: Int -> GetRecipientsResponseBody200 -> ShowS
$cshowsPrec :: Int -> GetRecipientsResponseBody200 -> ShowS
GHC.Show.Show,
GetRecipientsResponseBody200
-> GetRecipientsResponseBody200 -> Bool
(GetRecipientsResponseBody200
-> GetRecipientsResponseBody200 -> Bool)
-> (GetRecipientsResponseBody200
-> GetRecipientsResponseBody200 -> Bool)
-> Eq GetRecipientsResponseBody200
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRecipientsResponseBody200
-> GetRecipientsResponseBody200 -> Bool
$c/= :: GetRecipientsResponseBody200
-> GetRecipientsResponseBody200 -> Bool
== :: GetRecipientsResponseBody200
-> GetRecipientsResponseBody200 -> Bool
$c== :: GetRecipientsResponseBody200
-> GetRecipientsResponseBody200 -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsResponseBody200 where
toJSON :: GetRecipientsResponseBody200 -> Value
toJSON GetRecipientsResponseBody200
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"data" Text -> [Recipient] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsResponseBody200 -> [Recipient]
getRecipientsResponseBody200Data GetRecipientsResponseBody200
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"has_more" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsResponseBody200 -> Bool
getRecipientsResponseBody200HasMore GetRecipientsResponseBody200
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"url" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsResponseBody200 -> Text
getRecipientsResponseBody200Url GetRecipientsResponseBody200
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: GetRecipientsResponseBody200 -> Encoding
toEncoding GetRecipientsResponseBody200
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"data" Text -> [Recipient] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsResponseBody200 -> [Recipient]
getRecipientsResponseBody200Data GetRecipientsResponseBody200
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"has_more" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsResponseBody200 -> Bool
getRecipientsResponseBody200HasMore GetRecipientsResponseBody200
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"url" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetRecipientsResponseBody200 -> Text
getRecipientsResponseBody200Url GetRecipientsResponseBody200
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list"))))
instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsResponseBody200 where
parseJSON :: Value -> Parser GetRecipientsResponseBody200
parseJSON = String
-> (Object -> Parser GetRecipientsResponseBody200)
-> Value
-> Parser GetRecipientsResponseBody200
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetRecipientsResponseBody200" (\Object
obj -> ((([Recipient] -> Bool -> Text -> GetRecipientsResponseBody200)
-> Parser
([Recipient] -> Bool -> Text -> GetRecipientsResponseBody200)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure [Recipient] -> Bool -> Text -> GetRecipientsResponseBody200
GetRecipientsResponseBody200 Parser
([Recipient] -> Bool -> Text -> GetRecipientsResponseBody200)
-> Parser [Recipient]
-> Parser (Bool -> Text -> GetRecipientsResponseBody200)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [Recipient]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"data")) Parser (Bool -> Text -> GetRecipientsResponseBody200)
-> Parser Bool -> Parser (Text -> GetRecipientsResponseBody200)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"has_more")) Parser (Text -> GetRecipientsResponseBody200)
-> Parser Text -> Parser GetRecipientsResponseBody200
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"url"))
mkGetRecipientsResponseBody200 ::
[Recipient] ->
GHC.Types.Bool ->
Data.Text.Internal.Text ->
GetRecipientsResponseBody200
mkGetRecipientsResponseBody200 :: [Recipient] -> Bool -> Text -> GetRecipientsResponseBody200
mkGetRecipientsResponseBody200 [Recipient]
getRecipientsResponseBody200Data Bool
getRecipientsResponseBody200HasMore Text
getRecipientsResponseBody200Url =
GetRecipientsResponseBody200 :: [Recipient] -> Bool -> Text -> GetRecipientsResponseBody200
GetRecipientsResponseBody200
{ getRecipientsResponseBody200Data :: [Recipient]
getRecipientsResponseBody200Data = [Recipient]
getRecipientsResponseBody200Data,
getRecipientsResponseBody200HasMore :: Bool
getRecipientsResponseBody200HasMore = Bool
getRecipientsResponseBody200HasMore,
getRecipientsResponseBody200Url :: Text
getRecipientsResponseBody200Url = Text
getRecipientsResponseBody200Url
}