{-# 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.Cancellineitem
(
OrdersCancellineitemResource
, ordersCancellineitem
, OrdersCancellineitem
, oc1MerchantId
, oc1Payload
, oc1OrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersCancellineitemResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
"cancelLineItem" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersCancelLineItemRequest :>
Post '[JSON] OrdersCancelLineItemResponse
data OrdersCancellineitem = OrdersCancellineitem'
{ _oc1MerchantId :: !(Textual Word64)
, _oc1Payload :: !OrdersCancelLineItemRequest
, _oc1OrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCancellineitem
:: Word64
-> OrdersCancelLineItemRequest
-> Text
-> OrdersCancellineitem
ordersCancellineitem pOc1MerchantId_ pOc1Payload_ pOc1OrderId_ =
OrdersCancellineitem'
{ _oc1MerchantId = _Coerce # pOc1MerchantId_
, _oc1Payload = pOc1Payload_
, _oc1OrderId = pOc1OrderId_
}
oc1MerchantId :: Lens' OrdersCancellineitem Word64
oc1MerchantId
= lens _oc1MerchantId
(\ s a -> s{_oc1MerchantId = a})
. _Coerce
oc1Payload :: Lens' OrdersCancellineitem OrdersCancelLineItemRequest
oc1Payload
= lens _oc1Payload (\ s a -> s{_oc1Payload = a})
oc1OrderId :: Lens' OrdersCancellineitem Text
oc1OrderId
= lens _oc1OrderId (\ s a -> s{_oc1OrderId = a})
instance GoogleRequest OrdersCancellineitem where
type Rs OrdersCancellineitem =
OrdersCancelLineItemResponse
type Scopes OrdersCancellineitem =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersCancellineitem'{..}
= go _oc1MerchantId _oc1OrderId (Just AltJSON)
_oc1Payload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersCancellineitemResource)
mempty