diff --git a/generated/Service/Orders.php b/generated/Service/Orders.php index 2a68c82..eba13f9 100644 --- a/generated/Service/Orders.php +++ b/generated/Service/Orders.php @@ -111,16 +111,21 @@ public function showOrderDetails($id, $fields): Order * * @param $patchRequest mixed * - * @throws ApiException + * @param $payPalPartnerAttributionId string + * * @return void + *@throws ApiException */ - public function updateOrder($id, array $patchRequest): void + public function updateOrder($id, array $patchRequest, string $payPalPartnerAttributionId = ''): void { $path = "/orders/{$id}"; $headers = []; $headers['Content-Type'] = 'application/json'; + if ($payPalPartnerAttributionId) { + $headers['PayPal-Partner-Attribution-Id'] = $payPalPartnerAttributionId; + } $body = json_encode($patchRequest, true); $response = $this->send('PATCH', $path, [], $headers, $body); @@ -146,7 +151,6 @@ public function validatePaymentMethod($payPalClientMetadataId, $id, OrderValidat $headers['PayPal-Client-Metadata-Id'] = $payPalClientMetadataId; $headers['Content-Type'] = 'application/json'; - $body = json_encode($orderValidateRequest, true); $response = $this->send('POST', $path, [], $headers, $body); $jsonData = json_decode($response->getBody(), true); @@ -162,16 +166,18 @@ public function validatePaymentMethod($payPalClientMetadataId, $id, OrderValidat * * @param $confirmOrderRequest mixed * + * @param $payPalPartnerAttributionId string + * * @param $prefer string The preferred server response upon successful completion of the request. Value * is: * - * @throws ApiException * @return Order + *@throws ApiException */ - public function confirmTheOrder($payPalClientMetadataId, $id, ConfirmOrderRequest $confirmOrderRequest, $prefer = 'return=minimal'): Order + public function confirmTheOrder($payPalClientMetadataId, $id, ConfirmOrderRequest $confirmOrderRequest, string $payPalPartnerAttributionId = '', $prefer = 'return=minimal',): Order { $path = "/orders/{$id}/confirm-payment-source"; @@ -180,6 +186,9 @@ public function confirmTheOrder($payPalClientMetadataId, $id, ConfirmOrderReques $headers['Content-Type'] = 'application/json'; $headers['Prefer'] = $prefer; + if ($payPalPartnerAttributionId) { + $headers['PayPal-Partner-Attribution-Id'] = $payPalPartnerAttributionId; + } $body = json_encode($confirmOrderRequest, true); $response = $this->send('POST', $path, [], $headers, $body); @@ -204,6 +213,8 @@ public function confirmTheOrder($payPalClientMetadataId, $id, ConfirmOrderReques * merchant. For details, see PayPal-Auth-Assertion. * + * @param $payPalPartnerAttributionId string + * * @param $prefer string The preferred server response upon successful completion of the request. Value * is: