{-# 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.Revoke
(
PurchasesSubscriptionsRevokeResource
, purchasesSubscriptionsRevoke
, PurchasesSubscriptionsRevoke
, pPackageName
, pToken
, pSubscriptionId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type PurchasesSubscriptionsRevokeResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"purchases" :>
"subscriptions" :>
Capture "subscriptionId" Text :>
"tokens" :>
CaptureMode "token" "revoke" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data PurchasesSubscriptionsRevoke = PurchasesSubscriptionsRevoke'
{ _pPackageName :: !Text
, _pToken :: !Text
, _pSubscriptionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
purchasesSubscriptionsRevoke
:: Text
-> Text
-> Text
-> PurchasesSubscriptionsRevoke
purchasesSubscriptionsRevoke pPPackageName_ pPToken_ pPSubscriptionId_ =
PurchasesSubscriptionsRevoke'
{ _pPackageName = pPPackageName_
, _pToken = pPToken_
, _pSubscriptionId = pPSubscriptionId_
}
pPackageName :: Lens' PurchasesSubscriptionsRevoke Text
pPackageName
= lens _pPackageName (\ s a -> s{_pPackageName = a})
pToken :: Lens' PurchasesSubscriptionsRevoke Text
pToken = lens _pToken (\ s a -> s{_pToken = a})
pSubscriptionId :: Lens' PurchasesSubscriptionsRevoke Text
pSubscriptionId
= lens _pSubscriptionId
(\ s a -> s{_pSubscriptionId = a})
instance GoogleRequest PurchasesSubscriptionsRevoke
where
type Rs PurchasesSubscriptionsRevoke = ()
type Scopes PurchasesSubscriptionsRevoke =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient PurchasesSubscriptionsRevoke'{..}
= go _pPackageName _pSubscriptionId _pToken
(Just AltJSON)
androidPublisherService
where go
= buildClient
(Proxy :: Proxy PurchasesSubscriptionsRevokeResource)
mempty