{-# 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.GetbymerchantOrderid
(
OrdersGetbymerchantOrderidResource
, ordersGetbymerchantOrderid
, OrdersGetbymerchantOrderid
, ogogMerchantId
, ogogMerchantOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersGetbymerchantOrderidResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"ordersbymerchantid" :>
Capture "merchantOrderId" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] OrdersGetByMerchantOrderIdResponse
data OrdersGetbymerchantOrderid = OrdersGetbymerchantOrderid'
{ _ogogMerchantId :: !(Textual Word64)
, _ogogMerchantOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersGetbymerchantOrderid
:: Word64
-> Text
-> OrdersGetbymerchantOrderid
ordersGetbymerchantOrderid pOgogMerchantId_ pOgogMerchantOrderId_ =
OrdersGetbymerchantOrderid'
{ _ogogMerchantId = _Coerce # pOgogMerchantId_
, _ogogMerchantOrderId = pOgogMerchantOrderId_
}
ogogMerchantId :: Lens' OrdersGetbymerchantOrderid Word64
ogogMerchantId
= lens _ogogMerchantId
(\ s a -> s{_ogogMerchantId = a})
. _Coerce
ogogMerchantOrderId :: Lens' OrdersGetbymerchantOrderid Text
ogogMerchantOrderId
= lens _ogogMerchantOrderId
(\ s a -> s{_ogogMerchantOrderId = a})
instance GoogleRequest OrdersGetbymerchantOrderid
where
type Rs OrdersGetbymerchantOrderid =
OrdersGetByMerchantOrderIdResponse
type Scopes OrdersGetbymerchantOrderid =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersGetbymerchantOrderid'{..}
= go _ogogMerchantId _ogogMerchantOrderId
(Just AltJSON)
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersGetbymerchantOrderidResource)
mempty