{-# 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.Instorerefundlineitem
(
OrdersInstorerefundlineitemResource
, ordersInstorerefundlineitem
, OrdersInstorerefundlineitem
, oiMerchantId
, oiPayload
, oiOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersInstorerefundlineitemResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
"inStoreRefundLineItem" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersInStoreRefundLineItemRequest :>
Post '[JSON] OrdersInStoreRefundLineItemResponse
data OrdersInstorerefundlineitem = OrdersInstorerefundlineitem'
{ _oiMerchantId :: !(Textual Word64)
, _oiPayload :: !OrdersInStoreRefundLineItemRequest
, _oiOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersInstorerefundlineitem
:: Word64
-> OrdersInStoreRefundLineItemRequest
-> Text
-> OrdersInstorerefundlineitem
ordersInstorerefundlineitem pOiMerchantId_ pOiPayload_ pOiOrderId_ =
OrdersInstorerefundlineitem'
{ _oiMerchantId = _Coerce # pOiMerchantId_
, _oiPayload = pOiPayload_
, _oiOrderId = pOiOrderId_
}
oiMerchantId :: Lens' OrdersInstorerefundlineitem Word64
oiMerchantId
= lens _oiMerchantId (\ s a -> s{_oiMerchantId = a})
. _Coerce
oiPayload :: Lens' OrdersInstorerefundlineitem OrdersInStoreRefundLineItemRequest
oiPayload
= lens _oiPayload (\ s a -> s{_oiPayload = a})
oiOrderId :: Lens' OrdersInstorerefundlineitem Text
oiOrderId
= lens _oiOrderId (\ s a -> s{_oiOrderId = a})
instance GoogleRequest OrdersInstorerefundlineitem
where
type Rs OrdersInstorerefundlineitem =
OrdersInStoreRefundLineItemResponse
type Scopes OrdersInstorerefundlineitem =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersInstorerefundlineitem'{..}
= go _oiMerchantId _oiOrderId (Just AltJSON)
_oiPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersInstorerefundlineitemResource)
mempty