source: vendor/google/apiclient-services/src/ShoppingContent/Resource/Pos.php

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

Upload project files

  • Property mode set to 100644
File size: 6.0 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\ShoppingContent\Resource;
19
20use Google\Service\ShoppingContent\PosCustomBatchRequest;
21use Google\Service\ShoppingContent\PosCustomBatchResponse;
22use Google\Service\ShoppingContent\PosInventoryRequest;
23use Google\Service\ShoppingContent\PosInventoryResponse;
24use Google\Service\ShoppingContent\PosListResponse;
25use Google\Service\ShoppingContent\PosSaleRequest;
26use Google\Service\ShoppingContent\PosSaleResponse;
27use Google\Service\ShoppingContent\PosStore;
28
29/**
30 * The "pos" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $contentService = new Google\Service\ShoppingContent(...);
34 * $pos = $contentService->pos;
35 * </code>
36 */
37class Pos extends \Google\Service\Resource
38{
39 /**
40 * Batches multiple POS-related calls in a single request. (pos.custombatch)
41 *
42 * @param PosCustomBatchRequest $postBody
43 * @param array $optParams Optional parameters.
44 * @return PosCustomBatchResponse
45 * @throws \Google\Service\Exception
46 */
47 public function custombatch(PosCustomBatchRequest $postBody, $optParams = [])
48 {
49 $params = ['postBody' => $postBody];
50 $params = array_merge($params, $optParams);
51 return $this->call('custombatch', [$params], PosCustomBatchResponse::class);
52 }
53 /**
54 * Deletes a store for the given merchant. (pos.delete)
55 *
56 * @param string $merchantId The ID of the POS or inventory data provider.
57 * @param string $targetMerchantId The ID of the target merchant.
58 * @param string $storeCode A store code that is unique per merchant.
59 * @param array $optParams Optional parameters.
60 * @throws \Google\Service\Exception
61 */
62 public function delete($merchantId, $targetMerchantId, $storeCode, $optParams = [])
63 {
64 $params = ['merchantId' => $merchantId, 'targetMerchantId' => $targetMerchantId, 'storeCode' => $storeCode];
65 $params = array_merge($params, $optParams);
66 return $this->call('delete', [$params]);
67 }
68 /**
69 * Retrieves information about the given store. (pos.get)
70 *
71 * @param string $merchantId The ID of the POS or inventory data provider.
72 * @param string $targetMerchantId The ID of the target merchant.
73 * @param string $storeCode A store code that is unique per merchant.
74 * @param array $optParams Optional parameters.
75 * @return PosStore
76 * @throws \Google\Service\Exception
77 */
78 public function get($merchantId, $targetMerchantId, $storeCode, $optParams = [])
79 {
80 $params = ['merchantId' => $merchantId, 'targetMerchantId' => $targetMerchantId, 'storeCode' => $storeCode];
81 $params = array_merge($params, $optParams);
82 return $this->call('get', [$params], PosStore::class);
83 }
84 /**
85 * Creates a store for the given merchant. (pos.insert)
86 *
87 * @param string $merchantId The ID of the POS or inventory data provider.
88 * @param string $targetMerchantId The ID of the target merchant.
89 * @param PosStore $postBody
90 * @param array $optParams Optional parameters.
91 * @return PosStore
92 * @throws \Google\Service\Exception
93 */
94 public function insert($merchantId, $targetMerchantId, PosStore $postBody, $optParams = [])
95 {
96 $params = ['merchantId' => $merchantId, 'targetMerchantId' => $targetMerchantId, 'postBody' => $postBody];
97 $params = array_merge($params, $optParams);
98 return $this->call('insert', [$params], PosStore::class);
99 }
100 /**
101 * Submit inventory for the given merchant. (pos.inventory)
102 *
103 * @param string $merchantId The ID of the POS or inventory data provider.
104 * @param string $targetMerchantId The ID of the target merchant.
105 * @param PosInventoryRequest $postBody
106 * @param array $optParams Optional parameters.
107 * @return PosInventoryResponse
108 * @throws \Google\Service\Exception
109 */
110 public function inventory($merchantId, $targetMerchantId, PosInventoryRequest $postBody, $optParams = [])
111 {
112 $params = ['merchantId' => $merchantId, 'targetMerchantId' => $targetMerchantId, 'postBody' => $postBody];
113 $params = array_merge($params, $optParams);
114 return $this->call('inventory', [$params], PosInventoryResponse::class);
115 }
116 /**
117 * Lists the stores of the target merchant. (pos.listPos)
118 *
119 * @param string $merchantId The ID of the POS or inventory data provider.
120 * @param string $targetMerchantId The ID of the target merchant.
121 * @param array $optParams Optional parameters.
122 * @return PosListResponse
123 * @throws \Google\Service\Exception
124 */
125 public function listPos($merchantId, $targetMerchantId, $optParams = [])
126 {
127 $params = ['merchantId' => $merchantId, 'targetMerchantId' => $targetMerchantId];
128 $params = array_merge($params, $optParams);
129 return $this->call('list', [$params], PosListResponse::class);
130 }
131 /**
132 * Submit a sale event for the given merchant. (pos.sale)
133 *
134 * @param string $merchantId The ID of the POS or inventory data provider.
135 * @param string $targetMerchantId The ID of the target merchant.
136 * @param PosSaleRequest $postBody
137 * @param array $optParams Optional parameters.
138 * @return PosSaleResponse
139 * @throws \Google\Service\Exception
140 */
141 public function sale($merchantId, $targetMerchantId, PosSaleRequest $postBody, $optParams = [])
142 {
143 $params = ['merchantId' => $merchantId, 'targetMerchantId' => $targetMerchantId, 'postBody' => $postBody];
144 $params = array_merge($params, $optParams);
145 return $this->call('sale', [$params], PosSaleResponse::class);
146 }
147}
148
149// Adding a class alias for backwards compatibility with the previous class name.
150class_alias(Pos::class, 'Google_Service_ShoppingContent_Resource_Pos');
Note: See TracBrowser for help on using the repository browser.