{-# 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\`. issuingAuthorizationVerificationDataAddressLine1Check :: IssuingAuthorizationVerificationDataAddressLine1Check', -- | address_postal_code_check: Whether the cardholder provided a postal code and if it matched the cardholder’s \`billing.address.postal_code\`. issuingAuthorizationVerificationDataAddressPostalCodeCheck :: IssuingAuthorizationVerificationDataAddressPostalCodeCheck', -- | cvc_check: Whether the cardholder provided a CVC and if it matched Stripe’s record. issuingAuthorizationVerificationDataCvcCheck :: IssuingAuthorizationVerificationDataCvcCheck', -- | expiry_check: Whether the cardholder provided an expiry date and if it matched Stripe’s record. issuingAuthorizationVerificationDataExpiryCheck :: IssuingAuthorizationVerificationDataExpiryCheck' } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationVerificationData where toJSON obj = Data.Aeson.Types.Internal.object ("address_line1_check" Data.Aeson.Types.ToJSON..= issuingAuthorizationVerificationDataAddressLine1Check obj : "address_postal_code_check" Data.Aeson.Types.ToJSON..= issuingAuthorizationVerificationDataAddressPostalCodeCheck obj : "cvc_check" Data.Aeson.Types.ToJSON..= issuingAuthorizationVerificationDataCvcCheck obj : "expiry_check" Data.Aeson.Types.ToJSON..= issuingAuthorizationVerificationDataExpiryCheck obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("address_line1_check" Data.Aeson.Types.ToJSON..= issuingAuthorizationVerificationDataAddressLine1Check obj) GHC.Base.<> (("address_postal_code_check" Data.Aeson.Types.ToJSON..= issuingAuthorizationVerificationDataAddressPostalCodeCheck obj) GHC.Base.<> (("cvc_check" Data.Aeson.Types.ToJSON..= issuingAuthorizationVerificationDataCvcCheck obj) GHC.Base.<> ("expiry_check" Data.Aeson.Types.ToJSON..= issuingAuthorizationVerificationDataExpiryCheck obj)))) instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationVerificationData where parseJSON = Data.Aeson.Types.FromJSON.withObject "IssuingAuthorizationVerificationData" (\obj -> (((GHC.Base.pure IssuingAuthorizationVerificationData GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "address_line1_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "address_postal_code_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "cvc_check")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "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 { issuingAuthorizationVerificationDataAddressLine1Check = issuingAuthorizationVerificationDataAddressLine1Check, issuingAuthorizationVerificationDataAddressPostalCodeCheck = issuingAuthorizationVerificationDataAddressPostalCodeCheck, issuingAuthorizationVerificationDataCvcCheck = issuingAuthorizationVerificationDataCvcCheck, 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationVerificationDataAddressLine1Check' where toJSON (IssuingAuthorizationVerificationDataAddressLine1Check'Other val) = val toJSON (IssuingAuthorizationVerificationDataAddressLine1Check'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (IssuingAuthorizationVerificationDataAddressLine1Check'EnumMatch) = "match" toJSON (IssuingAuthorizationVerificationDataAddressLine1Check'EnumMismatch) = "mismatch" toJSON (IssuingAuthorizationVerificationDataAddressLine1Check'EnumNotProvided) = "not_provided" instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationVerificationDataAddressLine1Check' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "match" -> IssuingAuthorizationVerificationDataAddressLine1Check'EnumMatch | val GHC.Classes.== "mismatch" -> IssuingAuthorizationVerificationDataAddressLine1Check'EnumMismatch | val GHC.Classes.== "not_provided" -> IssuingAuthorizationVerificationDataAddressLine1Check'EnumNotProvided | GHC.Base.otherwise -> IssuingAuthorizationVerificationDataAddressLine1Check'Other 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationVerificationDataAddressPostalCodeCheck' where toJSON (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'Other val) = val toJSON (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumMatch) = "match" toJSON (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumMismatch) = "mismatch" toJSON (IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumNotProvided) = "not_provided" instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationVerificationDataAddressPostalCodeCheck' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "match" -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumMatch | val GHC.Classes.== "mismatch" -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumMismatch | val GHC.Classes.== "not_provided" -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'EnumNotProvided | GHC.Base.otherwise -> IssuingAuthorizationVerificationDataAddressPostalCodeCheck'Other 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationVerificationDataCvcCheck' where toJSON (IssuingAuthorizationVerificationDataCvcCheck'Other val) = val toJSON (IssuingAuthorizationVerificationDataCvcCheck'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (IssuingAuthorizationVerificationDataCvcCheck'EnumMatch) = "match" toJSON (IssuingAuthorizationVerificationDataCvcCheck'EnumMismatch) = "mismatch" toJSON (IssuingAuthorizationVerificationDataCvcCheck'EnumNotProvided) = "not_provided" instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationVerificationDataCvcCheck' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "match" -> IssuingAuthorizationVerificationDataCvcCheck'EnumMatch | val GHC.Classes.== "mismatch" -> IssuingAuthorizationVerificationDataCvcCheck'EnumMismatch | val GHC.Classes.== "not_provided" -> IssuingAuthorizationVerificationDataCvcCheck'EnumNotProvided | GHC.Base.otherwise -> IssuingAuthorizationVerificationDataCvcCheck'Other 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 (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON IssuingAuthorizationVerificationDataExpiryCheck' where toJSON (IssuingAuthorizationVerificationDataExpiryCheck'Other val) = val toJSON (IssuingAuthorizationVerificationDataExpiryCheck'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (IssuingAuthorizationVerificationDataExpiryCheck'EnumMatch) = "match" toJSON (IssuingAuthorizationVerificationDataExpiryCheck'EnumMismatch) = "mismatch" toJSON (IssuingAuthorizationVerificationDataExpiryCheck'EnumNotProvided) = "not_provided" instance Data.Aeson.Types.FromJSON.FromJSON IssuingAuthorizationVerificationDataExpiryCheck' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "match" -> IssuingAuthorizationVerificationDataExpiryCheck'EnumMatch | val GHC.Classes.== "mismatch" -> IssuingAuthorizationVerificationDataExpiryCheck'EnumMismatch | val GHC.Classes.== "not_provided" -> IssuingAuthorizationVerificationDataExpiryCheck'EnumNotProvided | GHC.Base.otherwise -> IssuingAuthorizationVerificationDataExpiryCheck'Other val )