{-# 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.Reseller.Subscriptions.Activate
(
SubscriptionsActivateResource
, subscriptionsActivate
, SubscriptionsActivate
, saCustomerId
, saSubscriptionId
) where
import Network.Google.AppsReseller.Types
import Network.Google.Prelude
type SubscriptionsActivateResource =
"apps" :>
"reseller" :>
"v1" :>
"customers" :>
Capture "customerId" Text :>
"subscriptions" :>
Capture "subscriptionId" Text :>
"activate" :>
QueryParam "alt" AltJSON :> Post '[JSON] Subscription
data SubscriptionsActivate = SubscriptionsActivate'
{ _saCustomerId :: !Text
, _saSubscriptionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subscriptionsActivate
:: Text
-> Text
-> SubscriptionsActivate
subscriptionsActivate pSaCustomerId_ pSaSubscriptionId_ =
SubscriptionsActivate'
{ _saCustomerId = pSaCustomerId_
, _saSubscriptionId = pSaSubscriptionId_
}
saCustomerId :: Lens' SubscriptionsActivate Text
saCustomerId
= lens _saCustomerId (\ s a -> s{_saCustomerId = a})
saSubscriptionId :: Lens' SubscriptionsActivate Text
saSubscriptionId
= lens _saSubscriptionId
(\ s a -> s{_saSubscriptionId = a})
instance GoogleRequest SubscriptionsActivate where
type Rs SubscriptionsActivate = Subscription
type Scopes SubscriptionsActivate =
'["https://www.googleapis.com/auth/apps.order"]
requestClient SubscriptionsActivate'{..}
= go _saCustomerId _saSubscriptionId (Just AltJSON)
appsResellerService
where go
= buildClient
(Proxy :: Proxy SubscriptionsActivateResource)
mempty