source: vendor/google/apiclient-services/src/Walletobjects/Resource/Giftcardclass.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\GiftCardClass as GiftCardClassModel;
22use Google\Service\Walletobjects\GiftCardClassAddMessageResponse;
23use Google\Service\Walletobjects\GiftCardClassListResponse;
24
25/**
26 * The "giftcardclass" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $walletobjectsService = new Google\Service\Walletobjects(...);
30 * $giftcardclass = $walletobjectsService->giftcardclass;
31 * </code>
32 */
33class Giftcardclass extends \Google\Service\Resource
34{
35 /**
36 * Adds a message to the gift card class referenced by the given class ID.
37 * (giftcardclass.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 GiftCardClassAddMessageResponse
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], GiftCardClassAddMessageResponse::class);
54 }
55 /**
56 * Returns the gift card class with the given class ID. (giftcardclass.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 should follow the format
60 * issuer ID. identifier where the former is issued by Google and latter is
61 * chosen by you. Your unique identifier should only include alphanumeric
62 * characters, '.', '_', or '-'.
63 * @param array $optParams Optional parameters.
64 * @return GiftCardClassModel
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], GiftCardClassModel::class);
72 }
73 /**
74 * Inserts an gift card class with the given ID and properties.
75 * (giftcardclass.insert)
76 *
77 * @param GiftCardClassModel $postBody
78 * @param array $optParams Optional parameters.
79 * @return GiftCardClassModel
80 * @throws \Google\Service\Exception
81 */
82 public function insert(GiftCardClassModel $postBody, $optParams = [])
83 {
84 $params = ['postBody' => $postBody];
85 $params = array_merge($params, $optParams);
86 return $this->call('insert', [$params], GiftCardClassModel::class);
87 }
88 /**
89 * Returns a list of all gift card classes for a given issuer ID.
90 * (giftcardclass.listGiftcardclass)
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 GiftCardClassListResponse
104 * @throws \Google\Service\Exception
105 */
106 public function listGiftcardclass($optParams = [])
107 {
108 $params = [];
109 $params = array_merge($params, $optParams);
110 return $this->call('list', [$params], GiftCardClassListResponse::class);
111 }
112 /**
113 * Updates the gift card class referenced by the given class ID. This method
114 * supports patch semantics. (giftcardclass.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 should follow the format
118 * issuer ID. identifier where the former is issued by Google and latter is
119 * chosen by you. Your unique identifier should only include alphanumeric
120 * characters, '.', '_', or '-'.
121 * @param GiftCardClassModel $postBody
122 * @param array $optParams Optional parameters.
123 * @return GiftCardClassModel
124 * @throws \Google\Service\Exception
125 */
126 public function patch($resourceId, GiftCardClassModel $postBody, $optParams = [])
127 {
128 $params = ['resourceId' => $resourceId, 'postBody' => $postBody];
129 $params = array_merge($params, $optParams);
130 return $this->call('patch', [$params], GiftCardClassModel::class);
131 }
132 /**
133 * Updates the gift card class referenced by the given class ID.
134 * (giftcardclass.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 should follow the format
138 * issuer ID. identifier where the former is issued by Google and latter is
139 * chosen by you. Your unique identifier should only include alphanumeric
140 * characters, '.', '_', or '-'.
141 * @param GiftCardClassModel $postBody
142 * @param array $optParams Optional parameters.
143 * @return GiftCardClassModel
144 * @throws \Google\Service\Exception
145 */
146 public function update($resourceId, GiftCardClassModel $postBody, $optParams = [])
147 {
148 $params = ['resourceId' => $resourceId, 'postBody' => $postBody];
149 $params = array_merge($params, $optParams);
150 return $this->call('update', [$params], GiftCardClassModel::class);
151 }
152}
153
154// Adding a class alias for backwards compatibility with the previous class name.
155class_alias(Giftcardclass::class, 'Google_Service_Walletobjects_Resource_Giftcardclass');
Note: See TracBrowser for help on using the repository browser.