{-# 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.Content.Orderpayments.Notifyrefund
(
OrderpaymentsNotifyrefundResource
, orderpaymentsNotifyrefund
, OrderpaymentsNotifyrefund
, ooMerchantId
, ooPayload
, ooOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrderpaymentsNotifyrefundResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orderpayments" :>
Capture "orderId" Text :>
"notifyRefund" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrderpaymentsNotifyRefundRequest :>
Post '[JSON] OrderpaymentsNotifyRefundResponse
data OrderpaymentsNotifyrefund = OrderpaymentsNotifyrefund'
{ _ooMerchantId :: !(Textual Word64)
, _ooPayload :: !OrderpaymentsNotifyRefundRequest
, _ooOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
orderpaymentsNotifyrefund
:: Word64
-> OrderpaymentsNotifyRefundRequest
-> Text
-> OrderpaymentsNotifyrefund
orderpaymentsNotifyrefund pOoMerchantId_ pOoPayload_ pOoOrderId_ =
OrderpaymentsNotifyrefund'
{ _ooMerchantId = _Coerce # pOoMerchantId_
, _ooPayload = pOoPayload_
, _ooOrderId = pOoOrderId_
}
ooMerchantId :: Lens' OrderpaymentsNotifyrefund Word64
ooMerchantId
= lens _ooMerchantId (\ s a -> s{_ooMerchantId = a})
. _Coerce
ooPayload :: Lens' OrderpaymentsNotifyrefund OrderpaymentsNotifyRefundRequest
ooPayload
= lens _ooPayload (\ s a -> s{_ooPayload = a})
ooOrderId :: Lens' OrderpaymentsNotifyrefund Text
ooOrderId
= lens _ooOrderId (\ s a -> s{_ooOrderId = a})
instance GoogleRequest OrderpaymentsNotifyrefund
where
type Rs OrderpaymentsNotifyrefund =
OrderpaymentsNotifyRefundResponse
type Scopes OrderpaymentsNotifyrefund =
'["https://www.googleapis.com/auth/content"]
requestClient OrderpaymentsNotifyrefund'{..}
= go _ooMerchantId _ooOrderId (Just AltJSON)
_ooPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrderpaymentsNotifyrefundResource)
mempty