{-# 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.Get
(
OrdersGetResource
, ordersGet
, OrdersGet
, ogMerchantId
, ogOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersGetResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Order
data OrdersGet = OrdersGet'
{ _ogMerchantId :: !(Textual Word64)
, _ogOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersGet
:: Word64
-> Text
-> OrdersGet
ordersGet pOgMerchantId_ pOgOrderId_ =
OrdersGet'
{ _ogMerchantId = _Coerce # pOgMerchantId_
, _ogOrderId = pOgOrderId_
}
ogMerchantId :: Lens' OrdersGet Word64
ogMerchantId
= lens _ogMerchantId (\ s a -> s{_ogMerchantId = a})
. _Coerce
ogOrderId :: Lens' OrdersGet Text
ogOrderId
= lens _ogOrderId (\ s a -> s{_ogOrderId = a})
instance GoogleRequest OrdersGet where
type Rs OrdersGet = Order
type Scopes OrdersGet =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersGet'{..}
= go _ogMerchantId _ogOrderId (Just AltJSON)
shoppingContentService
where go
= buildClient (Proxy :: Proxy OrdersGetResource)
mempty