{-# 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 BitcoinReceiver
module StripeAPI.Types.BitcoinReceiver where

import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified StripeAPI.Common
import StripeAPI.TypeAlias
import {-# SOURCE #-} StripeAPI.Types.BitcoinTransaction
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | Defines the object schema located at @components.schemas.bitcoin_receiver@ in the specification.
data BitcoinReceiver = BitcoinReceiver
  { -- | active: True when this bitcoin receiver has received a non-zero amount of bitcoin.
    BitcoinReceiver -> Bool
bitcoinReceiverActive :: GHC.Types.Bool,
    -- | amount: The amount of \`currency\` that you are collecting as payment.
    BitcoinReceiver -> Int
bitcoinReceiverAmount :: GHC.Types.Int,
    -- | amount_received: The amount of \`currency\` to which \`bitcoin_amount_received\` has been converted.
    BitcoinReceiver -> Int
bitcoinReceiverAmountReceived :: GHC.Types.Int,
    -- | bitcoin_amount: The amount of bitcoin that the customer should send to fill the receiver. The \`bitcoin_amount\` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin.
    BitcoinReceiver -> Int
bitcoinReceiverBitcoinAmount :: GHC.Types.Int,
    -- | bitcoin_amount_received: The amount of bitcoin that has been sent by the customer to this receiver.
    BitcoinReceiver -> Int
bitcoinReceiverBitcoinAmountReceived :: GHC.Types.Int,
    -- | bitcoin_uri: This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    BitcoinReceiver -> Text
bitcoinReceiverBitcoinUri :: Data.Text.Internal.Text,
    -- | created: Time at which the object was created. Measured in seconds since the Unix epoch.
    BitcoinReceiver -> Int
bitcoinReceiverCreated :: GHC.Types.Int,
    -- | currency: Three-letter [ISO code for the currency](https:\/\/stripe.com\/docs\/currencies) to which the bitcoin will be converted.
    BitcoinReceiver -> Text
bitcoinReceiverCurrency :: Data.Text.Internal.Text,
    -- | customer: The customer ID of the bitcoin receiver.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    BitcoinReceiver -> Maybe Text
bitcoinReceiverCustomer :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | description: An arbitrary string attached to the object. Often useful for displaying to users.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    BitcoinReceiver -> Maybe Text
bitcoinReceiverDescription :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | email: The customer\'s email address, set by the API call that creates the receiver.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    BitcoinReceiver -> Maybe Text
bitcoinReceiverEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | filled: This flag is initially false and updates to true when the customer sends the \`bitcoin_amount\` to this receiver.
    BitcoinReceiver -> Bool
bitcoinReceiverFilled :: GHC.Types.Bool,
    -- | id: Unique identifier for the object.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    BitcoinReceiver -> Text
bitcoinReceiverId :: Data.Text.Internal.Text,
    -- | inbound_address: A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    BitcoinReceiver -> Text
bitcoinReceiverInboundAddress :: Data.Text.Internal.Text,
    -- | livemode: Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode.
    BitcoinReceiver -> Bool
bitcoinReceiverLivemode :: GHC.Types.Bool,
    -- | metadata: Set of [key-value pairs](https:\/\/stripe.com\/docs\/api\/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
    BitcoinReceiver -> Maybe Object
bitcoinReceiverMetadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
    -- | payment: The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    BitcoinReceiver -> Maybe Text
bitcoinReceiverPayment :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | refund_address: The refund address of this bitcoin receiver.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    BitcoinReceiver -> Maybe Text
bitcoinReceiverRefundAddress :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | transactions: A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key.
    BitcoinReceiver -> Maybe BitcoinReceiverTransactions'
bitcoinReceiverTransactions :: (GHC.Maybe.Maybe BitcoinReceiverTransactions'),
    -- | uncaptured_funds: This receiver contains uncaptured funds that can be used for a payment or refunded.
    BitcoinReceiver -> Bool
bitcoinReceiverUncapturedFunds :: GHC.Types.Bool,
    -- | used_for_payment: Indicate if this source is used for payment.
    BitcoinReceiver -> Maybe Bool
bitcoinReceiverUsedForPayment :: (GHC.Maybe.Maybe GHC.Types.Bool)
  }
  deriving
    ( Int -> BitcoinReceiver -> ShowS
[BitcoinReceiver] -> ShowS
BitcoinReceiver -> String
(Int -> BitcoinReceiver -> ShowS)
-> (BitcoinReceiver -> String)
-> ([BitcoinReceiver] -> ShowS)
-> Show BitcoinReceiver
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BitcoinReceiver] -> ShowS
$cshowList :: [BitcoinReceiver] -> ShowS
show :: BitcoinReceiver -> String
$cshow :: BitcoinReceiver -> String
showsPrec :: Int -> BitcoinReceiver -> ShowS
$cshowsPrec :: Int -> BitcoinReceiver -> ShowS
GHC.Show.Show,
      BitcoinReceiver -> BitcoinReceiver -> Bool
(BitcoinReceiver -> BitcoinReceiver -> Bool)
-> (BitcoinReceiver -> BitcoinReceiver -> Bool)
-> Eq BitcoinReceiver
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BitcoinReceiver -> BitcoinReceiver -> Bool
$c/= :: BitcoinReceiver -> BitcoinReceiver -> Bool
== :: BitcoinReceiver -> BitcoinReceiver -> Bool
$c== :: BitcoinReceiver -> BitcoinReceiver -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON BitcoinReceiver where
  toJSON :: BitcoinReceiver -> Value
toJSON BitcoinReceiver
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"active" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Bool
bitcoinReceiverActive BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"amount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Int
bitcoinReceiverAmount BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"amount_received" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Int
bitcoinReceiverAmountReceived BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"bitcoin_amount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Int
bitcoinReceiverBitcoinAmount BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"bitcoin_amount_received" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Int
bitcoinReceiverBitcoinAmountReceived BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"bitcoin_uri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Text
bitcoinReceiverBitcoinUri BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"created" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Int
bitcoinReceiverCreated BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"currency" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Text
bitcoinReceiverCurrency BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"customer" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Text
bitcoinReceiverCustomer BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"description" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Text
bitcoinReceiverDescription BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"email" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Text
bitcoinReceiverEmail BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"filled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Bool
bitcoinReceiverFilled BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Text
bitcoinReceiverId BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"inbound_address" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Text
bitcoinReceiverInboundAddress BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"livemode" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Bool
bitcoinReceiverLivemode BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text -> Maybe Object -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Object
bitcoinReceiverMetadata BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"payment" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Text
bitcoinReceiverPayment BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"refund_address" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Text
bitcoinReceiverRefundAddress BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"transactions" Text -> Maybe BitcoinReceiverTransactions' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe BitcoinReceiverTransactions'
bitcoinReceiverTransactions BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"uncaptured_funds" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Bool
bitcoinReceiverUncapturedFunds BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"used_for_payment" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Bool
bitcoinReceiverUsedForPayment BitcoinReceiver
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"bitcoin_receiver" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: BitcoinReceiver -> Encoding
toEncoding BitcoinReceiver
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"active" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Bool
bitcoinReceiverActive BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"amount" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Int
bitcoinReceiverAmount BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"amount_received" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Int
bitcoinReceiverAmountReceived BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"bitcoin_amount" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Int
bitcoinReceiverBitcoinAmount BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"bitcoin_amount_received" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Int
bitcoinReceiverBitcoinAmountReceived BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"bitcoin_uri" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Text
bitcoinReceiverBitcoinUri BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"created" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Int
bitcoinReceiverCreated BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"currency" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Text
bitcoinReceiverCurrency BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"customer" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Text
bitcoinReceiverCustomer BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"description" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Text
bitcoinReceiverDescription BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"email" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Text
bitcoinReceiverEmail BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"filled" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Bool
bitcoinReceiverFilled BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Text
bitcoinReceiverId BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"inbound_address" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Text
bitcoinReceiverInboundAddress BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"livemode" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Bool
bitcoinReceiverLivemode BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"metadata" Text -> Maybe Object -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Object
bitcoinReceiverMetadata BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"payment" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Text
bitcoinReceiverPayment BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"refund_address" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Text
bitcoinReceiverRefundAddress BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"transactions" Text -> Maybe BitcoinReceiverTransactions' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe BitcoinReceiverTransactions'
bitcoinReceiverTransactions BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"uncaptured_funds" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Bool
bitcoinReceiverUncapturedFunds BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"used_for_payment" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiver -> Maybe Bool
bitcoinReceiverUsedForPayment BitcoinReceiver
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"bitcoin_receiver"))))))))))))))))))))))

instance Data.Aeson.Types.FromJSON.FromJSON BitcoinReceiver where
  parseJSON :: Value -> Parser BitcoinReceiver
parseJSON = String
-> (Object -> Parser BitcoinReceiver)
-> Value
-> Parser BitcoinReceiver
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"BitcoinReceiver" (\Object
obj -> (((((((((((((((((((((Bool
 -> Int
 -> Int
 -> Int
 -> Int
 -> Text
 -> Int
 -> Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Bool
 -> Text
 -> Text
 -> Bool
 -> Maybe Object
 -> Maybe Text
 -> Maybe Text
 -> Maybe BitcoinReceiverTransactions'
 -> Bool
 -> Maybe Bool
 -> BitcoinReceiver)
-> Parser
     (Bool
      -> Int
      -> Int
      -> Int
      -> Int
      -> Text
      -> Int
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Bool
-> Int
-> Int
-> Int
-> Int
-> Text
-> Int
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Bool
-> Text
-> Text
-> Bool
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> Maybe BitcoinReceiverTransactions'
-> Bool
-> Maybe Bool
-> BitcoinReceiver
BitcoinReceiver Parser
  (Bool
   -> Int
   -> Int
   -> Int
   -> Int
   -> Text
   -> Int
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Bool
-> Parser
     (Int
      -> Int
      -> Int
      -> Int
      -> Text
      -> Int
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"active")) Parser
  (Int
   -> Int
   -> Int
   -> Int
   -> Text
   -> Int
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Int
-> Parser
     (Int
      -> Int
      -> Int
      -> Text
      -> Int
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"amount")) Parser
  (Int
   -> Int
   -> Int
   -> Text
   -> Int
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Int
-> Parser
     (Int
      -> Int
      -> Text
      -> Int
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"amount_received")) Parser
  (Int
   -> Int
   -> Text
   -> Int
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Int
-> Parser
     (Int
      -> Text
      -> Int
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"bitcoin_amount")) Parser
  (Int
   -> Text
   -> Int
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Int
-> Parser
     (Text
      -> Int
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"bitcoin_amount_received")) Parser
  (Text
   -> Int
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Text
-> Parser
     (Int
      -> Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"bitcoin_uri")) Parser
  (Int
   -> Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Int
-> Parser
     (Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"created")) Parser
  (Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Text
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"currency")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"customer")) Parser
  (Maybe Text
   -> Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"description")) Parser
  (Maybe Text
   -> Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser (Maybe Text)
-> Parser
     (Bool
      -> Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"email")) Parser
  (Bool
   -> Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Bool
-> Parser
     (Text
      -> Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"filled")) Parser
  (Text
   -> Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Text
-> Parser
     (Text
      -> Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"id")) Parser
  (Text
   -> Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Text
-> Parser
     (Bool
      -> Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"inbound_address")) Parser
  (Bool
   -> Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser Bool
-> Parser
     (Maybe Object
      -> Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"livemode")) Parser
  (Maybe Object
   -> Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser (Maybe Object)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Object)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"metadata")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe BitcoinReceiverTransactions'
      -> Bool
      -> Maybe Bool
      -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"payment")) Parser
  (Maybe Text
   -> Maybe BitcoinReceiverTransactions'
   -> Bool
   -> Maybe Bool
   -> BitcoinReceiver)
-> Parser (Maybe Text)
-> Parser
     (Maybe BitcoinReceiverTransactions'
      -> Bool -> Maybe Bool -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"refund_address")) Parser
  (Maybe BitcoinReceiverTransactions'
   -> Bool -> Maybe Bool -> BitcoinReceiver)
-> Parser (Maybe BitcoinReceiverTransactions')
-> Parser (Bool -> Maybe Bool -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe BitcoinReceiverTransactions')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"transactions")) Parser (Bool -> Maybe Bool -> BitcoinReceiver)
-> Parser Bool -> Parser (Maybe Bool -> BitcoinReceiver)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"uncaptured_funds")) Parser (Maybe Bool -> BitcoinReceiver)
-> Parser (Maybe Bool) -> Parser BitcoinReceiver
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"used_for_payment"))

-- | Create a new 'BitcoinReceiver' with all required fields.
mkBitcoinReceiver ::
  -- | 'bitcoinReceiverActive'
  GHC.Types.Bool ->
  -- | 'bitcoinReceiverAmount'
  GHC.Types.Int ->
  -- | 'bitcoinReceiverAmountReceived'
  GHC.Types.Int ->
  -- | 'bitcoinReceiverBitcoinAmount'
  GHC.Types.Int ->
  -- | 'bitcoinReceiverBitcoinAmountReceived'
  GHC.Types.Int ->
  -- | 'bitcoinReceiverBitcoinUri'
  Data.Text.Internal.Text ->
  -- | 'bitcoinReceiverCreated'
  GHC.Types.Int ->
  -- | 'bitcoinReceiverCurrency'
  Data.Text.Internal.Text ->
  -- | 'bitcoinReceiverFilled'
  GHC.Types.Bool ->
  -- | 'bitcoinReceiverId'
  Data.Text.Internal.Text ->
  -- | 'bitcoinReceiverInboundAddress'
  Data.Text.Internal.Text ->
  -- | 'bitcoinReceiverLivemode'
  GHC.Types.Bool ->
  -- | 'bitcoinReceiverUncapturedFunds'
  GHC.Types.Bool ->
  BitcoinReceiver
mkBitcoinReceiver :: Bool
-> Int
-> Int
-> Int
-> Int
-> Text
-> Int
-> Text
-> Bool
-> Text
-> Text
-> Bool
-> Bool
-> BitcoinReceiver
mkBitcoinReceiver Bool
bitcoinReceiverActive Int
bitcoinReceiverAmount Int
bitcoinReceiverAmountReceived Int
bitcoinReceiverBitcoinAmount Int
bitcoinReceiverBitcoinAmountReceived Text
bitcoinReceiverBitcoinUri Int
bitcoinReceiverCreated Text
bitcoinReceiverCurrency Bool
bitcoinReceiverFilled Text
bitcoinReceiverId Text
bitcoinReceiverInboundAddress Bool
bitcoinReceiverLivemode Bool
bitcoinReceiverUncapturedFunds =
  BitcoinReceiver :: Bool
-> Int
-> Int
-> Int
-> Int
-> Text
-> Int
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Bool
-> Text
-> Text
-> Bool
-> Maybe Object
-> Maybe Text
-> Maybe Text
-> Maybe BitcoinReceiverTransactions'
-> Bool
-> Maybe Bool
-> BitcoinReceiver
BitcoinReceiver
    { bitcoinReceiverActive :: Bool
bitcoinReceiverActive = Bool
bitcoinReceiverActive,
      bitcoinReceiverAmount :: Int
bitcoinReceiverAmount = Int
bitcoinReceiverAmount,
      bitcoinReceiverAmountReceived :: Int
bitcoinReceiverAmountReceived = Int
bitcoinReceiverAmountReceived,
      bitcoinReceiverBitcoinAmount :: Int
bitcoinReceiverBitcoinAmount = Int
bitcoinReceiverBitcoinAmount,
      bitcoinReceiverBitcoinAmountReceived :: Int
bitcoinReceiverBitcoinAmountReceived = Int
bitcoinReceiverBitcoinAmountReceived,
      bitcoinReceiverBitcoinUri :: Text
bitcoinReceiverBitcoinUri = Text
bitcoinReceiverBitcoinUri,
      bitcoinReceiverCreated :: Int
bitcoinReceiverCreated = Int
bitcoinReceiverCreated,
      bitcoinReceiverCurrency :: Text
bitcoinReceiverCurrency = Text
bitcoinReceiverCurrency,
      bitcoinReceiverCustomer :: Maybe Text
bitcoinReceiverCustomer = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      bitcoinReceiverDescription :: Maybe Text
bitcoinReceiverDescription = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      bitcoinReceiverEmail :: Maybe Text
bitcoinReceiverEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      bitcoinReceiverFilled :: Bool
bitcoinReceiverFilled = Bool
bitcoinReceiverFilled,
      bitcoinReceiverId :: Text
bitcoinReceiverId = Text
bitcoinReceiverId,
      bitcoinReceiverInboundAddress :: Text
bitcoinReceiverInboundAddress = Text
bitcoinReceiverInboundAddress,
      bitcoinReceiverLivemode :: Bool
bitcoinReceiverLivemode = Bool
bitcoinReceiverLivemode,
      bitcoinReceiverMetadata :: Maybe Object
bitcoinReceiverMetadata = Maybe Object
forall a. Maybe a
GHC.Maybe.Nothing,
      bitcoinReceiverPayment :: Maybe Text
bitcoinReceiverPayment = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      bitcoinReceiverRefundAddress :: Maybe Text
bitcoinReceiverRefundAddress = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      bitcoinReceiverTransactions :: Maybe BitcoinReceiverTransactions'
bitcoinReceiverTransactions = Maybe BitcoinReceiverTransactions'
forall a. Maybe a
GHC.Maybe.Nothing,
      bitcoinReceiverUncapturedFunds :: Bool
bitcoinReceiverUncapturedFunds = Bool
bitcoinReceiverUncapturedFunds,
      bitcoinReceiverUsedForPayment :: Maybe Bool
bitcoinReceiverUsedForPayment = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.bitcoin_receiver.properties.transactions@ in the specification.
--
-- A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key.
data BitcoinReceiverTransactions' = BitcoinReceiverTransactions'
  { -- | data: Details about each object.
    BitcoinReceiverTransactions' -> [BitcoinTransaction]
bitcoinReceiverTransactions'Data :: ([BitcoinTransaction]),
    -- | has_more: True if this list has another page of items after this one that can be fetched.
    BitcoinReceiverTransactions' -> Bool
bitcoinReceiverTransactions'HasMore :: GHC.Types.Bool,
    -- | url: The URL where this list can be accessed.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    BitcoinReceiverTransactions' -> Text
bitcoinReceiverTransactions'Url :: Data.Text.Internal.Text
  }
  deriving
    ( Int -> BitcoinReceiverTransactions' -> ShowS
[BitcoinReceiverTransactions'] -> ShowS
BitcoinReceiverTransactions' -> String
(Int -> BitcoinReceiverTransactions' -> ShowS)
-> (BitcoinReceiverTransactions' -> String)
-> ([BitcoinReceiverTransactions'] -> ShowS)
-> Show BitcoinReceiverTransactions'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BitcoinReceiverTransactions'] -> ShowS
$cshowList :: [BitcoinReceiverTransactions'] -> ShowS
show :: BitcoinReceiverTransactions' -> String
$cshow :: BitcoinReceiverTransactions' -> String
showsPrec :: Int -> BitcoinReceiverTransactions' -> ShowS
$cshowsPrec :: Int -> BitcoinReceiverTransactions' -> ShowS
GHC.Show.Show,
      BitcoinReceiverTransactions'
-> BitcoinReceiverTransactions' -> Bool
(BitcoinReceiverTransactions'
 -> BitcoinReceiverTransactions' -> Bool)
-> (BitcoinReceiverTransactions'
    -> BitcoinReceiverTransactions' -> Bool)
-> Eq BitcoinReceiverTransactions'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BitcoinReceiverTransactions'
-> BitcoinReceiverTransactions' -> Bool
$c/= :: BitcoinReceiverTransactions'
-> BitcoinReceiverTransactions' -> Bool
== :: BitcoinReceiverTransactions'
-> BitcoinReceiverTransactions' -> Bool
$c== :: BitcoinReceiverTransactions'
-> BitcoinReceiverTransactions' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON BitcoinReceiverTransactions' where
  toJSON :: BitcoinReceiverTransactions' -> Value
toJSON BitcoinReceiverTransactions'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"data" Text -> [BitcoinTransaction] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiverTransactions' -> [BitcoinTransaction]
bitcoinReceiverTransactions'Data BitcoinReceiverTransactions'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"has_more" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiverTransactions' -> Bool
bitcoinReceiverTransactions'HasMore BitcoinReceiverTransactions'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"url" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiverTransactions' -> Text
bitcoinReceiverTransactions'Url BitcoinReceiverTransactions'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: BitcoinReceiverTransactions' -> Encoding
toEncoding BitcoinReceiverTransactions'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"data" Text -> [BitcoinTransaction] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiverTransactions' -> [BitcoinTransaction]
bitcoinReceiverTransactions'Data BitcoinReceiverTransactions'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"has_more" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiverTransactions' -> Bool
bitcoinReceiverTransactions'HasMore BitcoinReceiverTransactions'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"url" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= BitcoinReceiverTransactions' -> Text
bitcoinReceiverTransactions'Url BitcoinReceiverTransactions'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list"))))

instance Data.Aeson.Types.FromJSON.FromJSON BitcoinReceiverTransactions' where
  parseJSON :: Value -> Parser BitcoinReceiverTransactions'
parseJSON = String
-> (Object -> Parser BitcoinReceiverTransactions')
-> Value
-> Parser BitcoinReceiverTransactions'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"BitcoinReceiverTransactions'" (\Object
obj -> ((([BitcoinTransaction]
 -> Bool -> Text -> BitcoinReceiverTransactions')
-> Parser
     ([BitcoinTransaction]
      -> Bool -> Text -> BitcoinReceiverTransactions')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure [BitcoinTransaction]
-> Bool -> Text -> BitcoinReceiverTransactions'
BitcoinReceiverTransactions' Parser
  ([BitcoinTransaction]
   -> Bool -> Text -> BitcoinReceiverTransactions')
-> Parser [BitcoinTransaction]
-> Parser (Bool -> Text -> BitcoinReceiverTransactions')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [BitcoinTransaction]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"data")) Parser (Bool -> Text -> BitcoinReceiverTransactions')
-> Parser Bool -> Parser (Text -> BitcoinReceiverTransactions')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"has_more")) Parser (Text -> BitcoinReceiverTransactions')
-> Parser Text -> Parser BitcoinReceiverTransactions'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"url"))

-- | Create a new 'BitcoinReceiverTransactions'' with all required fields.
mkBitcoinReceiverTransactions' ::
  -- | 'bitcoinReceiverTransactions'Data'
  [BitcoinTransaction] ->
  -- | 'bitcoinReceiverTransactions'HasMore'
  GHC.Types.Bool ->
  -- | 'bitcoinReceiverTransactions'Url'
  Data.Text.Internal.Text ->
  BitcoinReceiverTransactions'
mkBitcoinReceiverTransactions' :: [BitcoinTransaction]
-> Bool -> Text -> BitcoinReceiverTransactions'
mkBitcoinReceiverTransactions' [BitcoinTransaction]
bitcoinReceiverTransactions'Data Bool
bitcoinReceiverTransactions'HasMore Text
bitcoinReceiverTransactions'Url =
  BitcoinReceiverTransactions' :: [BitcoinTransaction]
-> Bool -> Text -> BitcoinReceiverTransactions'
BitcoinReceiverTransactions'
    { bitcoinReceiverTransactions'Data :: [BitcoinTransaction]
bitcoinReceiverTransactions'Data = [BitcoinTransaction]
bitcoinReceiverTransactions'Data,
      bitcoinReceiverTransactions'HasMore :: Bool
bitcoinReceiverTransactions'HasMore = Bool
bitcoinReceiverTransactions'HasMore,
      bitcoinReceiverTransactions'Url :: Text
bitcoinReceiverTransactions'Url = Text
bitcoinReceiverTransactions'Url
    }