{-# 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 Transaction
module RecurlyClient.Types.Transaction 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
import qualified Data.ByteString as Data.ByteString.Internal
import qualified Data.Foldable
import qualified Data.Functor
import qualified Data.Maybe
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text as 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 RecurlyClient.Common
import RecurlyClient.TypeAlias
import {-# SOURCE #-} RecurlyClient.Types.AccountMini
import {-# SOURCE #-} RecurlyClient.Types.AddressWithName
import {-# SOURCE #-} RecurlyClient.Types.InvoiceMini
import {-# SOURCE #-} RecurlyClient.Types.PaymentMethod
import {-# SOURCE #-} RecurlyClient.Types.TransactionFraudInfo
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | Defines the object schema located at @components.schemas.Transaction@ in the specification.
data Transaction = Transaction
    { Transaction -> Maybe AccountMini
transactionAccount :: (GHC.Maybe.Maybe AccountMini)
    -- ^ account
    , Transaction -> Maybe Object
transactionAction_result :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object)
    -- ^ action_result: Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort.
    , Transaction -> Maybe Float
transactionAmount :: (GHC.Maybe.Maybe GHC.Types.Float)
    -- ^ amount: Total transaction amount sent to the payment gateway.
    , Transaction -> Maybe TransactionAvs_check
transactionAvs_check :: (GHC.Maybe.Maybe TransactionAvs_check)
    -- ^ avs_check: When processed, result from checking the overall AVS on the transaction.
    , Transaction -> Maybe Bool
transactionBackup_payment_method_used :: (GHC.Maybe.Maybe GHC.Types.Bool)
    -- ^ backup_payment_method_used: Indicates if the transaction was completed using a backup payment
    , Transaction -> Maybe AddressWithName
transactionBilling_address :: (GHC.Maybe.Maybe AddressWithName)
    -- ^ billing_address
    , Transaction -> Maybe JsonDateTime
transactionCollected_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
    -- ^ collected_at
    , Transaction -> Maybe TransactionCollection_method
transactionCollection_method :: (GHC.Maybe.Maybe TransactionCollection_method)
    -- ^ collection_method: The method by which the payment was collected.
    , Transaction -> Maybe JsonDateTime
transactionCreated_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
    -- ^ created_at
    , Transaction -> Maybe Text
transactionCurrency :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ currency: 3-letter ISO 4217 currency code.
    --
    -- Constraints:
    --
    -- * Maximum length of 3
    , Transaction -> Maybe Text
transactionCustomer_message :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ customer_message: For declined (\`success=false\`) transactions, the message displayed to the customer.
    , Transaction -> Maybe Text
transactionCustomer_message_locale :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ customer_message_locale
    , Transaction -> Maybe TransactionCvv_check
transactionCvv_check :: (GHC.Maybe.Maybe TransactionCvv_check)
    -- ^ cvv_check: When processed, result from checking the CVV\/CVC value on the transaction.
    , Transaction -> Maybe TransactionFraudInfo
transactionFraud_info :: (GHC.Maybe.Maybe TransactionFraudInfo)
    -- ^ fraud_info
    , Transaction -> Maybe Text
transactionGateway_approval_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ gateway_approval_code
    , Transaction -> Maybe Text
transactionGateway_message :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ gateway_message: Transaction message from the payment gateway.
    , Transaction -> Maybe Text
transactionGateway_reference :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ gateway_reference: Transaction reference number from the payment gateway.
    , Transaction -> Maybe Text
transactionGateway_response_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ gateway_response_code
    , Transaction -> Maybe Float
transactionGateway_response_time :: (GHC.Maybe.Maybe GHC.Types.Float)
    -- ^ gateway_response_time: Time, in seconds, for gateway to process the transaction.
    , Transaction -> Maybe Object
transactionGateway_response_values :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object)
    -- ^ gateway_response_values: The values in this field will vary from gateway to gateway.
    , Transaction -> Maybe Text
transactionId :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ id
    --
    -- Constraints:
    --
    -- * Maximum length of 13
    , Transaction -> Maybe TransactionIndicator
transactionIndicator :: (GHC.Maybe.Maybe TransactionIndicator)
    -- ^ indicator: Must be sent for one-time transactions in order to provide context on which entity is submitting the transaction to ensure proper fraud checks are observed, such as 3DS. If the customer is in session, send \`customer\`. If this is a merchant initiated one-time transaction, send \`merchant\`.
    , Transaction -> Maybe InvoiceMini
transactionInvoice :: (GHC.Maybe.Maybe InvoiceMini)
    -- ^ invoice
    , Transaction -> Maybe Text
transactionIp_address_country :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ ip_address_country
    , Transaction -> Maybe Text
transactionIp_address_v4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ ip_address_v4: IP address provided when the billing information was collected:
    --
    -- - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address.
    -- - When the merchant enters billing information using the API, the merchant may provide an IP address.
    -- - When the merchant enters billing information using the UI, no IP address is recorded.
    , Transaction -> Maybe TransactionMerchant_reason_code
transactionMerchant_reason_code :: (GHC.Maybe.Maybe TransactionMerchant_reason_code)
    -- ^ merchant_reason_code: This conditional parameter is useful for merchants in specific industries who need to submit one-time Merchant Initiated transactions in specific cases.
    -- Not all gateways support these methods, but will support a generic one-time Merchant Initiated transaction.
    -- Only use this if the initiator value is \"merchant\". Otherwise, it will be ignored.
    --   - Incremental: Send \`incremental\` with an additional purchase if the original authorization amount is not sufficient to cover the costs of your service or product. For example, if the customer adds goods or services or there are additional expenses.
    --   - No Show: Send \`no_show\` if you charge customers a fee due to an agreed-upon cancellation policy in your industry.
    --   - Resubmission: Send \`resubmission\` if you need to attempt collection on a declined transaction. You may also use the force collection behavior which has the same effect.
    --   - Service Extension: Send \`service_extension\` if you are in a service industry and the customer has increased\/extended their service in some way. For example: adding a day onto a car rental agreement.
    --   - Split Shipment: Send \`split_shipment\` if you sell physical product and need to split up a shipment into multiple transactions when the customer is no longer in session.
    --   - Top Up: Send \`top_up\` if you process one-time transactions based on a pre-arranged agreement with your customer where there is a pre-arranged account balance that needs maintaining. For example, if the customer has agreed to maintain an account balance of 30.00 and their current balance is 20.00, the MIT amount would be at least 10.00 to meet that 30.00 threshold.
    , Transaction -> Maybe Text
transactionObject :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ object
    , Transaction -> Maybe TransactionOrigin
transactionOrigin :: (GHC.Maybe.Maybe TransactionOrigin)
    -- ^ origin: Describes how the transaction was triggered.
    , Transaction -> Maybe Text
transactionOriginal_transaction_id :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ original_transaction_id: If this transaction is a refund (\`type=refund\`), this will be the ID of the original transaction on the invoice being refunded.
    --
    -- Constraints:
    --
    -- * Maximum length of 13
    , Transaction -> Maybe TransactionPayment_gateway
transactionPayment_gateway :: (GHC.Maybe.Maybe TransactionPayment_gateway)
    -- ^ payment_gateway
    , Transaction -> Maybe PaymentMethod
transactionPayment_method :: (GHC.Maybe.Maybe PaymentMethod)
    -- ^ payment_method
    , Transaction -> Maybe Bool
transactionRefunded :: (GHC.Maybe.Maybe GHC.Types.Bool)
    -- ^ refunded: Indicates if part or all of this transaction was refunded.
    , Transaction -> Maybe TransactionStatus
transactionStatus :: (GHC.Maybe.Maybe TransactionStatus)
    -- ^ status: The current transaction status. Note that the status may change, e.g. a \`pending\` transaction may become \`declined\` or \`success\` may later become \`void\`.
    , Transaction -> Maybe Text
transactionStatus_code :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ status_code
    , Transaction -> Maybe Text
transactionStatus_message :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ status_message: For declined (\`success=false\`) transactions, the message displayed to the merchant.
    , Transaction -> Maybe [Text]
transactionSubscription_ids :: (GHC.Maybe.Maybe [Data.Text.Internal.Text])
    -- ^ subscription_ids: If the transaction is charging or refunding for one or more subscriptions, these are their IDs.
    , Transaction -> Maybe Bool
transactionSuccess :: (GHC.Maybe.Maybe GHC.Types.Bool)
    -- ^ success: Did this transaction complete successfully?
    , Transaction -> Maybe TransactionType
transactionType :: (GHC.Maybe.Maybe TransactionType)
    -- ^ type: - \`authorization\` – verifies billing information and places a hold on money in the customer\'s account.
    -- - \`capture\` – captures funds held by an authorization and completes a purchase.
    -- - \`purchase\` – combines the authorization and capture in one transaction.
    -- - \`refund\` – returns all or a portion of the money collected in a previous transaction to the customer.
    -- - \`verify\` – a \$0 or \$1 transaction used to verify billing information which is immediately voided.
    , Transaction -> Maybe JsonDateTime
transactionUpdated_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
    -- ^ updated_at
    , Transaction -> Maybe Text
transactionUuid :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ uuid: The UUID is useful for matching data with the CSV exports and building URLs into Recurly\'s UI.
    --
    -- Constraints:
    --
    -- * Maximum length of 32
    , Transaction -> Maybe Text
transactionVat_number :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ vat_number: VAT number for the customer on this transaction. If the customer\'s Billing Info country is BR or AR, then this will be their Tax Identifier. For all other countries this will come from the VAT Number field in the Billing Info.
    , Transaction -> Maybe JsonDateTime
transactionVoided_at :: (GHC.Maybe.Maybe RecurlyClient.Common.JsonDateTime)
    -- ^ voided_at
    , Transaction -> Maybe InvoiceMini
transactionVoided_by_invoice :: (GHC.Maybe.Maybe InvoiceMini)
    -- ^ voided_by_invoice
    }
    deriving
        ( Int -> Transaction -> ShowS
[Transaction] -> ShowS
Transaction -> String
(Int -> Transaction -> ShowS)
-> (Transaction -> String)
-> ([Transaction] -> ShowS)
-> Show Transaction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Transaction -> ShowS
showsPrec :: Int -> Transaction -> ShowS
$cshow :: Transaction -> String
show :: Transaction -> String
$cshowList :: [Transaction] -> ShowS
showList :: [Transaction] -> ShowS
GHC.Show.Show
        , Transaction -> Transaction -> Bool
(Transaction -> Transaction -> Bool)
-> (Transaction -> Transaction -> Bool) -> Eq Transaction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Transaction -> Transaction -> Bool
== :: Transaction -> Transaction -> Bool
$c/= :: Transaction -> Transaction -> Bool
/= :: Transaction -> Transaction -> Bool
GHC.Classes.Eq
        )

instance Data.Aeson.Types.ToJSON.ToJSON Transaction where
    toJSON :: Transaction -> Value
toJSON Transaction
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Pair] -> (AccountMini -> [Pair]) -> Maybe AccountMini -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (AccountMini -> Pair) -> AccountMini -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"account" Key -> AccountMini -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe AccountMini
transactionAccount Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Object -> [Pair]) -> Maybe Object -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Object -> Pair) -> Object -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"action_result" Key -> Object -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Object
transactionAction_result Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Float -> [Pair]) -> Maybe Float -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Float -> Pair) -> Float -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"amount" Key -> Float -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Float
transactionAmount Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (TransactionAvs_check -> [Pair])
-> Maybe TransactionAvs_check
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (TransactionAvs_check -> Pair) -> TransactionAvs_check -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"avs_check" Key -> TransactionAvs_check -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionAvs_check
transactionAvs_check Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"backup_payment_method_used" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Bool
transactionBackup_payment_method_used Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (AddressWithName -> [Pair]) -> Maybe AddressWithName -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (AddressWithName -> Pair) -> AddressWithName -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"billing_address" Key -> AddressWithName -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe AddressWithName
transactionBilling_address Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"collected_at" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe JsonDateTime
transactionCollected_at Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (TransactionCollection_method -> [Pair])
-> Maybe TransactionCollection_method
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (TransactionCollection_method -> Pair)
-> TransactionCollection_method
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"collection_method" Key -> TransactionCollection_method -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionCollection_method
transactionCollection_method Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"created_at" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe JsonDateTime
transactionCreated_at Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"currency" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionCurrency Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"customer_message" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionCustomer_message Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"customer_message_locale" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionCustomer_message_locale Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (TransactionCvv_check -> [Pair])
-> Maybe TransactionCvv_check
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (TransactionCvv_check -> Pair) -> TransactionCvv_check -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"cvv_check" Key -> TransactionCvv_check -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionCvv_check
transactionCvv_check Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (TransactionFraudInfo -> [Pair])
-> Maybe TransactionFraudInfo
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (TransactionFraudInfo -> Pair) -> TransactionFraudInfo -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"fraud_info" Key -> TransactionFraudInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionFraudInfo
transactionFraud_info Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_approval_code" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionGateway_approval_code Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_message" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionGateway_message Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_reference" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionGateway_reference Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_response_code" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionGateway_response_code Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Float -> [Pair]) -> Maybe Float -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Float -> Pair) -> Float -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_response_time" Key -> Float -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Float
transactionGateway_response_time Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Object -> [Pair]) -> Maybe Object -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Object -> Pair) -> Object -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_response_values" Key -> Object -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Object
transactionGateway_response_values Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionId Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (TransactionIndicator -> [Pair])
-> Maybe TransactionIndicator
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (TransactionIndicator -> Pair) -> TransactionIndicator -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"indicator" Key -> TransactionIndicator -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionIndicator
transactionIndicator Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (InvoiceMini -> [Pair]) -> Maybe InvoiceMini -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (InvoiceMini -> Pair) -> InvoiceMini -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"invoice" Key -> InvoiceMini -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe InvoiceMini
transactionInvoice Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"ip_address_country" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionIp_address_country Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"ip_address_v4" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionIp_address_v4 Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (TransactionMerchant_reason_code -> [Pair])
-> Maybe TransactionMerchant_reason_code
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (TransactionMerchant_reason_code -> Pair)
-> TransactionMerchant_reason_code
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"merchant_reason_code" Key -> TransactionMerchant_reason_code -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionMerchant_reason_code
transactionMerchant_reason_code Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"object" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionObject Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (TransactionOrigin -> [Pair])
-> Maybe TransactionOrigin
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (TransactionOrigin -> Pair) -> TransactionOrigin -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"origin" Key -> TransactionOrigin -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionOrigin
transactionOrigin Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"original_transaction_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionOriginal_transaction_id Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (TransactionPayment_gateway -> [Pair])
-> Maybe TransactionPayment_gateway
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (TransactionPayment_gateway -> Pair)
-> TransactionPayment_gateway
-> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"payment_gateway" Key -> TransactionPayment_gateway -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionPayment_gateway
transactionPayment_gateway Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (PaymentMethod -> [Pair]) -> Maybe PaymentMethod -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (PaymentMethod -> Pair) -> PaymentMethod -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"payment_method" Key -> PaymentMethod -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe PaymentMethod
transactionPayment_method Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"refunded" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Bool
transactionRefunded Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (TransactionStatus -> [Pair])
-> Maybe TransactionStatus
-> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (TransactionStatus -> Pair) -> TransactionStatus -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"status" Key -> TransactionStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionStatus
transactionStatus Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"status_code" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionStatus_code Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"status_message" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionStatus_message Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> ([Text] -> [Pair]) -> Maybe [Text] -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> ([Text] -> Pair) -> [Text] -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"subscription_ids" Key -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe [Text]
transactionSubscription_ids Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Bool -> [Pair]) -> Maybe Bool -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Bool -> Pair) -> Bool -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"success" Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Bool
transactionSuccess Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair]
-> (TransactionType -> [Pair]) -> Maybe TransactionType -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (TransactionType -> Pair) -> TransactionType -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"type" Key -> TransactionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionType
transactionType Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"updated_at" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe JsonDateTime
transactionUpdated_at Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"uuid" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionUuid Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"vat_number" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionVat_number Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (JsonDateTime -> [Pair]) -> Maybe JsonDateTime -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair])
-> (JsonDateTime -> Pair) -> JsonDateTime -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"voided_at" Key -> JsonDateTime -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe JsonDateTime
transactionVoided_at Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (InvoiceMini -> [Pair]) -> Maybe InvoiceMini -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (InvoiceMini -> Pair) -> InvoiceMini -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"voided_by_invoice" Key -> InvoiceMini -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe InvoiceMini
transactionVoided_by_invoice Transaction
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
    toEncoding :: Transaction -> Encoding
toEncoding Transaction
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ([Series] -> Series
forall a. Monoid a => [a] -> a
GHC.Base.mconcat ([[Series]] -> [Series]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Series]
-> (AccountMini -> [Series]) -> Maybe AccountMini -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (AccountMini -> Series) -> AccountMini -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"account" Key -> AccountMini -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe AccountMini
transactionAccount Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Object -> [Series]) -> Maybe Object -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Object -> Series) -> Object -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"action_result" Key -> Object -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Object
transactionAction_result Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Float -> [Series]) -> Maybe Float -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Float -> Series) -> Float -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"amount" Key -> Float -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Float
transactionAmount Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (TransactionAvs_check -> [Series])
-> Maybe TransactionAvs_check
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (TransactionAvs_check -> Series)
-> TransactionAvs_check
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"avs_check" Key -> TransactionAvs_check -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionAvs_check
transactionAvs_check Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"backup_payment_method_used" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Bool
transactionBackup_payment_method_used Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (AddressWithName -> [Series])
-> Maybe AddressWithName
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (AddressWithName -> Series) -> AddressWithName -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"billing_address" Key -> AddressWithName -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe AddressWithName
transactionBilling_address Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"collected_at" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe JsonDateTime
transactionCollected_at Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (TransactionCollection_method -> [Series])
-> Maybe TransactionCollection_method
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (TransactionCollection_method -> Series)
-> TransactionCollection_method
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"collection_method" Key -> TransactionCollection_method -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionCollection_method
transactionCollection_method Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"created_at" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe JsonDateTime
transactionCreated_at Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"currency" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionCurrency Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"customer_message" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionCustomer_message Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"customer_message_locale" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionCustomer_message_locale Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (TransactionCvv_check -> [Series])
-> Maybe TransactionCvv_check
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (TransactionCvv_check -> Series)
-> TransactionCvv_check
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"cvv_check" Key -> TransactionCvv_check -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionCvv_check
transactionCvv_check Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (TransactionFraudInfo -> [Series])
-> Maybe TransactionFraudInfo
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (TransactionFraudInfo -> Series)
-> TransactionFraudInfo
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"fraud_info" Key -> TransactionFraudInfo -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionFraudInfo
transactionFraud_info Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_approval_code" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionGateway_approval_code Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_message" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionGateway_message Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_reference" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionGateway_reference Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_response_code" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionGateway_response_code Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Float -> [Series]) -> Maybe Float -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Float -> Series) -> Float -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_response_time" Key -> Float -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Float
transactionGateway_response_time Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Object -> [Series]) -> Maybe Object -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Object -> Series) -> Object -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"gateway_response_values" Key -> Object -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Object
transactionGateway_response_values Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionId Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (TransactionIndicator -> [Series])
-> Maybe TransactionIndicator
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (TransactionIndicator -> Series)
-> TransactionIndicator
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"indicator" Key -> TransactionIndicator -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionIndicator
transactionIndicator Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (InvoiceMini -> [Series]) -> Maybe InvoiceMini -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (InvoiceMini -> Series) -> InvoiceMini -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"invoice" Key -> InvoiceMini -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe InvoiceMini
transactionInvoice Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"ip_address_country" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionIp_address_country Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"ip_address_v4" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionIp_address_v4 Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (TransactionMerchant_reason_code -> [Series])
-> Maybe TransactionMerchant_reason_code
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (TransactionMerchant_reason_code -> Series)
-> TransactionMerchant_reason_code
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"merchant_reason_code" Key -> TransactionMerchant_reason_code -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionMerchant_reason_code
transactionMerchant_reason_code Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"object" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionObject Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (TransactionOrigin -> [Series])
-> Maybe TransactionOrigin
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (TransactionOrigin -> Series) -> TransactionOrigin -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"origin" Key -> TransactionOrigin -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionOrigin
transactionOrigin Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"original_transaction_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionOriginal_transaction_id Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (TransactionPayment_gateway -> [Series])
-> Maybe TransactionPayment_gateway
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (TransactionPayment_gateway -> Series)
-> TransactionPayment_gateway
-> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"payment_gateway" Key -> TransactionPayment_gateway -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionPayment_gateway
transactionPayment_gateway Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (PaymentMethod -> [Series]) -> Maybe PaymentMethod -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (PaymentMethod -> Series) -> PaymentMethod -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"payment_method" Key -> PaymentMethod -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe PaymentMethod
transactionPayment_method Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"refunded" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Bool
transactionRefunded Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (TransactionStatus -> [Series])
-> Maybe TransactionStatus
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (TransactionStatus -> Series) -> TransactionStatus -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"status" Key -> TransactionStatus -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionStatus
transactionStatus Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"status_code" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionStatus_code Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"status_message" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionStatus_message Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> ([Text] -> [Series]) -> Maybe [Text] -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> ([Text] -> Series) -> [Text] -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"subscription_ids" Key -> [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe [Text]
transactionSubscription_ids Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Bool -> [Series]) -> Maybe Bool -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Bool -> Series) -> Bool -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"success" Key -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Bool
transactionSuccess Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (TransactionType -> [Series])
-> Maybe TransactionType
-> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (TransactionType -> Series) -> TransactionType -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"type" Key -> TransactionType -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe TransactionType
transactionType Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"updated_at" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe JsonDateTime
transactionUpdated_at Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"uuid" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionUuid Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"vat_number" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe Text
transactionVat_number Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (JsonDateTime -> [Series]) -> Maybe JsonDateTime -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (JsonDateTime -> Series) -> JsonDateTime -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"voided_at" Key -> JsonDateTime -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe JsonDateTime
transactionVoided_at Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series]
-> (InvoiceMini -> [Series]) -> Maybe InvoiceMini -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series])
-> (InvoiceMini -> Series) -> InvoiceMini -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"voided_by_invoice" Key -> InvoiceMini -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (Transaction -> Maybe InvoiceMini
transactionVoided_by_invoice Transaction
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [[Series]]
forall a. Monoid a => a
GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON Transaction where
    parseJSON :: Value -> Parser Transaction
parseJSON = String
-> (Object -> Parser Transaction) -> Value -> Parser Transaction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"Transaction" (\Object
obj -> (((((((((((((((((((((((((((((((((((((((((((Maybe AccountMini
 -> Maybe Object
 -> Maybe Float
 -> Maybe TransactionAvs_check
 -> Maybe Bool
 -> Maybe AddressWithName
 -> Maybe JsonDateTime
 -> Maybe TransactionCollection_method
 -> Maybe JsonDateTime
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe TransactionCvv_check
 -> Maybe TransactionFraudInfo
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Float
 -> Maybe Object
 -> Maybe Text
 -> Maybe TransactionIndicator
 -> Maybe InvoiceMini
 -> Maybe Text
 -> Maybe Text
 -> Maybe TransactionMerchant_reason_code
 -> Maybe Text
 -> Maybe TransactionOrigin
 -> Maybe Text
 -> Maybe TransactionPayment_gateway
 -> Maybe PaymentMethod
 -> Maybe Bool
 -> Maybe TransactionStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Bool
 -> Maybe TransactionType
 -> Maybe JsonDateTime
 -> Maybe Text
 -> Maybe Text
 -> Maybe JsonDateTime
 -> Maybe InvoiceMini
 -> Transaction)
-> Parser
     (Maybe AccountMini
      -> Maybe Object
      -> Maybe Float
      -> Maybe TransactionAvs_check
      -> Maybe Bool
      -> Maybe AddressWithName
      -> Maybe JsonDateTime
      -> Maybe TransactionCollection_method
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe AccountMini
-> Maybe Object
-> Maybe Float
-> Maybe TransactionAvs_check
-> Maybe Bool
-> Maybe AddressWithName
-> Maybe JsonDateTime
-> Maybe TransactionCollection_method
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe TransactionCvv_check
-> Maybe TransactionFraudInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Float
-> Maybe Object
-> Maybe Text
-> Maybe TransactionIndicator
-> Maybe InvoiceMini
-> Maybe Text
-> Maybe Text
-> Maybe TransactionMerchant_reason_code
-> Maybe Text
-> Maybe TransactionOrigin
-> Maybe Text
-> Maybe TransactionPayment_gateway
-> Maybe PaymentMethod
-> Maybe Bool
-> Maybe TransactionStatus
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe TransactionType
-> Maybe JsonDateTime
-> Maybe Text
-> Maybe Text
-> Maybe JsonDateTime
-> Maybe InvoiceMini
-> Transaction
Transaction Parser
  (Maybe AccountMini
   -> Maybe Object
   -> Maybe Float
   -> Maybe TransactionAvs_check
   -> Maybe Bool
   -> Maybe AddressWithName
   -> Maybe JsonDateTime
   -> Maybe TransactionCollection_method
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe AccountMini)
-> Parser
     (Maybe Object
      -> Maybe Float
      -> Maybe TransactionAvs_check
      -> Maybe Bool
      -> Maybe AddressWithName
      -> Maybe JsonDateTime
      -> Maybe TransactionCollection_method
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe AccountMini)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"account")) Parser
  (Maybe Object
   -> Maybe Float
   -> Maybe TransactionAvs_check
   -> Maybe Bool
   -> Maybe AddressWithName
   -> Maybe JsonDateTime
   -> Maybe TransactionCollection_method
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Object)
-> Parser
     (Maybe Float
      -> Maybe TransactionAvs_check
      -> Maybe Bool
      -> Maybe AddressWithName
      -> Maybe JsonDateTime
      -> Maybe TransactionCollection_method
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Object)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"action_result")) Parser
  (Maybe Float
   -> Maybe TransactionAvs_check
   -> Maybe Bool
   -> Maybe AddressWithName
   -> Maybe JsonDateTime
   -> Maybe TransactionCollection_method
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Float)
-> Parser
     (Maybe TransactionAvs_check
      -> Maybe Bool
      -> Maybe AddressWithName
      -> Maybe JsonDateTime
      -> Maybe TransactionCollection_method
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Float)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"amount")) Parser
  (Maybe TransactionAvs_check
   -> Maybe Bool
   -> Maybe AddressWithName
   -> Maybe JsonDateTime
   -> Maybe TransactionCollection_method
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe TransactionAvs_check)
-> Parser
     (Maybe Bool
      -> Maybe AddressWithName
      -> Maybe JsonDateTime
      -> Maybe TransactionCollection_method
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe TransactionAvs_check)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"avs_check")) Parser
  (Maybe Bool
   -> Maybe AddressWithName
   -> Maybe JsonDateTime
   -> Maybe TransactionCollection_method
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Bool)
-> Parser
     (Maybe AddressWithName
      -> Maybe JsonDateTime
      -> Maybe TransactionCollection_method
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"backup_payment_method_used")) Parser
  (Maybe AddressWithName
   -> Maybe JsonDateTime
   -> Maybe TransactionCollection_method
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe AddressWithName)
-> Parser
     (Maybe JsonDateTime
      -> Maybe TransactionCollection_method
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe AddressWithName)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"billing_address")) Parser
  (Maybe JsonDateTime
   -> Maybe TransactionCollection_method
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe JsonDateTime)
-> Parser
     (Maybe TransactionCollection_method
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"collected_at")) Parser
  (Maybe TransactionCollection_method
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe TransactionCollection_method)
-> Parser
     (Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe TransactionCollection_method)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"collection_method")) Parser
  (Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe JsonDateTime)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"created_at")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"currency")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"customer_message")) Parser
  (Maybe Text
   -> Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe TransactionCvv_check
      -> Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"customer_message_locale")) Parser
  (Maybe TransactionCvv_check
   -> Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe TransactionCvv_check)
-> Parser
     (Maybe TransactionFraudInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe TransactionCvv_check)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"cvv_check")) Parser
  (Maybe TransactionFraudInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe TransactionFraudInfo)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe TransactionFraudInfo)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"fraud_info")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"gateway_approval_code")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"gateway_message")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"gateway_reference")) Parser
  (Maybe Text
   -> Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Float
      -> Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"gateway_response_code")) Parser
  (Maybe Float
   -> Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Float)
-> Parser
     (Maybe Object
      -> Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Float)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"gateway_response_time")) Parser
  (Maybe Object
   -> Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Object)
-> Parser
     (Maybe Text
      -> Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Object)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"gateway_response_values")) Parser
  (Maybe Text
   -> Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe TransactionIndicator
      -> Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"id")) Parser
  (Maybe TransactionIndicator
   -> Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe TransactionIndicator)
-> Parser
     (Maybe InvoiceMini
      -> Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe TransactionIndicator)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"indicator")) Parser
  (Maybe InvoiceMini
   -> Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe InvoiceMini)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe InvoiceMini)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"invoice")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"ip_address_country")) Parser
  (Maybe Text
   -> Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe TransactionMerchant_reason_code
      -> Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"ip_address_v4")) Parser
  (Maybe TransactionMerchant_reason_code
   -> Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe TransactionMerchant_reason_code)
-> Parser
     (Maybe Text
      -> Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe TransactionMerchant_reason_code)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"merchant_reason_code")) Parser
  (Maybe Text
   -> Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe TransactionOrigin
      -> Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"object")) Parser
  (Maybe TransactionOrigin
   -> Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe TransactionOrigin)
-> Parser
     (Maybe Text
      -> Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe TransactionOrigin)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"origin")) Parser
  (Maybe Text
   -> Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe TransactionPayment_gateway
      -> Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"original_transaction_id")) Parser
  (Maybe TransactionPayment_gateway
   -> Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe TransactionPayment_gateway)
-> Parser
     (Maybe PaymentMethod
      -> Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe TransactionPayment_gateway)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"payment_gateway")) Parser
  (Maybe PaymentMethod
   -> Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe PaymentMethod)
-> Parser
     (Maybe Bool
      -> Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe PaymentMethod)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"payment_method")) Parser
  (Maybe Bool
   -> Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Bool)
-> Parser
     (Maybe TransactionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"refunded")) Parser
  (Maybe TransactionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe TransactionStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe TransactionStatus)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"status")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"status_code")) Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"status_message")) Parser
  (Maybe [Text]
   -> Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Bool
      -> Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"subscription_ids")) Parser
  (Maybe Bool
   -> Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Bool)
-> Parser
     (Maybe TransactionType
      -> Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"success")) Parser
  (Maybe TransactionType
   -> Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe TransactionType)
-> Parser
     (Maybe JsonDateTime
      -> Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe TransactionType)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"type")) Parser
  (Maybe JsonDateTime
   -> Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe JsonDateTime)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe JsonDateTime
      -> Maybe InvoiceMini
      -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"updated_at")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe JsonDateTime
   -> Maybe InvoiceMini
   -> Transaction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe JsonDateTime -> Maybe InvoiceMini -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"uuid")) Parser
  (Maybe Text
   -> Maybe JsonDateTime -> Maybe InvoiceMini -> Transaction)
-> Parser (Maybe Text)
-> Parser (Maybe JsonDateTime -> Maybe InvoiceMini -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"vat_number")) Parser (Maybe JsonDateTime -> Maybe InvoiceMini -> Transaction)
-> Parser (Maybe JsonDateTime)
-> Parser (Maybe InvoiceMini -> Transaction)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe JsonDateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"voided_at")) Parser (Maybe InvoiceMini -> Transaction)
-> Parser (Maybe InvoiceMini) -> Parser Transaction
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe InvoiceMini)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"voided_by_invoice"))

-- | Create a new 'Transaction' with all required fields.
mkTransaction :: Transaction
mkTransaction :: Transaction
mkTransaction =
    Transaction
        { transactionAccount :: Maybe AccountMini
transactionAccount = Maybe AccountMini
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionAction_result :: Maybe Object
transactionAction_result = Maybe Object
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionAmount :: Maybe Float
transactionAmount = Maybe Float
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionAvs_check :: Maybe TransactionAvs_check
transactionAvs_check = Maybe TransactionAvs_check
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionBackup_payment_method_used :: Maybe Bool
transactionBackup_payment_method_used = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionBilling_address :: Maybe AddressWithName
transactionBilling_address = Maybe AddressWithName
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionCollected_at :: Maybe JsonDateTime
transactionCollected_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionCollection_method :: Maybe TransactionCollection_method
transactionCollection_method = Maybe TransactionCollection_method
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionCreated_at :: Maybe JsonDateTime
transactionCreated_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionCurrency :: Maybe Text
transactionCurrency = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionCustomer_message :: Maybe Text
transactionCustomer_message = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionCustomer_message_locale :: Maybe Text
transactionCustomer_message_locale = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionCvv_check :: Maybe TransactionCvv_check
transactionCvv_check = Maybe TransactionCvv_check
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionFraud_info :: Maybe TransactionFraudInfo
transactionFraud_info = Maybe TransactionFraudInfo
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionGateway_approval_code :: Maybe Text
transactionGateway_approval_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionGateway_message :: Maybe Text
transactionGateway_message = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionGateway_reference :: Maybe Text
transactionGateway_reference = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionGateway_response_code :: Maybe Text
transactionGateway_response_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionGateway_response_time :: Maybe Float
transactionGateway_response_time = Maybe Float
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionGateway_response_values :: Maybe Object
transactionGateway_response_values = Maybe Object
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionId :: Maybe Text
transactionId = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionIndicator :: Maybe TransactionIndicator
transactionIndicator = Maybe TransactionIndicator
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionInvoice :: Maybe InvoiceMini
transactionInvoice = Maybe InvoiceMini
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionIp_address_country :: Maybe Text
transactionIp_address_country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionIp_address_v4 :: Maybe Text
transactionIp_address_v4 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionMerchant_reason_code :: Maybe TransactionMerchant_reason_code
transactionMerchant_reason_code = Maybe TransactionMerchant_reason_code
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionObject :: Maybe Text
transactionObject = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionOrigin :: Maybe TransactionOrigin
transactionOrigin = Maybe TransactionOrigin
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionOriginal_transaction_id :: Maybe Text
transactionOriginal_transaction_id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionPayment_gateway :: Maybe TransactionPayment_gateway
transactionPayment_gateway = Maybe TransactionPayment_gateway
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionPayment_method :: Maybe PaymentMethod
transactionPayment_method = Maybe PaymentMethod
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionRefunded :: Maybe Bool
transactionRefunded = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionStatus :: Maybe TransactionStatus
transactionStatus = Maybe TransactionStatus
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionStatus_code :: Maybe Text
transactionStatus_code = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionStatus_message :: Maybe Text
transactionStatus_message = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionSubscription_ids :: Maybe [Text]
transactionSubscription_ids = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionSuccess :: Maybe Bool
transactionSuccess = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionType :: Maybe TransactionType
transactionType = Maybe TransactionType
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionUpdated_at :: Maybe JsonDateTime
transactionUpdated_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionUuid :: Maybe Text
transactionUuid = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionVat_number :: Maybe Text
transactionVat_number = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionVoided_at :: Maybe JsonDateTime
transactionVoided_at = Maybe JsonDateTime
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionVoided_by_invoice :: Maybe InvoiceMini
transactionVoided_by_invoice = Maybe InvoiceMini
forall a. Maybe a
GHC.Maybe.Nothing
        }

{- | Defines the enum schema located at @components.schemas.Transaction.properties.avs_check@ in the specification.

When processed, result from checking the overall AVS on the transaction.
-}
data TransactionAvs_check
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      TransactionAvs_checkOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      TransactionAvs_checkTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"A"@
      TransactionAvs_checkEnumA
    | -- | Represents the JSON value @"B"@
      TransactionAvs_checkEnumB
    | -- | Represents the JSON value @"C"@
      TransactionAvs_checkEnumC
    | -- | Represents the JSON value @"D"@
      TransactionAvs_checkEnumD
    | -- | Represents the JSON value @"E"@
      TransactionAvs_checkEnumE
    | -- | Represents the JSON value @"F"@
      TransactionAvs_checkEnumF
    | -- | Represents the JSON value @"G"@
      TransactionAvs_checkEnumG
    | -- | Represents the JSON value @"H"@
      TransactionAvs_checkEnumH
    | -- | Represents the JSON value @"I"@
      TransactionAvs_checkEnumI
    | -- | Represents the JSON value @"J"@
      TransactionAvs_checkEnumJ
    | -- | Represents the JSON value @"K"@
      TransactionAvs_checkEnumK
    | -- | Represents the JSON value @"L"@
      TransactionAvs_checkEnumL
    | -- | Represents the JSON value @"M"@
      TransactionAvs_checkEnumM
    | -- | Represents the JSON value @"N"@
      TransactionAvs_checkEnumN
    | -- | Represents the JSON value @"O"@
      TransactionAvs_checkEnumO
    | -- | Represents the JSON value @"P"@
      TransactionAvs_checkEnumP
    | -- | Represents the JSON value @"Q"@
      TransactionAvs_checkEnumQ
    | -- | Represents the JSON value @"R"@
      TransactionAvs_checkEnumR
    | -- | Represents the JSON value @"S"@
      TransactionAvs_checkEnumS
    | -- | Represents the JSON value @"T"@
      TransactionAvs_checkEnumT
    | -- | Represents the JSON value @"U"@
      TransactionAvs_checkEnumU
    | -- | Represents the JSON value @"V"@
      TransactionAvs_checkEnumV
    | -- | Represents the JSON value @"W"@
      TransactionAvs_checkEnumW
    | -- | Represents the JSON value @"X"@
      TransactionAvs_checkEnumX
    | -- | Represents the JSON value @"Y"@
      TransactionAvs_checkEnumY
    | -- | Represents the JSON value @"Z"@
      TransactionAvs_checkEnumZ
    deriving (Int -> TransactionAvs_check -> ShowS
[TransactionAvs_check] -> ShowS
TransactionAvs_check -> String
(Int -> TransactionAvs_check -> ShowS)
-> (TransactionAvs_check -> String)
-> ([TransactionAvs_check] -> ShowS)
-> Show TransactionAvs_check
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionAvs_check -> ShowS
showsPrec :: Int -> TransactionAvs_check -> ShowS
$cshow :: TransactionAvs_check -> String
show :: TransactionAvs_check -> String
$cshowList :: [TransactionAvs_check] -> ShowS
showList :: [TransactionAvs_check] -> ShowS
GHC.Show.Show, TransactionAvs_check -> TransactionAvs_check -> Bool
(TransactionAvs_check -> TransactionAvs_check -> Bool)
-> (TransactionAvs_check -> TransactionAvs_check -> Bool)
-> Eq TransactionAvs_check
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionAvs_check -> TransactionAvs_check -> Bool
== :: TransactionAvs_check -> TransactionAvs_check -> Bool
$c/= :: TransactionAvs_check -> TransactionAvs_check -> Bool
/= :: TransactionAvs_check -> TransactionAvs_check -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON TransactionAvs_check where
    toJSON :: TransactionAvs_check -> Value
toJSON (TransactionAvs_checkOther Value
val) = Value
val
    toJSON (TransactionAvs_checkTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumA) = Value
"A"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumB) = Value
"B"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumC) = Value
"C"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumD) = Value
"D"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumE) = Value
"E"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumF) = Value
"F"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumG) = Value
"G"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumH) = Value
"H"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumI) = Value
"I"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumJ) = Value
"J"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumK) = Value
"K"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumL) = Value
"L"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumM) = Value
"M"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumN) = Value
"N"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumO) = Value
"O"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumP) = Value
"P"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumQ) = Value
"Q"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumR) = Value
"R"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumS) = Value
"S"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumT) = Value
"T"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumU) = Value
"U"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumV) = Value
"V"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumW) = Value
"W"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumX) = Value
"X"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumY) = Value
"Y"
    toJSON (TransactionAvs_check
TransactionAvs_checkEnumZ) = Value
"Z"
instance Data.Aeson.Types.FromJSON.FromJSON TransactionAvs_check where
    parseJSON :: Value -> Parser TransactionAvs_check
parseJSON Value
val =
        TransactionAvs_check -> Parser TransactionAvs_check
forall a. a -> Parser a
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
"A" -> TransactionAvs_check
TransactionAvs_checkEnumA
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"B" -> TransactionAvs_check
TransactionAvs_checkEnumB
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"C" -> TransactionAvs_check
TransactionAvs_checkEnumC
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"D" -> TransactionAvs_check
TransactionAvs_checkEnumD
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"E" -> TransactionAvs_check
TransactionAvs_checkEnumE
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"F" -> TransactionAvs_check
TransactionAvs_checkEnumF
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"G" -> TransactionAvs_check
TransactionAvs_checkEnumG
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"H" -> TransactionAvs_check
TransactionAvs_checkEnumH
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"I" -> TransactionAvs_check
TransactionAvs_checkEnumI
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"J" -> TransactionAvs_check
TransactionAvs_checkEnumJ
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"K" -> TransactionAvs_check
TransactionAvs_checkEnumK
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"L" -> TransactionAvs_check
TransactionAvs_checkEnumL
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"M" -> TransactionAvs_check
TransactionAvs_checkEnumM
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"N" -> TransactionAvs_check
TransactionAvs_checkEnumN
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"O" -> TransactionAvs_check
TransactionAvs_checkEnumO
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"P" -> TransactionAvs_check
TransactionAvs_checkEnumP
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"Q" -> TransactionAvs_check
TransactionAvs_checkEnumQ
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"R" -> TransactionAvs_check
TransactionAvs_checkEnumR
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"S" -> TransactionAvs_check
TransactionAvs_checkEnumS
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"T" -> TransactionAvs_check
TransactionAvs_checkEnumT
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"U" -> TransactionAvs_check
TransactionAvs_checkEnumU
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"V" -> TransactionAvs_check
TransactionAvs_checkEnumV
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"W" -> TransactionAvs_check
TransactionAvs_checkEnumW
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"X" -> TransactionAvs_check
TransactionAvs_checkEnumX
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"Y" -> TransactionAvs_check
TransactionAvs_checkEnumY
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"Z" -> TransactionAvs_check
TransactionAvs_checkEnumZ
                | Bool
GHC.Base.otherwise -> Value -> TransactionAvs_check
TransactionAvs_checkOther Value
val
            )

{- | Defines the enum schema located at @components.schemas.Transaction.properties.collection_method@ in the specification.

The method by which the payment was collected.
-}
data TransactionCollection_method
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      TransactionCollection_methodOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      TransactionCollection_methodTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"automatic"@
      TransactionCollection_methodEnumAutomatic
    | -- | Represents the JSON value @"manual"@
      TransactionCollection_methodEnumManual
    deriving (Int -> TransactionCollection_method -> ShowS
[TransactionCollection_method] -> ShowS
TransactionCollection_method -> String
(Int -> TransactionCollection_method -> ShowS)
-> (TransactionCollection_method -> String)
-> ([TransactionCollection_method] -> ShowS)
-> Show TransactionCollection_method
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionCollection_method -> ShowS
showsPrec :: Int -> TransactionCollection_method -> ShowS
$cshow :: TransactionCollection_method -> String
show :: TransactionCollection_method -> String
$cshowList :: [TransactionCollection_method] -> ShowS
showList :: [TransactionCollection_method] -> ShowS
GHC.Show.Show, TransactionCollection_method
-> TransactionCollection_method -> Bool
(TransactionCollection_method
 -> TransactionCollection_method -> Bool)
-> (TransactionCollection_method
    -> TransactionCollection_method -> Bool)
-> Eq TransactionCollection_method
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionCollection_method
-> TransactionCollection_method -> Bool
== :: TransactionCollection_method
-> TransactionCollection_method -> Bool
$c/= :: TransactionCollection_method
-> TransactionCollection_method -> Bool
/= :: TransactionCollection_method
-> TransactionCollection_method -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON TransactionCollection_method where
    toJSON :: TransactionCollection_method -> Value
toJSON (TransactionCollection_methodOther Value
val) = Value
val
    toJSON (TransactionCollection_methodTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (TransactionCollection_method
TransactionCollection_methodEnumAutomatic) = Value
"automatic"
    toJSON (TransactionCollection_method
TransactionCollection_methodEnumManual) = Value
"manual"
instance Data.Aeson.Types.FromJSON.FromJSON TransactionCollection_method where
    parseJSON :: Value -> Parser TransactionCollection_method
parseJSON Value
val =
        TransactionCollection_method -> Parser TransactionCollection_method
forall a. a -> Parser a
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" -> TransactionCollection_method
TransactionCollection_methodEnumAutomatic
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"manual" -> TransactionCollection_method
TransactionCollection_methodEnumManual
                | Bool
GHC.Base.otherwise -> Value -> TransactionCollection_method
TransactionCollection_methodOther Value
val
            )

{- | Defines the enum schema located at @components.schemas.Transaction.properties.cvv_check@ in the specification.

When processed, result from checking the CVV\/CVC value on the transaction.
-}
data TransactionCvv_check
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      TransactionCvv_checkOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      TransactionCvv_checkTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"D"@
      TransactionCvv_checkEnumD
    | -- | Represents the JSON value @"I"@
      TransactionCvv_checkEnumI
    | -- | Represents the JSON value @"M"@
      TransactionCvv_checkEnumM
    | -- | Represents the JSON value @"N"@
      TransactionCvv_checkEnumN
    | -- | Represents the JSON value @"P"@
      TransactionCvv_checkEnumP
    | -- | Represents the JSON value @"S"@
      TransactionCvv_checkEnumS
    | -- | Represents the JSON value @"U"@
      TransactionCvv_checkEnumU
    | -- | Represents the JSON value @"X"@
      TransactionCvv_checkEnumX
    deriving (Int -> TransactionCvv_check -> ShowS
[TransactionCvv_check] -> ShowS
TransactionCvv_check -> String
(Int -> TransactionCvv_check -> ShowS)
-> (TransactionCvv_check -> String)
-> ([TransactionCvv_check] -> ShowS)
-> Show TransactionCvv_check
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionCvv_check -> ShowS
showsPrec :: Int -> TransactionCvv_check -> ShowS
$cshow :: TransactionCvv_check -> String
show :: TransactionCvv_check -> String
$cshowList :: [TransactionCvv_check] -> ShowS
showList :: [TransactionCvv_check] -> ShowS
GHC.Show.Show, TransactionCvv_check -> TransactionCvv_check -> Bool
(TransactionCvv_check -> TransactionCvv_check -> Bool)
-> (TransactionCvv_check -> TransactionCvv_check -> Bool)
-> Eq TransactionCvv_check
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionCvv_check -> TransactionCvv_check -> Bool
== :: TransactionCvv_check -> TransactionCvv_check -> Bool
$c/= :: TransactionCvv_check -> TransactionCvv_check -> Bool
/= :: TransactionCvv_check -> TransactionCvv_check -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON TransactionCvv_check where
    toJSON :: TransactionCvv_check -> Value
toJSON (TransactionCvv_checkOther Value
val) = Value
val
    toJSON (TransactionCvv_checkTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (TransactionCvv_check
TransactionCvv_checkEnumD) = Value
"D"
    toJSON (TransactionCvv_check
TransactionCvv_checkEnumI) = Value
"I"
    toJSON (TransactionCvv_check
TransactionCvv_checkEnumM) = Value
"M"
    toJSON (TransactionCvv_check
TransactionCvv_checkEnumN) = Value
"N"
    toJSON (TransactionCvv_check
TransactionCvv_checkEnumP) = Value
"P"
    toJSON (TransactionCvv_check
TransactionCvv_checkEnumS) = Value
"S"
    toJSON (TransactionCvv_check
TransactionCvv_checkEnumU) = Value
"U"
    toJSON (TransactionCvv_check
TransactionCvv_checkEnumX) = Value
"X"
instance Data.Aeson.Types.FromJSON.FromJSON TransactionCvv_check where
    parseJSON :: Value -> Parser TransactionCvv_check
parseJSON Value
val =
        TransactionCvv_check -> Parser TransactionCvv_check
forall a. a -> Parser a
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
"D" -> TransactionCvv_check
TransactionCvv_checkEnumD
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"I" -> TransactionCvv_check
TransactionCvv_checkEnumI
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"M" -> TransactionCvv_check
TransactionCvv_checkEnumM
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"N" -> TransactionCvv_check
TransactionCvv_checkEnumN
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"P" -> TransactionCvv_check
TransactionCvv_checkEnumP
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"S" -> TransactionCvv_check
TransactionCvv_checkEnumS
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"U" -> TransactionCvv_check
TransactionCvv_checkEnumU
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"X" -> TransactionCvv_check
TransactionCvv_checkEnumX
                | Bool
GHC.Base.otherwise -> Value -> TransactionCvv_check
TransactionCvv_checkOther Value
val
            )

{- | Defines the enum schema located at @components.schemas.Transaction.properties.indicator@ in the specification.

Must be sent for one-time transactions in order to provide context on which entity is submitting the transaction to ensure proper fraud checks are observed, such as 3DS. If the customer is in session, send \`customer\`. If this is a merchant initiated one-time transaction, send \`merchant\`.
-}
data TransactionIndicator
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      TransactionIndicatorOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      TransactionIndicatorTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"customer"@
      TransactionIndicatorEnumCustomer
    | -- | Represents the JSON value @"merchant"@
      TransactionIndicatorEnumMerchant
    deriving (Int -> TransactionIndicator -> ShowS
[TransactionIndicator] -> ShowS
TransactionIndicator -> String
(Int -> TransactionIndicator -> ShowS)
-> (TransactionIndicator -> String)
-> ([TransactionIndicator] -> ShowS)
-> Show TransactionIndicator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionIndicator -> ShowS
showsPrec :: Int -> TransactionIndicator -> ShowS
$cshow :: TransactionIndicator -> String
show :: TransactionIndicator -> String
$cshowList :: [TransactionIndicator] -> ShowS
showList :: [TransactionIndicator] -> ShowS
GHC.Show.Show, TransactionIndicator -> TransactionIndicator -> Bool
(TransactionIndicator -> TransactionIndicator -> Bool)
-> (TransactionIndicator -> TransactionIndicator -> Bool)
-> Eq TransactionIndicator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionIndicator -> TransactionIndicator -> Bool
== :: TransactionIndicator -> TransactionIndicator -> Bool
$c/= :: TransactionIndicator -> TransactionIndicator -> Bool
/= :: TransactionIndicator -> TransactionIndicator -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON TransactionIndicator where
    toJSON :: TransactionIndicator -> Value
toJSON (TransactionIndicatorOther Value
val) = Value
val
    toJSON (TransactionIndicatorTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (TransactionIndicator
TransactionIndicatorEnumCustomer) = Value
"customer"
    toJSON (TransactionIndicator
TransactionIndicatorEnumMerchant) = Value
"merchant"
instance Data.Aeson.Types.FromJSON.FromJSON TransactionIndicator where
    parseJSON :: Value -> Parser TransactionIndicator
parseJSON Value
val =
        TransactionIndicator -> Parser TransactionIndicator
forall a. a -> Parser a
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
"customer" -> TransactionIndicator
TransactionIndicatorEnumCustomer
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"merchant" -> TransactionIndicator
TransactionIndicatorEnumMerchant
                | Bool
GHC.Base.otherwise -> Value -> TransactionIndicator
TransactionIndicatorOther Value
val
            )

{- | Defines the enum schema located at @components.schemas.Transaction.properties.merchant_reason_code@ in the specification.

This conditional parameter is useful for merchants in specific industries who need to submit one-time Merchant Initiated transactions in specific cases.
Not all gateways support these methods, but will support a generic one-time Merchant Initiated transaction.
Only use this if the initiator value is \"merchant\". Otherwise, it will be ignored.
  - Incremental: Send \`incremental\` with an additional purchase if the original authorization amount is not sufficient to cover the costs of your service or product. For example, if the customer adds goods or services or there are additional expenses.
  - No Show: Send \`no_show\` if you charge customers a fee due to an agreed-upon cancellation policy in your industry.
  - Resubmission: Send \`resubmission\` if you need to attempt collection on a declined transaction. You may also use the force collection behavior which has the same effect.
  - Service Extension: Send \`service_extension\` if you are in a service industry and the customer has increased\/extended their service in some way. For example: adding a day onto a car rental agreement.
  - Split Shipment: Send \`split_shipment\` if you sell physical product and need to split up a shipment into multiple transactions when the customer is no longer in session.
  - Top Up: Send \`top_up\` if you process one-time transactions based on a pre-arranged agreement with your customer where there is a pre-arranged account balance that needs maintaining. For example, if the customer has agreed to maintain an account balance of 30.00 and their current balance is 20.00, the MIT amount would be at least 10.00 to meet that 30.00 threshold.
-}
data TransactionMerchant_reason_code
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      TransactionMerchant_reason_codeOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      TransactionMerchant_reason_codeTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"incremental"@
      TransactionMerchant_reason_codeEnumIncremental
    | -- | Represents the JSON value @"no_show"@
      TransactionMerchant_reason_codeEnumNo_show
    | -- | Represents the JSON value @"resubmission"@
      TransactionMerchant_reason_codeEnumResubmission
    | -- | Represents the JSON value @"service_extension"@
      TransactionMerchant_reason_codeEnumService_extension
    | -- | Represents the JSON value @"split_shipment"@
      TransactionMerchant_reason_codeEnumSplit_shipment
    | -- | Represents the JSON value @"top_up"@
      TransactionMerchant_reason_codeEnumTop_up
    deriving (Int -> TransactionMerchant_reason_code -> ShowS
[TransactionMerchant_reason_code] -> ShowS
TransactionMerchant_reason_code -> String
(Int -> TransactionMerchant_reason_code -> ShowS)
-> (TransactionMerchant_reason_code -> String)
-> ([TransactionMerchant_reason_code] -> ShowS)
-> Show TransactionMerchant_reason_code
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionMerchant_reason_code -> ShowS
showsPrec :: Int -> TransactionMerchant_reason_code -> ShowS
$cshow :: TransactionMerchant_reason_code -> String
show :: TransactionMerchant_reason_code -> String
$cshowList :: [TransactionMerchant_reason_code] -> ShowS
showList :: [TransactionMerchant_reason_code] -> ShowS
GHC.Show.Show, TransactionMerchant_reason_code
-> TransactionMerchant_reason_code -> Bool
(TransactionMerchant_reason_code
 -> TransactionMerchant_reason_code -> Bool)
-> (TransactionMerchant_reason_code
    -> TransactionMerchant_reason_code -> Bool)
-> Eq TransactionMerchant_reason_code
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionMerchant_reason_code
-> TransactionMerchant_reason_code -> Bool
== :: TransactionMerchant_reason_code
-> TransactionMerchant_reason_code -> Bool
$c/= :: TransactionMerchant_reason_code
-> TransactionMerchant_reason_code -> Bool
/= :: TransactionMerchant_reason_code
-> TransactionMerchant_reason_code -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON TransactionMerchant_reason_code where
    toJSON :: TransactionMerchant_reason_code -> Value
toJSON (TransactionMerchant_reason_codeOther Value
val) = Value
val
    toJSON (TransactionMerchant_reason_codeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumIncremental) = Value
"incremental"
    toJSON (TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumNo_show) = Value
"no_show"
    toJSON (TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumResubmission) = Value
"resubmission"
    toJSON (TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumService_extension) = Value
"service_extension"
    toJSON (TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumSplit_shipment) = Value
"split_shipment"
    toJSON (TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumTop_up) = Value
"top_up"
instance Data.Aeson.Types.FromJSON.FromJSON TransactionMerchant_reason_code where
    parseJSON :: Value -> Parser TransactionMerchant_reason_code
parseJSON Value
val =
        TransactionMerchant_reason_code
-> Parser TransactionMerchant_reason_code
forall a. a -> Parser a
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
"incremental" -> TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumIncremental
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"no_show" -> TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumNo_show
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"resubmission" -> TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumResubmission
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"service_extension" -> TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumService_extension
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"split_shipment" -> TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumSplit_shipment
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"top_up" -> TransactionMerchant_reason_code
TransactionMerchant_reason_codeEnumTop_up
                | Bool
GHC.Base.otherwise -> Value -> TransactionMerchant_reason_code
TransactionMerchant_reason_codeOther Value
val
            )

{- | Defines the enum schema located at @components.schemas.Transaction.properties.origin@ in the specification.

Describes how the transaction was triggered.
-}
data TransactionOrigin
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      TransactionOriginOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      TransactionOriginTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"api"@
      TransactionOriginEnumApi
    | -- | Represents the JSON value @"chargeback"@
      TransactionOriginEnumChargeback
    | -- | Represents the JSON value @"external_recovery"@
      TransactionOriginEnumExternal_recovery
    | -- | Represents the JSON value @"force_collect"@
      TransactionOriginEnumForce_collect
    | -- | Represents the JSON value @"hpp"@
      TransactionOriginEnumHpp
    | -- | Represents the JSON value @"merchant"@
      TransactionOriginEnumMerchant
    | -- | Represents the JSON value @"recurly_admin"@
      TransactionOriginEnumRecurly_admin
    | -- | Represents the JSON value @"recurlyjs"@
      TransactionOriginEnumRecurlyjs
    | -- | Represents the JSON value @"recurring"@
      TransactionOriginEnumRecurring
    | -- | Represents the JSON value @"refunded_externally"@
      TransactionOriginEnumRefunded_externally
    | -- | Represents the JSON value @"transparent"@
      TransactionOriginEnumTransparent
    deriving (Int -> TransactionOrigin -> ShowS
[TransactionOrigin] -> ShowS
TransactionOrigin -> String
(Int -> TransactionOrigin -> ShowS)
-> (TransactionOrigin -> String)
-> ([TransactionOrigin] -> ShowS)
-> Show TransactionOrigin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionOrigin -> ShowS
showsPrec :: Int -> TransactionOrigin -> ShowS
$cshow :: TransactionOrigin -> String
show :: TransactionOrigin -> String
$cshowList :: [TransactionOrigin] -> ShowS
showList :: [TransactionOrigin] -> ShowS
GHC.Show.Show, TransactionOrigin -> TransactionOrigin -> Bool
(TransactionOrigin -> TransactionOrigin -> Bool)
-> (TransactionOrigin -> TransactionOrigin -> Bool)
-> Eq TransactionOrigin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionOrigin -> TransactionOrigin -> Bool
== :: TransactionOrigin -> TransactionOrigin -> Bool
$c/= :: TransactionOrigin -> TransactionOrigin -> Bool
/= :: TransactionOrigin -> TransactionOrigin -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON TransactionOrigin where
    toJSON :: TransactionOrigin -> Value
toJSON (TransactionOriginOther Value
val) = Value
val
    toJSON (TransactionOriginTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (TransactionOrigin
TransactionOriginEnumApi) = Value
"api"
    toJSON (TransactionOrigin
TransactionOriginEnumChargeback) = Value
"chargeback"
    toJSON (TransactionOrigin
TransactionOriginEnumExternal_recovery) = Value
"external_recovery"
    toJSON (TransactionOrigin
TransactionOriginEnumForce_collect) = Value
"force_collect"
    toJSON (TransactionOrigin
TransactionOriginEnumHpp) = Value
"hpp"
    toJSON (TransactionOrigin
TransactionOriginEnumMerchant) = Value
"merchant"
    toJSON (TransactionOrigin
TransactionOriginEnumRecurly_admin) = Value
"recurly_admin"
    toJSON (TransactionOrigin
TransactionOriginEnumRecurlyjs) = Value
"recurlyjs"
    toJSON (TransactionOrigin
TransactionOriginEnumRecurring) = Value
"recurring"
    toJSON (TransactionOrigin
TransactionOriginEnumRefunded_externally) = Value
"refunded_externally"
    toJSON (TransactionOrigin
TransactionOriginEnumTransparent) = Value
"transparent"
instance Data.Aeson.Types.FromJSON.FromJSON TransactionOrigin where
    parseJSON :: Value -> Parser TransactionOrigin
parseJSON Value
val =
        TransactionOrigin -> Parser TransactionOrigin
forall a. a -> Parser a
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
"api" -> TransactionOrigin
TransactionOriginEnumApi
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"chargeback" -> TransactionOrigin
TransactionOriginEnumChargeback
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"external_recovery" -> TransactionOrigin
TransactionOriginEnumExternal_recovery
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"force_collect" -> TransactionOrigin
TransactionOriginEnumForce_collect
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"hpp" -> TransactionOrigin
TransactionOriginEnumHpp
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"merchant" -> TransactionOrigin
TransactionOriginEnumMerchant
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"recurly_admin" -> TransactionOrigin
TransactionOriginEnumRecurly_admin
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"recurlyjs" -> TransactionOrigin
TransactionOriginEnumRecurlyjs
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"recurring" -> TransactionOrigin
TransactionOriginEnumRecurring
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"refunded_externally" -> TransactionOrigin
TransactionOriginEnumRefunded_externally
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"transparent" -> TransactionOrigin
TransactionOriginEnumTransparent
                | Bool
GHC.Base.otherwise -> Value -> TransactionOrigin
TransactionOriginOther Value
val
            )

-- | Defines the object schema located at @components.schemas.Transaction.properties.payment_gateway@ in the specification.
data TransactionPayment_gateway = TransactionPayment_gateway
    { TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayId :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ id
    , TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayName :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ name
    , TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayObject :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ object
    , TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayType :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
    -- ^ type
    }
    deriving
        ( Int -> TransactionPayment_gateway -> ShowS
[TransactionPayment_gateway] -> ShowS
TransactionPayment_gateway -> String
(Int -> TransactionPayment_gateway -> ShowS)
-> (TransactionPayment_gateway -> String)
-> ([TransactionPayment_gateway] -> ShowS)
-> Show TransactionPayment_gateway
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionPayment_gateway -> ShowS
showsPrec :: Int -> TransactionPayment_gateway -> ShowS
$cshow :: TransactionPayment_gateway -> String
show :: TransactionPayment_gateway -> String
$cshowList :: [TransactionPayment_gateway] -> ShowS
showList :: [TransactionPayment_gateway] -> ShowS
GHC.Show.Show
        , TransactionPayment_gateway -> TransactionPayment_gateway -> Bool
(TransactionPayment_gateway -> TransactionPayment_gateway -> Bool)
-> (TransactionPayment_gateway
    -> TransactionPayment_gateway -> Bool)
-> Eq TransactionPayment_gateway
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionPayment_gateway -> TransactionPayment_gateway -> Bool
== :: TransactionPayment_gateway -> TransactionPayment_gateway -> Bool
$c/= :: TransactionPayment_gateway -> TransactionPayment_gateway -> Bool
/= :: TransactionPayment_gateway -> TransactionPayment_gateway -> Bool
GHC.Classes.Eq
        )

instance Data.Aeson.Types.ToJSON.ToJSON TransactionPayment_gateway where
    toJSON :: TransactionPayment_gateway -> Value
toJSON TransactionPayment_gateway
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayId TransactionPayment_gateway
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"name" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayName TransactionPayment_gateway
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"object" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayObject TransactionPayment_gateway
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> (Text -> [Pair]) -> Maybe Text -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> (Text -> Pair) -> Text -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"type" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayType TransactionPayment_gateway
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
    toEncoding :: TransactionPayment_gateway -> Encoding
toEncoding TransactionPayment_gateway
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ([Series] -> Series
forall a. Monoid a => [a] -> a
GHC.Base.mconcat ([[Series]] -> [Series]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayId TransactionPayment_gateway
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"name" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayName TransactionPayment_gateway
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"object" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayObject TransactionPayment_gateway
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> (Text -> [Series]) -> Maybe Text -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> (Text -> Series) -> Text -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"type" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (TransactionPayment_gateway -> Maybe Text
transactionPayment_gatewayType TransactionPayment_gateway
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [[Series]]
forall a. Monoid a => a
GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON TransactionPayment_gateway where
    parseJSON :: Value -> Parser TransactionPayment_gateway
parseJSON = String
-> (Object -> Parser TransactionPayment_gateway)
-> Value
-> Parser TransactionPayment_gateway
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"TransactionPayment_gateway" (\Object
obj -> ((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> TransactionPayment_gateway)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> TransactionPayment_gateway)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TransactionPayment_gateway
TransactionPayment_gateway Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> TransactionPayment_gateway)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> TransactionPayment_gateway)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"id")) Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> TransactionPayment_gateway)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> TransactionPayment_gateway)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"name")) Parser (Maybe Text -> Maybe Text -> TransactionPayment_gateway)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> TransactionPayment_gateway)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"object")) Parser (Maybe Text -> TransactionPayment_gateway)
-> Parser (Maybe Text) -> Parser TransactionPayment_gateway
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"type"))

-- | Create a new 'TransactionPayment_gateway' with all required fields.
mkTransactionPayment_gateway :: TransactionPayment_gateway
mkTransactionPayment_gateway :: TransactionPayment_gateway
mkTransactionPayment_gateway =
    TransactionPayment_gateway
        { transactionPayment_gatewayId :: Maybe Text
transactionPayment_gatewayId = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionPayment_gatewayName :: Maybe Text
transactionPayment_gatewayName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionPayment_gatewayObject :: Maybe Text
transactionPayment_gatewayObject = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        , transactionPayment_gatewayType :: Maybe Text
transactionPayment_gatewayType = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
        }

{- | Defines the enum schema located at @components.schemas.Transaction.properties.status@ in the specification.

The current transaction status. Note that the status may change, e.g. a \`pending\` transaction may become \`declined\` or \`success\` may later become \`void\`.
-}
data TransactionStatus
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      TransactionStatusOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      TransactionStatusTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"chargeback"@
      TransactionStatusEnumChargeback
    | -- | Represents the JSON value @"declined"@
      TransactionStatusEnumDeclined
    | -- | Represents the JSON value @"error"@
      TransactionStatusEnumError
    | -- | Represents the JSON value @"pending"@
      TransactionStatusEnumPending
    | -- | Represents the JSON value @"processing"@
      TransactionStatusEnumProcessing
    | -- | Represents the JSON value @"scheduled"@
      TransactionStatusEnumScheduled
    | -- | Represents the JSON value @"success"@
      TransactionStatusEnumSuccess
    | -- | Represents the JSON value @"void"@
      TransactionStatusEnumVoid
    deriving (Int -> TransactionStatus -> ShowS
[TransactionStatus] -> ShowS
TransactionStatus -> String
(Int -> TransactionStatus -> ShowS)
-> (TransactionStatus -> String)
-> ([TransactionStatus] -> ShowS)
-> Show TransactionStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionStatus -> ShowS
showsPrec :: Int -> TransactionStatus -> ShowS
$cshow :: TransactionStatus -> String
show :: TransactionStatus -> String
$cshowList :: [TransactionStatus] -> ShowS
showList :: [TransactionStatus] -> ShowS
GHC.Show.Show, TransactionStatus -> TransactionStatus -> Bool
(TransactionStatus -> TransactionStatus -> Bool)
-> (TransactionStatus -> TransactionStatus -> Bool)
-> Eq TransactionStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionStatus -> TransactionStatus -> Bool
== :: TransactionStatus -> TransactionStatus -> Bool
$c/= :: TransactionStatus -> TransactionStatus -> Bool
/= :: TransactionStatus -> TransactionStatus -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON TransactionStatus where
    toJSON :: TransactionStatus -> Value
toJSON (TransactionStatusOther Value
val) = Value
val
    toJSON (TransactionStatusTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (TransactionStatus
TransactionStatusEnumChargeback) = Value
"chargeback"
    toJSON (TransactionStatus
TransactionStatusEnumDeclined) = Value
"declined"
    toJSON (TransactionStatus
TransactionStatusEnumError) = Value
"error"
    toJSON (TransactionStatus
TransactionStatusEnumPending) = Value
"pending"
    toJSON (TransactionStatus
TransactionStatusEnumProcessing) = Value
"processing"
    toJSON (TransactionStatus
TransactionStatusEnumScheduled) = Value
"scheduled"
    toJSON (TransactionStatus
TransactionStatusEnumSuccess) = Value
"success"
    toJSON (TransactionStatus
TransactionStatusEnumVoid) = Value
"void"
instance Data.Aeson.Types.FromJSON.FromJSON TransactionStatus where
    parseJSON :: Value -> Parser TransactionStatus
parseJSON Value
val =
        TransactionStatus -> Parser TransactionStatus
forall a. a -> Parser a
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
"chargeback" -> TransactionStatus
TransactionStatusEnumChargeback
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"declined" -> TransactionStatus
TransactionStatusEnumDeclined
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"error" -> TransactionStatus
TransactionStatusEnumError
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"pending" -> TransactionStatus
TransactionStatusEnumPending
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"processing" -> TransactionStatus
TransactionStatusEnumProcessing
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"scheduled" -> TransactionStatus
TransactionStatusEnumScheduled
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"success" -> TransactionStatus
TransactionStatusEnumSuccess
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"void" -> TransactionStatus
TransactionStatusEnumVoid
                | Bool
GHC.Base.otherwise -> Value -> TransactionStatus
TransactionStatusOther Value
val
            )

{- | Defines the enum schema located at @components.schemas.Transaction.properties.type@ in the specification.

- \`authorization\` – verifies billing information and places a hold on money in the customer\'s account.
- \`capture\` – captures funds held by an authorization and completes a purchase.
- \`purchase\` – combines the authorization and capture in one transaction.
- \`refund\` – returns all or a portion of the money collected in a previous transaction to the customer.
- \`verify\` – a \$0 or \$1 transaction used to verify billing information which is immediately voided.
-}
data TransactionType
    = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification.
      TransactionTypeOther Data.Aeson.Types.Internal.Value
    | -- | This constructor can be used to send values to the server which are not present in the specification yet.
      TransactionTypeTyped Data.Text.Internal.Text
    | -- | Represents the JSON value @"authorization"@
      TransactionTypeEnumAuthorization
    | -- | Represents the JSON value @"capture"@
      TransactionTypeEnumCapture
    | -- | Represents the JSON value @"purchase"@
      TransactionTypeEnumPurchase
    | -- | Represents the JSON value @"refund"@
      TransactionTypeEnumRefund
    | -- | Represents the JSON value @"verify"@
      TransactionTypeEnumVerify
    deriving (Int -> TransactionType -> ShowS
[TransactionType] -> ShowS
TransactionType -> String
(Int -> TransactionType -> ShowS)
-> (TransactionType -> String)
-> ([TransactionType] -> ShowS)
-> Show TransactionType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionType -> ShowS
showsPrec :: Int -> TransactionType -> ShowS
$cshow :: TransactionType -> String
show :: TransactionType -> String
$cshowList :: [TransactionType] -> ShowS
showList :: [TransactionType] -> ShowS
GHC.Show.Show, TransactionType -> TransactionType -> Bool
(TransactionType -> TransactionType -> Bool)
-> (TransactionType -> TransactionType -> Bool)
-> Eq TransactionType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionType -> TransactionType -> Bool
== :: TransactionType -> TransactionType -> Bool
$c/= :: TransactionType -> TransactionType -> Bool
/= :: TransactionType -> TransactionType -> Bool
GHC.Classes.Eq)

instance Data.Aeson.Types.ToJSON.ToJSON TransactionType where
    toJSON :: TransactionType -> Value
toJSON (TransactionTypeOther Value
val) = Value
val
    toJSON (TransactionTypeTyped Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
    toJSON (TransactionType
TransactionTypeEnumAuthorization) = Value
"authorization"
    toJSON (TransactionType
TransactionTypeEnumCapture) = Value
"capture"
    toJSON (TransactionType
TransactionTypeEnumPurchase) = Value
"purchase"
    toJSON (TransactionType
TransactionTypeEnumRefund) = Value
"refund"
    toJSON (TransactionType
TransactionTypeEnumVerify) = Value
"verify"
instance Data.Aeson.Types.FromJSON.FromJSON TransactionType where
    parseJSON :: Value -> Parser TransactionType
parseJSON Value
val =
        TransactionType -> Parser TransactionType
forall a. a -> Parser a
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
"authorization" -> TransactionType
TransactionTypeEnumAuthorization
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"capture" -> TransactionType
TransactionTypeEnumCapture
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"purchase" -> TransactionType
TransactionTypeEnumPurchase
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"refund" -> TransactionType
TransactionTypeEnumRefund
                | Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"verify" -> TransactionType
TransactionTypeEnumVerify
                | Bool
GHC.Base.otherwise -> Value -> TransactionType
TransactionTypeOther Value
val
            )