{-# 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.Purchases.Products.Get
(
PurchasesProductsGetResource
, purchasesProductsGet
, PurchasesProductsGet
, ppgPackageName
, ppgToken
, ppgProductId
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type PurchasesProductsGetResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"purchases" :>
"products" :>
Capture "productId" Text :>
"tokens" :>
Capture "token" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ProductPurchase
data PurchasesProductsGet = PurchasesProductsGet'
{ _ppgPackageName :: !Text
, _ppgToken :: !Text
, _ppgProductId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
purchasesProductsGet
:: Text
-> Text
-> Text
-> PurchasesProductsGet
purchasesProductsGet pPpgPackageName_ pPpgToken_ pPpgProductId_ =
PurchasesProductsGet'
{ _ppgPackageName = pPpgPackageName_
, _ppgToken = pPpgToken_
, _ppgProductId = pPpgProductId_
}
ppgPackageName :: Lens' PurchasesProductsGet Text
ppgPackageName
= lens _ppgPackageName
(\ s a -> s{_ppgPackageName = a})
ppgToken :: Lens' PurchasesProductsGet Text
ppgToken = lens _ppgToken (\ s a -> s{_ppgToken = a})
ppgProductId :: Lens' PurchasesProductsGet Text
ppgProductId
= lens _ppgProductId (\ s a -> s{_ppgProductId = a})
instance GoogleRequest PurchasesProductsGet where
type Rs PurchasesProductsGet = ProductPurchase
type Scopes PurchasesProductsGet =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient PurchasesProductsGet'{..}
= go _ppgPackageName _ppgProductId _ppgToken
(Just AltJSON)
androidPublisherService
where go
= buildClient
(Proxy :: Proxy PurchasesProductsGetResource)
mempty