module Network.Google.Resource.Content.Accounttax.Update
(
AccounttaxUpdateResource
, accounttaxUpdate
, AccounttaxUpdate
, auuMerchantId
, auuPayload
, auuAccountId
, auuDryRun
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type AccounttaxUpdateResource =
"content" :>
"v2" :>
Capture "merchantId" (Textual Word64) :>
"accounttax" :>
Capture "accountId" (Textual Word64) :>
QueryParam "dryRun" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccountTax :> Put '[JSON] AccountTax
data AccounttaxUpdate = AccounttaxUpdate'
{ _auuMerchantId :: !(Textual Word64)
, _auuPayload :: !AccountTax
, _auuAccountId :: !(Textual Word64)
, _auuDryRun :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
accounttaxUpdate
:: Word64
-> AccountTax
-> Word64
-> AccounttaxUpdate
accounttaxUpdate pAuuMerchantId_ pAuuPayload_ pAuuAccountId_ =
AccounttaxUpdate'
{ _auuMerchantId = _Coerce # pAuuMerchantId_
, _auuPayload = pAuuPayload_
, _auuAccountId = _Coerce # pAuuAccountId_
, _auuDryRun = Nothing
}
auuMerchantId :: Lens' AccounttaxUpdate Word64
auuMerchantId
= lens _auuMerchantId
(\ s a -> s{_auuMerchantId = a})
. _Coerce
auuPayload :: Lens' AccounttaxUpdate AccountTax
auuPayload
= lens _auuPayload (\ s a -> s{_auuPayload = a})
auuAccountId :: Lens' AccounttaxUpdate Word64
auuAccountId
= lens _auuAccountId (\ s a -> s{_auuAccountId = a})
. _Coerce
auuDryRun :: Lens' AccounttaxUpdate (Maybe Bool)
auuDryRun
= lens _auuDryRun (\ s a -> s{_auuDryRun = a})
instance GoogleRequest AccounttaxUpdate where
type Rs AccounttaxUpdate = AccountTax
type Scopes AccounttaxUpdate =
'["https://www.googleapis.com/auth/content"]
requestClient AccounttaxUpdate'{..}
= go _auuMerchantId _auuAccountId _auuDryRun
(Just AltJSON)
_auuPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy AccounttaxUpdateResource)
mempty