{-# 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.Listtransactions
(
OrderreportsListtransactionsResource
, orderreportsListtransactions
, OrderreportsListtransactions
, olsMerchantId
, olsDisbursementId
, olsTransactionStartDate
, olsTransactionEndDate
, olsPageToken
, olsMaxResults
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrderreportsListtransactionsResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orderreports" :>
"disbursements" :>
Capture "disbursementId" Text :>
"transactions" :>
QueryParam "transactionStartDate" Text :>
QueryParam "transactionEndDate" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] OrderreportsListTransactionsResponse
data OrderreportsListtransactions = OrderreportsListtransactions'
{ _olsMerchantId :: !(Textual Word64)
, _olsDisbursementId :: !Text
, _olsTransactionStartDate :: !Text
, _olsTransactionEndDate :: !(Maybe Text)
, _olsPageToken :: !(Maybe Text)
, _olsMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
orderreportsListtransactions
:: Word64
-> Text
-> Text
-> OrderreportsListtransactions
orderreportsListtransactions pOlsMerchantId_ pOlsDisbursementId_ pOlsTransactionStartDate_ =
OrderreportsListtransactions'
{ _olsMerchantId = _Coerce # pOlsMerchantId_
, _olsDisbursementId = pOlsDisbursementId_
, _olsTransactionStartDate = pOlsTransactionStartDate_
, _olsTransactionEndDate = Nothing
, _olsPageToken = Nothing
, _olsMaxResults = Nothing
}
olsMerchantId :: Lens' OrderreportsListtransactions Word64
olsMerchantId
= lens _olsMerchantId
(\ s a -> s{_olsMerchantId = a})
. _Coerce
olsDisbursementId :: Lens' OrderreportsListtransactions Text
olsDisbursementId
= lens _olsDisbursementId
(\ s a -> s{_olsDisbursementId = a})
olsTransactionStartDate :: Lens' OrderreportsListtransactions Text
olsTransactionStartDate
= lens _olsTransactionStartDate
(\ s a -> s{_olsTransactionStartDate = a})
olsTransactionEndDate :: Lens' OrderreportsListtransactions (Maybe Text)
olsTransactionEndDate
= lens _olsTransactionEndDate
(\ s a -> s{_olsTransactionEndDate = a})
olsPageToken :: Lens' OrderreportsListtransactions (Maybe Text)
olsPageToken
= lens _olsPageToken (\ s a -> s{_olsPageToken = a})
olsMaxResults :: Lens' OrderreportsListtransactions (Maybe Word32)
olsMaxResults
= lens _olsMaxResults
(\ s a -> s{_olsMaxResults = a})
. mapping _Coerce
instance GoogleRequest OrderreportsListtransactions
where
type Rs OrderreportsListtransactions =
OrderreportsListTransactionsResponse
type Scopes OrderreportsListtransactions =
'["https://www.googleapis.com/auth/content"]
requestClient OrderreportsListtransactions'{..}
= go _olsMerchantId _olsDisbursementId
(Just _olsTransactionStartDate)
_olsTransactionEndDate
_olsPageToken
_olsMaxResults
(Just AltJSON)
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrderreportsListtransactionsResource)
mempty