{-# 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.CreatetestOrder
(
OrdersCreatetestOrderResource
, ordersCreatetestOrder
, OrdersCreatetestOrder
, ococMerchantId
, ococPayload
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersCreatetestOrderResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"testorders" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersCreateTestOrderRequest :>
Post '[JSON] OrdersCreateTestOrderResponse
data OrdersCreatetestOrder = OrdersCreatetestOrder'
{ _ococMerchantId :: !(Textual Word64)
, _ococPayload :: !OrdersCreateTestOrderRequest
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCreatetestOrder
:: Word64
-> OrdersCreateTestOrderRequest
-> OrdersCreatetestOrder
ordersCreatetestOrder pOcocMerchantId_ pOcocPayload_ =
OrdersCreatetestOrder'
{ _ococMerchantId = _Coerce # pOcocMerchantId_
, _ococPayload = pOcocPayload_
}
ococMerchantId :: Lens' OrdersCreatetestOrder Word64
ococMerchantId
= lens _ococMerchantId
(\ s a -> s{_ococMerchantId = a})
. _Coerce
ococPayload :: Lens' OrdersCreatetestOrder OrdersCreateTestOrderRequest
ococPayload
= lens _ococPayload (\ s a -> s{_ococPayload = a})
instance GoogleRequest OrdersCreatetestOrder where
type Rs OrdersCreatetestOrder =
OrdersCreateTestOrderResponse
type Scopes OrdersCreatetestOrder =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersCreatetestOrder'{..}
= go _ococMerchantId (Just AltJSON) _ococPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersCreatetestOrderResource)
mempty