{-# 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.ChangeRenewalSettings
(
SubscriptionsChangeRenewalSettingsResource
, subscriptionsChangeRenewalSettings
, SubscriptionsChangeRenewalSettings
, scrsPayload
, scrsCustomerId
, scrsSubscriptionId
) where
import Network.Google.AppsReseller.Types
import Network.Google.Prelude
type SubscriptionsChangeRenewalSettingsResource =
"apps" :>
"reseller" :>
"v1" :>
"customers" :>
Capture "customerId" Text :>
"subscriptions" :>
Capture "subscriptionId" Text :>
"changeRenewalSettings" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RenewalSettings :>
Post '[JSON] Subscription
data SubscriptionsChangeRenewalSettings = SubscriptionsChangeRenewalSettings'
{ _scrsPayload :: !RenewalSettings
, _scrsCustomerId :: !Text
, _scrsSubscriptionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subscriptionsChangeRenewalSettings
:: RenewalSettings
-> Text
-> Text
-> SubscriptionsChangeRenewalSettings
subscriptionsChangeRenewalSettings pScrsPayload_ pScrsCustomerId_ pScrsSubscriptionId_ =
SubscriptionsChangeRenewalSettings'
{ _scrsPayload = pScrsPayload_
, _scrsCustomerId = pScrsCustomerId_
, _scrsSubscriptionId = pScrsSubscriptionId_
}
scrsPayload :: Lens' SubscriptionsChangeRenewalSettings RenewalSettings
scrsPayload
= lens _scrsPayload (\ s a -> s{_scrsPayload = a})
scrsCustomerId :: Lens' SubscriptionsChangeRenewalSettings Text
scrsCustomerId
= lens _scrsCustomerId
(\ s a -> s{_scrsCustomerId = a})
scrsSubscriptionId :: Lens' SubscriptionsChangeRenewalSettings Text
scrsSubscriptionId
= lens _scrsSubscriptionId
(\ s a -> s{_scrsSubscriptionId = a})
instance GoogleRequest
SubscriptionsChangeRenewalSettings where
type Rs SubscriptionsChangeRenewalSettings =
Subscription
type Scopes SubscriptionsChangeRenewalSettings =
'["https://www.googleapis.com/auth/apps.order"]
requestClient SubscriptionsChangeRenewalSettings'{..}
= go _scrsCustomerId _scrsSubscriptionId
(Just AltJSON)
_scrsPayload
appsResellerService
where go
= buildClient
(Proxy ::
Proxy SubscriptionsChangeRenewalSettingsResource)
mempty