{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.Recipient where
import qualified Control.Monad.Fail
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.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 GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified StripeAPI.Common
import StripeAPI.TypeAlias
import {-# SOURCE #-} StripeAPI.Types.Account
import {-# SOURCE #-} StripeAPI.Types.BankAccount
import {-# SOURCE #-} StripeAPI.Types.Card
import {-# SOURCE #-} StripeAPI.Types.Customer
import {-# SOURCE #-} StripeAPI.Types.DeletedCustomer
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data Recipient = Recipient
{
Recipient -> Maybe RecipientActiveAccount'
recipientActiveAccount :: (GHC.Maybe.Maybe RecipientActiveAccount'),
Recipient -> Maybe RecipientCards'
recipientCards :: (GHC.Maybe.Maybe RecipientCards'),
Recipient -> Int
recipientCreated :: GHC.Types.Int,
Recipient -> Maybe RecipientDefaultCard'Variants
recipientDefaultCard :: (GHC.Maybe.Maybe RecipientDefaultCard'Variants),
Recipient -> Maybe Text
recipientDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
Recipient -> Maybe Text
recipientEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
Recipient -> Text
recipientId :: Data.Text.Internal.Text,
Recipient -> Bool
recipientLivemode :: GHC.Types.Bool,
Recipient -> Object
recipientMetadata :: Data.Aeson.Types.Internal.Object,
Recipient -> Maybe RecipientMigratedTo'Variants
recipientMigratedTo :: (GHC.Maybe.Maybe RecipientMigratedTo'Variants),
Recipient -> Maybe Text
recipientName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
Recipient -> Maybe RecipientRolledBackFrom'Variants
recipientRolledBackFrom :: (GHC.Maybe.Maybe RecipientRolledBackFrom'Variants),
Recipient -> Text
recipientType :: Data.Text.Internal.Text
}
deriving
( Int -> Recipient -> ShowS
[Recipient] -> ShowS
Recipient -> String
(Int -> Recipient -> ShowS)
-> (Recipient -> String)
-> ([Recipient] -> ShowS)
-> Show Recipient
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Recipient] -> ShowS
$cshowList :: [Recipient] -> ShowS
show :: Recipient -> String
$cshow :: Recipient -> String
showsPrec :: Int -> Recipient -> ShowS
$cshowsPrec :: Int -> Recipient -> ShowS
GHC.Show.Show,
Recipient -> Recipient -> Bool
(Recipient -> Recipient -> Bool)
-> (Recipient -> Recipient -> Bool) -> Eq Recipient
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Recipient -> Recipient -> Bool
$c/= :: Recipient -> Recipient -> Bool
== :: Recipient -> Recipient -> Bool
$c== :: Recipient -> Recipient -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON Recipient where
toJSON :: Recipient -> Value
toJSON Recipient
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"active_account" Text -> Maybe RecipientActiveAccount' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe RecipientActiveAccount'
recipientActiveAccount Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"cards" Text -> Maybe RecipientCards' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe RecipientCards'
recipientCards Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"created" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Int
recipientCreated Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"default_card" Text -> Maybe RecipientDefaultCard'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe RecipientDefaultCard'Variants
recipientDefaultCard Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"description" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe Text
recipientDescription Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"email" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe Text
recipientEmail Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Text
recipientId Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"livemode" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Bool
recipientLivemode Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text -> Object -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Object
recipientMetadata Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"migrated_to" Text -> Maybe RecipientMigratedTo'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe RecipientMigratedTo'Variants
recipientMigratedTo Recipient
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..= Recipient -> Maybe Text
recipientName Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"rolled_back_from" Text -> Maybe RecipientRolledBackFrom'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe RecipientRolledBackFrom'Variants
recipientRolledBackFrom Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"type" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Text
recipientType Recipient
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"recipient" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: Recipient -> Encoding
toEncoding Recipient
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"active_account" Text -> Maybe RecipientActiveAccount' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe RecipientActiveAccount'
recipientActiveAccount Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"cards" Text -> Maybe RecipientCards' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe RecipientCards'
recipientCards Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"created" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Int
recipientCreated Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"default_card" Text -> Maybe RecipientDefaultCard'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe RecipientDefaultCard'Variants
recipientDefaultCard Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"description" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe Text
recipientDescription Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"email" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe Text
recipientEmail Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Text
recipientId Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"livemode" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Bool
recipientLivemode Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"metadata" Text -> Object -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Object
recipientMetadata Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"migrated_to" Text -> Maybe RecipientMigratedTo'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe RecipientMigratedTo'Variants
recipientMigratedTo Recipient
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..= Recipient -> Maybe Text
recipientName Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"rolled_back_from" Text -> Maybe RecipientRolledBackFrom'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Maybe RecipientRolledBackFrom'Variants
recipientRolledBackFrom Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"type" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Recipient -> Text
recipientType Recipient
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"recipient"))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON Recipient where
parseJSON :: Value -> Parser Recipient
parseJSON = String -> (Object -> Parser Recipient) -> Value -> Parser Recipient
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"Recipient" (\Object
obj -> (((((((((((((Maybe RecipientActiveAccount'
-> Maybe RecipientCards'
-> Int
-> Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser
(Maybe RecipientActiveAccount'
-> Maybe RecipientCards'
-> Int
-> Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe RecipientActiveAccount'
-> Maybe RecipientCards'
-> Int
-> Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient
Recipient Parser
(Maybe RecipientActiveAccount'
-> Maybe RecipientCards'
-> Int
-> Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser (Maybe RecipientActiveAccount')
-> Parser
(Maybe RecipientCards'
-> Int
-> Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe RecipientActiveAccount')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"active_account")) Parser
(Maybe RecipientCards'
-> Int
-> Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser (Maybe RecipientCards')
-> Parser
(Int
-> Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe RecipientCards')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"cards")) Parser
(Int
-> Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser Int
-> Parser
(Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"created")) Parser
(Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser (Maybe RecipientDefaultCard'Variants)
-> Parser
(Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe RecipientDefaultCard'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"default_card")) Parser
(Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
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
"description")) Parser
(Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser (Maybe Text)
-> Parser
(Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
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
"email")) Parser
(Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser Text
-> Parser
(Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
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
"id")) Parser
(Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser Bool
-> Parser
(Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"livemode")) Parser
(Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser Object
-> Parser
(Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Object
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"metadata")) Parser
(Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient)
-> Parser (Maybe RecipientMigratedTo'Variants)
-> Parser
(Maybe Text
-> Maybe RecipientRolledBackFrom'Variants -> Text -> Recipient)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe RecipientMigratedTo'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"migrated_to")) Parser
(Maybe Text
-> Maybe RecipientRolledBackFrom'Variants -> Text -> Recipient)
-> Parser (Maybe Text)
-> Parser
(Maybe RecipientRolledBackFrom'Variants -> Text -> Recipient)
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")) Parser
(Maybe RecipientRolledBackFrom'Variants -> Text -> Recipient)
-> Parser (Maybe RecipientRolledBackFrom'Variants)
-> Parser (Text -> Recipient)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe RecipientRolledBackFrom'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"rolled_back_from")) Parser (Text -> Recipient) -> Parser Text -> Parser Recipient
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
"type"))
mkRecipient ::
GHC.Types.Int ->
Data.Text.Internal.Text ->
GHC.Types.Bool ->
Data.Aeson.Types.Internal.Object ->
Data.Text.Internal.Text ->
Recipient
mkRecipient :: Int -> Text -> Bool -> Object -> Text -> Recipient
mkRecipient Int
recipientCreated Text
recipientId Bool
recipientLivemode Object
recipientMetadata Text
recipientType =
Recipient :: Maybe RecipientActiveAccount'
-> Maybe RecipientCards'
-> Int
-> Maybe RecipientDefaultCard'Variants
-> Maybe Text
-> Maybe Text
-> Text
-> Bool
-> Object
-> Maybe RecipientMigratedTo'Variants
-> Maybe Text
-> Maybe RecipientRolledBackFrom'Variants
-> Text
-> Recipient
Recipient
{ recipientActiveAccount :: Maybe RecipientActiveAccount'
recipientActiveAccount = Maybe RecipientActiveAccount'
forall a. Maybe a
GHC.Maybe.Nothing,
recipientCards :: Maybe RecipientCards'
recipientCards = Maybe RecipientCards'
forall a. Maybe a
GHC.Maybe.Nothing,
recipientCreated :: Int
recipientCreated = Int
recipientCreated,
recipientDefaultCard :: Maybe RecipientDefaultCard'Variants
recipientDefaultCard = Maybe RecipientDefaultCard'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
recipientDescription :: Maybe Text
recipientDescription = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientEmail :: Maybe Text
recipientEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientId :: Text
recipientId = Text
recipientId,
recipientLivemode :: Bool
recipientLivemode = Bool
recipientLivemode,
recipientMetadata :: Object
recipientMetadata = Object
recipientMetadata,
recipientMigratedTo :: Maybe RecipientMigratedTo'Variants
recipientMigratedTo = Maybe RecipientMigratedTo'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
recipientName :: Maybe Text
recipientName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientRolledBackFrom :: Maybe RecipientRolledBackFrom'Variants
recipientRolledBackFrom = Maybe RecipientRolledBackFrom'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
recipientType :: Text
recipientType = Text
recipientType
}
data RecipientActiveAccount' = RecipientActiveAccount'
{
RecipientActiveAccount'
-> Maybe RecipientActiveAccount'Account'Variants
recipientActiveAccount'Account :: (GHC.Maybe.Maybe RecipientActiveAccount'Account'Variants),
RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'AccountHolderName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'AccountHolderType :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
RecipientActiveAccount'
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
recipientActiveAccount'AvailablePayoutMethods :: (GHC.Maybe.Maybe ([RecipientActiveAccount'AvailablePayoutMethods'])),
RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'BankName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Currency :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
RecipientActiveAccount'
-> Maybe RecipientActiveAccount'Customer'Variants
recipientActiveAccount'Customer :: (GHC.Maybe.Maybe RecipientActiveAccount'Customer'Variants),
RecipientActiveAccount' -> Maybe Bool
recipientActiveAccount'DefaultForCurrency :: (GHC.Maybe.Maybe GHC.Types.Bool),
RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Fingerprint :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Last4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
RecipientActiveAccount' -> Maybe Object
recipientActiveAccount'Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'RoutingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Status :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> RecipientActiveAccount' -> ShowS
[RecipientActiveAccount'] -> ShowS
RecipientActiveAccount' -> String
(Int -> RecipientActiveAccount' -> ShowS)
-> (RecipientActiveAccount' -> String)
-> ([RecipientActiveAccount'] -> ShowS)
-> Show RecipientActiveAccount'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipientActiveAccount'] -> ShowS
$cshowList :: [RecipientActiveAccount'] -> ShowS
show :: RecipientActiveAccount' -> String
$cshow :: RecipientActiveAccount' -> String
showsPrec :: Int -> RecipientActiveAccount' -> ShowS
$cshowsPrec :: Int -> RecipientActiveAccount' -> ShowS
GHC.Show.Show,
RecipientActiveAccount' -> RecipientActiveAccount' -> Bool
(RecipientActiveAccount' -> RecipientActiveAccount' -> Bool)
-> (RecipientActiveAccount' -> RecipientActiveAccount' -> Bool)
-> Eq RecipientActiveAccount'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipientActiveAccount' -> RecipientActiveAccount' -> Bool
$c/= :: RecipientActiveAccount' -> RecipientActiveAccount' -> Bool
== :: RecipientActiveAccount' -> RecipientActiveAccount' -> Bool
$c== :: RecipientActiveAccount' -> RecipientActiveAccount' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON RecipientActiveAccount' where
toJSON :: RecipientActiveAccount' -> Value
toJSON RecipientActiveAccount'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"account" Text -> Maybe RecipientActiveAccount'Account'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount'
-> Maybe RecipientActiveAccount'Account'Variants
recipientActiveAccount'Account RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"account_holder_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'AccountHolderName RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"account_holder_type" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'AccountHolderType RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"available_payout_methods" Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods'] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount'
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
recipientActiveAccount'AvailablePayoutMethods RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"bank_name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'BankName RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Country RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"currency" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Currency RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer" Text -> Maybe RecipientActiveAccount'Customer'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount'
-> Maybe RecipientActiveAccount'Customer'Variants
recipientActiveAccount'Customer RecipientActiveAccount'
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..= RecipientActiveAccount' -> Maybe Bool
recipientActiveAccount'DefaultForCurrency RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"fingerprint" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Fingerprint RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Id RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"last4" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Last4 RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text -> Maybe Object -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Object
recipientActiveAccount'Metadata RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"routing_number" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'RoutingNumber RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"status" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Status RecipientActiveAccount'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"bank_account" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: RecipientActiveAccount' -> Encoding
toEncoding RecipientActiveAccount'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"account" Text -> Maybe RecipientActiveAccount'Account'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount'
-> Maybe RecipientActiveAccount'Account'Variants
recipientActiveAccount'Account RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"account_holder_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'AccountHolderName RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"account_holder_type" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'AccountHolderType RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"available_payout_methods" Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods'] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount'
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
recipientActiveAccount'AvailablePayoutMethods RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"bank_name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'BankName RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Country RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"currency" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Currency RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer" Text -> Maybe RecipientActiveAccount'Customer'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount'
-> Maybe RecipientActiveAccount'Customer'Variants
recipientActiveAccount'Customer RecipientActiveAccount'
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..= RecipientActiveAccount' -> Maybe Bool
recipientActiveAccount'DefaultForCurrency RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"fingerprint" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Fingerprint RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Id RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"last4" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Last4 RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"metadata" Text -> Maybe Object -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Object
recipientActiveAccount'Metadata RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"routing_number" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'RoutingNumber RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"status" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientActiveAccount' -> Maybe Text
recipientActiveAccount'Status RecipientActiveAccount'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"bank_account"))))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON RecipientActiveAccount' where
parseJSON :: Value -> Parser RecipientActiveAccount'
parseJSON = String
-> (Object -> Parser RecipientActiveAccount')
-> Value
-> Parser RecipientActiveAccount'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"RecipientActiveAccount'" (\Object
obj -> (((((((((((((((Maybe RecipientActiveAccount'Account'Variants
-> Maybe Text
-> Maybe Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser
(Maybe RecipientActiveAccount'Account'Variants
-> Maybe Text
-> Maybe Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe RecipientActiveAccount'Account'Variants
-> Maybe Text
-> Maybe Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount'
RecipientActiveAccount' Parser
(Maybe RecipientActiveAccount'Account'Variants
-> Maybe Text
-> Maybe Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe RecipientActiveAccount'Account'Variants)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe RecipientActiveAccount'Account'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"account")) Parser
(Maybe Text
-> Maybe Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
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 Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe Text)
-> Parser
(Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
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_type")) Parser
(Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe [RecipientActiveAccount'AvailablePayoutMethods'])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe [RecipientActiveAccount'AvailablePayoutMethods'])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"available_payout_methods")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
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
"bank_name")) Parser
(Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
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
"country")) Parser
(Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe Text)
-> Parser
(Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
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
"currency")) Parser
(Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe RecipientActiveAccount'Customer'Variants)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe RecipientActiveAccount'Customer'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer")) Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
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 Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
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
"fingerprint")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
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
"id")) Parser
(Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount')
-> Parser (Maybe Text)
-> Parser
(Maybe Object
-> Maybe Text -> Maybe Text -> RecipientActiveAccount')
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
"last4")) Parser
(Maybe Object
-> Maybe Text -> Maybe Text -> RecipientActiveAccount')
-> Parser (Maybe Object)
-> Parser (Maybe Text -> Maybe Text -> RecipientActiveAccount')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Object)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"metadata")) Parser (Maybe Text -> Maybe Text -> RecipientActiveAccount')
-> Parser (Maybe Text)
-> Parser (Maybe Text -> RecipientActiveAccount')
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
"routing_number")) Parser (Maybe Text -> RecipientActiveAccount')
-> Parser (Maybe Text) -> Parser RecipientActiveAccount'
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
"status"))
mkRecipientActiveAccount' :: RecipientActiveAccount'
mkRecipientActiveAccount' :: RecipientActiveAccount'
mkRecipientActiveAccount' =
RecipientActiveAccount' :: Maybe RecipientActiveAccount'Account'Variants
-> Maybe Text
-> Maybe Text
-> Maybe [RecipientActiveAccount'AvailablePayoutMethods']
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RecipientActiveAccount'Customer'Variants
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> RecipientActiveAccount'
RecipientActiveAccount'
{ recipientActiveAccount'Account :: Maybe RecipientActiveAccount'Account'Variants
recipientActiveAccount'Account = Maybe RecipientActiveAccount'Account'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'AccountHolderName :: Maybe Text
recipientActiveAccount'AccountHolderName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'AccountHolderType :: Maybe Text
recipientActiveAccount'AccountHolderType = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'AvailablePayoutMethods :: Maybe [RecipientActiveAccount'AvailablePayoutMethods']
recipientActiveAccount'AvailablePayoutMethods = Maybe [RecipientActiveAccount'AvailablePayoutMethods']
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'BankName :: Maybe Text
recipientActiveAccount'BankName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'Country :: Maybe Text
recipientActiveAccount'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'Currency :: Maybe Text
recipientActiveAccount'Currency = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'Customer :: Maybe RecipientActiveAccount'Customer'Variants
recipientActiveAccount'Customer = Maybe RecipientActiveAccount'Customer'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'DefaultForCurrency :: Maybe Bool
recipientActiveAccount'DefaultForCurrency = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'Fingerprint :: Maybe Text
recipientActiveAccount'Fingerprint = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'Id :: Maybe Text
recipientActiveAccount'Id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'Last4 :: Maybe Text
recipientActiveAccount'Last4 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'Metadata :: Maybe Object
recipientActiveAccount'Metadata = Maybe Object
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'RoutingNumber :: Maybe Text
recipientActiveAccount'RoutingNumber = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
recipientActiveAccount'Status :: Maybe Text
recipientActiveAccount'Status = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data RecipientActiveAccount'Account'Variants
= RecipientActiveAccount'Account'Text Data.Text.Internal.Text
| RecipientActiveAccount'Account'Account Account
deriving (Int -> RecipientActiveAccount'Account'Variants -> ShowS
[RecipientActiveAccount'Account'Variants] -> ShowS
RecipientActiveAccount'Account'Variants -> String
(Int -> RecipientActiveAccount'Account'Variants -> ShowS)
-> (RecipientActiveAccount'Account'Variants -> String)
-> ([RecipientActiveAccount'Account'Variants] -> ShowS)
-> Show RecipientActiveAccount'Account'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipientActiveAccount'Account'Variants] -> ShowS
$cshowList :: [RecipientActiveAccount'Account'Variants] -> ShowS
show :: RecipientActiveAccount'Account'Variants -> String
$cshow :: RecipientActiveAccount'Account'Variants -> String
showsPrec :: Int -> RecipientActiveAccount'Account'Variants -> ShowS
$cshowsPrec :: Int -> RecipientActiveAccount'Account'Variants -> ShowS
GHC.Show.Show, RecipientActiveAccount'Account'Variants
-> RecipientActiveAccount'Account'Variants -> Bool
(RecipientActiveAccount'Account'Variants
-> RecipientActiveAccount'Account'Variants -> Bool)
-> (RecipientActiveAccount'Account'Variants
-> RecipientActiveAccount'Account'Variants -> Bool)
-> Eq RecipientActiveAccount'Account'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipientActiveAccount'Account'Variants
-> RecipientActiveAccount'Account'Variants -> Bool
$c/= :: RecipientActiveAccount'Account'Variants
-> RecipientActiveAccount'Account'Variants -> Bool
== :: RecipientActiveAccount'Account'Variants
-> RecipientActiveAccount'Account'Variants -> Bool
$c== :: RecipientActiveAccount'Account'Variants
-> RecipientActiveAccount'Account'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON RecipientActiveAccount'Account'Variants where
toJSON :: RecipientActiveAccount'Account'Variants -> Value
toJSON (RecipientActiveAccount'Account'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (RecipientActiveAccount'Account'Account Account
a) = Account -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Account
a
instance Data.Aeson.Types.FromJSON.FromJSON RecipientActiveAccount'Account'Variants where
parseJSON :: Value -> Parser RecipientActiveAccount'Account'Variants
parseJSON Value
val = case (Text -> RecipientActiveAccount'Account'Variants
RecipientActiveAccount'Account'Text (Text -> RecipientActiveAccount'Account'Variants)
-> Result Text -> Result RecipientActiveAccount'Account'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientActiveAccount'Account'Variants
-> Result RecipientActiveAccount'Account'Variants
-> Result RecipientActiveAccount'Account'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Account -> RecipientActiveAccount'Account'Variants
RecipientActiveAccount'Account'Account (Account -> RecipientActiveAccount'Account'Variants)
-> Result Account -> Result RecipientActiveAccount'Account'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Account
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientActiveAccount'Account'Variants
-> Result RecipientActiveAccount'Account'Variants
-> Result RecipientActiveAccount'Account'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result RecipientActiveAccount'Account'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success RecipientActiveAccount'Account'Variants
a -> RecipientActiveAccount'Account'Variants
-> Parser RecipientActiveAccount'Account'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure RecipientActiveAccount'Account'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser RecipientActiveAccount'Account'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data RecipientActiveAccount'AvailablePayoutMethods'
=
RecipientActiveAccount'AvailablePayoutMethods'Other Data.Aeson.Types.Internal.Value
|
RecipientActiveAccount'AvailablePayoutMethods'Typed Data.Text.Internal.Text
|
RecipientActiveAccount'AvailablePayoutMethods'EnumInstant
|
RecipientActiveAccount'AvailablePayoutMethods'EnumStandard
deriving (Int -> RecipientActiveAccount'AvailablePayoutMethods' -> ShowS
[RecipientActiveAccount'AvailablePayoutMethods'] -> ShowS
RecipientActiveAccount'AvailablePayoutMethods' -> String
(Int -> RecipientActiveAccount'AvailablePayoutMethods' -> ShowS)
-> (RecipientActiveAccount'AvailablePayoutMethods' -> String)
-> ([RecipientActiveAccount'AvailablePayoutMethods'] -> ShowS)
-> Show RecipientActiveAccount'AvailablePayoutMethods'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipientActiveAccount'AvailablePayoutMethods'] -> ShowS
$cshowList :: [RecipientActiveAccount'AvailablePayoutMethods'] -> ShowS
show :: RecipientActiveAccount'AvailablePayoutMethods' -> String
$cshow :: RecipientActiveAccount'AvailablePayoutMethods' -> String
showsPrec :: Int -> RecipientActiveAccount'AvailablePayoutMethods' -> ShowS
$cshowsPrec :: Int -> RecipientActiveAccount'AvailablePayoutMethods' -> ShowS
GHC.Show.Show, RecipientActiveAccount'AvailablePayoutMethods'
-> RecipientActiveAccount'AvailablePayoutMethods' -> Bool
(RecipientActiveAccount'AvailablePayoutMethods'
-> RecipientActiveAccount'AvailablePayoutMethods' -> Bool)
-> (RecipientActiveAccount'AvailablePayoutMethods'
-> RecipientActiveAccount'AvailablePayoutMethods' -> Bool)
-> Eq RecipientActiveAccount'AvailablePayoutMethods'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipientActiveAccount'AvailablePayoutMethods'
-> RecipientActiveAccount'AvailablePayoutMethods' -> Bool
$c/= :: RecipientActiveAccount'AvailablePayoutMethods'
-> RecipientActiveAccount'AvailablePayoutMethods' -> Bool
== :: RecipientActiveAccount'AvailablePayoutMethods'
-> RecipientActiveAccount'AvailablePayoutMethods' -> Bool
$c== :: RecipientActiveAccount'AvailablePayoutMethods'
-> RecipientActiveAccount'AvailablePayoutMethods' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON RecipientActiveAccount'AvailablePayoutMethods' where
toJSON :: RecipientActiveAccount'AvailablePayoutMethods' -> Value
toJSON (RecipientActiveAccount'AvailablePayoutMethods'Other Value
val) = Value
val
toJSON (RecipientActiveAccount'AvailablePayoutMethods'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (RecipientActiveAccount'AvailablePayoutMethods'
RecipientActiveAccount'AvailablePayoutMethods'EnumInstant) = Value
"instant"
toJSON (RecipientActiveAccount'AvailablePayoutMethods'
RecipientActiveAccount'AvailablePayoutMethods'EnumStandard) = Value
"standard"
instance Data.Aeson.Types.FromJSON.FromJSON RecipientActiveAccount'AvailablePayoutMethods' where
parseJSON :: Value -> Parser RecipientActiveAccount'AvailablePayoutMethods'
parseJSON Value
val =
RecipientActiveAccount'AvailablePayoutMethods'
-> Parser RecipientActiveAccount'AvailablePayoutMethods'
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
"instant" -> RecipientActiveAccount'AvailablePayoutMethods'
RecipientActiveAccount'AvailablePayoutMethods'EnumInstant
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"standard" -> RecipientActiveAccount'AvailablePayoutMethods'
RecipientActiveAccount'AvailablePayoutMethods'EnumStandard
| Bool
GHC.Base.otherwise -> Value -> RecipientActiveAccount'AvailablePayoutMethods'
RecipientActiveAccount'AvailablePayoutMethods'Other Value
val
)
data RecipientActiveAccount'Customer'Variants
= RecipientActiveAccount'Customer'Text Data.Text.Internal.Text
| RecipientActiveAccount'Customer'Customer Customer
| RecipientActiveAccount'Customer'DeletedCustomer DeletedCustomer
deriving (Int -> RecipientActiveAccount'Customer'Variants -> ShowS
[RecipientActiveAccount'Customer'Variants] -> ShowS
RecipientActiveAccount'Customer'Variants -> String
(Int -> RecipientActiveAccount'Customer'Variants -> ShowS)
-> (RecipientActiveAccount'Customer'Variants -> String)
-> ([RecipientActiveAccount'Customer'Variants] -> ShowS)
-> Show RecipientActiveAccount'Customer'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipientActiveAccount'Customer'Variants] -> ShowS
$cshowList :: [RecipientActiveAccount'Customer'Variants] -> ShowS
show :: RecipientActiveAccount'Customer'Variants -> String
$cshow :: RecipientActiveAccount'Customer'Variants -> String
showsPrec :: Int -> RecipientActiveAccount'Customer'Variants -> ShowS
$cshowsPrec :: Int -> RecipientActiveAccount'Customer'Variants -> ShowS
GHC.Show.Show, RecipientActiveAccount'Customer'Variants
-> RecipientActiveAccount'Customer'Variants -> Bool
(RecipientActiveAccount'Customer'Variants
-> RecipientActiveAccount'Customer'Variants -> Bool)
-> (RecipientActiveAccount'Customer'Variants
-> RecipientActiveAccount'Customer'Variants -> Bool)
-> Eq RecipientActiveAccount'Customer'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipientActiveAccount'Customer'Variants
-> RecipientActiveAccount'Customer'Variants -> Bool
$c/= :: RecipientActiveAccount'Customer'Variants
-> RecipientActiveAccount'Customer'Variants -> Bool
== :: RecipientActiveAccount'Customer'Variants
-> RecipientActiveAccount'Customer'Variants -> Bool
$c== :: RecipientActiveAccount'Customer'Variants
-> RecipientActiveAccount'Customer'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON RecipientActiveAccount'Customer'Variants where
toJSON :: RecipientActiveAccount'Customer'Variants -> Value
toJSON (RecipientActiveAccount'Customer'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (RecipientActiveAccount'Customer'Customer Customer
a) = Customer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Customer
a
toJSON (RecipientActiveAccount'Customer'DeletedCustomer DeletedCustomer
a) = DeletedCustomer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON DeletedCustomer
a
instance Data.Aeson.Types.FromJSON.FromJSON RecipientActiveAccount'Customer'Variants where
parseJSON :: Value -> Parser RecipientActiveAccount'Customer'Variants
parseJSON Value
val = case (Text -> RecipientActiveAccount'Customer'Variants
RecipientActiveAccount'Customer'Text (Text -> RecipientActiveAccount'Customer'Variants)
-> Result Text -> Result RecipientActiveAccount'Customer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientActiveAccount'Customer'Variants
-> Result RecipientActiveAccount'Customer'Variants
-> Result RecipientActiveAccount'Customer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Customer -> RecipientActiveAccount'Customer'Variants
RecipientActiveAccount'Customer'Customer (Customer -> RecipientActiveAccount'Customer'Variants)
-> Result Customer
-> Result RecipientActiveAccount'Customer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Customer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientActiveAccount'Customer'Variants
-> Result RecipientActiveAccount'Customer'Variants
-> Result RecipientActiveAccount'Customer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((DeletedCustomer -> RecipientActiveAccount'Customer'Variants
RecipientActiveAccount'Customer'DeletedCustomer (DeletedCustomer -> RecipientActiveAccount'Customer'Variants)
-> Result DeletedCustomer
-> Result RecipientActiveAccount'Customer'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result DeletedCustomer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientActiveAccount'Customer'Variants
-> Result RecipientActiveAccount'Customer'Variants
-> Result RecipientActiveAccount'Customer'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result RecipientActiveAccount'Customer'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched")) of
Data.Aeson.Types.Internal.Success RecipientActiveAccount'Customer'Variants
a -> RecipientActiveAccount'Customer'Variants
-> Parser RecipientActiveAccount'Customer'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure RecipientActiveAccount'Customer'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser RecipientActiveAccount'Customer'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data RecipientCards' = RecipientCards'
{
RecipientCards' -> [Card]
recipientCards'Data :: ([Card]),
RecipientCards' -> Bool
recipientCards'HasMore :: GHC.Types.Bool,
RecipientCards' -> Text
recipientCards'Url :: Data.Text.Internal.Text
}
deriving
( Int -> RecipientCards' -> ShowS
[RecipientCards'] -> ShowS
RecipientCards' -> String
(Int -> RecipientCards' -> ShowS)
-> (RecipientCards' -> String)
-> ([RecipientCards'] -> ShowS)
-> Show RecipientCards'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipientCards'] -> ShowS
$cshowList :: [RecipientCards'] -> ShowS
show :: RecipientCards' -> String
$cshow :: RecipientCards' -> String
showsPrec :: Int -> RecipientCards' -> ShowS
$cshowsPrec :: Int -> RecipientCards' -> ShowS
GHC.Show.Show,
RecipientCards' -> RecipientCards' -> Bool
(RecipientCards' -> RecipientCards' -> Bool)
-> (RecipientCards' -> RecipientCards' -> Bool)
-> Eq RecipientCards'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipientCards' -> RecipientCards' -> Bool
$c/= :: RecipientCards' -> RecipientCards' -> Bool
== :: RecipientCards' -> RecipientCards' -> Bool
$c== :: RecipientCards' -> RecipientCards' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON RecipientCards' where
toJSON :: RecipientCards' -> Value
toJSON RecipientCards'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"data" Text -> [Card] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientCards' -> [Card]
recipientCards'Data RecipientCards'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"has_more" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientCards' -> Bool
recipientCards'HasMore RecipientCards'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"url" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientCards' -> Text
recipientCards'Url RecipientCards'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: RecipientCards' -> Encoding
toEncoding RecipientCards'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"data" Text -> [Card] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientCards' -> [Card]
recipientCards'Data RecipientCards'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"has_more" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientCards' -> Bool
recipientCards'HasMore RecipientCards'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"url" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= RecipientCards' -> Text
recipientCards'Url RecipientCards'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list"))))
instance Data.Aeson.Types.FromJSON.FromJSON RecipientCards' where
parseJSON :: Value -> Parser RecipientCards'
parseJSON = String
-> (Object -> Parser RecipientCards')
-> Value
-> Parser RecipientCards'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"RecipientCards'" (\Object
obj -> ((([Card] -> Bool -> Text -> RecipientCards')
-> Parser ([Card] -> Bool -> Text -> RecipientCards')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure [Card] -> Bool -> Text -> RecipientCards'
RecipientCards' Parser ([Card] -> Bool -> Text -> RecipientCards')
-> Parser [Card] -> Parser (Bool -> Text -> RecipientCards')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [Card]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"data")) Parser (Bool -> Text -> RecipientCards')
-> Parser Bool -> Parser (Text -> RecipientCards')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"has_more")) Parser (Text -> RecipientCards')
-> Parser Text -> Parser RecipientCards'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"url"))
mkRecipientCards' ::
[Card] ->
GHC.Types.Bool ->
Data.Text.Internal.Text ->
RecipientCards'
mkRecipientCards' :: [Card] -> Bool -> Text -> RecipientCards'
mkRecipientCards' [Card]
recipientCards'Data Bool
recipientCards'HasMore Text
recipientCards'Url =
RecipientCards' :: [Card] -> Bool -> Text -> RecipientCards'
RecipientCards'
{ recipientCards'Data :: [Card]
recipientCards'Data = [Card]
recipientCards'Data,
recipientCards'HasMore :: Bool
recipientCards'HasMore = Bool
recipientCards'HasMore,
recipientCards'Url :: Text
recipientCards'Url = Text
recipientCards'Url
}
data RecipientDefaultCard'Variants
= RecipientDefaultCard'Text Data.Text.Internal.Text
| RecipientDefaultCard'Card Card
deriving (Int -> RecipientDefaultCard'Variants -> ShowS
[RecipientDefaultCard'Variants] -> ShowS
RecipientDefaultCard'Variants -> String
(Int -> RecipientDefaultCard'Variants -> ShowS)
-> (RecipientDefaultCard'Variants -> String)
-> ([RecipientDefaultCard'Variants] -> ShowS)
-> Show RecipientDefaultCard'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipientDefaultCard'Variants] -> ShowS
$cshowList :: [RecipientDefaultCard'Variants] -> ShowS
show :: RecipientDefaultCard'Variants -> String
$cshow :: RecipientDefaultCard'Variants -> String
showsPrec :: Int -> RecipientDefaultCard'Variants -> ShowS
$cshowsPrec :: Int -> RecipientDefaultCard'Variants -> ShowS
GHC.Show.Show, RecipientDefaultCard'Variants
-> RecipientDefaultCard'Variants -> Bool
(RecipientDefaultCard'Variants
-> RecipientDefaultCard'Variants -> Bool)
-> (RecipientDefaultCard'Variants
-> RecipientDefaultCard'Variants -> Bool)
-> Eq RecipientDefaultCard'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipientDefaultCard'Variants
-> RecipientDefaultCard'Variants -> Bool
$c/= :: RecipientDefaultCard'Variants
-> RecipientDefaultCard'Variants -> Bool
== :: RecipientDefaultCard'Variants
-> RecipientDefaultCard'Variants -> Bool
$c== :: RecipientDefaultCard'Variants
-> RecipientDefaultCard'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON RecipientDefaultCard'Variants where
toJSON :: RecipientDefaultCard'Variants -> Value
toJSON (RecipientDefaultCard'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (RecipientDefaultCard'Card Card
a) = Card -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Card
a
instance Data.Aeson.Types.FromJSON.FromJSON RecipientDefaultCard'Variants where
parseJSON :: Value -> Parser RecipientDefaultCard'Variants
parseJSON Value
val = case (Text -> RecipientDefaultCard'Variants
RecipientDefaultCard'Text (Text -> RecipientDefaultCard'Variants)
-> Result Text -> Result RecipientDefaultCard'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientDefaultCard'Variants
-> Result RecipientDefaultCard'Variants
-> Result RecipientDefaultCard'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Card -> RecipientDefaultCard'Variants
RecipientDefaultCard'Card (Card -> RecipientDefaultCard'Variants)
-> Result Card -> Result RecipientDefaultCard'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Card
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientDefaultCard'Variants
-> Result RecipientDefaultCard'Variants
-> Result RecipientDefaultCard'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result RecipientDefaultCard'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success RecipientDefaultCard'Variants
a -> RecipientDefaultCard'Variants
-> Parser RecipientDefaultCard'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure RecipientDefaultCard'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser RecipientDefaultCard'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data RecipientMigratedTo'Variants
= RecipientMigratedTo'Text Data.Text.Internal.Text
| RecipientMigratedTo'Account Account
deriving (Int -> RecipientMigratedTo'Variants -> ShowS
[RecipientMigratedTo'Variants] -> ShowS
RecipientMigratedTo'Variants -> String
(Int -> RecipientMigratedTo'Variants -> ShowS)
-> (RecipientMigratedTo'Variants -> String)
-> ([RecipientMigratedTo'Variants] -> ShowS)
-> Show RecipientMigratedTo'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipientMigratedTo'Variants] -> ShowS
$cshowList :: [RecipientMigratedTo'Variants] -> ShowS
show :: RecipientMigratedTo'Variants -> String
$cshow :: RecipientMigratedTo'Variants -> String
showsPrec :: Int -> RecipientMigratedTo'Variants -> ShowS
$cshowsPrec :: Int -> RecipientMigratedTo'Variants -> ShowS
GHC.Show.Show, RecipientMigratedTo'Variants
-> RecipientMigratedTo'Variants -> Bool
(RecipientMigratedTo'Variants
-> RecipientMigratedTo'Variants -> Bool)
-> (RecipientMigratedTo'Variants
-> RecipientMigratedTo'Variants -> Bool)
-> Eq RecipientMigratedTo'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipientMigratedTo'Variants
-> RecipientMigratedTo'Variants -> Bool
$c/= :: RecipientMigratedTo'Variants
-> RecipientMigratedTo'Variants -> Bool
== :: RecipientMigratedTo'Variants
-> RecipientMigratedTo'Variants -> Bool
$c== :: RecipientMigratedTo'Variants
-> RecipientMigratedTo'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON RecipientMigratedTo'Variants where
toJSON :: RecipientMigratedTo'Variants -> Value
toJSON (RecipientMigratedTo'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (RecipientMigratedTo'Account Account
a) = Account -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Account
a
instance Data.Aeson.Types.FromJSON.FromJSON RecipientMigratedTo'Variants where
parseJSON :: Value -> Parser RecipientMigratedTo'Variants
parseJSON Value
val = case (Text -> RecipientMigratedTo'Variants
RecipientMigratedTo'Text (Text -> RecipientMigratedTo'Variants)
-> Result Text -> Result RecipientMigratedTo'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientMigratedTo'Variants
-> Result RecipientMigratedTo'Variants
-> Result RecipientMigratedTo'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Account -> RecipientMigratedTo'Variants
RecipientMigratedTo'Account (Account -> RecipientMigratedTo'Variants)
-> Result Account -> Result RecipientMigratedTo'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Account
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientMigratedTo'Variants
-> Result RecipientMigratedTo'Variants
-> Result RecipientMigratedTo'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result RecipientMigratedTo'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success RecipientMigratedTo'Variants
a -> RecipientMigratedTo'Variants -> Parser RecipientMigratedTo'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure RecipientMigratedTo'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser RecipientMigratedTo'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data RecipientRolledBackFrom'Variants
= RecipientRolledBackFrom'Text Data.Text.Internal.Text
| RecipientRolledBackFrom'Account Account
deriving (Int -> RecipientRolledBackFrom'Variants -> ShowS
[RecipientRolledBackFrom'Variants] -> ShowS
RecipientRolledBackFrom'Variants -> String
(Int -> RecipientRolledBackFrom'Variants -> ShowS)
-> (RecipientRolledBackFrom'Variants -> String)
-> ([RecipientRolledBackFrom'Variants] -> ShowS)
-> Show RecipientRolledBackFrom'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipientRolledBackFrom'Variants] -> ShowS
$cshowList :: [RecipientRolledBackFrom'Variants] -> ShowS
show :: RecipientRolledBackFrom'Variants -> String
$cshow :: RecipientRolledBackFrom'Variants -> String
showsPrec :: Int -> RecipientRolledBackFrom'Variants -> ShowS
$cshowsPrec :: Int -> RecipientRolledBackFrom'Variants -> ShowS
GHC.Show.Show, RecipientRolledBackFrom'Variants
-> RecipientRolledBackFrom'Variants -> Bool
(RecipientRolledBackFrom'Variants
-> RecipientRolledBackFrom'Variants -> Bool)
-> (RecipientRolledBackFrom'Variants
-> RecipientRolledBackFrom'Variants -> Bool)
-> Eq RecipientRolledBackFrom'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipientRolledBackFrom'Variants
-> RecipientRolledBackFrom'Variants -> Bool
$c/= :: RecipientRolledBackFrom'Variants
-> RecipientRolledBackFrom'Variants -> Bool
== :: RecipientRolledBackFrom'Variants
-> RecipientRolledBackFrom'Variants -> Bool
$c== :: RecipientRolledBackFrom'Variants
-> RecipientRolledBackFrom'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON RecipientRolledBackFrom'Variants where
toJSON :: RecipientRolledBackFrom'Variants -> Value
toJSON (RecipientRolledBackFrom'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (RecipientRolledBackFrom'Account Account
a) = Account -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Account
a
instance Data.Aeson.Types.FromJSON.FromJSON RecipientRolledBackFrom'Variants where
parseJSON :: Value -> Parser RecipientRolledBackFrom'Variants
parseJSON Value
val = case (Text -> RecipientRolledBackFrom'Variants
RecipientRolledBackFrom'Text (Text -> RecipientRolledBackFrom'Variants)
-> Result Text -> Result RecipientRolledBackFrom'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientRolledBackFrom'Variants
-> Result RecipientRolledBackFrom'Variants
-> Result RecipientRolledBackFrom'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Account -> RecipientRolledBackFrom'Variants
RecipientRolledBackFrom'Account (Account -> RecipientRolledBackFrom'Variants)
-> Result Account -> Result RecipientRolledBackFrom'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Account
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result RecipientRolledBackFrom'Variants
-> Result RecipientRolledBackFrom'Variants
-> Result RecipientRolledBackFrom'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result RecipientRolledBackFrom'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success RecipientRolledBackFrom'Variants
a -> RecipientRolledBackFrom'Variants
-> Parser RecipientRolledBackFrom'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure RecipientRolledBackFrom'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser RecipientRolledBackFrom'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a