{-# 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.NotifyauthApproved
(
OrderpaymentsNotifyauthApprovedResource
, orderpaymentsNotifyauthApproved
, OrderpaymentsNotifyauthApproved
, onaMerchantId
, onaPayload
, onaOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrderpaymentsNotifyauthApprovedResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orderpayments" :>
Capture "orderId" Text :>
"notifyAuthApproved" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
OrderpaymentsNotifyAuthApprovedRequest
:>
Post '[JSON] OrderpaymentsNotifyAuthApprovedResponse
data OrderpaymentsNotifyauthApproved = OrderpaymentsNotifyauthApproved'
{ _onaMerchantId :: !(Textual Word64)
, _onaPayload :: !OrderpaymentsNotifyAuthApprovedRequest
, _onaOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
orderpaymentsNotifyauthApproved
:: Word64
-> OrderpaymentsNotifyAuthApprovedRequest
-> Text
-> OrderpaymentsNotifyauthApproved
orderpaymentsNotifyauthApproved pOnaMerchantId_ pOnaPayload_ pOnaOrderId_ =
OrderpaymentsNotifyauthApproved'
{ _onaMerchantId = _Coerce # pOnaMerchantId_
, _onaPayload = pOnaPayload_
, _onaOrderId = pOnaOrderId_
}
onaMerchantId :: Lens' OrderpaymentsNotifyauthApproved Word64
onaMerchantId
= lens _onaMerchantId
(\ s a -> s{_onaMerchantId = a})
. _Coerce
onaPayload :: Lens' OrderpaymentsNotifyauthApproved OrderpaymentsNotifyAuthApprovedRequest
onaPayload
= lens _onaPayload (\ s a -> s{_onaPayload = a})
onaOrderId :: Lens' OrderpaymentsNotifyauthApproved Text
onaOrderId
= lens _onaOrderId (\ s a -> s{_onaOrderId = a})
instance GoogleRequest
OrderpaymentsNotifyauthApproved where
type Rs OrderpaymentsNotifyauthApproved =
OrderpaymentsNotifyAuthApprovedResponse
type Scopes OrderpaymentsNotifyauthApproved =
'["https://www.googleapis.com/auth/content"]
requestClient OrderpaymentsNotifyauthApproved'{..}
= go _onaMerchantId _onaOrderId (Just AltJSON)
_onaPayload
shoppingContentService
where go
= buildClient
(Proxy ::
Proxy OrderpaymentsNotifyauthApprovedResource)
mempty