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

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

Upload project files

  • Property mode set to 100644
File size: 3.2 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\Media as MediaModel;
21use Google\Service\Walletobjects\TransitObjectUploadRotatingBarcodeValuesRequest;
22use Google\Service\Walletobjects\TransitObjectUploadRotatingBarcodeValuesResponse;
23
24/**
25 * The "media" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $walletobjectsService = new Google\Service\Walletobjects(...);
29 * $media = $walletobjectsService->media;
30 * </code>
31 */
32class Media extends \Google\Service\Resource
33{
34 /**
35 * Downloads rotating barcode values for the transit object referenced by the
36 * given object ID. (media.download)
37 *
38 * @param string $resourceId The unique identifier for an object. This ID must
39 * be unique across all objects from an issuer. This value should follow the
40 * format issuer ID. identifier where the former is issued by Google and latter
41 * is chosen by you. Your unique identifier should only include alphanumeric
42 * characters, '.', '_', or '-'.
43 * @param array $optParams Optional parameters.
44 * @return MediaModel
45 * @throws \Google\Service\Exception
46 */
47 public function download($resourceId, $optParams = [])
48 {
49 $params = ['resourceId' => $resourceId];
50 $params = array_merge($params, $optParams);
51 return $this->call('download', [$params], MediaModel::class);
52 }
53 /**
54 * Uploads rotating barcode values for the transit object referenced by the
55 * given object ID. Note the max upload size is specified in
56 * google3/production/config/cdd/apps-upload/customers/payments-consumer-
57 * passes/config.gcl and enforced by Scotty. (media.upload)
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 TransitObjectUploadRotatingBarcodeValuesRequest $postBody
65 * @param array $optParams Optional parameters.
66 * @return TransitObjectUploadRotatingBarcodeValuesResponse
67 * @throws \Google\Service\Exception
68 */
69 public function upload($resourceId, TransitObjectUploadRotatingBarcodeValuesRequest $postBody, $optParams = [])
70 {
71 $params = ['resourceId' => $resourceId, 'postBody' => $postBody];
72 $params = array_merge($params, $optParams);
73 return $this->call('upload', [$params], TransitObjectUploadRotatingBarcodeValuesResponse::class);
74 }
75}
76
77// Adding a class alias for backwards compatibility with the previous class name.
78class_alias(Media::class, 'Google_Service_Walletobjects_Resource_Media');
Note: See TracBrowser for help on using the repository browser.