{-# 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.AndroidPublisher.InAppProducts.Update
(
InAppProductsUpdateResource
, inAppProductsUpdate
, InAppProductsUpdate
, iapuAutoConvertMissingPrices
, iapuPackageName
, iapuPayload
, iapuSKU
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type InAppProductsUpdateResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"inappproducts" :>
Capture "sku" Text :>
QueryParam "autoConvertMissingPrices" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InAppProduct :>
Put '[JSON] InAppProduct
data InAppProductsUpdate = InAppProductsUpdate'
{ _iapuAutoConvertMissingPrices :: !(Maybe Bool)
, _iapuPackageName :: !Text
, _iapuPayload :: !InAppProduct
, _iapuSKU :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsUpdate
:: Text
-> InAppProduct
-> Text
-> InAppProductsUpdate
inAppProductsUpdate pIapuPackageName_ pIapuPayload_ pIapuSKU_ =
InAppProductsUpdate'
{ _iapuAutoConvertMissingPrices = Nothing
, _iapuPackageName = pIapuPackageName_
, _iapuPayload = pIapuPayload_
, _iapuSKU = pIapuSKU_
}
iapuAutoConvertMissingPrices :: Lens' InAppProductsUpdate (Maybe Bool)
iapuAutoConvertMissingPrices
= lens _iapuAutoConvertMissingPrices
(\ s a -> s{_iapuAutoConvertMissingPrices = a})
iapuPackageName :: Lens' InAppProductsUpdate Text
iapuPackageName
= lens _iapuPackageName
(\ s a -> s{_iapuPackageName = a})
iapuPayload :: Lens' InAppProductsUpdate InAppProduct
iapuPayload
= lens _iapuPayload (\ s a -> s{_iapuPayload = a})
iapuSKU :: Lens' InAppProductsUpdate Text
iapuSKU = lens _iapuSKU (\ s a -> s{_iapuSKU = a})
instance GoogleRequest InAppProductsUpdate where
type Rs InAppProductsUpdate = InAppProduct
type Scopes InAppProductsUpdate =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient InAppProductsUpdate'{..}
= go _iapuPackageName _iapuSKU
_iapuAutoConvertMissingPrices
(Just AltJSON)
_iapuPayload
androidPublisherService
where go
= buildClient
(Proxy :: Proxy InAppProductsUpdateResource)
mempty