{-# 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.StartPaidService
(
SubscriptionsStartPaidServiceResource
, subscriptionsStartPaidService
, SubscriptionsStartPaidService
, sspsCustomerId
, sspsSubscriptionId
) where
import Network.Google.AppsReseller.Types
import Network.Google.Prelude
type SubscriptionsStartPaidServiceResource =
"apps" :>
"reseller" :>
"v1" :>
"customers" :>
Capture "customerId" Text :>
"subscriptions" :>
Capture "subscriptionId" Text :>
"startPaidService" :>
QueryParam "alt" AltJSON :> Post '[JSON] Subscription
data SubscriptionsStartPaidService = SubscriptionsStartPaidService'
{ _sspsCustomerId :: !Text
, _sspsSubscriptionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subscriptionsStartPaidService
:: Text
-> Text
-> SubscriptionsStartPaidService
subscriptionsStartPaidService pSspsCustomerId_ pSspsSubscriptionId_ =
SubscriptionsStartPaidService'
{ _sspsCustomerId = pSspsCustomerId_
, _sspsSubscriptionId = pSspsSubscriptionId_
}
sspsCustomerId :: Lens' SubscriptionsStartPaidService Text
sspsCustomerId
= lens _sspsCustomerId
(\ s a -> s{_sspsCustomerId = a})
sspsSubscriptionId :: Lens' SubscriptionsStartPaidService Text
sspsSubscriptionId
= lens _sspsSubscriptionId
(\ s a -> s{_sspsSubscriptionId = a})
instance GoogleRequest SubscriptionsStartPaidService
where
type Rs SubscriptionsStartPaidService = Subscription
type Scopes SubscriptionsStartPaidService =
'["https://www.googleapis.com/auth/apps.order"]
requestClient SubscriptionsStartPaidService'{..}
= go _sspsCustomerId _sspsSubscriptionId
(Just AltJSON)
appsResellerService
where go
= buildClient
(Proxy ::
Proxy SubscriptionsStartPaidServiceResource)
mempty