1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
*/ |
4
|
|
|
|
5
|
|
|
namespace Commercetools\Core\Model\Order; |
6
|
|
|
|
7
|
|
|
use Commercetools\Core\Model\Cart\DiscountedLineItemPrice; |
8
|
|
|
use Commercetools\Core\Model\Common\JsonObject; |
9
|
|
|
use Commercetools\Core\Model\Common\Money; |
10
|
|
|
use Commercetools\Core\Model\ShippingMethod\ShippingMethodReference; |
11
|
|
|
use Commercetools\Core\Model\ShippingMethod\ShippingRate; |
12
|
|
|
use Commercetools\Core\Model\TaxCategory\TaxCategoryReference; |
13
|
|
|
use Commercetools\Core\Model\TaxCategory\TaxRate; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @package Commercetools\Core\Model\Order |
17
|
|
|
* @link https://docs.commercetools.com/http-api-projects-orders-import.html#shippinginfoimportdraft |
18
|
|
|
* |
19
|
|
|
* @method string getShippingMethodName() |
20
|
|
|
* @method ShippingInfoImportDraft setShippingMethodName(string $shippingMethodName = null) |
21
|
|
|
* @method Money getPrice() |
22
|
|
|
* @method ShippingInfoImportDraft setPrice(Money $price = null) |
23
|
|
|
* @method ShippingRate getShippingRate() |
24
|
|
|
* @method ShippingInfoImportDraft setShippingRate(ShippingRate $shippingRate = null) |
25
|
|
|
* @method TaxRate getTaxRate() |
26
|
|
|
* @method ShippingInfoImportDraft setTaxRate(TaxRate $taxRate = null) |
27
|
|
|
* @method TaxCategoryReference getTaxCategory() |
28
|
|
|
* @method ShippingInfoImportDraft setTaxCategory(TaxCategoryReference $taxCategory = null) |
29
|
|
|
* @method ShippingMethodReference getShippingMethod() |
30
|
|
|
* @method ShippingInfoImportDraft setShippingMethod(ShippingMethodReference $shippingMethod = null) |
31
|
|
|
* @method DeliveryCollection getDeliveries() |
32
|
|
|
* @method ShippingInfoImportDraft setDeliveries(DeliveryCollection $deliveries = null) |
33
|
|
|
* @method DiscountedLineItemPrice getDiscountedPrice() |
34
|
|
|
* @method ShippingInfoImportDraft setDiscountedPrice(DiscountedLineItemPrice $discountedPrice = null) |
35
|
|
|
* @method string getShippingMethodState() |
36
|
|
|
* @method ShippingInfoImportDraft setShippingMethodState(string $shippingMethodState = null) |
37
|
|
|
*/ |
38
|
|
|
class ShippingInfoImportDraft extends JsonObject |
39
|
|
|
{ |
40
|
|
|
const SHIPPING_METHOD_MATCH = 'MatchesCart'; |
41
|
|
|
const SHIPPING_METHOD_DONT_MATCH = 'DoesNotMatchCart'; |
42
|
|
|
|
43
|
27 |
|
public function fieldDefinitions() |
44
|
|
|
{ |
45
|
|
|
return [ |
46
|
27 |
|
'shippingMethodName' => [static::TYPE => 'string'], |
47
|
27 |
|
'price' => [static::TYPE => Money::class], |
48
|
27 |
|
'shippingRate' => [static::TYPE => ShippingRate::class], |
49
|
27 |
|
'taxRate' => [static::TYPE => TaxRate::class], |
50
|
27 |
|
'taxCategory' => [static::TYPE => TaxCategoryReference::class], |
51
|
27 |
|
'shippingMethod' => [static::TYPE => ShippingMethodReference::class], |
52
|
27 |
|
'deliveries' => [static::TYPE => DeliveryCollection::class], |
53
|
27 |
|
'discountedPrice' => [static::TYPE => DiscountedLineItemPrice::class], |
54
|
27 |
|
'shippingMethodState' => [static::TYPE => 'string'], |
55
|
|
|
]; |
56
|
|
|
} |
57
|
|
|
} |
58
|
|
|
|