{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Operations.PostAccountBankAccountsId 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
postAccountBankAccountsId ::
forall m.
StripeAPI.Common.MonadHTTP m =>
Data.Text.Internal.Text ->
GHC.Maybe.Maybe PostAccountBankAccountsIdRequestBody ->
StripeAPI.Common.StripeT m (Network.HTTP.Client.Types.Response PostAccountBankAccountsIdResponse)
postAccountBankAccountsId :: Text
-> Maybe PostAccountBankAccountsIdRequestBody
-> StripeT m (Response PostAccountBankAccountsIdResponse)
postAccountBankAccountsId
Text
id
Maybe PostAccountBankAccountsIdRequestBody
body =
(Response ByteString -> Response PostAccountBankAccountsIdResponse)
-> StripeT m (Response ByteString)
-> StripeT m (Response PostAccountBankAccountsIdResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_0 ->
(ByteString -> PostAccountBankAccountsIdResponse)
-> Response ByteString
-> Response PostAccountBankAccountsIdResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> PostAccountBankAccountsIdResponse)
-> (PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse)
-> Either String PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> PostAccountBankAccountsIdResponse
PostAccountBankAccountsIdResponseError PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse
forall a. a -> a
GHC.Base.id
(Either String PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse)
-> (ByteString -> Either String PostAccountBankAccountsIdResponse)
-> ByteString
-> PostAccountBankAccountsIdResponse
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) ->
ExternalAccount -> PostAccountBankAccountsIdResponse
PostAccountBankAccountsIdResponse200
(ExternalAccount -> PostAccountBankAccountsIdResponse)
-> Either String ExternalAccount
-> Either String PostAccountBankAccountsIdResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String ExternalAccount
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
ExternalAccount
)
| 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 -> PostAccountBankAccountsIdResponse
PostAccountBankAccountsIdResponseDefault
(Error -> PostAccountBankAccountsIdResponse)
-> Either String Error
-> Either String PostAccountBankAccountsIdResponse
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 PostAccountBankAccountsIdResponse
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]
-> Maybe PostAccountBankAccountsIdRequestBody
-> RequestBodyEncoding
-> StripeT m (Response ByteString)
forall (m :: * -> *) body.
(MonadHTTP m, ToJSON body) =>
Text
-> Text
-> [QueryParameter]
-> Maybe body
-> RequestBodyEncoding
-> StripeT m (Response ByteString)
StripeAPI.Common.doBodyCallWithConfigurationM (Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.pack String
"POST") (String -> Text
Data.Text.pack (String
"/v1/account/bank_accounts/" String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ (ByteString -> String
Data.ByteString.Char8.unpack (Bool -> ByteString -> ByteString
Network.HTTP.Types.URI.urlEncode Bool
GHC.Types.True (ByteString -> ByteString) -> ByteString -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ (String -> ByteString
Data.ByteString.Char8.pack (String -> ByteString) -> String -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> String
forall a. StringifyModel a => a -> String
StripeAPI.Common.stringifyModel Text
id)) String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ String
""))) [QueryParameter]
forall a. Monoid a => a
GHC.Base.mempty Maybe PostAccountBankAccountsIdRequestBody
body RequestBodyEncoding
StripeAPI.Common.RequestBodyEncodingFormData)
data PostAccountBankAccountsIdRequestBody = PostAccountBankAccountsIdRequestBody
{
PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAccountHolderName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountBankAccountsIdRequestBody
-> Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
postAccountBankAccountsIdRequestBodyAccountHolderType :: (GHC.Maybe.Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'),
PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressCity :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressLine1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressLine2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressState :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressZip :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountBankAccountsIdRequestBody -> Maybe Bool
postAccountBankAccountsIdRequestBodyDefaultForCurrency :: (GHC.Maybe.Maybe GHC.Types.Bool),
PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyExpMonth :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyExpYear :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountBankAccountsIdRequestBody -> Maybe [Text]
postAccountBankAccountsIdRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
PostAccountBankAccountsIdRequestBody
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
postAccountBankAccountsIdRequestBodyMetadata :: (GHC.Maybe.Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants),
PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyName :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> PostAccountBankAccountsIdRequestBody -> String -> String
[PostAccountBankAccountsIdRequestBody] -> String -> String
PostAccountBankAccountsIdRequestBody -> String
(Int -> PostAccountBankAccountsIdRequestBody -> String -> String)
-> (PostAccountBankAccountsIdRequestBody -> String)
-> ([PostAccountBankAccountsIdRequestBody] -> String -> String)
-> Show PostAccountBankAccountsIdRequestBody
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostAccountBankAccountsIdRequestBody] -> String -> String
$cshowList :: [PostAccountBankAccountsIdRequestBody] -> String -> String
show :: PostAccountBankAccountsIdRequestBody -> String
$cshow :: PostAccountBankAccountsIdRequestBody -> String
showsPrec :: Int -> PostAccountBankAccountsIdRequestBody -> String -> String
$cshowsPrec :: Int -> PostAccountBankAccountsIdRequestBody -> String -> String
GHC.Show.Show,
PostAccountBankAccountsIdRequestBody
-> PostAccountBankAccountsIdRequestBody -> Bool
(PostAccountBankAccountsIdRequestBody
-> PostAccountBankAccountsIdRequestBody -> Bool)
-> (PostAccountBankAccountsIdRequestBody
-> PostAccountBankAccountsIdRequestBody -> Bool)
-> Eq PostAccountBankAccountsIdRequestBody
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostAccountBankAccountsIdRequestBody
-> PostAccountBankAccountsIdRequestBody -> Bool
$c/= :: PostAccountBankAccountsIdRequestBody
-> PostAccountBankAccountsIdRequestBody -> Bool
== :: PostAccountBankAccountsIdRequestBody
-> PostAccountBankAccountsIdRequestBody -> Bool
$c== :: PostAccountBankAccountsIdRequestBody
-> PostAccountBankAccountsIdRequestBody -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostAccountBankAccountsIdRequestBody where
toJSON :: PostAccountBankAccountsIdRequestBody -> Value
toJSON PostAccountBankAccountsIdRequestBody
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"account_holder_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAccountHolderName PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"account_holder_type" Text
-> Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody
-> Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
postAccountBankAccountsIdRequestBodyAccountHolderType PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_city" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressCity PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressCountry PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_line1" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressLine1 PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_line2" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressLine2 PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_state" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressState PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_zip" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressZip PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"default_for_currency" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Bool
postAccountBankAccountsIdRequestBodyDefaultForCurrency PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exp_month" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyExpMonth PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exp_year" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyExpYear PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"expand" Text -> Maybe [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe [Text]
postAccountBankAccountsIdRequestBodyExpand PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
postAccountBankAccountsIdRequestBodyMetadata PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyName PostAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PostAccountBankAccountsIdRequestBody -> Encoding
toEncoding PostAccountBankAccountsIdRequestBody
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"account_holder_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAccountHolderName PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"account_holder_type" Text
-> Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody
-> Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
postAccountBankAccountsIdRequestBodyAccountHolderType PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_city" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressCity PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressCountry PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_line1" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressLine1 PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_line2" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressLine2 PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_state" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressState PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_zip" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyAddressZip PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"default_for_currency" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Bool
postAccountBankAccountsIdRequestBodyDefaultForCurrency PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exp_month" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyExpMonth PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exp_year" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyExpYear PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"expand" Text -> Maybe [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe [Text]
postAccountBankAccountsIdRequestBodyExpand PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"metadata" Text
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
postAccountBankAccountsIdRequestBodyMetadata PostAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountBankAccountsIdRequestBody -> Maybe Text
postAccountBankAccountsIdRequestBodyName PostAccountBankAccountsIdRequestBody
obj))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON PostAccountBankAccountsIdRequestBody where
parseJSON :: Value -> Parser PostAccountBankAccountsIdRequestBody
parseJSON = String
-> (Object -> Parser PostAccountBankAccountsIdRequestBody)
-> Value
-> Parser PostAccountBankAccountsIdRequestBody
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PostAccountBankAccountsIdRequestBody" (\Object
obj -> ((((((((((((((Maybe Text
-> Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser
(Maybe Text
-> Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody
PostAccountBankAccountsIdRequestBody Parser
(Maybe Text
-> Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
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
"account_holder_name")) Parser
(Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser
(Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType')
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account_holder_type")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
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
"address_city")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
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
"address_country")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
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
"address_line1")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
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
"address_line2")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
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
"address_state")) Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
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
"address_zip")) Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
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
"default_for_currency")) Parser
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
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
"exp_month")) Parser
(Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
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
"exp_year")) Parser
(Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe [Text])
-> Parser
(Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text -> PostAccountBankAccountsIdRequestBody)
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
"expand")) Parser
(Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text -> PostAccountBankAccountsIdRequestBody)
-> Parser
(Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants)
-> Parser (Maybe Text -> PostAccountBankAccountsIdRequestBody)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"metadata")) Parser (Maybe Text -> PostAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser PostAccountBankAccountsIdRequestBody
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
"name"))
mkPostAccountBankAccountsIdRequestBody :: PostAccountBankAccountsIdRequestBody
mkPostAccountBankAccountsIdRequestBody :: PostAccountBankAccountsIdRequestBody
mkPostAccountBankAccountsIdRequestBody =
PostAccountBankAccountsIdRequestBody :: Maybe Text
-> Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountBankAccountsIdRequestBody
PostAccountBankAccountsIdRequestBody
{ postAccountBankAccountsIdRequestBodyAccountHolderName :: Maybe Text
postAccountBankAccountsIdRequestBodyAccountHolderName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyAccountHolderType :: Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
postAccountBankAccountsIdRequestBodyAccountHolderType = Maybe PostAccountBankAccountsIdRequestBodyAccountHolderType'
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyAddressCity :: Maybe Text
postAccountBankAccountsIdRequestBodyAddressCity = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyAddressCountry :: Maybe Text
postAccountBankAccountsIdRequestBodyAddressCountry = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyAddressLine1 :: Maybe Text
postAccountBankAccountsIdRequestBodyAddressLine1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyAddressLine2 :: Maybe Text
postAccountBankAccountsIdRequestBodyAddressLine2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyAddressState :: Maybe Text
postAccountBankAccountsIdRequestBodyAddressState = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyAddressZip :: Maybe Text
postAccountBankAccountsIdRequestBodyAddressZip = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyDefaultForCurrency :: Maybe Bool
postAccountBankAccountsIdRequestBodyDefaultForCurrency = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyExpMonth :: Maybe Text
postAccountBankAccountsIdRequestBodyExpMonth = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyExpYear :: Maybe Text
postAccountBankAccountsIdRequestBodyExpYear = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyExpand :: Maybe [Text]
postAccountBankAccountsIdRequestBodyExpand = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyMetadata :: Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
postAccountBankAccountsIdRequestBodyMetadata = Maybe PostAccountBankAccountsIdRequestBodyMetadata'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountBankAccountsIdRequestBodyName :: Maybe Text
postAccountBankAccountsIdRequestBodyName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data PostAccountBankAccountsIdRequestBodyAccountHolderType'
=
PostAccountBankAccountsIdRequestBodyAccountHolderType'Other Data.Aeson.Types.Internal.Value
|
PostAccountBankAccountsIdRequestBodyAccountHolderType'Typed Data.Text.Internal.Text
|
PostAccountBankAccountsIdRequestBodyAccountHolderType'EnumEmptyString
|
PostAccountBankAccountsIdRequestBodyAccountHolderType'EnumCompany
|
PostAccountBankAccountsIdRequestBodyAccountHolderType'EnumIndividual
deriving (Int
-> PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
-> String
[PostAccountBankAccountsIdRequestBodyAccountHolderType']
-> String -> String
PostAccountBankAccountsIdRequestBodyAccountHolderType' -> String
(Int
-> PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
-> String)
-> (PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> String)
-> ([PostAccountBankAccountsIdRequestBodyAccountHolderType']
-> String -> String)
-> Show PostAccountBankAccountsIdRequestBodyAccountHolderType'
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostAccountBankAccountsIdRequestBodyAccountHolderType']
-> String -> String
$cshowList :: [PostAccountBankAccountsIdRequestBodyAccountHolderType']
-> String -> String
show :: PostAccountBankAccountsIdRequestBodyAccountHolderType' -> String
$cshow :: PostAccountBankAccountsIdRequestBodyAccountHolderType' -> String
showsPrec :: Int
-> PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
-> String
$cshowsPrec :: Int
-> PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
-> String
GHC.Show.Show, PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountBankAccountsIdRequestBodyAccountHolderType' -> Bool
(PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountBankAccountsIdRequestBodyAccountHolderType' -> Bool)
-> (PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountBankAccountsIdRequestBodyAccountHolderType' -> Bool)
-> Eq PostAccountBankAccountsIdRequestBodyAccountHolderType'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountBankAccountsIdRequestBodyAccountHolderType' -> Bool
$c/= :: PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountBankAccountsIdRequestBodyAccountHolderType' -> Bool
== :: PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountBankAccountsIdRequestBodyAccountHolderType' -> Bool
$c== :: PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountBankAccountsIdRequestBodyAccountHolderType' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostAccountBankAccountsIdRequestBodyAccountHolderType' where
toJSON :: PostAccountBankAccountsIdRequestBodyAccountHolderType' -> Value
toJSON (PostAccountBankAccountsIdRequestBodyAccountHolderType'Other Value
val) = Value
val
toJSON (PostAccountBankAccountsIdRequestBodyAccountHolderType'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (PostAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountBankAccountsIdRequestBodyAccountHolderType'EnumEmptyString) = Value
""
toJSON (PostAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountBankAccountsIdRequestBodyAccountHolderType'EnumCompany) = Value
"company"
toJSON (PostAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountBankAccountsIdRequestBodyAccountHolderType'EnumIndividual) = Value
"individual"
instance Data.Aeson.Types.FromJSON.FromJSON PostAccountBankAccountsIdRequestBodyAccountHolderType' where
parseJSON :: Value
-> Parser PostAccountBankAccountsIdRequestBodyAccountHolderType'
parseJSON Value
val =
PostAccountBankAccountsIdRequestBodyAccountHolderType'
-> Parser PostAccountBankAccountsIdRequestBodyAccountHolderType'
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
"" -> PostAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountBankAccountsIdRequestBodyAccountHolderType'EnumEmptyString
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"company" -> PostAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountBankAccountsIdRequestBodyAccountHolderType'EnumCompany
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"individual" -> PostAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountBankAccountsIdRequestBodyAccountHolderType'EnumIndividual
| Bool
GHC.Base.otherwise -> Value -> PostAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountBankAccountsIdRequestBodyAccountHolderType'Other Value
val
)
data PostAccountBankAccountsIdRequestBodyMetadata'Variants
=
PostAccountBankAccountsIdRequestBodyMetadata'EmptyString
| PostAccountBankAccountsIdRequestBodyMetadata'Object Data.Aeson.Types.Internal.Object
deriving (Int
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
-> String
[PostAccountBankAccountsIdRequestBodyMetadata'Variants]
-> String -> String
PostAccountBankAccountsIdRequestBodyMetadata'Variants -> String
(Int
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
-> String)
-> (PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> String)
-> ([PostAccountBankAccountsIdRequestBodyMetadata'Variants]
-> String -> String)
-> Show PostAccountBankAccountsIdRequestBodyMetadata'Variants
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostAccountBankAccountsIdRequestBodyMetadata'Variants]
-> String -> String
$cshowList :: [PostAccountBankAccountsIdRequestBodyMetadata'Variants]
-> String -> String
show :: PostAccountBankAccountsIdRequestBodyMetadata'Variants -> String
$cshow :: PostAccountBankAccountsIdRequestBodyMetadata'Variants -> String
showsPrec :: Int
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
-> String
$cshowsPrec :: Int
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
-> String
GHC.Show.Show, PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants -> Bool
(PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants -> Bool)
-> (PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants -> Bool)
-> Eq PostAccountBankAccountsIdRequestBodyMetadata'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants -> Bool
$c/= :: PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants -> Bool
== :: PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants -> Bool
$c== :: PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountBankAccountsIdRequestBodyMetadata'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostAccountBankAccountsIdRequestBodyMetadata'Variants where
toJSON :: PostAccountBankAccountsIdRequestBodyMetadata'Variants -> Value
toJSON (PostAccountBankAccountsIdRequestBodyMetadata'Object Object
a) = Object -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Object
a
toJSON (PostAccountBankAccountsIdRequestBodyMetadata'Variants
PostAccountBankAccountsIdRequestBodyMetadata'EmptyString) = Value
""
instance Data.Aeson.Types.FromJSON.FromJSON PostAccountBankAccountsIdRequestBodyMetadata'Variants where
parseJSON :: Value
-> Parser PostAccountBankAccountsIdRequestBodyMetadata'Variants
parseJSON Value
val =
if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"" -> PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Parser PostAccountBankAccountsIdRequestBodyMetadata'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure PostAccountBankAccountsIdRequestBodyMetadata'Variants
PostAccountBankAccountsIdRequestBodyMetadata'EmptyString
| Bool
GHC.Base.otherwise -> case (Object -> PostAccountBankAccountsIdRequestBodyMetadata'Variants
PostAccountBankAccountsIdRequestBodyMetadata'Object (Object -> PostAccountBankAccountsIdRequestBodyMetadata'Variants)
-> Result Object
-> Result PostAccountBankAccountsIdRequestBodyMetadata'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Object
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Result PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Result PostAccountBankAccountsIdRequestBodyMetadata'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result PostAccountBankAccountsIdRequestBodyMetadata'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched" of
Data.Aeson.Types.Internal.Success PostAccountBankAccountsIdRequestBodyMetadata'Variants
a -> PostAccountBankAccountsIdRequestBodyMetadata'Variants
-> Parser PostAccountBankAccountsIdRequestBodyMetadata'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure PostAccountBankAccountsIdRequestBodyMetadata'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String
-> Parser PostAccountBankAccountsIdRequestBodyMetadata'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data PostAccountBankAccountsIdResponse
=
PostAccountBankAccountsIdResponseError GHC.Base.String
|
PostAccountBankAccountsIdResponse200 ExternalAccount
|
PostAccountBankAccountsIdResponseDefault Error
deriving (Int -> PostAccountBankAccountsIdResponse -> String -> String
[PostAccountBankAccountsIdResponse] -> String -> String
PostAccountBankAccountsIdResponse -> String
(Int -> PostAccountBankAccountsIdResponse -> String -> String)
-> (PostAccountBankAccountsIdResponse -> String)
-> ([PostAccountBankAccountsIdResponse] -> String -> String)
-> Show PostAccountBankAccountsIdResponse
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostAccountBankAccountsIdResponse] -> String -> String
$cshowList :: [PostAccountBankAccountsIdResponse] -> String -> String
show :: PostAccountBankAccountsIdResponse -> String
$cshow :: PostAccountBankAccountsIdResponse -> String
showsPrec :: Int -> PostAccountBankAccountsIdResponse -> String -> String
$cshowsPrec :: Int -> PostAccountBankAccountsIdResponse -> String -> String
GHC.Show.Show, PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse -> Bool
(PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse -> Bool)
-> (PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse -> Bool)
-> Eq PostAccountBankAccountsIdResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse -> Bool
$c/= :: PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse -> Bool
== :: PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse -> Bool
$c== :: PostAccountBankAccountsIdResponse
-> PostAccountBankAccountsIdResponse -> Bool
GHC.Classes.Eq)