1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service; 19 20use Google\Client; 21 22/** 23 * Service definition for PaymentsResellerSubscription (v1). 24 * 25 * <p> 26</p> 27 * 28 * <p> 29 * For more information about this service, see the API 30 * <a href="https://developers.google.com/payments/reseller/subscription/" target="_blank">Documentation</a> 31 * </p> 32 * 33 * @author Google, Inc. 34 */ 35class PaymentsResellerSubscription extends \Google\Service 36{ 37 38 39 public $partners_products; 40 public $partners_promotions; 41 public $partners_subscriptions; 42 43 /** 44 * Constructs the internal representation of the PaymentsResellerSubscription 45 * service. 46 * 47 * @param Client|array $clientOrConfig The client used to deliver requests, or a 48 * config array to pass to a new Client instance. 49 * @param string $rootUrl The root URL used for requests to the service. 50 */ 51 public function __construct($clientOrConfig = [], $rootUrl = null) 52 { 53 parent::__construct($clientOrConfig); 54 $this->rootUrl = $rootUrl ?: 'https://paymentsresellersubscription.googleapis.com/'; 55 $this->servicePath = ''; 56 $this->batchPath = 'batch'; 57 $this->version = 'v1'; 58 $this->serviceName = 'paymentsresellersubscription'; 59 60 $this->partners_products = new PaymentsResellerSubscription\Resource\PartnersProducts( 61 $this, 62 $this->serviceName, 63 'products', 64 [ 65 'methods' => [ 66 'list' => [ 67 'path' => 'v1/{+parent}/products', 68 'httpMethod' => 'GET', 69 'parameters' => [ 70 'parent' => [ 71 'location' => 'path', 72 'type' => 'string', 73 'required' => true, 74 ], 75 'pageSize' => [ 76 'location' => 'query', 77 'type' => 'integer', 78 ], 79 'pageToken' => [ 80 'location' => 'query', 81 'type' => 'string', 82 ], 83 ], 84 ], 85 ] 86 ] 87 ); 88 $this->partners_promotions = new PaymentsResellerSubscription\Resource\PartnersPromotions( 89 $this, 90 $this->serviceName, 91 'promotions', 92 [ 93 'methods' => [ 94 'list' => [ 95 'path' => 'v1/{+parent}/promotions', 96 'httpMethod' => 'GET', 97 'parameters' => [ 98 'parent' => [ 99 'location' => 'path', 100 'type' => 'string', 101 'required' => true, 102 ], 103 'filter' => [ 104 'location' => 'query', 105 'type' => 'string', 106 ], 107 'pageSize' => [ 108 'location' => 'query', 109 'type' => 'integer', 110 ], 111 'pageToken' => [ 112 'location' => 'query', 113 'type' => 'string', 114 ], 115 ], 116 ], 117 ] 118 ] 119 ); 120 $this->partners_subscriptions = new PaymentsResellerSubscription\Resource\PartnersSubscriptions( 121 $this, 122 $this->serviceName, 123 'subscriptions', 124 [ 125 'methods' => [ 126 'cancel' => [ 127 'path' => 'v1/{+name}:cancel', 128 'httpMethod' => 'POST', 129 'parameters' => [ 130 'name' => [ 131 'location' => 'path', 132 'type' => 'string', 133 'required' => true, 134 ], 135 ], 136 ],'create' => [ 137 'path' => 'v1/{+parent}/subscriptions', 138 'httpMethod' => 'POST', 139 'parameters' => [ 140 'parent' => [ 141 'location' => 'path', 142 'type' => 'string', 143 'required' => true, 144 ], 145 'subscriptionId' => [ 146 'location' => 'query', 147 'type' => 'string', 148 ], 149 ], 150 ],'entitle' => [ 151 'path' => 'v1/{+name}:entitle', 152 'httpMethod' => 'POST', 153 'parameters' => [ 154 'name' => [ 155 'location' => 'path', 156 'type' => 'string', 157 'required' => true, 158 ], 159 ], 160 ],'extend' => [ 161 'path' => 'v1/{+name}:extend', 162 'httpMethod' => 'POST', 163 'parameters' => [ 164 'name' => [ 165 'location' => 'path', 166 'type' => 'string', 167 'required' => true, 168 ], 169 ], 170 ],'get' => [ 171 'path' => 'v1/{+name}', 172 'httpMethod' => 'GET', 173 'parameters' => [ 174 'name' => [ 175 'location' => 'path', 176 'type' => 'string', 177 'required' => true, 178 ], 179 ], 180 ],'provision' => [ 181 'path' => 'v1/{+parent}/subscriptions:provision', 182 'httpMethod' => 'POST', 183 'parameters' => [ 184 'parent' => [ 185 'location' => 'path', 186 'type' => 'string', 187 'required' => true, 188 ], 189 'subscriptionId' => [ 190 'location' => 'query', 191 'type' => 'string', 192 ], 193 ], 194 ],'undoCancel' => [ 195 'path' => 'v1/{+name}:undoCancel', 196 'httpMethod' => 'POST', 197 'parameters' => [ 198 'name' => [ 199 'location' => 'path', 200 'type' => 'string', 201 'required' => true, 202 ], 203 ], 204 ], 205 ] 206 ] 207 ); 208 } 209} 210 211// Adding a class alias for backwards compatibility with the previous class name. 212class_alias(PaymentsResellerSubscription::class, 'Google_Service_PaymentsResellerSubscription'); 213