{-# 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 PaymentMethodDetailsCardWalletVisaCheckout
module StripeAPI.Types.PaymentMethodDetailsCardWalletVisaCheckout 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.Address
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe

-- | Defines the object schema located at @components.schemas.payment_method_details_card_wallet_visa_checkout@ in the specification.
data PaymentMethodDetailsCardWalletVisaCheckout = PaymentMethodDetailsCardWalletVisaCheckout
  { -- | billing_address: Owner\'s verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
    PaymentMethodDetailsCardWalletVisaCheckout
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress :: (GHC.Maybe.Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'),
    -- | email: Owner\'s verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckout -> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | name: Owner\'s verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckout -> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | shipping_address: Owner\'s verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
    PaymentMethodDetailsCardWalletVisaCheckout
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress :: (GHC.Maybe.Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
  }
  deriving
    ( Int -> PaymentMethodDetailsCardWalletVisaCheckout -> ShowS
[PaymentMethodDetailsCardWalletVisaCheckout] -> ShowS
PaymentMethodDetailsCardWalletVisaCheckout -> String
(Int -> PaymentMethodDetailsCardWalletVisaCheckout -> ShowS)
-> (PaymentMethodDetailsCardWalletVisaCheckout -> String)
-> ([PaymentMethodDetailsCardWalletVisaCheckout] -> ShowS)
-> Show PaymentMethodDetailsCardWalletVisaCheckout
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodDetailsCardWalletVisaCheckout] -> ShowS
$cshowList :: [PaymentMethodDetailsCardWalletVisaCheckout] -> ShowS
show :: PaymentMethodDetailsCardWalletVisaCheckout -> String
$cshow :: PaymentMethodDetailsCardWalletVisaCheckout -> String
showsPrec :: Int -> PaymentMethodDetailsCardWalletVisaCheckout -> ShowS
$cshowsPrec :: Int -> PaymentMethodDetailsCardWalletVisaCheckout -> ShowS
GHC.Show.Show,
      PaymentMethodDetailsCardWalletVisaCheckout
-> PaymentMethodDetailsCardWalletVisaCheckout -> Bool
(PaymentMethodDetailsCardWalletVisaCheckout
 -> PaymentMethodDetailsCardWalletVisaCheckout -> Bool)
-> (PaymentMethodDetailsCardWalletVisaCheckout
    -> PaymentMethodDetailsCardWalletVisaCheckout -> Bool)
-> Eq PaymentMethodDetailsCardWalletVisaCheckout
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodDetailsCardWalletVisaCheckout
-> PaymentMethodDetailsCardWalletVisaCheckout -> Bool
$c/= :: PaymentMethodDetailsCardWalletVisaCheckout
-> PaymentMethodDetailsCardWalletVisaCheckout -> Bool
== :: PaymentMethodDetailsCardWalletVisaCheckout
-> PaymentMethodDetailsCardWalletVisaCheckout -> Bool
$c== :: PaymentMethodDetailsCardWalletVisaCheckout
-> PaymentMethodDetailsCardWalletVisaCheckout -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodDetailsCardWalletVisaCheckout where
  toJSON :: PaymentMethodDetailsCardWalletVisaCheckout -> Value
toJSON PaymentMethodDetailsCardWalletVisaCheckout
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"billing_address" Text
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckout
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress PaymentMethodDetailsCardWalletVisaCheckout
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..= PaymentMethodDetailsCardWalletVisaCheckout -> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutEmail PaymentMethodDetailsCardWalletVisaCheckout
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"name" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckout -> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutName PaymentMethodDetailsCardWalletVisaCheckout
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"shipping_address" Text
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckout
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress PaymentMethodDetailsCardWalletVisaCheckout
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: PaymentMethodDetailsCardWalletVisaCheckout -> Encoding
toEncoding PaymentMethodDetailsCardWalletVisaCheckout
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"billing_address" Text
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckout
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress PaymentMethodDetailsCardWalletVisaCheckout
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..= PaymentMethodDetailsCardWalletVisaCheckout -> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutEmail PaymentMethodDetailsCardWalletVisaCheckout
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"name" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckout -> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutName PaymentMethodDetailsCardWalletVisaCheckout
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"shipping_address" Text
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckout
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress PaymentMethodDetailsCardWalletVisaCheckout
obj))))

instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodDetailsCardWalletVisaCheckout where
  parseJSON :: Value -> Parser PaymentMethodDetailsCardWalletVisaCheckout
parseJSON = String
-> (Object -> Parser PaymentMethodDetailsCardWalletVisaCheckout)
-> Value
-> Parser PaymentMethodDetailsCardWalletVisaCheckout
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodDetailsCardWalletVisaCheckout" (\Object
obj -> ((((Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
 -> Maybe Text
 -> Maybe Text
 -> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
 -> PaymentMethodDetailsCardWalletVisaCheckout)
-> Parser
     (Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
      -> Maybe Text
      -> Maybe Text
      -> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
      -> PaymentMethodDetailsCardWalletVisaCheckout)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
-> Maybe Text
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckout
PaymentMethodDetailsCardWalletVisaCheckout Parser
  (Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
   -> Maybe Text
   -> Maybe Text
   -> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
   -> PaymentMethodDetailsCardWalletVisaCheckout)
-> Parser
     (Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
      -> PaymentMethodDetailsCardWalletVisaCheckout)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     (Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"billing_address")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
   -> PaymentMethodDetailsCardWalletVisaCheckout)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
      -> PaymentMethodDetailsCardWalletVisaCheckout)
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
  (Maybe Text
   -> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
   -> PaymentMethodDetailsCardWalletVisaCheckout)
-> Parser (Maybe Text)
-> Parser
     (Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
      -> PaymentMethodDetailsCardWalletVisaCheckout)
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
"name")) Parser
  (Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
   -> PaymentMethodDetailsCardWalletVisaCheckout)
-> Parser
     (Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
-> Parser PaymentMethodDetailsCardWalletVisaCheckout
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser
     (Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"shipping_address"))

-- | Create a new 'PaymentMethodDetailsCardWalletVisaCheckout' with all required fields.
mkPaymentMethodDetailsCardWalletVisaCheckout :: PaymentMethodDetailsCardWalletVisaCheckout
mkPaymentMethodDetailsCardWalletVisaCheckout :: PaymentMethodDetailsCardWalletVisaCheckout
mkPaymentMethodDetailsCardWalletVisaCheckout =
  PaymentMethodDetailsCardWalletVisaCheckout :: Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
-> Maybe Text
-> Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckout
PaymentMethodDetailsCardWalletVisaCheckout
    { paymentMethodDetailsCardWalletVisaCheckoutBillingAddress :: Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress = Maybe PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutEmail :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutName :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutShippingAddress :: Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress = Maybe PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.payment_method_details_card_wallet_visa_checkout.properties.billing_address.anyOf@ in the specification.
--
-- Owner\\\'s verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
data PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' = PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
  { -- | city: City, district, suburb, town, or village.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | country: Two-letter country code ([ISO 3166-1 alpha-2](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2)).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line1: Address line 1 (e.g., street, PO Box, or company name).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line2: Address line 2 (e.g., apartment, suite, unit, or building).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | postal_code: ZIP or postal code.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | state: State, county, province, or region.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int
-> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> ShowS
[PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress']
-> ShowS
PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' -> String
(Int
 -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
 -> ShowS)
-> (PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
    -> String)
-> ([PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress']
    -> ShowS)
-> Show PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress']
-> ShowS
$cshowList :: [PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress']
-> ShowS
show :: PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' -> String
$cshow :: PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' -> String
showsPrec :: Int
-> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> ShowS
$cshowsPrec :: Int
-> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> ShowS
GHC.Show.Show,
      PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Bool
(PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
 -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
 -> Bool)
-> (PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
    -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
    -> Bool)
-> Eq PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Bool
$c/= :: PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Bool
== :: PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Bool
$c== :: PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' where
  toJSON :: PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' -> Value
toJSON PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"city" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'City PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Country PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line1" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Line1 PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line2" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Line2 PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"postal_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'PostalCode PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"state" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'State PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Encoding
toEncoding PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"city" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'City PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Country PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line1" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Line1 PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line2" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Line2 PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"postal_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'PostalCode PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"state" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'State PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
obj))))))

instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' where
  parseJSON :: Value
-> Parser PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
parseJSON = String
-> (Object
    -> Parser
         PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
-> Value
-> Parser PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'" (\Object
obj -> ((((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
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
"city")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
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
"country")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
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
"line1")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
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
"line2")) Parser
  (Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
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
"postal_code")) Parser
  (Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress')
-> Parser (Maybe Text)
-> Parser PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
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
"state"))

-- | Create a new 'PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'' with all required fields.
mkPaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' :: PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
mkPaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' :: PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
mkPaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' =
  PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
PaymentMethodDetailsCardWalletVisaCheckoutBillingAddress'
    { paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'City :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Country :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Line1 :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Line2 :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'PostalCode :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'State :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutBillingAddress'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.payment_method_details_card_wallet_visa_checkout.properties.shipping_address.anyOf@ in the specification.
--
-- Owner\\\'s verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
data PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress' = PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
  { -- | city: City, district, suburb, town, or village.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | country: Two-letter country code ([ISO 3166-1 alpha-2](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2)).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line1: Address line 1 (e.g., street, PO Box, or company name).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line2: Address line 2 (e.g., apartment, suite, unit, or building).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | postal_code: ZIP or postal code.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | state: State, county, province, or region.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int
-> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> ShowS
[PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress']
-> ShowS
PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> String
(Int
 -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
 -> ShowS)
-> (PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
    -> String)
-> ([PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress']
    -> ShowS)
-> Show PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress']
-> ShowS
$cshowList :: [PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress']
-> ShowS
show :: PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> String
$cshow :: PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> String
showsPrec :: Int
-> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> ShowS
$cshowsPrec :: Int
-> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> ShowS
GHC.Show.Show,
      PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Bool
(PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
 -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
 -> Bool)
-> (PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
    -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
    -> Bool)
-> Eq PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Bool
$c/= :: PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Bool
== :: PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Bool
$c== :: PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress' where
  toJSON :: PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress' -> Value
toJSON PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"city" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'City PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"country" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Country PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line1" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Line1 PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"line2" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Line2 PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"postal_code" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'PostalCode PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"state" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'State PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Encoding
toEncoding PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"city" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'City PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"country" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Country PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line1" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Line1 PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"line2" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Line2 PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"postal_code" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'PostalCode PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"state" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'State PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
obj))))))

instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress' where
  parseJSON :: Value
-> Parser
     PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
parseJSON = String
-> (Object
    -> Parser
         PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
-> Value
-> Parser
     PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'" (\Object
obj -> ((((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress' Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
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
"city")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
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
"country")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
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
"line1")) Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
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
"line2")) Parser
  (Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
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
"postal_code")) Parser
  (Maybe Text
   -> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress')
-> Parser (Maybe Text)
-> Parser
     PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
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
"state"))

-- | Create a new 'PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'' with all required fields.
mkPaymentMethodDetailsCardWalletVisaCheckoutShippingAddress' :: PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
mkPaymentMethodDetailsCardWalletVisaCheckoutShippingAddress' :: PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
mkPaymentMethodDetailsCardWalletVisaCheckoutShippingAddress' =
  PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
PaymentMethodDetailsCardWalletVisaCheckoutShippingAddress'
    { paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'City :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Country :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Line1 :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Line2 :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'PostalCode :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'State :: Maybe Text
paymentMethodDetailsCardWalletVisaCheckoutShippingAddress'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }