{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Operations.PostAccountsAccountBankAccountsId 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
postAccountsAccountBankAccountsId ::
forall m.
StripeAPI.Common.MonadHTTP m =>
PostAccountsAccountBankAccountsIdParameters ->
GHC.Maybe.Maybe PostAccountsAccountBankAccountsIdRequestBody ->
StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response PostAccountsAccountBankAccountsIdResponse)
postAccountsAccountBankAccountsId :: PostAccountsAccountBankAccountsIdParameters
-> Maybe PostAccountsAccountBankAccountsIdRequestBody
-> ClientT m (Response PostAccountsAccountBankAccountsIdResponse)
postAccountsAccountBankAccountsId
PostAccountsAccountBankAccountsIdParameters
parameters
Maybe PostAccountsAccountBankAccountsIdRequestBody
body =
(Response ByteString
-> Response PostAccountsAccountBankAccountsIdResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response PostAccountsAccountBankAccountsIdResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_0 ->
(ByteString -> PostAccountsAccountBankAccountsIdResponse)
-> Response ByteString
-> Response PostAccountsAccountBankAccountsIdResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> PostAccountsAccountBankAccountsIdResponse)
-> (PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse)
-> Either String PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> PostAccountsAccountBankAccountsIdResponse
PostAccountsAccountBankAccountsIdResponseError PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse
forall a. a -> a
GHC.Base.id
(Either String PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse)
-> (ByteString
-> Either String PostAccountsAccountBankAccountsIdResponse)
-> ByteString
-> PostAccountsAccountBankAccountsIdResponse
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 -> PostAccountsAccountBankAccountsIdResponse
PostAccountsAccountBankAccountsIdResponse200
(ExternalAccount -> PostAccountsAccountBankAccountsIdResponse)
-> Either String ExternalAccount
-> Either String PostAccountsAccountBankAccountsIdResponse
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 -> PostAccountsAccountBankAccountsIdResponse
PostAccountsAccountBankAccountsIdResponseDefault
(Error -> PostAccountsAccountBankAccountsIdResponse)
-> Either String Error
-> Either String PostAccountsAccountBankAccountsIdResponse
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 PostAccountsAccountBankAccountsIdResponse
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 PostAccountsAccountBankAccountsIdRequestBody
-> RequestBodyEncoding
-> ClientT m (Response ByteString)
forall (m :: * -> *) body.
(MonadHTTP m, ToJSON body) =>
Text
-> Text
-> [QueryParameter]
-> Maybe body
-> RequestBodyEncoding
-> ClientT 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/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 (PostAccountsAccountBankAccountsIdParameters -> Text
postAccountsAccountBankAccountsIdParametersPathAccount PostAccountsAccountBankAccountsIdParameters
parameters))) String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ (String
"/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 (PostAccountsAccountBankAccountsIdParameters -> Text
postAccountsAccountBankAccountsIdParametersPathId PostAccountsAccountBankAccountsIdParameters
parameters))) String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ String
""))))) [QueryParameter]
forall a. Monoid a => a
GHC.Base.mempty Maybe PostAccountsAccountBankAccountsIdRequestBody
body RequestBodyEncoding
StripeAPI.Common.RequestBodyEncodingFormData)
data PostAccountsAccountBankAccountsIdParameters = PostAccountsAccountBankAccountsIdParameters
{
PostAccountsAccountBankAccountsIdParameters -> Text
postAccountsAccountBankAccountsIdParametersPathAccount :: Data.Text.Internal.Text,
PostAccountsAccountBankAccountsIdParameters -> Text
postAccountsAccountBankAccountsIdParametersPathId :: Data.Text.Internal.Text
}
deriving
( Int
-> PostAccountsAccountBankAccountsIdParameters -> String -> String
[PostAccountsAccountBankAccountsIdParameters] -> String -> String
PostAccountsAccountBankAccountsIdParameters -> String
(Int
-> PostAccountsAccountBankAccountsIdParameters -> String -> String)
-> (PostAccountsAccountBankAccountsIdParameters -> String)
-> ([PostAccountsAccountBankAccountsIdParameters]
-> String -> String)
-> Show PostAccountsAccountBankAccountsIdParameters
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostAccountsAccountBankAccountsIdParameters] -> String -> String
$cshowList :: [PostAccountsAccountBankAccountsIdParameters] -> String -> String
show :: PostAccountsAccountBankAccountsIdParameters -> String
$cshow :: PostAccountsAccountBankAccountsIdParameters -> String
showsPrec :: Int
-> PostAccountsAccountBankAccountsIdParameters -> String -> String
$cshowsPrec :: Int
-> PostAccountsAccountBankAccountsIdParameters -> String -> String
GHC.Show.Show,
PostAccountsAccountBankAccountsIdParameters
-> PostAccountsAccountBankAccountsIdParameters -> Bool
(PostAccountsAccountBankAccountsIdParameters
-> PostAccountsAccountBankAccountsIdParameters -> Bool)
-> (PostAccountsAccountBankAccountsIdParameters
-> PostAccountsAccountBankAccountsIdParameters -> Bool)
-> Eq PostAccountsAccountBankAccountsIdParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostAccountsAccountBankAccountsIdParameters
-> PostAccountsAccountBankAccountsIdParameters -> Bool
$c/= :: PostAccountsAccountBankAccountsIdParameters
-> PostAccountsAccountBankAccountsIdParameters -> Bool
== :: PostAccountsAccountBankAccountsIdParameters
-> PostAccountsAccountBankAccountsIdParameters -> Bool
$c== :: PostAccountsAccountBankAccountsIdParameters
-> PostAccountsAccountBankAccountsIdParameters -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostAccountsAccountBankAccountsIdParameters where
toJSON :: PostAccountsAccountBankAccountsIdParameters -> Value
toJSON PostAccountsAccountBankAccountsIdParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"pathAccount" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountsAccountBankAccountsIdParameters -> Text
postAccountsAccountBankAccountsIdParametersPathAccount PostAccountsAccountBankAccountsIdParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"pathId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountsAccountBankAccountsIdParameters -> Text
postAccountsAccountBankAccountsIdParametersPathId PostAccountsAccountBankAccountsIdParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PostAccountsAccountBankAccountsIdParameters -> Encoding
toEncoding PostAccountsAccountBankAccountsIdParameters
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"pathAccount" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountsAccountBankAccountsIdParameters -> Text
postAccountsAccountBankAccountsIdParametersPathAccount PostAccountsAccountBankAccountsIdParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"pathId" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountsAccountBankAccountsIdParameters -> Text
postAccountsAccountBankAccountsIdParametersPathId PostAccountsAccountBankAccountsIdParameters
obj))
instance Data.Aeson.Types.FromJSON.FromJSON PostAccountsAccountBankAccountsIdParameters where
parseJSON :: Value -> Parser PostAccountsAccountBankAccountsIdParameters
parseJSON = String
-> (Object -> Parser PostAccountsAccountBankAccountsIdParameters)
-> Value
-> Parser PostAccountsAccountBankAccountsIdParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PostAccountsAccountBankAccountsIdParameters" (\Object
obj -> ((Text -> Text -> PostAccountsAccountBankAccountsIdParameters)
-> Parser
(Text -> Text -> PostAccountsAccountBankAccountsIdParameters)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Text -> Text -> PostAccountsAccountBankAccountsIdParameters
PostAccountsAccountBankAccountsIdParameters Parser
(Text -> Text -> PostAccountsAccountBankAccountsIdParameters)
-> Parser Text
-> Parser (Text -> PostAccountsAccountBankAccountsIdParameters)
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
"pathAccount")) Parser (Text -> PostAccountsAccountBankAccountsIdParameters)
-> Parser Text
-> Parser PostAccountsAccountBankAccountsIdParameters
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
"pathId"))
mkPostAccountsAccountBankAccountsIdParameters ::
Data.Text.Internal.Text ->
Data.Text.Internal.Text ->
PostAccountsAccountBankAccountsIdParameters
mkPostAccountsAccountBankAccountsIdParameters :: Text -> Text -> PostAccountsAccountBankAccountsIdParameters
mkPostAccountsAccountBankAccountsIdParameters Text
postAccountsAccountBankAccountsIdParametersPathAccount Text
postAccountsAccountBankAccountsIdParametersPathId =
PostAccountsAccountBankAccountsIdParameters :: Text -> Text -> PostAccountsAccountBankAccountsIdParameters
PostAccountsAccountBankAccountsIdParameters
{ postAccountsAccountBankAccountsIdParametersPathAccount :: Text
postAccountsAccountBankAccountsIdParametersPathAccount = Text
postAccountsAccountBankAccountsIdParametersPathAccount,
postAccountsAccountBankAccountsIdParametersPathId :: Text
postAccountsAccountBankAccountsIdParametersPathId = Text
postAccountsAccountBankAccountsIdParametersPathId
}
data PostAccountsAccountBankAccountsIdRequestBody = PostAccountsAccountBankAccountsIdRequestBody
{
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAccountHolderName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountsAccountBankAccountsIdRequestBody
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
postAccountsAccountBankAccountsIdRequestBodyAccountHolderType :: (GHC.Maybe.Maybe PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressCity :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressCountry :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressLine1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressLine2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressState :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressZip :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Bool
postAccountsAccountBankAccountsIdRequestBodyDefaultForCurrency :: (GHC.Maybe.Maybe GHC.Types.Bool),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyExpMonth :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyExpYear :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe [Text]
postAccountsAccountBankAccountsIdRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
PostAccountsAccountBankAccountsIdRequestBody
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
postAccountsAccountBankAccountsIdRequestBodyMetadata :: (GHC.Maybe.Maybe PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants),
PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyName :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int
-> PostAccountsAccountBankAccountsIdRequestBody -> String -> String
[PostAccountsAccountBankAccountsIdRequestBody] -> String -> String
PostAccountsAccountBankAccountsIdRequestBody -> String
(Int
-> PostAccountsAccountBankAccountsIdRequestBody
-> String
-> String)
-> (PostAccountsAccountBankAccountsIdRequestBody -> String)
-> ([PostAccountsAccountBankAccountsIdRequestBody]
-> String -> String)
-> Show PostAccountsAccountBankAccountsIdRequestBody
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostAccountsAccountBankAccountsIdRequestBody] -> String -> String
$cshowList :: [PostAccountsAccountBankAccountsIdRequestBody] -> String -> String
show :: PostAccountsAccountBankAccountsIdRequestBody -> String
$cshow :: PostAccountsAccountBankAccountsIdRequestBody -> String
showsPrec :: Int
-> PostAccountsAccountBankAccountsIdRequestBody -> String -> String
$cshowsPrec :: Int
-> PostAccountsAccountBankAccountsIdRequestBody -> String -> String
GHC.Show.Show,
PostAccountsAccountBankAccountsIdRequestBody
-> PostAccountsAccountBankAccountsIdRequestBody -> Bool
(PostAccountsAccountBankAccountsIdRequestBody
-> PostAccountsAccountBankAccountsIdRequestBody -> Bool)
-> (PostAccountsAccountBankAccountsIdRequestBody
-> PostAccountsAccountBankAccountsIdRequestBody -> Bool)
-> Eq PostAccountsAccountBankAccountsIdRequestBody
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostAccountsAccountBankAccountsIdRequestBody
-> PostAccountsAccountBankAccountsIdRequestBody -> Bool
$c/= :: PostAccountsAccountBankAccountsIdRequestBody
-> PostAccountsAccountBankAccountsIdRequestBody -> Bool
== :: PostAccountsAccountBankAccountsIdRequestBody
-> PostAccountsAccountBankAccountsIdRequestBody -> Bool
$c== :: PostAccountsAccountBankAccountsIdRequestBody
-> PostAccountsAccountBankAccountsIdRequestBody -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PostAccountsAccountBankAccountsIdRequestBody where
toJSON :: PostAccountsAccountBankAccountsIdRequestBody -> Value
toJSON PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAccountHolderName PostAccountsAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"account_holder_type" Text
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountsAccountBankAccountsIdRequestBody
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
postAccountsAccountBankAccountsIdRequestBodyAccountHolderType PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressCity PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressCountry PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressLine1 PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressLine2 PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressState PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressZip PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Bool
postAccountsAccountBankAccountsIdRequestBodyDefaultForCurrency PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyExpMonth PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyExpYear PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe [Text]
postAccountsAccountBankAccountsIdRequestBodyExpand PostAccountsAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountsAccountBankAccountsIdRequestBody
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
postAccountsAccountBankAccountsIdRequestBodyMetadata PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyName PostAccountsAccountBankAccountsIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PostAccountsAccountBankAccountsIdRequestBody -> Encoding
toEncoding PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAccountHolderName PostAccountsAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"account_holder_type" Text
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountsAccountBankAccountsIdRequestBody
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
postAccountsAccountBankAccountsIdRequestBodyAccountHolderType PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressCity PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressCountry PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressLine1 PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressLine2 PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressState PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressZip PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Bool
postAccountsAccountBankAccountsIdRequestBodyDefaultForCurrency PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyExpMonth PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyExpYear PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe [Text]
postAccountsAccountBankAccountsIdRequestBodyExpand PostAccountsAccountBankAccountsIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"metadata" Text
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PostAccountsAccountBankAccountsIdRequestBody
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
postAccountsAccountBankAccountsIdRequestBodyMetadata PostAccountsAccountBankAccountsIdRequestBody
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..= PostAccountsAccountBankAccountsIdRequestBody -> Maybe Text
postAccountsAccountBankAccountsIdRequestBodyName PostAccountsAccountBankAccountsIdRequestBody
obj))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON PostAccountsAccountBankAccountsIdRequestBody where
parseJSON :: Value -> Parser PostAccountsAccountBankAccountsIdRequestBody
parseJSON = String
-> (Object -> Parser PostAccountsAccountBankAccountsIdRequestBody)
-> Value
-> Parser PostAccountsAccountBankAccountsIdRequestBody
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PostAccountsAccountBankAccountsIdRequestBody" (\Object
obj -> ((((((((((((((Maybe Text
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser
(Maybe Text
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody
PostAccountsAccountBankAccountsIdRequestBody Parser
(Maybe Text
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser
(Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType')
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType')
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe [Text])
-> Parser
(Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text -> PostAccountsAccountBankAccountsIdRequestBody)
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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text -> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser
(Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants)
-> Parser
(Maybe Text -> PostAccountsAccountBankAccountsIdRequestBody)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"metadata")) Parser (Maybe Text -> PostAccountsAccountBankAccountsIdRequestBody)
-> Parser (Maybe Text)
-> Parser PostAccountsAccountBankAccountsIdRequestBody
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"))
mkPostAccountsAccountBankAccountsIdRequestBody :: PostAccountsAccountBankAccountsIdRequestBody
mkPostAccountsAccountBankAccountsIdRequestBody :: PostAccountsAccountBankAccountsIdRequestBody
mkPostAccountsAccountBankAccountsIdRequestBody =
PostAccountsAccountBankAccountsIdRequestBody :: Maybe Text
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Maybe Text
-> PostAccountsAccountBankAccountsIdRequestBody
PostAccountsAccountBankAccountsIdRequestBody
{ postAccountsAccountBankAccountsIdRequestBodyAccountHolderName :: Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAccountHolderName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyAccountHolderType :: Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
postAccountsAccountBankAccountsIdRequestBodyAccountHolderType = Maybe
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyAddressCity :: Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressCity = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyAddressCountry :: Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressCountry = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyAddressLine1 :: Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressLine1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyAddressLine2 :: Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressLine2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyAddressState :: Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressState = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyAddressZip :: Maybe Text
postAccountsAccountBankAccountsIdRequestBodyAddressZip = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyDefaultForCurrency :: Maybe Bool
postAccountsAccountBankAccountsIdRequestBodyDefaultForCurrency = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyExpMonth :: Maybe Text
postAccountsAccountBankAccountsIdRequestBodyExpMonth = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyExpYear :: Maybe Text
postAccountsAccountBankAccountsIdRequestBodyExpYear = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyExpand :: Maybe [Text]
postAccountsAccountBankAccountsIdRequestBodyExpand = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyMetadata :: Maybe PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
postAccountsAccountBankAccountsIdRequestBodyMetadata = Maybe PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
postAccountsAccountBankAccountsIdRequestBodyName :: Maybe Text
postAccountsAccountBankAccountsIdRequestBodyName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
=
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'Other Data.Aeson.Types.Internal.Value
|
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'Typed Data.Text.Internal.Text
|
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'EnumEmptyString
|
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'EnumCompany
|
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'EnumIndividual
deriving (Int
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
-> String
[PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType']
-> String -> String
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
(Int
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
-> String)
-> (PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> String)
-> ([PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType']
-> String -> String)
-> Show
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType']
-> String -> String
$cshowList :: [PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType']
-> String -> String
show :: PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
$cshow :: PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
showsPrec :: Int
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
-> String
$cshowsPrec :: Int
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> String
-> String
GHC.Show.Show, PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Bool
(PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Bool)
-> (PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Bool)
-> Eq
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Bool
$c/= :: PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Bool
== :: PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Bool
$c== :: PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType' where
toJSON :: PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Value
toJSON (PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'Other Value
val) = Value
val
toJSON (PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'EnumEmptyString) = Value
""
toJSON (PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'EnumCompany) = Value
"company"
toJSON (PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'EnumIndividual) = Value
"individual"
instance Data.Aeson.Types.FromJSON.FromJSON PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType' where
parseJSON :: Value
-> Parser
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
parseJSON Value
val =
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
-> Parser
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
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
"" -> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'EnumEmptyString
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"company" -> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'EnumCompany
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"individual" -> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'EnumIndividual
| Bool
GHC.Base.otherwise -> Value
-> PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'
PostAccountsAccountBankAccountsIdRequestBodyAccountHolderType'Other Value
val
)
data PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
=
PostAccountsAccountBankAccountsIdRequestBodyMetadata'EmptyString
| PostAccountsAccountBankAccountsIdRequestBodyMetadata'Object Data.Aeson.Types.Internal.Object
deriving (Int
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
-> String
[PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants]
-> String -> String
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
(Int
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
-> String)
-> (PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> String)
-> ([PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants]
-> String -> String)
-> Show
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants]
-> String -> String
$cshowList :: [PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants]
-> String -> String
show :: PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
$cshow :: PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
showsPrec :: Int
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
-> String
$cshowsPrec :: Int
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> String
-> String
GHC.Show.Show, PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Bool
(PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Bool)
-> (PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Bool)
-> Eq PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Bool
$c/= :: PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Bool
== :: PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Bool
$c== :: PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants where
toJSON :: PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Value
toJSON (PostAccountsAccountBankAccountsIdRequestBodyMetadata'Object Object
a) = Object -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Object
a
toJSON (PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
PostAccountsAccountBankAccountsIdRequestBodyMetadata'EmptyString) = Value
""
instance Data.Aeson.Types.FromJSON.FromJSON PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants where
parseJSON :: Value
-> Parser
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
parseJSON Value
val =
if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"" -> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Parser
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
PostAccountsAccountBankAccountsIdRequestBodyMetadata'EmptyString
| Bool
GHC.Base.otherwise -> case (Object
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Object (Object
-> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants)
-> Result Object
-> Result
PostAccountsAccountBankAccountsIdRequestBodyMetadata'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
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Result
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Result
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched" of
Data.Aeson.Types.Internal.Success PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
a -> PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
-> Parser
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String
-> Parser
PostAccountsAccountBankAccountsIdRequestBodyMetadata'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data PostAccountsAccountBankAccountsIdResponse
=
PostAccountsAccountBankAccountsIdResponseError GHC.Base.String
|
PostAccountsAccountBankAccountsIdResponse200 ExternalAccount
|
PostAccountsAccountBankAccountsIdResponseDefault Error
deriving (Int
-> PostAccountsAccountBankAccountsIdResponse -> String -> String
[PostAccountsAccountBankAccountsIdResponse] -> String -> String
PostAccountsAccountBankAccountsIdResponse -> String
(Int
-> PostAccountsAccountBankAccountsIdResponse -> String -> String)
-> (PostAccountsAccountBankAccountsIdResponse -> String)
-> ([PostAccountsAccountBankAccountsIdResponse]
-> String -> String)
-> Show PostAccountsAccountBankAccountsIdResponse
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [PostAccountsAccountBankAccountsIdResponse] -> String -> String
$cshowList :: [PostAccountsAccountBankAccountsIdResponse] -> String -> String
show :: PostAccountsAccountBankAccountsIdResponse -> String
$cshow :: PostAccountsAccountBankAccountsIdResponse -> String
showsPrec :: Int
-> PostAccountsAccountBankAccountsIdResponse -> String -> String
$cshowsPrec :: Int
-> PostAccountsAccountBankAccountsIdResponse -> String -> String
GHC.Show.Show, PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse -> Bool
(PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse -> Bool)
-> (PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse -> Bool)
-> Eq PostAccountsAccountBankAccountsIdResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse -> Bool
$c/= :: PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse -> Bool
== :: PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse -> Bool
$c== :: PostAccountsAccountBankAccountsIdResponse
-> PostAccountsAccountBankAccountsIdResponse -> Bool
GHC.Classes.Eq)