{-# 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.Orders.Acknowledge
(
OrdersAcknowledgeResource
, ordersAcknowledge
, OrdersAcknowledge
, oaMerchantId
, oaPayload
, oaOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersAcknowledgeResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
"acknowledge" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersAcknowledgeRequest :>
Post '[JSON] OrdersAcknowledgeResponse
data OrdersAcknowledge = OrdersAcknowledge'
{ _oaMerchantId :: !(Textual Word64)
, _oaPayload :: !OrdersAcknowledgeRequest
, _oaOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersAcknowledge
:: Word64
-> OrdersAcknowledgeRequest
-> Text
-> OrdersAcknowledge
ordersAcknowledge pOaMerchantId_ pOaPayload_ pOaOrderId_ =
OrdersAcknowledge'
{ _oaMerchantId = _Coerce # pOaMerchantId_
, _oaPayload = pOaPayload_
, _oaOrderId = pOaOrderId_
}
oaMerchantId :: Lens' OrdersAcknowledge Word64
oaMerchantId
= lens _oaMerchantId (\ s a -> s{_oaMerchantId = a})
. _Coerce
oaPayload :: Lens' OrdersAcknowledge OrdersAcknowledgeRequest
oaPayload
= lens _oaPayload (\ s a -> s{_oaPayload = a})
oaOrderId :: Lens' OrdersAcknowledge Text
oaOrderId
= lens _oaOrderId (\ s a -> s{_oaOrderId = a})
instance GoogleRequest OrdersAcknowledge where
type Rs OrdersAcknowledge = OrdersAcknowledgeResponse
type Scopes OrdersAcknowledge =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersAcknowledge'{..}
= go _oaMerchantId _oaOrderId (Just AltJSON)
_oaPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersAcknowledgeResource)
mempty