-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
20.1.0 MNB-669 fixes errors and adds getFinalShippingChosen query
- Loading branch information
Travis Bernard
committed
Feb 2, 2021
1 parent
8f41633
commit ae7a251
Showing
10 changed files
with
456 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* Shipper HQ | ||
* | ||
* @category ShipperHQ | ||
* @package ShipperHQ_GraphQL | ||
* @copyright Copyright (c) 2019 Zowta LTD and Zowta LLC (http://www.ShipperHQ.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @author ShipperHQ Team sales@shipperhq.com | ||
*/ | ||
|
||
return <<<'graphql' | ||
query{ | ||
getFinalShippingChosen{ | ||
externalQuoteId | ||
shipmentId | ||
carrierCode | ||
methodCode | ||
selectedDate | ||
selectedPickupId | ||
selectedTimeSlot | ||
selectedOptions { | ||
code | ||
value | ||
} | ||
} | ||
} | ||
graphql; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* Shipper HQ | ||
* | ||
* @category ShipperHQ | ||
* @package ShipperHQ_GraphQL | ||
* @copyright Copyright (c) 2019 Zowta LTD and Zowta LLC (http://www.ShipperHQ.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @author ShipperHQ Team sales@shipperhq.com | ||
*/ | ||
|
||
namespace ShipperHQ\GraphQL\Response\Data; | ||
|
||
class GetFinalShippingChosenData implements ResponseDataInterface | ||
{ | ||
/** | ||
* @var \ShipperHQ\GraphQL\Types\SelectedShippingRates[]|null | ||
*/ | ||
private $getFinalShippingChosen; | ||
|
||
/** | ||
* @return \ShipperHQ\GraphQL\Types\SelectedShippingRates[]|null | ||
*/ | ||
public function getGetFinalShippingChosen(): ?array | ||
{ | ||
return $this->getFinalShippingChosen; | ||
} | ||
|
||
/** | ||
* @param \ShipperHQ\GraphQL\Types\SelectedShippingRates[]|null $getFinalShippingChosen | ||
* @return GetFinalShippingChosenData | ||
*/ | ||
public function setGetFinalShippingChosen(?array $getFinalShippingChosen): GetFinalShippingChosenData | ||
{ | ||
$this->getFinalShippingChosen = $getFinalShippingChosen; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function isEmpty() | ||
{ | ||
return empty($this->getFinalShippingChosen); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?php | ||
/** | ||
* Shipper HQ | ||
* | ||
* @category ShipperHQ | ||
* @package ShipperHQ_GraphQL | ||
* @copyright Copyright (c) 2019 Zowta LTD and Zowta LLC (http://www.ShipperHQ.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @author ShipperHQ Team sales@shipperhq.com | ||
*/ | ||
|
||
namespace ShipperHQ\GraphQL\Response; | ||
|
||
use ShipperHQ\GraphQL\Response\Data\GetFinalShippingChosenData; | ||
|
||
class GetFinalShippingChosen implements ResponseInterface | ||
{ | ||
/** | ||
* @var GetFinalShippingChosenData | ||
*/ | ||
private $data; | ||
|
||
/** | ||
* @var Error[]|null | ||
*/ | ||
private $errors; | ||
|
||
/** | ||
* AbstractResponse constructor. | ||
* @param GetFinalShippingChosenData $data | ||
* @param Error[] $errors | ||
*/ | ||
public function __construct(GetFinalShippingChosenData $data, array $errors) | ||
{ | ||
$this->data = $data; | ||
$this->errors = $errors; | ||
} | ||
|
||
/** | ||
* @return GetFinalShippingChosenData | ||
*/ | ||
public function getData() | ||
{ | ||
return $this->data; | ||
} | ||
|
||
/** | ||
* @param GetFinalShippingChosenData $data | ||
* @return GetFinalShippingChosen | ||
*/ | ||
public function setData(GetFinalShippingChosenData $data) | ||
{ | ||
$this->data = $data; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return Error[]|null | ||
*/ | ||
public function getErrors() | ||
{ | ||
return $this->errors; | ||
} | ||
|
||
/** | ||
* @param Error[]|null $errors | ||
* @return GetFinalShippingChosen | ||
*/ | ||
public function setErrors(array $errors) | ||
{ | ||
$this->errors = $errors; | ||
return $this; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
/** | ||
* Shipper HQ | ||
* | ||
* @category ShipperHQ | ||
* @package ShipperHQ_GraphQL | ||
* @copyright Copyright (c) 2019 Zowta LTD and Zowta LLC (http://www.ShipperHQ.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @author ShipperHQ Team sales@shipperhq.com | ||
*/ | ||
|
||
namespace ShipperHQ\GraphQL\Types; | ||
|
||
/** | ||
* Class RatingCarrier | ||
*/ | ||
class SelectedRateOption | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
private $code; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $value; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getCode(): string | ||
{ | ||
return $this->code; | ||
} | ||
|
||
/** | ||
* @param string $code | ||
* @return SelectedRateOption | ||
*/ | ||
public function setCode(string $code): SelectedRateOption | ||
{ | ||
$this->code = $code; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getValue(): string | ||
{ | ||
return $this->value; | ||
} | ||
|
||
/** | ||
* @param string $value | ||
* @return SelectedRateOption | ||
*/ | ||
public function setValue(string $value): SelectedRateOption | ||
{ | ||
$this->value = $value; | ||
return $this; | ||
} | ||
} |
Oops, something went wrong.