{-# 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.Get
(
InAppProductsGetResource
, inAppProductsGet
, InAppProductsGet
, iapgPackageName
, iapgSKU
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type InAppProductsGetResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"inappproducts" :>
Capture "sku" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] InAppProduct
data InAppProductsGet = InAppProductsGet'
{ _iapgPackageName :: !Text
, _iapgSKU :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsGet
:: Text
-> Text
-> InAppProductsGet
inAppProductsGet pIapgPackageName_ pIapgSKU_ =
InAppProductsGet'
{ _iapgPackageName = pIapgPackageName_
, _iapgSKU = pIapgSKU_
}
iapgPackageName :: Lens' InAppProductsGet Text
iapgPackageName
= lens _iapgPackageName
(\ s a -> s{_iapgPackageName = a})
iapgSKU :: Lens' InAppProductsGet Text
iapgSKU = lens _iapgSKU (\ s a -> s{_iapgSKU = a})
instance GoogleRequest InAppProductsGet where
type Rs InAppProductsGet = InAppProduct
type Scopes InAppProductsGet =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient InAppProductsGet'{..}
= go _iapgPackageName _iapgSKU (Just AltJSON)
androidPublisherService
where go
= buildClient
(Proxy :: Proxy InAppProductsGetResource)
mempty