{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.PaymentMethodCardWalletMasterpass 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
data PaymentMethodCardWalletMasterpass = PaymentMethodCardWalletMasterpass
{
PaymentMethodCardWalletMasterpass
-> Maybe PaymentMethodCardWalletMasterpassBillingAddress'
paymentMethodCardWalletMasterpassBillingAddress :: (GHC.Maybe.Maybe PaymentMethodCardWalletMasterpassBillingAddress'),
PaymentMethodCardWalletMasterpass -> Maybe Text
paymentMethodCardWalletMasterpassEmail :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpass -> Maybe Text
paymentMethodCardWalletMasterpassName :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpass
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
paymentMethodCardWalletMasterpassShippingAddress :: (GHC.Maybe.Maybe PaymentMethodCardWalletMasterpassShippingAddress')
}
deriving
( Int -> PaymentMethodCardWalletMasterpass -> ShowS
[PaymentMethodCardWalletMasterpass] -> ShowS
PaymentMethodCardWalletMasterpass -> String
(Int -> PaymentMethodCardWalletMasterpass -> ShowS)
-> (PaymentMethodCardWalletMasterpass -> String)
-> ([PaymentMethodCardWalletMasterpass] -> ShowS)
-> Show PaymentMethodCardWalletMasterpass
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodCardWalletMasterpass] -> ShowS
$cshowList :: [PaymentMethodCardWalletMasterpass] -> ShowS
show :: PaymentMethodCardWalletMasterpass -> String
$cshow :: PaymentMethodCardWalletMasterpass -> String
showsPrec :: Int -> PaymentMethodCardWalletMasterpass -> ShowS
$cshowsPrec :: Int -> PaymentMethodCardWalletMasterpass -> ShowS
GHC.Show.Show,
PaymentMethodCardWalletMasterpass
-> PaymentMethodCardWalletMasterpass -> Bool
(PaymentMethodCardWalletMasterpass
-> PaymentMethodCardWalletMasterpass -> Bool)
-> (PaymentMethodCardWalletMasterpass
-> PaymentMethodCardWalletMasterpass -> Bool)
-> Eq PaymentMethodCardWalletMasterpass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodCardWalletMasterpass
-> PaymentMethodCardWalletMasterpass -> Bool
$c/= :: PaymentMethodCardWalletMasterpass
-> PaymentMethodCardWalletMasterpass -> Bool
== :: PaymentMethodCardWalletMasterpass
-> PaymentMethodCardWalletMasterpass -> Bool
$c== :: PaymentMethodCardWalletMasterpass
-> PaymentMethodCardWalletMasterpass -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodCardWalletMasterpass where
toJSON :: PaymentMethodCardWalletMasterpass -> Value
toJSON PaymentMethodCardWalletMasterpass
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"billing_address" Text
-> Maybe PaymentMethodCardWalletMasterpassBillingAddress' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodCardWalletMasterpass
-> Maybe PaymentMethodCardWalletMasterpassBillingAddress'
paymentMethodCardWalletMasterpassBillingAddress PaymentMethodCardWalletMasterpass
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..= PaymentMethodCardWalletMasterpass -> Maybe Text
paymentMethodCardWalletMasterpassEmail PaymentMethodCardWalletMasterpass
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..= PaymentMethodCardWalletMasterpass -> Maybe Text
paymentMethodCardWalletMasterpassName PaymentMethodCardWalletMasterpass
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"shipping_address" Text
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodCardWalletMasterpass
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
paymentMethodCardWalletMasterpassShippingAddress PaymentMethodCardWalletMasterpass
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PaymentMethodCardWalletMasterpass -> Encoding
toEncoding PaymentMethodCardWalletMasterpass
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"billing_address" Text
-> Maybe PaymentMethodCardWalletMasterpassBillingAddress' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodCardWalletMasterpass
-> Maybe PaymentMethodCardWalletMasterpassBillingAddress'
paymentMethodCardWalletMasterpassBillingAddress PaymentMethodCardWalletMasterpass
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..= PaymentMethodCardWalletMasterpass -> Maybe Text
paymentMethodCardWalletMasterpassEmail PaymentMethodCardWalletMasterpass
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..= PaymentMethodCardWalletMasterpass -> Maybe Text
paymentMethodCardWalletMasterpassName PaymentMethodCardWalletMasterpass
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"shipping_address" Text
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
-> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= PaymentMethodCardWalletMasterpass
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
paymentMethodCardWalletMasterpassShippingAddress PaymentMethodCardWalletMasterpass
obj))))
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodCardWalletMasterpass where
parseJSON :: Value -> Parser PaymentMethodCardWalletMasterpass
parseJSON = String
-> (Object -> Parser PaymentMethodCardWalletMasterpass)
-> Value
-> Parser PaymentMethodCardWalletMasterpass
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodCardWalletMasterpass" (\Object
obj -> ((((Maybe PaymentMethodCardWalletMasterpassBillingAddress'
-> Maybe Text
-> Maybe Text
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass)
-> Parser
(Maybe PaymentMethodCardWalletMasterpassBillingAddress'
-> Maybe Text
-> Maybe Text
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe PaymentMethodCardWalletMasterpassBillingAddress'
-> Maybe Text
-> Maybe Text
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass
PaymentMethodCardWalletMasterpass Parser
(Maybe PaymentMethodCardWalletMasterpassBillingAddress'
-> Maybe Text
-> Maybe Text
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass)
-> Parser (Maybe PaymentMethodCardWalletMasterpassBillingAddress')
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe PaymentMethodCardWalletMasterpassBillingAddress')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"billing_address")) Parser
(Maybe Text
-> Maybe Text
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass)
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 PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass)
-> Parser (Maybe Text)
-> Parser
(Maybe PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass)
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 PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass)
-> Parser (Maybe PaymentMethodCardWalletMasterpassShippingAddress')
-> Parser PaymentMethodCardWalletMasterpass
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text
-> Parser (Maybe PaymentMethodCardWalletMasterpassShippingAddress')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"shipping_address"))
mkPaymentMethodCardWalletMasterpass :: PaymentMethodCardWalletMasterpass
mkPaymentMethodCardWalletMasterpass :: PaymentMethodCardWalletMasterpass
mkPaymentMethodCardWalletMasterpass =
PaymentMethodCardWalletMasterpass :: Maybe PaymentMethodCardWalletMasterpassBillingAddress'
-> Maybe Text
-> Maybe Text
-> Maybe PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpass
PaymentMethodCardWalletMasterpass
{ paymentMethodCardWalletMasterpassBillingAddress :: Maybe PaymentMethodCardWalletMasterpassBillingAddress'
paymentMethodCardWalletMasterpassBillingAddress = Maybe PaymentMethodCardWalletMasterpassBillingAddress'
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassEmail :: Maybe Text
paymentMethodCardWalletMasterpassEmail = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassName :: Maybe Text
paymentMethodCardWalletMasterpassName = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassShippingAddress :: Maybe PaymentMethodCardWalletMasterpassShippingAddress'
paymentMethodCardWalletMasterpassShippingAddress = Maybe PaymentMethodCardWalletMasterpassShippingAddress'
forall a. Maybe a
GHC.Maybe.Nothing
}
data PaymentMethodCardWalletMasterpassBillingAddress' = PaymentMethodCardWalletMasterpassBillingAddress'
{
PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> PaymentMethodCardWalletMasterpassBillingAddress' -> ShowS
[PaymentMethodCardWalletMasterpassBillingAddress'] -> ShowS
PaymentMethodCardWalletMasterpassBillingAddress' -> String
(Int -> PaymentMethodCardWalletMasterpassBillingAddress' -> ShowS)
-> (PaymentMethodCardWalletMasterpassBillingAddress' -> String)
-> ([PaymentMethodCardWalletMasterpassBillingAddress'] -> ShowS)
-> Show PaymentMethodCardWalletMasterpassBillingAddress'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodCardWalletMasterpassBillingAddress'] -> ShowS
$cshowList :: [PaymentMethodCardWalletMasterpassBillingAddress'] -> ShowS
show :: PaymentMethodCardWalletMasterpassBillingAddress' -> String
$cshow :: PaymentMethodCardWalletMasterpassBillingAddress' -> String
showsPrec :: Int -> PaymentMethodCardWalletMasterpassBillingAddress' -> ShowS
$cshowsPrec :: Int -> PaymentMethodCardWalletMasterpassBillingAddress' -> ShowS
GHC.Show.Show,
PaymentMethodCardWalletMasterpassBillingAddress'
-> PaymentMethodCardWalletMasterpassBillingAddress' -> Bool
(PaymentMethodCardWalletMasterpassBillingAddress'
-> PaymentMethodCardWalletMasterpassBillingAddress' -> Bool)
-> (PaymentMethodCardWalletMasterpassBillingAddress'
-> PaymentMethodCardWalletMasterpassBillingAddress' -> Bool)
-> Eq PaymentMethodCardWalletMasterpassBillingAddress'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodCardWalletMasterpassBillingAddress'
-> PaymentMethodCardWalletMasterpassBillingAddress' -> Bool
$c/= :: PaymentMethodCardWalletMasterpassBillingAddress'
-> PaymentMethodCardWalletMasterpassBillingAddress' -> Bool
== :: PaymentMethodCardWalletMasterpassBillingAddress'
-> PaymentMethodCardWalletMasterpassBillingAddress' -> Bool
$c== :: PaymentMethodCardWalletMasterpassBillingAddress'
-> PaymentMethodCardWalletMasterpassBillingAddress' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodCardWalletMasterpassBillingAddress' where
toJSON :: PaymentMethodCardWalletMasterpassBillingAddress' -> Value
toJSON PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'City PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Country PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Line1 PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Line2 PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'PostalCode PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'State PaymentMethodCardWalletMasterpassBillingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PaymentMethodCardWalletMasterpassBillingAddress' -> Encoding
toEncoding PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'City PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Country PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Line1 PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Line2 PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'PostalCode PaymentMethodCardWalletMasterpassBillingAddress'
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..= PaymentMethodCardWalletMasterpassBillingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'State PaymentMethodCardWalletMasterpassBillingAddress'
obj))))))
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodCardWalletMasterpassBillingAddress' where
parseJSON :: Value -> Parser PaymentMethodCardWalletMasterpassBillingAddress'
parseJSON = String
-> (Object
-> Parser PaymentMethodCardWalletMasterpassBillingAddress')
-> Value
-> Parser PaymentMethodCardWalletMasterpassBillingAddress'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodCardWalletMasterpassBillingAddress'" (\Object
obj -> ((((((Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassBillingAddress')
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassBillingAddress')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassBillingAddress'
PaymentMethodCardWalletMasterpassBillingAddress' Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassBillingAddress')
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
-> PaymentMethodCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassBillingAddress')
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
-> PaymentMethodCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassBillingAddress')
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
-> PaymentMethodCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> PaymentMethodCardWalletMasterpassBillingAddress')
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 -> PaymentMethodCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> PaymentMethodCardWalletMasterpassBillingAddress')
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 -> PaymentMethodCardWalletMasterpassBillingAddress')
-> Parser (Maybe Text)
-> Parser PaymentMethodCardWalletMasterpassBillingAddress'
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"))
mkPaymentMethodCardWalletMasterpassBillingAddress' :: PaymentMethodCardWalletMasterpassBillingAddress'
mkPaymentMethodCardWalletMasterpassBillingAddress' :: PaymentMethodCardWalletMasterpassBillingAddress'
mkPaymentMethodCardWalletMasterpassBillingAddress' =
PaymentMethodCardWalletMasterpassBillingAddress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassBillingAddress'
PaymentMethodCardWalletMasterpassBillingAddress'
{ paymentMethodCardWalletMasterpassBillingAddress'City :: Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassBillingAddress'Country :: Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassBillingAddress'Line1 :: Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassBillingAddress'Line2 :: Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassBillingAddress'PostalCode :: Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassBillingAddress'State :: Maybe Text
paymentMethodCardWalletMasterpassBillingAddress'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data PaymentMethodCardWalletMasterpassShippingAddress' = PaymentMethodCardWalletMasterpassShippingAddress'
{
PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'City :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Country :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Line1 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Line2 :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'PostalCode :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'State :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> PaymentMethodCardWalletMasterpassShippingAddress' -> ShowS
[PaymentMethodCardWalletMasterpassShippingAddress'] -> ShowS
PaymentMethodCardWalletMasterpassShippingAddress' -> String
(Int -> PaymentMethodCardWalletMasterpassShippingAddress' -> ShowS)
-> (PaymentMethodCardWalletMasterpassShippingAddress' -> String)
-> ([PaymentMethodCardWalletMasterpassShippingAddress'] -> ShowS)
-> Show PaymentMethodCardWalletMasterpassShippingAddress'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PaymentMethodCardWalletMasterpassShippingAddress'] -> ShowS
$cshowList :: [PaymentMethodCardWalletMasterpassShippingAddress'] -> ShowS
show :: PaymentMethodCardWalletMasterpassShippingAddress' -> String
$cshow :: PaymentMethodCardWalletMasterpassShippingAddress' -> String
showsPrec :: Int -> PaymentMethodCardWalletMasterpassShippingAddress' -> ShowS
$cshowsPrec :: Int -> PaymentMethodCardWalletMasterpassShippingAddress' -> ShowS
GHC.Show.Show,
PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpassShippingAddress' -> Bool
(PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpassShippingAddress' -> Bool)
-> (PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpassShippingAddress' -> Bool)
-> Eq PaymentMethodCardWalletMasterpassShippingAddress'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpassShippingAddress' -> Bool
$c/= :: PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpassShippingAddress' -> Bool
== :: PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpassShippingAddress' -> Bool
$c== :: PaymentMethodCardWalletMasterpassShippingAddress'
-> PaymentMethodCardWalletMasterpassShippingAddress' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON PaymentMethodCardWalletMasterpassShippingAddress' where
toJSON :: PaymentMethodCardWalletMasterpassShippingAddress' -> Value
toJSON PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'City PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Country PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Line1 PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Line2 PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'PostalCode PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'State PaymentMethodCardWalletMasterpassShippingAddress'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: PaymentMethodCardWalletMasterpassShippingAddress' -> Encoding
toEncoding PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'City PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Country PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Line1 PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Line2 PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'PostalCode PaymentMethodCardWalletMasterpassShippingAddress'
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..= PaymentMethodCardWalletMasterpassShippingAddress' -> Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'State PaymentMethodCardWalletMasterpassShippingAddress'
obj))))))
instance Data.Aeson.Types.FromJSON.FromJSON PaymentMethodCardWalletMasterpassShippingAddress' where
parseJSON :: Value -> Parser PaymentMethodCardWalletMasterpassShippingAddress'
parseJSON = String
-> (Object
-> Parser PaymentMethodCardWalletMasterpassShippingAddress')
-> Value
-> Parser PaymentMethodCardWalletMasterpassShippingAddress'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"PaymentMethodCardWalletMasterpassShippingAddress'" (\Object
obj -> ((((((Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassShippingAddress')
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassShippingAddress')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassShippingAddress'
PaymentMethodCardWalletMasterpassShippingAddress' Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassShippingAddress')
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
-> PaymentMethodCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassShippingAddress')
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
-> PaymentMethodCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassShippingAddress')
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
-> PaymentMethodCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> PaymentMethodCardWalletMasterpassShippingAddress')
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 -> PaymentMethodCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> PaymentMethodCardWalletMasterpassShippingAddress')
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 -> PaymentMethodCardWalletMasterpassShippingAddress')
-> Parser (Maybe Text)
-> Parser PaymentMethodCardWalletMasterpassShippingAddress'
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"))
mkPaymentMethodCardWalletMasterpassShippingAddress' :: PaymentMethodCardWalletMasterpassShippingAddress'
mkPaymentMethodCardWalletMasterpassShippingAddress' :: PaymentMethodCardWalletMasterpassShippingAddress'
mkPaymentMethodCardWalletMasterpassShippingAddress' =
PaymentMethodCardWalletMasterpassShippingAddress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PaymentMethodCardWalletMasterpassShippingAddress'
PaymentMethodCardWalletMasterpassShippingAddress'
{ paymentMethodCardWalletMasterpassShippingAddress'City :: Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'City = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassShippingAddress'Country :: Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Country = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassShippingAddress'Line1 :: Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Line1 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassShippingAddress'Line2 :: Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'Line2 = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassShippingAddress'PostalCode :: Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'PostalCode = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
paymentMethodCardWalletMasterpassShippingAddress'State :: Maybe Text
paymentMethodCardWalletMasterpassShippingAddress'State = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}