{-# 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.AdvancetestOrder
(
OrdersAdvancetestOrderResource
, ordersAdvancetestOrder
, OrdersAdvancetestOrder
, oaoMerchantId
, oaoOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersAdvancetestOrderResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"testorders" :>
Capture "orderId" Text :>
"advance" :>
QueryParam "alt" AltJSON :>
Post '[JSON] OrdersAdvanceTestOrderResponse
data OrdersAdvancetestOrder = OrdersAdvancetestOrder'
{ _oaoMerchantId :: !(Textual Word64)
, _oaoOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersAdvancetestOrder
:: Word64
-> Text
-> OrdersAdvancetestOrder
ordersAdvancetestOrder pOaoMerchantId_ pOaoOrderId_ =
OrdersAdvancetestOrder'
{ _oaoMerchantId = _Coerce # pOaoMerchantId_
, _oaoOrderId = pOaoOrderId_
}
oaoMerchantId :: Lens' OrdersAdvancetestOrder Word64
oaoMerchantId
= lens _oaoMerchantId
(\ s a -> s{_oaoMerchantId = a})
. _Coerce
oaoOrderId :: Lens' OrdersAdvancetestOrder Text
oaoOrderId
= lens _oaoOrderId (\ s a -> s{_oaoOrderId = a})
instance GoogleRequest OrdersAdvancetestOrder where
type Rs OrdersAdvancetestOrder =
OrdersAdvanceTestOrderResponse
type Scopes OrdersAdvancetestOrder =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersAdvancetestOrder'{..}
= go _oaoMerchantId _oaoOrderId (Just AltJSON)
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersAdvancetestOrderResource)
mempty