{-# 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.GettestOrdertemplate
(
OrdersGettestOrdertemplateResource
, ordersGettestOrdertemplate
, OrdersGettestOrdertemplate
, ogoMerchantId
, ogoTemplateName
, ogoCountry
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersGettestOrdertemplateResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"testordertemplates" :>
Capture "templateName"
OrdersGettestOrdertemplateTemplateName
:>
QueryParam "country" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] OrdersGetTestOrderTemplateResponse
data OrdersGettestOrdertemplate = OrdersGettestOrdertemplate'
{ _ogoMerchantId :: !(Textual Word64)
, _ogoTemplateName :: !OrdersGettestOrdertemplateTemplateName
, _ogoCountry :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersGettestOrdertemplate
:: Word64
-> OrdersGettestOrdertemplateTemplateName
-> OrdersGettestOrdertemplate
ordersGettestOrdertemplate pOgoMerchantId_ pOgoTemplateName_ =
OrdersGettestOrdertemplate'
{ _ogoMerchantId = _Coerce # pOgoMerchantId_
, _ogoTemplateName = pOgoTemplateName_
, _ogoCountry = Nothing
}
ogoMerchantId :: Lens' OrdersGettestOrdertemplate Word64
ogoMerchantId
= lens _ogoMerchantId
(\ s a -> s{_ogoMerchantId = a})
. _Coerce
ogoTemplateName :: Lens' OrdersGettestOrdertemplate OrdersGettestOrdertemplateTemplateName
ogoTemplateName
= lens _ogoTemplateName
(\ s a -> s{_ogoTemplateName = a})
ogoCountry :: Lens' OrdersGettestOrdertemplate (Maybe Text)
ogoCountry
= lens _ogoCountry (\ s a -> s{_ogoCountry = a})
instance GoogleRequest OrdersGettestOrdertemplate
where
type Rs OrdersGettestOrdertemplate =
OrdersGetTestOrderTemplateResponse
type Scopes OrdersGettestOrdertemplate =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersGettestOrdertemplate'{..}
= go _ogoMerchantId _ogoTemplateName _ogoCountry
(Just AltJSON)
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersGettestOrdertemplateResource)
mempty