{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Operations.DeleteCustomersCustomerSubscriptionsSubscriptionExposedId 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
deleteCustomersCustomerSubscriptionsSubscriptionExposedId ::
forall m.
StripeAPI.Common.MonadHTTP m =>
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters ->
GHC.Maybe.Maybe DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody ->
StripeAPI.Common.ClientT m (Network.HTTP.Client.Types.Response DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
deleteCustomersCustomerSubscriptionsSubscriptionExposedId :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Maybe
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> ClientT
m
(Response
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
deleteCustomersCustomerSubscriptionsSubscriptionExposedId
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
parameters
Maybe
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
body =
(Response ByteString
-> Response
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
-> ClientT m (Response ByteString)
-> ClientT
m
(Response
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( \Response ByteString
response_0 ->
(ByteString
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
-> Response ByteString
-> Response
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
GHC.Base.fmap
( (String
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
-> (DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
-> Either
String
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
Data.Either.either String
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponseError DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
forall a. a -> a
GHC.Base.id
(Either
String
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
-> (ByteString
-> Either
String
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
-> ByteString
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
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) ->
Subscription
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse200
(Subscription
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
-> Either String Subscription
-> Either
String
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> ( ByteString -> Either String Subscription
forall a. FromJSON a => ByteString -> Either String a
Data.Aeson.eitherDecodeStrict ByteString
body ::
Data.Either.Either
GHC.Base.String
Subscription
)
| 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
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponseDefault
(Error
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse)
-> Either String Error
-> Either
String
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
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
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
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]
-> Maybe
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> RequestBodyEncoding
-> ClientT m (Response ByteString)
forall (m :: * -> *) body.
(MonadHTTP m, ToJSON body) =>
Text
-> Text
-> [QueryParameter]
-> Maybe body
-> RequestBodyEncoding
-> ClientT m (Response ByteString)
StripeAPI.Common.doBodyCallWithConfigurationM (Text -> Text
Data.Text.toUpper (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
GHC.Base.$ String -> Text
Data.Text.pack String
"DELETE") (String -> Text
Data.Text.pack (String
"/v1/customers/" 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 (DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
parameters))) String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ (String
"/subscriptions/" 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 (DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
parameters))) String -> String -> String
forall a. [a] -> [a] -> [a]
GHC.Base.++ String
""))))) [QueryParameter]
forall a. Monoid a => a
GHC.Base.mempty Maybe
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
body RequestBodyEncoding
StripeAPI.Common.RequestBodyEncodingFormData)
data DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters = DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
{
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer :: Data.Text.Internal.Text,
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId :: Data.Text.Internal.Text
}
deriving
( Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> String
-> String
[DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters]
-> String -> String
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> String
(Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> String
-> String)
-> (DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> String)
-> ([DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters]
-> String -> String)
-> Show
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters]
-> String -> String
$cshowList :: [DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters]
-> String -> String
show :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> String
$cshow :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> String
showsPrec :: Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> String
-> String
$cshowsPrec :: Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> String
-> String
GHC.Show.Show,
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Bool
(DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Bool)
-> (DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Bool)
-> Eq
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Bool
$c/= :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Bool
== :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Bool
$c== :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters where
toJSON :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Value
toJSON DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"pathCustomer" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"pathSubscription_exposed_id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Encoding
toEncoding DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"pathCustomer" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"pathSubscription_exposed_id" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
-> Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
obj))
instance Data.Aeson.Types.FromJSON.FromJSON DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters where
parseJSON :: Value
-> Parser
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
parseJSON = String
-> (Object
-> Parser
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters)
-> Value
-> Parser
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters" (\Object
obj -> ((Text
-> Text
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters)
-> Parser
(Text
-> Text
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Text
-> Text
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters Parser
(Text
-> Text
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters)
-> Parser Text
-> Parser
(Text
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters)
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
"pathCustomer")) Parser
(Text
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters)
-> Parser Text
-> Parser
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
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
"pathSubscription_exposed_id"))
mkDeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters ::
Data.Text.Internal.Text ->
Data.Text.Internal.Text ->
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
mkDeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters :: Text
-> Text
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
mkDeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId =
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters :: Text
-> Text
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdParameters
{ deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer :: Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer = Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathCustomer,
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId :: Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId = Text
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdParametersPathSubscriptionExposedId
}
data DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody = DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
{
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Maybe [Text]
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyExpand :: (GHC.Maybe.Maybe ([Data.Text.Internal.Text])),
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Maybe Bool
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyInvoiceNow :: (GHC.Maybe.Maybe GHC.Types.Bool),
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Maybe Bool
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrate :: (GHC.Maybe.Maybe GHC.Types.Bool)
}
deriving
( Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> String
-> String
[DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody]
-> String -> String
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> String
(Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> String
-> String)
-> (DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> String)
-> ([DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody]
-> String -> String)
-> Show
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody]
-> String -> String
$cshowList :: [DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody]
-> String -> String
show :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> String
$cshow :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> String
showsPrec :: Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> String
-> String
$cshowsPrec :: Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> String
-> String
GHC.Show.Show,
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Bool
(DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Bool)
-> (DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Bool)
-> Eq
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Bool
$c/= :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Bool
== :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Bool
$c== :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody where
toJSON :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Value
toJSON DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"expand" Text -> Maybe [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Maybe [Text]
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyExpand DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"invoice_now" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Maybe Bool
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyInvoiceNow DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"prorate" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Maybe Bool
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrate DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Encoding
toEncoding DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"expand" Text -> Maybe [Text] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Maybe [Text]
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyExpand DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"invoice_now" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Maybe Bool
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyInvoiceNow DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"prorate" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
-> Maybe Bool
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrate DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
obj)))
instance Data.Aeson.Types.FromJSON.FromJSON DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody where
parseJSON :: Value
-> Parser
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
parseJSON = String
-> (Object
-> Parser
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody)
-> Value
-> Parser
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody" (\Object
obj -> (((Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody)
-> Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody)
-> Parser (Maybe [Text])
-> Parser
(Maybe Bool
-> Maybe Bool
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody)
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
"expand")) Parser
(Maybe Bool
-> Maybe Bool
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"invoice_now")) Parser
(Maybe Bool
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody)
-> Parser (Maybe Bool)
-> Parser
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"prorate"))
mkDeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
mkDeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
mkDeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody =
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody :: Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBody
{ deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyExpand :: Maybe [Text]
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyExpand = Maybe [Text]
forall a. Maybe a
GHC.Maybe.Nothing,
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyInvoiceNow :: Maybe Bool
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyInvoiceNow = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrate :: Maybe Bool
deleteCustomersCustomerSubscriptionsSubscriptionExposedIdRequestBodyProrate = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing
}
data DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
=
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponseError GHC.Base.String
|
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse200 Subscription
|
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponseDefault Error
deriving (Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> String
-> String
[DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse]
-> String -> String
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> String
(Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> String
-> String)
-> (DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> String)
-> ([DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse]
-> String -> String)
-> Show
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
showList :: [DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse]
-> String -> String
$cshowList :: [DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse]
-> String -> String
show :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> String
$cshow :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> String
showsPrec :: Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> String
-> String
$cshowsPrec :: Int
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> String
-> String
GHC.Show.Show, DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> Bool
(DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> Bool)
-> (DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> Bool)
-> Eq
DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> Bool
$c/= :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> Bool
== :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> Bool
$c== :: DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdResponse
-> Bool
GHC.Classes.Eq)