{-# 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 CheckoutAcssDebitPaymentMethodOptions
module StripeAPI.Types.CheckoutAcssDebitPaymentMethodOptions 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.CheckoutAcssDebitMandateOptions
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | Defines the object schema located at @components.schemas.checkout_acss_debit_payment_method_options@ in the specification.
data CheckoutAcssDebitPaymentMethodOptions = CheckoutAcssDebitPaymentMethodOptions
  { -- | currency: Currency supported by the bank account. Returned when the Session is in \`setup\` mode.
    CheckoutAcssDebitPaymentMethodOptions
-> Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'
checkoutAcssDebitPaymentMethodOptionsCurrency :: (GHC.Maybe.Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'),
    -- | mandate_options:
    CheckoutAcssDebitPaymentMethodOptions
-> Maybe CheckoutAcssDebitMandateOptions
checkoutAcssDebitPaymentMethodOptionsMandateOptions :: (GHC.Maybe.Maybe CheckoutAcssDebitMandateOptions),
    -- | verification_method: Bank account verification method.
    CheckoutAcssDebitPaymentMethodOptions
-> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
checkoutAcssDebitPaymentMethodOptionsVerificationMethod :: (GHC.Maybe.Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod')
  }
  deriving
    ( Int -> CheckoutAcssDebitPaymentMethodOptions -> ShowS
[CheckoutAcssDebitPaymentMethodOptions] -> ShowS
CheckoutAcssDebitPaymentMethodOptions -> String
(Int -> CheckoutAcssDebitPaymentMethodOptions -> ShowS)
-> (CheckoutAcssDebitPaymentMethodOptions -> String)
-> ([CheckoutAcssDebitPaymentMethodOptions] -> ShowS)
-> Show CheckoutAcssDebitPaymentMethodOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckoutAcssDebitPaymentMethodOptions] -> ShowS
$cshowList :: [CheckoutAcssDebitPaymentMethodOptions] -> ShowS
show :: CheckoutAcssDebitPaymentMethodOptions -> String
$cshow :: CheckoutAcssDebitPaymentMethodOptions -> String
showsPrec :: Int -> CheckoutAcssDebitPaymentMethodOptions -> ShowS
$cshowsPrec :: Int -> CheckoutAcssDebitPaymentMethodOptions -> ShowS
GHC.Show.Show,
      CheckoutAcssDebitPaymentMethodOptions
-> CheckoutAcssDebitPaymentMethodOptions -> Bool
(CheckoutAcssDebitPaymentMethodOptions
 -> CheckoutAcssDebitPaymentMethodOptions -> Bool)
-> (CheckoutAcssDebitPaymentMethodOptions
    -> CheckoutAcssDebitPaymentMethodOptions -> Bool)
-> Eq CheckoutAcssDebitPaymentMethodOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckoutAcssDebitPaymentMethodOptions
-> CheckoutAcssDebitPaymentMethodOptions -> Bool
$c/= :: CheckoutAcssDebitPaymentMethodOptions
-> CheckoutAcssDebitPaymentMethodOptions -> Bool
== :: CheckoutAcssDebitPaymentMethodOptions
-> CheckoutAcssDebitPaymentMethodOptions -> Bool
$c== :: CheckoutAcssDebitPaymentMethodOptions
-> CheckoutAcssDebitPaymentMethodOptions -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON CheckoutAcssDebitPaymentMethodOptions where
  toJSON :: CheckoutAcssDebitPaymentMethodOptions -> Value
toJSON CheckoutAcssDebitPaymentMethodOptions
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"currency" Text
-> Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= CheckoutAcssDebitPaymentMethodOptions
-> Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'
checkoutAcssDebitPaymentMethodOptionsCurrency CheckoutAcssDebitPaymentMethodOptions
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"mandate_options" Text -> Maybe CheckoutAcssDebitMandateOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= CheckoutAcssDebitPaymentMethodOptions
-> Maybe CheckoutAcssDebitMandateOptions
checkoutAcssDebitPaymentMethodOptionsMandateOptions CheckoutAcssDebitPaymentMethodOptions
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"verification_method" Text
-> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= CheckoutAcssDebitPaymentMethodOptions
-> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
checkoutAcssDebitPaymentMethodOptionsVerificationMethod CheckoutAcssDebitPaymentMethodOptions
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: CheckoutAcssDebitPaymentMethodOptions -> Encoding
toEncoding CheckoutAcssDebitPaymentMethodOptions
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"currency" Text
-> Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= CheckoutAcssDebitPaymentMethodOptions
-> Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'
checkoutAcssDebitPaymentMethodOptionsCurrency CheckoutAcssDebitPaymentMethodOptions
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"mandate_options" Text -> Maybe CheckoutAcssDebitMandateOptions -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= CheckoutAcssDebitPaymentMethodOptions
-> Maybe CheckoutAcssDebitMandateOptions
checkoutAcssDebitPaymentMethodOptionsMandateOptions CheckoutAcssDebitPaymentMethodOptions
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"verification_method" Text
-> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= CheckoutAcssDebitPaymentMethodOptions
-> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
checkoutAcssDebitPaymentMethodOptionsVerificationMethod CheckoutAcssDebitPaymentMethodOptions
obj)))

instance Data.Aeson.Types.FromJSON.FromJSON CheckoutAcssDebitPaymentMethodOptions where
  parseJSON :: Value -> Parser CheckoutAcssDebitPaymentMethodOptions
parseJSON = String
-> (Object -> Parser CheckoutAcssDebitPaymentMethodOptions)
-> Value
-> Parser CheckoutAcssDebitPaymentMethodOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"CheckoutAcssDebitPaymentMethodOptions" (\Object
obj -> (((Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'
 -> Maybe CheckoutAcssDebitMandateOptions
 -> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
 -> CheckoutAcssDebitPaymentMethodOptions)
-> Parser
     (Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'
      -> Maybe CheckoutAcssDebitMandateOptions
      -> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
      -> CheckoutAcssDebitPaymentMethodOptions)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'
-> Maybe CheckoutAcssDebitMandateOptions
-> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> CheckoutAcssDebitPaymentMethodOptions
CheckoutAcssDebitPaymentMethodOptions Parser
  (Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'
   -> Maybe CheckoutAcssDebitMandateOptions
   -> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
   -> CheckoutAcssDebitPaymentMethodOptions)
-> Parser (Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency')
-> Parser
     (Maybe CheckoutAcssDebitMandateOptions
      -> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
      -> CheckoutAcssDebitPaymentMethodOptions)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"currency")) Parser
  (Maybe CheckoutAcssDebitMandateOptions
   -> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
   -> CheckoutAcssDebitPaymentMethodOptions)
-> Parser (Maybe CheckoutAcssDebitMandateOptions)
-> Parser
     (Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
      -> CheckoutAcssDebitPaymentMethodOptions)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe CheckoutAcssDebitMandateOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"mandate_options")) Parser
  (Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
   -> CheckoutAcssDebitPaymentMethodOptions)
-> Parser
     (Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod')
-> Parser CheckoutAcssDebitPaymentMethodOptions
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     (Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"verification_method"))

-- | Create a new 'CheckoutAcssDebitPaymentMethodOptions' with all required fields.
mkCheckoutAcssDebitPaymentMethodOptions :: CheckoutAcssDebitPaymentMethodOptions
mkCheckoutAcssDebitPaymentMethodOptions :: CheckoutAcssDebitPaymentMethodOptions
mkCheckoutAcssDebitPaymentMethodOptions =
  CheckoutAcssDebitPaymentMethodOptions :: Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'
-> Maybe CheckoutAcssDebitMandateOptions
-> Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> CheckoutAcssDebitPaymentMethodOptions
CheckoutAcssDebitPaymentMethodOptions
    { checkoutAcssDebitPaymentMethodOptionsCurrency :: Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'
checkoutAcssDebitPaymentMethodOptionsCurrency = Maybe CheckoutAcssDebitPaymentMethodOptionsCurrency'
forall a. Maybe a
GHC.Maybe.Nothing,
      checkoutAcssDebitPaymentMethodOptionsMandateOptions :: Maybe CheckoutAcssDebitMandateOptions
checkoutAcssDebitPaymentMethodOptionsMandateOptions = Maybe CheckoutAcssDebitMandateOptions
forall a. Maybe a
GHC.Maybe.Nothing,
      checkoutAcssDebitPaymentMethodOptionsVerificationMethod :: Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
checkoutAcssDebitPaymentMethodOptionsVerificationMethod = Maybe CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the enum schema located at @components.schemas.checkout_acss_debit_payment_method_options.properties.currency@ in the specification.
--
-- Currency supported by the bank account. Returned when the Session is in \`setup\` mode.
data CheckoutAcssDebitPaymentMethodOptionsCurrency'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    CheckoutAcssDebitPaymentMethodOptionsCurrency'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.
    CheckoutAcssDebitPaymentMethodOptionsCurrency'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"cad"@
    CheckoutAcssDebitPaymentMethodOptionsCurrency'EnumCad
  | -- | Represents the JSON value @"usd"@
    CheckoutAcssDebitPaymentMethodOptionsCurrency'EnumUsd
  deriving (Int -> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> ShowS
[CheckoutAcssDebitPaymentMethodOptionsCurrency'] -> ShowS
CheckoutAcssDebitPaymentMethodOptionsCurrency' -> String
(Int -> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> ShowS)
-> (CheckoutAcssDebitPaymentMethodOptionsCurrency' -> String)
-> ([CheckoutAcssDebitPaymentMethodOptionsCurrency'] -> ShowS)
-> Show CheckoutAcssDebitPaymentMethodOptionsCurrency'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckoutAcssDebitPaymentMethodOptionsCurrency'] -> ShowS
$cshowList :: [CheckoutAcssDebitPaymentMethodOptionsCurrency'] -> ShowS
show :: CheckoutAcssDebitPaymentMethodOptionsCurrency' -> String
$cshow :: CheckoutAcssDebitPaymentMethodOptionsCurrency' -> String
showsPrec :: Int -> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> ShowS
$cshowsPrec :: Int -> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> ShowS
GHC.Show.Show, CheckoutAcssDebitPaymentMethodOptionsCurrency'
-> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> Bool
(CheckoutAcssDebitPaymentMethodOptionsCurrency'
 -> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> Bool)
-> (CheckoutAcssDebitPaymentMethodOptionsCurrency'
    -> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> Bool)
-> Eq CheckoutAcssDebitPaymentMethodOptionsCurrency'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckoutAcssDebitPaymentMethodOptionsCurrency'
-> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> Bool
$c/= :: CheckoutAcssDebitPaymentMethodOptionsCurrency'
-> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> Bool
== :: CheckoutAcssDebitPaymentMethodOptionsCurrency'
-> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> Bool
$c== :: CheckoutAcssDebitPaymentMethodOptionsCurrency'
-> CheckoutAcssDebitPaymentMethodOptionsCurrency' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON CheckoutAcssDebitPaymentMethodOptionsCurrency' where
  toJSON :: CheckoutAcssDebitPaymentMethodOptionsCurrency' -> Value
toJSON (CheckoutAcssDebitPaymentMethodOptionsCurrency'Other Value
val) = Value
val
  toJSON (CheckoutAcssDebitPaymentMethodOptionsCurrency'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (CheckoutAcssDebitPaymentMethodOptionsCurrency'
CheckoutAcssDebitPaymentMethodOptionsCurrency'EnumCad) = Value
"cad"
  toJSON (CheckoutAcssDebitPaymentMethodOptionsCurrency'
CheckoutAcssDebitPaymentMethodOptionsCurrency'EnumUsd) = Value
"usd"

instance Data.Aeson.Types.FromJSON.FromJSON CheckoutAcssDebitPaymentMethodOptionsCurrency' where
  parseJSON :: Value -> Parser CheckoutAcssDebitPaymentMethodOptionsCurrency'
parseJSON Value
val =
    CheckoutAcssDebitPaymentMethodOptionsCurrency'
-> Parser CheckoutAcssDebitPaymentMethodOptionsCurrency'
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
"cad" -> CheckoutAcssDebitPaymentMethodOptionsCurrency'
CheckoutAcssDebitPaymentMethodOptionsCurrency'EnumCad
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"usd" -> CheckoutAcssDebitPaymentMethodOptionsCurrency'
CheckoutAcssDebitPaymentMethodOptionsCurrency'EnumUsd
            | Bool
GHC.Base.otherwise -> Value -> CheckoutAcssDebitPaymentMethodOptionsCurrency'
CheckoutAcssDebitPaymentMethodOptionsCurrency'Other Value
val
      )

-- | Defines the enum schema located at @components.schemas.checkout_acss_debit_payment_method_options.properties.verification_method@ in the specification.
--
-- Bank account verification method.
data CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'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.
    CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"automatic"@
    CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'EnumAutomatic
  | -- | Represents the JSON value @"instant"@
    CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'EnumInstant
  | -- | Represents the JSON value @"microdeposits"@
    CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'EnumMicrodeposits
  deriving (Int
-> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> ShowS
[CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'] -> ShowS
CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' -> String
(Int
 -> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
 -> ShowS)
-> (CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
    -> String)
-> ([CheckoutAcssDebitPaymentMethodOptionsVerificationMethod']
    -> ShowS)
-> Show CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'] -> ShowS
$cshowList :: [CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'] -> ShowS
show :: CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' -> String
$cshow :: CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' -> String
showsPrec :: Int
-> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> ShowS
$cshowsPrec :: Int
-> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> ShowS
GHC.Show.Show, CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' -> Bool
(CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
 -> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
 -> Bool)
-> (CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
    -> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
    -> Bool)
-> Eq CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' -> Bool
$c/= :: CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' -> Bool
== :: CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' -> Bool
$c== :: CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' where
  toJSON :: CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' -> Value
toJSON (CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'Other Value
val) = Value
val
  toJSON (CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'EnumAutomatic) = Value
"automatic"
  toJSON (CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'EnumInstant) = Value
"instant"
  toJSON (CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'EnumMicrodeposits) = Value
"microdeposits"

instance Data.Aeson.Types.FromJSON.FromJSON CheckoutAcssDebitPaymentMethodOptionsVerificationMethod' where
  parseJSON :: Value
-> Parser CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
parseJSON Value
val =
    CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
-> Parser CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
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
"automatic" -> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'EnumAutomatic
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"instant" -> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'EnumInstant
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"microdeposits" -> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'EnumMicrodeposits
            | Bool
GHC.Base.otherwise -> Value -> CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'
CheckoutAcssDebitPaymentMethodOptionsVerificationMethod'Other Value
val
      )