{-# 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.Returnrefundlineitem
(
OrdersReturnrefundlineitemResource
, ordersReturnrefundlineitem
, OrdersReturnrefundlineitem
, orMerchantId
, orPayload
, orOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersReturnrefundlineitemResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
"returnRefundLineItem" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersReturnRefundLineItemRequest :>
Post '[JSON] OrdersReturnRefundLineItemResponse
data OrdersReturnrefundlineitem = OrdersReturnrefundlineitem'
{ _orMerchantId :: !(Textual Word64)
, _orPayload :: !OrdersReturnRefundLineItemRequest
, _orOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersReturnrefundlineitem
:: Word64
-> OrdersReturnRefundLineItemRequest
-> Text
-> OrdersReturnrefundlineitem
ordersReturnrefundlineitem pOrMerchantId_ pOrPayload_ pOrOrderId_ =
OrdersReturnrefundlineitem'
{ _orMerchantId = _Coerce # pOrMerchantId_
, _orPayload = pOrPayload_
, _orOrderId = pOrOrderId_
}
orMerchantId :: Lens' OrdersReturnrefundlineitem Word64
orMerchantId
= lens _orMerchantId (\ s a -> s{_orMerchantId = a})
. _Coerce
orPayload :: Lens' OrdersReturnrefundlineitem OrdersReturnRefundLineItemRequest
orPayload
= lens _orPayload (\ s a -> s{_orPayload = a})
orOrderId :: Lens' OrdersReturnrefundlineitem Text
orOrderId
= lens _orOrderId (\ s a -> s{_orOrderId = a})
instance GoogleRequest OrdersReturnrefundlineitem
where
type Rs OrdersReturnrefundlineitem =
OrdersReturnRefundLineItemResponse
type Scopes OrdersReturnrefundlineitem =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersReturnrefundlineitem'{..}
= go _orMerchantId _orOrderId (Just AltJSON)
_orPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersReturnrefundlineitemResource)
mempty