source: vendor/google/apiclient-services/src/Walletobjects/Resource/Genericclass.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 6.4 KB
Line 
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\Walletobjects\Resource;
19
20use Google\Service\Walletobjects\AddMessageRequest;
21use Google\Service\Walletobjects\GenericClass as GenericClassModel;
22use Google\Service\Walletobjects\GenericClassAddMessageResponse;
23use Google\Service\Walletobjects\GenericClassListResponse;
24
25/**
26 * The "genericclass" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $walletobjectsService = new Google\Service\Walletobjects(...);
30 * $genericclass = $walletobjectsService->genericclass;
31 * </code>
32 */
33class Genericclass extends \Google\Service\Resource
34{
35 /**
36 * Adds a message to the generic class referenced by the given class ID.
37 * (genericclass.addmessage)
38 *
39 * @param string $resourceId The unique identifier for a class. This ID must be
40 * unique across all classes from an issuer. This value should follow the format
41 * issuer ID. identifier where the former is issued by Google and latter is
42 * chosen by you. Your unique identifier should only include alphanumeric
43 * characters, '.', '_', or '-'.
44 * @param AddMessageRequest $postBody
45 * @param array $optParams Optional parameters.
46 * @return GenericClassAddMessageResponse
47 * @throws \Google\Service\Exception
48 */
49 public function addmessage($resourceId, AddMessageRequest $postBody, $optParams = [])
50 {
51 $params = ['resourceId' => $resourceId, 'postBody' => $postBody];
52 $params = array_merge($params, $optParams);
53 return $this->call('addmessage', [$params], GenericClassAddMessageResponse::class);
54 }
55 /**
56 * Returns the generic class with the given class ID. (genericclass.get)
57 *
58 * @param string $resourceId The unique identifier for a class. This ID must be
59 * unique across all classes from an issuer. This value needs to follow the
60 * format `issuerID.identifier` where `issuerID` is issued by Google and
61 * `identifier` is chosen by you. The unique identifier can only include
62 * alphanumeric characters, `.`, `_`, or `-`.
63 * @param array $optParams Optional parameters.
64 * @return GenericClassModel
65 * @throws \Google\Service\Exception
66 */
67 public function get($resourceId, $optParams = [])
68 {
69 $params = ['resourceId' => $resourceId];
70 $params = array_merge($params, $optParams);
71 return $this->call('get', [$params], GenericClassModel::class);
72 }
73 /**
74 * Inserts a generic class with the given ID and properties.
75 * (genericclass.insert)
76 *
77 * @param GenericClassModel $postBody
78 * @param array $optParams Optional parameters.
79 * @return GenericClassModel
80 * @throws \Google\Service\Exception
81 */
82 public function insert(GenericClassModel $postBody, $optParams = [])
83 {
84 $params = ['postBody' => $postBody];
85 $params = array_merge($params, $optParams);
86 return $this->call('insert', [$params], GenericClassModel::class);
87 }
88 /**
89 * Returns a list of all generic classes for a given issuer ID.
90 * (genericclass.listGenericclass)
91 *
92 * @param array $optParams Optional parameters.
93 *
94 * @opt_param string issuerId The ID of the issuer authorized to list classes.
95 * @opt_param int maxResults Identifies the max number of results returned by a
96 * list. All results are returned if `maxResults` isn't defined.
97 * @opt_param string token Used to get the next set of results if `maxResults`
98 * is specified, but more than `maxResults` classes are available in a list. For
99 * example, if you have a list of 200 classes and you call list with
100 * `maxResults` set to 20, list will return the first 20 classes and a token.
101 * Call list again with `maxResults` set to 20 and the token to get the next 20
102 * classes.
103 * @return GenericClassListResponse
104 * @throws \Google\Service\Exception
105 */
106 public function listGenericclass($optParams = [])
107 {
108 $params = [];
109 $params = array_merge($params, $optParams);
110 return $this->call('list', [$params], GenericClassListResponse::class);
111 }
112 /**
113 * Updates the generic class referenced by the given class ID. This method
114 * supports patch semantics. (genericclass.patch)
115 *
116 * @param string $resourceId The unique identifier for a class. This ID must be
117 * unique across all classes from an issuer. This value needs to follow the
118 * format `issuerID.identifier` where `issuerID` is issued by Google and
119 * `identifier` is chosen by you. The unique identifier can only include
120 * alphanumeric characters, `.`, `_`, or `-`.
121 * @param GenericClassModel $postBody
122 * @param array $optParams Optional parameters.
123 * @return GenericClassModel
124 * @throws \Google\Service\Exception
125 */
126 public function patch($resourceId, GenericClassModel $postBody, $optParams = [])
127 {
128 $params = ['resourceId' => $resourceId, 'postBody' => $postBody];
129 $params = array_merge($params, $optParams);
130 return $this->call('patch', [$params], GenericClassModel::class);
131 }
132 /**
133 * Updates the Generic class referenced by the given class ID.
134 * (genericclass.update)
135 *
136 * @param string $resourceId The unique identifier for a class. This ID must be
137 * unique across all classes from an issuer. This value needs to follow the
138 * format `issuerID.identifier` where `issuerID` is issued by Google and
139 * `identifier` is chosen by you. The unique identifier can only include
140 * alphanumeric characters, `.`, `_`, or `-`.
141 * @param GenericClassModel $postBody
142 * @param array $optParams Optional parameters.
143 * @return GenericClassModel
144 * @throws \Google\Service\Exception
145 */
146 public function update($resourceId, GenericClassModel $postBody, $optParams = [])
147 {
148 $params = ['resourceId' => $resourceId, 'postBody' => $postBody];
149 $params = array_merge($params, $optParams);
150 return $this->call('update', [$params], GenericClassModel::class);
151 }
152}
153
154// Adding a class alias for backwards compatibility with the previous class name.
155class_alias(Genericclass::class, 'Google_Service_Walletobjects_Resource_Genericclass');
Note: See TracBrowser for help on using the repository browser.