{-# 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.Notifycharge
(
OrderpaymentsNotifychargeResource
, orderpaymentsNotifycharge
, OrderpaymentsNotifycharge
, onnMerchantId
, onnPayload
, onnOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrderpaymentsNotifychargeResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orderpayments" :>
Capture "orderId" Text :>
"notifyCharge" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrderpaymentsNotifyChargeRequest :>
Post '[JSON] OrderpaymentsNotifyChargeResponse
data OrderpaymentsNotifycharge = OrderpaymentsNotifycharge'
{ _onnMerchantId :: !(Textual Word64)
, _onnPayload :: !OrderpaymentsNotifyChargeRequest
, _onnOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
orderpaymentsNotifycharge
:: Word64
-> OrderpaymentsNotifyChargeRequest
-> Text
-> OrderpaymentsNotifycharge
orderpaymentsNotifycharge pOnnMerchantId_ pOnnPayload_ pOnnOrderId_ =
OrderpaymentsNotifycharge'
{ _onnMerchantId = _Coerce # pOnnMerchantId_
, _onnPayload = pOnnPayload_
, _onnOrderId = pOnnOrderId_
}
onnMerchantId :: Lens' OrderpaymentsNotifycharge Word64
onnMerchantId
= lens _onnMerchantId
(\ s a -> s{_onnMerchantId = a})
. _Coerce
onnPayload :: Lens' OrderpaymentsNotifycharge OrderpaymentsNotifyChargeRequest
onnPayload
= lens _onnPayload (\ s a -> s{_onnPayload = a})
onnOrderId :: Lens' OrderpaymentsNotifycharge Text
onnOrderId
= lens _onnOrderId (\ s a -> s{_onnOrderId = a})
instance GoogleRequest OrderpaymentsNotifycharge
where
type Rs OrderpaymentsNotifycharge =
OrderpaymentsNotifyChargeResponse
type Scopes OrderpaymentsNotifycharge =
'["https://www.googleapis.com/auth/content"]
requestClient OrderpaymentsNotifycharge'{..}
= go _onnMerchantId _onnOrderId (Just AltJSON)
_onnPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrderpaymentsNotifychargeResource)
mempty