{-# 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.Books.PromoOffer.Accept
(
PromoOfferAcceptResource
, promoOfferAccept
, PromoOfferAccept
, poaManufacturer
, poaSerial
, poaDevice
, poaModel
, poaVolumeId
, poaOfferId
, poaProduct
, poaAndroidId
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type PromoOfferAcceptResource =
"books" :>
"v1" :>
"promooffer" :>
"accept" :>
QueryParam "manufacturer" Text :>
QueryParam "serial" Text :>
QueryParam "device" Text :>
QueryParam "model" Text :>
QueryParam "volumeId" Text :>
QueryParam "offerId" Text :>
QueryParam "product" Text :>
QueryParam "androidId" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data PromoOfferAccept = PromoOfferAccept'
{ _poaManufacturer :: !(Maybe Text)
, _poaSerial :: !(Maybe Text)
, _poaDevice :: !(Maybe Text)
, _poaModel :: !(Maybe Text)
, _poaVolumeId :: !(Maybe Text)
, _poaOfferId :: !(Maybe Text)
, _poaProduct :: !(Maybe Text)
, _poaAndroidId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
promoOfferAccept
:: PromoOfferAccept
promoOfferAccept =
PromoOfferAccept'
{ _poaManufacturer = Nothing
, _poaSerial = Nothing
, _poaDevice = Nothing
, _poaModel = Nothing
, _poaVolumeId = Nothing
, _poaOfferId = Nothing
, _poaProduct = Nothing
, _poaAndroidId = Nothing
}
poaManufacturer :: Lens' PromoOfferAccept (Maybe Text)
poaManufacturer
= lens _poaManufacturer
(\ s a -> s{_poaManufacturer = a})
poaSerial :: Lens' PromoOfferAccept (Maybe Text)
poaSerial
= lens _poaSerial (\ s a -> s{_poaSerial = a})
poaDevice :: Lens' PromoOfferAccept (Maybe Text)
poaDevice
= lens _poaDevice (\ s a -> s{_poaDevice = a})
poaModel :: Lens' PromoOfferAccept (Maybe Text)
poaModel = lens _poaModel (\ s a -> s{_poaModel = a})
poaVolumeId :: Lens' PromoOfferAccept (Maybe Text)
poaVolumeId
= lens _poaVolumeId (\ s a -> s{_poaVolumeId = a})
poaOfferId :: Lens' PromoOfferAccept (Maybe Text)
poaOfferId
= lens _poaOfferId (\ s a -> s{_poaOfferId = a})
poaProduct :: Lens' PromoOfferAccept (Maybe Text)
poaProduct
= lens _poaProduct (\ s a -> s{_poaProduct = a})
poaAndroidId :: Lens' PromoOfferAccept (Maybe Text)
poaAndroidId
= lens _poaAndroidId (\ s a -> s{_poaAndroidId = a})
instance GoogleRequest PromoOfferAccept where
type Rs PromoOfferAccept = ()
type Scopes PromoOfferAccept =
'["https://www.googleapis.com/auth/books"]
requestClient PromoOfferAccept'{..}
= go _poaManufacturer _poaSerial _poaDevice _poaModel
_poaVolumeId
_poaOfferId
_poaProduct
_poaAndroidId
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy PromoOfferAcceptResource)
mempty