{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.PaymentMethodOptionsCardInstallments 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.PaymentMethodDetailsCardInstallmentsPlan
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data PaymentMethodOptionsCardInstallments = PaymentMethodOptionsCardInstallments
{
PaymentMethodOptionsCardInstallments
-> Maybe [PaymentMethodDetailsCardInstallmentsPlan]
paymentMethodOptionsCardInstallmentsAvailablePlans :: (GHC.Maybe.Maybe ([PaymentMethodDetailsCardInstallmentsPlan])),
PaymentMethodOptionsCardInstallments -> Bool
paymentMethodOptionsCardInstallmentsEnabled :: GHC.Types.Bool,
PaymentMethodOptionsCardInstallments
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'
paymentMethodOptionsCardInstallmentsPlan :: (GHC.Maybe.Maybe PaymentMethodOptionsCardInstallmentsPlan')
}
deriving
( Int -> PaymentMethodOptionsCardInstallments -> ShowS
[PaymentMethodOptionsCardInstallments] -> ShowS
PaymentMethodOptionsCardInstallments -> String
(Int -> PaymentMethodOptionsCardInstallments -> ShowS)
-> (PaymentMethodOptionsCardInstallments -> String)
-> ([PaymentMethodOptionsCardInstallments] -> ShowS)
-> Show PaymentMethodOptionsCardInstallments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodOptionsCardInstallments] -> ShowS
$cshowList :: [PaymentMethodOptionsCardInstallments] -> ShowS
show :: PaymentMethodOptionsCardInstallments -> String
$cshow :: PaymentMethodOptionsCardInstallments -> String
showsPrec :: Int -> PaymentMethodOptionsCardInstallments -> ShowS
$cshowsPrec :: Int -> PaymentMethodOptionsCardInstallments -> ShowS
GHC.Show.Show,
PaymentMethodOptionsCardInstallments
-> PaymentMethodOptionsCardInstallments -> Bool
(PaymentMethodOptionsCardInstallments
-> PaymentMethodOptionsCardInstallments -> Bool)
-> (PaymentMethodOptionsCardInstallments
-> PaymentMethodOptionsCardInstallments -> Bool)
-> Eq PaymentMethodOptionsCardInstallments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodOptionsCardInstallments
-> PaymentMethodOptionsCardInstallments -> Bool
$c/= :: PaymentMethodOptionsCardInstallments
-> PaymentMethodOptionsCardInstallments -> Bool
== :: PaymentMethodOptionsCardInstallments
-> PaymentMethodOptionsCardInstallments -> Bool
$c== :: PaymentMethodOptionsCardInstallments
-> PaymentMethodOptionsCardInstallments -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodOptionsCardInstallments where
toJSON :: PaymentMethodOptionsCardInstallments -> Value
toJSON PaymentMethodOptionsCardInstallments
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"available_plans" Text -> Maybe [PaymentMethodDetailsCardInstallmentsPlan] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallments
-> Maybe [PaymentMethodDetailsCardInstallmentsPlan]
paymentMethodOptionsCardInstallmentsAvailablePlans PaymentMethodOptionsCardInstallments
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallments -> Bool
paymentMethodOptionsCardInstallmentsEnabled PaymentMethodOptionsCardInstallments
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"plan" Text -> Maybe PaymentMethodOptionsCardInstallmentsPlan' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallments
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'
paymentMethodOptionsCardInstallmentsPlan PaymentMethodOptionsCardInstallments
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PaymentMethodOptionsCardInstallments -> Encoding
toEncoding PaymentMethodOptionsCardInstallments
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"available_plans" Text -> Maybe [PaymentMethodDetailsCardInstallmentsPlan] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallments
-> Maybe [PaymentMethodDetailsCardInstallmentsPlan]
paymentMethodOptionsCardInstallmentsAvailablePlans PaymentMethodOptionsCardInstallments
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"enabled" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallments -> Bool
paymentMethodOptionsCardInstallmentsEnabled PaymentMethodOptionsCardInstallments
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"plan" Text -> Maybe PaymentMethodOptionsCardInstallmentsPlan' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallments
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'
paymentMethodOptionsCardInstallmentsPlan PaymentMethodOptionsCardInstallments
obj)))
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodOptionsCardInstallments where
parseJSON :: Value -> Parser PaymentMethodOptionsCardInstallments
parseJSON = String
-> (Object -> Parser PaymentMethodOptionsCardInstallments)
-> Value
-> Parser PaymentMethodOptionsCardInstallments
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodOptionsCardInstallments" (\Object
obj -> (((Maybe [PaymentMethodDetailsCardInstallmentsPlan]
-> Bool
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallments)
-> Parser
(Maybe [PaymentMethodDetailsCardInstallmentsPlan]
-> Bool
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallments)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe [PaymentMethodDetailsCardInstallmentsPlan]
-> Bool
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallments
PaymentMethodOptionsCardInstallments Parser
(Maybe [PaymentMethodDetailsCardInstallmentsPlan]
-> Bool
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallments)
-> Parser (Maybe [PaymentMethodDetailsCardInstallmentsPlan])
-> Parser
(Bool
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallments)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe [PaymentMethodDetailsCardInstallmentsPlan])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"available_plans")) Parser
(Bool
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallments)
-> Parser Bool
-> Parser
(Maybe PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallments)
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
"enabled")) Parser
(Maybe PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallments)
-> Parser (Maybe PaymentMethodOptionsCardInstallmentsPlan')
-> Parser PaymentMethodOptionsCardInstallments
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe PaymentMethodOptionsCardInstallmentsPlan')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"plan"))
mkPaymentMethodOptionsCardInstallments ::
GHC.Types.Bool ->
PaymentMethodOptionsCardInstallments
mkPaymentMethodOptionsCardInstallments :: Bool -> PaymentMethodOptionsCardInstallments
mkPaymentMethodOptionsCardInstallments Bool
paymentMethodOptionsCardInstallmentsEnabled =
PaymentMethodOptionsCardInstallments :: Maybe [PaymentMethodDetailsCardInstallmentsPlan]
-> Bool
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallments
PaymentMethodOptionsCardInstallments
{ paymentMethodOptionsCardInstallmentsAvailablePlans :: Maybe [PaymentMethodDetailsCardInstallmentsPlan]
paymentMethodOptionsCardInstallmentsAvailablePlans = Maybe [PaymentMethodDetailsCardInstallmentsPlan]
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodOptionsCardInstallmentsEnabled :: Bool
paymentMethodOptionsCardInstallmentsEnabled = Bool
paymentMethodOptionsCardInstallmentsEnabled,
paymentMethodOptionsCardInstallmentsPlan :: Maybe PaymentMethodOptionsCardInstallmentsPlan'
paymentMethodOptionsCardInstallmentsPlan = Maybe PaymentMethodOptionsCardInstallmentsPlan'
forall a. Maybe a
GHC.Maybe.Nothing
}
data PaymentMethodOptionsCardInstallmentsPlan' = PaymentMethodOptionsCardInstallmentsPlan'
{
PaymentMethodOptionsCardInstallmentsPlan' -> Maybe Int
paymentMethodOptionsCardInstallmentsPlan'Count :: (GHC.Maybe.Maybe GHC.Types.Int),
PaymentMethodOptionsCardInstallmentsPlan'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
paymentMethodOptionsCardInstallmentsPlan'Interval :: (GHC.Maybe.Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'),
PaymentMethodOptionsCardInstallmentsPlan'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
paymentMethodOptionsCardInstallmentsPlan'Type :: (GHC.Maybe.Maybe PaymentMethodOptionsCardInstallmentsPlan'Type')
}
deriving
( Int -> PaymentMethodOptionsCardInstallmentsPlan' -> ShowS
[PaymentMethodOptionsCardInstallmentsPlan'] -> ShowS
PaymentMethodOptionsCardInstallmentsPlan' -> String
(Int -> PaymentMethodOptionsCardInstallmentsPlan' -> ShowS)
-> (PaymentMethodOptionsCardInstallmentsPlan' -> String)
-> ([PaymentMethodOptionsCardInstallmentsPlan'] -> ShowS)
-> Show PaymentMethodOptionsCardInstallmentsPlan'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodOptionsCardInstallmentsPlan'] -> ShowS
$cshowList :: [PaymentMethodOptionsCardInstallmentsPlan'] -> ShowS
show :: PaymentMethodOptionsCardInstallmentsPlan' -> String
$cshow :: PaymentMethodOptionsCardInstallmentsPlan' -> String
showsPrec :: Int -> PaymentMethodOptionsCardInstallmentsPlan' -> ShowS
$cshowsPrec :: Int -> PaymentMethodOptionsCardInstallmentsPlan' -> ShowS
GHC.Show.Show,
PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallmentsPlan' -> Bool
(PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallmentsPlan' -> Bool)
-> (PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallmentsPlan' -> Bool)
-> Eq PaymentMethodOptionsCardInstallmentsPlan'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallmentsPlan' -> Bool
$c/= :: PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallmentsPlan' -> Bool
== :: PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallmentsPlan' -> Bool
$c== :: PaymentMethodOptionsCardInstallmentsPlan'
-> PaymentMethodOptionsCardInstallmentsPlan' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodOptionsCardInstallmentsPlan' where
toJSON :: PaymentMethodOptionsCardInstallmentsPlan' -> Value
toJSON PaymentMethodOptionsCardInstallmentsPlan'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"count" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallmentsPlan' -> Maybe Int
paymentMethodOptionsCardInstallmentsPlan'Count PaymentMethodOptionsCardInstallmentsPlan'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"interval" Text
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallmentsPlan'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
paymentMethodOptionsCardInstallmentsPlan'Interval PaymentMethodOptionsCardInstallmentsPlan'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"type" Text
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallmentsPlan'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
paymentMethodOptionsCardInstallmentsPlan'Type PaymentMethodOptionsCardInstallmentsPlan'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PaymentMethodOptionsCardInstallmentsPlan' -> Encoding
toEncoding PaymentMethodOptionsCardInstallmentsPlan'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"count" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallmentsPlan' -> Maybe Int
paymentMethodOptionsCardInstallmentsPlan'Count PaymentMethodOptionsCardInstallmentsPlan'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"interval" Text
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallmentsPlan'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
paymentMethodOptionsCardInstallmentsPlan'Interval PaymentMethodOptionsCardInstallmentsPlan'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"type" Text
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodOptionsCardInstallmentsPlan'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
paymentMethodOptionsCardInstallmentsPlan'Type PaymentMethodOptionsCardInstallmentsPlan'
obj)))
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodOptionsCardInstallmentsPlan' where
parseJSON :: Value -> Parser PaymentMethodOptionsCardInstallmentsPlan'
parseJSON = String
-> (Object -> Parser PaymentMethodOptionsCardInstallmentsPlan')
-> Value
-> Parser PaymentMethodOptionsCardInstallmentsPlan'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodOptionsCardInstallmentsPlan'" (\Object
obj -> (((Maybe Int
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan')
-> Parser
(Maybe Int
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Int
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan'
PaymentMethodOptionsCardInstallmentsPlan' Parser
(Maybe Int
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan')
-> Parser (Maybe Int)
-> Parser
(Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"count")) Parser
(Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan')
-> Parser
(Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval')
-> Parser
(Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"interval")) Parser
(Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan')
-> Parser (Maybe PaymentMethodOptionsCardInstallmentsPlan'Type')
-> Parser PaymentMethodOptionsCardInstallmentsPlan'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe PaymentMethodOptionsCardInstallmentsPlan'Type')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"type"))
mkPaymentMethodOptionsCardInstallmentsPlan' :: PaymentMethodOptionsCardInstallmentsPlan'
mkPaymentMethodOptionsCardInstallmentsPlan' :: PaymentMethodOptionsCardInstallmentsPlan'
mkPaymentMethodOptionsCardInstallmentsPlan' =
PaymentMethodOptionsCardInstallmentsPlan' :: Maybe Int
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan'
PaymentMethodOptionsCardInstallmentsPlan'
{ paymentMethodOptionsCardInstallmentsPlan'Count :: Maybe Int
paymentMethodOptionsCardInstallmentsPlan'Count = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodOptionsCardInstallmentsPlan'Interval :: Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
paymentMethodOptionsCardInstallmentsPlan'Interval = Maybe PaymentMethodOptionsCardInstallmentsPlan'Interval'
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodOptionsCardInstallmentsPlan'Type :: Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
paymentMethodOptionsCardInstallmentsPlan'Type = Maybe PaymentMethodOptionsCardInstallmentsPlan'Type'
forall a. Maybe a
GHC.Maybe.Nothing
}
data PaymentMethodOptionsCardInstallmentsPlan'Interval'
=
PaymentMethodOptionsCardInstallmentsPlan'Interval'Other Data.Aeson.Types.Internal.Value
|
PaymentMethodOptionsCardInstallmentsPlan'Interval'Typed Data.Text.Internal.Text
|
PaymentMethodOptionsCardInstallmentsPlan'Interval'EnumMonth
deriving (Int -> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> ShowS
[PaymentMethodOptionsCardInstallmentsPlan'Interval'] -> ShowS
PaymentMethodOptionsCardInstallmentsPlan'Interval' -> String
(Int
-> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> ShowS)
-> (PaymentMethodOptionsCardInstallmentsPlan'Interval' -> String)
-> ([PaymentMethodOptionsCardInstallmentsPlan'Interval'] -> ShowS)
-> Show PaymentMethodOptionsCardInstallmentsPlan'Interval'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodOptionsCardInstallmentsPlan'Interval'] -> ShowS
$cshowList :: [PaymentMethodOptionsCardInstallmentsPlan'Interval'] -> ShowS
show :: PaymentMethodOptionsCardInstallmentsPlan'Interval' -> String
$cshow :: PaymentMethodOptionsCardInstallmentsPlan'Interval' -> String
showsPrec :: Int -> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> ShowS
$cshowsPrec :: Int -> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> ShowS
GHC.Show.Show, PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> Bool
(PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> Bool)
-> (PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> Bool)
-> Eq PaymentMethodOptionsCardInstallmentsPlan'Interval'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> Bool
$c/= :: PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> Bool
== :: PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> Bool
$c== :: PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> PaymentMethodOptionsCardInstallmentsPlan'Interval' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodOptionsCardInstallmentsPlan'Interval' where
toJSON :: PaymentMethodOptionsCardInstallmentsPlan'Interval' -> Value
toJSON (PaymentMethodOptionsCardInstallmentsPlan'Interval'Other Value
val) = Value
val
toJSON (PaymentMethodOptionsCardInstallmentsPlan'Interval'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (PaymentMethodOptionsCardInstallmentsPlan'Interval'
PaymentMethodOptionsCardInstallmentsPlan'Interval'EnumMonth) = Value
"month"
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodOptionsCardInstallmentsPlan'Interval' where
parseJSON :: Value -> Parser PaymentMethodOptionsCardInstallmentsPlan'Interval'
parseJSON Value
val =
PaymentMethodOptionsCardInstallmentsPlan'Interval'
-> Parser PaymentMethodOptionsCardInstallmentsPlan'Interval'
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
"month" -> PaymentMethodOptionsCardInstallmentsPlan'Interval'
PaymentMethodOptionsCardInstallmentsPlan'Interval'EnumMonth
| Bool
GHC.Base.otherwise -> Value -> PaymentMethodOptionsCardInstallmentsPlan'Interval'
PaymentMethodOptionsCardInstallmentsPlan'Interval'Other Value
val
)
data PaymentMethodOptionsCardInstallmentsPlan'Type'
=
PaymentMethodOptionsCardInstallmentsPlan'Type'Other Data.Aeson.Types.Internal.Value
|
PaymentMethodOptionsCardInstallmentsPlan'Type'Typed Data.Text.Internal.Text
|
PaymentMethodOptionsCardInstallmentsPlan'Type'EnumFixedCount
deriving (Int -> PaymentMethodOptionsCardInstallmentsPlan'Type' -> ShowS
[PaymentMethodOptionsCardInstallmentsPlan'Type'] -> ShowS
PaymentMethodOptionsCardInstallmentsPlan'Type' -> String
(Int -> PaymentMethodOptionsCardInstallmentsPlan'Type' -> ShowS)
-> (PaymentMethodOptionsCardInstallmentsPlan'Type' -> String)
-> ([PaymentMethodOptionsCardInstallmentsPlan'Type'] -> ShowS)
-> Show PaymentMethodOptionsCardInstallmentsPlan'Type'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodOptionsCardInstallmentsPlan'Type'] -> ShowS
$cshowList :: [PaymentMethodOptionsCardInstallmentsPlan'Type'] -> ShowS
show :: PaymentMethodOptionsCardInstallmentsPlan'Type' -> String
$cshow :: PaymentMethodOptionsCardInstallmentsPlan'Type' -> String
showsPrec :: Int -> PaymentMethodOptionsCardInstallmentsPlan'Type' -> ShowS
$cshowsPrec :: Int -> PaymentMethodOptionsCardInstallmentsPlan'Type' -> ShowS
GHC.Show.Show, PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan'Type' -> Bool
(PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan'Type' -> Bool)
-> (PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan'Type' -> Bool)
-> Eq PaymentMethodOptionsCardInstallmentsPlan'Type'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan'Type' -> Bool
$c/= :: PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan'Type' -> Bool
== :: PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan'Type' -> Bool
$c== :: PaymentMethodOptionsCardInstallmentsPlan'Type'
-> PaymentMethodOptionsCardInstallmentsPlan'Type' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodOptionsCardInstallmentsPlan'Type' where
toJSON :: PaymentMethodOptionsCardInstallmentsPlan'Type' -> Value
toJSON (PaymentMethodOptionsCardInstallmentsPlan'Type'Other Value
val) = Value
val
toJSON (PaymentMethodOptionsCardInstallmentsPlan'Type'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (PaymentMethodOptionsCardInstallmentsPlan'Type'
PaymentMethodOptionsCardInstallmentsPlan'Type'EnumFixedCount) = Value
"fixed_count"
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodOptionsCardInstallmentsPlan'Type' where
parseJSON :: Value -> Parser PaymentMethodOptionsCardInstallmentsPlan'Type'
parseJSON Value
val =
PaymentMethodOptionsCardInstallmentsPlan'Type'
-> Parser PaymentMethodOptionsCardInstallmentsPlan'Type'
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
"fixed_count" -> PaymentMethodOptionsCardInstallmentsPlan'Type'
PaymentMethodOptionsCardInstallmentsPlan'Type'EnumFixedCount
| Bool
GHC.Base.otherwise -> Value -> PaymentMethodOptionsCardInstallmentsPlan'Type'
PaymentMethodOptionsCardInstallmentsPlan'Type'Other Value
val
)