{-# LANGUAGE MultiWayIf #-}
-- CHANGE WITH CAUTION: This is a generated code file generated by https://github.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator.
{-# LANGUAGE OverloadedStrings #-}

-- | Contains the types generated from the schema PaymentPagesCheckoutSessionTaxId
module StripeAPI.Types.PaymentPagesCheckoutSessionTaxId 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

-- | Defines the object schema located at @components.schemas.payment_pages_checkout_session_tax_id@ in the specification.
data PaymentPagesCheckoutSessionTaxId = PaymentPagesCheckoutSessionTaxId
  { -- | type: The type of the tax ID, one of \`eu_vat\`, \`br_cnpj\`, \`br_cpf\`, \`gb_vat\`, \`nz_gst\`, \`au_abn\`, \`in_gst\`, \`no_vat\`, \`za_vat\`, \`ch_vat\`, \`mx_rfc\`, \`sg_uen\`, \`ru_inn\`, \`ru_kpp\`, \`ca_bn\`, \`hk_br\`, \`es_cif\`, \`tw_vat\`, \`th_vat\`, \`jp_cn\`, \`jp_rn\`, \`li_uid\`, \`my_itn\`, \`us_ein\`, \`kr_brn\`, \`ca_qst\`, \`ca_gst_hst\`, \`ca_pst_bc\`, \`ca_pst_mb\`, \`ca_pst_sk\`, \`my_sst\`, \`sg_gst\`, \`ae_trn\`, \`cl_tin\`, \`sa_vat\`, \`id_npwp\`, \`my_frp\`, \`il_vat\`, or \`unknown\`
    PaymentPagesCheckoutSessionTaxId
-> PaymentPagesCheckoutSessionTaxIdType'
paymentPagesCheckoutSessionTaxIdType :: PaymentPagesCheckoutSessionTaxIdType',
    -- | value: The value of the tax ID.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentPagesCheckoutSessionTaxId -> Maybe Text
paymentPagesCheckoutSessionTaxIdValue :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int -> PaymentPagesCheckoutSessionTaxId -> ShowS
[PaymentPagesCheckoutSessionTaxId] -> ShowS
PaymentPagesCheckoutSessionTaxId -> String
(Int -> PaymentPagesCheckoutSessionTaxId -> ShowS)
-> (PaymentPagesCheckoutSessionTaxId -> String)
-> ([PaymentPagesCheckoutSessionTaxId] -> ShowS)
-> Show PaymentPagesCheckoutSessionTaxId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentPagesCheckoutSessionTaxId] -> ShowS
$cshowList :: [PaymentPagesCheckoutSessionTaxId] -> ShowS
show :: PaymentPagesCheckoutSessionTaxId -> String
$cshow :: PaymentPagesCheckoutSessionTaxId -> String
showsPrec :: Int -> PaymentPagesCheckoutSessionTaxId -> ShowS
$cshowsPrec :: Int -> PaymentPagesCheckoutSessionTaxId -> ShowS
GHC.Show.Show,
      PaymentPagesCheckoutSessionTaxId
-> PaymentPagesCheckoutSessionTaxId -> Bool
(PaymentPagesCheckoutSessionTaxId
 -> PaymentPagesCheckoutSessionTaxId -> Bool)
-> (PaymentPagesCheckoutSessionTaxId
    -> PaymentPagesCheckoutSessionTaxId -> Bool)
-> Eq PaymentPagesCheckoutSessionTaxId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentPagesCheckoutSessionTaxId
-> PaymentPagesCheckoutSessionTaxId -> Bool
$c/= :: PaymentPagesCheckoutSessionTaxId
-> PaymentPagesCheckoutSessionTaxId -> Bool
== :: PaymentPagesCheckoutSessionTaxId
-> PaymentPagesCheckoutSessionTaxId -> Bool
$c== :: PaymentPagesCheckoutSessionTaxId
-> PaymentPagesCheckoutSessionTaxId -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON PaymentPagesCheckoutSessionTaxId where
  toJSON :: PaymentPagesCheckoutSessionTaxId -> Value
toJSON PaymentPagesCheckoutSessionTaxId
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"type" Text -> PaymentPagesCheckoutSessionTaxIdType' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentPagesCheckoutSessionTaxId
-> PaymentPagesCheckoutSessionTaxIdType'
paymentPagesCheckoutSessionTaxIdType PaymentPagesCheckoutSessionTaxId
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"value" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentPagesCheckoutSessionTaxId -> Maybe Text
paymentPagesCheckoutSessionTaxIdValue PaymentPagesCheckoutSessionTaxId
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: PaymentPagesCheckoutSessionTaxId -> Encoding
toEncoding PaymentPagesCheckoutSessionTaxId
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"type" Text -> PaymentPagesCheckoutSessionTaxIdType' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentPagesCheckoutSessionTaxId
-> PaymentPagesCheckoutSessionTaxIdType'
paymentPagesCheckoutSessionTaxIdType PaymentPagesCheckoutSessionTaxId
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"value" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentPagesCheckoutSessionTaxId -> Maybe Text
paymentPagesCheckoutSessionTaxIdValue PaymentPagesCheckoutSessionTaxId
obj))

instance Data.Aeson.Types.FromJSON.FromJSON PaymentPagesCheckoutSessionTaxId where
  parseJSON :: Value -> Parser PaymentPagesCheckoutSessionTaxId
parseJSON = String
-> (Object -> Parser PaymentPagesCheckoutSessionTaxId)
-> Value
-> Parser PaymentPagesCheckoutSessionTaxId
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentPagesCheckoutSessionTaxId" (\Object
obj -> ((PaymentPagesCheckoutSessionTaxIdType'
 -> Maybe Text -> PaymentPagesCheckoutSessionTaxId)
-> Parser
     (PaymentPagesCheckoutSessionTaxIdType'
      -> Maybe Text -> PaymentPagesCheckoutSessionTaxId)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure PaymentPagesCheckoutSessionTaxIdType'
-> Maybe Text -> PaymentPagesCheckoutSessionTaxId
PaymentPagesCheckoutSessionTaxId Parser
  (PaymentPagesCheckoutSessionTaxIdType'
   -> Maybe Text -> PaymentPagesCheckoutSessionTaxId)
-> Parser PaymentPagesCheckoutSessionTaxIdType'
-> Parser (Maybe Text -> PaymentPagesCheckoutSessionTaxId)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser PaymentPagesCheckoutSessionTaxIdType'
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"type")) Parser (Maybe Text -> PaymentPagesCheckoutSessionTaxId)
-> Parser (Maybe Text) -> Parser PaymentPagesCheckoutSessionTaxId
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
"value"))

-- | Create a new 'PaymentPagesCheckoutSessionTaxId' with all required fields.
mkPaymentPagesCheckoutSessionTaxId ::
  -- | 'paymentPagesCheckoutSessionTaxIdType'
  PaymentPagesCheckoutSessionTaxIdType' ->
  PaymentPagesCheckoutSessionTaxId
mkPaymentPagesCheckoutSessionTaxId :: PaymentPagesCheckoutSessionTaxIdType'
-> PaymentPagesCheckoutSessionTaxId
mkPaymentPagesCheckoutSessionTaxId PaymentPagesCheckoutSessionTaxIdType'
paymentPagesCheckoutSessionTaxIdType =
  PaymentPagesCheckoutSessionTaxId :: PaymentPagesCheckoutSessionTaxIdType'
-> Maybe Text -> PaymentPagesCheckoutSessionTaxId
PaymentPagesCheckoutSessionTaxId
    { paymentPagesCheckoutSessionTaxIdType :: PaymentPagesCheckoutSessionTaxIdType'
paymentPagesCheckoutSessionTaxIdType = PaymentPagesCheckoutSessionTaxIdType'
paymentPagesCheckoutSessionTaxIdType,
      paymentPagesCheckoutSessionTaxIdValue :: Maybe Text
paymentPagesCheckoutSessionTaxIdValue = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the enum schema located at @components.schemas.payment_pages_checkout_session_tax_id.properties.type@ in the specification.
--
-- The type of the tax ID, one of \`eu_vat\`, \`br_cnpj\`, \`br_cpf\`, \`gb_vat\`, \`nz_gst\`, \`au_abn\`, \`in_gst\`, \`no_vat\`, \`za_vat\`, \`ch_vat\`, \`mx_rfc\`, \`sg_uen\`, \`ru_inn\`, \`ru_kpp\`, \`ca_bn\`, \`hk_br\`, \`es_cif\`, \`tw_vat\`, \`th_vat\`, \`jp_cn\`, \`jp_rn\`, \`li_uid\`, \`my_itn\`, \`us_ein\`, \`kr_brn\`, \`ca_qst\`, \`ca_gst_hst\`, \`ca_pst_bc\`, \`ca_pst_mb\`, \`ca_pst_sk\`, \`my_sst\`, \`sg_gst\`, \`ae_trn\`, \`cl_tin\`, \`sa_vat\`, \`id_npwp\`, \`my_frp\`, \`il_vat\`, or \`unknown\`
data PaymentPagesCheckoutSessionTaxIdType'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    PaymentPagesCheckoutSessionTaxIdType'Other Data.Aeson.Types.Internal.Value
  | -- | This constructor can be used to send values to the server which are not present in the specification yet.
    PaymentPagesCheckoutSessionTaxIdType'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"ae_trn"@
    PaymentPagesCheckoutSessionTaxIdType'EnumAeTrn
  | -- | Represents the JSON value @"au_abn"@
    PaymentPagesCheckoutSessionTaxIdType'EnumAuAbn
  | -- | Represents the JSON value @"br_cnpj"@
    PaymentPagesCheckoutSessionTaxIdType'EnumBrCnpj
  | -- | Represents the JSON value @"br_cpf"@
    PaymentPagesCheckoutSessionTaxIdType'EnumBrCpf
  | -- | Represents the JSON value @"ca_bn"@
    PaymentPagesCheckoutSessionTaxIdType'EnumCaBn
  | -- | Represents the JSON value @"ca_gst_hst"@
    PaymentPagesCheckoutSessionTaxIdType'EnumCaGstHst
  | -- | Represents the JSON value @"ca_pst_bc"@
    PaymentPagesCheckoutSessionTaxIdType'EnumCaPstBc
  | -- | Represents the JSON value @"ca_pst_mb"@
    PaymentPagesCheckoutSessionTaxIdType'EnumCaPstMb
  | -- | Represents the JSON value @"ca_pst_sk"@
    PaymentPagesCheckoutSessionTaxIdType'EnumCaPstSk
  | -- | Represents the JSON value @"ca_qst"@
    PaymentPagesCheckoutSessionTaxIdType'EnumCaQst
  | -- | Represents the JSON value @"ch_vat"@
    PaymentPagesCheckoutSessionTaxIdType'EnumChVat
  | -- | Represents the JSON value @"cl_tin"@
    PaymentPagesCheckoutSessionTaxIdType'EnumClTin
  | -- | Represents the JSON value @"es_cif"@
    PaymentPagesCheckoutSessionTaxIdType'EnumEsCif
  | -- | Represents the JSON value @"eu_vat"@
    PaymentPagesCheckoutSessionTaxIdType'EnumEuVat
  | -- | Represents the JSON value @"gb_vat"@
    PaymentPagesCheckoutSessionTaxIdType'EnumGbVat
  | -- | Represents the JSON value @"hk_br"@
    PaymentPagesCheckoutSessionTaxIdType'EnumHkBr
  | -- | Represents the JSON value @"id_npwp"@
    PaymentPagesCheckoutSessionTaxIdType'EnumIdNpwp
  | -- | Represents the JSON value @"il_vat"@
    PaymentPagesCheckoutSessionTaxIdType'EnumIlVat
  | -- | Represents the JSON value @"in_gst"@
    PaymentPagesCheckoutSessionTaxIdType'EnumInGst
  | -- | Represents the JSON value @"jp_cn"@
    PaymentPagesCheckoutSessionTaxIdType'EnumJpCn
  | -- | Represents the JSON value @"jp_rn"@
    PaymentPagesCheckoutSessionTaxIdType'EnumJpRn
  | -- | Represents the JSON value @"kr_brn"@
    PaymentPagesCheckoutSessionTaxIdType'EnumKrBrn
  | -- | Represents the JSON value @"li_uid"@
    PaymentPagesCheckoutSessionTaxIdType'EnumLiUid
  | -- | Represents the JSON value @"mx_rfc"@
    PaymentPagesCheckoutSessionTaxIdType'EnumMxRfc
  | -- | Represents the JSON value @"my_frp"@
    PaymentPagesCheckoutSessionTaxIdType'EnumMyFrp
  | -- | Represents the JSON value @"my_itn"@
    PaymentPagesCheckoutSessionTaxIdType'EnumMyItn
  | -- | Represents the JSON value @"my_sst"@
    PaymentPagesCheckoutSessionTaxIdType'EnumMySst
  | -- | Represents the JSON value @"no_vat"@
    PaymentPagesCheckoutSessionTaxIdType'EnumNoVat
  | -- | Represents the JSON value @"nz_gst"@
    PaymentPagesCheckoutSessionTaxIdType'EnumNzGst
  | -- | Represents the JSON value @"ru_inn"@
    PaymentPagesCheckoutSessionTaxIdType'EnumRuInn
  | -- | Represents the JSON value @"ru_kpp"@
    PaymentPagesCheckoutSessionTaxIdType'EnumRuKpp
  | -- | Represents the JSON value @"sa_vat"@
    PaymentPagesCheckoutSessionTaxIdType'EnumSaVat
  | -- | Represents the JSON value @"sg_gst"@
    PaymentPagesCheckoutSessionTaxIdType'EnumSgGst
  | -- | Represents the JSON value @"sg_uen"@
    PaymentPagesCheckoutSessionTaxIdType'EnumSgUen
  | -- | Represents the JSON value @"th_vat"@
    PaymentPagesCheckoutSessionTaxIdType'EnumThVat
  | -- | Represents the JSON value @"tw_vat"@
    PaymentPagesCheckoutSessionTaxIdType'EnumTwVat
  | -- | Represents the JSON value @"unknown"@
    PaymentPagesCheckoutSessionTaxIdType'EnumUnknown
  | -- | Represents the JSON value @"us_ein"@
    PaymentPagesCheckoutSessionTaxIdType'EnumUsEin
  | -- | Represents the JSON value @"za_vat"@
    PaymentPagesCheckoutSessionTaxIdType'EnumZaVat
  deriving (Int -> PaymentPagesCheckoutSessionTaxIdType' -> ShowS
[PaymentPagesCheckoutSessionTaxIdType'] -> ShowS
PaymentPagesCheckoutSessionTaxIdType' -> String
(Int -> PaymentPagesCheckoutSessionTaxIdType' -> ShowS)
-> (PaymentPagesCheckoutSessionTaxIdType' -> String)
-> ([PaymentPagesCheckoutSessionTaxIdType'] -> ShowS)
-> Show PaymentPagesCheckoutSessionTaxIdType'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentPagesCheckoutSessionTaxIdType'] -> ShowS
$cshowList :: [PaymentPagesCheckoutSessionTaxIdType'] -> ShowS
show :: PaymentPagesCheckoutSessionTaxIdType' -> String
$cshow :: PaymentPagesCheckoutSessionTaxIdType' -> String
showsPrec :: Int -> PaymentPagesCheckoutSessionTaxIdType' -> ShowS
$cshowsPrec :: Int -> PaymentPagesCheckoutSessionTaxIdType' -> ShowS
GHC.Show.Show, PaymentPagesCheckoutSessionTaxIdType'
-> PaymentPagesCheckoutSessionTaxIdType' -> Bool
(PaymentPagesCheckoutSessionTaxIdType'
 -> PaymentPagesCheckoutSessionTaxIdType' -> Bool)
-> (PaymentPagesCheckoutSessionTaxIdType'
    -> PaymentPagesCheckoutSessionTaxIdType' -> Bool)
-> Eq PaymentPagesCheckoutSessionTaxIdType'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentPagesCheckoutSessionTaxIdType'
-> PaymentPagesCheckoutSessionTaxIdType' -> Bool
$c/= :: PaymentPagesCheckoutSessionTaxIdType'
-> PaymentPagesCheckoutSessionTaxIdType' -> Bool
== :: PaymentPagesCheckoutSessionTaxIdType'
-> PaymentPagesCheckoutSessionTaxIdType' -> Bool
$c== :: PaymentPagesCheckoutSessionTaxIdType'
-> PaymentPagesCheckoutSessionTaxIdType' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON PaymentPagesCheckoutSessionTaxIdType' where
  toJSON :: PaymentPagesCheckoutSessionTaxIdType' -> Value
toJSON (PaymentPagesCheckoutSessionTaxIdType'Other Value
val) = Value
val
  toJSON (PaymentPagesCheckoutSessionTaxIdType'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumAeTrn) = Value
"ae_trn"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumAuAbn) = Value
"au_abn"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumBrCnpj) = Value
"br_cnpj"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumBrCpf) = Value
"br_cpf"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaBn) = Value
"ca_bn"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaGstHst) = Value
"ca_gst_hst"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaPstBc) = Value
"ca_pst_bc"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaPstMb) = Value
"ca_pst_mb"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaPstSk) = Value
"ca_pst_sk"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaQst) = Value
"ca_qst"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumChVat) = Value
"ch_vat"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumClTin) = Value
"cl_tin"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumEsCif) = Value
"es_cif"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumEuVat) = Value
"eu_vat"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumGbVat) = Value
"gb_vat"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumHkBr) = Value
"hk_br"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumIdNpwp) = Value
"id_npwp"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumIlVat) = Value
"il_vat"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumInGst) = Value
"in_gst"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumJpCn) = Value
"jp_cn"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumJpRn) = Value
"jp_rn"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumKrBrn) = Value
"kr_brn"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumLiUid) = Value
"li_uid"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumMxRfc) = Value
"mx_rfc"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumMyFrp) = Value
"my_frp"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumMyItn) = Value
"my_itn"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumMySst) = Value
"my_sst"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumNoVat) = Value
"no_vat"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumNzGst) = Value
"nz_gst"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumRuInn) = Value
"ru_inn"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumRuKpp) = Value
"ru_kpp"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumSaVat) = Value
"sa_vat"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumSgGst) = Value
"sg_gst"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumSgUen) = Value
"sg_uen"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumThVat) = Value
"th_vat"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumTwVat) = Value
"tw_vat"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumUnknown) = Value
"unknown"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumUsEin) = Value
"us_ein"
  toJSON (PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumZaVat) = Value
"za_vat"

instance Data.Aeson.Types.FromJSON.FromJSON PaymentPagesCheckoutSessionTaxIdType' where
  parseJSON :: Value -> Parser PaymentPagesCheckoutSessionTaxIdType'
parseJSON Value
val =
    PaymentPagesCheckoutSessionTaxIdType'
-> Parser PaymentPagesCheckoutSessionTaxIdType'
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
"ae_trn" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumAeTrn
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"au_abn" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumAuAbn
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"br_cnpj" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumBrCnpj
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"br_cpf" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumBrCpf
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ca_bn" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaBn
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ca_gst_hst" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaGstHst
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ca_pst_bc" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaPstBc
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ca_pst_mb" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaPstMb
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ca_pst_sk" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaPstSk
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ca_qst" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumCaQst
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ch_vat" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumChVat
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"cl_tin" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumClTin
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"es_cif" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumEsCif
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"eu_vat" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumEuVat
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"gb_vat" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumGbVat
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"hk_br" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumHkBr
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"id_npwp" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumIdNpwp
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"il_vat" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumIlVat
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"in_gst" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumInGst
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"jp_cn" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumJpCn
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"jp_rn" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumJpRn
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"kr_brn" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumKrBrn
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"li_uid" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumLiUid
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"mx_rfc" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumMxRfc
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"my_frp" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumMyFrp
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"my_itn" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumMyItn
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"my_sst" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumMySst
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"no_vat" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumNoVat
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"nz_gst" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumNzGst
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ru_inn" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumRuInn
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"ru_kpp" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumRuKpp
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sa_vat" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumSaVat
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sg_gst" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumSgGst
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sg_uen" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumSgUen
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"th_vat" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumThVat
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"tw_vat" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumTwVat
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"unknown" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumUnknown
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"us_ein" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumUsEin
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"za_vat" -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'EnumZaVat
            | Bool
GHC.Base.otherwise -> Value -> PaymentPagesCheckoutSessionTaxIdType'
PaymentPagesCheckoutSessionTaxIdType'Other Value
val
      )