{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Cancel
(
PurchasesSubscriptionsCancelResource
, purchasesSubscriptionsCancel
, PurchasesSubscriptionsCancel
, pscPackageName
, pscToken
, pscSubscriptionId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type PurchasesSubscriptionsCancelResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"purchases" :>
"subscriptions" :>
Capture "subscriptionId" Text :>
"tokens" :>
CaptureMode "token" "cancel" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data PurchasesSubscriptionsCancel = PurchasesSubscriptionsCancel'
{ _pscPackageName :: !Text
, _pscToken :: !Text
, _pscSubscriptionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
purchasesSubscriptionsCancel
:: Text
-> Text
-> Text
-> PurchasesSubscriptionsCancel
purchasesSubscriptionsCancel pPscPackageName_ pPscToken_ pPscSubscriptionId_ =
PurchasesSubscriptionsCancel'
{ _pscPackageName = pPscPackageName_
, _pscToken = pPscToken_
, _pscSubscriptionId = pPscSubscriptionId_
}
pscPackageName :: Lens' PurchasesSubscriptionsCancel Text
pscPackageName
= lens _pscPackageName
(\ s a -> s{_pscPackageName = a})
pscToken :: Lens' PurchasesSubscriptionsCancel Text
pscToken = lens _pscToken (\ s a -> s{_pscToken = a})
pscSubscriptionId :: Lens' PurchasesSubscriptionsCancel Text
pscSubscriptionId
= lens _pscSubscriptionId
(\ s a -> s{_pscSubscriptionId = a})
instance GoogleRequest PurchasesSubscriptionsCancel
where
type Rs PurchasesSubscriptionsCancel = ()
type Scopes PurchasesSubscriptionsCancel =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient PurchasesSubscriptionsCancel'{..}
= go _pscPackageName _pscSubscriptionId _pscToken
(Just AltJSON)
androidPublisherService
where go
= buildClient
(Proxy :: Proxy PurchasesSubscriptionsCancelResource)
mempty