{-# 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.Orderreports.Listdisbursements
(
OrderreportsListdisbursementsResource
, orderreportsListdisbursements
, OrderreportsListdisbursements
, olDisbursementEndDate
, olMerchantId
, olPageToken
, olDisbursementStartDate
, olMaxResults
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrderreportsListdisbursementsResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orderreports" :>
"disbursements" :>
QueryParam "disbursementStartDate" Text :>
QueryParam "disbursementEndDate" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] OrderreportsListDisbursementsResponse
data OrderreportsListdisbursements = OrderreportsListdisbursements'
{ _olDisbursementEndDate :: !(Maybe Text)
, _olMerchantId :: !(Textual Word64)
, _olPageToken :: !(Maybe Text)
, _olDisbursementStartDate :: !Text
, _olMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
orderreportsListdisbursements
:: Word64
-> Text
-> OrderreportsListdisbursements
orderreportsListdisbursements pOlMerchantId_ pOlDisbursementStartDate_ =
OrderreportsListdisbursements'
{ _olDisbursementEndDate = Nothing
, _olMerchantId = _Coerce # pOlMerchantId_
, _olPageToken = Nothing
, _olDisbursementStartDate = pOlDisbursementStartDate_
, _olMaxResults = Nothing
}
olDisbursementEndDate :: Lens' OrderreportsListdisbursements (Maybe Text)
olDisbursementEndDate
= lens _olDisbursementEndDate
(\ s a -> s{_olDisbursementEndDate = a})
olMerchantId :: Lens' OrderreportsListdisbursements Word64
olMerchantId
= lens _olMerchantId (\ s a -> s{_olMerchantId = a})
. _Coerce
olPageToken :: Lens' OrderreportsListdisbursements (Maybe Text)
olPageToken
= lens _olPageToken (\ s a -> s{_olPageToken = a})
olDisbursementStartDate :: Lens' OrderreportsListdisbursements Text
olDisbursementStartDate
= lens _olDisbursementStartDate
(\ s a -> s{_olDisbursementStartDate = a})
olMaxResults :: Lens' OrderreportsListdisbursements (Maybe Word32)
olMaxResults
= lens _olMaxResults (\ s a -> s{_olMaxResults = a})
. mapping _Coerce
instance GoogleRequest OrderreportsListdisbursements
where
type Rs OrderreportsListdisbursements =
OrderreportsListDisbursementsResponse
type Scopes OrderreportsListdisbursements =
'["https://www.googleapis.com/auth/content"]
requestClient OrderreportsListdisbursements'{..}
= go _olMerchantId (Just _olDisbursementStartDate)
_olDisbursementEndDate
_olPageToken
_olMaxResults
(Just AltJSON)
shoppingContentService
where go
= buildClient
(Proxy ::
Proxy OrderreportsListdisbursementsResource)
mempty