{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Operations.GetCheckoutSessionsSessionLineItems where
import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Either
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified Data.Vector
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified Network.HTTP.Client
import qualified Network.HTTP.Client as Network.HTTP.Client.Request
import qualified Network.HTTP.Client as Network.HTTP.Client.Types
import qualified Network.HTTP.Simple
import qualified Network.HTTP.Types
import qualified Network.HTTP.Types as Network.HTTP.Types.Status
import qualified Network.HTTP.Types as Network.HTTP.Types.URI
import qualified StripeAPI.Common
import StripeAPI.Types
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
getCheckoutSessionsSessionLineItems ::
forall m.
StripeAPI.Common.MonadHTTP m =>
GetCheckoutSessionsSessionLineItemsParameters ->
StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response GetCheckoutSessionsSessionLineItemsResponse)
getCheckoutSessionsSessionLineItems :: GetCheckoutSessionsSessionLineItemsParameters
-> ClientT m (Response GetCheckoutSessionsSessionLineItemsResponse)
getCheckoutSessionsSessionLineItems GetCheckoutSessionsSessionLineItemsParameters
parameters =
(Response ByteString
-> Response GetCheckoutSessionsSessionLineItemsResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response GetCheckoutSessionsSessionLineItemsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_0 ->
(ByteString -> GetCheckoutSessionsSessionLineItemsResponse)
-> Response ByteString
-> Response GetCheckoutSessionsSessionLineItemsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> GetCheckoutSessionsSessionLineItemsResponse)
-> (GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse)
-> Either String GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> GetCheckoutSessionsSessionLineItemsResponse
GetCheckoutSessionsSessionLineItemsResponseError GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse
forall a. a -> a
GHC.Base.id
(Either String GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse)
-> (ByteString
-> Either String GetCheckoutSessionsSessionLineItemsResponse)
-> ByteString
-> GetCheckoutSessionsSessionLineItemsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. ( \Response ByteString
response ByteString
body ->
if
| (\Status
status_1 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_1 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Int
200) (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
GetCheckoutSessionsSessionLineItemsResponseBody200
-> GetCheckoutSessionsSessionLineItemsResponse
GetCheckoutSessionsSessionLineItemsResponse200
(GetCheckoutSessionsSessionLineItemsResponseBody200
-> GetCheckoutSessionsSessionLineItemsResponse)
-> Either String GetCheckoutSessionsSessionLineItemsResponseBody200
-> Either String GetCheckoutSessionsSessionLineItemsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString
-> Either String GetCheckoutSessionsSessionLineItemsResponseBody200
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
GetCheckoutSessionsSessionLineItemsResponseBody200
)
| Bool -> Status -> Bool
forall a b. a -> b -> a
GHC.Base.const Bool
GHC.Types.True (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
Error -> GetCheckoutSessionsSessionLineItemsResponse
GetCheckoutSessionsSessionLineItemsResponseDefault
(Error -> GetCheckoutSessionsSessionLineItemsResponse)
-> Either String Error
-> Either String GetCheckoutSessionsSessionLineItemsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String Error
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
Error
)
| Bool
GHC.Base.otherwise -> String -> Either String GetCheckoutSessionsSessionLineItemsResponse
forall a b. a -> Either a b
Data.Either.Left String
"Missing default response type"
)
Response ByteString
response_0
)
Response ByteString
response_0
)
( Text -> Text -> [QueryParameter] -> ClientT m (Response ByteString)
forall (m :: * -> *).
MonadHTTP m =>
Text -> Text -> [QueryParameter] -> ClientT m (Response ByteString)
StripeAPI.Common.doCallWithConfigurationM
(Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.pack String
"GET")
(String -> Text
Data.Text.pack (String
"/v1/checkout/sessions/" String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ (ByteString -> String
Data.ByteString.Char8.unpack (Bool -> ByteString -> ByteString
Network.HTTP.Types.URI.urlEncode Bool
GHC.Types.True (ByteString -> ByteString) -> ByteString -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ (String -> ByteString
Data.ByteString.Char8.pack (String -> ByteString) -> String -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> String
forall a. StringifyModel a => a -> String
StripeAPI.Common.stringifyModel (GetCheckoutSessionsSessionLineItemsParameters -> Text
getCheckoutSessionsSessionLineItemsParametersPathSession GetCheckoutSessionsSessionLineItemsParameters
parameters))) String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ String
"/line_items")))
[ Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"ending_before") (Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Text -> Value) -> Maybe Text -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetCheckoutSessionsSessionLineItemsParameters -> Maybe Text
getCheckoutSessionsSessionLineItemsParametersQueryEndingBefore GetCheckoutSessionsSessionLineItemsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True,
Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"expand") ([Text] -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON ([Text] -> Value) -> Maybe [Text] -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetCheckoutSessionsSessionLineItemsParameters -> Maybe [Text]
getCheckoutSessionsSessionLineItemsParametersQueryExpand GetCheckoutSessionsSessionLineItemsParameters
parameters) (String -> Text
Data.Text.pack String
"deepObject") Bool
GHC.Types.True,
Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"limit") (Int -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Int -> Value) -> Maybe Int -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetCheckoutSessionsSessionLineItemsParameters -> Maybe Int
getCheckoutSessionsSessionLineItemsParametersQueryLimit GetCheckoutSessionsSessionLineItemsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True,
Text -> Maybe Value -> Text -> Bool -> QueryParameter
StripeAPI.Common.QueryParameter (String -> Text
Data.Text.pack String
"starting_after") (Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON (Text -> Value) -> Maybe Text -> Maybe Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> GetCheckoutSessionsSessionLineItemsParameters -> Maybe Text
getCheckoutSessionsSessionLineItemsParametersQueryStartingAfter GetCheckoutSessionsSessionLineItemsParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True
]
)
data GetCheckoutSessionsSessionLineItemsParameters = GetCheckoutSessionsSessionLineItemsParameters
{
GetCheckoutSessionsSessionLineItemsParameters -> Text
getCheckoutSessionsSessionLineItemsParametersPathSession :: Data.Text.Internal.Text,
GetCheckoutSessionsSessionLineItemsParameters -> Maybe Text
getCheckoutSessionsSessionLineItemsParametersQueryEndingBefore :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
GetCheckoutSessionsSessionLineItemsParameters -> Maybe [Text]
getCheckoutSessionsSessionLineItemsParametersQueryExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
GetCheckoutSessionsSessionLineItemsParameters -> Maybe Int
getCheckoutSessionsSessionLineItemsParametersQueryLimit :: (GHC.Maybe.Maybe GHC.Types.Int),
GetCheckoutSessionsSessionLineItemsParameters -> Maybe Text
getCheckoutSessionsSessionLineItemsParametersQueryStartingAfter :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int
-> GetCheckoutSessionsSessionLineItemsParameters
-> String
-> String
[GetCheckoutSessionsSessionLineItemsParameters] -> String -> String
GetCheckoutSessionsSessionLineItemsParameters -> String
(Int
-> GetCheckoutSessionsSessionLineItemsParameters
-> String
-> String)
-> (GetCheckoutSessionsSessionLineItemsParameters -> String)
-> ([GetCheckoutSessionsSessionLineItemsParameters]
-> String -> String)
-> Show GetCheckoutSessionsSessionLineItemsParameters
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [GetCheckoutSessionsSessionLineItemsParameters] -> String -> String
$cshowList :: [GetCheckoutSessionsSessionLineItemsParameters] -> String -> String
show :: GetCheckoutSessionsSessionLineItemsParameters -> String
$cshow :: GetCheckoutSessionsSessionLineItemsParameters -> String
showsPrec :: Int
-> GetCheckoutSessionsSessionLineItemsParameters
-> String
-> String
$cshowsPrec :: Int
-> GetCheckoutSessionsSessionLineItemsParameters
-> String
-> String
GHC.Show.Show,
GetCheckoutSessionsSessionLineItemsParameters
-> GetCheckoutSessionsSessionLineItemsParameters -> Bool
(GetCheckoutSessionsSessionLineItemsParameters
-> GetCheckoutSessionsSessionLineItemsParameters -> Bool)
-> (GetCheckoutSessionsSessionLineItemsParameters
-> GetCheckoutSessionsSessionLineItemsParameters -> Bool)
-> Eq GetCheckoutSessionsSessionLineItemsParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCheckoutSessionsSessionLineItemsParameters
-> GetCheckoutSessionsSessionLineItemsParameters -> Bool
$c/= :: GetCheckoutSessionsSessionLineItemsParameters
-> GetCheckoutSessionsSessionLineItemsParameters -> Bool
== :: GetCheckoutSessionsSessionLineItemsParameters
-> GetCheckoutSessionsSessionLineItemsParameters -> Bool
$c== :: GetCheckoutSessionsSessionLineItemsParameters
-> GetCheckoutSessionsSessionLineItemsParameters -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON GetCheckoutSessionsSessionLineItemsParameters where
toJSON :: GetCheckoutSessionsSessionLineItemsParameters -> Value
toJSON GetCheckoutSessionsSessionLineItemsParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"pathSession" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsParameters -> Text
getCheckoutSessionsSessionLineItemsParametersPathSession GetCheckoutSessionsSessionLineItemsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryEnding_before" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsParameters -> Maybe Text
getCheckoutSessionsSessionLineItemsParametersQueryEndingBefore GetCheckoutSessionsSessionLineItemsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryExpand" Text -> Maybe [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsParameters -> Maybe [Text]
getCheckoutSessionsSessionLineItemsParametersQueryExpand GetCheckoutSessionsSessionLineItemsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryLimit" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsParameters -> Maybe Int
getCheckoutSessionsSessionLineItemsParametersQueryLimit GetCheckoutSessionsSessionLineItemsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"queryStarting_after" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsParameters -> Maybe Text
getCheckoutSessionsSessionLineItemsParametersQueryStartingAfter GetCheckoutSessionsSessionLineItemsParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: GetCheckoutSessionsSessionLineItemsParameters -> Encoding
toEncoding GetCheckoutSessionsSessionLineItemsParameters
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"pathSession" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsParameters -> Text
getCheckoutSessionsSessionLineItemsParametersPathSession GetCheckoutSessionsSessionLineItemsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryEnding_before" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsParameters -> Maybe Text
getCheckoutSessionsSessionLineItemsParametersQueryEndingBefore GetCheckoutSessionsSessionLineItemsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryExpand" Text -> Maybe [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsParameters -> Maybe [Text]
getCheckoutSessionsSessionLineItemsParametersQueryExpand GetCheckoutSessionsSessionLineItemsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"queryLimit" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsParameters -> Maybe Int
getCheckoutSessionsSessionLineItemsParametersQueryLimit GetCheckoutSessionsSessionLineItemsParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"queryStarting_after" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsParameters -> Maybe Text
getCheckoutSessionsSessionLineItemsParametersQueryStartingAfter GetCheckoutSessionsSessionLineItemsParameters
obj)))))
instance Data.Aeson.Types.FromJSON.FromJSON GetCheckoutSessionsSessionLineItemsParameters where
parseJSON :: Value -> Parser GetCheckoutSessionsSessionLineItemsParameters
parseJSON = String
-> (Object -> Parser GetCheckoutSessionsSessionLineItemsParameters)
-> Value
-> Parser GetCheckoutSessionsSessionLineItemsParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetCheckoutSessionsSessionLineItemsParameters" (\Object
obj -> (((((Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetCheckoutSessionsSessionLineItemsParameters)
-> Parser
(Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetCheckoutSessionsSessionLineItemsParameters)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetCheckoutSessionsSessionLineItemsParameters
GetCheckoutSessionsSessionLineItemsParameters Parser
(Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetCheckoutSessionsSessionLineItemsParameters)
-> Parser Text
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetCheckoutSessionsSessionLineItemsParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"pathSession")) Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetCheckoutSessionsSessionLineItemsParameters)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetCheckoutSessionsSessionLineItemsParameters)
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
"queryEnding_before")) Parser
(Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetCheckoutSessionsSessionLineItemsParameters)
-> Parser (Maybe [Text])
-> Parser
(Maybe Int
-> Maybe Text -> GetCheckoutSessionsSessionLineItemsParameters)
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
"queryExpand")) Parser
(Maybe Int
-> Maybe Text -> GetCheckoutSessionsSessionLineItemsParameters)
-> Parser (Maybe Int)
-> Parser
(Maybe Text -> GetCheckoutSessionsSessionLineItemsParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"queryLimit")) Parser
(Maybe Text -> GetCheckoutSessionsSessionLineItemsParameters)
-> Parser (Maybe Text)
-> Parser GetCheckoutSessionsSessionLineItemsParameters
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
"queryStarting_after"))
mkGetCheckoutSessionsSessionLineItemsParameters ::
Data.Text.Internal.Text ->
GetCheckoutSessionsSessionLineItemsParameters
mkGetCheckoutSessionsSessionLineItemsParameters :: Text -> GetCheckoutSessionsSessionLineItemsParameters
mkGetCheckoutSessionsSessionLineItemsParameters Text
getCheckoutSessionsSessionLineItemsParametersPathSession =
GetCheckoutSessionsSessionLineItemsParameters :: Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetCheckoutSessionsSessionLineItemsParameters
GetCheckoutSessionsSessionLineItemsParameters
{ getCheckoutSessionsSessionLineItemsParametersPathSession :: Text
getCheckoutSessionsSessionLineItemsParametersPathSession = Text
getCheckoutSessionsSessionLineItemsParametersPathSession,
getCheckoutSessionsSessionLineItemsParametersQueryEndingBefore :: Maybe Text
getCheckoutSessionsSessionLineItemsParametersQueryEndingBefore = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
getCheckoutSessionsSessionLineItemsParametersQueryExpand :: Maybe [Text]
getCheckoutSessionsSessionLineItemsParametersQueryExpand = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
getCheckoutSessionsSessionLineItemsParametersQueryLimit :: Maybe Int
getCheckoutSessionsSessionLineItemsParametersQueryLimit = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
getCheckoutSessionsSessionLineItemsParametersQueryStartingAfter :: Maybe Text
getCheckoutSessionsSessionLineItemsParametersQueryStartingAfter = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data GetCheckoutSessionsSessionLineItemsResponse
=
GetCheckoutSessionsSessionLineItemsResponseError GHC.Base.String
|
GetCheckoutSessionsSessionLineItemsResponse200 GetCheckoutSessionsSessionLineItemsResponseBody200
|
GetCheckoutSessionsSessionLineItemsResponseDefault Error
deriving (Int
-> GetCheckoutSessionsSessionLineItemsResponse -> String -> String
[GetCheckoutSessionsSessionLineItemsResponse] -> String -> String
GetCheckoutSessionsSessionLineItemsResponse -> String
(Int
-> GetCheckoutSessionsSessionLineItemsResponse -> String -> String)
-> (GetCheckoutSessionsSessionLineItemsResponse -> String)
-> ([GetCheckoutSessionsSessionLineItemsResponse]
-> String -> String)
-> Show GetCheckoutSessionsSessionLineItemsResponse
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [GetCheckoutSessionsSessionLineItemsResponse] -> String -> String
$cshowList :: [GetCheckoutSessionsSessionLineItemsResponse] -> String -> String
show :: GetCheckoutSessionsSessionLineItemsResponse -> String
$cshow :: GetCheckoutSessionsSessionLineItemsResponse -> String
showsPrec :: Int
-> GetCheckoutSessionsSessionLineItemsResponse -> String -> String
$cshowsPrec :: Int
-> GetCheckoutSessionsSessionLineItemsResponse -> String -> String
GHC.Show.Show, GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse -> Bool
(GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse -> Bool)
-> (GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse -> Bool)
-> Eq GetCheckoutSessionsSessionLineItemsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse -> Bool
$c/= :: GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse -> Bool
== :: GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse -> Bool
$c== :: GetCheckoutSessionsSessionLineItemsResponse
-> GetCheckoutSessionsSessionLineItemsResponse -> Bool
GHC.Classes.Eq)
data GetCheckoutSessionsSessionLineItemsResponseBody200 = GetCheckoutSessionsSessionLineItemsResponseBody200
{
GetCheckoutSessionsSessionLineItemsResponseBody200 -> [Item]
getCheckoutSessionsSessionLineItemsResponseBody200Data :: ([Item]),
GetCheckoutSessionsSessionLineItemsResponseBody200 -> Bool
getCheckoutSessionsSessionLineItemsResponseBody200HasMore :: GHC.Types.Bool,
GetCheckoutSessionsSessionLineItemsResponseBody200 -> Text
getCheckoutSessionsSessionLineItemsResponseBody200Url :: Data.Text.Internal.Text
}
deriving
( Int
-> GetCheckoutSessionsSessionLineItemsResponseBody200
-> String
-> String
[GetCheckoutSessionsSessionLineItemsResponseBody200]
-> String -> String
GetCheckoutSessionsSessionLineItemsResponseBody200 -> String
(Int
-> GetCheckoutSessionsSessionLineItemsResponseBody200
-> String
-> String)
-> (GetCheckoutSessionsSessionLineItemsResponseBody200 -> String)
-> ([GetCheckoutSessionsSessionLineItemsResponseBody200]
-> String -> String)
-> Show GetCheckoutSessionsSessionLineItemsResponseBody200
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [GetCheckoutSessionsSessionLineItemsResponseBody200]
-> String -> String
$cshowList :: [GetCheckoutSessionsSessionLineItemsResponseBody200]
-> String -> String
show :: GetCheckoutSessionsSessionLineItemsResponseBody200 -> String
$cshow :: GetCheckoutSessionsSessionLineItemsResponseBody200 -> String
showsPrec :: Int
-> GetCheckoutSessionsSessionLineItemsResponseBody200
-> String
-> String
$cshowsPrec :: Int
-> GetCheckoutSessionsSessionLineItemsResponseBody200
-> String
-> String
GHC.Show.Show,
GetCheckoutSessionsSessionLineItemsResponseBody200
-> GetCheckoutSessionsSessionLineItemsResponseBody200 -> Bool
(GetCheckoutSessionsSessionLineItemsResponseBody200
-> GetCheckoutSessionsSessionLineItemsResponseBody200 -> Bool)
-> (GetCheckoutSessionsSessionLineItemsResponseBody200
-> GetCheckoutSessionsSessionLineItemsResponseBody200 -> Bool)
-> Eq GetCheckoutSessionsSessionLineItemsResponseBody200
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCheckoutSessionsSessionLineItemsResponseBody200
-> GetCheckoutSessionsSessionLineItemsResponseBody200 -> Bool
$c/= :: GetCheckoutSessionsSessionLineItemsResponseBody200
-> GetCheckoutSessionsSessionLineItemsResponseBody200 -> Bool
== :: GetCheckoutSessionsSessionLineItemsResponseBody200
-> GetCheckoutSessionsSessionLineItemsResponseBody200 -> Bool
$c== :: GetCheckoutSessionsSessionLineItemsResponseBody200
-> GetCheckoutSessionsSessionLineItemsResponseBody200 -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON GetCheckoutSessionsSessionLineItemsResponseBody200 where
toJSON :: GetCheckoutSessionsSessionLineItemsResponseBody200 -> Value
toJSON GetCheckoutSessionsSessionLineItemsResponseBody200
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"data" Text -> [Item] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsResponseBody200 -> [Item]
getCheckoutSessionsSessionLineItemsResponseBody200Data GetCheckoutSessionsSessionLineItemsResponseBody200
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"has_more" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsResponseBody200 -> Bool
getCheckoutSessionsSessionLineItemsResponseBody200HasMore GetCheckoutSessionsSessionLineItemsResponseBody200
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"url" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsResponseBody200 -> Text
getCheckoutSessionsSessionLineItemsResponseBody200Url GetCheckoutSessionsSessionLineItemsResponseBody200
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: GetCheckoutSessionsSessionLineItemsResponseBody200 -> Encoding
toEncoding GetCheckoutSessionsSessionLineItemsResponseBody200
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"data" Text -> [Item] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsResponseBody200 -> [Item]
getCheckoutSessionsSessionLineItemsResponseBody200Data GetCheckoutSessionsSessionLineItemsResponseBody200
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"has_more" Text -> Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsResponseBody200 -> Bool
getCheckoutSessionsSessionLineItemsResponseBody200HasMore GetCheckoutSessionsSessionLineItemsResponseBody200
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"url" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetCheckoutSessionsSessionLineItemsResponseBody200 -> Text
getCheckoutSessionsSessionLineItemsResponseBody200Url GetCheckoutSessionsSessionLineItemsResponseBody200
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"list"))))
instance Data.Aeson.Types.FromJSON.FromJSON GetCheckoutSessionsSessionLineItemsResponseBody200 where
parseJSON :: Value -> Parser GetCheckoutSessionsSessionLineItemsResponseBody200
parseJSON = String
-> (Object
-> Parser GetCheckoutSessionsSessionLineItemsResponseBody200)
-> Value
-> Parser GetCheckoutSessionsSessionLineItemsResponseBody200
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetCheckoutSessionsSessionLineItemsResponseBody200" (\Object
obj -> ((([Item]
-> Bool
-> Text
-> GetCheckoutSessionsSessionLineItemsResponseBody200)
-> Parser
([Item]
-> Bool
-> Text
-> GetCheckoutSessionsSessionLineItemsResponseBody200)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure [Item]
-> Bool
-> Text
-> GetCheckoutSessionsSessionLineItemsResponseBody200
GetCheckoutSessionsSessionLineItemsResponseBody200 Parser
([Item]
-> Bool
-> Text
-> GetCheckoutSessionsSessionLineItemsResponseBody200)
-> Parser [Item]
-> Parser
(Bool
-> Text -> GetCheckoutSessionsSessionLineItemsResponseBody200)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [Item]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"data")) Parser
(Bool
-> Text -> GetCheckoutSessionsSessionLineItemsResponseBody200)
-> Parser Bool
-> Parser
(Text -> GetCheckoutSessionsSessionLineItemsResponseBody200)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"has_more")) Parser (Text -> GetCheckoutSessionsSessionLineItemsResponseBody200)
-> Parser Text
-> Parser GetCheckoutSessionsSessionLineItemsResponseBody200
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"url"))
mkGetCheckoutSessionsSessionLineItemsResponseBody200 ::
[Item] ->
GHC.Types.Bool ->
Data.Text.Internal.Text ->
GetCheckoutSessionsSessionLineItemsResponseBody200
mkGetCheckoutSessionsSessionLineItemsResponseBody200 :: [Item]
-> Bool
-> Text
-> GetCheckoutSessionsSessionLineItemsResponseBody200
mkGetCheckoutSessionsSessionLineItemsResponseBody200 [Item]
getCheckoutSessionsSessionLineItemsResponseBody200Data Bool
getCheckoutSessionsSessionLineItemsResponseBody200HasMore Text
getCheckoutSessionsSessionLineItemsResponseBody200Url =
GetCheckoutSessionsSessionLineItemsResponseBody200 :: [Item]
-> Bool
-> Text
-> GetCheckoutSessionsSessionLineItemsResponseBody200
GetCheckoutSessionsSessionLineItemsResponseBody200
{ getCheckoutSessionsSessionLineItemsResponseBody200Data :: [Item]
getCheckoutSessionsSessionLineItemsResponseBody200Data = [Item]
getCheckoutSessionsSessionLineItemsResponseBody200Data,
getCheckoutSessionsSessionLineItemsResponseBody200HasMore :: Bool
getCheckoutSessionsSessionLineItemsResponseBody200HasMore = Bool
getCheckoutSessionsSessionLineItemsResponseBody200HasMore,
getCheckoutSessionsSessionLineItemsResponseBody200Url :: Text
getCheckoutSessionsSessionLineItemsResponseBody200Url = Text
getCheckoutSessionsSessionLineItemsResponseBody200Url
}