blob: 19a66faa1d5b4818447db420d2062fb370d2cc48 [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
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700151 "skuName": "A String", # Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400152 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
153 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
154 "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 +0000155 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400156 "status": "A String", # This is an optional property.
157 "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.
158 "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.
159 #
160 # Possible values are:
161 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
162 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
163 # - FLEXIBLE — The flexible plan
164 # - 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.
165 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
166 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
167 "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 -0700168 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400169 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
170 # - true — The subscription's plan is an annual commitment plan.
171 # - false — The plan is not an annual commitment plan.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700172 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400173 "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.
174 "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.
175 #
176 # Possible options include:
177 # - 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 -0700178 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
179 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
180 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
181 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
182 "A String",
183 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400184 "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.
185 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
186 "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 -0700187 }</pre>
188</div>
189
190<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400191 <code class="details" id="changePlan">changePlan(customerId, subscriptionId, body)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400192 <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 -0400193
194Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400195 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)
196 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 -0400197 body: object, The request body. (required)
198 The object takes the form of:
199
200{ # JSON template for the ChangePlan rpc request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400201 "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.
202 #
203 # Possible values are:
204 # - ANNUAL_MONTHLY_PAY - The annual commitment plan with monthly payments
205 # - ANNUAL_YEARLY_PAY - The annual commitment plan with yearly payments
206 # - FLEXIBLE - The flexible plan
207 # - TRIAL - The 30-day free trial plan
208 "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.
209 "kind": "subscriptions#changePlanRequest", # Identifies the resource as a subscription change plan request. Value: subscriptions#changePlanRequest
210 "seats": { # JSON template for subscription seats. # This is a required property. The seats property is the number of user seat licenses.
211 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
212 "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:
213 # - 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.
214 # - 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.
215 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
216 "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:
217 # - 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.
218 # - 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.
219 # - 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 -0800220 "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 -0400221 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400222 "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 -0400223 }
224
225
226Returns:
227 An object of the form:
228
229 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400230 "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.
231 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
232 "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 -0400233 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400234 "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 -0700235 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400236 "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.
237 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
238 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
239 # - true — The plan is in trial.
240 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400241 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400242 "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.
243 "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.
244 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
245 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
246 "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:
247 # - 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.
248 # - 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.
249 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
250 "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:
251 # - 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.
252 # - 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.
253 # - 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 -0800254 "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 -0400255 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400256 "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.
257 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700258 "skuName": "A String", # Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400259 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
260 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
261 "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 +0000262 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400263 "status": "A String", # This is an optional property.
264 "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.
265 "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.
266 #
267 # Possible values are:
268 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
269 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
270 # - FLEXIBLE — The flexible plan
271 # - 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.
272 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
273 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
274 "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 -0400275 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400276 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
277 # - true — The subscription's plan is an annual commitment plan.
278 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400279 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400280 "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.
281 "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.
282 #
283 # Possible options include:
284 # - 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 -0700285 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
286 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
287 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
288 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
289 "A String",
290 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400291 "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.
292 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
293 "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 -0400294 }</pre>
295</div>
296
297<div class="method">
298 <code class="details" id="changeRenewalSettings">changeRenewalSettings(customerId, subscriptionId, body)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400299 <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 -0400300
301Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400302 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)
303 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 -0400304 body: object, The request body. (required)
305 The object takes the form of:
306
307{ # JSON template for a subscription renewal settings.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400308 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
309 "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 -0400310}
311
312
313Returns:
314 An object of the form:
315
316 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400317 "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.
318 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
319 "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 -0400320 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400321 "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 -0700322 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400323 "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.
324 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
325 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
326 # - true — The plan is in trial.
327 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400328 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400329 "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.
330 "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.
331 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
332 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
333 "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:
334 # - 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.
335 # - 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.
336 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
337 "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:
338 # - 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.
339 # - 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.
340 # - 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 -0800341 "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 -0400342 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400343 "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.
344 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700345 "skuName": "A String", # Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400346 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
347 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
348 "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 +0000349 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400350 "status": "A String", # This is an optional property.
351 "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.
352 "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.
353 #
354 # Possible values are:
355 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
356 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
357 # - FLEXIBLE — The flexible plan
358 # - 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.
359 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
360 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
361 "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 -0400362 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400363 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
364 # - true — The subscription's plan is an annual commitment plan.
365 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400366 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400367 "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.
368 "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.
369 #
370 # Possible options include:
371 # - 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 -0700372 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
373 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
374 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
375 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
376 "A String",
377 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400378 "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.
379 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
380 "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 -0400381 }</pre>
382</div>
383
384<div class="method">
385 <code class="details" id="changeSeats">changeSeats(customerId, subscriptionId, body)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400386 <pre>Update a subscription's user license settings.
John Asmuth614db982014-04-24 15:46:26 -0400387
388Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400389 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)
390 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 -0400391 body: object, The request body. (required)
392 The object takes the form of:
393
394{ # JSON template for subscription seats.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400395 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
396 "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:
397 # - 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.
398 # - 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.
399 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
400 "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:
401 # - 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.
402 # - 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.
403 # - 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 -0800404 "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 -0400405}
406
407
408Returns:
409 An object of the form:
410
411 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400412 "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.
413 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
414 "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 -0400415 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400416 "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 -0700417 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400418 "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.
419 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
420 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
421 # - true — The plan is in trial.
422 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400423 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400424 "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.
425 "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.
426 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
427 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
428 "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:
429 # - 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.
430 # - 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.
431 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
432 "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:
433 # - 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.
434 # - 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.
435 # - 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 -0800436 "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 -0400437 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400438 "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.
439 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700440 "skuName": "A String", # Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400441 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
442 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
443 "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 +0000444 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400445 "status": "A String", # This is an optional property.
446 "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.
447 "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.
448 #
449 # Possible values are:
450 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
451 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
452 # - FLEXIBLE — The flexible plan
453 # - 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.
454 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
455 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
456 "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 -0400457 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400458 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
459 # - true — The subscription's plan is an annual commitment plan.
460 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400461 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400462 "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.
463 "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.
464 #
465 # Possible options include:
466 # - 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 -0700467 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
468 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
469 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
470 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
471 "A String",
472 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400473 "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.
474 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
475 "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 -0400476 }</pre>
477</div>
478
479<div class="method">
480 <code class="details" id="delete">delete(customerId, subscriptionId, deletionType)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400481 <pre>Cancel, suspend or transfer a subscription to direct.
John Asmuth614db982014-04-24 15:46:26 -0400482
483Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400484 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)
485 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)
486 deletionType: string, The deletionType query string enables the cancellation, downgrade, or suspension of a subscription. (required)
John Asmuth614db982014-04-24 15:46:26 -0400487 Allowed values
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400488 cancel - Cancels the subscription immediately. This does not apply to a G Suite subscription.
489 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.
490
491A 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.
492
493The downgrade deletionType does not apply to other products or G Suite SKUs.
494 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.
495
496A 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.
497 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 -0400498</pre>
499</div>
500
501<div class="method">
502 <code class="details" id="get">get(customerId, subscriptionId)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400503 <pre>Get a specific subscription.
John Asmuth614db982014-04-24 15:46:26 -0400504
505Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400506 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)
507 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 -0400508
509Returns:
510 An object of the form:
511
512 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400513 "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.
514 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
515 "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 -0400516 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400517 "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 -0700518 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400519 "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.
520 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
521 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
522 # - true — The plan is in trial.
523 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400524 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400525 "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.
526 "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.
527 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
528 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
529 "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:
530 # - 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.
531 # - 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.
532 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
533 "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:
534 # - 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.
535 # - 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.
536 # - 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 -0800537 "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 -0400538 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400539 "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.
540 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700541 "skuName": "A String", # Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400542 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
543 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
544 "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 +0000545 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400546 "status": "A String", # This is an optional property.
547 "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.
548 "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.
549 #
550 # Possible values are:
551 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
552 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
553 # - FLEXIBLE — The flexible plan
554 # - 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.
555 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
556 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
557 "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 -0400558 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400559 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
560 # - true — The subscription's plan is an annual commitment plan.
561 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400562 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400563 "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.
564 "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.
565 #
566 # Possible options include:
567 # - 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 -0700568 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
569 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
570 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
571 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
572 "A String",
573 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400574 "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.
575 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
576 "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 -0400577 }</pre>
578</div>
579
580<div class="method">
581 <code class="details" id="insert">insert(customerId, body, customerAuthToken=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400582 <pre>Create or transfer a subscription.
John Asmuth614db982014-04-24 15:46:26 -0400583
584Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400585 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 -0400586 body: object, The request body. (required)
587 The object takes the form of:
588
589{ # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400590 "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.
591 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
592 "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 -0400593 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400594 "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 -0700595 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400596 "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.
597 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
598 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
599 # - true — The plan is in trial.
600 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400601 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400602 "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.
603 "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.
604 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
605 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
606 "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:
607 # - 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.
608 # - 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.
609 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
610 "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:
611 # - 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.
612 # - 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.
613 # - 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 -0800614 "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 -0400615 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400616 "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.
617 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700618 "skuName": "A String", # Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400619 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
620 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
621 "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 +0000622 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400623 "status": "A String", # This is an optional property.
624 "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.
625 "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.
626 #
627 # Possible values are:
628 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
629 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
630 # - FLEXIBLE — The flexible plan
631 # - 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.
632 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
633 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
634 "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 -0400635 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400636 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
637 # - true — The subscription's plan is an annual commitment plan.
638 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400639 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400640 "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.
641 "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.
642 #
643 # Possible options include:
644 # - 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 -0700645 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
646 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
647 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
648 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
649 "A String",
650 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400651 "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.
652 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
653 "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 -0400654 }
655
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400656 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 -0400657
658Returns:
659 An object of the form:
660
661 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400662 "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.
663 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
664 "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 -0400665 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400666 "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 -0700667 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400668 "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.
669 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
670 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
671 # - true — The plan is in trial.
672 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400673 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400674 "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.
675 "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.
676 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
677 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
678 "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:
679 # - 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.
680 # - 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.
681 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
682 "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:
683 # - 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.
684 # - 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.
685 # - 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 -0800686 "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 -0400687 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400688 "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.
689 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700690 "skuName": "A String", # Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400691 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
692 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
693 "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 +0000694 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400695 "status": "A String", # This is an optional property.
696 "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.
697 "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.
698 #
699 # Possible values are:
700 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
701 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
702 # - FLEXIBLE — The flexible plan
703 # - 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.
704 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
705 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
706 "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 -0400707 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400708 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
709 # - true — The subscription's plan is an annual commitment plan.
710 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400711 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400712 "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.
713 "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.
714 #
715 # Possible options include:
716 # - 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 -0700717 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
718 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
719 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
720 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
721 "A String",
722 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400723 "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.
724 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
725 "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 -0400726 }</pre>
727</div>
728
729<div class="method">
730 <code class="details" id="list">list(customerAuthToken=None, pageToken=None, maxResults=None, customerNamePrefix=None, customerId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400731 <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 -0400732
733Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400734 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 -0400735 pageToken: string, Token to specify next page in the list
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400736 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.
737 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:
738- 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*.
739- example -- Returns example20.com and example.com.
740 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 -0400741
742Returns:
743 An object of the form:
744
745 { # JSON template for a subscription list.
746 "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 -0400747 "kind": "reseller#subscriptions", # Identifies the resource as a collection of subscriptions. Value: reseller#subscriptions
John Asmuth614db982014-04-24 15:46:26 -0400748 "subscriptions": [ # The subscriptions in this page of results.
749 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400750 "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.
751 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
752 "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 -0400753 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400754 "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 -0700755 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400756 "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.
757 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
758 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
759 # - true — The plan is in trial.
760 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400761 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400762 "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.
763 "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.
764 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
765 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
766 "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:
767 # - 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.
768 # - 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.
769 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
770 "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:
771 # - 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.
772 # - 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.
773 # - 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 -0800774 "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 -0400775 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400776 "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.
777 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700778 "skuName": "A String", # Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400779 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
780 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
781 "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 +0000782 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400783 "status": "A String", # This is an optional property.
784 "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.
785 "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.
786 #
787 # Possible values are:
788 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
789 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
790 # - FLEXIBLE — The flexible plan
791 # - 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.
792 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
793 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
794 "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 -0400795 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400796 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
797 # - true — The subscription's plan is an annual commitment plan.
798 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400799 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400800 "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.
801 "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.
802 #
803 # Possible options include:
804 # - 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 -0700805 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
806 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
807 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
808 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
809 "A String",
810 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400811 "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.
812 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
813 "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 -0400814 },
815 ],
816 }</pre>
817</div>
818
819<div class="method">
820 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
821 <pre>Retrieves the next page of results.
822
823Args:
824 previous_request: The request for the previous page. (required)
825 previous_response: The response from the request for the previous page. (required)
826
827Returns:
828 A request object that you can call 'execute()' on to request the next
829 page. Returns None if there are no more items in the collection.
830 </pre>
831</div>
832
833<div class="method">
834 <code class="details" id="startPaidService">startPaidService(customerId, subscriptionId)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400835 <pre>Immediately move a 30-day free trial subscription to a paid service subscription.
John Asmuth614db982014-04-24 15:46:26 -0400836
837Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400838 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)
839 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 -0400840
841Returns:
842 An object of the form:
843
844 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400845 "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.
846 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
847 "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 -0400848 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400849 "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 -0700850 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400851 "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.
852 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
853 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
854 # - true — The plan is in trial.
855 # - false — The plan is not in trial.
John Asmuth614db982014-04-24 15:46:26 -0400856 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400857 "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.
858 "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.
859 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
860 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
861 "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:
862 # - 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.
863 # - 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.
864 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
865 "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:
866 # - 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.
867 # - 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.
868 # - 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 -0800869 "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 -0700870 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400871 "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.
872 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700873 "skuName": "A String", # Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400874 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
875 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
876 "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 +0000877 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400878 "status": "A String", # This is an optional property.
879 "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.
880 "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.
881 #
882 # Possible values are:
883 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
884 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
885 # - FLEXIBLE — The flexible plan
886 # - 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.
887 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
888 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
889 "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 -0700890 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400891 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
892 # - true — The subscription's plan is an annual commitment plan.
893 # - false — The plan is not an annual commitment plan.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700894 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400895 "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.
896 "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.
897 #
898 # Possible options include:
899 # - 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 -0700900 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
901 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
902 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
903 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
904 "A String",
905 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400906 "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.
907 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
908 "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 -0700909 }</pre>
910</div>
911
912<div class="method">
913 <code class="details" id="suspend">suspend(customerId, subscriptionId)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400914 <pre>Suspends an active subscription.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700915
916Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400917 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)
918 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 -0700919
920Returns:
921 An object of the form:
922
923 { # JSON template for a subscription.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400924 "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.
925 "kind": "subscriptions#renewalSettings", # Identifies the resource as a subscription renewal setting. Value: subscriptions#renewalSettings
926 "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 -0700927 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400928 "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 -0700929 "customerDomain": "A String", # Primary domain name of the customer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400930 "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.
931 "trialEndTime": "A String", # Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
932 "isInTrial": True or False, # Determines if a subscription's plan is in a 30-day free trial or not:
933 # - true — The plan is in trial.
934 # - false — The plan is not in trial.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700935 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400936 "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.
937 "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.
938 "seats": { # JSON template for subscription seats. # This is a required property. The number and limit of user seat licenses in the plan.
939 "kind": "subscriptions#seats", # Identifies the resource as a subscription change plan request. Value: subscriptions#seats
940 "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:
941 # - 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.
942 # - 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.
943 # - 30-day free trial plan — The numberOfSeats property is not used in the request or response for an account in a 30-day trial.
944 "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:
945 # - 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.
946 # - 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.
947 # - 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 -0800948 "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 -0400949 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400950 "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.
951 "kind": "reseller#subscription", # Identifies the resource as a Subscription. Value: reseller#subscription
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700952 "skuName": "A String", # Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400953 "transferInfo": { # Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.
954 "transferabilityExpirationTime": "A String", # The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.
955 "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 +0000956 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400957 "status": "A String", # This is an optional property.
958 "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.
959 "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.
960 #
961 # Possible values are:
962 # - ANNUAL_MONTHLY_PAY — The annual commitment plan with monthly payments
963 # - ANNUAL_YEARLY_PAY — The annual commitment plan with yearly payments
964 # - FLEXIBLE — The flexible plan
965 # - 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.
966 "commitmentInterval": { # In this version of the API, annual commitment plan's interval is one year.
967 "endTime": "A String", # An annual commitment plan's interval's endTime in milliseconds using the UNIX Epoch format. See an example Epoch converter.
968 "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 -0400969 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400970 "isCommitmentPlan": True or False, # The isCommitmentPlan property's boolean value identifies the plan as an annual commitment plan:
971 # - true — The subscription's plan is an annual commitment plan.
972 # - false — The plan is not an annual commitment plan.
John Asmuth614db982014-04-24 15:46:26 -0400973 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400974 "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.
975 "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.
976 #
977 # Possible options include:
978 # - 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 -0700979 # - RENEWAL_WITH_TYPE_CANCEL - The customer's commitment ended and their service was cancelled at the end of their term.
980 # - RESELLER_INITIATED - A manual suspension invoked by a Reseller.
981 # - TRIAL_ENDED - The customer's trial expired without a plan selected.
982 # - OTHER - The customer is suspended for an internal Google reason (e.g. abuse or otherwise).
983 "A String",
984 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400985 "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.
986 "billingMethod": "A String", # Read-only field that returns the current billing method for a subscription.
987 "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 -0400988 }</pre>
989</div>
990
991</body></html>