{-# 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.Notifyauthdeclined
(
OrderpaymentsNotifyauthdeclinedResource
, orderpaymentsNotifyauthdeclined
, OrderpaymentsNotifyauthdeclined
, onMerchantId
, onPayload
, onOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrderpaymentsNotifyauthdeclinedResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orderpayments" :>
Capture "orderId" Text :>
"notifyAuthDeclined" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
OrderpaymentsNotifyAuthDeclinedRequest
:>
Post '[JSON] OrderpaymentsNotifyAuthDeclinedResponse
data OrderpaymentsNotifyauthdeclined = OrderpaymentsNotifyauthdeclined'
{ _onMerchantId :: !(Textual Word64)
, _onPayload :: !OrderpaymentsNotifyAuthDeclinedRequest
, _onOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
orderpaymentsNotifyauthdeclined
:: Word64
-> OrderpaymentsNotifyAuthDeclinedRequest
-> Text
-> OrderpaymentsNotifyauthdeclined
orderpaymentsNotifyauthdeclined pOnMerchantId_ pOnPayload_ pOnOrderId_ =
OrderpaymentsNotifyauthdeclined'
{ _onMerchantId = _Coerce # pOnMerchantId_
, _onPayload = pOnPayload_
, _onOrderId = pOnOrderId_
}
onMerchantId :: Lens' OrderpaymentsNotifyauthdeclined Word64
onMerchantId
= lens _onMerchantId (\ s a -> s{_onMerchantId = a})
. _Coerce
onPayload :: Lens' OrderpaymentsNotifyauthdeclined OrderpaymentsNotifyAuthDeclinedRequest
onPayload
= lens _onPayload (\ s a -> s{_onPayload = a})
onOrderId :: Lens' OrderpaymentsNotifyauthdeclined Text
onOrderId
= lens _onOrderId (\ s a -> s{_onOrderId = a})
instance GoogleRequest
OrderpaymentsNotifyauthdeclined where
type Rs OrderpaymentsNotifyauthdeclined =
OrderpaymentsNotifyAuthDeclinedResponse
type Scopes OrderpaymentsNotifyauthdeclined =
'["https://www.googleapis.com/auth/content"]
requestClient OrderpaymentsNotifyauthdeclined'{..}
= go _onMerchantId _onOrderId (Just AltJSON)
_onPayload
shoppingContentService
where go
= buildClient
(Proxy ::
Proxy OrderpaymentsNotifyauthdeclinedResource)
mempty