blob: 40332da4f21b04b026d4cde015ccb94ee7e8c107 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="reseller_v1.html">Enterprise Apps Reseller API</a> . <a href="reseller_v1.subscriptions.html">subscriptions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Craig Citro0e5b9bf2014-10-15 10:26:14 -070078 <code><a href="#activate">activate(customerId, subscriptionId)</a></code></p>
79<p class="firstline">Activates a subscription previously suspended by the reseller</p>
80<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -040081 <code><a href="#changePlan">changePlan(customerId, subscriptionId, body)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040082<p class="firstline">Update a subscription plan. Use this method to update a plan for a 30-day trial or a flexible plan subscription to an annual commitment plan with monthly or yearly payments.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
84 <code><a href="#changeRenewalSettings">changeRenewalSettings(customerId, subscriptionId, body)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040085<p class="firstline">Update a user license's renewal settings. This is applicable for accounts with annual commitment plans only.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<p class="toc_element">
87 <code><a href="#changeSeats">changeSeats(customerId, subscriptionId, body)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040088<p class="firstline">Update a subscription's user license settings.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
90 <code><a href="#delete">delete(customerId, subscriptionId, deletionType)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040091<p class="firstline">Cancel, suspend or transfer a subscription to direct.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
93 <code><a href="#get">get(customerId, subscriptionId)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040094<p class="firstline">Get a specific subscription.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<p class="toc_element">
96 <code><a href="#insert">insert(customerId, body, customerAuthToken=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040097<p class="firstline">Create or transfer a subscription.</p>
John Asmuth614db982014-04-24 15:46:26 -040098<p class="toc_element">
99 <code><a href="#list">list(customerAuthToken=None, pageToken=None, maxResults=None, customerNamePrefix=None, customerId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400100<p class="firstline">List of subscriptions managed by the reseller. The list can be all subscriptions, all of a customer's subscriptions, or all of a customer's transferable subscriptions.</p>
John Asmuth614db982014-04-24 15:46:26 -0400101<p class="toc_element">
102 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
105 <code><a href="#startPaidService">startPaidService(customerId, subscriptionId)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400106<p class="firstline">Immediately move a 30-day free trial subscription to a paid service subscription.</p>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700107<p class="toc_element">
108 <code><a href="#suspend">suspend(customerId, subscriptionId)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400109<p class="firstline">Suspends an active subscription.</p>
John Asmuth614db982014-04-24 15:46:26 -0400110<h3>Method Details</h3>
111<div class="method">
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700112 <code class="details" id="activate">activate(customerId, subscriptionId)</code>
113 <pre>Activates a subscription previously suspended by the reseller
114
115Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400116 customerId: string, Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates. (required)
117 subscriptionId: string, This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method. (required)
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700118
119Returns:
120 An object of the form:
121
122 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400123 "renewalSettings": { # JSON template for a subscription renewal settings. # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center.
124 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
125 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700126 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400127 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700128 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400129 "trialSettings": { # The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.
130 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
131 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
132 # - true — The plan is in trial.
133 # - false — The plan is not in trial.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700134 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400135 "skuId": "A String", # A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.
136 "resourceUiUrl": "A String", # URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.
137 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
138 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
139 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
140 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
141 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
142 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
143 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
144 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
145 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
146 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800147 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700148 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400149 "creationTime": "A String", # The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.
150 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
151 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
152 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
153 "minimumTransferableSeats": 42, # When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000154 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400155 "status": "A String", # This is an optional property.
156 "plan": { # The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts.
157 "planName": "A String", # The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.
158 #
159 # Possible values are:
160 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
161 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
162 # - FLEXIBLE — The flexible plan
163 # - TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService.
164 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
165 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
166 "startTime": "A String", # An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700167 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400168 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
169 # - true — The subscription's plan is an annual commitment plan.
170 # - false — The plan is not an annual commitment plan.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700171 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400172 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
173 "suspensionReasons": [ # Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.
174 #
175 # Possible options include:
176 # - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700177 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
178 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
179 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
180 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
181 "A String",
182 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400183 "subscriptionId": "A String", # The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions.
184 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
185 "customerId": "A String", # This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700186 }</pre>
187</div>
188
189<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400190 <code class="details" id="changePlan">changePlan(customerId, subscriptionId, body)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400191 <pre>Update a subscription plan. Use this method to update a plan for a 30-day trial or a flexible plan subscription to an annual commitment plan with monthly or yearly payments.
John Asmuth614db982014-04-24 15:46:26 -0400192
193Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400194 customerId: string, Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates. (required)
195 subscriptionId: string, This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method. (required)
John Asmuth614db982014-04-24 15:46:26 -0400196 body: object, The request body. (required)
197 The object takes the form of:
198
199{ # JSON template for the ChangePlan rpc request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400200 "planName": "A String", # The planName property is required. This is the name of the subscription's payment plan. For more information about the Google payment plans, see API concepts.
201 #
202 # Possible values are:
203 # - ANNUAL_MONTHLY_PAY - The annual commitment plan with monthly payments
204 # - ANNUAL_YEARLY_PAY - The annual commitment plan with yearly payments
205 # - FLEXIBLE - The flexible plan
206 # - TRIAL - The 30-day free trial plan
207 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in changePlan request in order to receive discounted rate. This property is optional. If a deal code has already been added to a subscription, this property may be left empty and the existing discounted rate will still apply (if not empty, only provide the deal code that is already present on the subscription). If a deal code has never been added to a subscription and this property is left blank, regular pricing will apply.
208 "kind": "subscriptions#changePlanRequest", # Identifies the resource as a subscription change plan request. Value: subscriptions#changePlanRequest
209 "seats": { # JSON template for subscription seats. # This is a required property. The seats property is the number of user seat licenses.
210 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
211 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
212 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
213 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
214 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
215 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
216 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
217 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
218 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800219 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
John Asmuth614db982014-04-24 15:46:26 -0400220 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400221 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
John Asmuth614db982014-04-24 15:46:26 -0400222 }
223
224
225Returns:
226 An object of the form:
227
228 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400229 "renewalSettings": { # JSON template for a subscription renewal settings. # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center.
230 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
231 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
John Asmuth614db982014-04-24 15:46:26 -0400232 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400233 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700234 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400235 "trialSettings": { # The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.
236 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
237 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
238 # - true — The plan is in trial.
239 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400240 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400241 "skuId": "A String", # A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.
242 "resourceUiUrl": "A String", # URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.
243 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
244 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
245 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
246 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
247 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
248 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
249 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
250 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
251 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
252 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800253 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
John Asmuth614db982014-04-24 15:46:26 -0400254 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400255 "creationTime": "A String", # The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.
256 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
257 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
258 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
259 "minimumTransferableSeats": 42, # When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000260 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400261 "status": "A String", # This is an optional property.
262 "plan": { # The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts.
263 "planName": "A String", # The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.
264 #
265 # Possible values are:
266 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
267 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
268 # - FLEXIBLE — The flexible plan
269 # - TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService.
270 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
271 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
272 "startTime": "A String", # An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.
John Asmuth614db982014-04-24 15:46:26 -0400273 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400274 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
275 # - true — The subscription's plan is an annual commitment plan.
276 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400277 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400278 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
279 "suspensionReasons": [ # Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.
280 #
281 # Possible options include:
282 # - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700283 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
284 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
285 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
286 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
287 "A String",
288 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400289 "subscriptionId": "A String", # The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions.
290 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
291 "customerId": "A String", # This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.
John Asmuth614db982014-04-24 15:46:26 -0400292 }</pre>
293</div>
294
295<div class="method">
296 <code class="details" id="changeRenewalSettings">changeRenewalSettings(customerId, subscriptionId, body)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400297 <pre>Update a user license's renewal settings. This is applicable for accounts with annual commitment plans only.
John Asmuth614db982014-04-24 15:46:26 -0400298
299Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400300 customerId: string, Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates. (required)
301 subscriptionId: string, This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method. (required)
John Asmuth614db982014-04-24 15:46:26 -0400302 body: object, The request body. (required)
303 The object takes the form of:
304
305{ # JSON template for a subscription renewal settings.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400306 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
307 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
John Asmuth614db982014-04-24 15:46:26 -0400308}
309
310
311Returns:
312 An object of the form:
313
314 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400315 "renewalSettings": { # JSON template for a subscription renewal settings. # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center.
316 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
317 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
John Asmuth614db982014-04-24 15:46:26 -0400318 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400319 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700320 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400321 "trialSettings": { # The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.
322 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
323 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
324 # - true — The plan is in trial.
325 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400326 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400327 "skuId": "A String", # A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.
328 "resourceUiUrl": "A String", # URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.
329 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
330 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
331 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
332 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
333 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
334 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
335 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
336 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
337 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
338 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800339 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
John Asmuth614db982014-04-24 15:46:26 -0400340 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400341 "creationTime": "A String", # The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.
342 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
343 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
344 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
345 "minimumTransferableSeats": 42, # When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000346 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400347 "status": "A String", # This is an optional property.
348 "plan": { # The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts.
349 "planName": "A String", # The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.
350 #
351 # Possible values are:
352 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
353 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
354 # - FLEXIBLE — The flexible plan
355 # - TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService.
356 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
357 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
358 "startTime": "A String", # An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.
John Asmuth614db982014-04-24 15:46:26 -0400359 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400360 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
361 # - true — The subscription's plan is an annual commitment plan.
362 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400363 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400364 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
365 "suspensionReasons": [ # Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.
366 #
367 # Possible options include:
368 # - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700369 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
370 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
371 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
372 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
373 "A String",
374 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400375 "subscriptionId": "A String", # The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions.
376 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
377 "customerId": "A String", # This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.
John Asmuth614db982014-04-24 15:46:26 -0400378 }</pre>
379</div>
380
381<div class="method">
382 <code class="details" id="changeSeats">changeSeats(customerId, subscriptionId, body)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400383 <pre>Update a subscription's user license settings.
John Asmuth614db982014-04-24 15:46:26 -0400384
385Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400386 customerId: string, Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates. (required)
387 subscriptionId: string, This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method. (required)
John Asmuth614db982014-04-24 15:46:26 -0400388 body: object, The request body. (required)
389 The object takes the form of:
390
391{ # JSON template for subscription seats.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400392 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
393 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
394 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
395 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
396 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
397 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
398 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
399 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
400 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800401 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
John Asmuth614db982014-04-24 15:46:26 -0400402}
403
404
405Returns:
406 An object of the form:
407
408 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400409 "renewalSettings": { # JSON template for a subscription renewal settings. # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center.
410 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
411 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
John Asmuth614db982014-04-24 15:46:26 -0400412 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400413 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700414 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400415 "trialSettings": { # The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.
416 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
417 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
418 # - true — The plan is in trial.
419 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400420 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400421 "skuId": "A String", # A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.
422 "resourceUiUrl": "A String", # URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.
423 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
424 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
425 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
426 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
427 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
428 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
429 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
430 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
431 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
432 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800433 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
John Asmuth614db982014-04-24 15:46:26 -0400434 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400435 "creationTime": "A String", # The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.
436 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
437 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
438 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
439 "minimumTransferableSeats": 42, # When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000440 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400441 "status": "A String", # This is an optional property.
442 "plan": { # The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts.
443 "planName": "A String", # The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.
444 #
445 # Possible values are:
446 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
447 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
448 # - FLEXIBLE — The flexible plan
449 # - TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService.
450 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
451 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
452 "startTime": "A String", # An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.
John Asmuth614db982014-04-24 15:46:26 -0400453 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400454 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
455 # - true — The subscription's plan is an annual commitment plan.
456 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400457 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400458 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
459 "suspensionReasons": [ # Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.
460 #
461 # Possible options include:
462 # - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700463 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
464 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
465 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
466 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
467 "A String",
468 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400469 "subscriptionId": "A String", # The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions.
470 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
471 "customerId": "A String", # This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.
John Asmuth614db982014-04-24 15:46:26 -0400472 }</pre>
473</div>
474
475<div class="method">
476 <code class="details" id="delete">delete(customerId, subscriptionId, deletionType)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400477 <pre>Cancel, suspend or transfer a subscription to direct.
John Asmuth614db982014-04-24 15:46:26 -0400478
479Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400480 customerId: string, Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates. (required)
481 subscriptionId: string, This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method. (required)
482 deletionType: string, The deletionType query string enables the cancellation, downgrade, or suspension of a subscription. (required)
John Asmuth614db982014-04-24 15:46:26 -0400483 Allowed values
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400484 cancel - Cancels the subscription immediately. This does not apply to a G Suite subscription.
485 downgrade - Downgrades a G Suite subscription to a Google Apps Free edition subscription only if the customer was initially subscribed to a Google Apps Free edition (also known as the Standard edition). Once downgraded, the customer no longer has access to the previous G Suite subscription and is no longer managed by the reseller.
486
487A G Suite subscription's downgrade cannot be invoked if an active or suspended Google Drive or Google Vault subscription is present. The Google Drive or Google Vault subscription must be cancelled before the G Suite subscription's downgrade is invoked.
488
489The downgrade deletionType does not apply to other products or G Suite SKUs.
490 suspend - (DEPRECATED) The G Suite account is suspended for four days and then cancelled. Once suspended, an administrator has access to the suspended account, but the account users can not access their services. A suspension can be lifted, using the reseller tools.
491
492A G Suite subscription's suspension can not be invoked if an active or suspended Google Drive or Google Vault subscription is present. The Google Drive or Google Vault subscription must be cancelled before the G Suite subscription's suspension is invoked.
493 transfer_to_direct - Transfers a subscription directly to Google.  The customer is immediately transferred to a direct billing relationship with Google and is given a short amount of time with no service interruption. The customer can then choose to set up billing directly with Google by using a credit card, or they can transfer to another reseller.
John Asmuth614db982014-04-24 15:46:26 -0400494</pre>
495</div>
496
497<div class="method">
498 <code class="details" id="get">get(customerId, subscriptionId)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400499 <pre>Get a specific subscription.
John Asmuth614db982014-04-24 15:46:26 -0400500
501Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400502 customerId: string, Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates. (required)
503 subscriptionId: string, This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method. (required)
John Asmuth614db982014-04-24 15:46:26 -0400504
505Returns:
506 An object of the form:
507
508 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400509 "renewalSettings": { # JSON template for a subscription renewal settings. # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center.
510 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
511 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
John Asmuth614db982014-04-24 15:46:26 -0400512 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400513 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700514 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400515 "trialSettings": { # The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.
516 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
517 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
518 # - true — The plan is in trial.
519 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400520 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400521 "skuId": "A String", # A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.
522 "resourceUiUrl": "A String", # URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.
523 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
524 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
525 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
526 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
527 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
528 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
529 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
530 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
531 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
532 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800533 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
John Asmuth614db982014-04-24 15:46:26 -0400534 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400535 "creationTime": "A String", # The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.
536 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
537 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
538 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
539 "minimumTransferableSeats": 42, # When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000540 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400541 "status": "A String", # This is an optional property.
542 "plan": { # The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts.
543 "planName": "A String", # The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.
544 #
545 # Possible values are:
546 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
547 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
548 # - FLEXIBLE — The flexible plan
549 # - TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService.
550 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
551 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
552 "startTime": "A String", # An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.
John Asmuth614db982014-04-24 15:46:26 -0400553 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400554 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
555 # - true — The subscription's plan is an annual commitment plan.
556 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400557 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400558 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
559 "suspensionReasons": [ # Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.
560 #
561 # Possible options include:
562 # - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700563 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
564 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
565 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
566 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
567 "A String",
568 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400569 "subscriptionId": "A String", # The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions.
570 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
571 "customerId": "A String", # This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.
John Asmuth614db982014-04-24 15:46:26 -0400572 }</pre>
573</div>
574
575<div class="method">
576 <code class="details" id="insert">insert(customerId, body, customerAuthToken=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400577 <pre>Create or transfer a subscription.
John Asmuth614db982014-04-24 15:46:26 -0400578
579Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400580 customerId: string, Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates. (required)
John Asmuth614db982014-04-24 15:46:26 -0400581 body: object, The request body. (required)
582 The object takes the form of:
583
584{ # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400585 "renewalSettings": { # JSON template for a subscription renewal settings. # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center.
586 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
587 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
John Asmuth614db982014-04-24 15:46:26 -0400588 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400589 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700590 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400591 "trialSettings": { # The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.
592 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
593 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
594 # - true — The plan is in trial.
595 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400596 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400597 "skuId": "A String", # A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.
598 "resourceUiUrl": "A String", # URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.
599 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
600 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
601 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
602 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
603 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
604 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
605 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
606 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
607 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
608 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800609 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
John Asmuth614db982014-04-24 15:46:26 -0400610 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400611 "creationTime": "A String", # The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.
612 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
613 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
614 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
615 "minimumTransferableSeats": 42, # When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000616 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400617 "status": "A String", # This is an optional property.
618 "plan": { # The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts.
619 "planName": "A String", # The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.
620 #
621 # Possible values are:
622 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
623 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
624 # - FLEXIBLE — The flexible plan
625 # - TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService.
626 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
627 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
628 "startTime": "A String", # An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.
John Asmuth614db982014-04-24 15:46:26 -0400629 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400630 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
631 # - true — The subscription's plan is an annual commitment plan.
632 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400633 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400634 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
635 "suspensionReasons": [ # Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.
636 #
637 # Possible options include:
638 # - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700639 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
640 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
641 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
642 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
643 "A String",
644 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400645 "subscriptionId": "A String", # The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions.
646 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
647 "customerId": "A String", # This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.
John Asmuth614db982014-04-24 15:46:26 -0400648 }
649
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400650 customerAuthToken: string, The customerAuthToken query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.
John Asmuth614db982014-04-24 15:46:26 -0400651
652Returns:
653 An object of the form:
654
655 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400656 "renewalSettings": { # JSON template for a subscription renewal settings. # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center.
657 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
658 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
John Asmuth614db982014-04-24 15:46:26 -0400659 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400660 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700661 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400662 "trialSettings": { # The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.
663 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
664 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
665 # - true — The plan is in trial.
666 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400667 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400668 "skuId": "A String", # A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.
669 "resourceUiUrl": "A String", # URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.
670 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
671 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
672 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
673 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
674 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
675 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
676 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
677 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
678 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
679 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800680 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
John Asmuth614db982014-04-24 15:46:26 -0400681 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400682 "creationTime": "A String", # The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.
683 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
684 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
685 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
686 "minimumTransferableSeats": 42, # When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000687 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400688 "status": "A String", # This is an optional property.
689 "plan": { # The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts.
690 "planName": "A String", # The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.
691 #
692 # Possible values are:
693 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
694 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
695 # - FLEXIBLE — The flexible plan
696 # - TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService.
697 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
698 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
699 "startTime": "A String", # An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.
John Asmuth614db982014-04-24 15:46:26 -0400700 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400701 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
702 # - true — The subscription's plan is an annual commitment plan.
703 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400704 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400705 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
706 "suspensionReasons": [ # Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.
707 #
708 # Possible options include:
709 # - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700710 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
711 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
712 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
713 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
714 "A String",
715 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400716 "subscriptionId": "A String", # The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions.
717 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
718 "customerId": "A String", # This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.
John Asmuth614db982014-04-24 15:46:26 -0400719 }</pre>
720</div>
721
722<div class="method">
723 <code class="details" id="list">list(customerAuthToken=None, pageToken=None, maxResults=None, customerNamePrefix=None, customerId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400724 <pre>List of subscriptions managed by the reseller. The list can be all subscriptions, all of a customer's subscriptions, or all of a customer's transferable subscriptions.
John Asmuth614db982014-04-24 15:46:26 -0400725
726Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400727 customerAuthToken: string, The customerAuthToken query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.
John Asmuth614db982014-04-24 15:46:26 -0400728 pageToken: string, Token to specify next page in the list
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400729 maxResults: integer, When retrieving a large list, the maxResults is the maximum number of results per page. The nextPageToken value takes you to the next page. The default is 20.
730 customerNamePrefix: string, When retrieving all of your subscriptions and filtering for specific customers, you can enter a prefix for a customer name. Using an example customer group that includes exam.com, example20.com and example.com:
731- exa -- Returns all customer names that start with 'exa' which could include exam.com, example20.com, and example.com. A name prefix is similar to using a regular expression's asterisk, exa*.
732- example -- Returns example20.com and example.com.
733 customerId: string, Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates.
John Asmuth614db982014-04-24 15:46:26 -0400734
735Returns:
736 An object of the form:
737
738 { # JSON template for a subscription list.
739 "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400740 "kind": "reseller#subscriptions", # Identifies the resource as a collection of subscriptions. Value: reseller#subscriptions
John Asmuth614db982014-04-24 15:46:26 -0400741 "subscriptions": [ # The subscriptions in this page of results.
742 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400743 "renewalSettings": { # JSON template for a subscription renewal settings. # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center.
744 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
745 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
John Asmuth614db982014-04-24 15:46:26 -0400746 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400747 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700748 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400749 "trialSettings": { # The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.
750 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
751 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
752 # - true — The plan is in trial.
753 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400754 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400755 "skuId": "A String", # A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.
756 "resourceUiUrl": "A String", # URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.
757 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
758 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
759 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
760 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
761 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
762 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
763 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
764 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
765 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
766 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800767 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
John Asmuth614db982014-04-24 15:46:26 -0400768 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400769 "creationTime": "A String", # The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.
770 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
771 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
772 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
773 "minimumTransferableSeats": 42, # When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000774 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400775 "status": "A String", # This is an optional property.
776 "plan": { # The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts.
777 "planName": "A String", # The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.
778 #
779 # Possible values are:
780 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
781 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
782 # - FLEXIBLE — The flexible plan
783 # - TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService.
784 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
785 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
786 "startTime": "A String", # An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.
John Asmuth614db982014-04-24 15:46:26 -0400787 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400788 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
789 # - true — The subscription's plan is an annual commitment plan.
790 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400791 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400792 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
793 "suspensionReasons": [ # Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.
794 #
795 # Possible options include:
796 # - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700797 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
798 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
799 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
800 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
801 "A String",
802 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400803 "subscriptionId": "A String", # The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions.
804 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
805 "customerId": "A String", # This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.
John Asmuth614db982014-04-24 15:46:26 -0400806 },
807 ],
808 }</pre>
809</div>
810
811<div class="method">
812 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
813 <pre>Retrieves the next page of results.
814
815Args:
816 previous_request: The request for the previous page. (required)
817 previous_response: The response from the request for the previous page. (required)
818
819Returns:
820 A request object that you can call 'execute()' on to request the next
821 page. Returns None if there are no more items in the collection.
822 </pre>
823</div>
824
825<div class="method">
826 <code class="details" id="startPaidService">startPaidService(customerId, subscriptionId)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400827 <pre>Immediately move a 30-day free trial subscription to a paid service subscription.
John Asmuth614db982014-04-24 15:46:26 -0400828
829Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400830 customerId: string, Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates. (required)
831 subscriptionId: string, This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method. (required)
John Asmuth614db982014-04-24 15:46:26 -0400832
833Returns:
834 An object of the form:
835
836 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400837 "renewalSettings": { # JSON template for a subscription renewal settings. # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center.
838 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
839 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
John Asmuth614db982014-04-24 15:46:26 -0400840 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400841 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700842 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400843 "trialSettings": { # The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.
844 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
845 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
846 # - true — The plan is in trial.
847 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400848 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400849 "skuId": "A String", # A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.
850 "resourceUiUrl": "A String", # URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.
851 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
852 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
853 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
854 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
855 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
856 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
857 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
858 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
859 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
860 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800861 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700862 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400863 "creationTime": "A String", # The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.
864 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
865 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
866 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
867 "minimumTransferableSeats": 42, # When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000868 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400869 "status": "A String", # This is an optional property.
870 "plan": { # The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts.
871 "planName": "A String", # The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.
872 #
873 # Possible values are:
874 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
875 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
876 # - FLEXIBLE — The flexible plan
877 # - TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService.
878 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
879 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
880 "startTime": "A String", # An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700881 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400882 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
883 # - true — The subscription's plan is an annual commitment plan.
884 # - false — The plan is not an annual commitment plan.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700885 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400886 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
887 "suspensionReasons": [ # Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.
888 #
889 # Possible options include:
890 # - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700891 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
892 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
893 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
894 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
895 "A String",
896 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400897 "subscriptionId": "A String", # The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions.
898 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
899 "customerId": "A String", # This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700900 }</pre>
901</div>
902
903<div class="method">
904 <code class="details" id="suspend">suspend(customerId, subscriptionId)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400905 <pre>Suspends an active subscription.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700906
907Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400908 customerId: string, Either the customer's primary domain name or the customer's unique identifier. If using the domain name, we do not recommend using a customerId as a key for persistent data. If the domain name for a customerId is changed, the Google system automatically updates. (required)
909 subscriptionId: string, This is a required property. The subscriptionId is the subscription identifier and is unique for each customer. Since a subscriptionId changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the subscriptionId can be found using the retrieve all reseller subscriptions method. (required)
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700910
911Returns:
912 An object of the form:
913
914 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400915 "renewalSettings": { # JSON template for a subscription renewal settings. # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center.
916 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
917 "renewalType": "A String", # Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the renewalType is a required property.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700918 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400919 "dealCode": "A String", # Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in insert requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700920 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400921 "trialSettings": { # The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.
922 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
923 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
924 # - true — The plan is in trial.
925 # - false — The plan is not in trial.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700926 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400927 "skuId": "A String", # A required property. The skuId is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.
928 "resourceUiUrl": "A String", # URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.
929 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
930 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
931 "numberOfSeats": 42, # The numberOfSeats property holds the customer's number of user licenses. How a user's licenses are managed depends on the subscription's plan:
932 # - annual commitment plan (with monthly or yearly pay) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. This is the maximum number of user licenses that a reseller's customer can create. The reseller can add more licenses, but once set, the numberOfSeats can not be reduced until renewal. The reseller is invoiced based on the numberOfSeats value regardless of how many of these user licenses are provisioned users.
933 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. The numberOfSeats property is not used in the request or response for flexible plan customers.
934 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
935 "maximumNumberOfSeats": 42, # The maximumNumberOfSeats property is the maximum number of licenses that the customer can purchase. This property applies to plans other than the annual commitment plan. How a user's licenses are managed depends on the subscription's payment plan:
936 # - annual commitment plan (with monthly or yearly payments) — For this plan, a reseller is invoiced on the number of user licenses in the numberOfSeats property. The maximumNumberOfSeats property is a read-only property in the API's response.
937 # - flexible plan — For this plan, a reseller is invoiced on the actual number of users which is capped by the maximumNumberOfSeats. This is the maximum number of user licenses a customer has for user license provisioning. This quantity can be increased up to the maximum limit defined in the reseller's contract. And the minimum quantity is the current number of users in the customer account.
938 # - 30-day free trial plan — A subscription in a 30-day free trial is restricted to maximum 10 seats.
Craig Citroe633be12015-03-02 13:40:36 -0800939 "licensedNumberOfSeats": 42, # Read-only field containing the current number of licensed seats for FLEXIBLE Google-Apps subscriptions and secondary subscriptions such as Google-Vault and Drive-storage.
John Asmuth614db982014-04-24 15:46:26 -0400940 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400941 "creationTime": "A String", # The creationTime property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.
942 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
943 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
944 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
945 "minimumTransferableSeats": 42, # When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000946 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400947 "status": "A String", # This is an optional property.
948 "plan": { # The plan property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API"s payment plans, see the API concepts.
949 "planName": "A String", # The planName property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts.
950 #
951 # Possible values are:
952 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
953 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
954 # - FLEXIBLE — The flexible plan
955 # - TRIAL — The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling changePlan will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling startPaidService.
956 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
957 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
958 "startTime": "A String", # An annual commitment plan's interval's startTime in milliseconds using UNIX Epoch format. See an example Epoch converter.
John Asmuth614db982014-04-24 15:46:26 -0400959 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400960 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
961 # - true — The subscription's plan is an annual commitment plan.
962 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400963 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400964 "purchaseOrderId": "A String", # This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.
965 "suspensionReasons": [ # Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's STATUS is SUSPENDED until all pending suspensions are removed.
966 #
967 # Possible options include:
968 # - PENDING_TOS_ACCEPTANCE - The customer has not logged in and accepted the G Suite Resold Terms of Services.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700969 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
970 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
971 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
972 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
973 "A String",
974 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400975 "subscriptionId": "A String", # The subscriptionId is the subscription identifier and is unique for each customer. This is a required property. Since a subscriptionId changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the subscriptionId as described in retrieve all reseller subscriptions.
976 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
977 "customerId": "A String", # This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.
John Asmuth614db982014-04-24 15:46:26 -0400978 }</pre>
979</div>
980
981</body></html>