{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.BalanceTransaction 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.ApplicationFee
import {-# SOURCE #-} StripeAPI.Types.Charge
import {-# SOURCE #-} StripeAPI.Types.ConnectCollectionTransfer
import {-# SOURCE #-} StripeAPI.Types.Dispute
import {-# SOURCE #-} StripeAPI.Types.Fee
import {-# SOURCE #-} StripeAPI.Types.FeeRefund
import {-# SOURCE #-} StripeAPI.Types.Issuing_Authorization
import {-# SOURCE #-} StripeAPI.Types.Issuing_Dispute
import {-# SOURCE #-} StripeAPI.Types.Issuing_Transaction
import {-# SOURCE #-} StripeAPI.Types.Payout
import {-# SOURCE #-} StripeAPI.Types.PlatformTaxFee
import {-# SOURCE #-} StripeAPI.Types.Refund
import {-# SOURCE #-} StripeAPI.Types.ReserveTransaction
import {-# SOURCE #-} StripeAPI.Types.TaxDeductedAtSource
import {-# SOURCE #-} StripeAPI.Types.Topup
import {-# SOURCE #-} StripeAPI.Types.Transfer
import {-# SOURCE #-} StripeAPI.Types.TransferReversal
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data BalanceTransaction = BalanceTransaction
{
BalanceTransaction -> Int
balanceTransactionAmount :: GHC.Types.Int,
BalanceTransaction -> Int
balanceTransactionAvailableOn :: GHC.Types.Int,
BalanceTransaction -> Int
balanceTransactionCreated :: GHC.Types.Int,
BalanceTransaction -> Text
balanceTransactionCurrency :: Data.Text.Internal.Text,
BalanceTransaction -> Maybe Text
balanceTransactionDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
BalanceTransaction -> Maybe Double
balanceTransactionExchangeRate :: (GHC.Maybe.Maybe GHC.Types.Double),
BalanceTransaction -> Int
balanceTransactionFee :: GHC.Types.Int,
BalanceTransaction -> [Fee]
balanceTransactionFeeDetails :: ([Fee]),
BalanceTransaction -> Text
balanceTransactionId :: Data.Text.Internal.Text,
BalanceTransaction -> Int
balanceTransactionNet :: GHC.Types.Int,
BalanceTransaction -> Text
balanceTransactionReportingCategory :: Data.Text.Internal.Text,
BalanceTransaction -> Maybe BalanceTransactionSource'Variants
balanceTransactionSource :: (GHC.Maybe.Maybe BalanceTransactionSource'Variants),
BalanceTransaction -> Text
balanceTransactionStatus :: Data.Text.Internal.Text,
BalanceTransaction -> BalanceTransactionType'
balanceTransactionType :: BalanceTransactionType'
}
deriving
( Int -> BalanceTransaction -> ShowS
[BalanceTransaction] -> ShowS
BalanceTransaction -> String
(Int -> BalanceTransaction -> ShowS)
-> (BalanceTransaction -> String)
-> ([BalanceTransaction] -> ShowS)
-> Show BalanceTransaction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BalanceTransaction] -> ShowS
$cshowList :: [BalanceTransaction] -> ShowS
show :: BalanceTransaction -> String
$cshow :: BalanceTransaction -> String
showsPrec :: Int -> BalanceTransaction -> ShowS
$cshowsPrec :: Int -> BalanceTransaction -> ShowS
GHC.Show.Show,
BalanceTransaction -> BalanceTransaction -> Bool
(BalanceTransaction -> BalanceTransaction -> Bool)
-> (BalanceTransaction -> BalanceTransaction -> Bool)
-> Eq BalanceTransaction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BalanceTransaction -> BalanceTransaction -> Bool
$c/= :: BalanceTransaction -> BalanceTransaction -> Bool
== :: BalanceTransaction -> BalanceTransaction -> Bool
$c== :: BalanceTransaction -> BalanceTransaction -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON BalanceTransaction where
toJSON :: BalanceTransaction -> Value
toJSON BalanceTransaction
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"amount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Int
balanceTransactionAmount BalanceTransaction
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"available_on" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Int
balanceTransactionAvailableOn BalanceTransaction
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..= BalanceTransaction -> Int
balanceTransactionCreated BalanceTransaction
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"currency" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Text
balanceTransactionCurrency BalanceTransaction
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..= BalanceTransaction -> Maybe Text
balanceTransactionDescription BalanceTransaction
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"exchange_rate" Text -> Maybe Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Maybe Double
balanceTransactionExchangeRate BalanceTransaction
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"fee" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Int
balanceTransactionFee BalanceTransaction
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"fee_details" Text -> [Fee] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> [Fee]
balanceTransactionFeeDetails BalanceTransaction
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..= BalanceTransaction -> Text
balanceTransactionId BalanceTransaction
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"net" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Int
balanceTransactionNet BalanceTransaction
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"reporting_category" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Text
balanceTransactionReportingCategory BalanceTransaction
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"source" Text -> Maybe BalanceTransactionSource'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Maybe BalanceTransactionSource'Variants
balanceTransactionSource BalanceTransaction
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"status" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Text
balanceTransactionStatus BalanceTransaction
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"type" Text -> BalanceTransactionType' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> BalanceTransactionType'
balanceTransactionType BalanceTransaction
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
"balance_transaction" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: BalanceTransaction -> Encoding
toEncoding BalanceTransaction
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"amount" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Int
balanceTransactionAmount BalanceTransaction
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"available_on" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Int
balanceTransactionAvailableOn BalanceTransaction
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..= BalanceTransaction -> Int
balanceTransactionCreated BalanceTransaction
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"currency" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Text
balanceTransactionCurrency BalanceTransaction
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..= BalanceTransaction -> Maybe Text
balanceTransactionDescription BalanceTransaction
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"exchange_rate" Text -> Maybe Double -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Maybe Double
balanceTransactionExchangeRate BalanceTransaction
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"fee" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Int
balanceTransactionFee BalanceTransaction
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"fee_details" Text -> [Fee] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> [Fee]
balanceTransactionFeeDetails BalanceTransaction
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..= BalanceTransaction -> Text
balanceTransactionId BalanceTransaction
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"net" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Int
balanceTransactionNet BalanceTransaction
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"reporting_category" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Text
balanceTransactionReportingCategory BalanceTransaction
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"source" Text -> Maybe BalanceTransactionSource'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Maybe BalanceTransactionSource'Variants
balanceTransactionSource BalanceTransaction
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"status" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> Text
balanceTransactionStatus BalanceTransaction
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"type" Text -> BalanceTransactionType' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BalanceTransaction -> BalanceTransactionType'
balanceTransactionType BalanceTransaction
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
"balance_transaction")))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON BalanceTransaction where
parseJSON :: Value -> Parser BalanceTransaction
parseJSON = String
-> (Object -> Parser BalanceTransaction)
-> Value
-> Parser BalanceTransaction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"BalanceTransaction" (\Object
obj -> ((((((((((((((Int
-> Int
-> Int
-> Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser
(Int
-> Int
-> Int
-> Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Int
-> Int
-> Int
-> Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction
BalanceTransaction Parser
(Int
-> Int
-> Int
-> Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser Int
-> Parser
(Int
-> Int
-> Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
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
"amount")) Parser
(Int
-> Int
-> Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser Int
-> Parser
(Int
-> Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
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
"available_on")) Parser
(Int
-> Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser Int
-> Parser
(Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
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
(Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser Text
-> Parser
(Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
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
"currency")) Parser
(Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser (Maybe Text)
-> Parser
(Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
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 Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser (Maybe Double)
-> Parser
(Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"exchange_rate")) Parser
(Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser Int
-> Parser
([Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
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
"fee")) Parser
([Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser [Fee]
-> Parser
(Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [Fee]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"fee_details")) Parser
(Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser Text
-> Parser
(Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
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
(Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser Int
-> Parser
(Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
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
"net")) Parser
(Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction)
-> Parser Text
-> Parser
(Maybe BalanceTransactionSource'Variants
-> Text -> BalanceTransactionType' -> BalanceTransaction)
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
"reporting_category")) Parser
(Maybe BalanceTransactionSource'Variants
-> Text -> BalanceTransactionType' -> BalanceTransaction)
-> Parser (Maybe BalanceTransactionSource'Variants)
-> Parser (Text -> BalanceTransactionType' -> BalanceTransaction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe BalanceTransactionSource'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"source")) Parser (Text -> BalanceTransactionType' -> BalanceTransaction)
-> Parser Text
-> Parser (BalanceTransactionType' -> BalanceTransaction)
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
"status")) Parser (BalanceTransactionType' -> BalanceTransaction)
-> Parser BalanceTransactionType' -> Parser BalanceTransaction
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser BalanceTransactionType'
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"type"))
mkBalanceTransaction ::
GHC.Types.Int ->
GHC.Types.Int ->
GHC.Types.Int ->
Data.Text.Internal.Text ->
GHC.Types.Int ->
[Fee] ->
Data.Text.Internal.Text ->
GHC.Types.Int ->
Data.Text.Internal.Text ->
Data.Text.Internal.Text ->
BalanceTransactionType' ->
BalanceTransaction
mkBalanceTransaction :: Int
-> Int
-> Int
-> Text
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Text
-> BalanceTransactionType'
-> BalanceTransaction
mkBalanceTransaction Int
balanceTransactionAmount Int
balanceTransactionAvailableOn Int
balanceTransactionCreated Text
balanceTransactionCurrency Int
balanceTransactionFee [Fee]
balanceTransactionFeeDetails Text
balanceTransactionId Int
balanceTransactionNet Text
balanceTransactionReportingCategory Text
balanceTransactionStatus BalanceTransactionType'
balanceTransactionType =
BalanceTransaction :: Int
-> Int
-> Int
-> Text
-> Maybe Text
-> Maybe Double
-> Int
-> [Fee]
-> Text
-> Int
-> Text
-> Maybe BalanceTransactionSource'Variants
-> Text
-> BalanceTransactionType'
-> BalanceTransaction
BalanceTransaction
{ balanceTransactionAmount :: Int
balanceTransactionAmount = Int
balanceTransactionAmount,
balanceTransactionAvailableOn :: Int
balanceTransactionAvailableOn = Int
balanceTransactionAvailableOn,
balanceTransactionCreated :: Int
balanceTransactionCreated = Int
balanceTransactionCreated,
balanceTransactionCurrency :: Text
balanceTransactionCurrency = Text
balanceTransactionCurrency,
balanceTransactionDescription :: Maybe Text
balanceTransactionDescription = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
balanceTransactionExchangeRate :: Maybe Double
balanceTransactionExchangeRate = Maybe Double
forall a. Maybe a
GHC.Maybe.Nothing,
balanceTransactionFee :: Int
balanceTransactionFee = Int
balanceTransactionFee,
balanceTransactionFeeDetails :: [Fee]
balanceTransactionFeeDetails = [Fee]
balanceTransactionFeeDetails,
balanceTransactionId :: Text
balanceTransactionId = Text
balanceTransactionId,
balanceTransactionNet :: Int
balanceTransactionNet = Int
balanceTransactionNet,
balanceTransactionReportingCategory :: Text
balanceTransactionReportingCategory = Text
balanceTransactionReportingCategory,
balanceTransactionSource :: Maybe BalanceTransactionSource'Variants
balanceTransactionSource = Maybe BalanceTransactionSource'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
balanceTransactionStatus :: Text
balanceTransactionStatus = Text
balanceTransactionStatus,
balanceTransactionType :: BalanceTransactionType'
balanceTransactionType = BalanceTransactionType'
balanceTransactionType
}
data BalanceTransactionSource'Variants
= BalanceTransactionSource'Text Data.Text.Internal.Text
| BalanceTransactionSource'ApplicationFee ApplicationFee
| BalanceTransactionSource'Charge Charge
| BalanceTransactionSource'ConnectCollectionTransfer ConnectCollectionTransfer
| BalanceTransactionSource'Dispute Dispute
| BalanceTransactionSource'FeeRefund FeeRefund
| BalanceTransactionSource'Issuing'authorization Issuing'authorization
| BalanceTransactionSource'Issuing'dispute Issuing'dispute
| BalanceTransactionSource'Issuing'transaction Issuing'transaction
| BalanceTransactionSource'Payout Payout
| BalanceTransactionSource'PlatformTaxFee PlatformTaxFee
| BalanceTransactionSource'Refund Refund
| BalanceTransactionSource'ReserveTransaction ReserveTransaction
| BalanceTransactionSource'TaxDeductedAtSource TaxDeductedAtSource
| BalanceTransactionSource'Topup Topup
| BalanceTransactionSource'Transfer Transfer
| BalanceTransactionSource'TransferReversal TransferReversal
deriving (Int -> BalanceTransactionSource'Variants -> ShowS
[BalanceTransactionSource'Variants] -> ShowS
BalanceTransactionSource'Variants -> String
(Int -> BalanceTransactionSource'Variants -> ShowS)
-> (BalanceTransactionSource'Variants -> String)
-> ([BalanceTransactionSource'Variants] -> ShowS)
-> Show BalanceTransactionSource'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BalanceTransactionSource'Variants] -> ShowS
$cshowList :: [BalanceTransactionSource'Variants] -> ShowS
show :: BalanceTransactionSource'Variants -> String
$cshow :: BalanceTransactionSource'Variants -> String
showsPrec :: Int -> BalanceTransactionSource'Variants -> ShowS
$cshowsPrec :: Int -> BalanceTransactionSource'Variants -> ShowS
GHC.Show.Show, BalanceTransactionSource'Variants
-> BalanceTransactionSource'Variants -> Bool
(BalanceTransactionSource'Variants
-> BalanceTransactionSource'Variants -> Bool)
-> (BalanceTransactionSource'Variants
-> BalanceTransactionSource'Variants -> Bool)
-> Eq BalanceTransactionSource'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BalanceTransactionSource'Variants
-> BalanceTransactionSource'Variants -> Bool
$c/= :: BalanceTransactionSource'Variants
-> BalanceTransactionSource'Variants -> Bool
== :: BalanceTransactionSource'Variants
-> BalanceTransactionSource'Variants -> Bool
$c== :: BalanceTransactionSource'Variants
-> BalanceTransactionSource'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON BalanceTransactionSource'Variants where
toJSON :: BalanceTransactionSource'Variants -> Value
toJSON (BalanceTransactionSource'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (BalanceTransactionSource'ApplicationFee ApplicationFee
a) = ApplicationFee -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON ApplicationFee
a
toJSON (BalanceTransactionSource'Charge Charge
a) = Charge -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Charge
a
toJSON (BalanceTransactionSource'ConnectCollectionTransfer ConnectCollectionTransfer
a) = ConnectCollectionTransfer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON ConnectCollectionTransfer
a
toJSON (BalanceTransactionSource'Dispute Dispute
a) = Dispute -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Dispute
a
toJSON (BalanceTransactionSource'FeeRefund FeeRefund
a) = FeeRefund -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON FeeRefund
a
toJSON (BalanceTransactionSource'Issuing'authorization Issuing'authorization
a) = Issuing'authorization -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Issuing'authorization
a
toJSON (BalanceTransactionSource'Issuing'dispute Issuing'dispute
a) = Issuing'dispute -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Issuing'dispute
a
toJSON (BalanceTransactionSource'Issuing'transaction Issuing'transaction
a) = Issuing'transaction -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Issuing'transaction
a
toJSON (BalanceTransactionSource'Payout Payout
a) = Payout -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Payout
a
toJSON (BalanceTransactionSource'PlatformTaxFee PlatformTaxFee
a) = PlatformTaxFee -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON PlatformTaxFee
a
toJSON (BalanceTransactionSource'Refund Refund
a) = Refund -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Refund
a
toJSON (BalanceTransactionSource'ReserveTransaction ReserveTransaction
a) = ReserveTransaction -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON ReserveTransaction
a
toJSON (BalanceTransactionSource'TaxDeductedAtSource TaxDeductedAtSource
a) = TaxDeductedAtSource -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON TaxDeductedAtSource
a
toJSON (BalanceTransactionSource'Topup Topup
a) = Topup -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Topup
a
toJSON (BalanceTransactionSource'Transfer Transfer
a) = Transfer -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Transfer
a
toJSON (BalanceTransactionSource'TransferReversal TransferReversal
a) = TransferReversal -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON TransferReversal
a
instance Data.Aeson.Types.FromJSON.FromJSON BalanceTransactionSource'Variants where
parseJSON :: Value -> Parser BalanceTransactionSource'Variants
parseJSON Value
val = case (Text -> BalanceTransactionSource'Variants
BalanceTransactionSource'Text (Text -> BalanceTransactionSource'Variants)
-> Result Text -> Result BalanceTransactionSource'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 BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((ApplicationFee -> BalanceTransactionSource'Variants
BalanceTransactionSource'ApplicationFee (ApplicationFee -> BalanceTransactionSource'Variants)
-> Result ApplicationFee
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result ApplicationFee
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Charge -> BalanceTransactionSource'Variants
BalanceTransactionSource'Charge (Charge -> BalanceTransactionSource'Variants)
-> Result Charge -> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Charge
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((ConnectCollectionTransfer -> BalanceTransactionSource'Variants
BalanceTransactionSource'ConnectCollectionTransfer (ConnectCollectionTransfer -> BalanceTransactionSource'Variants)
-> Result ConnectCollectionTransfer
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result ConnectCollectionTransfer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Dispute -> BalanceTransactionSource'Variants
BalanceTransactionSource'Dispute (Dispute -> BalanceTransactionSource'Variants)
-> Result Dispute -> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Dispute
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((FeeRefund -> BalanceTransactionSource'Variants
BalanceTransactionSource'FeeRefund (FeeRefund -> BalanceTransactionSource'Variants)
-> Result FeeRefund -> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result FeeRefund
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Issuing'authorization -> BalanceTransactionSource'Variants
BalanceTransactionSource'Issuing'authorization (Issuing'authorization -> BalanceTransactionSource'Variants)
-> Result Issuing'authorization
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Issuing'authorization
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Issuing'dispute -> BalanceTransactionSource'Variants
BalanceTransactionSource'Issuing'dispute (Issuing'dispute -> BalanceTransactionSource'Variants)
-> Result Issuing'dispute
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Issuing'dispute
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Issuing'transaction -> BalanceTransactionSource'Variants
BalanceTransactionSource'Issuing'transaction (Issuing'transaction -> BalanceTransactionSource'Variants)
-> Result Issuing'transaction
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Issuing'transaction
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Payout -> BalanceTransactionSource'Variants
BalanceTransactionSource'Payout (Payout -> BalanceTransactionSource'Variants)
-> Result Payout -> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Payout
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((PlatformTaxFee -> BalanceTransactionSource'Variants
BalanceTransactionSource'PlatformTaxFee (PlatformTaxFee -> BalanceTransactionSource'Variants)
-> Result PlatformTaxFee
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result PlatformTaxFee
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Refund -> BalanceTransactionSource'Variants
BalanceTransactionSource'Refund (Refund -> BalanceTransactionSource'Variants)
-> Result Refund -> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Refund
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((ReserveTransaction -> BalanceTransactionSource'Variants
BalanceTransactionSource'ReserveTransaction (ReserveTransaction -> BalanceTransactionSource'Variants)
-> Result ReserveTransaction
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result ReserveTransaction
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((TaxDeductedAtSource -> BalanceTransactionSource'Variants
BalanceTransactionSource'TaxDeductedAtSource (TaxDeductedAtSource -> BalanceTransactionSource'Variants)
-> Result TaxDeductedAtSource
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result TaxDeductedAtSource
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Topup -> BalanceTransactionSource'Variants
BalanceTransactionSource'Topup (Topup -> BalanceTransactionSource'Variants)
-> Result Topup -> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Topup
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Transfer -> BalanceTransactionSource'Variants
BalanceTransactionSource'Transfer (Transfer -> BalanceTransactionSource'Variants)
-> Result Transfer -> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Transfer
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((TransferReversal -> BalanceTransactionSource'Variants
BalanceTransactionSource'TransferReversal (TransferReversal -> BalanceTransactionSource'Variants)
-> Result TransferReversal
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result TransferReversal
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
-> Result BalanceTransactionSource'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result BalanceTransactionSource'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched")))))))))))))))) of
Data.Aeson.Types.Internal.Success BalanceTransactionSource'Variants
a -> BalanceTransactionSource'Variants
-> Parser BalanceTransactionSource'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure BalanceTransactionSource'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser BalanceTransactionSource'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data BalanceTransactionType'
=
BalanceTransactionType'Other Data.Aeson.Types.Internal.Value
|
BalanceTransactionType'Typed Data.Text.Internal.Text
|
BalanceTransactionType'EnumAdjustment
|
BalanceTransactionType'EnumAdvance
|
BalanceTransactionType'EnumAdvanceFunding
|
BalanceTransactionType'EnumAnticipationRepayment
|
BalanceTransactionType'EnumApplicationFee
|
BalanceTransactionType'EnumApplicationFeeRefund
|
BalanceTransactionType'EnumCharge
|
BalanceTransactionType'EnumConnectCollectionTransfer
|
BalanceTransactionType'EnumContribution
|
BalanceTransactionType'EnumIssuingAuthorizationHold
|
BalanceTransactionType'EnumIssuingAuthorizationRelease
|
BalanceTransactionType'EnumIssuingDispute
|
BalanceTransactionType'EnumIssuingTransaction
|
BalanceTransactionType'EnumPayment
|
BalanceTransactionType'EnumPaymentFailureRefund
|
BalanceTransactionType'EnumPaymentRefund
|
BalanceTransactionType'EnumPayout
|
BalanceTransactionType'EnumPayoutCancel
|
BalanceTransactionType'EnumPayoutFailure
|
BalanceTransactionType'EnumRefund
|
BalanceTransactionType'EnumRefundFailure
|
BalanceTransactionType'EnumReserveTransaction
|
BalanceTransactionType'EnumReservedFunds
|
BalanceTransactionType'EnumStripeFee
|
BalanceTransactionType'EnumStripeFxFee
|
BalanceTransactionType'EnumTaxFee
|
BalanceTransactionType'EnumTopup
|
BalanceTransactionType'EnumTopupReversal
|
BalanceTransactionType'EnumTransfer
|
BalanceTransactionType'EnumTransferCancel
|
BalanceTransactionType'EnumTransferFailure
|
BalanceTransactionType'EnumTransferRefund
deriving (Int -> BalanceTransactionType' -> ShowS
[BalanceTransactionType'] -> ShowS
BalanceTransactionType' -> String
(Int -> BalanceTransactionType' -> ShowS)
-> (BalanceTransactionType' -> String)
-> ([BalanceTransactionType'] -> ShowS)
-> Show BalanceTransactionType'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BalanceTransactionType'] -> ShowS
$cshowList :: [BalanceTransactionType'] -> ShowS
show :: BalanceTransactionType' -> String
$cshow :: BalanceTransactionType' -> String
showsPrec :: Int -> BalanceTransactionType' -> ShowS
$cshowsPrec :: Int -> BalanceTransactionType' -> ShowS
GHC.Show.Show, BalanceTransactionType' -> BalanceTransactionType' -> Bool
(BalanceTransactionType' -> BalanceTransactionType' -> Bool)
-> (BalanceTransactionType' -> BalanceTransactionType' -> Bool)
-> Eq BalanceTransactionType'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BalanceTransactionType' -> BalanceTransactionType' -> Bool
$c/= :: BalanceTransactionType' -> BalanceTransactionType' -> Bool
== :: BalanceTransactionType' -> BalanceTransactionType' -> Bool
$c== :: BalanceTransactionType' -> BalanceTransactionType' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON BalanceTransactionType' where
toJSON :: BalanceTransactionType' -> Value
toJSON (BalanceTransactionType'Other Value
val) = Value
val
toJSON (BalanceTransactionType'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumAdjustment) = Value
"adjustment"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumAdvance) = Value
"advance"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumAdvanceFunding) = Value
"advance_funding"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumAnticipationRepayment) = Value
"anticipation_repayment"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumApplicationFee) = Value
"application_fee"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumApplicationFeeRefund) = Value
"application_fee_refund"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumCharge) = Value
"charge"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumConnectCollectionTransfer) = Value
"connect_collection_transfer"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumContribution) = Value
"contribution"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumIssuingAuthorizationHold) = Value
"issuing_authorization_hold"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumIssuingAuthorizationRelease) = Value
"issuing_authorization_release"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumIssuingDispute) = Value
"issuing_dispute"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumIssuingTransaction) = Value
"issuing_transaction"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumPayment) = Value
"payment"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumPaymentFailureRefund) = Value
"payment_failure_refund"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumPaymentRefund) = Value
"payment_refund"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumPayout) = Value
"payout"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumPayoutCancel) = Value
"payout_cancel"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumPayoutFailure) = Value
"payout_failure"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumRefund) = Value
"refund"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumRefundFailure) = Value
"refund_failure"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumReserveTransaction) = Value
"reserve_transaction"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumReservedFunds) = Value
"reserved_funds"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumStripeFee) = Value
"stripe_fee"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumStripeFxFee) = Value
"stripe_fx_fee"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumTaxFee) = Value
"tax_fee"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumTopup) = Value
"topup"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumTopupReversal) = Value
"topup_reversal"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumTransfer) = Value
"transfer"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumTransferCancel) = Value
"transfer_cancel"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumTransferFailure) = Value
"transfer_failure"
toJSON (BalanceTransactionType'
BalanceTransactionType'EnumTransferRefund) = Value
"transfer_refund"
instance Data.Aeson.Types.FromJSON.FromJSON BalanceTransactionType' where
parseJSON :: Value -> Parser BalanceTransactionType'
parseJSON Value
val =
BalanceTransactionType' -> Parser BalanceTransactionType'
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
"adjustment" -> BalanceTransactionType'
BalanceTransactionType'EnumAdjustment
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"advance" -> BalanceTransactionType'
BalanceTransactionType'EnumAdvance
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"advance_funding" -> BalanceTransactionType'
BalanceTransactionType'EnumAdvanceFunding
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"anticipation_repayment" -> BalanceTransactionType'
BalanceTransactionType'EnumAnticipationRepayment
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"application_fee" -> BalanceTransactionType'
BalanceTransactionType'EnumApplicationFee
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"application_fee_refund" -> BalanceTransactionType'
BalanceTransactionType'EnumApplicationFeeRefund
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"charge" -> BalanceTransactionType'
BalanceTransactionType'EnumCharge
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"connect_collection_transfer" -> BalanceTransactionType'
BalanceTransactionType'EnumConnectCollectionTransfer
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"contribution" -> BalanceTransactionType'
BalanceTransactionType'EnumContribution
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"issuing_authorization_hold" -> BalanceTransactionType'
BalanceTransactionType'EnumIssuingAuthorizationHold
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"issuing_authorization_release" -> BalanceTransactionType'
BalanceTransactionType'EnumIssuingAuthorizationRelease
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"issuing_dispute" -> BalanceTransactionType'
BalanceTransactionType'EnumIssuingDispute
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"issuing_transaction" -> BalanceTransactionType'
BalanceTransactionType'EnumIssuingTransaction
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"payment" -> BalanceTransactionType'
BalanceTransactionType'EnumPayment
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"payment_failure_refund" -> BalanceTransactionType'
BalanceTransactionType'EnumPaymentFailureRefund
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"payment_refund" -> BalanceTransactionType'
BalanceTransactionType'EnumPaymentRefund
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"payout" -> BalanceTransactionType'
BalanceTransactionType'EnumPayout
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"payout_cancel" -> BalanceTransactionType'
BalanceTransactionType'EnumPayoutCancel
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"payout_failure" -> BalanceTransactionType'
BalanceTransactionType'EnumPayoutFailure
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"refund" -> BalanceTransactionType'
BalanceTransactionType'EnumRefund
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"refund_failure" -> BalanceTransactionType'
BalanceTransactionType'EnumRefundFailure
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"reserve_transaction" -> BalanceTransactionType'
BalanceTransactionType'EnumReserveTransaction
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"reserved_funds" -> BalanceTransactionType'
BalanceTransactionType'EnumReservedFunds
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"stripe_fee" -> BalanceTransactionType'
BalanceTransactionType'EnumStripeFee
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"stripe_fx_fee" -> BalanceTransactionType'
BalanceTransactionType'EnumStripeFxFee
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"tax_fee" -> BalanceTransactionType'
BalanceTransactionType'EnumTaxFee
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"topup" -> BalanceTransactionType'
BalanceTransactionType'EnumTopup
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"topup_reversal" -> BalanceTransactionType'
BalanceTransactionType'EnumTopupReversal
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"transfer" -> BalanceTransactionType'
BalanceTransactionType'EnumTransfer
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"transfer_cancel" -> BalanceTransactionType'
BalanceTransactionType'EnumTransferCancel
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"transfer_failure" -> BalanceTransactionType'
BalanceTransactionType'EnumTransferFailure
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"transfer_refund" -> BalanceTransactionType'
BalanceTransactionType'EnumTransferRefund
| Bool
GHC.Base.otherwise -> Value -> BalanceTransactionType'
BalanceTransactionType'Other Value
val
)