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\AccountReturnCarrier; 21use Google\Service\ShoppingContent\ListAccountReturnCarrierResponse; 22 23/** 24 * The "returncarrier" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $contentService = new Google\Service\ShoppingContent(...); 28 * $returncarrier = $contentService->returncarrier; 29 * </code> 30 */ 31class AccountsReturncarrier extends \Google\Service\Resource 32{ 33 /** 34 * Links return carrier to a merchant account. (returncarrier.create) 35 * 36 * @param string $accountId Required. The Merchant Center Account Id under which 37 * the Return Carrier is to be linked. 38 * @param AccountReturnCarrier $postBody 39 * @param array $optParams Optional parameters. 40 * @return AccountReturnCarrier 41 */ 42 public function create($accountId, AccountReturnCarrier $postBody, $optParams = []) 43 { 44 $params = ['accountId' => $accountId, 'postBody' => $postBody]; 45 $params = array_merge($params, $optParams); 46 return $this->call('create', [$params], AccountReturnCarrier::class); 47 } 48 /** 49 * Delete a return carrier in the merchant account. (returncarrier.delete) 50 * 51 * @param string $accountId Required. The Merchant Center Account Id under which 52 * the Return Carrier is to be linked. 53 * @param string $carrierAccountId Required. The Google-provided unique carrier 54 * ID, used to update the resource. 55 * @param array $optParams Optional parameters. 56 */ 57 public function delete($accountId, $carrierAccountId, $optParams = []) 58 { 59 $params = ['accountId' => $accountId, 'carrierAccountId' => $carrierAccountId]; 60 $params = array_merge($params, $optParams); 61 return $this->call('delete', [$params]); 62 } 63 /** 64 * Lists available return carriers in the merchant account. 65 * (returncarrier.listAccountsReturncarrier) 66 * 67 * @param string $accountId Required. The Merchant Center Account Id under which 68 * the Return Carrier is to be linked. 69 * @param array $optParams Optional parameters. 70 * @return ListAccountReturnCarrierResponse 71 */ 72 public function listAccountsReturncarrier($accountId, $optParams = []) 73 { 74 $params = ['accountId' => $accountId]; 75 $params = array_merge($params, $optParams); 76 return $this->call('list', [$params], ListAccountReturnCarrierResponse::class); 77 } 78 /** 79 * Updates a return carrier in the merchant account. (returncarrier.patch) 80 * 81 * @param string $accountId Required. The Merchant Center Account Id under which 82 * the Return Carrier is to be linked. 83 * @param string $carrierAccountId Required. The Google-provided unique carrier 84 * ID, used to update the resource. 85 * @param AccountReturnCarrier $postBody 86 * @param array $optParams Optional parameters. 87 * @return AccountReturnCarrier 88 */ 89 public function patch($accountId, $carrierAccountId, AccountReturnCarrier $postBody, $optParams = []) 90 { 91 $params = ['accountId' => $accountId, 'carrierAccountId' => $carrierAccountId, 'postBody' => $postBody]; 92 $params = array_merge($params, $optParams); 93 return $this->call('patch', [$params], AccountReturnCarrier::class); 94 } 95} 96 97// Adding a class alias for backwards compatibility with the previous class name. 98class_alias(AccountsReturncarrier::class, 'Google_Service_ShoppingContent_Resource_AccountsReturncarrier'); 99