{-# 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 PaymentMethodDetailsCardWalletMasterpass
module StripeAPI.Types.PaymentMethodDetailsCardWalletMasterpass 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_masterpass@ in the specification.
data PaymentMethodDetailsCardWalletMasterpass = PaymentMethodDetailsCardWalletMasterpass
  { -- | 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.
    PaymentMethodDetailsCardWalletMasterpass
-> Maybe PaymentMethodDetailsCardWalletMasterpassBillingAddress'
paymentMethodDetailsCardWalletMasterpassBillingAddress :: (GHC.Maybe.Maybe PaymentMethodDetailsCardWalletMasterpassBillingAddress'),
    -- | 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
    PaymentMethodDetailsCardWalletMasterpass -> Maybe Text
paymentMethodDetailsCardWalletMasterpassEmail :: (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
    PaymentMethodDetailsCardWalletMasterpass -> Maybe Text
paymentMethodDetailsCardWalletMasterpassName :: (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.
    PaymentMethodDetailsCardWalletMasterpass
-> Maybe PaymentMethodDetailsCardWalletMasterpassShippingAddress'
paymentMethodDetailsCardWalletMasterpassShippingAddress :: (GHC.Maybe.Maybe PaymentMethodDetailsCardWalletMasterpassShippingAddress')
  }
  deriving
    ( Int -> PaymentMethodDetailsCardWalletMasterpass -> ShowS
[PaymentMethodDetailsCardWalletMasterpass] -> ShowS
PaymentMethodDetailsCardWalletMasterpass -> String
(Int -> PaymentMethodDetailsCardWalletMasterpass -> ShowS)
-> (PaymentMethodDetailsCardWalletMasterpass -> String)
-> ([PaymentMethodDetailsCardWalletMasterpass] -> ShowS)
-> Show PaymentMethodDetailsCardWalletMasterpass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodDetailsCardWalletMasterpass] -> ShowS
$cshowList :: [PaymentMethodDetailsCardWalletMasterpass] -> ShowS
show :: PaymentMethodDetailsCardWalletMasterpass -> String
$cshow :: PaymentMethodDetailsCardWalletMasterpass -> String
showsPrec :: Int -> PaymentMethodDetailsCardWalletMasterpass -> ShowS
$cshowsPrec :: Int -> PaymentMethodDetailsCardWalletMasterpass -> ShowS
GHC.Show.Show,
      PaymentMethodDetailsCardWalletMasterpass
-> PaymentMethodDetailsCardWalletMasterpass -> Bool
(PaymentMethodDetailsCardWalletMasterpass
 -> PaymentMethodDetailsCardWalletMasterpass -> Bool)
-> (PaymentMethodDetailsCardWalletMasterpass
    -> PaymentMethodDetailsCardWalletMasterpass -> Bool)
-> Eq PaymentMethodDetailsCardWalletMasterpass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodDetailsCardWalletMasterpass
-> PaymentMethodDetailsCardWalletMasterpass -> Bool
$c/= :: PaymentMethodDetailsCardWalletMasterpass
-> PaymentMethodDetailsCardWalletMasterpass -> Bool
== :: PaymentMethodDetailsCardWalletMasterpass
-> PaymentMethodDetailsCardWalletMasterpass -> Bool
$c== :: PaymentMethodDetailsCardWalletMasterpass
-> PaymentMethodDetailsCardWalletMasterpass -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodDetailsCardWalletMasterpass where
  toJSON :: PaymentMethodDetailsCardWalletMasterpass -> Value
toJSON PaymentMethodDetailsCardWalletMasterpass
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"billing_address" Text
-> Maybe PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletMasterpass
-> Maybe PaymentMethodDetailsCardWalletMasterpassBillingAddress'
paymentMethodDetailsCardWalletMasterpassBillingAddress PaymentMethodDetailsCardWalletMasterpass
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..= PaymentMethodDetailsCardWalletMasterpass -> Maybe Text
paymentMethodDetailsCardWalletMasterpassEmail PaymentMethodDetailsCardWalletMasterpass
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..= PaymentMethodDetailsCardWalletMasterpass -> Maybe Text
paymentMethodDetailsCardWalletMasterpassName PaymentMethodDetailsCardWalletMasterpass
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"shipping_address" Text
-> Maybe PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletMasterpass
-> Maybe PaymentMethodDetailsCardWalletMasterpassShippingAddress'
paymentMethodDetailsCardWalletMasterpassShippingAddress PaymentMethodDetailsCardWalletMasterpass
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: PaymentMethodDetailsCardWalletMasterpass -> Encoding
toEncoding PaymentMethodDetailsCardWalletMasterpass
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"billing_address" Text
-> Maybe PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletMasterpass
-> Maybe PaymentMethodDetailsCardWalletMasterpassBillingAddress'
paymentMethodDetailsCardWalletMasterpassBillingAddress PaymentMethodDetailsCardWalletMasterpass
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..= PaymentMethodDetailsCardWalletMasterpass -> Maybe Text
paymentMethodDetailsCardWalletMasterpassEmail PaymentMethodDetailsCardWalletMasterpass
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..= PaymentMethodDetailsCardWalletMasterpass -> Maybe Text
paymentMethodDetailsCardWalletMasterpassName PaymentMethodDetailsCardWalletMasterpass
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"shipping_address" Text
-> Maybe PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodDetailsCardWalletMasterpass
-> Maybe PaymentMethodDetailsCardWalletMasterpassShippingAddress'
paymentMethodDetailsCardWalletMasterpassShippingAddress PaymentMethodDetailsCardWalletMasterpass
obj))))

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

-- | Create a new 'PaymentMethodDetailsCardWalletMasterpass' with all required fields.
mkPaymentMethodDetailsCardWalletMasterpass :: PaymentMethodDetailsCardWalletMasterpass
mkPaymentMethodDetailsCardWalletMasterpass :: PaymentMethodDetailsCardWalletMasterpass
mkPaymentMethodDetailsCardWalletMasterpass =
  PaymentMethodDetailsCardWalletMasterpass :: Maybe PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
-> Maybe Text
-> Maybe PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> PaymentMethodDetailsCardWalletMasterpass
PaymentMethodDetailsCardWalletMasterpass
    { paymentMethodDetailsCardWalletMasterpassBillingAddress :: Maybe PaymentMethodDetailsCardWalletMasterpassBillingAddress'
paymentMethodDetailsCardWalletMasterpassBillingAddress = Maybe PaymentMethodDetailsCardWalletMasterpassBillingAddress'
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassEmail :: Maybe Text
paymentMethodDetailsCardWalletMasterpassEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassName :: Maybe Text
paymentMethodDetailsCardWalletMasterpassName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassShippingAddress :: Maybe PaymentMethodDetailsCardWalletMasterpassShippingAddress'
paymentMethodDetailsCardWalletMasterpassShippingAddress = Maybe PaymentMethodDetailsCardWalletMasterpassShippingAddress'
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.payment_method_details_card_wallet_masterpass.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 PaymentMethodDetailsCardWalletMasterpassBillingAddress' = PaymentMethodDetailsCardWalletMasterpassBillingAddress'
  { -- | city: City, district, suburb, town, or village.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'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
    PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'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
    PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line2: Address line 2 (e.g., apartment, suite, unit, or building).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | postal_code: ZIP or postal code.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | state: State, county, province, or region.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int
-> PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> ShowS
[PaymentMethodDetailsCardWalletMasterpassBillingAddress'] -> ShowS
PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> String
(Int
 -> PaymentMethodDetailsCardWalletMasterpassBillingAddress'
 -> ShowS)
-> (PaymentMethodDetailsCardWalletMasterpassBillingAddress'
    -> String)
-> ([PaymentMethodDetailsCardWalletMasterpassBillingAddress']
    -> ShowS)
-> Show PaymentMethodDetailsCardWalletMasterpassBillingAddress'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodDetailsCardWalletMasterpassBillingAddress'] -> ShowS
$cshowList :: [PaymentMethodDetailsCardWalletMasterpassBillingAddress'] -> ShowS
show :: PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> String
$cshow :: PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> String
showsPrec :: Int
-> PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> ShowS
$cshowsPrec :: Int
-> PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> ShowS
GHC.Show.Show,
      PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> Bool
(PaymentMethodDetailsCardWalletMasterpassBillingAddress'
 -> PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> Bool)
-> (PaymentMethodDetailsCardWalletMasterpassBillingAddress'
    -> PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> Bool)
-> Eq PaymentMethodDetailsCardWalletMasterpassBillingAddress'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> Bool
$c/= :: PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> Bool
== :: PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> Bool
$c== :: PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodDetailsCardWalletMasterpassBillingAddress' where
  toJSON :: PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> Value
toJSON PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'City PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Country PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Line1 PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Line2 PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'PostalCode PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'State PaymentMethodDetailsCardWalletMasterpassBillingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: PaymentMethodDetailsCardWalletMasterpassBillingAddress' -> Encoding
toEncoding PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'City PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Country PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Line1 PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Line2 PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'PostalCode PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassBillingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'State PaymentMethodDetailsCardWalletMasterpassBillingAddress'
obj))))))

instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodDetailsCardWalletMasterpassBillingAddress' where
  parseJSON :: Value
-> Parser PaymentMethodDetailsCardWalletMasterpassBillingAddress'
parseJSON = String
-> (Object
    -> Parser PaymentMethodDetailsCardWalletMasterpassBillingAddress')
-> Value
-> Parser PaymentMethodDetailsCardWalletMasterpassBillingAddress'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodDetailsCardWalletMasterpassBillingAddress'" (\Object
obj -> ((((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsCardWalletMasterpassBillingAddress'
PaymentMethodDetailsCardWalletMasterpassBillingAddress' Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
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
   -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
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
   -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
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
   -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
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
   -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
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
   -> PaymentMethodDetailsCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser PaymentMethodDetailsCardWalletMasterpassBillingAddress'
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 'PaymentMethodDetailsCardWalletMasterpassBillingAddress'' with all required fields.
mkPaymentMethodDetailsCardWalletMasterpassBillingAddress' :: PaymentMethodDetailsCardWalletMasterpassBillingAddress'
mkPaymentMethodDetailsCardWalletMasterpassBillingAddress' :: PaymentMethodDetailsCardWalletMasterpassBillingAddress'
mkPaymentMethodDetailsCardWalletMasterpassBillingAddress' =
  PaymentMethodDetailsCardWalletMasterpassBillingAddress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsCardWalletMasterpassBillingAddress'
PaymentMethodDetailsCardWalletMasterpassBillingAddress'
    { paymentMethodDetailsCardWalletMasterpassBillingAddress'City :: Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassBillingAddress'Country :: Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassBillingAddress'Line1 :: Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassBillingAddress'Line2 :: Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassBillingAddress'PostalCode :: Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassBillingAddress'State :: Maybe Text
paymentMethodDetailsCardWalletMasterpassBillingAddress'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }

-- | Defines the object schema located at @components.schemas.payment_method_details_card_wallet_masterpass.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 PaymentMethodDetailsCardWalletMasterpassShippingAddress' = PaymentMethodDetailsCardWalletMasterpassShippingAddress'
  { -- | city: City, district, suburb, town, or village.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'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
    PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'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
    PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | line2: Address line 2 (e.g., apartment, suite, unit, or building).
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | postal_code: ZIP or postal code.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
    -- | state: State, county, province, or region.
    --
    -- Constraints:
    --
    -- * Maximum length of 5000
    PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
  }
  deriving
    ( Int
-> PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> ShowS
[PaymentMethodDetailsCardWalletMasterpassShippingAddress'] -> ShowS
PaymentMethodDetailsCardWalletMasterpassShippingAddress' -> String
(Int
 -> PaymentMethodDetailsCardWalletMasterpassShippingAddress'
 -> ShowS)
-> (PaymentMethodDetailsCardWalletMasterpassShippingAddress'
    -> String)
-> ([PaymentMethodDetailsCardWalletMasterpassShippingAddress']
    -> ShowS)
-> Show PaymentMethodDetailsCardWalletMasterpassShippingAddress'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodDetailsCardWalletMasterpassShippingAddress'] -> ShowS
$cshowList :: [PaymentMethodDetailsCardWalletMasterpassShippingAddress'] -> ShowS
show :: PaymentMethodDetailsCardWalletMasterpassShippingAddress' -> String
$cshow :: PaymentMethodDetailsCardWalletMasterpassShippingAddress' -> String
showsPrec :: Int
-> PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> ShowS
$cshowsPrec :: Int
-> PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> ShowS
GHC.Show.Show,
      PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> PaymentMethodDetailsCardWalletMasterpassShippingAddress' -> Bool
(PaymentMethodDetailsCardWalletMasterpassShippingAddress'
 -> PaymentMethodDetailsCardWalletMasterpassShippingAddress'
 -> Bool)
-> (PaymentMethodDetailsCardWalletMasterpassShippingAddress'
    -> PaymentMethodDetailsCardWalletMasterpassShippingAddress'
    -> Bool)
-> Eq PaymentMethodDetailsCardWalletMasterpassShippingAddress'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> PaymentMethodDetailsCardWalletMasterpassShippingAddress' -> Bool
$c/= :: PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> PaymentMethodDetailsCardWalletMasterpassShippingAddress' -> Bool
== :: PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> PaymentMethodDetailsCardWalletMasterpassShippingAddress' -> Bool
$c== :: PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> PaymentMethodDetailsCardWalletMasterpassShippingAddress' -> Bool
GHC.Classes.Eq
    )

instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodDetailsCardWalletMasterpassShippingAddress' where
  toJSON :: PaymentMethodDetailsCardWalletMasterpassShippingAddress' -> Value
toJSON PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'City PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Country PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Line1 PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Line2 PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'PostalCode PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'State PaymentMethodDetailsCardWalletMasterpassShippingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
  toEncoding :: PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Encoding
toEncoding PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'City PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Country PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Line1 PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Line2 PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'PostalCode PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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..= PaymentMethodDetailsCardWalletMasterpassShippingAddress'
-> Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'State PaymentMethodDetailsCardWalletMasterpassShippingAddress'
obj))))))

instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodDetailsCardWalletMasterpassShippingAddress' where
  parseJSON :: Value
-> Parser PaymentMethodDetailsCardWalletMasterpassShippingAddress'
parseJSON = String
-> (Object
    -> Parser PaymentMethodDetailsCardWalletMasterpassShippingAddress')
-> Value
-> Parser PaymentMethodDetailsCardWalletMasterpassShippingAddress'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodDetailsCardWalletMasterpassShippingAddress'" (\Object
obj -> ((((((Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsCardWalletMasterpassShippingAddress'
PaymentMethodDetailsCardWalletMasterpassShippingAddress' Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
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
   -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
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
   -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
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
   -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
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
   -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
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
   -> PaymentMethodDetailsCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser PaymentMethodDetailsCardWalletMasterpassShippingAddress'
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 'PaymentMethodDetailsCardWalletMasterpassShippingAddress'' with all required fields.
mkPaymentMethodDetailsCardWalletMasterpassShippingAddress' :: PaymentMethodDetailsCardWalletMasterpassShippingAddress'
mkPaymentMethodDetailsCardWalletMasterpassShippingAddress' :: PaymentMethodDetailsCardWalletMasterpassShippingAddress'
mkPaymentMethodDetailsCardWalletMasterpassShippingAddress' =
  PaymentMethodDetailsCardWalletMasterpassShippingAddress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodDetailsCardWalletMasterpassShippingAddress'
PaymentMethodDetailsCardWalletMasterpassShippingAddress'
    { paymentMethodDetailsCardWalletMasterpassShippingAddress'City :: Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassShippingAddress'Country :: Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassShippingAddress'Line1 :: Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassShippingAddress'Line2 :: Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassShippingAddress'PostalCode :: Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
      paymentMethodDetailsCardWalletMasterpassShippingAddress'State :: Maybe Text
paymentMethodDetailsCardWalletMasterpassShippingAddress'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
    }