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\ReturnPolicy as ReturnPolicyModel; 21use Google\Service\ShoppingContent\ReturnpolicyCustomBatchRequest; 22use Google\Service\ShoppingContent\ReturnpolicyCustomBatchResponse; 23use Google\Service\ShoppingContent\ReturnpolicyListResponse; 24 25/** 26 * The "returnpolicy" collection of methods. 27 * Typical usage is: 28 * <code> 29 * $contentService = new Google\Service\ShoppingContent(...); 30 * $returnpolicy = $contentService->returnpolicy; 31 * </code> 32 */ 33class Returnpolicy extends \Google\Service\Resource 34{ 35 /** 36 * Batches multiple return policy related calls in a single request. 37 * (returnpolicy.custombatch) 38 * 39 * @param ReturnpolicyCustomBatchRequest $postBody 40 * @param array $optParams Optional parameters. 41 * @return ReturnpolicyCustomBatchResponse 42 */ 43 public function custombatch(ReturnpolicyCustomBatchRequest $postBody, $optParams = []) 44 { 45 $params = ['postBody' => $postBody]; 46 $params = array_merge($params, $optParams); 47 return $this->call('custombatch', [$params], ReturnpolicyCustomBatchResponse::class); 48 } 49 /** 50 * Deletes a return policy for the given Merchant Center account. 51 * (returnpolicy.delete) 52 * 53 * @param string $merchantId The Merchant Center account from which to delete 54 * the given return policy. 55 * @param string $returnPolicyId Return policy ID generated by Google. 56 * @param array $optParams Optional parameters. 57 */ 58 public function delete($merchantId, $returnPolicyId, $optParams = []) 59 { 60 $params = ['merchantId' => $merchantId, 'returnPolicyId' => $returnPolicyId]; 61 $params = array_merge($params, $optParams); 62 return $this->call('delete', [$params]); 63 } 64 /** 65 * Gets a return policy of the Merchant Center account. (returnpolicy.get) 66 * 67 * @param string $merchantId The Merchant Center account to get a return policy 68 * for. 69 * @param string $returnPolicyId Return policy ID generated by Google. 70 * @param array $optParams Optional parameters. 71 * @return ReturnPolicyModel 72 */ 73 public function get($merchantId, $returnPolicyId, $optParams = []) 74 { 75 $params = ['merchantId' => $merchantId, 'returnPolicyId' => $returnPolicyId]; 76 $params = array_merge($params, $optParams); 77 return $this->call('get', [$params], ReturnPolicyModel::class); 78 } 79 /** 80 * Inserts a return policy for the Merchant Center account. 81 * (returnpolicy.insert) 82 * 83 * @param string $merchantId The Merchant Center account to insert a return 84 * policy for. 85 * @param ReturnPolicyModel $postBody 86 * @param array $optParams Optional parameters. 87 * @return ReturnPolicyModel 88 */ 89 public function insert($merchantId, ReturnPolicyModel $postBody, $optParams = []) 90 { 91 $params = ['merchantId' => $merchantId, 'postBody' => $postBody]; 92 $params = array_merge($params, $optParams); 93 return $this->call('insert', [$params], ReturnPolicyModel::class); 94 } 95 /** 96 * Lists the return policies of the Merchant Center account. 97 * (returnpolicy.listReturnpolicy) 98 * 99 * @param string $merchantId The Merchant Center account to list return policies 100 * for. 101 * @param array $optParams Optional parameters. 102 * @return ReturnpolicyListResponse 103 */ 104 public function listReturnpolicy($merchantId, $optParams = []) 105 { 106 $params = ['merchantId' => $merchantId]; 107 $params = array_merge($params, $optParams); 108 return $this->call('list', [$params], ReturnpolicyListResponse::class); 109 } 110} 111 112// Adding a class alias for backwards compatibility with the previous class name. 113class_alias(Returnpolicy::class, 'Google_Service_ShoppingContent_Resource_Returnpolicy'); 114