on develop help sign in
Regenerating gogol-apps-reseller from latest service definition
commit2d1a13695593462458e3b1cfc4fc1c7dc9e7fc5f authorBrendan Hay <brendan.g.hay@gmail.com> dateTue 10 May 2016, 16:12 (10 years ago) parent5b2b639
3 files changed+39−11
gogol-apps-reseller/gen/Network/Google/AppsReseller.hs+2 gogol-apps-reseller/gen/Network/Google/AppsReseller/Types.hs+2 gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Product.hs+35−11
gogol-apps-reseller/gen/Network/Google/AppsReseller.hs+2
@@ -110,6 +110,7 @@ module Network.Google.AppsReseller
110110 , ChangePlanRequest
111111 , changePlanRequest
112112 , cprKind
113+ , cprDealCode
113114 , cprPlanName
114115 , cprPurchaseOrderId
115116 , cprSeats
@@ -162,6 +163,7 @@ module Network.Google.AppsReseller
162163 , subKind
163164 , subSKUId
164165 , subPlan
166+ , subDealCode
165167 , subCustomerId
166168 , subCustomerDomain
167169 , subSuspensionReasons
gogol-apps-reseller/gen/Network/Google/AppsReseller/Types.hs+2
@@ -59,6 +59,7 @@ module Network.Google.AppsReseller.Types
5959 , ChangePlanRequest
6060 , changePlanRequest
6161 , cprKind
62+ , cprDealCode
6263 , cprPlanName
6364 , cprPurchaseOrderId
6465 , cprSeats
@@ -111,6 +112,7 @@ module Network.Google.AppsReseller.Types
111112 , subKind
112113 , subSKUId
113114 , subPlan
115+ , subDealCode
114116 , subCustomerId
115117 , subCustomerDomain
116118 , subSuspensionReasons
gogol-apps-reseller/gen/Network/Google/AppsReseller/Types/Product.hs+35−11
@@ -334,6 +334,7 @@ instance ToJSON Customer where
334334-- /See:/ 'changePlanRequest' smart constructor.
335335data ChangePlanRequest = ChangePlanRequest'
336336 { _cprKind :: !Text
337+ , _cprDealCode :: !(Maybe Text)
337338 , _cprPlanName :: !(Maybe Text)
338339 , _cprPurchaseOrderId :: !(Maybe Text)
339340 , _cprSeats :: !(Maybe Seats)
@@ -345,6 +346,8 @@ data ChangePlanRequest = ChangePlanRequest'
345346--
346347-- * 'cprKind'
347348--
349+-- * 'cprDealCode'
350+--
348351-- * 'cprPlanName'
349352--
350353-- * 'cprPurchaseOrderId'
@@ -355,6 +358,7 @@ changePlanRequest
355358changePlanRequest =
356359 ChangePlanRequest'
357360 { _cprKind = "subscriptions#changePlanRequest"
361+ , _cprDealCode = Nothing
358362 , _cprPlanName = Nothing
359363 , _cprPurchaseOrderId = Nothing
360364 , _cprSeats = Nothing
@@ -364,6 +368,12 @@ changePlanRequest =
364368cprKind :: Lens' ChangePlanRequest Text
365369cprKind = lens _cprKind (\ s a -> s{_cprKind = a})
366370
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+
367377-- | Name of the plan to change to.
368378cprPlanName :: Lens' ChangePlanRequest (Maybe Text)
369379cprPlanName
@@ -385,6 +395,7 @@ instance FromJSON ChangePlanRequest where
385395 (\ o ->
386396 ChangePlanRequest' <$>
387397 (o .:? "kind" .!= "subscriptions#changePlanRequest")
398+ <*> (o .:? "dealCode")
388399 <*> (o .:? "planName")
389400 <*> (o .:? "purchaseOrderId")
390401 <*> (o .:? "seats"))
@@ -394,6 +405,7 @@ instance ToJSON ChangePlanRequest where
394405 = object
395406 (catMaybes
396407 [Just ("kind" .= _cprKind),
408+ ("dealCode" .=) <$> _cprDealCode,
397409 ("planName" .=) <$> _cprPlanName,
398410 ("purchaseOrderId" .=) <$> _cprPurchaseOrderId,
399411 ("seats" .=) <$> _cprSeats])
@@ -716,6 +728,7 @@ data Subscription = Subscription'
716728 , _subKind :: !Text
717729 , _subSKUId :: !(Maybe Text)
718730 , _subPlan :: !(Maybe SubscriptionPlan)
731+ , _subDealCode :: !(Maybe Text)
719732 , _subCustomerId :: !(Maybe Text)
720733 , _subCustomerDomain :: !(Maybe Text)
721734 , _subSuspensionReasons :: !(Maybe [Text])
@@ -746,6 +759,8 @@ data Subscription = Subscription'
746759--
747760-- * 'subPlan'
748761--
762+-- * 'subDealCode'
763+--
749764-- * 'subCustomerId'
750765--
751766-- * 'subCustomerDomain'
@@ -773,6 +788,7 @@ subscription =
773788 , _subKind = "reseller#subscription"
774789 , _subSKUId = Nothing
775790 , _subPlan = Nothing
791+ , _subDealCode = Nothing
776792 , _subCustomerId = Nothing
777793 , _subCustomerDomain = Nothing
778794 , _subSuspensionReasons = Nothing
@@ -825,6 +841,12 @@ subSKUId = lens _subSKUId (\ s a -> s{_subSKUId = a})
825841subPlan :: Lens' Subscription (Maybe SubscriptionPlan)
826842subPlan = lens _subPlan (\ s a -> s{_subPlan = a})
827843
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+
828850-- | The id of the customer to whom the subscription belongs.
829851subCustomerId :: Lens' Subscription (Maybe Text)
830852subCustomerId
@@ -837,17 +859,17 @@ subCustomerDomain
837859 = lens _subCustomerDomain
838860 (\ s a -> s{_subCustomerDomain = a})
839861
840−-- | field listing all current reasons the subscription is suspended. It is
841−-- possible for a subscription to have multiple suspension reasons. A
842−-- subscription\'s status is SUSPENDED until all pending suspensions are
843−-- removed. Possible options include: - PENDING_TOS_ACCEPTANCE — The
844−-- customer has not logged in and accepted the Google Apps Resold Terms of
845−-- Services. - RENEWAL_WITH_TYPE_CANCEL — The customer\'s commitment ended
846−-- and their service was cancelled at the end of their term. -
847−-- RESELLER_INITIATED — A manual suspension invoked by a Reseller. -
848−-- TRIAL_ENDED — The customer\'s trial expired without a plan selected. -
849−-- OTHER — The customer is suspended for an internal Google reason (e.g.
850−-- abuse or otherwise).
862+-- | Read-only field containing an enumerable of all the current suspension
863+-- reasons for a subscription. It is possible for a subscription to have
864+-- many concurrent, overlapping suspension reasons. A subscription\'s
865+-- STATUS is SUSPENDED until all pending suspensions are removed. Possible
866+-- options include: - PENDING_TOS_ACCEPTANCE - The customer has not logged
867+-- in and accepted the Google Apps Resold Terms of Services. -
868+-- RENEWAL_WITH_TYPE_CANCEL - The customer\'s commitment ended and their
869+-- service was cancelled at the end of their term. - RESELLER_INITIATED - A
870+-- manual suspension invoked by a Reseller. - TRIAL_ENDED - The customer\'s
871+-- trial expired without a plan selected. - OTHER - The customer is
872+-- suspended for an internal Google reason (e.g. abuse or otherwise).
851873subSuspensionReasons :: Lens' Subscription [Text]
852874subSuspensionReasons
853875 = lens _subSuspensionReasons
@@ -895,6 +917,7 @@ instance FromJSON Subscription where
895917 <*> (o .:? "kind" .!= "reseller#subscription")
896918 <*> (o .:? "skuId")
897919 <*> (o .:? "plan")
920+ <*> (o .:? "dealCode")
898921 <*> (o .:? "customerId")
899922 <*> (o .:? "customerDomain")
900923 <*> (o .:? "suspensionReasons" .!= mempty)
@@ -915,6 +938,7 @@ instance ToJSON Subscription where
915938 ("resourceUiUrl" .=) <$> _subResourceUiURL,
916939 Just ("kind" .= _subKind),
917940 ("skuId" .=) <$> _subSKUId, ("plan" .=) <$> _subPlan,
941+ ("dealCode" .=) <$> _subDealCode,
918942 ("customerId" .=) <$> _subCustomerId,
919943 ("customerDomain" .=) <$> _subCustomerDomain,
920944 ("suspensionReasons" .=) <$> _subSuspensionReasons,