Skip to content

Commit d9d0472

Browse files
author
C2P
committed
Merge branch 'release/0.5.12'
2 parents 78e6ff3 + 78ec757 commit d9d0472

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.5.11",
2+
"version": "0.5.12",
33
"name": "whatarmy/fedex-rest",
44
"description": "New FedEx Rest API wrapper",
55
"keywords": [

src/FedexRest/Services/Ship/CreateShipment.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class CreateShipment extends AbstractRequest
2626
protected string $packagingType = '';
2727
protected string $pickupType = '';
2828
protected int $accountNumber;
29+
protected array $rateRequestTypes;
2930
protected array $lineItems = [];
3031
protected string $labelResponseOptions = '';
3132
protected ShipmentSpecialServices $shipmentSpecialServices;
@@ -161,6 +162,17 @@ public function setAccountNumber(int $accountNumber): CreateShipment {
161162
return $this;
162163
}
163164

165+
public function setRateRequestTypes(string ...$rateRequestTypes): CreateShipment
166+
{
167+
$this->rateRequestTypes = $rateRequestTypes;
168+
return $this;
169+
}
170+
171+
public function getRateRequestTypes(): array
172+
{
173+
return $this->rateRequestTypes;
174+
}
175+
164176
/**
165177
* @param Item ...$lineItems
166178
* @return $this
@@ -480,6 +492,9 @@ public function getRequestedShipment(): array {
480492
if (!empty($this->label)) {
481493
$data ['labelSpecification'] = $this->label->prepare();
482494
}
495+
if (!empty($this->rateRequestTypes)) {
496+
$data['rateRequestType'] = $this->rateRequestTypes;
497+
}
483498
if (!empty($this->shipmentSpecialServices)) {
484499
$data['shipmentSpecialServices'] = $this->shipmentSpecialServices->prepare();
485500
}
@@ -523,6 +538,7 @@ public function prepare(): array {
523538
if (!empty($this->processingOptionType)) {
524539
$data['processingOptionType'] = $this->processingOptionType;
525540
}
541+
526542
return $data;
527543
}
528544

0 commit comments

Comments
 (0)