{-# 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 IssuingAuthorizationVerificationData
module StripeAPI.Types.IssuingAuthorizationVerificationData 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.issuing_authorization_verification_data@ in the specification.
data IssuingAuthorizationVerificationData = IssuingAuthorizationVerificationData
  { -- | address_line1_check: Whether the cardholder provided an address first line and if it matched the cardholder’s \`billing.address.line1\`.
    IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataAddressLine1Check'
issuingAuthorizationVerificationDataAddressLine1Check :: IssuingAuthorizationVerificationDataAddressLine1Check',
    -- | address_postal_code_check: Whether the cardholder provided a postal code and if it matched the cardholder’s \`billing.address.postal_code\`.
    IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
issuingAuthorizationVerificationDataAddressPostalCodeCheck :: IssuingAuthorizationVerificationDataAddressPostalCodeCheck',
    -- | cvc_check: Whether the cardholder provided a CVC and if it matched Stripe’s record.
    IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataCvcCheck'
issuingAuthorizationVerificationDataCvcCheck :: IssuingAuthorizationVerificationDataCvcCheck',
    -- | expiry_check: Whether the cardholder provided an expiry date and if it matched Stripe’s record.
    IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataExpiryCheck'
issuingAuthorizationVerificationDataExpiryCheck :: IssuingAuthorizationVerificationDataExpiryCheck'
  }
  deriving
    ( Int -> IssuingAuthorizationVerificationData -> ShowS
[IssuingAuthorizationVerificationData] -> ShowS
IssuingAuthorizationVerificationData -> String
(Int -> IssuingAuthorizationVerificationData -> ShowS)
-> (IssuingAuthorizationVerificationData -> String)
-> ([IssuingAuthorizationVerificationData] -> ShowS)
-> Show IssuingAuthorizationVerificationData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingAuthorizationVerificationData] -> ShowS
$cshowList :: [IssuingAuthorizationVerificationData] -> ShowS
show :: IssuingAuthorizationVerificationData -> String
$cshow :: IssuingAuthorizationVerificationData -> String
showsPrec :: Int -> IssuingAuthorizationVerificationData -> ShowS
$cshowsPrec :: Int -> IssuingAuthorizationVerificationData -> ShowS
GHC.Show.Show,
      IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationData -> Bool
(IssuingAuthorizationVerificationData
 -> IssuingAuthorizationVerificationData -> Bool)
-> (IssuingAuthorizationVerificationData
    -> IssuingAuthorizationVerificationData -> Bool)
-> Eq IssuingAuthorizationVerificationData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationData -> Bool
$c/= :: IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationData -> Bool
== :: IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationData -> Bool
$c== :: IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationData -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationVerificationData where
  toJSON :: IssuingAuthorizationVerificationData -> Value
toJSON IssuingAuthorizationVerificationData
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"address_line1_check" Text
-> IssuingAuthorizationVerificationDataAddressLine1Check' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataAddressLine1Check'
issuingAuthorizationVerificationDataAddressLine1Check IssuingAuthorizationVerificationData
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"address_postal_code_check" Text
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
issuingAuthorizationVerificationDataAddressPostalCodeCheck IssuingAuthorizationVerificationData
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"cvc_check" Text -> IssuingAuthorizationVerificationDataCvcCheck' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataCvcCheck'
issuingAuthorizationVerificationDataCvcCheck IssuingAuthorizationVerificationData
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"expiry_check" Text -> IssuingAuthorizationVerificationDataExpiryCheck' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataExpiryCheck'
issuingAuthorizationVerificationDataExpiryCheck IssuingAuthorizationVerificationData
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: IssuingAuthorizationVerificationData -> Encoding
toEncoding IssuingAuthorizationVerificationData
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"address_line1_check" Text
-> IssuingAuthorizationVerificationDataAddressLine1Check' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataAddressLine1Check'
issuingAuthorizationVerificationDataAddressLine1Check IssuingAuthorizationVerificationData
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"address_postal_code_check" Text
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
issuingAuthorizationVerificationDataAddressPostalCodeCheck IssuingAuthorizationVerificationData
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"cvc_check" Text -> IssuingAuthorizationVerificationDataCvcCheck' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataCvcCheck'
issuingAuthorizationVerificationDataCvcCheck IssuingAuthorizationVerificationData
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"expiry_check" Text -> IssuingAuthorizationVerificationDataExpiryCheck' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingAuthorizationVerificationData
-> IssuingAuthorizationVerificationDataExpiryCheck'
issuingAuthorizationVerificationDataExpiryCheck IssuingAuthorizationVerificationData
obj))))

instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationVerificationData where
  parseJSON :: Value -> Parser IssuingAuthorizationVerificationData
parseJSON = String
-> (Object -> Parser IssuingAuthorizationVerificationData)
-> Value
-> Parser IssuingAuthorizationVerificationData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"IssuingAuthorizationVerificationData" (\Object
obj -> ((((IssuingAuthorizationVerificationDataAddressLine1Check'
 -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
 -> IssuingAuthorizationVerificationDataCvcCheck'
 -> IssuingAuthorizationVerificationDataExpiryCheck'
 -> IssuingAuthorizationVerificationData)
-> Parser
     (IssuingAuthorizationVerificationDataAddressLine1Check'
      -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
      -> IssuingAuthorizationVerificationDataCvcCheck'
      -> IssuingAuthorizationVerificationDataExpiryCheck'
      -> IssuingAuthorizationVerificationData)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure IssuingAuthorizationVerificationDataAddressLine1Check'
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> IssuingAuthorizationVerificationDataCvcCheck'
-> IssuingAuthorizationVerificationDataExpiryCheck'
-> IssuingAuthorizationVerificationData
IssuingAuthorizationVerificationData Parser
  (IssuingAuthorizationVerificationDataAddressLine1Check'
   -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
   -> IssuingAuthorizationVerificationDataCvcCheck'
   -> IssuingAuthorizationVerificationDataExpiryCheck'
   -> IssuingAuthorizationVerificationData)
-> Parser IssuingAuthorizationVerificationDataAddressLine1Check'
-> Parser
     (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
      -> IssuingAuthorizationVerificationDataCvcCheck'
      -> IssuingAuthorizationVerificationDataExpiryCheck'
      -> IssuingAuthorizationVerificationData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser IssuingAuthorizationVerificationDataAddressLine1Check'
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"address_line1_check")) Parser
  (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
   -> IssuingAuthorizationVerificationDataCvcCheck'
   -> IssuingAuthorizationVerificationDataExpiryCheck'
   -> IssuingAuthorizationVerificationData)
-> Parser
     IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> Parser
     (IssuingAuthorizationVerificationDataCvcCheck'
      -> IssuingAuthorizationVerificationDataExpiryCheck'
      -> IssuingAuthorizationVerificationData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"address_postal_code_check")) Parser
  (IssuingAuthorizationVerificationDataCvcCheck'
   -> IssuingAuthorizationVerificationDataExpiryCheck'
   -> IssuingAuthorizationVerificationData)
-> Parser IssuingAuthorizationVerificationDataCvcCheck'
-> Parser
     (IssuingAuthorizationVerificationDataExpiryCheck'
      -> IssuingAuthorizationVerificationData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser IssuingAuthorizationVerificationDataCvcCheck'
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"cvc_check")) Parser
  (IssuingAuthorizationVerificationDataExpiryCheck'
   -> IssuingAuthorizationVerificationData)
-> Parser IssuingAuthorizationVerificationDataExpiryCheck'
-> Parser IssuingAuthorizationVerificationData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser IssuingAuthorizationVerificationDataExpiryCheck'
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"expiry_check"))

-- | Create a new 'IssuingAuthorizationVerificationData' with all required fields.
mkIssuingAuthorizationVerificationData ::
  -- | 'issuingAuthorizationVerificationDataAddressLine1Check'
  IssuingAuthorizationVerificationDataAddressLine1Check' ->
  -- | 'issuingAuthorizationVerificationDataAddressPostalCodeCheck'
  IssuingAuthorizationVerificationDataAddressPostalCodeCheck' ->
  -- | 'issuingAuthorizationVerificationDataCvcCheck'
  IssuingAuthorizationVerificationDataCvcCheck' ->
  -- | 'issuingAuthorizationVerificationDataExpiryCheck'
  IssuingAuthorizationVerificationDataExpiryCheck' ->
  IssuingAuthorizationVerificationData
mkIssuingAuthorizationVerificationData :: IssuingAuthorizationVerificationDataAddressLine1Check'
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> IssuingAuthorizationVerificationDataCvcCheck'
-> IssuingAuthorizationVerificationDataExpiryCheck'
-> IssuingAuthorizationVerificationData
mkIssuingAuthorizationVerificationData IssuingAuthorizationVerificationDataAddressLine1Check'
issuingAuthorizationVerificationDataAddressLine1Check IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
issuingAuthorizationVerificationDataAddressPostalCodeCheck IssuingAuthorizationVerificationDataCvcCheck'
issuingAuthorizationVerificationDataCvcCheck IssuingAuthorizationVerificationDataExpiryCheck'
issuingAuthorizationVerificationDataExpiryCheck =
  IssuingAuthorizationVerificationData :: IssuingAuthorizationVerificationDataAddressLine1Check'
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> IssuingAuthorizationVerificationDataCvcCheck'
-> IssuingAuthorizationVerificationDataExpiryCheck'
-> IssuingAuthorizationVerificationData
IssuingAuthorizationVerificationData
    { issuingAuthorizationVerificationDataAddressLine1Check :: IssuingAuthorizationVerificationDataAddressLine1Check'
issuingAuthorizationVerificationDataAddressLine1Check = IssuingAuthorizationVerificationDataAddressLine1Check'
issuingAuthorizationVerificationDataAddressLine1Check,
      issuingAuthorizationVerificationDataAddressPostalCodeCheck :: IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
issuingAuthorizationVerificationDataAddressPostalCodeCheck = IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
issuingAuthorizationVerificationDataAddressPostalCodeCheck,
      issuingAuthorizationVerificationDataCvcCheck :: IssuingAuthorizationVerificationDataCvcCheck'
issuingAuthorizationVerificationDataCvcCheck = IssuingAuthorizationVerificationDataCvcCheck'
issuingAuthorizationVerificationDataCvcCheck,
      issuingAuthorizationVerificationDataExpiryCheck :: IssuingAuthorizationVerificationDataExpiryCheck'
issuingAuthorizationVerificationDataExpiryCheck = IssuingAuthorizationVerificationDataExpiryCheck'
issuingAuthorizationVerificationDataExpiryCheck
    }

-- | Defines the enum schema located at @components.schemas.issuing_authorization_verification_data.properties.address_line1_check@ in the specification.
--
-- Whether the cardholder provided an address first line and if it matched the cardholder’s \`billing.address.line1\`.
data IssuingAuthorizationVerificationDataAddressLine1Check'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    IssuingAuthorizationVerificationDataAddressLine1Check'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.
    IssuingAuthorizationVerificationDataAddressLine1Check'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"match"@
    IssuingAuthorizationVerificationDataAddressLine1Check'EnumMatch
  | -- | Represents the JSON value @"mismatch"@
    IssuingAuthorizationVerificationDataAddressLine1Check'EnumMismatch
  | -- | Represents the JSON value @"not_provided"@
    IssuingAuthorizationVerificationDataAddressLine1Check'EnumNotProvided
  deriving (Int
-> IssuingAuthorizationVerificationDataAddressLine1Check' -> ShowS
[IssuingAuthorizationVerificationDataAddressLine1Check'] -> ShowS
IssuingAuthorizationVerificationDataAddressLine1Check' -> String
(Int
 -> IssuingAuthorizationVerificationDataAddressLine1Check' -> ShowS)
-> (IssuingAuthorizationVerificationDataAddressLine1Check'
    -> String)
-> ([IssuingAuthorizationVerificationDataAddressLine1Check']
    -> ShowS)
-> Show IssuingAuthorizationVerificationDataAddressLine1Check'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingAuthorizationVerificationDataAddressLine1Check'] -> ShowS
$cshowList :: [IssuingAuthorizationVerificationDataAddressLine1Check'] -> ShowS
show :: IssuingAuthorizationVerificationDataAddressLine1Check' -> String
$cshow :: IssuingAuthorizationVerificationDataAddressLine1Check' -> String
showsPrec :: Int
-> IssuingAuthorizationVerificationDataAddressLine1Check' -> ShowS
$cshowsPrec :: Int
-> IssuingAuthorizationVerificationDataAddressLine1Check' -> ShowS
GHC.Show.Show, IssuingAuthorizationVerificationDataAddressLine1Check'
-> IssuingAuthorizationVerificationDataAddressLine1Check' -> Bool
(IssuingAuthorizationVerificationDataAddressLine1Check'
 -> IssuingAuthorizationVerificationDataAddressLine1Check' -> Bool)
-> (IssuingAuthorizationVerificationDataAddressLine1Check'
    -> IssuingAuthorizationVerificationDataAddressLine1Check' -> Bool)
-> Eq IssuingAuthorizationVerificationDataAddressLine1Check'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingAuthorizationVerificationDataAddressLine1Check'
-> IssuingAuthorizationVerificationDataAddressLine1Check' -> Bool
$c/= :: IssuingAuthorizationVerificationDataAddressLine1Check'
-> IssuingAuthorizationVerificationDataAddressLine1Check' -> Bool
== :: IssuingAuthorizationVerificationDataAddressLine1Check'
-> IssuingAuthorizationVerificationDataAddressLine1Check' -> Bool
$c== :: IssuingAuthorizationVerificationDataAddressLine1Check'
-> IssuingAuthorizationVerificationDataAddressLine1Check' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationVerificationDataAddressLine1Check' where
  toJSON :: IssuingAuthorizationVerificationDataAddressLine1Check' -> Value
toJSON (IssuingAuthorizationVerificationDataAddressLine1Check'Other Value
val) = Value
val
  toJSON (IssuingAuthorizationVerificationDataAddressLine1Check'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (IssuingAuthorizationVerificationDataAddressLine1Check'
IssuingAuthorizationVerificationDataAddressLine1Check'EnumMatch) = Value
"match"
  toJSON (IssuingAuthorizationVerificationDataAddressLine1Check'
IssuingAuthorizationVerificationDataAddressLine1Check'EnumMismatch) = Value
"mismatch"
  toJSON (IssuingAuthorizationVerificationDataAddressLine1Check'
IssuingAuthorizationVerificationDataAddressLine1Check'EnumNotProvided) = Value
"not_provided"

instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationVerificationDataAddressLine1Check' where
  parseJSON :: Value
-> Parser IssuingAuthorizationVerificationDataAddressLine1Check'
parseJSON Value
val =
    IssuingAuthorizationVerificationDataAddressLine1Check'
-> Parser IssuingAuthorizationVerificationDataAddressLine1Check'
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
"match" -> IssuingAuthorizationVerificationDataAddressLine1Check'
IssuingAuthorizationVerificationDataAddressLine1Check'EnumMatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"mismatch" -> IssuingAuthorizationVerificationDataAddressLine1Check'
IssuingAuthorizationVerificationDataAddressLine1Check'EnumMismatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"not_provided" -> IssuingAuthorizationVerificationDataAddressLine1Check'
IssuingAuthorizationVerificationDataAddressLine1Check'EnumNotProvided
            | Bool
GHC.Base.otherwise -> Value -> IssuingAuthorizationVerificationDataAddressLine1Check'
IssuingAuthorizationVerificationDataAddressLine1Check'Other Value
val
      )

-- | Defines the enum schema located at @components.schemas.issuing_authorization_verification_data.properties.address_postal_code_check@ in the specification.
--
-- Whether the cardholder provided a postal code and if it matched the cardholder’s \`billing.address.postal_code\`.
data IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    IssuingAuthorizationVerificationDataAddressPostalCodeCheck'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.
    IssuingAuthorizationVerificationDataAddressPostalCodeCheck'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"match"@
    IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumMatch
  | -- | Represents the JSON value @"mismatch"@
    IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumMismatch
  | -- | Represents the JSON value @"not_provided"@
    IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumNotProvided
  deriving (Int
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> ShowS
[IssuingAuthorizationVerificationDataAddressPostalCodeCheck']
-> ShowS
IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> String
(Int
 -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
 -> ShowS)
-> (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
    -> String)
-> ([IssuingAuthorizationVerificationDataAddressPostalCodeCheck']
    -> ShowS)
-> Show IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingAuthorizationVerificationDataAddressPostalCodeCheck']
-> ShowS
$cshowList :: [IssuingAuthorizationVerificationDataAddressPostalCodeCheck']
-> ShowS
show :: IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> String
$cshow :: IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> String
showsPrec :: Int
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> ShowS
$cshowsPrec :: Int
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> ShowS
GHC.Show.Show, IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> Bool
(IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
 -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
 -> Bool)
-> (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
    -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
    -> Bool)
-> Eq IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> Bool
$c/= :: IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> Bool
== :: IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> Bool
$c== :: IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationVerificationDataAddressPostalCodeCheck' where
  toJSON :: IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> Value
toJSON (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'Other Value
val) = Value
val
  toJSON (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumMatch) = Value
"match"
  toJSON (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumMismatch) = Value
"mismatch"
  toJSON (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumNotProvided) = Value
"not_provided"

instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationVerificationDataAddressPostalCodeCheck' where
  parseJSON :: Value
-> Parser
     IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
parseJSON Value
val =
    IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
-> Parser
     IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
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
"match" -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumMatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"mismatch" -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumMismatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"not_provided" -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumNotProvided
            | Bool
GHC.Base.otherwise -> Value
-> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'
IssuingAuthorizationVerificationDataAddressPostalCodeCheck'Other Value
val
      )

-- | Defines the enum schema located at @components.schemas.issuing_authorization_verification_data.properties.cvc_check@ in the specification.
--
-- Whether the cardholder provided a CVC and if it matched Stripe’s record.
data IssuingAuthorizationVerificationDataCvcCheck'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    IssuingAuthorizationVerificationDataCvcCheck'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.
    IssuingAuthorizationVerificationDataCvcCheck'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"match"@
    IssuingAuthorizationVerificationDataCvcCheck'EnumMatch
  | -- | Represents the JSON value @"mismatch"@
    IssuingAuthorizationVerificationDataCvcCheck'EnumMismatch
  | -- | Represents the JSON value @"not_provided"@
    IssuingAuthorizationVerificationDataCvcCheck'EnumNotProvided
  deriving (Int -> IssuingAuthorizationVerificationDataCvcCheck' -> ShowS
[IssuingAuthorizationVerificationDataCvcCheck'] -> ShowS
IssuingAuthorizationVerificationDataCvcCheck' -> String
(Int -> IssuingAuthorizationVerificationDataCvcCheck' -> ShowS)
-> (IssuingAuthorizationVerificationDataCvcCheck' -> String)
-> ([IssuingAuthorizationVerificationDataCvcCheck'] -> ShowS)
-> Show IssuingAuthorizationVerificationDataCvcCheck'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingAuthorizationVerificationDataCvcCheck'] -> ShowS
$cshowList :: [IssuingAuthorizationVerificationDataCvcCheck'] -> ShowS
show :: IssuingAuthorizationVerificationDataCvcCheck' -> String
$cshow :: IssuingAuthorizationVerificationDataCvcCheck' -> String
showsPrec :: Int -> IssuingAuthorizationVerificationDataCvcCheck' -> ShowS
$cshowsPrec :: Int -> IssuingAuthorizationVerificationDataCvcCheck' -> ShowS
GHC.Show.Show, IssuingAuthorizationVerificationDataCvcCheck'
-> IssuingAuthorizationVerificationDataCvcCheck' -> Bool
(IssuingAuthorizationVerificationDataCvcCheck'
 -> IssuingAuthorizationVerificationDataCvcCheck' -> Bool)
-> (IssuingAuthorizationVerificationDataCvcCheck'
    -> IssuingAuthorizationVerificationDataCvcCheck' -> Bool)
-> Eq IssuingAuthorizationVerificationDataCvcCheck'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingAuthorizationVerificationDataCvcCheck'
-> IssuingAuthorizationVerificationDataCvcCheck' -> Bool
$c/= :: IssuingAuthorizationVerificationDataCvcCheck'
-> IssuingAuthorizationVerificationDataCvcCheck' -> Bool
== :: IssuingAuthorizationVerificationDataCvcCheck'
-> IssuingAuthorizationVerificationDataCvcCheck' -> Bool
$c== :: IssuingAuthorizationVerificationDataCvcCheck'
-> IssuingAuthorizationVerificationDataCvcCheck' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationVerificationDataCvcCheck' where
  toJSON :: IssuingAuthorizationVerificationDataCvcCheck' -> Value
toJSON (IssuingAuthorizationVerificationDataCvcCheck'Other Value
val) = Value
val
  toJSON (IssuingAuthorizationVerificationDataCvcCheck'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (IssuingAuthorizationVerificationDataCvcCheck'
IssuingAuthorizationVerificationDataCvcCheck'EnumMatch) = Value
"match"
  toJSON (IssuingAuthorizationVerificationDataCvcCheck'
IssuingAuthorizationVerificationDataCvcCheck'EnumMismatch) = Value
"mismatch"
  toJSON (IssuingAuthorizationVerificationDataCvcCheck'
IssuingAuthorizationVerificationDataCvcCheck'EnumNotProvided) = Value
"not_provided"

instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationVerificationDataCvcCheck' where
  parseJSON :: Value -> Parser IssuingAuthorizationVerificationDataCvcCheck'
parseJSON Value
val =
    IssuingAuthorizationVerificationDataCvcCheck'
-> Parser IssuingAuthorizationVerificationDataCvcCheck'
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
"match" -> IssuingAuthorizationVerificationDataCvcCheck'
IssuingAuthorizationVerificationDataCvcCheck'EnumMatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"mismatch" -> IssuingAuthorizationVerificationDataCvcCheck'
IssuingAuthorizationVerificationDataCvcCheck'EnumMismatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"not_provided" -> IssuingAuthorizationVerificationDataCvcCheck'
IssuingAuthorizationVerificationDataCvcCheck'EnumNotProvided
            | Bool
GHC.Base.otherwise -> Value -> IssuingAuthorizationVerificationDataCvcCheck'
IssuingAuthorizationVerificationDataCvcCheck'Other Value
val
      )

-- | Defines the enum schema located at @components.schemas.issuing_authorization_verification_data.properties.expiry_check@ in the specification.
--
-- Whether the cardholder provided an expiry date and if it matched Stripe’s record.
data IssuingAuthorizationVerificationDataExpiryCheck'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    IssuingAuthorizationVerificationDataExpiryCheck'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.
    IssuingAuthorizationVerificationDataExpiryCheck'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"match"@
    IssuingAuthorizationVerificationDataExpiryCheck'EnumMatch
  | -- | Represents the JSON value @"mismatch"@
    IssuingAuthorizationVerificationDataExpiryCheck'EnumMismatch
  | -- | Represents the JSON value @"not_provided"@
    IssuingAuthorizationVerificationDataExpiryCheck'EnumNotProvided
  deriving (Int -> IssuingAuthorizationVerificationDataExpiryCheck' -> ShowS
[IssuingAuthorizationVerificationDataExpiryCheck'] -> ShowS
IssuingAuthorizationVerificationDataExpiryCheck' -> String
(Int -> IssuingAuthorizationVerificationDataExpiryCheck' -> ShowS)
-> (IssuingAuthorizationVerificationDataExpiryCheck' -> String)
-> ([IssuingAuthorizationVerificationDataExpiryCheck'] -> ShowS)
-> Show IssuingAuthorizationVerificationDataExpiryCheck'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingAuthorizationVerificationDataExpiryCheck'] -> ShowS
$cshowList :: [IssuingAuthorizationVerificationDataExpiryCheck'] -> ShowS
show :: IssuingAuthorizationVerificationDataExpiryCheck' -> String
$cshow :: IssuingAuthorizationVerificationDataExpiryCheck' -> String
showsPrec :: Int -> IssuingAuthorizationVerificationDataExpiryCheck' -> ShowS
$cshowsPrec :: Int -> IssuingAuthorizationVerificationDataExpiryCheck' -> ShowS
GHC.Show.Show, IssuingAuthorizationVerificationDataExpiryCheck'
-> IssuingAuthorizationVerificationDataExpiryCheck' -> Bool
(IssuingAuthorizationVerificationDataExpiryCheck'
 -> IssuingAuthorizationVerificationDataExpiryCheck' -> Bool)
-> (IssuingAuthorizationVerificationDataExpiryCheck'
    -> IssuingAuthorizationVerificationDataExpiryCheck' -> Bool)
-> Eq IssuingAuthorizationVerificationDataExpiryCheck'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingAuthorizationVerificationDataExpiryCheck'
-> IssuingAuthorizationVerificationDataExpiryCheck' -> Bool
$c/= :: IssuingAuthorizationVerificationDataExpiryCheck'
-> IssuingAuthorizationVerificationDataExpiryCheck' -> Bool
== :: IssuingAuthorizationVerificationDataExpiryCheck'
-> IssuingAuthorizationVerificationDataExpiryCheck' -> Bool
$c== :: IssuingAuthorizationVerificationDataExpiryCheck'
-> IssuingAuthorizationVerificationDataExpiryCheck' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationVerificationDataExpiryCheck' where
  toJSON :: IssuingAuthorizationVerificationDataExpiryCheck' -> Value
toJSON (IssuingAuthorizationVerificationDataExpiryCheck'Other Value
val) = Value
val
  toJSON (IssuingAuthorizationVerificationDataExpiryCheck'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (IssuingAuthorizationVerificationDataExpiryCheck'
IssuingAuthorizationVerificationDataExpiryCheck'EnumMatch) = Value
"match"
  toJSON (IssuingAuthorizationVerificationDataExpiryCheck'
IssuingAuthorizationVerificationDataExpiryCheck'EnumMismatch) = Value
"mismatch"
  toJSON (IssuingAuthorizationVerificationDataExpiryCheck'
IssuingAuthorizationVerificationDataExpiryCheck'EnumNotProvided) = Value
"not_provided"

instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationVerificationDataExpiryCheck' where
  parseJSON :: Value -> Parser IssuingAuthorizationVerificationDataExpiryCheck'
parseJSON Value
val =
    IssuingAuthorizationVerificationDataExpiryCheck'
-> Parser IssuingAuthorizationVerificationDataExpiryCheck'
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
"match" -> IssuingAuthorizationVerificationDataExpiryCheck'
IssuingAuthorizationVerificationDataExpiryCheck'EnumMatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"mismatch" -> IssuingAuthorizationVerificationDataExpiryCheck'
IssuingAuthorizationVerificationDataExpiryCheck'EnumMismatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"not_provided" -> IssuingAuthorizationVerificationDataExpiryCheck'
IssuingAuthorizationVerificationDataExpiryCheck'EnumNotProvided
            | Bool
GHC.Base.otherwise -> Value -> IssuingAuthorizationVerificationDataExpiryCheck'
IssuingAuthorizationVerificationDataExpiryCheck'Other Value
val
      )