{-# 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.Refund
(
PurchasesSubscriptionsRefundResource
, purchasesSubscriptionsRefund
, PurchasesSubscriptionsRefund
, psrPackageName
, psrToken
, psrSubscriptionId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type PurchasesSubscriptionsRefundResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"purchases" :>
"subscriptions" :>
Capture "subscriptionId" Text :>
"tokens" :>
CaptureMode "token" "refund" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data PurchasesSubscriptionsRefund = PurchasesSubscriptionsRefund'
{ _psrPackageName :: !Text
, _psrToken :: !Text
, _psrSubscriptionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
purchasesSubscriptionsRefund
:: Text
-> Text
-> Text
-> PurchasesSubscriptionsRefund
purchasesSubscriptionsRefund pPsrPackageName_ pPsrToken_ pPsrSubscriptionId_ =
PurchasesSubscriptionsRefund'
{ _psrPackageName = pPsrPackageName_
, _psrToken = pPsrToken_
, _psrSubscriptionId = pPsrSubscriptionId_
}
psrPackageName :: Lens' PurchasesSubscriptionsRefund Text
psrPackageName
= lens _psrPackageName
(\ s a -> s{_psrPackageName = a})
psrToken :: Lens' PurchasesSubscriptionsRefund Text
psrToken = lens _psrToken (\ s a -> s{_psrToken = a})
psrSubscriptionId :: Lens' PurchasesSubscriptionsRefund Text
psrSubscriptionId
= lens _psrSubscriptionId
(\ s a -> s{_psrSubscriptionId = a})
instance GoogleRequest PurchasesSubscriptionsRefund
where
type Rs PurchasesSubscriptionsRefund = ()
type Scopes PurchasesSubscriptionsRefund =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient PurchasesSubscriptionsRefund'{..}
= go _psrPackageName _psrSubscriptionId _psrToken
(Just AltJSON)
androidPublisherService
where go
= buildClient
(Proxy :: Proxy PurchasesSubscriptionsRefundResource)
mempty