{-# 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 AccountRequirementsError
module StripeAPI.Types.AccountRequirementsError 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.account_requirements_error@ in the specification.
data AccountRequirementsError = AccountRequirementsError
  { -- | code: The code for the type of error.
    AccountRequirementsError -> AccountRequirementsErrorCode'
accountRequirementsErrorCode :: AccountRequirementsErrorCode',
    -- | reason: An informative message that indicates the error type and provides additional details about the error.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    AccountRequirementsError -> Text
accountRequirementsErrorReason :: Data.Text.Internal.Text,
    -- | requirement: The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    AccountRequirementsError -> Text
accountRequirementsErrorRequirement :: Data.Text.Internal.Text
  }
  deriving
    ( Int -> AccountRequirementsError -> ShowS
[AccountRequirementsError] -> ShowS
AccountRequirementsError -> String
(Int -> AccountRequirementsError -> ShowS)
-> (AccountRequirementsError -> String)
-> ([AccountRequirementsError] -> ShowS)
-> Show AccountRequirementsError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountRequirementsError] -> ShowS
$cshowList :: [AccountRequirementsError] -> ShowS
show :: AccountRequirementsError -> String
$cshow :: AccountRequirementsError -> String
showsPrec :: Int -> AccountRequirementsError -> ShowS
$cshowsPrec :: Int -> AccountRequirementsError -> ShowS
GHC.Show.Show,
      AccountRequirementsError -> AccountRequirementsError -> Bool
(AccountRequirementsError -> AccountRequirementsError -> Bool)
-> (AccountRequirementsError -> AccountRequirementsError -> Bool)
-> Eq AccountRequirementsError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountRequirementsError -> AccountRequirementsError -> Bool
$c/= :: AccountRequirementsError -> AccountRequirementsError -> Bool
== :: AccountRequirementsError -> AccountRequirementsError -> Bool
$c== :: AccountRequirementsError -> AccountRequirementsError -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON AccountRequirementsError where
  toJSON :: AccountRequirementsError -> Value
toJSON AccountRequirementsError
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"code" Text -> AccountRequirementsErrorCode' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= AccountRequirementsError -> AccountRequirementsErrorCode'
accountRequirementsErrorCode AccountRequirementsError
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"reason" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= AccountRequirementsError -> Text
accountRequirementsErrorReason AccountRequirementsError
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"requirement" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= AccountRequirementsError -> Text
accountRequirementsErrorRequirement AccountRequirementsError
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: AccountRequirementsError -> Encoding
toEncoding AccountRequirementsError
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"code" Text -> AccountRequirementsErrorCode' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= AccountRequirementsError -> AccountRequirementsErrorCode'
accountRequirementsErrorCode AccountRequirementsError
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"reason" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= AccountRequirementsError -> Text
accountRequirementsErrorReason AccountRequirementsError
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"requirement" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= AccountRequirementsError -> Text
accountRequirementsErrorRequirement AccountRequirementsError
obj)))

instance Data.Aeson.Types.FromJSON.FromJSON AccountRequirementsError where
  parseJSON :: Value -> Parser AccountRequirementsError
parseJSON = String
-> (Object -> Parser AccountRequirementsError)
-> Value
-> Parser AccountRequirementsError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"AccountRequirementsError" (\Object
obj -> (((AccountRequirementsErrorCode'
 -> Text -> Text -> AccountRequirementsError)
-> Parser
     (AccountRequirementsErrorCode'
      -> Text -> Text -> AccountRequirementsError)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure AccountRequirementsErrorCode'
-> Text -> Text -> AccountRequirementsError
AccountRequirementsError Parser
  (AccountRequirementsErrorCode'
   -> Text -> Text -> AccountRequirementsError)
-> Parser AccountRequirementsErrorCode'
-> Parser (Text -> Text -> AccountRequirementsError)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser AccountRequirementsErrorCode'
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"code")) Parser (Text -> Text -> AccountRequirementsError)
-> Parser Text -> Parser (Text -> AccountRequirementsError)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"reason")) Parser (Text -> AccountRequirementsError)
-> Parser Text -> Parser AccountRequirementsError
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"requirement"))

-- | Create a new 'AccountRequirementsError' with all required fields.
mkAccountRequirementsError ::
  -- | 'accountRequirementsErrorCode'
  AccountRequirementsErrorCode' ->
  -- | 'accountRequirementsErrorReason'
  Data.Text.Internal.Text ->
  -- | 'accountRequirementsErrorRequirement'
  Data.Text.Internal.Text ->
  AccountRequirementsError
mkAccountRequirementsError :: AccountRequirementsErrorCode'
-> Text -> Text -> AccountRequirementsError
mkAccountRequirementsError AccountRequirementsErrorCode'
accountRequirementsErrorCode Text
accountRequirementsErrorReason Text
accountRequirementsErrorRequirement =
  AccountRequirementsError :: AccountRequirementsErrorCode'
-> Text -> Text -> AccountRequirementsError
AccountRequirementsError
    { accountRequirementsErrorCode :: AccountRequirementsErrorCode'
accountRequirementsErrorCode = AccountRequirementsErrorCode'
accountRequirementsErrorCode,
      accountRequirementsErrorReason :: Text
accountRequirementsErrorReason = Text
accountRequirementsErrorReason,
      accountRequirementsErrorRequirement :: Text
accountRequirementsErrorRequirement = Text
accountRequirementsErrorRequirement
    }

-- | Defines the enum schema located at @components.schemas.account_requirements_error.properties.code@ in the specification.
--
-- The code for the type of error.
data AccountRequirementsErrorCode'
  = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
    AccountRequirementsErrorCode'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.
    AccountRequirementsErrorCode'Typed Data.Text.Internal.Text
  | -- | Represents the JSON value @"invalid_address_city_state_postal_code"@
    AccountRequirementsErrorCode'EnumInvalidAddressCityStatePostalCode
  | -- | Represents the JSON value @"invalid_street_address"@
    AccountRequirementsErrorCode'EnumInvalidStreetAddress
  | -- | Represents the JSON value @"invalid_value_other"@
    AccountRequirementsErrorCode'EnumInvalidValueOther
  | -- | Represents the JSON value @"verification_document_address_mismatch"@
    AccountRequirementsErrorCode'EnumVerificationDocumentAddressMismatch
  | -- | Represents the JSON value @"verification_document_address_missing"@
    AccountRequirementsErrorCode'EnumVerificationDocumentAddressMissing
  | -- | Represents the JSON value @"verification_document_corrupt"@
    AccountRequirementsErrorCode'EnumVerificationDocumentCorrupt
  | -- | Represents the JSON value @"verification_document_country_not_supported"@
    AccountRequirementsErrorCode'EnumVerificationDocumentCountryNotSupported
  | -- | Represents the JSON value @"verification_document_dob_mismatch"@
    AccountRequirementsErrorCode'EnumVerificationDocumentDobMismatch
  | -- | Represents the JSON value @"verification_document_duplicate_type"@
    AccountRequirementsErrorCode'EnumVerificationDocumentDuplicateType
  | -- | Represents the JSON value @"verification_document_expired"@
    AccountRequirementsErrorCode'EnumVerificationDocumentExpired
  | -- | Represents the JSON value @"verification_document_failed_copy"@
    AccountRequirementsErrorCode'EnumVerificationDocumentFailedCopy
  | -- | Represents the JSON value @"verification_document_failed_greyscale"@
    AccountRequirementsErrorCode'EnumVerificationDocumentFailedGreyscale
  | -- | Represents the JSON value @"verification_document_failed_other"@
    AccountRequirementsErrorCode'EnumVerificationDocumentFailedOther
  | -- | Represents the JSON value @"verification_document_failed_test_mode"@
    AccountRequirementsErrorCode'EnumVerificationDocumentFailedTestMode
  | -- | Represents the JSON value @"verification_document_fraudulent"@
    AccountRequirementsErrorCode'EnumVerificationDocumentFraudulent
  | -- | Represents the JSON value @"verification_document_id_number_mismatch"@
    AccountRequirementsErrorCode'EnumVerificationDocumentIdNumberMismatch
  | -- | Represents the JSON value @"verification_document_id_number_missing"@
    AccountRequirementsErrorCode'EnumVerificationDocumentIdNumberMissing
  | -- | Represents the JSON value @"verification_document_incomplete"@
    AccountRequirementsErrorCode'EnumVerificationDocumentIncomplete
  | -- | Represents the JSON value @"verification_document_invalid"@
    AccountRequirementsErrorCode'EnumVerificationDocumentInvalid
  | -- | Represents the JSON value @"verification_document_issue_or_expiry_date_missing"@
    AccountRequirementsErrorCode'EnumVerificationDocumentIssueOrExpiryDateMissing
  | -- | Represents the JSON value @"verification_document_manipulated"@
    AccountRequirementsErrorCode'EnumVerificationDocumentManipulated
  | -- | Represents the JSON value @"verification_document_missing_back"@
    AccountRequirementsErrorCode'EnumVerificationDocumentMissingBack
  | -- | Represents the JSON value @"verification_document_missing_front"@
    AccountRequirementsErrorCode'EnumVerificationDocumentMissingFront
  | -- | Represents the JSON value @"verification_document_name_mismatch"@
    AccountRequirementsErrorCode'EnumVerificationDocumentNameMismatch
  | -- | Represents the JSON value @"verification_document_name_missing"@
    AccountRequirementsErrorCode'EnumVerificationDocumentNameMissing
  | -- | Represents the JSON value @"verification_document_nationality_mismatch"@
    AccountRequirementsErrorCode'EnumVerificationDocumentNationalityMismatch
  | -- | Represents the JSON value @"verification_document_not_readable"@
    AccountRequirementsErrorCode'EnumVerificationDocumentNotReadable
  | -- | Represents the JSON value @"verification_document_not_signed"@
    AccountRequirementsErrorCode'EnumVerificationDocumentNotSigned
  | -- | Represents the JSON value @"verification_document_not_uploaded"@
    AccountRequirementsErrorCode'EnumVerificationDocumentNotUploaded
  | -- | Represents the JSON value @"verification_document_photo_mismatch"@
    AccountRequirementsErrorCode'EnumVerificationDocumentPhotoMismatch
  | -- | Represents the JSON value @"verification_document_too_large"@
    AccountRequirementsErrorCode'EnumVerificationDocumentTooLarge
  | -- | Represents the JSON value @"verification_document_type_not_supported"@
    AccountRequirementsErrorCode'EnumVerificationDocumentTypeNotSupported
  | -- | Represents the JSON value @"verification_failed_address_match"@
    AccountRequirementsErrorCode'EnumVerificationFailedAddressMatch
  | -- | Represents the JSON value @"verification_failed_business_iec_number"@
    AccountRequirementsErrorCode'EnumVerificationFailedBusinessIecNumber
  | -- | Represents the JSON value @"verification_failed_document_match"@
    AccountRequirementsErrorCode'EnumVerificationFailedDocumentMatch
  | -- | Represents the JSON value @"verification_failed_id_number_match"@
    AccountRequirementsErrorCode'EnumVerificationFailedIdNumberMatch
  | -- | Represents the JSON value @"verification_failed_keyed_identity"@
    AccountRequirementsErrorCode'EnumVerificationFailedKeyedIdentity
  | -- | Represents the JSON value @"verification_failed_keyed_match"@
    AccountRequirementsErrorCode'EnumVerificationFailedKeyedMatch
  | -- | Represents the JSON value @"verification_failed_name_match"@
    AccountRequirementsErrorCode'EnumVerificationFailedNameMatch
  | -- | Represents the JSON value @"verification_failed_other"@
    AccountRequirementsErrorCode'EnumVerificationFailedOther
  | -- | Represents the JSON value @"verification_failed_tax_id_match"@
    AccountRequirementsErrorCode'EnumVerificationFailedTaxIdMatch
  | -- | Represents the JSON value @"verification_failed_tax_id_not_issued"@
    AccountRequirementsErrorCode'EnumVerificationFailedTaxIdNotIssued
  | -- | Represents the JSON value @"verification_missing_executives"@
    AccountRequirementsErrorCode'EnumVerificationMissingExecutives
  | -- | Represents the JSON value @"verification_missing_owners"@
    AccountRequirementsErrorCode'EnumVerificationMissingOwners
  | -- | Represents the JSON value @"verification_requires_additional_memorandum_of_associations"@
    AccountRequirementsErrorCode'EnumVerificationRequiresAdditionalMemorandumOfAssociations
  deriving (Int -> AccountRequirementsErrorCode' -> ShowS
[AccountRequirementsErrorCode'] -> ShowS
AccountRequirementsErrorCode' -> String
(Int -> AccountRequirementsErrorCode' -> ShowS)
-> (AccountRequirementsErrorCode' -> String)
-> ([AccountRequirementsErrorCode'] -> ShowS)
-> Show AccountRequirementsErrorCode'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountRequirementsErrorCode'] -> ShowS
$cshowList :: [AccountRequirementsErrorCode'] -> ShowS
show :: AccountRequirementsErrorCode' -> String
$cshow :: AccountRequirementsErrorCode' -> String
showsPrec :: Int -> AccountRequirementsErrorCode' -> ShowS
$cshowsPrec :: Int -> AccountRequirementsErrorCode' -> ShowS
GHC.Show.Show, AccountRequirementsErrorCode'
-> AccountRequirementsErrorCode' -> Bool
(AccountRequirementsErrorCode'
 -> AccountRequirementsErrorCode' -> Bool)
-> (AccountRequirementsErrorCode'
    -> AccountRequirementsErrorCode' -> Bool)
-> Eq AccountRequirementsErrorCode'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountRequirementsErrorCode'
-> AccountRequirementsErrorCode' -> Bool
$c/= :: AccountRequirementsErrorCode'
-> AccountRequirementsErrorCode' -> Bool
== :: AccountRequirementsErrorCode'
-> AccountRequirementsErrorCode' -> Bool
$c== :: AccountRequirementsErrorCode'
-> AccountRequirementsErrorCode' -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON AccountRequirementsErrorCode' where
  toJSON :: AccountRequirementsErrorCode' -> Value
toJSON (AccountRequirementsErrorCode'Other Value
val) = Value
val
  toJSON (AccountRequirementsErrorCode'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumInvalidAddressCityStatePostalCode) = Value
"invalid_address_city_state_postal_code"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumInvalidStreetAddress) = Value
"invalid_street_address"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumInvalidValueOther) = Value
"invalid_value_other"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentAddressMismatch) = Value
"verification_document_address_mismatch"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentAddressMissing) = Value
"verification_document_address_missing"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentCorrupt) = Value
"verification_document_corrupt"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentCountryNotSupported) = Value
"verification_document_country_not_supported"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentDobMismatch) = Value
"verification_document_dob_mismatch"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentDuplicateType) = Value
"verification_document_duplicate_type"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentExpired) = Value
"verification_document_expired"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentFailedCopy) = Value
"verification_document_failed_copy"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentFailedGreyscale) = Value
"verification_document_failed_greyscale"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentFailedOther) = Value
"verification_document_failed_other"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentFailedTestMode) = Value
"verification_document_failed_test_mode"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentFraudulent) = Value
"verification_document_fraudulent"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentIdNumberMismatch) = Value
"verification_document_id_number_mismatch"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentIdNumberMissing) = Value
"verification_document_id_number_missing"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentIncomplete) = Value
"verification_document_incomplete"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentInvalid) = Value
"verification_document_invalid"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentIssueOrExpiryDateMissing) = Value
"verification_document_issue_or_expiry_date_missing"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentManipulated) = Value
"verification_document_manipulated"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentMissingBack) = Value
"verification_document_missing_back"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentMissingFront) = Value
"verification_document_missing_front"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNameMismatch) = Value
"verification_document_name_mismatch"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNameMissing) = Value
"verification_document_name_missing"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNationalityMismatch) = Value
"verification_document_nationality_mismatch"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNotReadable) = Value
"verification_document_not_readable"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNotSigned) = Value
"verification_document_not_signed"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNotUploaded) = Value
"verification_document_not_uploaded"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentPhotoMismatch) = Value
"verification_document_photo_mismatch"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentTooLarge) = Value
"verification_document_too_large"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentTypeNotSupported) = Value
"verification_document_type_not_supported"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedAddressMatch) = Value
"verification_failed_address_match"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedBusinessIecNumber) = Value
"verification_failed_business_iec_number"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedDocumentMatch) = Value
"verification_failed_document_match"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedIdNumberMatch) = Value
"verification_failed_id_number_match"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedKeyedIdentity) = Value
"verification_failed_keyed_identity"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedKeyedMatch) = Value
"verification_failed_keyed_match"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedNameMatch) = Value
"verification_failed_name_match"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedOther) = Value
"verification_failed_other"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedTaxIdMatch) = Value
"verification_failed_tax_id_match"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedTaxIdNotIssued) = Value
"verification_failed_tax_id_not_issued"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationMissingExecutives) = Value
"verification_missing_executives"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationMissingOwners) = Value
"verification_missing_owners"
  toJSON (AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationRequiresAdditionalMemorandumOfAssociations) = Value
"verification_requires_additional_memorandum_of_associations"

instance Data.Aeson.Types.FromJSON.FromJSON AccountRequirementsErrorCode' where
  parseJSON :: Value -> Parser AccountRequirementsErrorCode'
parseJSON Value
val =
    AccountRequirementsErrorCode'
-> Parser AccountRequirementsErrorCode'
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
"invalid_address_city_state_postal_code" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumInvalidAddressCityStatePostalCode
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"invalid_street_address" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumInvalidStreetAddress
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"invalid_value_other" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumInvalidValueOther
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_address_mismatch" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentAddressMismatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_address_missing" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentAddressMissing
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_corrupt" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentCorrupt
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_country_not_supported" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentCountryNotSupported
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_dob_mismatch" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentDobMismatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_duplicate_type" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentDuplicateType
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_expired" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentExpired
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_failed_copy" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentFailedCopy
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_failed_greyscale" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentFailedGreyscale
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_failed_other" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentFailedOther
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_failed_test_mode" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentFailedTestMode
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_fraudulent" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentFraudulent
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_id_number_mismatch" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentIdNumberMismatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_id_number_missing" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentIdNumberMissing
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_incomplete" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentIncomplete
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_invalid" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentInvalid
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_issue_or_expiry_date_missing" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentIssueOrExpiryDateMissing
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_manipulated" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentManipulated
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_missing_back" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentMissingBack
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_missing_front" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentMissingFront
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_name_mismatch" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNameMismatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_name_missing" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNameMissing
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_nationality_mismatch" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNationalityMismatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_not_readable" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNotReadable
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_not_signed" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNotSigned
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_not_uploaded" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentNotUploaded
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_photo_mismatch" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentPhotoMismatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_too_large" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentTooLarge
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_document_type_not_supported" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationDocumentTypeNotSupported
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed_address_match" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedAddressMatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed_business_iec_number" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedBusinessIecNumber
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed_document_match" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedDocumentMatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed_id_number_match" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedIdNumberMatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed_keyed_identity" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedKeyedIdentity
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed_keyed_match" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedKeyedMatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed_name_match" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedNameMatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed_other" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedOther
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed_tax_id_match" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedTaxIdMatch
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_failed_tax_id_not_issued" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationFailedTaxIdNotIssued
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_missing_executives" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationMissingExecutives
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_missing_owners" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationMissingOwners
            | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verification_requires_additional_memorandum_of_associations" -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'EnumVerificationRequiresAdditionalMemorandumOfAssociations
            | Bool
GHC.Base.otherwise -> Value -> AccountRequirementsErrorCode'
AccountRequirementsErrorCode'Other Value
val
      )