{-# 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.Accounttax.Update
(
AccounttaxUpdateResource
, accounttaxUpdate
, AccounttaxUpdate
, auMerchantId
, auPayload
, auAccountId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type AccounttaxUpdateResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"accounttax" :>
Capture "accountId" (Textual Word64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccountTax :> Put '[JSON] AccountTax
data AccounttaxUpdate = AccounttaxUpdate'
{ _auMerchantId :: !(Textual Word64)
, _auPayload :: !AccountTax
, _auAccountId :: !(Textual Word64)
} deriving (Eq,Show,Data,Typeable,Generic)
accounttaxUpdate
:: Word64
-> AccountTax
-> Word64
-> AccounttaxUpdate
accounttaxUpdate pAuMerchantId_ pAuPayload_ pAuAccountId_ =
AccounttaxUpdate'
{ _auMerchantId = _Coerce # pAuMerchantId_
, _auPayload = pAuPayload_
, _auAccountId = _Coerce # pAuAccountId_
}
auMerchantId :: Lens' AccounttaxUpdate Word64
auMerchantId
= lens _auMerchantId (\ s a -> s{_auMerchantId = a})
. _Coerce
auPayload :: Lens' AccounttaxUpdate AccountTax
auPayload
= lens _auPayload (\ s a -> s{_auPayload = a})
auAccountId :: Lens' AccounttaxUpdate Word64
auAccountId
= lens _auAccountId (\ s a -> s{_auAccountId = a}) .
_Coerce
instance GoogleRequest AccounttaxUpdate where
type Rs AccounttaxUpdate = AccountTax
type Scopes AccounttaxUpdate =
'["https://www.googleapis.com/auth/content"]
requestClient AccounttaxUpdate'{..}
= go _auMerchantId _auAccountId (Just AltJSON)
_auPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy AccounttaxUpdateResource)
mempty