{-# 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.UpdatemerchantOrderid
(
OrdersUpdatemerchantOrderidResource
, ordersUpdatemerchantOrderid
, OrdersUpdatemerchantOrderid
, ouoMerchantId
, ouoPayload
, ouoOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersUpdatemerchantOrderidResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
"updateMerchantOrderId" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersUpdateMerchantOrderIdRequest :>
Post '[JSON] OrdersUpdateMerchantOrderIdResponse
data OrdersUpdatemerchantOrderid = OrdersUpdatemerchantOrderid'
{ _ouoMerchantId :: !(Textual Word64)
, _ouoPayload :: !OrdersUpdateMerchantOrderIdRequest
, _ouoOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersUpdatemerchantOrderid
:: Word64
-> OrdersUpdateMerchantOrderIdRequest
-> Text
-> OrdersUpdatemerchantOrderid
ordersUpdatemerchantOrderid pOuoMerchantId_ pOuoPayload_ pOuoOrderId_ =
OrdersUpdatemerchantOrderid'
{ _ouoMerchantId = _Coerce # pOuoMerchantId_
, _ouoPayload = pOuoPayload_
, _ouoOrderId = pOuoOrderId_
}
ouoMerchantId :: Lens' OrdersUpdatemerchantOrderid Word64
ouoMerchantId
= lens _ouoMerchantId
(\ s a -> s{_ouoMerchantId = a})
. _Coerce
ouoPayload :: Lens' OrdersUpdatemerchantOrderid OrdersUpdateMerchantOrderIdRequest
ouoPayload
= lens _ouoPayload (\ s a -> s{_ouoPayload = a})
ouoOrderId :: Lens' OrdersUpdatemerchantOrderid Text
ouoOrderId
= lens _ouoOrderId (\ s a -> s{_ouoOrderId = a})
instance GoogleRequest OrdersUpdatemerchantOrderid
where
type Rs OrdersUpdatemerchantOrderid =
OrdersUpdateMerchantOrderIdResponse
type Scopes OrdersUpdatemerchantOrderid =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersUpdatemerchantOrderid'{..}
= go _ouoMerchantId _ouoOrderId (Just AltJSON)
_ouoPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersUpdatemerchantOrderidResource)
mempty