{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module RecurlyClient.Operations.List_account_notes 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
import qualified Data.ByteString as Data.ByteString.Internal
import qualified Data.ByteString as Data.ByteString.Internal.Type
import qualified Data.Either
import qualified Data.Foldable
import qualified Data.Functor
import qualified Data.Maybe
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text as 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 RecurlyClient.Common
import RecurlyClient.Types
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
list_account_notes ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
List_account_notesParameters ->
RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response List_account_notesResponse)
list_account_notes :: forall (m :: * -> *).
MonadHTTP m =>
List_account_notesParameters
-> ClientT m (Response List_account_notesResponse)
list_account_notes List_account_notesParameters
parameters =
(Response ByteString -> Response List_account_notesResponse)
-> ClientT m (Response ByteString)
-> ClientT m (Response List_account_notesResponse)
forall a b. (a -> b) -> ClientT m a -> ClientT m b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_0 ->
(ByteString -> List_account_notesResponse)
-> Response ByteString -> Response List_account_notesResponse
forall a b. (a -> b) -> Response a -> Response b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> List_account_notesResponse)
-> (List_account_notesResponse -> List_account_notesResponse)
-> Either String List_account_notesResponse
-> List_account_notesResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_account_notesResponse
List_account_notesResponseError List_account_notesResponse -> List_account_notesResponse
forall a. a -> a
GHC.Base.id
(Either String List_account_notesResponse
-> List_account_notesResponse)
-> (ByteString -> Either String List_account_notesResponse)
-> ByteString
-> List_account_notesResponse
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) ->
AccountNoteList -> List_account_notesResponse
List_account_notesResponse200
(AccountNoteList -> List_account_notesResponse)
-> Either String AccountNoteList
-> Either String List_account_notesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String AccountNoteList
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
AccountNoteList
)
| (\Status
status_2 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_2 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Int
404) (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
Error -> List_account_notesResponse
List_account_notesResponse404
(Error -> List_account_notesResponse)
-> Either String Error -> Either String List_account_notesResponse
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 -> 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 -> List_account_notesResponse
List_account_notesResponseDefault
(Error -> List_account_notesResponse)
-> Either String Error -> Either String List_account_notesResponse
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 List_account_notesResponse
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)
RecurlyClient.Common.doCallWithConfigurationM (Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.Internal.pack String
"GET") (Text
"/accounts/" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (ByteString -> Text
RecurlyClient.Common.byteToText (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.$ (Text -> ByteString
RecurlyClient.Common.textToByte (Text -> ByteString) -> Text -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> Text
forall a. ToJSON a => a -> Text
RecurlyClient.Common.stringifyModel (List_account_notesParameters -> Text
list_account_notesParametersPathAccount_id List_account_notesParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> Text
"/notes")) [Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"ids") ([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.<$> List_account_notesParameters -> Maybe [Text]
list_account_notesParametersQueryIds List_account_notesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False])
data List_account_notesParameters = List_account_notesParameters
{ List_account_notesParameters -> Text
list_account_notesParametersPathAccount_id :: Data.Text.Internal.Text
, List_account_notesParameters -> Maybe [Text]
list_account_notesParametersQueryIds :: (GHC.Maybe.Maybe [Data.Text.Internal.Text])
}
deriving
( Int -> List_account_notesParameters -> ShowS
[List_account_notesParameters] -> ShowS
List_account_notesParameters -> String
(Int -> List_account_notesParameters -> ShowS)
-> (List_account_notesParameters -> String)
-> ([List_account_notesParameters] -> ShowS)
-> Show List_account_notesParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_notesParameters -> ShowS
showsPrec :: Int -> List_account_notesParameters -> ShowS
$cshow :: List_account_notesParameters -> String
show :: List_account_notesParameters -> String
$cshowList :: [List_account_notesParameters] -> ShowS
showList :: [List_account_notesParameters] -> ShowS
GHC.Show.Show
, List_account_notesParameters
-> List_account_notesParameters -> Bool
(List_account_notesParameters
-> List_account_notesParameters -> Bool)
-> (List_account_notesParameters
-> List_account_notesParameters -> Bool)
-> Eq List_account_notesParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_notesParameters
-> List_account_notesParameters -> Bool
== :: List_account_notesParameters
-> List_account_notesParameters -> Bool
$c/= :: List_account_notesParameters
-> List_account_notesParameters -> Bool
/= :: List_account_notesParameters
-> List_account_notesParameters -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON List_account_notesParameters where
toJSON :: List_account_notesParameters -> Value
toJSON List_account_notesParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object ([[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Key
"pathAccount_id" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..= List_account_notesParameters -> Text
list_account_notesParametersPathAccount_id List_account_notesParameters
obj] [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [Pair] -> ([Text] -> [Pair]) -> Maybe [Text] -> [Pair]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Pair]
forall a. Monoid a => a
GHC.Base.mempty (Pair -> [Pair]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Pair -> [Pair]) -> ([Text] -> Pair) -> [Text] -> [Pair]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryIds" Key -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
Data.Aeson.Types.ToJSON..=)) (List_account_notesParameters -> Maybe [Text]
list_account_notesParametersQueryIds List_account_notesParameters
obj) [Pair] -> [[Pair]] -> [[Pair]]
forall a. a -> [a] -> [a]
: [[Pair]]
forall a. Monoid a => a
GHC.Base.mempty))
toEncoding :: List_account_notesParameters -> Encoding
toEncoding List_account_notesParameters
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ([Series] -> Series
forall a. Monoid a => [a] -> a
GHC.Base.mconcat ([[Series]] -> [Series]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
Data.Foldable.concat ([Key
"pathAccount_id" Key -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..= List_account_notesParameters -> Text
list_account_notesParametersPathAccount_id List_account_notesParameters
obj] [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [Series] -> ([Text] -> [Series]) -> Maybe [Text] -> [Series]
forall b a. b -> (a -> b) -> Maybe a -> b
Data.Maybe.maybe [Series]
forall a. Monoid a => a
GHC.Base.mempty (Series -> [Series]
forall a. a -> [a]
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure (Series -> [Series]) -> ([Text] -> Series) -> [Text] -> [Series]
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. (Key
"queryIds" Key -> [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Series
Data.Aeson.Types.ToJSON..=)) (List_account_notesParameters -> Maybe [Text]
list_account_notesParametersQueryIds List_account_notesParameters
obj) [Series] -> [[Series]] -> [[Series]]
forall a. a -> [a] -> [a]
: [[Series]]
forall a. Monoid a => a
GHC.Base.mempty)))
instance Data.Aeson.Types.FromJSON.FromJSON List_account_notesParameters where
parseJSON :: Value -> Parser List_account_notesParameters
parseJSON = String
-> (Object -> Parser List_account_notesParameters)
-> Value
-> Parser List_account_notesParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"List_account_notesParameters" (\Object
obj -> ((Text -> Maybe [Text] -> List_account_notesParameters)
-> Parser (Text -> Maybe [Text] -> List_account_notesParameters)
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Text -> Maybe [Text] -> List_account_notesParameters
List_account_notesParameters Parser (Text -> Maybe [Text] -> List_account_notesParameters)
-> Parser Text
-> Parser (Maybe [Text] -> List_account_notesParameters)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
Data.Aeson.Types.FromJSON..: Key
"pathAccount_id")) Parser (Maybe [Text] -> List_account_notesParameters)
-> Parser (Maybe [Text]) -> Parser List_account_notesParameters
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Key
"queryIds"))
mkList_account_notesParameters ::
Data.Text.Internal.Text ->
List_account_notesParameters
mkList_account_notesParameters :: Text -> List_account_notesParameters
mkList_account_notesParameters Text
list_account_notesParametersPathAccount_id =
List_account_notesParameters
{ list_account_notesParametersPathAccount_id :: Text
list_account_notesParametersPathAccount_id = Text
list_account_notesParametersPathAccount_id
, list_account_notesParametersQueryIds :: Maybe [Text]
list_account_notesParametersQueryIds = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing
}
data List_account_notesResponse
=
List_account_notesResponseError GHC.Base.String
|
List_account_notesResponse200 AccountNoteList
|
List_account_notesResponse404 Error
|
List_account_notesResponseDefault Error
deriving (Int -> List_account_notesResponse -> ShowS
[List_account_notesResponse] -> ShowS
List_account_notesResponse -> String
(Int -> List_account_notesResponse -> ShowS)
-> (List_account_notesResponse -> String)
-> ([List_account_notesResponse] -> ShowS)
-> Show List_account_notesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> List_account_notesResponse -> ShowS
showsPrec :: Int -> List_account_notesResponse -> ShowS
$cshow :: List_account_notesResponse -> String
show :: List_account_notesResponse -> String
$cshowList :: [List_account_notesResponse] -> ShowS
showList :: [List_account_notesResponse] -> ShowS
GHC.Show.Show, List_account_notesResponse -> List_account_notesResponse -> Bool
(List_account_notesResponse -> List_account_notesResponse -> Bool)
-> (List_account_notesResponse
-> List_account_notesResponse -> Bool)
-> Eq List_account_notesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: List_account_notesResponse -> List_account_notesResponse -> Bool
== :: List_account_notesResponse -> List_account_notesResponse -> Bool
$c/= :: List_account_notesResponse -> List_account_notesResponse -> Bool
/= :: List_account_notesResponse -> List_account_notesResponse -> Bool
GHC.Classes.Eq)
list_account_notesWithConfiguration ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
RecurlyClient.Common.Configuration ->
List_account_notesParameters ->
m (Network.HTTP.Client.Types.Response List_account_notesResponse)
list_account_notesWithConfiguration :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_account_notesParameters
-> m (Response List_account_notesResponse)
list_account_notesWithConfiguration
Configuration
config
List_account_notesParameters
parameters =
(Response ByteString -> Response List_account_notesResponse)
-> m (Response ByteString)
-> m (Response List_account_notesResponse)
forall a b. (a -> b) -> m a -> m b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_3 ->
(ByteString -> List_account_notesResponse)
-> Response ByteString -> Response List_account_notesResponse
forall a b. (a -> b) -> Response a -> Response b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String -> List_account_notesResponse)
-> (List_account_notesResponse -> List_account_notesResponse)
-> Either String List_account_notesResponse
-> List_account_notesResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String -> List_account_notesResponse
List_account_notesResponseError List_account_notesResponse -> List_account_notesResponse
forall a. a -> a
GHC.Base.id
(Either String List_account_notesResponse
-> List_account_notesResponse)
-> (ByteString -> Either String List_account_notesResponse)
-> ByteString
-> List_account_notesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
GHC.Base.. ( \Response ByteString
response ByteString
body ->
if
| (\Status
status_4 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_4 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) ->
AccountNoteList -> List_account_notesResponse
List_account_notesResponse200
(AccountNoteList -> List_account_notesResponse)
-> Either String AccountNoteList
-> Either String List_account_notesResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String AccountNoteList
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
AccountNoteList
)
| (\Status
status_5 -> Status -> Int
Network.HTTP.Types.Status.statusCode Status
status_5 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Int
404) (Response ByteString -> Status
forall body. Response body -> Status
Network.HTTP.Client.Types.responseStatus Response ByteString
response) ->
Error -> List_account_notesResponse
List_account_notesResponse404
(Error -> List_account_notesResponse)
-> Either String Error -> Either String List_account_notesResponse
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 -> 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 -> List_account_notesResponse
List_account_notesResponseDefault
(Error -> List_account_notesResponse)
-> Either String Error -> Either String List_account_notesResponse
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 List_account_notesResponse
forall a b. a -> Either a b
Data.Either.Left String
"Missing default response type"
)
Response ByteString
response_3
)
Response ByteString
response_3
)
(Configuration
-> Text -> Text -> [QueryParameter] -> m (Response ByteString)
forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> Text -> Text -> [QueryParameter] -> m (Response ByteString)
RecurlyClient.Common.doCallWithConfiguration Configuration
config (Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.Internal.pack String
"GET") (Text
"/accounts/" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (ByteString -> Text
RecurlyClient.Common.byteToText (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.$ (Text -> ByteString
RecurlyClient.Common.textToByte (Text -> ByteString) -> Text -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> Text
forall a. ToJSON a => a -> Text
RecurlyClient.Common.stringifyModel (List_account_notesParameters -> Text
list_account_notesParametersPathAccount_id List_account_notesParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> Text
"/notes")) [Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"ids") ([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.<$> List_account_notesParameters -> Maybe [Text]
list_account_notesParametersQueryIds List_account_notesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False])
list_account_notesRaw ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
List_account_notesParameters ->
RecurlyClient.Common.ClientT m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_account_notesRaw :: forall (m :: * -> *).
MonadHTTP m =>
List_account_notesParameters -> ClientT m (Response ByteString)
list_account_notesRaw List_account_notesParameters
parameters = ClientT m (Response ByteString) -> ClientT m (Response ByteString)
forall a. a -> a
GHC.Base.id (Text -> Text -> [QueryParameter] -> ClientT m (Response ByteString)
forall (m :: * -> *).
MonadHTTP m =>
Text -> Text -> [QueryParameter] -> ClientT m (Response ByteString)
RecurlyClient.Common.doCallWithConfigurationM (Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.Internal.pack String
"GET") (Text
"/accounts/" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (ByteString -> Text
RecurlyClient.Common.byteToText (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.$ (Text -> ByteString
RecurlyClient.Common.textToByte (Text -> ByteString) -> Text -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> Text
forall a. ToJSON a => a -> Text
RecurlyClient.Common.stringifyModel (List_account_notesParameters -> Text
list_account_notesParametersPathAccount_id List_account_notesParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> Text
"/notes")) [Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"ids") ([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.<$> List_account_notesParameters -> Maybe [Text]
list_account_notesParametersQueryIds List_account_notesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False])
list_account_notesWithConfigurationRaw ::
forall m.
(RecurlyClient.Common.MonadHTTP m) =>
RecurlyClient.Common.Configuration ->
List_account_notesParameters ->
m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString)
list_account_notesWithConfigurationRaw :: forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> List_account_notesParameters -> m (Response ByteString)
list_account_notesWithConfigurationRaw
Configuration
config
List_account_notesParameters
parameters = m (Response ByteString) -> m (Response ByteString)
forall a. a -> a
GHC.Base.id (Configuration
-> Text -> Text -> [QueryParameter] -> m (Response ByteString)
forall (m :: * -> *).
MonadHTTP m =>
Configuration
-> Text -> Text -> [QueryParameter] -> m (Response ByteString)
RecurlyClient.Common.doCallWithConfiguration Configuration
config (Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.Internal.pack String
"GET") (Text
"/accounts/" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (ByteString -> Text
RecurlyClient.Common.byteToText (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.$ (Text -> ByteString
RecurlyClient.Common.textToByte (Text -> ByteString) -> Text -> ByteString
forall a b. (a -> b) -> a -> b
GHC.Base.$ Text -> Text
forall a. ToJSON a => a -> Text
RecurlyClient.Common.stringifyModel (List_account_notesParameters -> Text
list_account_notesParametersPathAccount_id List_account_notesParameters
parameters))) Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
GHC.Base.<> Text
"/notes")) [Text -> Maybe Value -> Text -> Bool -> QueryParameter
RecurlyClient.Common.QueryParameter (String -> Text
Data.Text.Internal.pack String
"ids") ([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.<$> List_account_notesParameters -> Maybe [Text]
list_account_notesParametersQueryIds List_account_notesParameters
parameters) (String -> Text
Data.Text.Internal.pack String
"form") Bool
GHC.Types.False])