{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.IssuingDisputeCanceledEvidence 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.File
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data IssuingDisputeCanceledEvidence = IssuingDisputeCanceledEvidence
{
IssuingDisputeCanceledEvidence
-> Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
issuingDisputeCanceledEvidenceAdditionalDocumentation :: (GHC.Maybe.Maybe IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants),
IssuingDisputeCanceledEvidence -> Maybe Int
issuingDisputeCanceledEvidenceCanceledAt :: (GHC.Maybe.Maybe GHC.Types.Int),
IssuingDisputeCanceledEvidence -> Maybe Bool
issuingDisputeCanceledEvidenceCancellationPolicyProvided :: (GHC.Maybe.Maybe GHC.Types.Bool),
IssuingDisputeCanceledEvidence -> Maybe Text
issuingDisputeCanceledEvidenceCancellationReason :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
IssuingDisputeCanceledEvidence -> Maybe Int
issuingDisputeCanceledEvidenceExpectedAt :: (GHC.Maybe.Maybe GHC.Types.Int),
IssuingDisputeCanceledEvidence -> Maybe Text
issuingDisputeCanceledEvidenceExplanation :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
IssuingDisputeCanceledEvidence -> Maybe Text
issuingDisputeCanceledEvidenceProductDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
IssuingDisputeCanceledEvidence
-> Maybe IssuingDisputeCanceledEvidenceProductType'
issuingDisputeCanceledEvidenceProductType :: (GHC.Maybe.Maybe IssuingDisputeCanceledEvidenceProductType'),
IssuingDisputeCanceledEvidence
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
issuingDisputeCanceledEvidenceReturnStatus :: (GHC.Maybe.Maybe IssuingDisputeCanceledEvidenceReturnStatus'),
IssuingDisputeCanceledEvidence -> Maybe Int
issuingDisputeCanceledEvidenceReturnedAt :: (GHC.Maybe.Maybe GHC.Types.Int)
}
deriving
( Int -> IssuingDisputeCanceledEvidence -> ShowS
[IssuingDisputeCanceledEvidence] -> ShowS
IssuingDisputeCanceledEvidence -> String
(Int -> IssuingDisputeCanceledEvidence -> ShowS)
-> (IssuingDisputeCanceledEvidence -> String)
-> ([IssuingDisputeCanceledEvidence] -> ShowS)
-> Show IssuingDisputeCanceledEvidence
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingDisputeCanceledEvidence] -> ShowS
$cshowList :: [IssuingDisputeCanceledEvidence] -> ShowS
show :: IssuingDisputeCanceledEvidence -> String
$cshow :: IssuingDisputeCanceledEvidence -> String
showsPrec :: Int -> IssuingDisputeCanceledEvidence -> ShowS
$cshowsPrec :: Int -> IssuingDisputeCanceledEvidence -> ShowS
GHC.Show.Show,
IssuingDisputeCanceledEvidence
-> IssuingDisputeCanceledEvidence -> Bool
(IssuingDisputeCanceledEvidence
-> IssuingDisputeCanceledEvidence -> Bool)
-> (IssuingDisputeCanceledEvidence
-> IssuingDisputeCanceledEvidence -> Bool)
-> Eq IssuingDisputeCanceledEvidence
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingDisputeCanceledEvidence
-> IssuingDisputeCanceledEvidence -> Bool
$c/= :: IssuingDisputeCanceledEvidence
-> IssuingDisputeCanceledEvidence -> Bool
== :: IssuingDisputeCanceledEvidence
-> IssuingDisputeCanceledEvidence -> Bool
$c== :: IssuingDisputeCanceledEvidence
-> IssuingDisputeCanceledEvidence -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingDisputeCanceledEvidence where
toJSON :: IssuingDisputeCanceledEvidence -> Value
toJSON IssuingDisputeCanceledEvidence
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"additional_documentation" Text
-> Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence
-> Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
issuingDisputeCanceledEvidenceAdditionalDocumentation IssuingDisputeCanceledEvidence
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"canceled_at" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Int
issuingDisputeCanceledEvidenceCanceledAt IssuingDisputeCanceledEvidence
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"cancellation_policy_provided" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Bool
issuingDisputeCanceledEvidenceCancellationPolicyProvided IssuingDisputeCanceledEvidence
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"cancellation_reason" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Text
issuingDisputeCanceledEvidenceCancellationReason IssuingDisputeCanceledEvidence
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"expected_at" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Int
issuingDisputeCanceledEvidenceExpectedAt IssuingDisputeCanceledEvidence
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"explanation" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Text
issuingDisputeCanceledEvidenceExplanation IssuingDisputeCanceledEvidence
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"product_description" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Text
issuingDisputeCanceledEvidenceProductDescription IssuingDisputeCanceledEvidence
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"product_type" Text -> Maybe IssuingDisputeCanceledEvidenceProductType' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence
-> Maybe IssuingDisputeCanceledEvidenceProductType'
issuingDisputeCanceledEvidenceProductType IssuingDisputeCanceledEvidence
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"return_status" Text -> Maybe IssuingDisputeCanceledEvidenceReturnStatus' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
issuingDisputeCanceledEvidenceReturnStatus IssuingDisputeCanceledEvidence
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"returned_at" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Int
issuingDisputeCanceledEvidenceReturnedAt IssuingDisputeCanceledEvidence
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: IssuingDisputeCanceledEvidence -> Encoding
toEncoding IssuingDisputeCanceledEvidence
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"additional_documentation" Text
-> Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence
-> Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
issuingDisputeCanceledEvidenceAdditionalDocumentation IssuingDisputeCanceledEvidence
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"canceled_at" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Int
issuingDisputeCanceledEvidenceCanceledAt IssuingDisputeCanceledEvidence
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"cancellation_policy_provided" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Bool
issuingDisputeCanceledEvidenceCancellationPolicyProvided IssuingDisputeCanceledEvidence
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"cancellation_reason" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Text
issuingDisputeCanceledEvidenceCancellationReason IssuingDisputeCanceledEvidence
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"expected_at" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Int
issuingDisputeCanceledEvidenceExpectedAt IssuingDisputeCanceledEvidence
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"explanation" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Text
issuingDisputeCanceledEvidenceExplanation IssuingDisputeCanceledEvidence
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"product_description" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Text
issuingDisputeCanceledEvidenceProductDescription IssuingDisputeCanceledEvidence
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"product_type" Text -> Maybe IssuingDisputeCanceledEvidenceProductType' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence
-> Maybe IssuingDisputeCanceledEvidenceProductType'
issuingDisputeCanceledEvidenceProductType IssuingDisputeCanceledEvidence
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"return_status" Text -> Maybe IssuingDisputeCanceledEvidenceReturnStatus' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
issuingDisputeCanceledEvidenceReturnStatus IssuingDisputeCanceledEvidence
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"returned_at" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= IssuingDisputeCanceledEvidence -> Maybe Int
issuingDisputeCanceledEvidenceReturnedAt IssuingDisputeCanceledEvidence
obj))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON IssuingDisputeCanceledEvidence where
parseJSON :: Value -> Parser IssuingDisputeCanceledEvidence
parseJSON = String
-> (Object -> Parser IssuingDisputeCanceledEvidence)
-> Value
-> Parser IssuingDisputeCanceledEvidence
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"IssuingDisputeCanceledEvidence" (\Object
obj -> ((((((((((Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
-> Parser
(Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence
IssuingDisputeCanceledEvidence Parser
(Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
-> Parser
(Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants)
-> Parser
(Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
(Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"additional_documentation")) Parser
(Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
-> Parser (Maybe Int)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"canceled_at")) Parser
(Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"cancellation_policy_provided")) Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"cancellation_reason")) Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"expected_at")) Parser
(Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"explanation")) Parser
(Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
-> Parser (Maybe Text)
-> Parser
(Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"product_description")) Parser
(Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence)
-> Parser (Maybe IssuingDisputeCanceledEvidenceProductType')
-> Parser
(Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int -> IssuingDisputeCanceledEvidence)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe IssuingDisputeCanceledEvidenceProductType')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"product_type")) Parser
(Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int -> IssuingDisputeCanceledEvidence)
-> Parser (Maybe IssuingDisputeCanceledEvidenceReturnStatus')
-> Parser (Maybe Int -> IssuingDisputeCanceledEvidence)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe IssuingDisputeCanceledEvidenceReturnStatus')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"return_status")) Parser (Maybe Int -> IssuingDisputeCanceledEvidence)
-> Parser (Maybe Int) -> Parser IssuingDisputeCanceledEvidence
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"returned_at"))
mkIssuingDisputeCanceledEvidence :: IssuingDisputeCanceledEvidence
mkIssuingDisputeCanceledEvidence :: IssuingDisputeCanceledEvidence
mkIssuingDisputeCanceledEvidence =
IssuingDisputeCanceledEvidence :: Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe IssuingDisputeCanceledEvidenceProductType'
-> Maybe IssuingDisputeCanceledEvidenceReturnStatus'
-> Maybe Int
-> IssuingDisputeCanceledEvidence
IssuingDisputeCanceledEvidence
{ issuingDisputeCanceledEvidenceAdditionalDocumentation :: Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
issuingDisputeCanceledEvidenceAdditionalDocumentation = Maybe
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
issuingDisputeCanceledEvidenceCanceledAt :: Maybe Int
issuingDisputeCanceledEvidenceCanceledAt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
issuingDisputeCanceledEvidenceCancellationPolicyProvided :: Maybe Bool
issuingDisputeCanceledEvidenceCancellationPolicyProvided = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
issuingDisputeCanceledEvidenceCancellationReason :: Maybe Text
issuingDisputeCanceledEvidenceCancellationReason = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
issuingDisputeCanceledEvidenceExpectedAt :: Maybe Int
issuingDisputeCanceledEvidenceExpectedAt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
issuingDisputeCanceledEvidenceExplanation :: Maybe Text
issuingDisputeCanceledEvidenceExplanation = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
issuingDisputeCanceledEvidenceProductDescription :: Maybe Text
issuingDisputeCanceledEvidenceProductDescription = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
issuingDisputeCanceledEvidenceProductType :: Maybe IssuingDisputeCanceledEvidenceProductType'
issuingDisputeCanceledEvidenceProductType = Maybe IssuingDisputeCanceledEvidenceProductType'
forall a. Maybe a
GHC.Maybe.Nothing,
issuingDisputeCanceledEvidenceReturnStatus :: Maybe IssuingDisputeCanceledEvidenceReturnStatus'
issuingDisputeCanceledEvidenceReturnStatus = Maybe IssuingDisputeCanceledEvidenceReturnStatus'
forall a. Maybe a
GHC.Maybe.Nothing,
issuingDisputeCanceledEvidenceReturnedAt :: Maybe Int
issuingDisputeCanceledEvidenceReturnedAt = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing
}
data IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
= IssuingDisputeCanceledEvidenceAdditionalDocumentation'Text Data.Text.Internal.Text
| IssuingDisputeCanceledEvidenceAdditionalDocumentation'File File
deriving (Int
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> ShowS
[IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants]
-> ShowS
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> String
(Int
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> ShowS)
-> (IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> String)
-> ([IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants]
-> ShowS)
-> Show
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants]
-> ShowS
$cshowList :: [IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants]
-> ShowS
show :: IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> String
$cshow :: IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> String
showsPrec :: Int
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> ShowS
$cshowsPrec :: Int
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> ShowS
GHC.Show.Show, IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Bool
(IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Bool)
-> (IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Bool)
-> Eq
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Bool
$c/= :: IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Bool
== :: IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Bool
$c== :: IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants where
toJSON :: IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Value
toJSON (IssuingDisputeCanceledEvidenceAdditionalDocumentation'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (IssuingDisputeCanceledEvidenceAdditionalDocumentation'File File
a) = File -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON File
a
instance Data.Aeson.Types.FromJSON.FromJSON IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants where
parseJSON :: Value
-> Parser
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
parseJSON Value
val = case (Text
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Text (Text
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants)
-> Result Text
-> Result
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Result
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Result
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((File
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
IssuingDisputeCanceledEvidenceAdditionalDocumentation'File (File
-> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants)
-> Result File
-> Result
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result File
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Result
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Result
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String
-> Result
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched") of
Data.Aeson.Types.Internal.Success IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
a -> IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
-> Parser
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String
-> Parser
IssuingDisputeCanceledEvidenceAdditionalDocumentation'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data IssuingDisputeCanceledEvidenceProductType'
=
IssuingDisputeCanceledEvidenceProductType'Other Data.Aeson.Types.Internal.Value
|
IssuingDisputeCanceledEvidenceProductType'Typed Data.Text.Internal.Text
|
IssuingDisputeCanceledEvidenceProductType'EnumMerchandise
|
IssuingDisputeCanceledEvidenceProductType'EnumService
deriving (Int -> IssuingDisputeCanceledEvidenceProductType' -> ShowS
[IssuingDisputeCanceledEvidenceProductType'] -> ShowS
IssuingDisputeCanceledEvidenceProductType' -> String
(Int -> IssuingDisputeCanceledEvidenceProductType' -> ShowS)
-> (IssuingDisputeCanceledEvidenceProductType' -> String)
-> ([IssuingDisputeCanceledEvidenceProductType'] -> ShowS)
-> Show IssuingDisputeCanceledEvidenceProductType'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingDisputeCanceledEvidenceProductType'] -> ShowS
$cshowList :: [IssuingDisputeCanceledEvidenceProductType'] -> ShowS
show :: IssuingDisputeCanceledEvidenceProductType' -> String
$cshow :: IssuingDisputeCanceledEvidenceProductType' -> String
showsPrec :: Int -> IssuingDisputeCanceledEvidenceProductType' -> ShowS
$cshowsPrec :: Int -> IssuingDisputeCanceledEvidenceProductType' -> ShowS
GHC.Show.Show, IssuingDisputeCanceledEvidenceProductType'
-> IssuingDisputeCanceledEvidenceProductType' -> Bool
(IssuingDisputeCanceledEvidenceProductType'
-> IssuingDisputeCanceledEvidenceProductType' -> Bool)
-> (IssuingDisputeCanceledEvidenceProductType'
-> IssuingDisputeCanceledEvidenceProductType' -> Bool)
-> Eq IssuingDisputeCanceledEvidenceProductType'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingDisputeCanceledEvidenceProductType'
-> IssuingDisputeCanceledEvidenceProductType' -> Bool
$c/= :: IssuingDisputeCanceledEvidenceProductType'
-> IssuingDisputeCanceledEvidenceProductType' -> Bool
== :: IssuingDisputeCanceledEvidenceProductType'
-> IssuingDisputeCanceledEvidenceProductType' -> Bool
$c== :: IssuingDisputeCanceledEvidenceProductType'
-> IssuingDisputeCanceledEvidenceProductType' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingDisputeCanceledEvidenceProductType' where
toJSON :: IssuingDisputeCanceledEvidenceProductType' -> Value
toJSON (IssuingDisputeCanceledEvidenceProductType'Other Value
val) = Value
val
toJSON (IssuingDisputeCanceledEvidenceProductType'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (IssuingDisputeCanceledEvidenceProductType'
IssuingDisputeCanceledEvidenceProductType'EnumMerchandise) = Value
"merchandise"
toJSON (IssuingDisputeCanceledEvidenceProductType'
IssuingDisputeCanceledEvidenceProductType'EnumService) = Value
"service"
instance Data.Aeson.Types.FromJSON.FromJSON IssuingDisputeCanceledEvidenceProductType' where
parseJSON :: Value -> Parser IssuingDisputeCanceledEvidenceProductType'
parseJSON Value
val =
IssuingDisputeCanceledEvidenceProductType'
-> Parser IssuingDisputeCanceledEvidenceProductType'
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
"merchandise" -> IssuingDisputeCanceledEvidenceProductType'
IssuingDisputeCanceledEvidenceProductType'EnumMerchandise
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"service" -> IssuingDisputeCanceledEvidenceProductType'
IssuingDisputeCanceledEvidenceProductType'EnumService
| Bool
GHC.Base.otherwise -> Value -> IssuingDisputeCanceledEvidenceProductType'
IssuingDisputeCanceledEvidenceProductType'Other Value
val
)
data IssuingDisputeCanceledEvidenceReturnStatus'
=
IssuingDisputeCanceledEvidenceReturnStatus'Other Data.Aeson.Types.Internal.Value
|
IssuingDisputeCanceledEvidenceReturnStatus'Typed Data.Text.Internal.Text
|
IssuingDisputeCanceledEvidenceReturnStatus'EnumMerchantRejected
|
IssuingDisputeCanceledEvidenceReturnStatus'EnumSuccessful
deriving (Int -> IssuingDisputeCanceledEvidenceReturnStatus' -> ShowS
[IssuingDisputeCanceledEvidenceReturnStatus'] -> ShowS
IssuingDisputeCanceledEvidenceReturnStatus' -> String
(Int -> IssuingDisputeCanceledEvidenceReturnStatus' -> ShowS)
-> (IssuingDisputeCanceledEvidenceReturnStatus' -> String)
-> ([IssuingDisputeCanceledEvidenceReturnStatus'] -> ShowS)
-> Show IssuingDisputeCanceledEvidenceReturnStatus'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IssuingDisputeCanceledEvidenceReturnStatus'] -> ShowS
$cshowList :: [IssuingDisputeCanceledEvidenceReturnStatus'] -> ShowS
show :: IssuingDisputeCanceledEvidenceReturnStatus' -> String
$cshow :: IssuingDisputeCanceledEvidenceReturnStatus' -> String
showsPrec :: Int -> IssuingDisputeCanceledEvidenceReturnStatus' -> ShowS
$cshowsPrec :: Int -> IssuingDisputeCanceledEvidenceReturnStatus' -> ShowS
GHC.Show.Show, IssuingDisputeCanceledEvidenceReturnStatus'
-> IssuingDisputeCanceledEvidenceReturnStatus' -> Bool
(IssuingDisputeCanceledEvidenceReturnStatus'
-> IssuingDisputeCanceledEvidenceReturnStatus' -> Bool)
-> (IssuingDisputeCanceledEvidenceReturnStatus'
-> IssuingDisputeCanceledEvidenceReturnStatus' -> Bool)
-> Eq IssuingDisputeCanceledEvidenceReturnStatus'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IssuingDisputeCanceledEvidenceReturnStatus'
-> IssuingDisputeCanceledEvidenceReturnStatus' -> Bool
$c/= :: IssuingDisputeCanceledEvidenceReturnStatus'
-> IssuingDisputeCanceledEvidenceReturnStatus' -> Bool
== :: IssuingDisputeCanceledEvidenceReturnStatus'
-> IssuingDisputeCanceledEvidenceReturnStatus' -> Bool
$c== :: IssuingDisputeCanceledEvidenceReturnStatus'
-> IssuingDisputeCanceledEvidenceReturnStatus' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON IssuingDisputeCanceledEvidenceReturnStatus' where
toJSON :: IssuingDisputeCanceledEvidenceReturnStatus' -> Value
toJSON (IssuingDisputeCanceledEvidenceReturnStatus'Other Value
val) = Value
val
toJSON (IssuingDisputeCanceledEvidenceReturnStatus'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (IssuingDisputeCanceledEvidenceReturnStatus'
IssuingDisputeCanceledEvidenceReturnStatus'EnumMerchantRejected) = Value
"merchant_rejected"
toJSON (IssuingDisputeCanceledEvidenceReturnStatus'
IssuingDisputeCanceledEvidenceReturnStatus'EnumSuccessful) = Value
"successful"
instance Data.Aeson.Types.FromJSON.FromJSON IssuingDisputeCanceledEvidenceReturnStatus' where
parseJSON :: Value -> Parser IssuingDisputeCanceledEvidenceReturnStatus'
parseJSON Value
val =
IssuingDisputeCanceledEvidenceReturnStatus'
-> Parser IssuingDisputeCanceledEvidenceReturnStatus'
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
"merchant_rejected" -> IssuingDisputeCanceledEvidenceReturnStatus'
IssuingDisputeCanceledEvidenceReturnStatus'EnumMerchantRejected
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"successful" -> IssuingDisputeCanceledEvidenceReturnStatus'
IssuingDisputeCanceledEvidenceReturnStatus'EnumSuccessful
| Bool
GHC.Base.otherwise -> Value -> IssuingDisputeCanceledEvidenceReturnStatus'
IssuingDisputeCanceledEvidenceReturnStatus'Other Value
val
)