{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.PaymentPagesCheckoutSessionTaxIdCollection 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 qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data PaymentPagesCheckoutSessionTaxIdCollection = PaymentPagesCheckoutSessionTaxIdCollection
{
PaymentPagesCheckoutSessionTaxIdCollection -> Bool
paymentPagesCheckoutSessionTaxIdCollectionEnabled :: GHC.Types.Bool
}
deriving
( Int -> PaymentPagesCheckoutSessionTaxIdCollection -> ShowS
[PaymentPagesCheckoutSessionTaxIdCollection] -> ShowS
PaymentPagesCheckoutSessionTaxIdCollection -> String
(Int -> PaymentPagesCheckoutSessionTaxIdCollection -> ShowS)
-> (PaymentPagesCheckoutSessionTaxIdCollection -> String)
-> ([PaymentPagesCheckoutSessionTaxIdCollection] -> ShowS)
-> Show PaymentPagesCheckoutSessionTaxIdCollection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentPagesCheckoutSessionTaxIdCollection] -> ShowS
$cshowList :: [PaymentPagesCheckoutSessionTaxIdCollection] -> ShowS
show :: PaymentPagesCheckoutSessionTaxIdCollection -> String
$cshow :: PaymentPagesCheckoutSessionTaxIdCollection -> String
showsPrec :: Int -> PaymentPagesCheckoutSessionTaxIdCollection -> ShowS
$cshowsPrec :: Int -> PaymentPagesCheckoutSessionTaxIdCollection -> ShowS
GHC.Show.Show,
PaymentPagesCheckoutSessionTaxIdCollection
-> PaymentPagesCheckoutSessionTaxIdCollection -> Bool
(PaymentPagesCheckoutSessionTaxIdCollection
-> PaymentPagesCheckoutSessionTaxIdCollection -> Bool)
-> (PaymentPagesCheckoutSessionTaxIdCollection
-> PaymentPagesCheckoutSessionTaxIdCollection -> Bool)
-> Eq PaymentPagesCheckoutSessionTaxIdCollection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentPagesCheckoutSessionTaxIdCollection
-> PaymentPagesCheckoutSessionTaxIdCollection -> Bool
$c/= :: PaymentPagesCheckoutSessionTaxIdCollection
-> PaymentPagesCheckoutSessionTaxIdCollection -> Bool
== :: PaymentPagesCheckoutSessionTaxIdCollection
-> PaymentPagesCheckoutSessionTaxIdCollection -> Bool
$c== :: PaymentPagesCheckoutSessionTaxIdCollection
-> PaymentPagesCheckoutSessionTaxIdCollection -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentPagesCheckoutSessionTaxIdCollection where
toJSON :: PaymentPagesCheckoutSessionTaxIdCollection -> Value
toJSON PaymentPagesCheckoutSessionTaxIdCollection
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentPagesCheckoutSessionTaxIdCollection -> Bool
paymentPagesCheckoutSessionTaxIdCollectionEnabled PaymentPagesCheckoutSessionTaxIdCollection
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PaymentPagesCheckoutSessionTaxIdCollection -> Encoding
toEncoding PaymentPagesCheckoutSessionTaxIdCollection
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs (Text
"enabled" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentPagesCheckoutSessionTaxIdCollection -> Bool
paymentPagesCheckoutSessionTaxIdCollectionEnabled PaymentPagesCheckoutSessionTaxIdCollection
obj)
instance Data.Aeson.Types.FromJSON.FromJSON PaymentPagesCheckoutSessionTaxIdCollection where
parseJSON :: Value -> Parser PaymentPagesCheckoutSessionTaxIdCollection
parseJSON = String
-> (Object -> Parser PaymentPagesCheckoutSessionTaxIdCollection)
-> Value
-> Parser PaymentPagesCheckoutSessionTaxIdCollection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentPagesCheckoutSessionTaxIdCollection" (\Object
obj -> (Bool -> PaymentPagesCheckoutSessionTaxIdCollection)
-> Parser (Bool -> PaymentPagesCheckoutSessionTaxIdCollection)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Bool -> PaymentPagesCheckoutSessionTaxIdCollection
PaymentPagesCheckoutSessionTaxIdCollection Parser (Bool -> PaymentPagesCheckoutSessionTaxIdCollection)
-> Parser Bool -> Parser PaymentPagesCheckoutSessionTaxIdCollection
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"))
mkPaymentPagesCheckoutSessionTaxIdCollection ::
GHC.Types.Bool ->
PaymentPagesCheckoutSessionTaxIdCollection
mkPaymentPagesCheckoutSessionTaxIdCollection :: Bool -> PaymentPagesCheckoutSessionTaxIdCollection
mkPaymentPagesCheckoutSessionTaxIdCollection Bool
paymentPagesCheckoutSessionTaxIdCollectionEnabled = PaymentPagesCheckoutSessionTaxIdCollection :: Bool -> PaymentPagesCheckoutSessionTaxIdCollection
PaymentPagesCheckoutSessionTaxIdCollection {paymentPagesCheckoutSessionTaxIdCollectionEnabled :: Bool
paymentPagesCheckoutSessionTaxIdCollectionEnabled = Bool
paymentPagesCheckoutSessionTaxIdCollectionEnabled}