{-# 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.Setlineitemmetadata
(
OrdersSetlineitemmetadataResource
, ordersSetlineitemmetadata
, OrdersSetlineitemmetadata
, ossMerchantId
, ossPayload
, ossOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersSetlineitemmetadataResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
"setLineItemMetadata" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersSetLineItemMetadataRequest :>
Post '[JSON] OrdersSetLineItemMetadataResponse
data OrdersSetlineitemmetadata = OrdersSetlineitemmetadata'
{ _ossMerchantId :: !(Textual Word64)
, _ossPayload :: !OrdersSetLineItemMetadataRequest
, _ossOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersSetlineitemmetadata
:: Word64
-> OrdersSetLineItemMetadataRequest
-> Text
-> OrdersSetlineitemmetadata
ordersSetlineitemmetadata pOssMerchantId_ pOssPayload_ pOssOrderId_ =
OrdersSetlineitemmetadata'
{ _ossMerchantId = _Coerce # pOssMerchantId_
, _ossPayload = pOssPayload_
, _ossOrderId = pOssOrderId_
}
ossMerchantId :: Lens' OrdersSetlineitemmetadata Word64
ossMerchantId
= lens _ossMerchantId
(\ s a -> s{_ossMerchantId = a})
. _Coerce
ossPayload :: Lens' OrdersSetlineitemmetadata OrdersSetLineItemMetadataRequest
ossPayload
= lens _ossPayload (\ s a -> s{_ossPayload = a})
ossOrderId :: Lens' OrdersSetlineitemmetadata Text
ossOrderId
= lens _ossOrderId (\ s a -> s{_ossOrderId = a})
instance GoogleRequest OrdersSetlineitemmetadata
where
type Rs OrdersSetlineitemmetadata =
OrdersSetLineItemMetadataResponse
type Scopes OrdersSetlineitemmetadata =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersSetlineitemmetadata'{..}
= go _ossMerchantId _ossOrderId (Just AltJSON)
_ossPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersSetlineitemmetadataResource)
mempty