{-# 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.LiaSettings.SetposDataprovider
(
LiaSettingsSetposDataproviderResource
, liaSettingsSetposDataprovider
, LiaSettingsSetposDataprovider
, lssdMerchantId
, lssdCountry
, lssdAccountId
, lssdPosExternalAccountId
, lssdPosDataProviderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type LiaSettingsSetposDataproviderResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"liasettings" :>
Capture "accountId" (Textual Word64) :>
"setposdataprovider" :>
QueryParam "country" Text :>
QueryParam "posExternalAccountId" Text :>
QueryParam "posDataProviderId" (Textual Word64) :>
QueryParam "alt" AltJSON :>
Post '[JSON] LiaSettingsSetPosDataProviderResponse
data LiaSettingsSetposDataprovider = LiaSettingsSetposDataprovider'
{ _lssdMerchantId :: !(Textual Word64)
, _lssdCountry :: !Text
, _lssdAccountId :: !(Textual Word64)
, _lssdPosExternalAccountId :: !(Maybe Text)
, _lssdPosDataProviderId :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
liaSettingsSetposDataprovider
:: Word64
-> Text
-> Word64
-> LiaSettingsSetposDataprovider
liaSettingsSetposDataprovider pLssdMerchantId_ pLssdCountry_ pLssdAccountId_ =
LiaSettingsSetposDataprovider'
{ _lssdMerchantId = _Coerce # pLssdMerchantId_
, _lssdCountry = pLssdCountry_
, _lssdAccountId = _Coerce # pLssdAccountId_
, _lssdPosExternalAccountId = Nothing
, _lssdPosDataProviderId = Nothing
}
lssdMerchantId :: Lens' LiaSettingsSetposDataprovider Word64
lssdMerchantId
= lens _lssdMerchantId
(\ s a -> s{_lssdMerchantId = a})
. _Coerce
lssdCountry :: Lens' LiaSettingsSetposDataprovider Text
lssdCountry
= lens _lssdCountry (\ s a -> s{_lssdCountry = a})
lssdAccountId :: Lens' LiaSettingsSetposDataprovider Word64
lssdAccountId
= lens _lssdAccountId
(\ s a -> s{_lssdAccountId = a})
. _Coerce
lssdPosExternalAccountId :: Lens' LiaSettingsSetposDataprovider (Maybe Text)
lssdPosExternalAccountId
= lens _lssdPosExternalAccountId
(\ s a -> s{_lssdPosExternalAccountId = a})
lssdPosDataProviderId :: Lens' LiaSettingsSetposDataprovider (Maybe Word64)
lssdPosDataProviderId
= lens _lssdPosDataProviderId
(\ s a -> s{_lssdPosDataProviderId = a})
. mapping _Coerce
instance GoogleRequest LiaSettingsSetposDataprovider
where
type Rs LiaSettingsSetposDataprovider =
LiaSettingsSetPosDataProviderResponse
type Scopes LiaSettingsSetposDataprovider =
'["https://www.googleapis.com/auth/content"]
requestClient LiaSettingsSetposDataprovider'{..}
= go _lssdMerchantId _lssdAccountId
(Just _lssdCountry)
_lssdPosExternalAccountId
_lssdPosDataProviderId
(Just AltJSON)
shoppingContentService
where go
= buildClient
(Proxy ::
Proxy LiaSettingsSetposDataproviderResource)
mempty