{-# 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.Createtestreturn
(
OrdersCreatetestreturnResource
, ordersCreatetestreturn
, OrdersCreatetestreturn
, occMerchantId
, occPayload
, occOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersCreatetestreturnResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
"testreturn" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersCreateTestReturnRequest :>
Post '[JSON] OrdersCreateTestReturnResponse
data OrdersCreatetestreturn = OrdersCreatetestreturn'
{ _occMerchantId :: !(Textual Word64)
, _occPayload :: !OrdersCreateTestReturnRequest
, _occOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCreatetestreturn
:: Word64
-> OrdersCreateTestReturnRequest
-> Text
-> OrdersCreatetestreturn
ordersCreatetestreturn pOccMerchantId_ pOccPayload_ pOccOrderId_ =
OrdersCreatetestreturn'
{ _occMerchantId = _Coerce # pOccMerchantId_
, _occPayload = pOccPayload_
, _occOrderId = pOccOrderId_
}
occMerchantId :: Lens' OrdersCreatetestreturn Word64
occMerchantId
= lens _occMerchantId
(\ s a -> s{_occMerchantId = a})
. _Coerce
occPayload :: Lens' OrdersCreatetestreturn OrdersCreateTestReturnRequest
occPayload
= lens _occPayload (\ s a -> s{_occPayload = a})
occOrderId :: Lens' OrdersCreatetestreturn Text
occOrderId
= lens _occOrderId (\ s a -> s{_occOrderId = a})
instance GoogleRequest OrdersCreatetestreturn where
type Rs OrdersCreatetestreturn =
OrdersCreateTestReturnResponse
type Scopes OrdersCreatetestreturn =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersCreatetestreturn'{..}
= go _occMerchantId _occOrderId (Just AltJSON)
_occPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersCreatetestreturnResource)
mempty