{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Operations.GetAccountPersons 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
getAccountPersons ::
forall m.
StripeAPI.Common.MonadHTTP m =>
GetAccountPersonsParameters ->
StripeAPI.Common.StripeT m (Network.HTTP.Client.Types.Response GetAccountPersonsResponse)
getAccountPersons :: GetAccountPersonsParameters
-> StripeT m (Response GetAccountPersonsResponse)
getAccountPersons GetAccountPersonsParameters
parameters =
(Response ByteString -> Response GetAccountPersonsResponse)
-> StripeT m (Response ByteString)
-> StripeT m (Response GetAccountPersonsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_0 ->
(ByteString -> GetAccountPersonsResponse)
-> Response ByteString -> Response GetAccountPersonsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> GetAccountPersonsResponse)
-> (GetAccountPersonsResponse -> GetAccountPersonsResponse)
-> Either String GetAccountPersonsResponse
-> GetAccountPersonsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> GetAccountPersonsResponse
GetAccountPersonsResponseError GetAccountPersonsResponse -> GetAccountPersonsResponse
forall a. a -> a
GHC.Base.id
(Either String GetAccountPersonsResponse
-> GetAccountPersonsResponse)
-> (ByteString -> Either String GetAccountPersonsResponse)
-> ByteString
-> GetAccountPersonsResponse
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) ->
GetAccountPersonsResponseBody200 -> GetAccountPersonsResponse
GetAccountPersonsResponse200
(GetAccountPersonsResponseBody200 -> GetAccountPersonsResponse)
-> Either String GetAccountPersonsResponseBody200
-> Either String GetAccountPersonsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String GetAccountPersonsResponseBody200
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
GetAccountPersonsResponseBody200
)
| 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 -> GetAccountPersonsResponse
GetAccountPersonsResponseDefault
(Error -> GetAccountPersonsResponse)
-> Either String Error -> Either String GetAccountPersonsResponse
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 GetAccountPersonsResponse
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] -> StripeT m (Response ByteString)
forall (m :: * -> *).
MonadHTTP m =>
Text -> Text -> [QueryParameter] -> StripeT 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/account/persons")
[ 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.<$> GetAccountPersonsParameters -> Maybe Text
getAccountPersonsParametersQueryEndingBefore GetAccountPersonsParameters
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.<$> GetAccountPersonsParameters -> Maybe [Text]
getAccountPersonsParametersQueryExpand GetAccountPersonsParameters
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.<$> GetAccountPersonsParameters -> Maybe Int
getAccountPersonsParametersQueryLimit GetAccountPersonsParameters
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
"relationship") (GetAccountPersonsParametersQueryRelationship' -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (GetAccountPersonsParametersQueryRelationship' -> Value)
-> Maybe GetAccountPersonsParametersQueryRelationship'
-> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetAccountPersonsParameters
-> Maybe GetAccountPersonsParametersQueryRelationship'
getAccountPersonsParametersQueryRelationship GetAccountPersonsParameters
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
"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.<$> GetAccountPersonsParameters -> Maybe Text
getAccountPersonsParametersQueryStartingAfter GetAccountPersonsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True
]
)
data GetAccountPersonsParameters = GetAccountPersonsParameters
{
GetAccountPersonsParameters -> Maybe Text
getAccountPersonsParametersQueryEndingBefore :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
GetAccountPersonsParameters -> Maybe [Text]
getAccountPersonsParametersQueryExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
GetAccountPersonsParameters -> Maybe Int
getAccountPersonsParametersQueryLimit :: (GHC.Maybe.Maybe GHC.Types.Int),
GetAccountPersonsParameters
-> Maybe GetAccountPersonsParametersQueryRelationship'
getAccountPersonsParametersQueryRelationship :: (GHC.Maybe.Maybe GetAccountPersonsParametersQueryRelationship'),
GetAccountPersonsParameters -> Maybe Text
getAccountPersonsParametersQueryStartingAfter :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> GetAccountPersonsParameters -> ShowS
[GetAccountPersonsParameters] -> ShowS
GetAccountPersonsParameters -> String
(Int -> GetAccountPersonsParameters -> ShowS)
-> (GetAccountPersonsParameters -> String)
-> ([GetAccountPersonsParameters] -> ShowS)
-> Show GetAccountPersonsParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAccountPersonsParameters] -> ShowS
$cshowList :: [GetAccountPersonsParameters] -> ShowS
show :: GetAccountPersonsParameters -> String
$cshow :: GetAccountPersonsParameters -> String
showsPrec :: Int -> GetAccountPersonsParameters -> ShowS
$cshowsPrec :: Int -> GetAccountPersonsParameters -> ShowS
GHC.Show.Show,
GetAccountPersonsParameters -> GetAccountPersonsParameters -> Bool
(GetAccountPersonsParameters
-> GetAccountPersonsParameters -> Bool)
-> (GetAccountPersonsParameters
-> GetAccountPersonsParameters -> Bool)
-> Eq GetAccountPersonsParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAccountPersonsParameters -> GetAccountPersonsParameters -> Bool
$c/= :: GetAccountPersonsParameters -> GetAccountPersonsParameters -> Bool
== :: GetAccountPersonsParameters -> GetAccountPersonsParameters -> Bool
$c== :: GetAccountPersonsParameters -> GetAccountPersonsParameters -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON GetAccountPersonsParameters where
toJSON :: GetAccountPersonsParameters -> Value
toJSON GetAccountPersonsParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"queryEnding_before" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParameters -> Maybe Text
getAccountPersonsParametersQueryEndingBefore GetAccountPersonsParameters
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..= GetAccountPersonsParameters -> Maybe [Text]
getAccountPersonsParametersQueryExpand GetAccountPersonsParameters
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..= GetAccountPersonsParameters -> Maybe Int
getAccountPersonsParametersQueryLimit GetAccountPersonsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryRelationship" Text -> Maybe GetAccountPersonsParametersQueryRelationship' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParameters
-> Maybe GetAccountPersonsParametersQueryRelationship'
getAccountPersonsParametersQueryRelationship GetAccountPersonsParameters
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..= GetAccountPersonsParameters -> Maybe Text
getAccountPersonsParametersQueryStartingAfter GetAccountPersonsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: GetAccountPersonsParameters -> Encoding
toEncoding GetAccountPersonsParameters
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"queryEnding_before" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParameters -> Maybe Text
getAccountPersonsParametersQueryEndingBefore GetAccountPersonsParameters
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..= GetAccountPersonsParameters -> Maybe [Text]
getAccountPersonsParametersQueryExpand GetAccountPersonsParameters
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..= GetAccountPersonsParameters -> Maybe Int
getAccountPersonsParametersQueryLimit GetAccountPersonsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryRelationship" Text
-> Maybe GetAccountPersonsParametersQueryRelationship' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParameters
-> Maybe GetAccountPersonsParametersQueryRelationship'
getAccountPersonsParametersQueryRelationship GetAccountPersonsParameters
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..= GetAccountPersonsParameters -> Maybe Text
getAccountPersonsParametersQueryStartingAfter GetAccountPersonsParameters
obj)))))
instance Data.Aeson.Types.FromJSON.FromJSON GetAccountPersonsParameters where
parseJSON :: Value -> Parser GetAccountPersonsParameters
parseJSON = String
-> (Object -> Parser GetAccountPersonsParameters)
-> Value
-> Parser GetAccountPersonsParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetAccountPersonsParameters" (\Object
obj -> (((((Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe GetAccountPersonsParametersQueryRelationship'
-> Maybe Text
-> GetAccountPersonsParameters)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe GetAccountPersonsParametersQueryRelationship'
-> Maybe Text
-> GetAccountPersonsParameters)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe GetAccountPersonsParametersQueryRelationship'
-> Maybe Text
-> GetAccountPersonsParameters
GetAccountPersonsParameters Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe GetAccountPersonsParametersQueryRelationship'
-> Maybe Text
-> GetAccountPersonsParameters)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Int
-> Maybe GetAccountPersonsParametersQueryRelationship'
-> Maybe Text
-> GetAccountPersonsParameters)
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 GetAccountPersonsParametersQueryRelationship'
-> Maybe Text
-> GetAccountPersonsParameters)
-> Parser (Maybe [Text])
-> Parser
(Maybe Int
-> Maybe GetAccountPersonsParametersQueryRelationship'
-> Maybe Text
-> GetAccountPersonsParameters)
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 GetAccountPersonsParametersQueryRelationship'
-> Maybe Text
-> GetAccountPersonsParameters)
-> Parser (Maybe Int)
-> Parser
(Maybe GetAccountPersonsParametersQueryRelationship'
-> Maybe Text -> GetAccountPersonsParameters)
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 GetAccountPersonsParametersQueryRelationship'
-> Maybe Text -> GetAccountPersonsParameters)
-> Parser (Maybe GetAccountPersonsParametersQueryRelationship')
-> Parser (Maybe Text -> GetAccountPersonsParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe GetAccountPersonsParametersQueryRelationship')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"queryRelationship")) Parser (Maybe Text -> GetAccountPersonsParameters)
-> Parser (Maybe Text) -> Parser GetAccountPersonsParameters
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"))
mkGetAccountPersonsParameters :: GetAccountPersonsParameters
mkGetAccountPersonsParameters :: GetAccountPersonsParameters
mkGetAccountPersonsParameters =
GetAccountPersonsParameters :: Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe GetAccountPersonsParametersQueryRelationship'
-> Maybe Text
-> GetAccountPersonsParameters
GetAccountPersonsParameters
{ getAccountPersonsParametersQueryEndingBefore :: Maybe Text
getAccountPersonsParametersQueryEndingBefore = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
getAccountPersonsParametersQueryExpand :: Maybe [Text]
getAccountPersonsParametersQueryExpand = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
getAccountPersonsParametersQueryLimit :: Maybe Int
getAccountPersonsParametersQueryLimit = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
getAccountPersonsParametersQueryRelationship :: Maybe GetAccountPersonsParametersQueryRelationship'
getAccountPersonsParametersQueryRelationship = Maybe GetAccountPersonsParametersQueryRelationship'
forall a. Maybe a
GHC.Maybe.Nothing,
getAccountPersonsParametersQueryStartingAfter :: Maybe Text
getAccountPersonsParametersQueryStartingAfter = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data GetAccountPersonsParametersQueryRelationship' = GetAccountPersonsParametersQueryRelationship'
{
GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Director :: (GHC.Maybe.Maybe GHC.Types.Bool),
GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Executive :: (GHC.Maybe.Maybe GHC.Types.Bool),
GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Owner :: (GHC.Maybe.Maybe GHC.Types.Bool),
GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Representative :: (GHC.Maybe.Maybe GHC.Types.Bool)
}
deriving
( Int -> GetAccountPersonsParametersQueryRelationship' -> ShowS
[GetAccountPersonsParametersQueryRelationship'] -> ShowS
GetAccountPersonsParametersQueryRelationship' -> String
(Int -> GetAccountPersonsParametersQueryRelationship' -> ShowS)
-> (GetAccountPersonsParametersQueryRelationship' -> String)
-> ([GetAccountPersonsParametersQueryRelationship'] -> ShowS)
-> Show GetAccountPersonsParametersQueryRelationship'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAccountPersonsParametersQueryRelationship'] -> ShowS
$cshowList :: [GetAccountPersonsParametersQueryRelationship'] -> ShowS
show :: GetAccountPersonsParametersQueryRelationship' -> String
$cshow :: GetAccountPersonsParametersQueryRelationship' -> String
showsPrec :: Int -> GetAccountPersonsParametersQueryRelationship' -> ShowS
$cshowsPrec :: Int -> GetAccountPersonsParametersQueryRelationship' -> ShowS
GHC.Show.Show,
GetAccountPersonsParametersQueryRelationship'
-> GetAccountPersonsParametersQueryRelationship' -> Bool
(GetAccountPersonsParametersQueryRelationship'
-> GetAccountPersonsParametersQueryRelationship' -> Bool)
-> (GetAccountPersonsParametersQueryRelationship'
-> GetAccountPersonsParametersQueryRelationship' -> Bool)
-> Eq GetAccountPersonsParametersQueryRelationship'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAccountPersonsParametersQueryRelationship'
-> GetAccountPersonsParametersQueryRelationship' -> Bool
$c/= :: GetAccountPersonsParametersQueryRelationship'
-> GetAccountPersonsParametersQueryRelationship' -> Bool
== :: GetAccountPersonsParametersQueryRelationship'
-> GetAccountPersonsParametersQueryRelationship' -> Bool
$c== :: GetAccountPersonsParametersQueryRelationship'
-> GetAccountPersonsParametersQueryRelationship' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON GetAccountPersonsParametersQueryRelationship' where
toJSON :: GetAccountPersonsParametersQueryRelationship' -> Value
toJSON GetAccountPersonsParametersQueryRelationship'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"director" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Director GetAccountPersonsParametersQueryRelationship'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"executive" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Executive GetAccountPersonsParametersQueryRelationship'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"owner" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Owner GetAccountPersonsParametersQueryRelationship'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"representative" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Representative GetAccountPersonsParametersQueryRelationship'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: GetAccountPersonsParametersQueryRelationship' -> Encoding
toEncoding GetAccountPersonsParametersQueryRelationship'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"director" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Director GetAccountPersonsParametersQueryRelationship'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"executive" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Executive GetAccountPersonsParametersQueryRelationship'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"owner" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Owner GetAccountPersonsParametersQueryRelationship'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"representative" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsParametersQueryRelationship' -> Maybe Bool
getAccountPersonsParametersQueryRelationship'Representative GetAccountPersonsParametersQueryRelationship'
obj))))
instance Data.Aeson.Types.FromJSON.FromJSON GetAccountPersonsParametersQueryRelationship' where
parseJSON :: Value -> Parser GetAccountPersonsParametersQueryRelationship'
parseJSON = String
-> (Object -> Parser GetAccountPersonsParametersQueryRelationship')
-> Value
-> Parser GetAccountPersonsParametersQueryRelationship'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetAccountPersonsParametersQueryRelationship'" (\Object
obj -> ((((Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> GetAccountPersonsParametersQueryRelationship')
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> GetAccountPersonsParametersQueryRelationship')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> GetAccountPersonsParametersQueryRelationship'
GetAccountPersonsParametersQueryRelationship' Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> GetAccountPersonsParametersQueryRelationship')
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> GetAccountPersonsParametersQueryRelationship')
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
"director")) Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> GetAccountPersonsParametersQueryRelationship')
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool -> GetAccountPersonsParametersQueryRelationship')
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
"executive")) Parser
(Maybe Bool
-> Maybe Bool -> GetAccountPersonsParametersQueryRelationship')
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool -> GetAccountPersonsParametersQueryRelationship')
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
"owner")) Parser
(Maybe Bool -> GetAccountPersonsParametersQueryRelationship')
-> Parser (Maybe Bool)
-> Parser GetAccountPersonsParametersQueryRelationship'
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
"representative"))
mkGetAccountPersonsParametersQueryRelationship' :: GetAccountPersonsParametersQueryRelationship'
mkGetAccountPersonsParametersQueryRelationship' :: GetAccountPersonsParametersQueryRelationship'
mkGetAccountPersonsParametersQueryRelationship' =
GetAccountPersonsParametersQueryRelationship' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> GetAccountPersonsParametersQueryRelationship'
GetAccountPersonsParametersQueryRelationship'
{ getAccountPersonsParametersQueryRelationship'Director :: Maybe Bool
getAccountPersonsParametersQueryRelationship'Director = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
getAccountPersonsParametersQueryRelationship'Executive :: Maybe Bool
getAccountPersonsParametersQueryRelationship'Executive = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
getAccountPersonsParametersQueryRelationship'Owner :: Maybe Bool
getAccountPersonsParametersQueryRelationship'Owner = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
getAccountPersonsParametersQueryRelationship'Representative :: Maybe Bool
getAccountPersonsParametersQueryRelationship'Representative = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
}
data GetAccountPersonsResponse
=
GetAccountPersonsResponseError GHC.Base.String
|
GetAccountPersonsResponse200 GetAccountPersonsResponseBody200
|
GetAccountPersonsResponseDefault Error
deriving (Int -> GetAccountPersonsResponse -> ShowS
[GetAccountPersonsResponse] -> ShowS
GetAccountPersonsResponse -> String
(Int -> GetAccountPersonsResponse -> ShowS)
-> (GetAccountPersonsResponse -> String)
-> ([GetAccountPersonsResponse] -> ShowS)
-> Show GetAccountPersonsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAccountPersonsResponse] -> ShowS
$cshowList :: [GetAccountPersonsResponse] -> ShowS
show :: GetAccountPersonsResponse -> String
$cshow :: GetAccountPersonsResponse -> String
showsPrec :: Int -> GetAccountPersonsResponse -> ShowS
$cshowsPrec :: Int -> GetAccountPersonsResponse -> ShowS
GHC.Show.Show, GetAccountPersonsResponse -> GetAccountPersonsResponse -> Bool
(GetAccountPersonsResponse -> GetAccountPersonsResponse -> Bool)
-> (GetAccountPersonsResponse -> GetAccountPersonsResponse -> Bool)
-> Eq GetAccountPersonsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAccountPersonsResponse -> GetAccountPersonsResponse -> Bool
$c/= :: GetAccountPersonsResponse -> GetAccountPersonsResponse -> Bool
== :: GetAccountPersonsResponse -> GetAccountPersonsResponse -> Bool
$c== :: GetAccountPersonsResponse -> GetAccountPersonsResponse -> Bool
GHC.Classes.Eq)
data GetAccountPersonsResponseBody200 = GetAccountPersonsResponseBody200
{
GetAccountPersonsResponseBody200 -> [Person]
getAccountPersonsResponseBody200Data :: ([Person]),
GetAccountPersonsResponseBody200 -> Bool
getAccountPersonsResponseBody200HasMore :: GHC.Types.Bool,
GetAccountPersonsResponseBody200 -> Text
getAccountPersonsResponseBody200Url :: Data.Text.Internal.Text
}
deriving
( Int -> GetAccountPersonsResponseBody200 -> ShowS
[GetAccountPersonsResponseBody200] -> ShowS
GetAccountPersonsResponseBody200 -> String
(Int -> GetAccountPersonsResponseBody200 -> ShowS)
-> (GetAccountPersonsResponseBody200 -> String)
-> ([GetAccountPersonsResponseBody200] -> ShowS)
-> Show GetAccountPersonsResponseBody200
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAccountPersonsResponseBody200] -> ShowS
$cshowList :: [GetAccountPersonsResponseBody200] -> ShowS
show :: GetAccountPersonsResponseBody200 -> String
$cshow :: GetAccountPersonsResponseBody200 -> String
showsPrec :: Int -> GetAccountPersonsResponseBody200 -> ShowS
$cshowsPrec :: Int -> GetAccountPersonsResponseBody200 -> ShowS
GHC.Show.Show,
GetAccountPersonsResponseBody200
-> GetAccountPersonsResponseBody200 -> Bool
(GetAccountPersonsResponseBody200
-> GetAccountPersonsResponseBody200 -> Bool)
-> (GetAccountPersonsResponseBody200
-> GetAccountPersonsResponseBody200 -> Bool)
-> Eq GetAccountPersonsResponseBody200
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAccountPersonsResponseBody200
-> GetAccountPersonsResponseBody200 -> Bool
$c/= :: GetAccountPersonsResponseBody200
-> GetAccountPersonsResponseBody200 -> Bool
== :: GetAccountPersonsResponseBody200
-> GetAccountPersonsResponseBody200 -> Bool
$c== :: GetAccountPersonsResponseBody200
-> GetAccountPersonsResponseBody200 -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON GetAccountPersonsResponseBody200 where
toJSON :: GetAccountPersonsResponseBody200 -> Value
toJSON GetAccountPersonsResponseBody200
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"data" Text -> [Person] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsResponseBody200 -> [Person]
getAccountPersonsResponseBody200Data GetAccountPersonsResponseBody200
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..= GetAccountPersonsResponseBody200 -> Bool
getAccountPersonsResponseBody200HasMore GetAccountPersonsResponseBody200
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..= GetAccountPersonsResponseBody200 -> Text
getAccountPersonsResponseBody200Url GetAccountPersonsResponseBody200
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 :: GetAccountPersonsResponseBody200 -> Encoding
toEncoding GetAccountPersonsResponseBody200
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"data" Text -> [Person] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetAccountPersonsResponseBody200 -> [Person]
getAccountPersonsResponseBody200Data GetAccountPersonsResponseBody200
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..= GetAccountPersonsResponseBody200 -> Bool
getAccountPersonsResponseBody200HasMore GetAccountPersonsResponseBody200
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..= GetAccountPersonsResponseBody200 -> Text
getAccountPersonsResponseBody200Url GetAccountPersonsResponseBody200
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 GetAccountPersonsResponseBody200 where
parseJSON :: Value -> Parser GetAccountPersonsResponseBody200
parseJSON = String
-> (Object -> Parser GetAccountPersonsResponseBody200)
-> Value
-> Parser GetAccountPersonsResponseBody200
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetAccountPersonsResponseBody200" (\Object
obj -> ((([Person] -> Bool -> Text -> GetAccountPersonsResponseBody200)
-> Parser
([Person] -> Bool -> Text -> GetAccountPersonsResponseBody200)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure [Person] -> Bool -> Text -> GetAccountPersonsResponseBody200
GetAccountPersonsResponseBody200 Parser
([Person] -> Bool -> Text -> GetAccountPersonsResponseBody200)
-> Parser [Person]
-> Parser (Bool -> Text -> GetAccountPersonsResponseBody200)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [Person]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"data")) Parser (Bool -> Text -> GetAccountPersonsResponseBody200)
-> Parser Bool -> Parser (Text -> GetAccountPersonsResponseBody200)
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 -> GetAccountPersonsResponseBody200)
-> Parser Text -> Parser GetAccountPersonsResponseBody200
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"))
mkGetAccountPersonsResponseBody200 ::
[Person] ->
GHC.Types.Bool ->
Data.Text.Internal.Text ->
GetAccountPersonsResponseBody200
mkGetAccountPersonsResponseBody200 :: [Person] -> Bool -> Text -> GetAccountPersonsResponseBody200
mkGetAccountPersonsResponseBody200 [Person]
getAccountPersonsResponseBody200Data Bool
getAccountPersonsResponseBody200HasMore Text
getAccountPersonsResponseBody200Url =
GetAccountPersonsResponseBody200 :: [Person] -> Bool -> Text -> GetAccountPersonsResponseBody200
GetAccountPersonsResponseBody200
{ getAccountPersonsResponseBody200Data :: [Person]
getAccountPersonsResponseBody200Data = [Person]
getAccountPersonsResponseBody200Data,
getAccountPersonsResponseBody200HasMore :: Bool
getAccountPersonsResponseBody200HasMore = Bool
getAccountPersonsResponseBody200HasMore,
getAccountPersonsResponseBody200Url :: Text
getAccountPersonsResponseBody200Url = Text
getAccountPersonsResponseBody200Url
}