{-# LANGUAGE ExplicitForAll #-} {-# 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 different functions to run the operation getRecipientsId module StripeAPI.Operations.GetRecipientsId where import qualified Control.Monad.Fail import qualified Control.Monad.Trans.Reader 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.Either 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 Data.Vector import qualified GHC.Base import qualified GHC.Classes import qualified GHC.Int import qualified GHC.Show import qualified GHC.Types import qualified Network.HTTP.Client import qualified Network.HTTP.Client as Network.HTTP.Client.Request import qualified Network.HTTP.Client as Network.HTTP.Client.Types import qualified Network.HTTP.Simple import qualified Network.HTTP.Types import qualified Network.HTTP.Types as Network.HTTP.Types.Status import qualified Network.HTTP.Types as Network.HTTP.Types.URI import qualified StripeAPI.Common import StripeAPI.Types import qualified Prelude as GHC.Integer.Type import qualified Prelude as GHC.Maybe -- | > GET /v1/recipients/{id} -- -- \

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.\<\/p> getRecipientsId :: forall m. StripeAPI.Common.MonadHTTP m => -- | Contains all available parameters of this operation (query and path parameters) GetRecipientsIdParameters -> -- | Monadic computation which returns the result of the operation StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response GetRecipientsIdResponse) getRecipientsId parameters = GHC.Base.fmap ( \response_0 -> GHC.Base.fmap ( Data.Either.either GetRecipientsIdResponseError GHC.Base.id GHC.Base.. ( \response body -> if | (\status_1 -> Network.HTTP.Types.Status.statusCode status_1 GHC.Classes.== 200) (Network.HTTP.Client.Types.responseStatus response) -> GetRecipientsIdResponse200 Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body :: Data.Either.Either GHC.Base.String GetRecipientsIdResponseBody200 ) | GHC.Base.const GHC.Types.True (Network.HTTP.Client.Types.responseStatus response) -> GetRecipientsIdResponseDefault Data.Functor.<$> ( Data.Aeson.eitherDecodeStrict body :: Data.Either.Either GHC.Base.String Error ) | GHC.Base.otherwise -> Data.Either.Left "Missing default response type" ) response_0 ) response_0 ) (StripeAPI.Common.doCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.pack "GET") (Data.Text.pack ("/v1/recipients/" GHC.Base.++ (Data.ByteString.Char8.unpack (Network.HTTP.Types.URI.urlEncode GHC.Types.True GHC.Base.$ (Data.ByteString.Char8.pack GHC.Base.$ StripeAPI.Common.stringifyModel (getRecipientsIdParametersPathId parameters))) GHC.Base.++ ""))) [StripeAPI.Common.QueryParameter (Data.Text.pack "expand") (Data.Aeson.Types.ToJSON.toJSON Data.Functor.<$> getRecipientsIdParametersQueryExpand parameters) (Data.Text.pack "deepObject") GHC.Types.True]) -- | Defines the object schema located at @paths.\/v1\/recipients\/{id}.GET.parameters@ in the specification. data GetRecipientsIdParameters = GetRecipientsIdParameters { -- | pathId: Represents the parameter named \'id\' -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdParametersPathId :: Data.Text.Internal.Text, -- | queryExpand: Represents the parameter named \'expand\' -- -- Specifies which fields in the response should be expanded. getRecipientsIdParametersQueryExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdParameters where toJSON obj = Data.Aeson.Types.Internal.object ("pathId" Data.Aeson.Types.ToJSON..= getRecipientsIdParametersPathId obj : "queryExpand" Data.Aeson.Types.ToJSON..= getRecipientsIdParametersQueryExpand obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("pathId" Data.Aeson.Types.ToJSON..= getRecipientsIdParametersPathId obj) GHC.Base.<> ("queryExpand" Data.Aeson.Types.ToJSON..= getRecipientsIdParametersQueryExpand obj)) instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdParameters where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetRecipientsIdParameters" (\obj -> (GHC.Base.pure GetRecipientsIdParameters GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "pathId")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "queryExpand")) -- | Create a new 'GetRecipientsIdParameters' with all required fields. mkGetRecipientsIdParameters :: -- | 'getRecipientsIdParametersPathId' Data.Text.Internal.Text -> GetRecipientsIdParameters mkGetRecipientsIdParameters getRecipientsIdParametersPathId = GetRecipientsIdParameters { getRecipientsIdParametersPathId = getRecipientsIdParametersPathId, getRecipientsIdParametersQueryExpand = GHC.Maybe.Nothing } -- | Represents a response of the operation 'getRecipientsId'. -- -- The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), 'GetRecipientsIdResponseError' is used. data GetRecipientsIdResponse = -- | Means either no matching case available or a parse error GetRecipientsIdResponseError GHC.Base.String | -- | Successful response. GetRecipientsIdResponse200 GetRecipientsIdResponseBody200 | -- | Error response. GetRecipientsIdResponseDefault Error deriving (GHC.Show.Show, GHC.Classes.Eq) -- | Defines the object schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf@ in the specification. data GetRecipientsIdResponseBody200 = GetRecipientsIdResponseBody200 { -- | active_account: Hash describing the current account on the recipient, if there is one. getRecipientsIdResponseBody200ActiveAccount :: (GHC.Maybe.Maybe GetRecipientsIdResponseBody200ActiveAccount'), -- | cards: getRecipientsIdResponseBody200Cards :: (GHC.Maybe.Maybe GetRecipientsIdResponseBody200Cards'), -- | created: Time at which the object was created. Measured in seconds since the Unix epoch. getRecipientsIdResponseBody200Created :: (GHC.Maybe.Maybe GHC.Types.Int), -- | default_card: The default card to use for creating transfers to this recipient. getRecipientsIdResponseBody200DefaultCard :: (GHC.Maybe.Maybe GetRecipientsIdResponseBody200DefaultCard'Variants), -- | deleted: Always true for a deleted object getRecipientsIdResponseBody200Deleted :: (GHC.Maybe.Maybe GetRecipientsIdResponseBody200Deleted'), -- | description: An arbitrary string attached to the object. Often useful for displaying to users. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200Description :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | email -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200Email :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200Id :: (GHC.Maybe.Maybe 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. getRecipientsIdResponseBody200Livemode :: (GHC.Maybe.Maybe 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. getRecipientsIdResponseBody200Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | migrated_to: The ID of the [Custom account](https:\/\/stripe.com\/docs\/connect\/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. getRecipientsIdResponseBody200MigratedTo :: (GHC.Maybe.Maybe GetRecipientsIdResponseBody200MigratedTo'Variants), -- | name: Full, legal name of the recipient. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200Name :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | object: String representing the object\'s type. Objects of the same type share the same value. getRecipientsIdResponseBody200Object :: (GHC.Maybe.Maybe GetRecipientsIdResponseBody200Object'), -- | rolled_back_from getRecipientsIdResponseBody200RolledBackFrom :: (GHC.Maybe.Maybe GetRecipientsIdResponseBody200RolledBackFrom'Variants), -- | type: Type of the recipient, one of \`individual\` or \`corporation\`. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200Type :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200 where toJSON obj = Data.Aeson.Types.Internal.object ("active_account" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount obj : "cards" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Cards obj : "created" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Created obj : "default_card" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200DefaultCard obj : "deleted" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Deleted obj : "description" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Description obj : "email" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Email obj : "id" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Id obj : "livemode" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Livemode obj : "metadata" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Metadata obj : "migrated_to" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200MigratedTo obj : "name" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Name obj : "object" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Object obj : "rolled_back_from" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200RolledBackFrom obj : "type" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Type obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("active_account" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount obj) GHC.Base.<> (("cards" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Cards obj) GHC.Base.<> (("created" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Created obj) GHC.Base.<> (("default_card" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200DefaultCard obj) GHC.Base.<> (("deleted" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Deleted obj) GHC.Base.<> (("description" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Description obj) GHC.Base.<> (("email" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Email obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Id obj) GHC.Base.<> (("livemode" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Livemode obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Metadata obj) GHC.Base.<> (("migrated_to" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200MigratedTo obj) GHC.Base.<> (("name" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Name obj) GHC.Base.<> (("object" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Object obj) GHC.Base.<> (("rolled_back_from" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200RolledBackFrom obj) GHC.Base.<> ("type" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Type obj))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200 where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetRecipientsIdResponseBody200" (\obj -> ((((((((((((((GHC.Base.pure GetRecipientsIdResponseBody200 GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "active_account")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "cards")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "created")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_card")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "deleted")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "description")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "email")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "livemode")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "migrated_to")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "object")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "rolled_back_from")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "type")) -- | Create a new 'GetRecipientsIdResponseBody200' with all required fields. mkGetRecipientsIdResponseBody200 :: GetRecipientsIdResponseBody200 mkGetRecipientsIdResponseBody200 = GetRecipientsIdResponseBody200 { getRecipientsIdResponseBody200ActiveAccount = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Cards = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Created = GHC.Maybe.Nothing, getRecipientsIdResponseBody200DefaultCard = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Deleted = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Description = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Email = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Id = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Livemode = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Metadata = GHC.Maybe.Nothing, getRecipientsIdResponseBody200MigratedTo = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Name = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Object = GHC.Maybe.Nothing, getRecipientsIdResponseBody200RolledBackFrom = GHC.Maybe.Nothing, getRecipientsIdResponseBody200Type = GHC.Maybe.Nothing } -- | Defines the object schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.active_account.anyOf@ in the specification. -- -- Hash describing the current account on the recipient, if there is one. data GetRecipientsIdResponseBody200ActiveAccount' = GetRecipientsIdResponseBody200ActiveAccount' { -- | account: The ID of the account that the bank account is associated with. getRecipientsIdResponseBody200ActiveAccount'Account :: (GHC.Maybe.Maybe GetRecipientsIdResponseBody200ActiveAccount'Account'Variants), -- | account_holder_name: The name of the person or business that owns the bank account. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200ActiveAccount'AccountHolderName :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | account_holder_type: The type of entity that holds the account. This can be either \`individual\` or \`company\`. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200ActiveAccount'AccountHolderType :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | available_payout_methods: A set of available payout methods for this bank account. Only values from this set should be passed as the \`method\` when creating a payout. getRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods :: (GHC.Maybe.Maybe ([GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'])), -- | bank_name: Name of the bank associated with the routing number (e.g., \`WELLS FARGO\`). -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200ActiveAccount'BankName :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | country: Two-letter ISO code representing the country the bank account is located in. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200ActiveAccount'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | currency: Three-letter [ISO code for the currency](https:\/\/stripe.com\/docs\/payouts) paid out to the bank account. getRecipientsIdResponseBody200ActiveAccount'Currency :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | customer: The ID of the customer that the bank account is associated with. getRecipientsIdResponseBody200ActiveAccount'Customer :: (GHC.Maybe.Maybe GetRecipientsIdResponseBody200ActiveAccount'Customer'Variants), -- | default_for_currency: Whether this bank account is the default external account for its currency. getRecipientsIdResponseBody200ActiveAccount'DefaultForCurrency :: (GHC.Maybe.Maybe GHC.Types.Bool), -- | fingerprint: Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200ActiveAccount'Fingerprint :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | id: Unique identifier for the object. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200ActiveAccount'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | last4: The last four digits of the bank account number. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200ActiveAccount'Last4 :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | 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. getRecipientsIdResponseBody200ActiveAccount'Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object), -- | object: String representing the object\'s type. Objects of the same type share the same value. getRecipientsIdResponseBody200ActiveAccount'Object :: (GHC.Maybe.Maybe GetRecipientsIdResponseBody200ActiveAccount'Object'), -- | routing_number: The routing transit number for the bank account. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200ActiveAccount'RoutingNumber :: (GHC.Maybe.Maybe Data.Text.Internal.Text), -- | status: For bank accounts, possible values are \`new\`, \`validated\`, \`verified\`, \`verification_failed\`, or \`errored\`. A bank account that hasn\'t had any activity or validation performed is \`new\`. If Stripe can determine that the bank account exists, its status will be \`validated\`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be \`verified\`. If the verification failed for any reason, such as microdeposit failure, the status will be \`verification_failed\`. If a transfer sent to this bank account fails, we\'ll set the status to \`errored\` and will not continue to send transfers until the bank details are updated. -- -- For external accounts, possible values are \`new\` and \`errored\`. Validations aren\'t run against external accounts because they\'re only used for payouts. This means the other statuses don\'t apply. If a transfer fails, the status is set to \`errored\` and transfers are stopped until account details are updated. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200ActiveAccount'Status :: (GHC.Maybe.Maybe Data.Text.Internal.Text) } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200ActiveAccount' where toJSON obj = Data.Aeson.Types.Internal.object ("account" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Account obj : "account_holder_name" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'AccountHolderName obj : "account_holder_type" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'AccountHolderType obj : "available_payout_methods" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods obj : "bank_name" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'BankName obj : "country" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Country obj : "currency" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Currency obj : "customer" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Customer obj : "default_for_currency" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'DefaultForCurrency obj : "fingerprint" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Fingerprint obj : "id" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Id obj : "last4" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Last4 obj : "metadata" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Metadata obj : "object" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Object obj : "routing_number" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'RoutingNumber obj : "status" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Status obj : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("account" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Account obj) GHC.Base.<> (("account_holder_name" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'AccountHolderName obj) GHC.Base.<> (("account_holder_type" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'AccountHolderType obj) GHC.Base.<> (("available_payout_methods" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods obj) GHC.Base.<> (("bank_name" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'BankName obj) GHC.Base.<> (("country" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Country obj) GHC.Base.<> (("currency" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Currency obj) GHC.Base.<> (("customer" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Customer obj) GHC.Base.<> (("default_for_currency" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'DefaultForCurrency obj) GHC.Base.<> (("fingerprint" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Fingerprint obj) GHC.Base.<> (("id" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Id obj) GHC.Base.<> (("last4" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Last4 obj) GHC.Base.<> (("metadata" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Metadata obj) GHC.Base.<> (("object" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Object obj) GHC.Base.<> (("routing_number" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'RoutingNumber obj) GHC.Base.<> ("status" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200ActiveAccount'Status obj)))))))))))))))) instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200ActiveAccount' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetRecipientsIdResponseBody200ActiveAccount'" (\obj -> (((((((((((((((GHC.Base.pure GetRecipientsIdResponseBody200ActiveAccount' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_holder_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "account_holder_type")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "available_payout_methods")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "bank_name")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "country")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "customer")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "default_for_currency")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "fingerprint")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "id")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "last4")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "metadata")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "object")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "routing_number")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:? "status")) -- | Create a new 'GetRecipientsIdResponseBody200ActiveAccount'' with all required fields. mkGetRecipientsIdResponseBody200ActiveAccount' :: GetRecipientsIdResponseBody200ActiveAccount' mkGetRecipientsIdResponseBody200ActiveAccount' = GetRecipientsIdResponseBody200ActiveAccount' { getRecipientsIdResponseBody200ActiveAccount'Account = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'AccountHolderName = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'AccountHolderType = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'BankName = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'Country = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'Currency = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'Customer = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'DefaultForCurrency = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'Fingerprint = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'Id = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'Last4 = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'Metadata = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'Object = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'RoutingNumber = GHC.Maybe.Nothing, getRecipientsIdResponseBody200ActiveAccount'Status = GHC.Maybe.Nothing } -- | Defines the oneOf schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.active_account.anyOf.properties.account.anyOf@ in the specification. -- -- The ID of the account that the bank account is associated with. data GetRecipientsIdResponseBody200ActiveAccount'Account'Variants = GetRecipientsIdResponseBody200ActiveAccount'Account'Text Data.Text.Internal.Text | GetRecipientsIdResponseBody200ActiveAccount'Account'Account Account deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200ActiveAccount'Account'Variants where toJSON (GetRecipientsIdResponseBody200ActiveAccount'Account'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetRecipientsIdResponseBody200ActiveAccount'Account'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200ActiveAccount'Account'Variants where parseJSON val = case (GetRecipientsIdResponseBody200ActiveAccount'Account'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((GetRecipientsIdResponseBody200ActiveAccount'Account'Account Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.active_account.anyOf.properties.available_payout_methods.items@ in the specification. data GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"instant"@ GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'EnumInstant | -- | Represents the JSON value @"standard"@ GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'EnumStandard deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods' where toJSON (GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'Other val) = val toJSON (GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'EnumInstant) = "instant" toJSON (GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'EnumStandard) = "standard" instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "instant" -> GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'EnumInstant | val GHC.Classes.== "standard" -> GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'EnumStandard | GHC.Base.otherwise -> GetRecipientsIdResponseBody200ActiveAccount'AvailablePayoutMethods'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.active_account.anyOf.properties.customer.anyOf@ in the specification. -- -- The ID of the customer that the bank account is associated with. data GetRecipientsIdResponseBody200ActiveAccount'Customer'Variants = GetRecipientsIdResponseBody200ActiveAccount'Customer'Text Data.Text.Internal.Text | GetRecipientsIdResponseBody200ActiveAccount'Customer'Customer Customer | GetRecipientsIdResponseBody200ActiveAccount'Customer'DeletedCustomer DeletedCustomer deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200ActiveAccount'Customer'Variants where toJSON (GetRecipientsIdResponseBody200ActiveAccount'Customer'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetRecipientsIdResponseBody200ActiveAccount'Customer'Customer a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetRecipientsIdResponseBody200ActiveAccount'Customer'DeletedCustomer a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200ActiveAccount'Customer'Variants where parseJSON val = case (GetRecipientsIdResponseBody200ActiveAccount'Customer'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((GetRecipientsIdResponseBody200ActiveAccount'Customer'Customer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((GetRecipientsIdResponseBody200ActiveAccount'Customer'DeletedCustomer Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched")) of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.active_account.anyOf.properties.object@ in the specification. -- -- String representing the object\'s type. Objects of the same type share the same value. data GetRecipientsIdResponseBody200ActiveAccount'Object' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetRecipientsIdResponseBody200ActiveAccount'Object'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. GetRecipientsIdResponseBody200ActiveAccount'Object'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"bank_account"@ GetRecipientsIdResponseBody200ActiveAccount'Object'EnumBankAccount deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200ActiveAccount'Object' where toJSON (GetRecipientsIdResponseBody200ActiveAccount'Object'Other val) = val toJSON (GetRecipientsIdResponseBody200ActiveAccount'Object'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetRecipientsIdResponseBody200ActiveAccount'Object'EnumBankAccount) = "bank_account" instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200ActiveAccount'Object' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "bank_account" -> GetRecipientsIdResponseBody200ActiveAccount'Object'EnumBankAccount | GHC.Base.otherwise -> GetRecipientsIdResponseBody200ActiveAccount'Object'Other val ) -- | Defines the object schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.cards@ in the specification. data GetRecipientsIdResponseBody200Cards' = GetRecipientsIdResponseBody200Cards' { -- | data getRecipientsIdResponseBody200Cards'Data :: ([Card]), -- | has_more: True if this list has another page of items after this one that can be fetched. getRecipientsIdResponseBody200Cards'HasMore :: GHC.Types.Bool, -- | url: The URL where this list can be accessed. -- -- Constraints: -- -- * Maximum length of 5000 getRecipientsIdResponseBody200Cards'Url :: Data.Text.Internal.Text } deriving ( GHC.Show.Show, GHC.Classes.Eq ) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200Cards' where toJSON obj = Data.Aeson.Types.Internal.object ("data" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Cards'Data obj : "has_more" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Cards'HasMore obj : "url" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Cards'Url obj : "object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "list" : GHC.Base.mempty) toEncoding obj = Data.Aeson.Encoding.Internal.pairs (("data" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Cards'Data obj) GHC.Base.<> (("has_more" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Cards'HasMore obj) GHC.Base.<> (("url" Data.Aeson.Types.ToJSON..= getRecipientsIdResponseBody200Cards'Url obj) GHC.Base.<> ("object" Data.Aeson.Types.ToJSON..= Data.Aeson.Types.Internal.String "list")))) instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200Cards' where parseJSON = Data.Aeson.Types.FromJSON.withObject "GetRecipientsIdResponseBody200Cards'" (\obj -> ((GHC.Base.pure GetRecipientsIdResponseBody200Cards' GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "data")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "has_more")) GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "url")) -- | Create a new 'GetRecipientsIdResponseBody200Cards'' with all required fields. mkGetRecipientsIdResponseBody200Cards' :: -- | 'getRecipientsIdResponseBody200Cards'Data' [Card] -> -- | 'getRecipientsIdResponseBody200Cards'HasMore' GHC.Types.Bool -> -- | 'getRecipientsIdResponseBody200Cards'Url' Data.Text.Internal.Text -> GetRecipientsIdResponseBody200Cards' mkGetRecipientsIdResponseBody200Cards' getRecipientsIdResponseBody200Cards'Data getRecipientsIdResponseBody200Cards'HasMore getRecipientsIdResponseBody200Cards'Url = GetRecipientsIdResponseBody200Cards' { getRecipientsIdResponseBody200Cards'Data = getRecipientsIdResponseBody200Cards'Data, getRecipientsIdResponseBody200Cards'HasMore = getRecipientsIdResponseBody200Cards'HasMore, getRecipientsIdResponseBody200Cards'Url = getRecipientsIdResponseBody200Cards'Url } -- | Defines the oneOf schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.default_card.anyOf@ in the specification. -- -- The default card to use for creating transfers to this recipient. data GetRecipientsIdResponseBody200DefaultCard'Variants = GetRecipientsIdResponseBody200DefaultCard'Text Data.Text.Internal.Text | GetRecipientsIdResponseBody200DefaultCard'Card Card deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200DefaultCard'Variants where toJSON (GetRecipientsIdResponseBody200DefaultCard'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetRecipientsIdResponseBody200DefaultCard'Card a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200DefaultCard'Variants where parseJSON val = case (GetRecipientsIdResponseBody200DefaultCard'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((GetRecipientsIdResponseBody200DefaultCard'Card Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.deleted@ in the specification. -- -- Always true for a deleted object data GetRecipientsIdResponseBody200Deleted' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetRecipientsIdResponseBody200Deleted'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. GetRecipientsIdResponseBody200Deleted'Typed GHC.Types.Bool | -- | Represents the JSON value @true@ GetRecipientsIdResponseBody200Deleted'EnumTrue deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200Deleted' where toJSON (GetRecipientsIdResponseBody200Deleted'Other val) = val toJSON (GetRecipientsIdResponseBody200Deleted'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetRecipientsIdResponseBody200Deleted'EnumTrue) = Data.Aeson.Types.Internal.Bool GHC.Types.True instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200Deleted' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== Data.Aeson.Types.Internal.Bool GHC.Types.True -> GetRecipientsIdResponseBody200Deleted'EnumTrue | GHC.Base.otherwise -> GetRecipientsIdResponseBody200Deleted'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.migrated_to.anyOf@ in the specification. -- -- The ID of the [Custom account](https:\/\/stripe.com\/docs\/connect\/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. data GetRecipientsIdResponseBody200MigratedTo'Variants = GetRecipientsIdResponseBody200MigratedTo'Text Data.Text.Internal.Text | GetRecipientsIdResponseBody200MigratedTo'Account Account deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200MigratedTo'Variants where toJSON (GetRecipientsIdResponseBody200MigratedTo'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetRecipientsIdResponseBody200MigratedTo'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200MigratedTo'Variants where parseJSON val = case (GetRecipientsIdResponseBody200MigratedTo'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((GetRecipientsIdResponseBody200MigratedTo'Account Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a -- | Defines the enum schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.object@ in the specification. -- -- String representing the object\'s type. Objects of the same type share the same value. data GetRecipientsIdResponseBody200Object' = -- | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. GetRecipientsIdResponseBody200Object'Other Data.Aeson.Types.Internal.Value | -- | This constructor can be used to send values to the server which are not present in the specification yet. GetRecipientsIdResponseBody200Object'Typed Data.Text.Internal.Text | -- | Represents the JSON value @"recipient"@ GetRecipientsIdResponseBody200Object'EnumRecipient deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200Object' where toJSON (GetRecipientsIdResponseBody200Object'Other val) = val toJSON (GetRecipientsIdResponseBody200Object'Typed val) = Data.Aeson.Types.ToJSON.toJSON val toJSON (GetRecipientsIdResponseBody200Object'EnumRecipient) = "recipient" instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200Object' where parseJSON val = GHC.Base.pure ( if | val GHC.Classes.== "recipient" -> GetRecipientsIdResponseBody200Object'EnumRecipient | GHC.Base.otherwise -> GetRecipientsIdResponseBody200Object'Other val ) -- | Defines the oneOf schema located at @paths.\/v1\/recipients\/{id}.GET.responses.200.content.application\/json.schema.anyOf.properties.rolled_back_from.anyOf@ in the specification. data GetRecipientsIdResponseBody200RolledBackFrom'Variants = GetRecipientsIdResponseBody200RolledBackFrom'Text Data.Text.Internal.Text | GetRecipientsIdResponseBody200RolledBackFrom'Account Account deriving (GHC.Show.Show, GHC.Classes.Eq) instance Data.Aeson.Types.ToJSON.ToJSON GetRecipientsIdResponseBody200RolledBackFrom'Variants where toJSON (GetRecipientsIdResponseBody200RolledBackFrom'Text a) = Data.Aeson.Types.ToJSON.toJSON a toJSON (GetRecipientsIdResponseBody200RolledBackFrom'Account a) = Data.Aeson.Types.ToJSON.toJSON a instance Data.Aeson.Types.FromJSON.FromJSON GetRecipientsIdResponseBody200RolledBackFrom'Variants where parseJSON val = case (GetRecipientsIdResponseBody200RolledBackFrom'Text Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((GetRecipientsIdResponseBody200RolledBackFrom'Account Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched") of Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a