{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Operations.GetInvoicesInvoiceLines 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
getInvoicesInvoiceLines ::
forall m.
StripeAPI.Common.MonadHTTP m =>
GetInvoicesInvoiceLinesParameters ->
StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response GetInvoicesInvoiceLinesResponse)
getInvoicesInvoiceLines :: GetInvoicesInvoiceLinesParameters
-> ClientT m (Response GetInvoicesInvoiceLinesResponse)
getInvoicesInvoiceLines GetInvoicesInvoiceLinesParameters
parameters =
(Response ByteString -> Response GetInvoicesInvoiceLinesResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response GetInvoicesInvoiceLinesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_0 ->
(ByteString -> GetInvoicesInvoiceLinesResponse)
-> Response ByteString -> Response GetInvoicesInvoiceLinesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> GetInvoicesInvoiceLinesResponse)
-> (GetInvoicesInvoiceLinesResponse
-> GetInvoicesInvoiceLinesResponse)
-> Either String GetInvoicesInvoiceLinesResponse
-> GetInvoicesInvoiceLinesResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> GetInvoicesInvoiceLinesResponse
GetInvoicesInvoiceLinesResponseError GetInvoicesInvoiceLinesResponse -> GetInvoicesInvoiceLinesResponse
forall a. a -> a
GHC.Base.id
(Either String GetInvoicesInvoiceLinesResponse
-> GetInvoicesInvoiceLinesResponse)
-> (ByteString -> Either String GetInvoicesInvoiceLinesResponse)
-> ByteString
-> GetInvoicesInvoiceLinesResponse
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) ->
GetInvoicesInvoiceLinesResponseBody200
-> GetInvoicesInvoiceLinesResponse
GetInvoicesInvoiceLinesResponse200
(GetInvoicesInvoiceLinesResponseBody200
-> GetInvoicesInvoiceLinesResponse)
-> Either String GetInvoicesInvoiceLinesResponseBody200
-> Either String GetInvoicesInvoiceLinesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String GetInvoicesInvoiceLinesResponseBody200
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
GetInvoicesInvoiceLinesResponseBody200
)
| 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 -> GetInvoicesInvoiceLinesResponse
GetInvoicesInvoiceLinesResponseDefault
(Error -> GetInvoicesInvoiceLinesResponse)
-> Either String Error
-> Either String GetInvoicesInvoiceLinesResponse
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 GetInvoicesInvoiceLinesResponse
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/invoices/" 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 (GetInvoicesInvoiceLinesParameters -> Text
getInvoicesInvoiceLinesParametersPathInvoice GetInvoicesInvoiceLinesParameters
parameters))) String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ String
"/lines")))
[ 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.<$> GetInvoicesInvoiceLinesParameters -> Maybe Text
getInvoicesInvoiceLinesParametersQueryEndingBefore GetInvoicesInvoiceLinesParameters
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.<$> GetInvoicesInvoiceLinesParameters -> Maybe [Text]
getInvoicesInvoiceLinesParametersQueryExpand GetInvoicesInvoiceLinesParameters
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.<$> GetInvoicesInvoiceLinesParameters -> Maybe Int
getInvoicesInvoiceLinesParametersQueryLimit GetInvoicesInvoiceLinesParameters
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.<$> GetInvoicesInvoiceLinesParameters -> Maybe Text
getInvoicesInvoiceLinesParametersQueryStartingAfter GetInvoicesInvoiceLinesParameters
parameters) (String -> Text
Data.Text.pack String
"form") Bool
GHC.Types.True
]
)
data GetInvoicesInvoiceLinesParameters = GetInvoicesInvoiceLinesParameters
{
GetInvoicesInvoiceLinesParameters -> Text
getInvoicesInvoiceLinesParametersPathInvoice :: Data.Text.Internal.Text,
GetInvoicesInvoiceLinesParameters -> Maybe Text
getInvoicesInvoiceLinesParametersQueryEndingBefore :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
GetInvoicesInvoiceLinesParameters -> Maybe [Text]
getInvoicesInvoiceLinesParametersQueryExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
GetInvoicesInvoiceLinesParameters -> Maybe Int
getInvoicesInvoiceLinesParametersQueryLimit :: (GHC.Maybe.Maybe GHC.Types.Int),
GetInvoicesInvoiceLinesParameters -> Maybe Text
getInvoicesInvoiceLinesParametersQueryStartingAfter :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> GetInvoicesInvoiceLinesParameters -> String -> String
[GetInvoicesInvoiceLinesParameters] -> String -> String
GetInvoicesInvoiceLinesParameters -> String
(Int -> GetInvoicesInvoiceLinesParameters -> String -> String)
-> (GetInvoicesInvoiceLinesParameters -> String)
-> ([GetInvoicesInvoiceLinesParameters] -> String -> String)
-> Show GetInvoicesInvoiceLinesParameters
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [GetInvoicesInvoiceLinesParameters] -> String -> String
$cshowList :: [GetInvoicesInvoiceLinesParameters] -> String -> String
show :: GetInvoicesInvoiceLinesParameters -> String
$cshow :: GetInvoicesInvoiceLinesParameters -> String
showsPrec :: Int -> GetInvoicesInvoiceLinesParameters -> String -> String
$cshowsPrec :: Int -> GetInvoicesInvoiceLinesParameters -> String -> String
GHC.Show.Show,
GetInvoicesInvoiceLinesParameters
-> GetInvoicesInvoiceLinesParameters -> Bool
(GetInvoicesInvoiceLinesParameters
-> GetInvoicesInvoiceLinesParameters -> Bool)
-> (GetInvoicesInvoiceLinesParameters
-> GetInvoicesInvoiceLinesParameters -> Bool)
-> Eq GetInvoicesInvoiceLinesParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetInvoicesInvoiceLinesParameters
-> GetInvoicesInvoiceLinesParameters -> Bool
$c/= :: GetInvoicesInvoiceLinesParameters
-> GetInvoicesInvoiceLinesParameters -> Bool
== :: GetInvoicesInvoiceLinesParameters
-> GetInvoicesInvoiceLinesParameters -> Bool
$c== :: GetInvoicesInvoiceLinesParameters
-> GetInvoicesInvoiceLinesParameters -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesInvoiceLinesParameters where
toJSON :: GetInvoicesInvoiceLinesParameters -> Value
toJSON GetInvoicesInvoiceLinesParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"pathInvoice" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetInvoicesInvoiceLinesParameters -> Text
getInvoicesInvoiceLinesParametersPathInvoice GetInvoicesInvoiceLinesParameters
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..= GetInvoicesInvoiceLinesParameters -> Maybe Text
getInvoicesInvoiceLinesParametersQueryEndingBefore GetInvoicesInvoiceLinesParameters
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..= GetInvoicesInvoiceLinesParameters -> Maybe [Text]
getInvoicesInvoiceLinesParametersQueryExpand GetInvoicesInvoiceLinesParameters
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..= GetInvoicesInvoiceLinesParameters -> Maybe Int
getInvoicesInvoiceLinesParametersQueryLimit GetInvoicesInvoiceLinesParameters
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..= GetInvoicesInvoiceLinesParameters -> Maybe Text
getInvoicesInvoiceLinesParametersQueryStartingAfter GetInvoicesInvoiceLinesParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: GetInvoicesInvoiceLinesParameters -> Encoding
toEncoding GetInvoicesInvoiceLinesParameters
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"pathInvoice" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetInvoicesInvoiceLinesParameters -> Text
getInvoicesInvoiceLinesParametersPathInvoice GetInvoicesInvoiceLinesParameters
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..= GetInvoicesInvoiceLinesParameters -> Maybe Text
getInvoicesInvoiceLinesParametersQueryEndingBefore GetInvoicesInvoiceLinesParameters
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..= GetInvoicesInvoiceLinesParameters -> Maybe [Text]
getInvoicesInvoiceLinesParametersQueryExpand GetInvoicesInvoiceLinesParameters
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..= GetInvoicesInvoiceLinesParameters -> Maybe Int
getInvoicesInvoiceLinesParametersQueryLimit GetInvoicesInvoiceLinesParameters
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..= GetInvoicesInvoiceLinesParameters -> Maybe Text
getInvoicesInvoiceLinesParametersQueryStartingAfter GetInvoicesInvoiceLinesParameters
obj)))))
instance Data.Aeson.Types.FromJSON.FromJSON GetInvoicesInvoiceLinesParameters where
parseJSON :: Value -> Parser GetInvoicesInvoiceLinesParameters
parseJSON = String
-> (Object -> Parser GetInvoicesInvoiceLinesParameters)
-> Value
-> Parser GetInvoicesInvoiceLinesParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetInvoicesInvoiceLinesParameters" (\Object
obj -> (((((Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetInvoicesInvoiceLinesParameters)
-> Parser
(Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetInvoicesInvoiceLinesParameters)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetInvoicesInvoiceLinesParameters
GetInvoicesInvoiceLinesParameters Parser
(Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetInvoicesInvoiceLinesParameters)
-> Parser Text
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetInvoicesInvoiceLinesParameters)
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
"pathInvoice")) Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetInvoicesInvoiceLinesParameters)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Int -> Maybe Text -> GetInvoicesInvoiceLinesParameters)
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 -> GetInvoicesInvoiceLinesParameters)
-> Parser (Maybe [Text])
-> Parser
(Maybe Int -> Maybe Text -> GetInvoicesInvoiceLinesParameters)
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 -> GetInvoicesInvoiceLinesParameters)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> GetInvoicesInvoiceLinesParameters)
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 -> GetInvoicesInvoiceLinesParameters)
-> Parser (Maybe Text) -> Parser GetInvoicesInvoiceLinesParameters
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"))
mkGetInvoicesInvoiceLinesParameters ::
Data.Text.Internal.Text ->
GetInvoicesInvoiceLinesParameters
mkGetInvoicesInvoiceLinesParameters :: Text -> GetInvoicesInvoiceLinesParameters
mkGetInvoicesInvoiceLinesParameters Text
getInvoicesInvoiceLinesParametersPathInvoice =
GetInvoicesInvoiceLinesParameters :: Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> GetInvoicesInvoiceLinesParameters
GetInvoicesInvoiceLinesParameters
{ getInvoicesInvoiceLinesParametersPathInvoice :: Text
getInvoicesInvoiceLinesParametersPathInvoice = Text
getInvoicesInvoiceLinesParametersPathInvoice,
getInvoicesInvoiceLinesParametersQueryEndingBefore :: Maybe Text
getInvoicesInvoiceLinesParametersQueryEndingBefore = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
getInvoicesInvoiceLinesParametersQueryExpand :: Maybe [Text]
getInvoicesInvoiceLinesParametersQueryExpand = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
getInvoicesInvoiceLinesParametersQueryLimit :: Maybe Int
getInvoicesInvoiceLinesParametersQueryLimit = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
getInvoicesInvoiceLinesParametersQueryStartingAfter :: Maybe Text
getInvoicesInvoiceLinesParametersQueryStartingAfter = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data GetInvoicesInvoiceLinesResponse
=
GetInvoicesInvoiceLinesResponseError GHC.Base.String
|
GetInvoicesInvoiceLinesResponse200 GetInvoicesInvoiceLinesResponseBody200
|
GetInvoicesInvoiceLinesResponseDefault Error
deriving (Int -> GetInvoicesInvoiceLinesResponse -> String -> String
[GetInvoicesInvoiceLinesResponse] -> String -> String
GetInvoicesInvoiceLinesResponse -> String
(Int -> GetInvoicesInvoiceLinesResponse -> String -> String)
-> (GetInvoicesInvoiceLinesResponse -> String)
-> ([GetInvoicesInvoiceLinesResponse] -> String -> String)
-> Show GetInvoicesInvoiceLinesResponse
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [GetInvoicesInvoiceLinesResponse] -> String -> String
$cshowList :: [GetInvoicesInvoiceLinesResponse] -> String -> String
show :: GetInvoicesInvoiceLinesResponse -> String
$cshow :: GetInvoicesInvoiceLinesResponse -> String
showsPrec :: Int -> GetInvoicesInvoiceLinesResponse -> String -> String
$cshowsPrec :: Int -> GetInvoicesInvoiceLinesResponse -> String -> String
GHC.Show.Show, GetInvoicesInvoiceLinesResponse
-> GetInvoicesInvoiceLinesResponse -> Bool
(GetInvoicesInvoiceLinesResponse
-> GetInvoicesInvoiceLinesResponse -> Bool)
-> (GetInvoicesInvoiceLinesResponse
-> GetInvoicesInvoiceLinesResponse -> Bool)
-> Eq GetInvoicesInvoiceLinesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetInvoicesInvoiceLinesResponse
-> GetInvoicesInvoiceLinesResponse -> Bool
$c/= :: GetInvoicesInvoiceLinesResponse
-> GetInvoicesInvoiceLinesResponse -> Bool
== :: GetInvoicesInvoiceLinesResponse
-> GetInvoicesInvoiceLinesResponse -> Bool
$c== :: GetInvoicesInvoiceLinesResponse
-> GetInvoicesInvoiceLinesResponse -> Bool
GHC.Classes.Eq)
data GetInvoicesInvoiceLinesResponseBody200 = GetInvoicesInvoiceLinesResponseBody200
{
GetInvoicesInvoiceLinesResponseBody200 -> [LineItem]
getInvoicesInvoiceLinesResponseBody200Data :: ([LineItem]),
GetInvoicesInvoiceLinesResponseBody200 -> Bool
getInvoicesInvoiceLinesResponseBody200HasMore :: GHC.Types.Bool,
GetInvoicesInvoiceLinesResponseBody200 -> Text
getInvoicesInvoiceLinesResponseBody200Url :: Data.Text.Internal.Text
}
deriving
( Int -> GetInvoicesInvoiceLinesResponseBody200 -> String -> String
[GetInvoicesInvoiceLinesResponseBody200] -> String -> String
GetInvoicesInvoiceLinesResponseBody200 -> String
(Int -> GetInvoicesInvoiceLinesResponseBody200 -> String -> String)
-> (GetInvoicesInvoiceLinesResponseBody200 -> String)
-> ([GetInvoicesInvoiceLinesResponseBody200] -> String -> String)
-> Show GetInvoicesInvoiceLinesResponseBody200
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [GetInvoicesInvoiceLinesResponseBody200] -> String -> String
$cshowList :: [GetInvoicesInvoiceLinesResponseBody200] -> String -> String
show :: GetInvoicesInvoiceLinesResponseBody200 -> String
$cshow :: GetInvoicesInvoiceLinesResponseBody200 -> String
showsPrec :: Int -> GetInvoicesInvoiceLinesResponseBody200 -> String -> String
$cshowsPrec :: Int -> GetInvoicesInvoiceLinesResponseBody200 -> String -> String
GHC.Show.Show,
GetInvoicesInvoiceLinesResponseBody200
-> GetInvoicesInvoiceLinesResponseBody200 -> Bool
(GetInvoicesInvoiceLinesResponseBody200
-> GetInvoicesInvoiceLinesResponseBody200 -> Bool)
-> (GetInvoicesInvoiceLinesResponseBody200
-> GetInvoicesInvoiceLinesResponseBody200 -> Bool)
-> Eq GetInvoicesInvoiceLinesResponseBody200
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetInvoicesInvoiceLinesResponseBody200
-> GetInvoicesInvoiceLinesResponseBody200 -> Bool
$c/= :: GetInvoicesInvoiceLinesResponseBody200
-> GetInvoicesInvoiceLinesResponseBody200 -> Bool
== :: GetInvoicesInvoiceLinesResponseBody200
-> GetInvoicesInvoiceLinesResponseBody200 -> Bool
$c== :: GetInvoicesInvoiceLinesResponseBody200
-> GetInvoicesInvoiceLinesResponseBody200 -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON GetInvoicesInvoiceLinesResponseBody200 where
toJSON :: GetInvoicesInvoiceLinesResponseBody200 -> Value
toJSON GetInvoicesInvoiceLinesResponseBody200
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"data" Text -> [LineItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetInvoicesInvoiceLinesResponseBody200 -> [LineItem]
getInvoicesInvoiceLinesResponseBody200Data GetInvoicesInvoiceLinesResponseBody200
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..= GetInvoicesInvoiceLinesResponseBody200 -> Bool
getInvoicesInvoiceLinesResponseBody200HasMore GetInvoicesInvoiceLinesResponseBody200
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..= GetInvoicesInvoiceLinesResponseBody200 -> Text
getInvoicesInvoiceLinesResponseBody200Url GetInvoicesInvoiceLinesResponseBody200
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 :: GetInvoicesInvoiceLinesResponseBody200 -> Encoding
toEncoding GetInvoicesInvoiceLinesResponseBody200
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"data" Text -> [LineItem] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= GetInvoicesInvoiceLinesResponseBody200 -> [LineItem]
getInvoicesInvoiceLinesResponseBody200Data GetInvoicesInvoiceLinesResponseBody200
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..= GetInvoicesInvoiceLinesResponseBody200 -> Bool
getInvoicesInvoiceLinesResponseBody200HasMore GetInvoicesInvoiceLinesResponseBody200
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..= GetInvoicesInvoiceLinesResponseBody200 -> Text
getInvoicesInvoiceLinesResponseBody200Url GetInvoicesInvoiceLinesResponseBody200
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 GetInvoicesInvoiceLinesResponseBody200 where
parseJSON :: Value -> Parser GetInvoicesInvoiceLinesResponseBody200
parseJSON = String
-> (Object -> Parser GetInvoicesInvoiceLinesResponseBody200)
-> Value
-> Parser GetInvoicesInvoiceLinesResponseBody200
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"GetInvoicesInvoiceLinesResponseBody200" (\Object
obj -> ((([LineItem]
-> Bool -> Text -> GetInvoicesInvoiceLinesResponseBody200)
-> Parser
([LineItem]
-> Bool -> Text -> GetInvoicesInvoiceLinesResponseBody200)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure [LineItem]
-> Bool -> Text -> GetInvoicesInvoiceLinesResponseBody200
GetInvoicesInvoiceLinesResponseBody200 Parser
([LineItem]
-> Bool -> Text -> GetInvoicesInvoiceLinesResponseBody200)
-> Parser [LineItem]
-> Parser (Bool -> Text -> GetInvoicesInvoiceLinesResponseBody200)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser [LineItem]
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"data")) Parser (Bool -> Text -> GetInvoicesInvoiceLinesResponseBody200)
-> Parser Bool
-> Parser (Text -> GetInvoicesInvoiceLinesResponseBody200)
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 -> GetInvoicesInvoiceLinesResponseBody200)
-> Parser Text -> Parser GetInvoicesInvoiceLinesResponseBody200
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"))
mkGetInvoicesInvoiceLinesResponseBody200 ::
[LineItem] ->
GHC.Types.Bool ->
Data.Text.Internal.Text ->
GetInvoicesInvoiceLinesResponseBody200
mkGetInvoicesInvoiceLinesResponseBody200 :: [LineItem]
-> Bool -> Text -> GetInvoicesInvoiceLinesResponseBody200
mkGetInvoicesInvoiceLinesResponseBody200 [LineItem]
getInvoicesInvoiceLinesResponseBody200Data Bool
getInvoicesInvoiceLinesResponseBody200HasMore Text
getInvoicesInvoiceLinesResponseBody200Url =
GetInvoicesInvoiceLinesResponseBody200 :: [LineItem]
-> Bool -> Text -> GetInvoicesInvoiceLinesResponseBody200
GetInvoicesInvoiceLinesResponseBody200
{ getInvoicesInvoiceLinesResponseBody200Data :: [LineItem]
getInvoicesInvoiceLinesResponseBody200Data = [LineItem]
getInvoicesInvoiceLinesResponseBody200Data,
getInvoicesInvoiceLinesResponseBody200HasMore :: Bool
getInvoicesInvoiceLinesResponseBody200HasMore = Bool
getInvoicesInvoiceLinesResponseBody200HasMore,
getInvoicesInvoiceLinesResponseBody200Url :: Text
getInvoicesInvoiceLinesResponseBody200Url = Text
getInvoicesInvoiceLinesResponseBody200Url
}