{-# 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.Orders.Refund
(
OrdersRefundResource
, ordersRefund
, OrdersRefund
, orPackageName
, orRevoke
, orOrderId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type OrdersRefundResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"orders" :>
CaptureMode "orderId" "refund" Text :>
QueryParam "revoke" Bool :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data OrdersRefund = OrdersRefund'
{ _orPackageName :: !Text
, _orRevoke :: !(Maybe Bool)
, _orOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersRefund
:: Text
-> Text
-> OrdersRefund
ordersRefund pOrPackageName_ pOrOrderId_ =
OrdersRefund'
{ _orPackageName = pOrPackageName_
, _orRevoke = Nothing
, _orOrderId = pOrOrderId_
}
orPackageName :: Lens' OrdersRefund Text
orPackageName
= lens _orPackageName
(\ s a -> s{_orPackageName = a})
orRevoke :: Lens' OrdersRefund (Maybe Bool)
orRevoke = lens _orRevoke (\ s a -> s{_orRevoke = a})
orOrderId :: Lens' OrdersRefund Text
orOrderId
= lens _orOrderId (\ s a -> s{_orOrderId = a})
instance GoogleRequest OrdersRefund where
type Rs OrdersRefund = ()
type Scopes OrdersRefund =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient OrdersRefund'{..}
= go _orPackageName _orOrderId _orRevoke
(Just AltJSON)
androidPublisherService
where go
= buildClient (Proxy :: Proxy OrdersRefundResource)
mempty