module Network.Google.Resource.Reseller.Subscriptions.ChangePlan
(
SubscriptionsChangePlanResource
, subscriptionsChangePlan
, SubscriptionsChangePlan
, scpPayload
, scpCustomerId
, scpSubscriptionId
) where
import Network.Google.AppsReseller.Types
import Network.Google.Prelude
type SubscriptionsChangePlanResource =
"apps" :>
"reseller" :>
"v1" :>
"customers" :>
Capture "customerId" Text :>
"subscriptions" :>
Capture "subscriptionId" Text :>
"changePlan" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ChangePlanRequest :>
Post '[JSON] Subscription
data SubscriptionsChangePlan = SubscriptionsChangePlan
{ _scpPayload :: !ChangePlanRequest
, _scpCustomerId :: !Text
, _scpSubscriptionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subscriptionsChangePlan
:: ChangePlanRequest
-> Text
-> Text
-> SubscriptionsChangePlan
subscriptionsChangePlan pScpPayload_ pScpCustomerId_ pScpSubscriptionId_ =
SubscriptionsChangePlan
{ _scpPayload = pScpPayload_
, _scpCustomerId = pScpCustomerId_
, _scpSubscriptionId = pScpSubscriptionId_
}
scpPayload :: Lens' SubscriptionsChangePlan ChangePlanRequest
scpPayload
= lens _scpPayload (\ s a -> s{_scpPayload = a})
scpCustomerId :: Lens' SubscriptionsChangePlan Text
scpCustomerId
= lens _scpCustomerId
(\ s a -> s{_scpCustomerId = a})
scpSubscriptionId :: Lens' SubscriptionsChangePlan Text
scpSubscriptionId
= lens _scpSubscriptionId
(\ s a -> s{_scpSubscriptionId = a})
instance GoogleRequest SubscriptionsChangePlan where
type Rs SubscriptionsChangePlan = Subscription
requestClient SubscriptionsChangePlan{..}
= go _scpCustomerId _scpSubscriptionId (Just AltJSON)
_scpPayload
appsResellerService
where go
= buildClient
(Proxy :: Proxy SubscriptionsChangePlanResource)
mempty