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\ListReturnPolicyOnlineResponse; 21use Google\Service\ShoppingContent\ReturnPolicyOnline as ReturnPolicyOnlineModel; 22 23/** 24 * The "returnpolicyonline" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $contentService = new Google\Service\ShoppingContent(...); 28 * $returnpolicyonline = $contentService->returnpolicyonline; 29 * </code> 30 */ 31class Returnpolicyonline extends \Google\Service\Resource 32{ 33 /** 34 * Creates a new return policy. (returnpolicyonline.create) 35 * 36 * @param string $merchantId Required. The id of the merchant for which to 37 * retrieve the return policy online object. 38 * @param ReturnPolicyOnlineModel $postBody 39 * @param array $optParams Optional parameters. 40 * @return ReturnPolicyOnlineModel 41 */ 42 public function create($merchantId, ReturnPolicyOnlineModel $postBody, $optParams = []) 43 { 44 $params = ['merchantId' => $merchantId, 'postBody' => $postBody]; 45 $params = array_merge($params, $optParams); 46 return $this->call('create', [$params], ReturnPolicyOnlineModel::class); 47 } 48 /** 49 * Deletes an existing return policy. (returnpolicyonline.delete) 50 * 51 * @param string $merchantId Required. The id of the merchant for which to 52 * retrieve the return policy online object. 53 * @param string $returnPolicyId Required. The id of the return policy to 54 * delete. 55 * @param array $optParams Optional parameters. 56 */ 57 public function delete($merchantId, $returnPolicyId, $optParams = []) 58 { 59 $params = ['merchantId' => $merchantId, 'returnPolicyId' => $returnPolicyId]; 60 $params = array_merge($params, $optParams); 61 return $this->call('delete', [$params]); 62 } 63 /** 64 * Gets an existing return policy. (returnpolicyonline.get) 65 * 66 * @param string $merchantId Required. The id of the merchant for which to 67 * retrieve the return policy online object. 68 * @param string $returnPolicyId Required. The id of the return policy to 69 * retrieve. 70 * @param array $optParams Optional parameters. 71 * @return ReturnPolicyOnlineModel 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], ReturnPolicyOnlineModel::class); 78 } 79 /** 80 * Lists all existing return policies. 81 * (returnpolicyonline.listReturnpolicyonline) 82 * 83 * @param string $merchantId Required. The id of the merchant for which to 84 * retrieve the return policy online object. 85 * @param array $optParams Optional parameters. 86 * @return ListReturnPolicyOnlineResponse 87 */ 88 public function listReturnpolicyonline($merchantId, $optParams = []) 89 { 90 $params = ['merchantId' => $merchantId]; 91 $params = array_merge($params, $optParams); 92 return $this->call('list', [$params], ListReturnPolicyOnlineResponse::class); 93 } 94 /** 95 * Updates an existing return policy. (returnpolicyonline.patch) 96 * 97 * @param string $merchantId Required. The id of the merchant for which to 98 * retrieve the return policy online object. 99 * @param string $returnPolicyId Required. The id of the return policy to 100 * update. 101 * @param ReturnPolicyOnlineModel $postBody 102 * @param array $optParams Optional parameters. 103 * @return ReturnPolicyOnlineModel 104 */ 105 public function patch($merchantId, $returnPolicyId, ReturnPolicyOnlineModel $postBody, $optParams = []) 106 { 107 $params = ['merchantId' => $merchantId, 'returnPolicyId' => $returnPolicyId, 'postBody' => $postBody]; 108 $params = array_merge($params, $optParams); 109 return $this->call('patch', [$params], ReturnPolicyOnlineModel::class); 110 } 111} 112 113// Adding a class alias for backwards compatibility with the previous class name. 114class_alias(Returnpolicyonline::class, 'Google_Service_ShoppingContent_Resource_Returnpolicyonline'); 115