{-# 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.Defer
(
PurchasesSubscriptionsDeferResource
, purchasesSubscriptionsDefer
, PurchasesSubscriptionsDefer
, psdPackageName
, psdToken
, psdPayload
, psdSubscriptionId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type PurchasesSubscriptionsDeferResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"purchases" :>
"subscriptions" :>
Capture "subscriptionId" Text :>
"tokens" :>
CaptureMode "token" "defer" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SubscriptionPurchasesDeferRequest :>
Post '[JSON] SubscriptionPurchasesDeferResponse
data PurchasesSubscriptionsDefer = PurchasesSubscriptionsDefer'
{ _psdPackageName :: !Text
, _psdToken :: !Text
, _psdPayload :: !SubscriptionPurchasesDeferRequest
, _psdSubscriptionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
purchasesSubscriptionsDefer
:: Text
-> Text
-> SubscriptionPurchasesDeferRequest
-> Text
-> PurchasesSubscriptionsDefer
purchasesSubscriptionsDefer pPsdPackageName_ pPsdToken_ pPsdPayload_ pPsdSubscriptionId_ =
PurchasesSubscriptionsDefer'
{ _psdPackageName = pPsdPackageName_
, _psdToken = pPsdToken_
, _psdPayload = pPsdPayload_
, _psdSubscriptionId = pPsdSubscriptionId_
}
psdPackageName :: Lens' PurchasesSubscriptionsDefer Text
psdPackageName
= lens _psdPackageName
(\ s a -> s{_psdPackageName = a})
psdToken :: Lens' PurchasesSubscriptionsDefer Text
psdToken = lens _psdToken (\ s a -> s{_psdToken = a})
psdPayload :: Lens' PurchasesSubscriptionsDefer SubscriptionPurchasesDeferRequest
psdPayload
= lens _psdPayload (\ s a -> s{_psdPayload = a})
psdSubscriptionId :: Lens' PurchasesSubscriptionsDefer Text
psdSubscriptionId
= lens _psdSubscriptionId
(\ s a -> s{_psdSubscriptionId = a})
instance GoogleRequest PurchasesSubscriptionsDefer
where
type Rs PurchasesSubscriptionsDefer =
SubscriptionPurchasesDeferResponse
type Scopes PurchasesSubscriptionsDefer =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient PurchasesSubscriptionsDefer'{..}
= go _psdPackageName _psdSubscriptionId _psdToken
(Just AltJSON)
_psdPayload
androidPublisherService
where go
= buildClient
(Proxy :: Proxy PurchasesSubscriptionsDeferResource)
mempty