{-# 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.List
(
OrdersListResource
, ordersList
, OrdersList
, ollPlacedDateEnd
, ollMerchantId
, ollOrderBy
, ollAcknowledged
, ollStatuses
, ollPageToken
, ollPlacedDateStart
, ollMaxResults
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersListResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
QueryParam "placedDateEnd" Text :>
QueryParam "orderBy" OrdersListOrderBy :>
QueryParam "acknowledged" Bool :>
QueryParams "statuses" OrdersListStatuses :>
QueryParam "pageToken" Text :>
QueryParam "placedDateStart" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] OrdersListResponse
data OrdersList = OrdersList'
{ _ollPlacedDateEnd :: !(Maybe Text)
, _ollMerchantId :: !(Textual Word64)
, _ollOrderBy :: !(Maybe OrdersListOrderBy)
, _ollAcknowledged :: !(Maybe Bool)
, _ollStatuses :: !(Maybe [OrdersListStatuses])
, _ollPageToken :: !(Maybe Text)
, _ollPlacedDateStart :: !(Maybe Text)
, _ollMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
ordersList
:: Word64
-> OrdersList
ordersList pOllMerchantId_ =
OrdersList'
{ _ollPlacedDateEnd = Nothing
, _ollMerchantId = _Coerce # pOllMerchantId_
, _ollOrderBy = Nothing
, _ollAcknowledged = Nothing
, _ollStatuses = Nothing
, _ollPageToken = Nothing
, _ollPlacedDateStart = Nothing
, _ollMaxResults = Nothing
}
ollPlacedDateEnd :: Lens' OrdersList (Maybe Text)
ollPlacedDateEnd
= lens _ollPlacedDateEnd
(\ s a -> s{_ollPlacedDateEnd = a})
ollMerchantId :: Lens' OrdersList Word64
ollMerchantId
= lens _ollMerchantId
(\ s a -> s{_ollMerchantId = a})
. _Coerce
ollOrderBy :: Lens' OrdersList (Maybe OrdersListOrderBy)
ollOrderBy
= lens _ollOrderBy (\ s a -> s{_ollOrderBy = a})
ollAcknowledged :: Lens' OrdersList (Maybe Bool)
ollAcknowledged
= lens _ollAcknowledged
(\ s a -> s{_ollAcknowledged = a})
ollStatuses :: Lens' OrdersList [OrdersListStatuses]
ollStatuses
= lens _ollStatuses (\ s a -> s{_ollStatuses = a}) .
_Default
. _Coerce
ollPageToken :: Lens' OrdersList (Maybe Text)
ollPageToken
= lens _ollPageToken (\ s a -> s{_ollPageToken = a})
ollPlacedDateStart :: Lens' OrdersList (Maybe Text)
ollPlacedDateStart
= lens _ollPlacedDateStart
(\ s a -> s{_ollPlacedDateStart = a})
ollMaxResults :: Lens' OrdersList (Maybe Word32)
ollMaxResults
= lens _ollMaxResults
(\ s a -> s{_ollMaxResults = a})
. mapping _Coerce
instance GoogleRequest OrdersList where
type Rs OrdersList = OrdersListResponse
type Scopes OrdersList =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersList'{..}
= go _ollMerchantId _ollPlacedDateEnd _ollOrderBy
_ollAcknowledged
(_ollStatuses ^. _Default)
_ollPageToken
_ollPlacedDateStart
_ollMaxResults
(Just AltJSON)
shoppingContentService
where go
= buildClient (Proxy :: Proxy OrdersListResource)
mempty