[e3d4e0a] | 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 |
|
---|
| 18 | namespace Google\Service\Walletobjects\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Walletobjects\AddMessageRequest;
|
---|
| 21 | use Google\Service\Walletobjects\LoyaltyObject as LoyaltyObjectModel;
|
---|
| 22 | use Google\Service\Walletobjects\LoyaltyObjectAddMessageResponse;
|
---|
| 23 | use Google\Service\Walletobjects\LoyaltyObjectListResponse;
|
---|
| 24 | use Google\Service\Walletobjects\ModifyLinkedOfferObjectsRequest;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "loyaltyobject" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $walletobjectsService = new Google\Service\Walletobjects(...);
|
---|
| 31 | * $loyaltyobject = $walletobjectsService->loyaltyobject;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class Loyaltyobject extends \Google\Service\Resource
|
---|
| 35 | {
|
---|
| 36 | /**
|
---|
| 37 | * Adds a message to the loyalty object referenced by the given object ID.
|
---|
| 38 | * (loyaltyobject.addmessage)
|
---|
| 39 | *
|
---|
| 40 | * @param string $resourceId The unique identifier for an object. This ID must
|
---|
| 41 | * be unique across all objects from an issuer. This value should follow the
|
---|
| 42 | * format issuer ID. identifier where the former is issued by Google and latter
|
---|
| 43 | * is chosen by you. Your unique identifier should only include alphanumeric
|
---|
| 44 | * characters, '.', '_', or '-'.
|
---|
| 45 | * @param AddMessageRequest $postBody
|
---|
| 46 | * @param array $optParams Optional parameters.
|
---|
| 47 | * @return LoyaltyObjectAddMessageResponse
|
---|
| 48 | * @throws \Google\Service\Exception
|
---|
| 49 | */
|
---|
| 50 | public function addmessage($resourceId, AddMessageRequest $postBody, $optParams = [])
|
---|
| 51 | {
|
---|
| 52 | $params = ['resourceId' => $resourceId, 'postBody' => $postBody];
|
---|
| 53 | $params = array_merge($params, $optParams);
|
---|
| 54 | return $this->call('addmessage', [$params], LoyaltyObjectAddMessageResponse::class);
|
---|
| 55 | }
|
---|
| 56 | /**
|
---|
| 57 | * Returns the loyalty object with the given object ID. (loyaltyobject.get)
|
---|
| 58 | *
|
---|
| 59 | * @param string $resourceId The unique identifier for an object. This ID must
|
---|
| 60 | * be unique across all objects from an issuer. This value should follow the
|
---|
| 61 | * format issuer ID. identifier where the former is issued by Google and latter
|
---|
| 62 | * is chosen by you. Your unique identifier should only include alphanumeric
|
---|
| 63 | * characters, '.', '_', or '-'.
|
---|
| 64 | * @param array $optParams Optional parameters.
|
---|
| 65 | * @return LoyaltyObjectModel
|
---|
| 66 | * @throws \Google\Service\Exception
|
---|
| 67 | */
|
---|
| 68 | public function get($resourceId, $optParams = [])
|
---|
| 69 | {
|
---|
| 70 | $params = ['resourceId' => $resourceId];
|
---|
| 71 | $params = array_merge($params, $optParams);
|
---|
| 72 | return $this->call('get', [$params], LoyaltyObjectModel::class);
|
---|
| 73 | }
|
---|
| 74 | /**
|
---|
| 75 | * Inserts an loyalty object with the given ID and properties.
|
---|
| 76 | * (loyaltyobject.insert)
|
---|
| 77 | *
|
---|
| 78 | * @param LoyaltyObjectModel $postBody
|
---|
| 79 | * @param array $optParams Optional parameters.
|
---|
| 80 | * @return LoyaltyObjectModel
|
---|
| 81 | * @throws \Google\Service\Exception
|
---|
| 82 | */
|
---|
| 83 | public function insert(LoyaltyObjectModel $postBody, $optParams = [])
|
---|
| 84 | {
|
---|
| 85 | $params = ['postBody' => $postBody];
|
---|
| 86 | $params = array_merge($params, $optParams);
|
---|
| 87 | return $this->call('insert', [$params], LoyaltyObjectModel::class);
|
---|
| 88 | }
|
---|
| 89 | /**
|
---|
| 90 | * Returns a list of all loyalty objects for a given issuer ID.
|
---|
| 91 | * (loyaltyobject.listLoyaltyobject)
|
---|
| 92 | *
|
---|
| 93 | * @param array $optParams Optional parameters.
|
---|
| 94 | *
|
---|
| 95 | * @opt_param string classId The ID of the class whose objects will be listed.
|
---|
| 96 | * @opt_param int maxResults Identifies the max number of results returned by a
|
---|
| 97 | * list. All results are returned if `maxResults` isn't defined.
|
---|
| 98 | * @opt_param string token Used to get the next set of results if `maxResults`
|
---|
| 99 | * is specified, but more than `maxResults` objects are available in a list. For
|
---|
| 100 | * example, if you have a list of 200 objects and you call list with
|
---|
| 101 | * `maxResults` set to 20, list will return the first 20 objects and a token.
|
---|
| 102 | * Call list again with `maxResults` set to 20 and the token to get the next 20
|
---|
| 103 | * objects.
|
---|
| 104 | * @return LoyaltyObjectListResponse
|
---|
| 105 | * @throws \Google\Service\Exception
|
---|
| 106 | */
|
---|
| 107 | public function listLoyaltyobject($optParams = [])
|
---|
| 108 | {
|
---|
| 109 | $params = [];
|
---|
| 110 | $params = array_merge($params, $optParams);
|
---|
| 111 | return $this->call('list', [$params], LoyaltyObjectListResponse::class);
|
---|
| 112 | }
|
---|
| 113 | /**
|
---|
| 114 | * Modifies linked offer objects for the loyalty object with the given ID.
|
---|
| 115 | * (loyaltyobject.modifylinkedofferobjects)
|
---|
| 116 | *
|
---|
| 117 | * @param string $resourceId The unique identifier for an object. This ID must
|
---|
| 118 | * be unique across all objects from an issuer. This value should follow the
|
---|
| 119 | * format issuer ID. identifier where the former is issued by Google and latter
|
---|
| 120 | * is chosen by you. Your unique identifier should only include alphanumeric
|
---|
| 121 | * characters, '.', '_', or '-'.
|
---|
| 122 | * @param ModifyLinkedOfferObjectsRequest $postBody
|
---|
| 123 | * @param array $optParams Optional parameters.
|
---|
| 124 | * @return LoyaltyObjectModel
|
---|
| 125 | * @throws \Google\Service\Exception
|
---|
| 126 | */
|
---|
| 127 | public function modifylinkedofferobjects($resourceId, ModifyLinkedOfferObjectsRequest $postBody, $optParams = [])
|
---|
| 128 | {
|
---|
| 129 | $params = ['resourceId' => $resourceId, 'postBody' => $postBody];
|
---|
| 130 | $params = array_merge($params, $optParams);
|
---|
| 131 | return $this->call('modifylinkedofferobjects', [$params], LoyaltyObjectModel::class);
|
---|
| 132 | }
|
---|
| 133 | /**
|
---|
| 134 | * Updates the loyalty object referenced by the given object ID. This method
|
---|
| 135 | * supports patch semantics. (loyaltyobject.patch)
|
---|
| 136 | *
|
---|
| 137 | * @param string $resourceId The unique identifier for an object. This ID must
|
---|
| 138 | * be unique across all objects from an issuer. This value should follow the
|
---|
| 139 | * format issuer ID. identifier where the former is issued by Google and latter
|
---|
| 140 | * is chosen by you. Your unique identifier should only include alphanumeric
|
---|
| 141 | * characters, '.', '_', or '-'.
|
---|
| 142 | * @param LoyaltyObjectModel $postBody
|
---|
| 143 | * @param array $optParams Optional parameters.
|
---|
| 144 | * @return LoyaltyObjectModel
|
---|
| 145 | * @throws \Google\Service\Exception
|
---|
| 146 | */
|
---|
| 147 | public function patch($resourceId, LoyaltyObjectModel $postBody, $optParams = [])
|
---|
| 148 | {
|
---|
| 149 | $params = ['resourceId' => $resourceId, 'postBody' => $postBody];
|
---|
| 150 | $params = array_merge($params, $optParams);
|
---|
| 151 | return $this->call('patch', [$params], LoyaltyObjectModel::class);
|
---|
| 152 | }
|
---|
| 153 | /**
|
---|
| 154 | * Updates the loyalty object referenced by the given object ID.
|
---|
| 155 | * (loyaltyobject.update)
|
---|
| 156 | *
|
---|
| 157 | * @param string $resourceId The unique identifier for an object. This ID must
|
---|
| 158 | * be unique across all objects from an issuer. This value should follow the
|
---|
| 159 | * format issuer ID. identifier where the former is issued by Google and latter
|
---|
| 160 | * is chosen by you. Your unique identifier should only include alphanumeric
|
---|
| 161 | * characters, '.', '_', or '-'.
|
---|
| 162 | * @param LoyaltyObjectModel $postBody
|
---|
| 163 | * @param array $optParams Optional parameters.
|
---|
| 164 | * @return LoyaltyObjectModel
|
---|
| 165 | * @throws \Google\Service\Exception
|
---|
| 166 | */
|
---|
| 167 | public function update($resourceId, LoyaltyObjectModel $postBody, $optParams = [])
|
---|
| 168 | {
|
---|
| 169 | $params = ['resourceId' => $resourceId, 'postBody' => $postBody];
|
---|
| 170 | $params = array_merge($params, $optParams);
|
---|
| 171 | return $this->call('update', [$params], LoyaltyObjectModel::class);
|
---|
| 172 | }
|
---|
| 173 | }
|
---|
| 174 |
|
---|
| 175 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 176 | class_alias(Loyaltyobject::class, 'Google_Service_Walletobjects_Resource_Loyaltyobject');
|
---|