on develop help sign in
Regenerating gogol-apps-reseller from latest service definition
2d1a136Brendan Hay
gogol-apps-reseller/gen/Network/Google/AppsReseller.hs+2
@@ -110,6 +110,7 @@ module Network.Google.AppsReseller
110 , ChangePlanRequest
110 , ChangePlanRequest
111 , changePlanRequest
111 , changePlanRequest
112 , cprKind
112 , cprKind
113+ , cprDealCode
113 , cprPlanName
114 , cprPlanName
114 , cprPurchaseOrderId
115 , cprPurchaseOrderId
115 , cprSeats
116 , cprSeats
@@ -162,6 +163,7 @@ module Network.Google.AppsReseller
162 , subKind
163 , subKind
163 , subSKUId
164 , subSKUId
164 , subPlan
165 , subPlan
166+ , subDealCode
165 , subCustomerId
167 , subCustomerId
166 , subCustomerDomain
168 , subCustomerDomain
167 , subSuspensionReasons
169 , subSuspensionReasons
gogol-apps-reseller/gen/Network/Google/AppsReseller/Types.hs+2
@@ -59,6 +59,7 @@ module Network.Google.AppsReseller.Types
59 , ChangePlanRequest
59 , ChangePlanRequest
60 , changePlanRequest
60 , changePlanRequest
61 , cprKind
61 , cprKind
62+ , cprDealCode
62 , cprPlanName
63 , cprPlanName
63 , cprPurchaseOrderId
64 , cprPurchaseOrderId
64 , cprSeats
65 , cprSeats
@@ -111,6 +112,7 @@ module Network.Google.AppsReseller.Types
111 , subKind
112 , subKind
112 , subSKUId
113 , subSKUId
113 , subPlan
114 , subPlan
115+ , subDealCode
114 , subCustomerId
116 , subCustomerId
115 , subCustomerDomain
117 , subCustomerDomain
116 , subSuspensionReasons
118 , subSuspensionReasons
gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Product.hs+35−11
@@ -334,6 +334,7 @@ instance ToJSON Customer where
334-- /See:/ 'changePlanRequest' smart constructor.
334-- /See:/ 'changePlanRequest' smart constructor.
335data ChangePlanRequest = ChangePlanRequest'
335data ChangePlanRequest = ChangePlanRequest'
336 { _cprKind :: !Text
336 { _cprKind :: !Text
337+ , _cprDealCode :: !(Maybe Text)
337 , _cprPlanName :: !(Maybe Text)
338 , _cprPlanName :: !(Maybe Text)
338 , _cprPurchaseOrderId :: !(Maybe Text)
339 , _cprPurchaseOrderId :: !(Maybe Text)
339 , _cprSeats :: !(Maybe Seats)
340 , _cprSeats :: !(Maybe Seats)
@@ -345,6 +346,8 @@ data ChangePlanRequest = ChangePlanRequest'
345--
346--
346-- * 'cprKind'
347-- * 'cprKind'
347--
348--
349+-- * 'cprDealCode'
350+--
348-- * 'cprPlanName'
351-- * 'cprPlanName'
349--
352--
350-- * 'cprPurchaseOrderId'
353-- * 'cprPurchaseOrderId'
@@ -355,6 +358,7 @@ changePlanRequest
355changePlanRequest =
358changePlanRequest =
356 ChangePlanRequest'
359 ChangePlanRequest'
357 { _cprKind = "subscriptions#changePlanRequest"
360 { _cprKind = "subscriptions#changePlanRequest"
361+ , _cprDealCode = Nothing
358 , _cprPlanName = Nothing
362 , _cprPlanName = Nothing
359 , _cprPurchaseOrderId = Nothing
363 , _cprPurchaseOrderId = Nothing
360 , _cprSeats = Nothing
364 , _cprSeats = Nothing
@@ -364,6 +368,12 @@ changePlanRequest =
364cprKind :: Lens' ChangePlanRequest Text
368cprKind :: Lens' ChangePlanRequest Text
365cprKind = lens _cprKind (\ s a -> s{_cprKind = a})
369cprKind = lens _cprKind (\ s a -> s{_cprKind = a})
366
370
371+-- | External name of the deal code applicable for the subscription. This
372+-- field is optional. If missing, the deal price plan won\'t be used.
373+cprDealCode :: Lens' ChangePlanRequest (Maybe Text)
374+cprDealCode
375+ = lens _cprDealCode (\ s a -> s{_cprDealCode = a})
376+
367-- | Name of the plan to change to.
377-- | Name of the plan to change to.
368cprPlanName :: Lens' ChangePlanRequest (Maybe Text)
378cprPlanName :: Lens' ChangePlanRequest (Maybe Text)
369cprPlanName
379cprPlanName
@@ -385,6 +395,7 @@ instance FromJSON ChangePlanRequest where
385 (\ o ->
395 (\ o ->
386 ChangePlanRequest' <$>
396 ChangePlanRequest' <$>
387 (o .:? "kind" .!= "subscriptions#changePlanRequest")
397 (o .:? "kind" .!= "subscriptions#changePlanRequest")
398+ <*> (o .:? "dealCode")
388 <*> (o .:? "planName")
399 <*> (o .:? "planName")
389 <*> (o .:? "purchaseOrderId")
400 <*> (o .:? "purchaseOrderId")
390 <*> (o .:? "seats"))
401 <*> (o .:? "seats"))
@@ -394,6 +405,7 @@ instance ToJSON ChangePlanRequest where
394 = object
405 = object
395 (catMaybes
406 (catMaybes
396 [Just ("kind" .= _cprKind),
407 [Just ("kind" .= _cprKind),
408+ ("dealCode" .=) <$> _cprDealCode,
397 ("planName" .=) <$> _cprPlanName,
409 ("planName" .=) <$> _cprPlanName,
398 ("purchaseOrderId" .=) <$> _cprPurchaseOrderId,
410 ("purchaseOrderId" .=) <$> _cprPurchaseOrderId,
399 ("seats" .=) <$> _cprSeats])
411 ("seats" .=) <$> _cprSeats])
@@ -716,6 +728,7 @@ data Subscription = Subscription'
716 , _subKind :: !Text
728 , _subKind :: !Text
717 , _subSKUId :: !(Maybe Text)
729 , _subSKUId :: !(Maybe Text)
718 , _subPlan :: !(Maybe SubscriptionPlan)
730 , _subPlan :: !(Maybe SubscriptionPlan)
731+ , _subDealCode :: !(Maybe Text)
719 , _subCustomerId :: !(Maybe Text)
732 , _subCustomerId :: !(Maybe Text)
720 , _subCustomerDomain :: !(Maybe Text)
733 , _subCustomerDomain :: !(Maybe Text)
721 , _subSuspensionReasons :: !(Maybe [Text])
734 , _subSuspensionReasons :: !(Maybe [Text])
@@ -746,6 +759,8 @@ data Subscription = Subscription'
746--
759--
747-- * 'subPlan'
760-- * 'subPlan'
748--
761--
762+-- * 'subDealCode'
763+--
749-- * 'subCustomerId'
764-- * 'subCustomerId'
750--
765--
751-- * 'subCustomerDomain'
766-- * 'subCustomerDomain'
@@ -773,6 +788,7 @@ subscription =
773 , _subKind = "reseller#subscription"
788 , _subKind = "reseller#subscription"
774 , _subSKUId = Nothing
789 , _subSKUId = Nothing
775 , _subPlan = Nothing
790 , _subPlan = Nothing
791+ , _subDealCode = Nothing
776 , _subCustomerId = Nothing
792 , _subCustomerId = Nothing
777 , _subCustomerDomain = Nothing
793 , _subCustomerDomain = Nothing
778 , _subSuspensionReasons = Nothing
794 , _subSuspensionReasons = Nothing
@@ -825,6 +841,12 @@ subSKUId = lens _subSKUId (\ s a -> s{_subSKUId = a})
825subPlan :: Lens' Subscription (Maybe SubscriptionPlan)
841subPlan :: Lens' Subscription (Maybe SubscriptionPlan)
826subPlan = lens _subPlan (\ s a -> s{_subPlan = a})
842subPlan = lens _subPlan (\ s a -> s{_subPlan = a})
827
843
844+-- | External name of the deal, if this subscription was provisioned under
845+-- one. Otherwise this field will be empty.
846+subDealCode :: Lens' Subscription (Maybe Text)
847+subDealCode
848+ = lens _subDealCode (\ s a -> s{_subDealCode = a})
849+
828-- | The id of the customer to whom the subscription belongs.
850-- | The id of the customer to whom the subscription belongs.
829subCustomerId :: Lens' Subscription (Maybe Text)
851subCustomerId :: Lens' Subscription (Maybe Text)
830subCustomerId
852subCustomerId
@@ -837,17 +859,17 @@ subCustomerDomain
837 = lens _subCustomerDomain
859 = lens _subCustomerDomain
838 (\ s a -> s{_subCustomerDomain = a})
860 (\ s a -> s{_subCustomerDomain = a})
839
861
840−-- | field listing all current reasons the subscription is suspended. It is
862+-- | Read-only field containing an enumerable of all the current suspension
841−-- possible for a subscription to have multiple suspension reasons. A
863+-- reasons for a subscription. It is possible for a subscription to have
864+-- many concurrent, overlapping suspension reasons. A subscription\'s
842−-- subscription\'s status is SUSPENDED until all pending suspensions are
865+-- STATUS is SUSPENDED until all pending suspensions are removed. Possible
843−-- removed. Possible options include: - PENDING_TOS_ACCEPTANCE — The
866+-- options include: - PENDING_TOS_ACCEPTANCE - The customer has not logged
844−-- customer has not logged in and accepted the Google Apps Resold Terms of
867+-- in and accepted the Google Apps Resold Terms of Services. -
845−-- Services. - RENEWAL_WITH_TYPE_CANCEL — The customer\'s commitment ended
868+-- RENEWAL_WITH_TYPE_CANCEL - The customer\'s commitment ended and their
846−-- and their service was cancelled at the end of their term. -
869+-- service was cancelled at the end of their term. - RESELLER_INITIATED - A
847−-- RESELLER_INITIATED — A manual suspension invoked by a Reseller. -
870+-- manual suspension invoked by a Reseller. - TRIAL_ENDED - The customer\'s
848−-- TRIAL_ENDED — The customer\'s trial expired without a plan selected. -
871+-- trial expired without a plan selected. - OTHER - The customer is
849−-- OTHER — The customer is suspended for an internal Google reason (e.g.
872+-- suspended for an internal Google reason (e.g. abuse or otherwise).
850−-- abuse or otherwise).
851subSuspensionReasons :: Lens' Subscription [Text]
873subSuspensionReasons :: Lens' Subscription [Text]
852subSuspensionReasons
874subSuspensionReasons
853 = lens _subSuspensionReasons
875 = lens _subSuspensionReasons
@@ -895,6 +917,7 @@ instance FromJSON Subscription where
895 <*> (o .:? "kind" .!= "reseller#subscription")
917 <*> (o .:? "kind" .!= "reseller#subscription")
896 <*> (o .:? "skuId")
918 <*> (o .:? "skuId")
897 <*> (o .:? "plan")
919 <*> (o .:? "plan")
920+ <*> (o .:? "dealCode")
898 <*> (o .:? "customerId")
921 <*> (o .:? "customerId")
899 <*> (o .:? "customerDomain")
922 <*> (o .:? "customerDomain")
900 <*> (o .:? "suspensionReasons" .!= mempty)
923 <*> (o .:? "suspensionReasons" .!= mempty)
@@ -915,6 +938,7 @@ instance ToJSON Subscription where
915 ("resourceUiUrl" .=) <$> _subResourceUiURL,
938 ("resourceUiUrl" .=) <$> _subResourceUiURL,
916 Just ("kind" .= _subKind),
939 Just ("kind" .= _subKind),
917 ("skuId" .=) <$> _subSKUId, ("plan" .=) <$> _subPlan,
940 ("skuId" .=) <$> _subSKUId, ("plan" .=) <$> _subPlan,
941+ ("dealCode" .=) <$> _subDealCode,
918 ("customerId" .=) <$> _subCustomerId,
942 ("customerId" .=) <$> _subCustomerId,
919 ("customerDomain" .=) <$> _subCustomerDomain,
943 ("customerDomain" .=) <$> _subCustomerDomain,
920 ("suspensionReasons" .=) <$> _subSuspensionReasons,
944 ("suspensionReasons" .=) <$> _subSuspensionReasons,