{-# 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.Patch
(
InAppProductsPatchResource
, inAppProductsPatch
, InAppProductsPatch
, iAppAutoConvertMissingPrices
, iAppPackageName
, iAppPayload
, iAppSKU
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type InAppProductsPatchResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"inappproducts" :>
Capture "sku" Text :>
QueryParam "autoConvertMissingPrices" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InAppProduct :>
Patch '[JSON] InAppProduct
data InAppProductsPatch = InAppProductsPatch'
{ _iAppAutoConvertMissingPrices :: !(Maybe Bool)
, _iAppPackageName :: !Text
, _iAppPayload :: !InAppProduct
, _iAppSKU :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsPatch
:: Text
-> InAppProduct
-> Text
-> InAppProductsPatch
inAppProductsPatch pIAppPackageName_ pIAppPayload_ pIAppSKU_ =
InAppProductsPatch'
{ _iAppAutoConvertMissingPrices = Nothing
, _iAppPackageName = pIAppPackageName_
, _iAppPayload = pIAppPayload_
, _iAppSKU = pIAppSKU_
}
iAppAutoConvertMissingPrices :: Lens' InAppProductsPatch (Maybe Bool)
iAppAutoConvertMissingPrices
= lens _iAppAutoConvertMissingPrices
(\ s a -> s{_iAppAutoConvertMissingPrices = a})
iAppPackageName :: Lens' InAppProductsPatch Text
iAppPackageName
= lens _iAppPackageName
(\ s a -> s{_iAppPackageName = a})
iAppPayload :: Lens' InAppProductsPatch InAppProduct
iAppPayload
= lens _iAppPayload (\ s a -> s{_iAppPayload = a})
iAppSKU :: Lens' InAppProductsPatch Text
iAppSKU = lens _iAppSKU (\ s a -> s{_iAppSKU = a})
instance GoogleRequest InAppProductsPatch where
type Rs InAppProductsPatch = InAppProduct
type Scopes InAppProductsPatch =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient InAppProductsPatch'{..}
= go _iAppPackageName _iAppSKU
_iAppAutoConvertMissingPrices
(Just AltJSON)
_iAppPayload
androidPublisherService
where go
= buildClient
(Proxy :: Proxy InAppProductsPatchResource)
mempty