{-# 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.CanceltestOrderbycustomer
(
OrdersCanceltestOrderbycustomerResource
, ordersCanceltestOrderbycustomer
, OrdersCanceltestOrderbycustomer
, ocoMerchantId
, ocoPayload
, ocoOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersCanceltestOrderbycustomerResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"testorders" :>
Capture "orderId" Text :>
"cancelByCustomer" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
OrdersCancelTestOrderByCustomerRequest
:>
Post '[JSON] OrdersCancelTestOrderByCustomerResponse
data OrdersCanceltestOrderbycustomer = OrdersCanceltestOrderbycustomer'
{ _ocoMerchantId :: !(Textual Word64)
, _ocoPayload :: !OrdersCancelTestOrderByCustomerRequest
, _ocoOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCanceltestOrderbycustomer
:: Word64
-> OrdersCancelTestOrderByCustomerRequest
-> Text
-> OrdersCanceltestOrderbycustomer
ordersCanceltestOrderbycustomer pOcoMerchantId_ pOcoPayload_ pOcoOrderId_ =
OrdersCanceltestOrderbycustomer'
{ _ocoMerchantId = _Coerce # pOcoMerchantId_
, _ocoPayload = pOcoPayload_
, _ocoOrderId = pOcoOrderId_
}
ocoMerchantId :: Lens' OrdersCanceltestOrderbycustomer Word64
ocoMerchantId
= lens _ocoMerchantId
(\ s a -> s{_ocoMerchantId = a})
. _Coerce
ocoPayload :: Lens' OrdersCanceltestOrderbycustomer OrdersCancelTestOrderByCustomerRequest
ocoPayload
= lens _ocoPayload (\ s a -> s{_ocoPayload = a})
ocoOrderId :: Lens' OrdersCanceltestOrderbycustomer Text
ocoOrderId
= lens _ocoOrderId (\ s a -> s{_ocoOrderId = a})
instance GoogleRequest
OrdersCanceltestOrderbycustomer where
type Rs OrdersCanceltestOrderbycustomer =
OrdersCancelTestOrderByCustomerResponse
type Scopes OrdersCanceltestOrderbycustomer =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersCanceltestOrderbycustomer'{..}
= go _ocoMerchantId _ocoOrderId (Just AltJSON)
_ocoPayload
shoppingContentService
where go
= buildClient
(Proxy ::
Proxy OrdersCanceltestOrderbycustomerResource)
mempty