{-# 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.Rejectreturnlineitem
(
OrdersRejectreturnlineitemResource
, ordersRejectreturnlineitem
, OrdersRejectreturnlineitem
, orrMerchantId
, orrPayload
, orrOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersRejectreturnlineitemResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
"rejectReturnLineItem" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersRejectReturnLineItemRequest :>
Post '[JSON] OrdersRejectReturnLineItemResponse
data OrdersRejectreturnlineitem = OrdersRejectreturnlineitem'
{ _orrMerchantId :: !(Textual Word64)
, _orrPayload :: !OrdersRejectReturnLineItemRequest
, _orrOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersRejectreturnlineitem
:: Word64
-> OrdersRejectReturnLineItemRequest
-> Text
-> OrdersRejectreturnlineitem
ordersRejectreturnlineitem pOrrMerchantId_ pOrrPayload_ pOrrOrderId_ =
OrdersRejectreturnlineitem'
{ _orrMerchantId = _Coerce # pOrrMerchantId_
, _orrPayload = pOrrPayload_
, _orrOrderId = pOrrOrderId_
}
orrMerchantId :: Lens' OrdersRejectreturnlineitem Word64
orrMerchantId
= lens _orrMerchantId
(\ s a -> s{_orrMerchantId = a})
. _Coerce
orrPayload :: Lens' OrdersRejectreturnlineitem OrdersRejectReturnLineItemRequest
orrPayload
= lens _orrPayload (\ s a -> s{_orrPayload = a})
orrOrderId :: Lens' OrdersRejectreturnlineitem Text
orrOrderId
= lens _orrOrderId (\ s a -> s{_orrOrderId = a})
instance GoogleRequest OrdersRejectreturnlineitem
where
type Rs OrdersRejectreturnlineitem =
OrdersRejectReturnLineItemResponse
type Scopes OrdersRejectreturnlineitem =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersRejectreturnlineitem'{..}
= go _orrMerchantId _orrOrderId (Just AltJSON)
_orrPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersRejectreturnlineitemResource)
mempty