From 065e50f8e87da9a56482032d99371ba19898f06a Mon Sep 17 00:00:00 2001 From: Florian Riecker- de Vries <93703843+FlorianSDV@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:34:03 +0100 Subject: [PATCH] feat: add ups to nl, be and lu (#324) INT-658 --------- Co-authored-by: jochemgravendeel --- config/pdk-business-logic.php | 2 + config/platform/myparcel.php | 18 ++- config/schema/myparcel/order/ups/base.json | 4 +- config/schema/order.json | 5 +- .../Service/DeliveryOptionsService.php | 2 + .../Options/Definition/CollectDefinition.php | 45 +++++++ .../Calculator/UPS/UPSAgeCheckCalculator.php | 25 ++++ .../Order/Calculator/UPS/UPSCalculator.php | 2 + .../UPSCountryShipmentOptionsCalculator.php | 18 +-- .../UPS/UPSDeliveryTypeCalculator.php | 28 +++++ src/Frontend/View/CarrierSettingsItemView.php | 12 +- src/Settings/Model/CarrierSettings.php | 116 ++++++++++-------- src/Shipment/Model/DeliveryOptions.php | 5 + src/Shipment/Model/ShipmentOptions.php | 4 + src/Validation/Validator/CarrierSchema.php | 11 ++ tests/Datasets/pdkOrdersToNl.php | 24 ++++ .../Model/DeliveryOptionsConfigTest.php | 4 + .../PostNLReceiptCodeCalculatorTest.php | 1 + .../Context/Model/OrderDataContextTest.php | 3 + .../Model/Options/DeliveryOptionsTest.php | 2 + ...etrieves_all_categories_and_fields__1.json | 18 ++- ...fier_with_data_set_default_carrier__1.json | 4 +- ...with_data_set_subscription_carrier__1.json | 4 +- ...carriers_from_name_with_(myparcel)__1.json | 25 ++-- ...data_with_data_set_multiple_orders__1.json | 20 ++- ...xt_data_with_data_set_single_order__1.json | 10 +- ..._data_set_simple_domestic_shipment__1.json | 7 +- ...t_custom_postnl_be_mailbox_package__1.json | 2 + ...t_custom_postnl_eu_mailbox_package__1.json | 2 + ..._custom_postnl_row_mailbox_package__1.json | 2 + ...ttings_with_data_set_digital_stamp__1.json | 2 + ...omes_package_for_non-custom_postnl__1.json | 2 + ...rier_settings_with_data_set_letter__1.json | 2 + ...ings_with_data_set_mailbox_package__1.json | 2 + ...kage_that_is_too_heavy_for_mailbox__1.json | 2 + ...ailbox_package_with_fit_in_mailbox__1.json | 2 + ...rier_settings_with_data_set_simple__1.json | 2 + ...k__data_set_carrier_UPS_to_Belgium__1.json | 31 +++++ ...carrier_UPS_to_Netherlands_express__1.json | 31 +++++ ...r__data_set_carrier_UPS_to_Belgium__1.json | 29 +++++ ...carrier_UPS_to_Netherlands_express__1.json | 29 +++++ ...e__data_set_carrier_UPS_to_Belgium__1.json | 29 +++++ ...carrier_UPS_to_Netherlands_express__1.json | 29 +++++ ...t__data_set_carrier_UPS_to_Belgium__1.json | 29 +++++ ...carrier_UPS_to_Netherlands_express__1.json | 29 +++++ ...t__data_set_carrier_UPS_to_Belgium__1.json | 30 +++++ ...carrier_UPS_to_Netherlands_express__1.json | 30 +++++ ...e__data_set_carrier_UPS_to_Belgium__1.json | 29 +++++ ...carrier_UPS_to_Netherlands_express__1.json | 29 +++++ ...n__data_set_carrier_UPS_to_Belgium__1.json | 30 +++++ ...carrier_UPS_to_Netherlands_express__1.json | 30 +++++ ...t__data_set_carrier_UPS_to_Belgium__1.json | 29 +++++ ...carrier_UPS_to_Netherlands_express__1.json | 29 +++++ ...e__data_set_carrier_UPS_to_Belgium__1.json | 30 +++++ ...carrier_UPS_to_Netherlands_express__1.json | 30 +++++ ...k__data_set_carrier_UPS_to_Belgium__1.json | 70 +++++++++++ ...carrier_UPS_to_Netherlands_express__1.json | 70 +++++++++++ ...heck__data_set_carrier_dhl_for_you__1.json | 1 + ...t_age_check__data_set_single_order__1.json | 1 + ..._data_set_various_delivery_options__1.json | 3 + ...r__data_set_carrier_UPS_to_Belgium__1.json | 70 +++++++++++ ...carrier_UPS_to_Netherlands_express__1.json | 70 +++++++++++ ...nder__data_set_carrier_dhl_for_you__1.json | 1 + ...hide_sender__data_set_single_order__1.json | 1 + ..._data_set_various_delivery_options__1.json | 3 + ...e__data_set_carrier_UPS_to_Belgium__1.json | 70 +++++++++++ ...carrier_UPS_to_Netherlands_express__1.json | 70 +++++++++++ ...ance__data_set_carrier_dhl_for_you__1.json | 1 + ...t_insurance__data_set_single_order__1.json | 1 + ..._data_set_various_delivery_options__1.json | 3 + ...t__data_set_carrier_UPS_to_Belgium__1.json | 70 +++++++++++ ...carrier_UPS_to_Netherlands_express__1.json | 70 +++++++++++ ...rmat__data_set_carrier_dhl_for_you__1.json | 1 + ...arge_format__data_set_single_order__1.json | 1 + ..._data_set_various_delivery_options__1.json | 3 + ...t__data_set_carrier_UPS_to_Belgium__1.json | 70 +++++++++++ ...carrier_UPS_to_Netherlands_express__1.json | 70 +++++++++++ ...ient__data_set_carrier_dhl_for_you__1.json | 1 + ...y_recipient__data_set_single_order__1.json | 1 + ..._data_set_various_delivery_options__1.json | 3 + ...e__data_set_carrier_UPS_to_Belgium__1.json | 70 +++++++++++ ...carrier_UPS_to_Netherlands_express__1.json | 70 +++++++++++ ...code__data_set_carrier_dhl_for_you__1.json | 1 + ...eceipt_code__data_set_single_order__1.json | 1 + ..._data_set_various_delivery_options__1.json | 3 + ...n__data_set_carrier_UPS_to_Belgium__1.json | 70 +++++++++++ ...carrier_UPS_to_Netherlands_express__1.json | 70 +++++++++++ ...turn__data_set_carrier_dhl_for_you__1.json | 1 + ...port_return__data_set_single_order__1.json | 1 + ..._data_set_various_delivery_options__1.json | 3 + ...t__data_set_carrier_UPS_to_Belgium__1.json | 70 +++++++++++ ...carrier_UPS_to_Netherlands_express__1.json | 70 +++++++++++ ...rmat__data_set_carrier_dhl_for_you__1.json | 1 + ...arge_format__data_set_single_order__1.json | 1 + ..._data_set_various_delivery_options__1.json | 3 + ...e__data_set_carrier_UPS_to_Belgium__1.json | 70 +++++++++++ ...carrier_UPS_to_Netherlands_express__1.json | 70 +++++++++++ ...ture__data_set_carrier_dhl_for_you__1.json | 1 + ...t_signature__data_set_single_order__1.json | 1 + ..._data_set_various_delivery_options__1.json | 3 + ...rts_return_with_data_set_insurance__1.json | 20 ++- ...th_data_set_no_return_capabilities__1.json | 20 ++- ...return_with_data_set_simple_orders__1.json | 20 ++- ...omponent_with_data_set_init_script__1.json | 21 ++-- ..._component_with_data_set_order_box__1.json | 10 +- ...nt_with_data_set_order_list_column__1.json | 10 +- ...nent_with_data_set_plugin_settings__1.json | 51 ++++++++ ...dk_order_with_data_set_empty_order__1.json | 1 + ...with_data_set_order_with_shipments__1.json | 1 + ...h_data_set_order_without_shipments__1.json | 1 + ...a_set_pickup_without_location_code__1.json | 3 + ...th_data_set_carrier_UPS_to_Belgium__1.json | 27 ++++ ...carrier_UPS_to_Netherlands_express__1.json | 27 ++++ ..._with_data_set_carrier_dhl_for_you__1.json | 3 +- ...e_array_with_data_set_single_order__1.json | 3 +- ..._data_set_various_delivery_options__1.json | 9 +- ...e_order_containing_many_attributes__1.json | 7 +- ...ith_data_set_one_order_with_pickup__1.json | 7 +- ...__it_gets_carriers_with_(myparcel)__1.json | 25 ++-- ..._for_each_platform_with_(myparcel)__1.json | 25 ++-- ...data_with_data_set_normal_shipment__1.json | 3 +- ...th_data_set_shipment_with_contract__1.json | 3 +- ...a_set_shipment_with_drop-off_point__1.json | 3 +- ...with_data_set_shipment_with_pickup__1.json | 3 +- ...ult_carrier_settings_with_(belgie)__1.json | 24 +++- ...carrier_settings_with_(flespakket)__1.json | 12 +- ...t_carrier_settings_with_(myparcel)__1.json | 42 +++++-- ...iew_with_data_set_carrier_settings__1.json | 51 ++++++++ ...pment_with_data_set_empty_shipment__1.json | 1 + ...data_set_shipment_with_all_options__1.json | 1 + ...tsActionTest__it_updates_shipments__1.json | 3 +- 131 files changed, 2540 insertions(+), 173 deletions(-) create mode 100644 src/App/Options/Definition/CollectDefinition.php create mode 100644 src/App/Order/Calculator/UPS/UPSAgeCheckCalculator.php create mode 100644 src/App/Order/Calculator/UPS/UPSDeliveryTypeCalculator.php create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_age_check__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_age_check__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_hide_sender__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_hide_sender__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_insurance__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_insurance__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_large_format__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_only_recipient__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_only_recipient__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_receipt_code__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_receipt_code__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return_large_format__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_signature__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_signature__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_UPS_to_Netherlands_express__1.json create mode 100644 tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_UPS_to_Belgium__1.json create mode 100644 tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_UPS_to_Netherlands_express__1.json diff --git a/config/pdk-business-logic.php b/config/pdk-business-logic.php index b6ce5ca2b..78bf71a36 100644 --- a/config/pdk-business-logic.php +++ b/config/pdk-business-logic.php @@ -3,6 +3,7 @@ declare(strict_types=1); use MyParcelNL\Pdk\App\Options\Definition\AgeCheckDefinition; +use MyParcelNL\Pdk\App\Options\Definition\CollectDefinition; use MyParcelNL\Pdk\App\Options\Definition\DirectReturnDefinition; use MyParcelNL\Pdk\App\Options\Definition\HideSenderDefinition; use MyParcelNL\Pdk\App\Options\Definition\InsuranceDefinition; @@ -76,6 +77,7 @@ new SignatureDefinition(), new TrackedDefinition(), new ReceiptCodeDefinition(), + new CollectDefinition(), ]; }), diff --git a/config/platform/myparcel.php b/config/platform/myparcel.php index f7df4684f..cfccf0f3d 100644 --- a/config/platform/myparcel.php +++ b/config/platform/myparcel.php @@ -48,6 +48,7 @@ 'sameDayDelivery' => false, 'signature' => true, 'receiptCode' => true, + 'collect' => false, 'insurance' => [ 0, 10000, @@ -99,6 +100,7 @@ 'onlyRecipient' => true, 'sameDayDelivery' => false, 'largeFormat' => true, + 'collect' => false, ], 'features' => [ 'labelDescriptionLength' => 45, @@ -112,7 +114,7 @@ 'packageTypes' => [ DeliveryOptions::PACKAGE_TYPE_PACKAGE_NAME, DeliveryOptions::PACKAGE_TYPE_MAILBOX_NAME, - DeliveryOptions::PACKAGE_TYPE_PACKAGE_SMALL_NAME + DeliveryOptions::PACKAGE_TYPE_PACKAGE_SMALL_NAME, ], 'deliveryTypes' => [ DeliveryOptions::DELIVERY_TYPE_STANDARD_NAME, @@ -127,6 +129,7 @@ 'signature' => true, 'saturdayDelivery' => true, 'hideSender' => true, + 'collect' => false, 'insurance' => [ 0, 50000, @@ -162,6 +165,7 @@ 'onlyRecipient' => true, 'sameDayDelivery' => true, 'largeFormat' => true, + 'collect' => false, ], 'features' => [ 'labelDescriptionLength' => 45, @@ -187,6 +191,7 @@ 'signature' => true, 'saturdayDelivery' => false, 'hideSender' => false, + 'collect' => false, 'insurance' => [ 0, 50000, @@ -222,6 +227,7 @@ 'onlyRecipient' => false, 'sameDayDelivery' => false, 'largeFormat' => false, + 'collect' => false, ], 'features' => [ 'labelDescriptionLength' => 45, @@ -273,11 +279,14 @@ ], 'deliveryTypes' => [ DeliveryOptions::DELIVERY_TYPE_STANDARD_NAME, + DeliveryOptions::DELIVERY_TYPE_EXPRESS_NAME, ], 'shipmentOptions' => [ - 'ageCheck' => false, - 'onlyRecipient' => false, - 'return' => false, + 'ageCheck' => true, + 'onlyRecipient' => true, + 'return' => true, + 'signature' => true, + 'collect' => true, ], 'features' => [ 'labelDescriptionLength' => 45, @@ -299,6 +308,7 @@ 'ageCheck' => false, 'onlyRecipient' => false, 'return' => false, + 'collect' => false, ], 'features' => [ 'labelDescriptionLength' => 45, diff --git a/config/schema/myparcel/order/ups/base.json b/config/schema/myparcel/order/ups/base.json index e3415298c..a920fcf5e 100644 --- a/config/schema/myparcel/order/ups/base.json +++ b/config/schema/myparcel/order/ups/base.json @@ -10,7 +10,7 @@ "required": ["deliveryType"], "properties": { "deliveryType": { - "enum": ["standard", null] + "enum": ["standard", null, "express"] } } } @@ -43,7 +43,7 @@ "deliveryOptions": { "properties": { "deliveryType": { - "enum": ["standard", null] + "enum": ["standard", null, "express"] }, "packageType": { "enum": ["package", null] diff --git a/config/schema/order.json b/config/schema/order.json index f7c9ea2a3..aea159ee2 100644 --- a/config/schema/order.json +++ b/config/schema/order.json @@ -44,7 +44,7 @@ "pattern": "^(20\\d\\d)-(0[1-9]|1[012])-(0[1-9]|[12]\\d|3[01]) ([01]\\d|2[0123]):([012345]\\d):([012345]\\d)$" }, "deliveryType": { - "enum": ["morning", "standard", "evening", "pickup"] + "enum": ["morning", "standard", "evening", "pickup", "express"] }, "labelAmount": { "type": ["integer", "null"], @@ -146,6 +146,9 @@ }, "receiptCode": { "enum": [0, 1] + }, + "collect": { + "enum": [-1, 0, 1] } } } diff --git a/src/App/DeliveryOptions/Service/DeliveryOptionsService.php b/src/App/DeliveryOptions/Service/DeliveryOptionsService.php index 1ccbc6b96..2be5742ff 100644 --- a/src/App/DeliveryOptions/Service/DeliveryOptionsService.php +++ b/src/App/DeliveryOptions/Service/DeliveryOptionsService.php @@ -36,6 +36,7 @@ class DeliveryOptionsService implements DeliveryOptionsServiceInterface 'allowSameDayDelivery' => CarrierSettings::ALLOW_SAME_DAY_DELIVERY, 'allowSaturdayDelivery' => CarrierSettings::ALLOW_SATURDAY_DELIVERY, 'allowSignature' => CarrierSettings::ALLOW_SIGNATURE, + 'allowExpressDelivery' => CarrierSettings::ALLOW_DELIVERY_TYPE_EXPRESS, 'priceEveningDelivery' => CarrierSettings::PRICE_DELIVERY_TYPE_EVENING, 'priceMorningDelivery' => CarrierSettings::PRICE_DELIVERY_TYPE_MORNING, 'priceOnlyRecipient' => CarrierSettings::PRICE_ONLY_RECIPIENT, @@ -46,6 +47,7 @@ class DeliveryOptionsService implements DeliveryOptionsServiceInterface 'priceSameDayDelivery' => CarrierSettings::PRICE_DELIVERY_TYPE_SAME_DAY, 'priceSignature' => CarrierSettings::PRICE_SIGNATURE, 'priceStandardDelivery' => CarrierSettings::PRICE_DELIVERY_TYPE_STANDARD, + 'priceCollect' => CarrierSettings::PRICE_COLLECT, ]; /** diff --git a/src/App/Options/Definition/CollectDefinition.php b/src/App/Options/Definition/CollectDefinition.php new file mode 100644 index 000000000..be7860b15 --- /dev/null +++ b/src/App/Options/Definition/CollectDefinition.php @@ -0,0 +1,45 @@ +canHaveCollect(); + } +} diff --git a/src/App/Order/Calculator/UPS/UPSAgeCheckCalculator.php b/src/App/Order/Calculator/UPS/UPSAgeCheckCalculator.php new file mode 100644 index 000000000..996363ca2 --- /dev/null +++ b/src/App/Order/Calculator/UPS/UPSAgeCheckCalculator.php @@ -0,0 +1,25 @@ +order->deliveryOptions->shipmentOptions; + + if (TriStateService::ENABLED !== $shipmentOptions->ageCheck) { + return; + } + + $shipmentOptions->signature = TriStateService::ENABLED; + } +} diff --git a/src/App/Order/Calculator/UPS/UPSCalculator.php b/src/App/Order/Calculator/UPS/UPSCalculator.php index 9f89916bc..6f925ef64 100644 --- a/src/App/Order/Calculator/UPS/UPSCalculator.php +++ b/src/App/Order/Calculator/UPS/UPSCalculator.php @@ -12,6 +12,8 @@ protected function getCalculators(): array { return [ UPSCountryShipmentOptionsCalculator::class, + UPSAgeCheckCalculator::class, + UPSDeliveryTypeCalculator::class, ]; } } diff --git a/src/App/Order/Calculator/UPS/UPSCountryShipmentOptionsCalculator.php b/src/App/Order/Calculator/UPS/UPSCountryShipmentOptionsCalculator.php index b1e7e0e21..c1b88d798 100644 --- a/src/App/Order/Calculator/UPS/UPSCountryShipmentOptionsCalculator.php +++ b/src/App/Order/Calculator/UPS/UPSCountryShipmentOptionsCalculator.php @@ -5,26 +5,12 @@ namespace MyParcelNL\Pdk\App\Order\Calculator\UPS; use MyParcelNL\Pdk\App\Order\Calculator\AbstractPdkOrderOptionCalculator; -use MyParcelNL\Pdk\App\Order\Model\PdkOrder; -use MyParcelNL\Pdk\Base\Contract\CountryServiceInterface; -use MyParcelNL\Pdk\Facade\Pdk; class UPSCountryShipmentOptionsCalculator extends AbstractPdkOrderOptionCalculator { - private $countryService; - - public function __construct(PdkOrder $order) - { - parent::__construct($order); - - $this->countryService = Pdk::get(CountryServiceInterface::class); - } - + // Comment: Always set delivery date to null for UPS shipments regardless of country public function calculate(): void { - $cc = $this->order->shippingAddress->cc; - if ($this->countryService->isRow($cc) || $this->countryService->isEu($cc)) { - $this->order->deliveryOptions->date = null; - } + $this->order->deliveryOptions->date = null; } } diff --git a/src/App/Order/Calculator/UPS/UPSDeliveryTypeCalculator.php b/src/App/Order/Calculator/UPS/UPSDeliveryTypeCalculator.php new file mode 100644 index 000000000..e44a07cb2 --- /dev/null +++ b/src/App/Order/Calculator/UPS/UPSDeliveryTypeCalculator.php @@ -0,0 +1,28 @@ +order->deliveryOptions; + + $isExpress = $deliveryOptions->deliveryType === DeliveryOptions::DELIVERY_TYPE_EXPRESS_NAME; + if ( + $isExpress + && $this->order->shippingAddress->cc !== CountryCodes::CC_NL + ) { + $deliveryOptions->deliveryType = DeliveryOptions::DELIVERY_TYPE_STANDARD_NAME; + } + } +} diff --git a/src/Frontend/View/CarrierSettingsItemView.php b/src/Frontend/View/CarrierSettingsItemView.php index 0ef2aeef8..11cb3ede7 100644 --- a/src/Frontend/View/CarrierSettingsItemView.php +++ b/src/Frontend/View/CarrierSettingsItemView.php @@ -265,6 +265,10 @@ function (FormOperationBuilder $builder) { : [], $this->carrierSchema->canHaveInsurance() ? $this->getExportInsuranceFields() : [], + + $this->carrierSchema->canHaveCollect() + ? [new interactiveElement(CarrierSettings::EXPORT_COLLECT, Components::INPUT_TOGGLE)] + : [], ]; } @@ -393,7 +397,13 @@ function (FormOperationBuilder $builder) { $this->carrierSchema->canHaveOnlyRecipient() ? $this->createSettingWithPriceFields( CarrierSettings::ALLOW_ONLY_RECIPIENT, CarrierSettings::PRICE_ONLY_RECIPIENT - ) : [] + ) : [], + + $this->carrierSchema->canHaveExpressDelivery() ? + $this->createSettingWithPriceFields( + CarrierSettings::ALLOW_DELIVERY_TYPE_EXPRESS, + CarrierSettings::PRICE_DELIVERY_TYPE_EXPRESS + ) : [] ), /** diff --git a/src/Settings/Model/CarrierSettings.php b/src/Settings/Model/CarrierSettings.php index 75a37354d..e820efcc1 100644 --- a/src/Settings/Model/CarrierSettings.php +++ b/src/Settings/Model/CarrierSettings.php @@ -20,6 +20,7 @@ * @property bool $allowSameDayDelivery * @property bool $allowSaturdayDelivery * @property bool $allowSignature + * @property bool $allowCollect * @property string $cutoffTime * @property string $cutoffTimeSameDay * @property string $defaultPackageType @@ -59,6 +60,7 @@ * @property float $priceSignature * @property float $allowInternationalMailbox * @property float $priceInternationalMailbox + * @property float $priceCollect */ class CarrierSettings extends AbstractSettingsModel { @@ -70,57 +72,61 @@ class CarrierSettings extends AbstractSettingsModel /** * Settings in this category. */ - public const ALLOW_DELIVERY_OPTIONS = 'allowDeliveryOptions'; - public const ALLOW_STANDARD_DELIVERY = 'allowStandardDelivery'; - public const ALLOW_EVENING_DELIVERY = 'allowEveningDelivery'; - public const ALLOW_MONDAY_DELIVERY = 'allowMondayDelivery'; - public const ALLOW_MORNING_DELIVERY = 'allowMorningDelivery'; - public const ALLOW_ONLY_RECIPIENT = 'allowOnlyRecipient'; - public const ALLOW_PICKUP_LOCATIONS = 'allowPickupLocations'; - public const ALLOW_SAME_DAY_DELIVERY = 'allowSameDayDelivery'; - public const ALLOW_SATURDAY_DELIVERY = 'allowSaturdayDelivery'; - public const ALLOW_SIGNATURE = 'allowSignature'; - public const CUTOFF_TIME = 'cutoffTime'; - public const CUTOFF_TIME_SAME_DAY = 'cutoffTimeSameDay'; - public const DEFAULT_PACKAGE_TYPE = 'defaultPackageType'; - public const DELIVERY_DAYS_WINDOW = 'deliveryDaysWindow'; - public const DELIVERY_OPTIONS_CUSTOM_CSS = 'deliveryOptionsCustomCss'; - public const DELIVERY_OPTIONS_ENABLED = 'deliveryOptionsEnabled'; - public const DELIVERY_OPTIONS_ENABLED_FOR_BACKORDERS = 'deliveryOptionsEnabledForBackorders'; - public const DIGITAL_STAMP_DEFAULT_WEIGHT = 'digitalStampDefaultWeight'; - public const DROP_OFF_DELAY = 'dropOffDelay'; - public const DROP_OFF_POSSIBILITIES = 'dropOffPossibilities'; - public const EXPORT_AGE_CHECK = 'exportAgeCheck'; - public const EXPORT_HIDE_SENDER = 'exportHideSender'; - public const EXPORT_INSURANCE = 'exportInsurance'; - public const EXPORT_INSURANCE_FROM_AMOUNT = 'exportInsuranceFromAmount'; - public const EXPORT_INSURANCE_PRICE_PERCENTAGE = 'exportInsurancePricePercentage'; - public const EXPORT_INSURANCE_UP_TO = 'exportInsuranceUpTo'; - public const EXPORT_INSURANCE_UP_TO_EU = 'exportInsuranceUpToEu'; - public const EXPORT_INSURANCE_UP_TO_ROW = 'exportInsuranceUpToRow'; - public const EXPORT_INSURANCE_UP_TO_UNIQUE = 'exportInsuranceUpToUnique'; - public const EXPORT_LARGE_FORMAT = 'exportLargeFormat'; - public const EXPORT_ONLY_RECIPIENT = 'exportOnlyRecipient'; - public const EXPORT_RECEIPT_CODE = 'exportReceiptCode'; - public const EXPORT_RETURN = 'exportReturn'; - public const EXPORT_RETURN_LARGE_FORMAT = 'exportReturnLargeFormat'; - public const EXPORT_RETURN_PACKAGE_TYPE = 'exportReturnPackageType'; - public const EXPORT_SIGNATURE = 'exportSignature'; - public const EXPORT_TRACKED = 'exportTracked'; - public const PRICE_DELIVERY_TYPE_EVENING = 'priceDeliveryTypeEvening'; - public const PRICE_DELIVERY_TYPE_MONDAY = 'priceDeliveryTypeMonday'; - public const PRICE_DELIVERY_TYPE_MORNING = 'priceDeliveryTypeMorning'; - public const PRICE_DELIVERY_TYPE_PICKUP = 'priceDeliveryTypePickup'; - public const PRICE_DELIVERY_TYPE_SAME_DAY = 'priceDeliveryTypeSameDay'; - public const PRICE_DELIVERY_TYPE_SATURDAY = 'priceDeliveryTypeSaturday'; - public const PRICE_DELIVERY_TYPE_STANDARD = 'priceDeliveryTypeStandard'; - public const PRICE_ONLY_RECIPIENT = 'priceOnlyRecipient'; - public const PRICE_PACKAGE_TYPE_DIGITAL_STAMP = 'pricePackageTypeDigitalStamp'; - public const PRICE_PACKAGE_TYPE_MAILBOX = 'pricePackageTypeMailbox'; - public const PRICE_PACKAGE_TYPE_PACKAGE_SMALL = 'pricePackageTypePackageSmall'; - public const PRICE_SIGNATURE = 'priceSignature'; - public const ALLOW_INTERNATIONAL_MAILBOX = 'allowInternationalMailbox'; - public const PRICE_INTERNATIONAL_MAILBOX = 'priceInternationalMailbox'; + public const ALLOW_DELIVERY_OPTIONS = 'allowDeliveryOptions'; + public const ALLOW_STANDARD_DELIVERY = 'allowStandardDelivery'; + public const ALLOW_EVENING_DELIVERY = 'allowEveningDelivery'; + public const ALLOW_MONDAY_DELIVERY = 'allowMondayDelivery'; + public const ALLOW_MORNING_DELIVERY = 'allowMorningDelivery'; + public const ALLOW_ONLY_RECIPIENT = 'allowOnlyRecipient'; + public const ALLOW_PICKUP_LOCATIONS = 'allowPickupLocations'; + public const ALLOW_SAME_DAY_DELIVERY = 'allowSameDayDelivery'; + public const ALLOW_SATURDAY_DELIVERY = 'allowSaturdayDelivery'; + public const ALLOW_SIGNATURE = 'allowSignature'; + public const ALLOW_DELIVERY_TYPE_EXPRESS = 'allowDeliveryTypeExpress'; + public const CUTOFF_TIME = 'cutoffTime'; + public const CUTOFF_TIME_SAME_DAY = 'cutoffTimeSameDay'; + public const DEFAULT_PACKAGE_TYPE = 'defaultPackageType'; + public const DELIVERY_DAYS_WINDOW = 'deliveryDaysWindow'; + public const DELIVERY_OPTIONS_CUSTOM_CSS = 'deliveryOptionsCustomCss'; + public const DELIVERY_OPTIONS_ENABLED = 'deliveryOptionsEnabled'; + public const DELIVERY_OPTIONS_ENABLED_FOR_BACKORDERS = 'deliveryOptionsEnabledForBackorders'; + public const DIGITAL_STAMP_DEFAULT_WEIGHT = 'digitalStampDefaultWeight'; + public const DROP_OFF_DELAY = 'dropOffDelay'; + public const DROP_OFF_POSSIBILITIES = 'dropOffPossibilities'; + public const EXPORT_AGE_CHECK = 'exportAgeCheck'; + public const EXPORT_HIDE_SENDER = 'exportHideSender'; + public const EXPORT_INSURANCE = 'exportInsurance'; + public const EXPORT_INSURANCE_FROM_AMOUNT = 'exportInsuranceFromAmount'; + public const EXPORT_INSURANCE_PRICE_PERCENTAGE = 'exportInsurancePricePercentage'; + public const EXPORT_INSURANCE_UP_TO = 'exportInsuranceUpTo'; + public const EXPORT_INSURANCE_UP_TO_EU = 'exportInsuranceUpToEu'; + public const EXPORT_INSURANCE_UP_TO_ROW = 'exportInsuranceUpToRow'; + public const EXPORT_INSURANCE_UP_TO_UNIQUE = 'exportInsuranceUpToUnique'; + public const EXPORT_LARGE_FORMAT = 'exportLargeFormat'; + public const EXPORT_ONLY_RECIPIENT = 'exportOnlyRecipient'; + public const EXPORT_RECEIPT_CODE = 'exportReceiptCode'; + public const EXPORT_RETURN = 'exportReturn'; + public const EXPORT_RETURN_LARGE_FORMAT = 'exportReturnLargeFormat'; + public const EXPORT_RETURN_PACKAGE_TYPE = 'exportReturnPackageType'; + public const EXPORT_SIGNATURE = 'exportSignature'; + public const EXPORT_TRACKED = 'exportTracked'; + public const EXPORT_COLLECT = 'exportCollect'; + public const PRICE_DELIVERY_TYPE_EVENING = 'priceDeliveryTypeEvening'; + public const PRICE_DELIVERY_TYPE_MONDAY = 'priceDeliveryTypeMonday'; + public const PRICE_DELIVERY_TYPE_MORNING = 'priceDeliveryTypeMorning'; + public const PRICE_DELIVERY_TYPE_PICKUP = 'priceDeliveryTypePickup'; + public const PRICE_DELIVERY_TYPE_SAME_DAY = 'priceDeliveryTypeSameDay'; + public const PRICE_DELIVERY_TYPE_SATURDAY = 'priceDeliveryTypeSaturday'; + public const PRICE_DELIVERY_TYPE_STANDARD = 'priceDeliveryTypeStandard'; + public const PRICE_ONLY_RECIPIENT = 'priceOnlyRecipient'; + public const PRICE_PACKAGE_TYPE_DIGITAL_STAMP = 'pricePackageTypeDigitalStamp'; + public const PRICE_PACKAGE_TYPE_MAILBOX = 'pricePackageTypeMailbox'; + public const PRICE_PACKAGE_TYPE_PACKAGE_SMALL = 'pricePackageTypePackageSmall'; + public const PRICE_SIGNATURE = 'priceSignature'; + public const ALLOW_INTERNATIONAL_MAILBOX = 'allowInternationalMailbox'; + public const PRICE_INTERNATIONAL_MAILBOX = 'priceInternationalMailbox'; + public const PRICE_COLLECT = 'priceCollect'; + public const PRICE_DELIVERY_TYPE_EXPRESS = 'priceDeliveryTypeExpress'; protected $attributes = [ 'id' => self::ID, @@ -136,6 +142,7 @@ class CarrierSettings extends AbstractSettingsModel self::ALLOW_SAME_DAY_DELIVERY => false, self::ALLOW_SATURDAY_DELIVERY => false, self::ALLOW_SIGNATURE => false, + self::ALLOW_DELIVERY_TYPE_EXPRESS => false, self::CUTOFF_TIME => '16:00', self::CUTOFF_TIME_SAME_DAY => '10:00', self::DEFAULT_PACKAGE_TYPE => DeliveryOptions::DEFAULT_PACKAGE_TYPE_NAME, @@ -161,6 +168,7 @@ class CarrierSettings extends AbstractSettingsModel self::EXPORT_RETURN_LARGE_FORMAT => false, self::EXPORT_RETURN_PACKAGE_TYPE => DeliveryOptions::DEFAULT_PACKAGE_TYPE_NAME, self::EXPORT_SIGNATURE => false, + self::EXPORT_COLLECT => false, self::PRICE_DELIVERY_TYPE_EVENING => 0, self::PRICE_DELIVERY_TYPE_MONDAY => 0, self::PRICE_DELIVERY_TYPE_MORNING => 0, @@ -174,6 +182,8 @@ class CarrierSettings extends AbstractSettingsModel self::PRICE_SIGNATURE => 0, self::ALLOW_INTERNATIONAL_MAILBOX => false, self::PRICE_INTERNATIONAL_MAILBOX => 0, + self::PRICE_COLLECT => 0, + self::PRICE_DELIVERY_TYPE_EXPRESS => 0, ]; protected $casts = [ @@ -189,6 +199,7 @@ class CarrierSettings extends AbstractSettingsModel self::ALLOW_SAME_DAY_DELIVERY => 'bool', self::ALLOW_SATURDAY_DELIVERY => 'bool', self::ALLOW_SIGNATURE => 'bool', + self::ALLOW_DELIVERY_TYPE_EXPRESS => 'bool', self::CUTOFF_TIME => 'string', self::CUTOFF_TIME_SAME_DAY => 'string', self::DEFAULT_PACKAGE_TYPE => 'string', @@ -214,6 +225,7 @@ class CarrierSettings extends AbstractSettingsModel self::EXPORT_RETURN_LARGE_FORMAT => 'bool', self::EXPORT_RETURN_PACKAGE_TYPE => 'string', self::EXPORT_SIGNATURE => 'bool', + self::EXPORT_COLLECT => 'bool', self::PRICE_DELIVERY_TYPE_EVENING => 'float', self::PRICE_DELIVERY_TYPE_MONDAY => 'float', self::PRICE_DELIVERY_TYPE_MORNING => 'float', @@ -227,6 +239,8 @@ class CarrierSettings extends AbstractSettingsModel self::PRICE_SIGNATURE => 'float', self::ALLOW_INTERNATIONAL_MAILBOX => 'bool', self::PRICE_INTERNATIONAL_MAILBOX => 'float', + self::PRICE_COLLECT => 'float', + self::PRICE_DELIVERY_TYPE_EXPRESS => 'float', ]; /** diff --git a/src/Shipment/Model/DeliveryOptions.php b/src/Shipment/Model/DeliveryOptions.php index df78031cd..d4f3f5e7e 100644 --- a/src/Shipment/Model/DeliveryOptions.php +++ b/src/Shipment/Model/DeliveryOptions.php @@ -44,6 +44,8 @@ class DeliveryOptions extends Model public const DELIVERY_TYPE_STANDARD_NAME = 'standard'; public const DELIVERY_TYPE_PICKUP_ID = 4; public const DELIVERY_TYPE_PICKUP_NAME = 'pickup'; + public const DELIVERY_TYPE_EXPRESS_ID = 7; + public const DELIVERY_TYPE_EXPRESS_NAME = 'express'; /** * @var int[] */ @@ -52,6 +54,7 @@ class DeliveryOptions extends Model self::DELIVERY_TYPE_STANDARD_ID, self::DELIVERY_TYPE_EVENING_ID, self::DELIVERY_TYPE_PICKUP_ID, + self::DELIVERY_TYPE_EXPRESS_ID, ]; /** * @var string[] @@ -61,6 +64,7 @@ class DeliveryOptions extends Model self::DELIVERY_TYPE_STANDARD_NAME, self::DELIVERY_TYPE_EVENING_NAME, self::DELIVERY_TYPE_PICKUP_NAME, + self::DELIVERY_TYPE_EXPRESS_NAME, ]; /** * @var array @@ -70,6 +74,7 @@ class DeliveryOptions extends Model self::DELIVERY_TYPE_STANDARD_NAME => self::DELIVERY_TYPE_STANDARD_ID, self::DELIVERY_TYPE_EVENING_NAME => self::DELIVERY_TYPE_EVENING_ID, self::DELIVERY_TYPE_PICKUP_NAME => self::DELIVERY_TYPE_PICKUP_ID, + self::DELIVERY_TYPE_EXPRESS_NAME => self::DELIVERY_TYPE_EXPRESS_ID, ]; public const DEFAULT_DELIVERY_TYPE_ID = self::DELIVERY_TYPE_STANDARD_ID; public const DEFAULT_DELIVERY_TYPE_NAME = self::DELIVERY_TYPE_STANDARD_NAME; diff --git a/src/Shipment/Model/ShipmentOptions.php b/src/Shipment/Model/ShipmentOptions.php index e51f72f6c..41448ff10 100644 --- a/src/Shipment/Model/ShipmentOptions.php +++ b/src/Shipment/Model/ShipmentOptions.php @@ -19,6 +19,7 @@ * @property int<-1|0|1> $sameDayDelivery * @property int<-1|0|1> $signature * @property int<-1|0|1> $tracked + * @property int<-1|0|1> $collect */ class ShipmentOptions extends Model { @@ -33,6 +34,7 @@ class ShipmentOptions extends Model public const SAME_DAY_DELIVERY = 'sameDayDelivery'; public const SIGNATURE = 'signature'; public const TRACKED = 'tracked'; + public const COLLECT = 'collect'; protected $attributes = [ self::LABEL_DESCRIPTION => null, @@ -46,6 +48,7 @@ class ShipmentOptions extends Model self::SAME_DAY_DELIVERY => TriStateService::INHERIT, self::SIGNATURE => TriStateService::INHERIT, self::TRACKED => TriStateService::INHERIT, + self::COLLECT => TriStateService::INHERIT, ]; protected $casts = [ @@ -60,5 +63,6 @@ class ShipmentOptions extends Model self::SAME_DAY_DELIVERY => TriStateService::TYPE_STRICT, self::SIGNATURE => TriStateService::TYPE_STRICT, self::TRACKED => TriStateService::TYPE_STRICT, + self::COLLECT => TriStateService::TYPE_STRICT, ]; } diff --git a/src/Validation/Validator/CarrierSchema.php b/src/Validation/Validator/CarrierSchema.php index d8eb36cae..8f64ebb1d 100644 --- a/src/Validation/Validator/CarrierSchema.php +++ b/src/Validation/Validator/CarrierSchema.php @@ -7,6 +7,7 @@ use BadMethodCallException; use MyParcelNL\Pdk\App\Options\Contract\OrderOptionDefinitionInterface; use MyParcelNL\Pdk\App\Options\Definition\AgeCheckDefinition; +use MyParcelNL\Pdk\App\Options\Definition\CollectDefinition; use MyParcelNL\Pdk\App\Options\Definition\DirectReturnDefinition; use MyParcelNL\Pdk\App\Options\Definition\HideSenderDefinition; use MyParcelNL\Pdk\App\Options\Definition\InsuranceDefinition; @@ -73,6 +74,11 @@ public function canHaveCarrierSmallPackageContract(): bool return $this->canHaveFeature('carrierSmallPackageContract'); } + public function canHaveCollect(): bool + { + return $this->canHave(CollectDefinition::class); + } + public function canHaveDirectReturn(): bool { return $this->canHave(DirectReturnDefinition::class); @@ -83,6 +89,11 @@ public function canHaveEveningDelivery(): bool return $this->hasDeliveryType(DeliveryOptions::DELIVERY_TYPE_EVENING_NAME); } + public function canHaveExpressDelivery(): bool + { + return $this->hasDeliveryType(DeliveryOptions::DELIVERY_TYPE_EXPRESS_NAME); + } + /** * @return bool */ diff --git a/tests/Datasets/pdkOrdersToNl.php b/tests/Datasets/pdkOrdersToNl.php index 6fb9e8c61..da19f482e 100644 --- a/tests/Datasets/pdkOrdersToNl.php +++ b/tests/Datasets/pdkOrdersToNl.php @@ -81,4 +81,28 @@ ) ); }, + + 'carrier UPS to Belgium' => function () { + return factory(PdkOrderCollection::class)->push( + factory(PdkOrder::class) + ->withDeliveryOptions( + factory(DeliveryOptions::class) + ->withCarrier(Carrier::CARRIER_UPS_NAME) + ->withDeliveryType(DeliveryOptions::DELIVERY_TYPE_EXPRESS_NAME) + ) + ->toBelgium() + ); + }, + + 'carrier UPS to Netherlands express' => function () { + return factory(PdkOrderCollection::class)->push( + factory(PdkOrder::class) + ->withDeliveryOptions( + factory(DeliveryOptions::class) + ->withCarrier(Carrier::CARRIER_UPS_NAME) + ->withDeliveryType(DeliveryOptions::DELIVERY_TYPE_EXPRESS_NAME) + ) + ->toTheNetherlands() + ); + }, ]); diff --git a/tests/Unit/App/Context/Model/DeliveryOptionsConfigTest.php b/tests/Unit/App/Context/Model/DeliveryOptionsConfigTest.php index 932233463..8ba5ec653 100644 --- a/tests/Unit/App/Context/Model/DeliveryOptionsConfigTest.php +++ b/tests/Unit/App/Context/Model/DeliveryOptionsConfigTest.php @@ -92,6 +92,7 @@ 'allowSameDayDelivery' => false, 'allowSaturdayDelivery' => false, 'allowSignature' => false, + 'allowExpressDelivery' => false, 'dropOffDays' => [], 'priceEveningDelivery' => 0.0, 'priceMorningDelivery' => 0.0, @@ -107,6 +108,7 @@ 'dropOffDelay' => 0, 'cutoffTime' => null, 'cutoffTimeSameDay' => null, + 'priceCollect' => 0.0, ], ], 'currency' => 'EUR', @@ -163,6 +165,7 @@ 'allowSameDayDelivery' => false, 'allowSaturdayDelivery' => false, 'allowSignature' => false, + 'allowExpressDelivery' => false, 'dropOffDays' => [], 'priceEveningDelivery' => 1.4595, 'priceMorningDelivery' => 1.4595, @@ -178,6 +181,7 @@ 'dropOffDelay' => 0, 'cutoffTime' => null, 'cutoffTimeSameDay' => null, + 'priceCollect' => 1.4595, ], ], 'currency' => 'EUR', diff --git a/tests/Unit/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculatorTest.php b/tests/Unit/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculatorTest.php index 06b0c41cb..686cb6245 100644 --- a/tests/Unit/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculatorTest.php +++ b/tests/Unit/App/Order/Calculator/PostNl/PostNLReceiptCodeCalculatorTest.php @@ -35,6 +35,7 @@ ShipmentOptions::SAME_DAY_DELIVERY => TriStateService::INHERIT, ShipmentOptions::SIGNATURE => TriStateService::INHERIT, ShipmentOptions::TRACKED => TriStateService::INHERIT, + ShipmentOptions::COLLECT => TriStateService::INHERIT, ]; $order = factory(PdkOrder::class) diff --git a/tests/Unit/Context/Model/OrderDataContextTest.php b/tests/Unit/Context/Model/OrderDataContextTest.php index 247fe4499..f020ad327 100644 --- a/tests/Unit/Context/Model/OrderDataContextTest.php +++ b/tests/Unit/Context/Model/OrderDataContextTest.php @@ -87,6 +87,7 @@ function setup(): void ShipmentOptions::SIGNATURE => TriStateService::INHERIT, ShipmentOptions::TRACKED => TriStateService::INHERIT, ShipmentOptions::RECEIPT_CODE => TriStateService::INHERIT, + ShipmentOptions::COLLECT => TriStateService::INHERIT, ]) ->and($context->inheritedDeliveryOptions->toArrayWithoutNull()) ->toEqual([ @@ -108,6 +109,7 @@ function setup(): void ShipmentOptions::SIGNATURE => TriStateService::ENABLED, ShipmentOptions::TRACKED => TriStateService::DISABLED, ShipmentOptions::RECEIPT_CODE => TriStateService::DISABLED, + ShipmentOptions::COLLECT => TriStateService::DISABLED, ], ], 'dhlforyou:12345' => [ @@ -127,6 +129,7 @@ function setup(): void ShipmentOptions::SIGNATURE => TriStateService::DISABLED, ShipmentOptions::TRACKED => TriStateService::DISABLED, ShipmentOptions::RECEIPT_CODE => TriStateService::DISABLED, + ShipmentOptions::COLLECT => TriStateService::DISABLED, ], ], ]); diff --git a/tests/Unit/Shipment/Model/Options/DeliveryOptionsTest.php b/tests/Unit/Shipment/Model/Options/DeliveryOptionsTest.php index 7663af4e8..9d1d8265a 100644 --- a/tests/Unit/Shipment/Model/Options/DeliveryOptionsTest.php +++ b/tests/Unit/Shipment/Model/Options/DeliveryOptionsTest.php @@ -55,6 +55,7 @@ 'sameDayDelivery' => true, 'signature' => true, 'receiptCode' => true, + 'collect' => true, ], ]); @@ -71,6 +72,7 @@ 'signature' => true, 'tracked' => true, 'receiptCode' => true, + 'collect' => true, ]); }); diff --git a/tests/__snapshots__/AbstractSettingsRepositoryTest__it_retrieves_all_categories_and_fields__1.json b/tests/__snapshots__/AbstractSettingsRepositoryTest__it_retrieves_all_categories_and_fields__1.json index f36e3a496..738b36e7c 100644 --- a/tests/__snapshots__/AbstractSettingsRepositoryTest__it_retrieves_all_categories_and_fields__1.json +++ b/tests/__snapshots__/AbstractSettingsRepositoryTest__it_retrieves_all_categories_and_fields__1.json @@ -57,6 +57,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "10:00", "defaultPackageType": "package", @@ -85,6 +86,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -97,7 +99,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "dhl": { "id": "dhl", @@ -111,6 +115,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowDeliveryTypeExpress": false, "cutoffTime": "16:00", "cutoffTimeSameDay": "10:00", "defaultPackageType": "package", @@ -139,6 +144,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -151,7 +157,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "bpost": { "id": "bpost", @@ -165,6 +173,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowDeliveryTypeExpress": false, "cutoffTime": "16:00", "cutoffTimeSameDay": "10:00", "defaultPackageType": "package", @@ -193,6 +202,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -205,7 +215,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 } } } diff --git a/tests/__snapshots__/CarrierTest__it_instantiates_carrier_from_external_identifier_with_data_set_default_carrier__1.json b/tests/__snapshots__/CarrierTest__it_instantiates_carrier_from_external_identifier_with_data_set_default_carrier__1.json index d46a9f7d8..89039ae50 100644 --- a/tests/__snapshots__/CarrierTest__it_instantiates_carrier_from_external_identifier_with_data_set_default_carrier__1.json +++ b/tests/__snapshots__/CarrierTest__it_instantiates_carrier_from_external_identifier_with_data_set_default_carrier__1.json @@ -23,6 +23,7 @@ "signature": true, "saturdayDelivery": true, "hideSender": true, + "collect": false, "insurance": [0, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] } }, @@ -39,7 +40,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": true, - "largeFormat": true + "largeFormat": true, + "collect": false } } } diff --git a/tests/__snapshots__/CarrierTest__it_instantiates_carrier_from_external_identifier_with_data_set_subscription_carrier__1.json b/tests/__snapshots__/CarrierTest__it_instantiates_carrier_from_external_identifier_with_data_set_subscription_carrier__1.json index 3ab0ea5fa..e016148ac 100644 --- a/tests/__snapshots__/CarrierTest__it_instantiates_carrier_from_external_identifier_with_data_set_subscription_carrier__1.json +++ b/tests/__snapshots__/CarrierTest__it_instantiates_carrier_from_external_identifier_with_data_set_subscription_carrier__1.json @@ -24,6 +24,7 @@ "signature": true, "saturdayDelivery": true, "hideSender": true, + "collect": false, "insurance": [0, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] } }, @@ -40,7 +41,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": true, - "largeFormat": true + "largeFormat": true, + "collect": false } } } diff --git a/tests/__snapshots__/CarrierTest__it_instantiates_carriers_from_name_with_(myparcel)__1.json b/tests/__snapshots__/CarrierTest__it_instantiates_carriers_from_name_with_(myparcel)__1.json index b03e1831e..3fde88bba 100644 --- a/tests/__snapshots__/CarrierTest__it_instantiates_carriers_from_name_with_(myparcel)__1.json +++ b/tests/__snapshots__/CarrierTest__it_instantiates_carriers_from_name_with_(myparcel)__1.json @@ -25,6 +25,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] } }, @@ -41,7 +42,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -65,7 +67,8 @@ "shipmentOptions": { "ageCheck": false, "onlyRecipient": false, - "return": false + "return": false, + "collect": false } } }, @@ -80,15 +83,17 @@ "primary": false, "type": "main", "capabilities": { - "deliveryTypes": ["standard"], + "deliveryTypes": ["standard", "express"], "features": { "labelDescriptionLength": 45 }, "packageTypes": ["package"], "shipmentOptions": { - "ageCheck": false, - "onlyRecipient": false, - "return": false + "ageCheck": true, + "onlyRecipient": true, + "return": true, + "signature": true, + "collect": true } } }, @@ -117,6 +122,7 @@ "signature": true, "saturdayDelivery": true, "hideSender": true, + "collect": false, "insurance": [0, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] } }, @@ -133,7 +139,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": true, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -161,6 +168,7 @@ "signature": true, "saturdayDelivery": false, "hideSender": false, + "collect": false, "insurance": [0, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] } }, @@ -177,7 +185,8 @@ "ageCheck": false, "onlyRecipient": false, "sameDayDelivery": false, - "largeFormat": false + "largeFormat": false, + "collect": false } } }, diff --git a/tests/__snapshots__/ContextServiceTest__it_gets_context_data_with_data_set_multiple_orders__1.json b/tests/__snapshots__/ContextServiceTest__it_gets_context_data_with_data_set_multiple_orders__1.json index f5e5fd3f5..b452b00a2 100644 --- a/tests/__snapshots__/ContextServiceTest__it_gets_context_data_with_data_set_multiple_orders__1.json +++ b/tests/__snapshots__/ContextServiceTest__it_gets_context_data_with_data_set_multiple_orders__1.json @@ -29,6 +29,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -49,7 +50,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -64,7 +66,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -101,7 +104,8 @@ "sameDayDelivery": 0, "signature": 0, "tracked": 0, - "receiptCode": 0 + "receiptCode": 0, + "collect": 0 }, "deliveryType": "standard", "packageType": "package" @@ -159,6 +163,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -179,7 +184,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -194,7 +200,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -231,7 +238,8 @@ "sameDayDelivery": 0, "signature": 0, "tracked": 0, - "receiptCode": 0 + "receiptCode": 0, + "collect": 0 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/ContextServiceTest__it_gets_context_data_with_data_set_single_order__1.json b/tests/__snapshots__/ContextServiceTest__it_gets_context_data_with_data_set_single_order__1.json index 7ff11fb57..775278eff 100644 --- a/tests/__snapshots__/ContextServiceTest__it_gets_context_data_with_data_set_single_order__1.json +++ b/tests/__snapshots__/ContextServiceTest__it_gets_context_data_with_data_set_single_order__1.json @@ -29,6 +29,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -49,7 +50,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -64,7 +66,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -101,7 +104,8 @@ "sameDayDelivery": 0, "signature": 0, "tracked": 0, - "receiptCode": 0 + "receiptCode": 0, + "collect": 0 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/CreateReturnShipmentsTest__it_creates_return_shipment_with_data_set_simple_domestic_shipment__1.json b/tests/__snapshots__/CreateReturnShipmentsTest__it_creates_return_shipment_with_data_set_simple_domestic_shipment__1.json index 18d3a1481..a50baa627 100644 --- a/tests/__snapshots__/CreateReturnShipmentsTest__it_creates_return_shipment_with_data_set_simple_domestic_shipment__1.json +++ b/tests/__snapshots__/CreateReturnShipmentsTest__it_creates_return_shipment_with_data_set_simple_domestic_shipment__1.json @@ -64,6 +64,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -84,7 +85,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -100,7 +102,8 @@ "sameDayDelivery": -1, "signature": 0, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": 0 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_be_mailbox_package__1.json b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_be_mailbox_package__1.json index 32d5794b0..3604f1e2c 100644 --- a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_be_mailbox_package__1.json +++ b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_be_mailbox_package__1.json @@ -12,6 +12,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowExpressDelivery": false, "priceEveningDelivery": 0, "priceMorningDelivery": 0, "priceOnlyRecipient": 0, @@ -22,6 +23,7 @@ "priceSameDayDelivery": 0, "priceSignature": 0, "priceStandardDelivery": 0, + "priceCollect": 0, "deliveryDaysWindow": 7, "dropOffDelay": 0, "cutoffTime": null, diff --git a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_eu_mailbox_package__1.json b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_eu_mailbox_package__1.json index 32d5794b0..3604f1e2c 100644 --- a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_eu_mailbox_package__1.json +++ b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_eu_mailbox_package__1.json @@ -12,6 +12,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowExpressDelivery": false, "priceEveningDelivery": 0, "priceMorningDelivery": 0, "priceOnlyRecipient": 0, @@ -22,6 +23,7 @@ "priceSameDayDelivery": 0, "priceSignature": 0, "priceStandardDelivery": 0, + "priceCollect": 0, "deliveryDaysWindow": 7, "dropOffDelay": 0, "cutoffTime": null, diff --git a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_row_mailbox_package__1.json b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_row_mailbox_package__1.json index 32d5794b0..3604f1e2c 100644 --- a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_row_mailbox_package__1.json +++ b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_custom_postnl_row_mailbox_package__1.json @@ -12,6 +12,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowExpressDelivery": false, "priceEveningDelivery": 0, "priceMorningDelivery": 0, "priceOnlyRecipient": 0, @@ -22,6 +23,7 @@ "priceSameDayDelivery": 0, "priceSignature": 0, "priceStandardDelivery": 0, + "priceCollect": 0, "deliveryDaysWindow": 7, "dropOffDelay": 0, "cutoffTime": null, diff --git a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_digital_stamp__1.json b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_digital_stamp__1.json index 962af3626..18007f5be 100644 --- a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_digital_stamp__1.json +++ b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_digital_stamp__1.json @@ -12,6 +12,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowExpressDelivery": false, "priceEveningDelivery": 0, "priceMorningDelivery": 0, "priceOnlyRecipient": 0, @@ -22,6 +23,7 @@ "priceSameDayDelivery": 0, "priceSignature": 0, "priceStandardDelivery": 0, + "priceCollect": 0, "deliveryDaysWindow": 7, "dropOffDelay": 0, "cutoffTime": null, diff --git a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_international_mailbox_that_becomes_package_for_non-custom_postnl__1.json b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_international_mailbox_that_becomes_package_for_non-custom_postnl__1.json index 7188f65ab..94f3d2dfe 100644 --- a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_international_mailbox_that_becomes_package_for_non-custom_postnl__1.json +++ b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_international_mailbox_that_becomes_package_for_non-custom_postnl__1.json @@ -12,6 +12,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowExpressDelivery": false, "priceEveningDelivery": 0, "priceMorningDelivery": 0, "priceOnlyRecipient": 0, @@ -22,6 +23,7 @@ "priceSameDayDelivery": 0, "priceSignature": 0, "priceStandardDelivery": 0, + "priceCollect": 0, "deliveryDaysWindow": 7, "dropOffDelay": 0, "cutoffTime": null, diff --git a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_letter__1.json b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_letter__1.json index 50d55189f..fd9e1c65a 100644 --- a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_letter__1.json +++ b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_letter__1.json @@ -12,6 +12,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowExpressDelivery": false, "priceEveningDelivery": 0, "priceMorningDelivery": 0, "priceOnlyRecipient": 0, @@ -22,6 +23,7 @@ "priceSameDayDelivery": 0, "priceSignature": 0, "priceStandardDelivery": 0, + "priceCollect": 0, "deliveryDaysWindow": 7, "dropOffDelay": 0, "cutoffTime": null, diff --git a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package__1.json b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package__1.json index 7188f65ab..94f3d2dfe 100644 --- a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package__1.json +++ b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package__1.json @@ -12,6 +12,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowExpressDelivery": false, "priceEveningDelivery": 0, "priceMorningDelivery": 0, "priceOnlyRecipient": 0, @@ -22,6 +23,7 @@ "priceSameDayDelivery": 0, "priceSignature": 0, "priceStandardDelivery": 0, + "priceCollect": 0, "deliveryDaysWindow": 7, "dropOffDelay": 0, "cutoffTime": null, diff --git a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package_that_is_too_heavy_for_mailbox__1.json b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package_that_is_too_heavy_for_mailbox__1.json index 7188f65ab..94f3d2dfe 100644 --- a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package_that_is_too_heavy_for_mailbox__1.json +++ b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package_that_is_too_heavy_for_mailbox__1.json @@ -12,6 +12,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowExpressDelivery": false, "priceEveningDelivery": 0, "priceMorningDelivery": 0, "priceOnlyRecipient": 0, @@ -22,6 +23,7 @@ "priceSameDayDelivery": 0, "priceSignature": 0, "priceStandardDelivery": 0, + "priceCollect": 0, "deliveryDaysWindow": 7, "dropOffDelay": 0, "cutoffTime": null, diff --git a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package_with_fit_in_mailbox__1.json b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package_with_fit_in_mailbox__1.json index 7188f65ab..94f3d2dfe 100644 --- a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package_with_fit_in_mailbox__1.json +++ b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_mailbox_package_with_fit_in_mailbox__1.json @@ -12,6 +12,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowExpressDelivery": false, "priceEveningDelivery": 0, "priceMorningDelivery": 0, "priceOnlyRecipient": 0, @@ -22,6 +23,7 @@ "priceSameDayDelivery": 0, "priceSignature": 0, "priceStandardDelivery": 0, + "priceCollect": 0, "deliveryDaysWindow": 7, "dropOffDelay": 0, "cutoffTime": null, diff --git a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_simple__1.json b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_simple__1.json index ada8b026c..542125373 100644 --- a/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_simple__1.json +++ b/tests/__snapshots__/DeliveryOptionsServiceTest__it_creates_carrier_settings_with_data_set_simple__1.json @@ -12,6 +12,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowExpressDelivery": false, "priceEveningDelivery": 0, "priceMorningDelivery": 0, "priceOnlyRecipient": 0, @@ -22,6 +23,7 @@ "priceSameDayDelivery": 0, "priceSignature": 0, "priceStandardDelivery": 0, + "priceCollect": 0, "deliveryDaysWindow": 7, "dropOffDelay": 1, "cutoffTime": null, diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_age_check__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_age_check__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..b9410752a --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_age_check__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,31 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 2, + "age_check": 1, + "signature": 1 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "BE", + "city": "Antwerpen", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "1000", + "street": "Adriaan Brouwerstraat 16", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_age_check__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_age_check__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..e0e72d032 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_age_check__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,31 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 7, + "age_check": 1, + "signature": 1 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "NL", + "city": "Hoofddorp", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "2132 JE", + "street": "Antareslaan 31", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_hide_sender__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_hide_sender__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..aca9d200c --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_hide_sender__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,29 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 2 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "BE", + "city": "Antwerpen", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "1000", + "street": "Adriaan Brouwerstraat 16", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_hide_sender__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_hide_sender__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..eb4dc2a06 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_hide_sender__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,29 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 7 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "NL", + "city": "Hoofddorp", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "2132 JE", + "street": "Antareslaan 31", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_insurance__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_insurance__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..aca9d200c --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_insurance__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,29 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 2 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "BE", + "city": "Antwerpen", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "1000", + "street": "Adriaan Brouwerstraat 16", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_insurance__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_insurance__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..eb4dc2a06 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_insurance__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,29 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 7 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "NL", + "city": "Hoofddorp", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "2132 JE", + "street": "Antareslaan 31", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_large_format__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_large_format__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..aca9d200c --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_large_format__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,29 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 2 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "BE", + "city": "Antwerpen", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "1000", + "street": "Adriaan Brouwerstraat 16", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..eb4dc2a06 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,29 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 7 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "NL", + "city": "Hoofddorp", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "2132 JE", + "street": "Antareslaan 31", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_only_recipient__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_only_recipient__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..24cc14c83 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_only_recipient__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,30 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 2, + "only_recipient": 1 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "BE", + "city": "Antwerpen", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "1000", + "street": "Adriaan Brouwerstraat 16", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_only_recipient__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_only_recipient__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..62de9d450 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_only_recipient__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,30 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 7, + "only_recipient": 1 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "NL", + "city": "Hoofddorp", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "2132 JE", + "street": "Antareslaan 31", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_receipt_code__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_receipt_code__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..aca9d200c --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_receipt_code__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,29 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 2 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "BE", + "city": "Antwerpen", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "1000", + "street": "Adriaan Brouwerstraat 16", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_receipt_code__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_receipt_code__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..eb4dc2a06 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_receipt_code__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,29 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 7 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "NL", + "city": "Hoofddorp", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "2132 JE", + "street": "Antareslaan 31", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..189c6e3ff --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,30 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 2, + "return": 1 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "BE", + "city": "Antwerpen", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "1000", + "street": "Adriaan Brouwerstraat 16", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..076781e0a --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,30 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 7, + "return": 1 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "NL", + "city": "Hoofddorp", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "2132 JE", + "street": "Antareslaan 31", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return_large_format__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return_large_format__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..aca9d200c --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return_large_format__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,29 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 2 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "BE", + "city": "Antwerpen", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "1000", + "street": "Adriaan Brouwerstraat 16", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..eb4dc2a06 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_return_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,29 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 7 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "NL", + "city": "Hoofddorp", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "2132 JE", + "street": "Antareslaan 31", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_signature__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_signature__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..862cc969c --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_signature__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,30 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 2, + "signature": 1 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "BE", + "city": "Antwerpen", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "1000", + "street": "Adriaan Brouwerstraat 16", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_signature__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_signature__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..73ace5723 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_default__data_set_export_signature__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,30 @@ +{ + "data": { + "shipments": [ + { + "carrier": 8, + "general_settings": { + "save_recipient_address": 0 + }, + "options": { + "package_type": 1, + "delivery_type": 7, + "signature": 1 + }, + "physical_properties": { + "weight": 0 + }, + "recipient": { + "cc": "NL", + "city": "Hoofddorp", + "company": "MyParcel", + "person": "Felicia Parcel", + "postal_code": "2132 JE", + "street": "Antareslaan 31", + "vat_number": "NL123456789B01" + }, + "reference_identifier": "PDK-1" + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..fa0881bfc --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 1, + "collect": 0, + "delivery_type": 2, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 1 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Adriaan Brouwerstraat 16 ", + "city": "Antwerpen", + "company": "MyParcel", + "cc": "BE", + "person": "Felicia Parcel", + "postal_code": "1000" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..34a1ebbaa --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 1, + "collect": 0, + "delivery_type": 7, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 1 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_dhl_for_you__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_dhl_for_you__1.json index 08b95a845..4ca530cad 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_dhl_for_you__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_carrier_dhl_for_you__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_single_order__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_single_order__1.json index e64c349e0..d5c7f1f71 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_single_order__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_single_order__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_various_delivery_options__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_various_delivery_options__1.json index 164490296..e865ffd8c 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_various_delivery_options__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_age_check__data_set_various_delivery_options__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { @@ -99,6 +100,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_date": "2077-10-23 09:47:51", "delivery_type": 3, "hide_sender": 0, @@ -163,6 +165,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 1, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..de4c34277 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 2, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Adriaan Brouwerstraat 16 ", + "city": "Antwerpen", + "company": "MyParcel", + "cc": "BE", + "person": "Felicia Parcel", + "postal_code": "1000" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..860aaa386 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 7, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_dhl_for_you__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_dhl_for_you__1.json index 9dc510010..21b3dd7ee 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_dhl_for_you__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_carrier_dhl_for_you__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 1, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_single_order__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_single_order__1.json index 7a596d1e6..fd1b5a6d3 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_single_order__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_single_order__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_various_delivery_options__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_various_delivery_options__1.json index 164490296..e865ffd8c 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_various_delivery_options__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_hide_sender__data_set_various_delivery_options__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { @@ -99,6 +100,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_date": "2077-10-23 09:47:51", "delivery_type": 3, "hide_sender": 0, @@ -163,6 +165,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 1, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..de4c34277 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 2, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Adriaan Brouwerstraat 16 ", + "city": "Antwerpen", + "company": "MyParcel", + "cc": "BE", + "person": "Felicia Parcel", + "postal_code": "1000" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..860aaa386 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 7, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_dhl_for_you__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_dhl_for_you__1.json index 1105f10c5..6b2f912b9 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_dhl_for_you__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_carrier_dhl_for_you__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_single_order__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_single_order__1.json index 7a596d1e6..fd1b5a6d3 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_single_order__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_single_order__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_various_delivery_options__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_various_delivery_options__1.json index 164490296..e865ffd8c 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_various_delivery_options__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_insurance__data_set_various_delivery_options__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { @@ -99,6 +100,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_date": "2077-10-23 09:47:51", "delivery_type": 3, "hide_sender": 0, @@ -163,6 +165,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 1, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..de4c34277 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 2, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Adriaan Brouwerstraat 16 ", + "city": "Antwerpen", + "company": "MyParcel", + "cc": "BE", + "person": "Felicia Parcel", + "postal_code": "1000" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..860aaa386 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 7, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_dhl_for_you__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_dhl_for_you__1.json index 1105f10c5..6b2f912b9 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_dhl_for_you__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_carrier_dhl_for_you__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_single_order__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_single_order__1.json index 1d556d283..390d60768 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_single_order__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_single_order__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_various_delivery_options__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_various_delivery_options__1.json index fb6b6d25a..0acd21a1d 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_various_delivery_options__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_large_format__data_set_various_delivery_options__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { @@ -99,6 +100,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_date": "2077-10-23 09:47:51", "delivery_type": 3, "hide_sender": 0, @@ -163,6 +165,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 1, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..9932fded2 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 2, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 1, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Adriaan Brouwerstraat 16 ", + "city": "Antwerpen", + "company": "MyParcel", + "cc": "BE", + "person": "Felicia Parcel", + "postal_code": "1000" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..c14ca0c35 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 7, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 1, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_dhl_for_you__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_dhl_for_you__1.json index 7c67e2485..0339df6e8 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_dhl_for_you__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_carrier_dhl_for_you__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_single_order__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_single_order__1.json index 5e2ddee91..8d0456e26 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_single_order__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_single_order__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_various_delivery_options__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_various_delivery_options__1.json index 164490296..e865ffd8c 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_various_delivery_options__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_only_recipient__data_set_various_delivery_options__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { @@ -99,6 +100,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_date": "2077-10-23 09:47:51", "delivery_type": 3, "hide_sender": 0, @@ -163,6 +165,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 1, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..de4c34277 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 2, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Adriaan Brouwerstraat 16 ", + "city": "Antwerpen", + "company": "MyParcel", + "cc": "BE", + "person": "Felicia Parcel", + "postal_code": "1000" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..860aaa386 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 7, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_dhl_for_you__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_dhl_for_you__1.json index 1105f10c5..6b2f912b9 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_dhl_for_you__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_carrier_dhl_for_you__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_single_order__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_single_order__1.json index 8526b1a63..44ee095e5 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_single_order__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_single_order__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_various_delivery_options__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_various_delivery_options__1.json index 04628a7bb..5c4805175 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_various_delivery_options__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_receipt_code__data_set_various_delivery_options__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { @@ -99,6 +100,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_date": "2077-10-23 09:47:51", "delivery_type": 3, "hide_sender": 0, @@ -163,6 +165,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 1, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..cf8651c29 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 2, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 1, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Adriaan Brouwerstraat 16 ", + "city": "Antwerpen", + "company": "MyParcel", + "cc": "BE", + "person": "Felicia Parcel", + "postal_code": "1000" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..a513432e4 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 7, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 1, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_dhl_for_you__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_dhl_for_you__1.json index 1105f10c5..6b2f912b9 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_dhl_for_you__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_carrier_dhl_for_you__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_single_order__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_single_order__1.json index ec1ea0fb3..555d7322f 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_single_order__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_single_order__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_various_delivery_options__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_various_delivery_options__1.json index abedbb9e9..5c59af412 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_various_delivery_options__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return__data_set_various_delivery_options__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { @@ -99,6 +100,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_date": "2077-10-23 09:47:51", "delivery_type": 3, "hide_sender": 0, @@ -163,6 +165,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 1, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..de4c34277 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 2, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Adriaan Brouwerstraat 16 ", + "city": "Antwerpen", + "company": "MyParcel", + "cc": "BE", + "person": "Felicia Parcel", + "postal_code": "1000" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..860aaa386 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 7, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 0 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_dhl_for_you__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_dhl_for_you__1.json index 1105f10c5..6b2f912b9 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_dhl_for_you__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_carrier_dhl_for_you__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_single_order__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_single_order__1.json index 7a596d1e6..fd1b5a6d3 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_single_order__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_single_order__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_various_delivery_options__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_various_delivery_options__1.json index 164490296..e865ffd8c 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_various_delivery_options__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_return_large_format__data_set_various_delivery_options__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { @@ -99,6 +100,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_date": "2077-10-23 09:47:51", "delivery_type": 3, "hide_sender": 0, @@ -163,6 +165,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 1, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..2edc66b43 --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 2, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 1 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Adriaan Brouwerstraat 16 ", + "city": "Antwerpen", + "company": "MyParcel", + "cc": "BE", + "person": "Felicia Parcel", + "postal_code": "1000" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..37f33582b --- /dev/null +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,70 @@ +{ + "data": { + "orders": [ + { + "external_identifier": "PDK-1", + "fulfilment_partner_identifier": null, + "invoice_address": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + }, + "order_date": "2030-01-01 12:00:00", + "order_lines": [ + { + "quantity": 1, + "price": 0, + "price_after_vat": 0, + "product": { + "sku": "test", + "external_identifier": "PDK-1", + "name": "test", + "width": 0, + "length": 0, + "height": 0, + "weight": 0 + } + } + ], + "shipment": { + "carrier": 8, + "contract_id": null, + "customs_declaration": null, + "drop_off_point": null, + "options": { + "age_check": 0, + "collect": 0, + "delivery_type": 7, + "hide_sender": 0, + "insurance": { + "amount": 0, + "currency": "EUR" + }, + "label_description": "", + "large_format": 0, + "only_recipient": 0, + "package_type": 1, + "return": 0, + "same_day_delivery": 0, + "signature": 1 + }, + "physical_properties": { + "weight": 0 + }, + "pickup": null, + "recipient": { + "street": "Antareslaan 31 ", + "city": "Hoofddorp", + "company": "MyParcel", + "cc": "NL", + "person": "Felicia Parcel", + "postal_code": "2132 JE" + } + } + } + ] + } +} diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_dhl_for_you__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_dhl_for_you__1.json index 9fa591d8a..cb9b3b9e8 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_dhl_for_you__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_carrier_dhl_for_you__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_single_order__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_single_order__1.json index 7a596d1e6..fd1b5a6d3 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_single_order__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_single_order__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { diff --git a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_various_delivery_options__1.json b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_various_delivery_options__1.json index 164490296..e865ffd8c 100644 --- a/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_various_delivery_options__1.json +++ b/tests/__snapshots__/ExportOrderActionTest__it_exports_order_with_data_set_order_mode__data_set_export_signature__data_set_various_delivery_options__1.json @@ -36,6 +36,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_type": 2, "hide_sender": 0, "insurance": { @@ -99,6 +100,7 @@ "drop_off_point": null, "options": { "age_check": 0, + "collect": 0, "delivery_date": "2077-10-23 09:47:51", "delivery_type": 3, "hide_sender": 0, @@ -163,6 +165,7 @@ "drop_off_point": null, "options": { "age_check": 1, + "collect": 0, "delivery_type": 2, "hide_sender": 1, "insurance": { diff --git a/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_insurance__1.json b/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_insurance__1.json index 94294cff6..ed6e84aad 100644 --- a/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_insurance__1.json +++ b/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_insurance__1.json @@ -30,6 +30,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -50,7 +51,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -65,7 +67,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -130,7 +133,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -184,7 +188,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -304,6 +309,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -324,7 +330,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -339,7 +346,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_no_return_capabilities__1.json b/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_no_return_capabilities__1.json index fe1fcc333..7125180a8 100644 --- a/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_no_return_capabilities__1.json +++ b/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_no_return_capabilities__1.json @@ -30,6 +30,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -50,7 +51,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -65,7 +67,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -130,7 +133,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -184,7 +188,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -304,6 +309,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -324,7 +330,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -339,7 +346,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_simple_orders__1.json b/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_simple_orders__1.json index c139ff696..3a4ce200b 100644 --- a/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_simple_orders__1.json +++ b/tests/__snapshots__/ExportReturnActionTest__it_exports_return_with_data_set_simple_orders__1.json @@ -30,6 +30,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -50,7 +51,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -65,7 +67,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -130,7 +133,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -184,7 +188,8 @@ "sameDayDelivery": -1, "signature": 1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "morning", "packageType": "package" @@ -304,6 +309,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -324,7 +330,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -339,7 +346,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "evening", "packageType": "package" diff --git a/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_init_script__1.json b/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_init_script__1.json index b453c727a..740bafca3 100644 --- a/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_init_script__1.json +++ b/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_init_script__1.json @@ -272,7 +272,7 @@ "primary": false, "type": "main", "capabilities": { - "deliveryTypes": ["morning", "standard", "evening", "pickup"], + "deliveryTypes": ["morning", "standard", "evening", "pickup", "express"], "features": { "dropOffAtPostalPoint": true, "labelDescriptionLength": 45, @@ -307,7 +307,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } } @@ -330,7 +331,7 @@ "primary": false, "type": "main", "capabilities": { - "deliveryTypes": ["morning", "standard", "evening", "pickup"], + "deliveryTypes": ["morning", "standard", "evening", "pickup", "express"], "features": { "dropOffAtPostalPoint": true, "labelDescriptionLength": 45, @@ -365,7 +366,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } } @@ -428,6 +430,7 @@ "allowSameDayDelivery": false, "allowSaturdayDelivery": false, "allowSignature": false, + "allowDeliveryTypeExpress": false, "cutoffTime": "16:00", "cutoffTimeSameDay": "10:00", "defaultPackageType": "package", @@ -456,6 +459,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -468,7 +472,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 } } }, @@ -502,7 +508,7 @@ "primary": false, "type": "main", "capabilities": { - "deliveryTypes": ["morning", "standard", "evening", "pickup"], + "deliveryTypes": ["morning", "standard", "evening", "pickup", "express"], "features": { "dropOffAtPostalPoint": true, "labelDescriptionLength": 45, @@ -537,7 +543,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } } diff --git a/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_order_box__1.json b/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_order_box__1.json index bbcd57259..9cfb01278 100644 --- a/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_order_box__1.json +++ b/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_order_box__1.json @@ -29,6 +29,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -49,7 +50,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -64,7 +66,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -101,7 +104,8 @@ "sameDayDelivery": 0, "signature": 0, "tracked": 0, - "receiptCode": 0 + "receiptCode": 0, + "collect": 0 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_order_list_column__1.json b/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_order_list_column__1.json index 487fdd74d..e19149228 100644 --- a/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_order_list_column__1.json +++ b/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_order_list_column__1.json @@ -29,6 +29,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -49,7 +50,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -64,7 +66,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" @@ -101,7 +104,8 @@ "sameDayDelivery": 0, "signature": 0, "tracked": 0, - "receiptCode": 0 + "receiptCode": 0, + "collect": 0 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_plugin_settings__1.json b/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_plugin_settings__1.json index b139b33fe..40f128dd7 100644 --- a/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_plugin_settings__1.json +++ b/tests/__snapshots__/FrontendRenderServiceTest__it_renders_component_with_data_set_plugin_settings__1.json @@ -2872,6 +2872,57 @@ "label": "settings_carrier_price_only_recipient", "description": "settings_carrier_price_only_recipient_description" }, + { + "name": "allowDeliveryTypeExpress", + "$builders": [ + { + "$visibleWhen": { + "$if": [ + { + "$and": [ + { + "$target": "deliveryOptionsEnabled" + }, + { + "$target": "allowDeliveryOptions" + } + ] + } + ] + } + } + ], + "$component": "ToggleInput", + "label": "settings_carrier_allow_delivery_type_express", + "description": "settings_carrier_allow_delivery_type_express_description" + }, + { + "name": "priceDeliveryTypeExpress", + "$builders": [ + { + "$visibleWhen": { + "$if": [ + { + "$target": "allowDeliveryTypeExpress" + }, + { + "$and": [ + { + "$target": "deliveryOptionsEnabled" + }, + { + "$target": "allowDeliveryOptions" + } + ] + } + ] + } + } + ], + "$component": "CurrencyInput", + "label": "settings_carrier_price_delivery_type_express", + "description": "settings_carrier_price_delivery_type_express_description" + }, { "$builders": [ { diff --git a/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_empty_order__1.json b/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_empty_order__1.json index e57c4b8a5..cc32dc4f7 100644 --- a/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_empty_order__1.json +++ b/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_empty_order__1.json @@ -6,6 +6,7 @@ "carrier": 1, "options": { "ageCheck": false, + "collect": false, "deliveryType": 2, "hideSender": false, "insurance": 0, diff --git a/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_order_with_shipments__1.json b/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_order_with_shipments__1.json index e57c4b8a5..cc32dc4f7 100644 --- a/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_order_with_shipments__1.json +++ b/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_order_with_shipments__1.json @@ -6,6 +6,7 @@ "carrier": 1, "options": { "ageCheck": false, + "collect": false, "deliveryType": 2, "hideSender": false, "insurance": 0, diff --git a/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_order_without_shipments__1.json b/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_order_without_shipments__1.json index 8a7e74907..833c3f54b 100644 --- a/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_order_without_shipments__1.json +++ b/tests/__snapshots__/OrderTest__it_creates_fulfilment_order_from_pdk_order_with_data_set_order_without_shipments__1.json @@ -42,6 +42,7 @@ }, "options": { "ageCheck": false, + "collect": false, "deliveryType": 2, "hideSender": false, "insurance": 0, diff --git a/tests/__snapshots__/OrderValidatorTest__it_returns_correct_schema_with_data_set_pickup_without_location_code__1.json b/tests/__snapshots__/OrderValidatorTest__it_returns_correct_schema_with_data_set_pickup_without_location_code__1.json index 9f553dc3c..16967cd96 100644 --- a/tests/__snapshots__/OrderValidatorTest__it_returns_correct_schema_with_data_set_pickup_without_location_code__1.json +++ b/tests/__snapshots__/OrderValidatorTest__it_returns_correct_schema_with_data_set_pickup_without_location_code__1.json @@ -164,6 +164,9 @@ }, "receiptCode": { "enum": [-1, 0, 1] + }, + "collect": { + "enum": [-1, 0, 1] } } } diff --git a/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_UPS_to_Belgium__1.json b/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_UPS_to_Belgium__1.json new file mode 100644 index 000000000..5b4ce70d5 --- /dev/null +++ b/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_UPS_to_Belgium__1.json @@ -0,0 +1,27 @@ +[ + { + "exported": false, + "deliveryOptions": { + "carrier": { + "externalIdentifier": "ups" + }, + "labelAmount": 1, + "shipmentOptions": { + "insurance": -1, + "ageCheck": -1, + "return": -1, + "hideSender": -1, + "largeFormat": -1, + "onlyRecipient": -1, + "receiptCode": -1, + "sameDayDelivery": -1, + "signature": -1, + "tracked": -1, + "collect": -1 + }, + "deliveryType": "express", + "packageType": "package" + }, + "physicalProperties": [] + } +] diff --git a/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_UPS_to_Netherlands_express__1.json b/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_UPS_to_Netherlands_express__1.json new file mode 100644 index 000000000..5b4ce70d5 --- /dev/null +++ b/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_UPS_to_Netherlands_express__1.json @@ -0,0 +1,27 @@ +[ + { + "exported": false, + "deliveryOptions": { + "carrier": { + "externalIdentifier": "ups" + }, + "labelAmount": 1, + "shipmentOptions": { + "insurance": -1, + "ageCheck": -1, + "return": -1, + "hideSender": -1, + "largeFormat": -1, + "onlyRecipient": -1, + "receiptCode": -1, + "sameDayDelivery": -1, + "signature": -1, + "tracked": -1, + "collect": -1 + }, + "deliveryType": "express", + "packageType": "package" + }, + "physicalProperties": [] + } +] diff --git a/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_dhl_for_you__1.json b/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_dhl_for_you__1.json index 610199979..9ae4d55db 100644 --- a/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_dhl_for_you__1.json +++ b/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_carrier_dhl_for_you__1.json @@ -16,7 +16,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_single_order__1.json b/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_single_order__1.json index 6ca2c8d64..400c6abbd 100644 --- a/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_single_order__1.json +++ b/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_single_order__1.json @@ -16,7 +16,8 @@ "sameDayDelivery": -1, "signature": 1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_various_delivery_options__1.json b/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_various_delivery_options__1.json index 8c2f3c22d..2f6987cb7 100644 --- a/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_various_delivery_options__1.json +++ b/tests/__snapshots__/PdkOrderTest__it_creates_a_storable_array_with_data_set_various_delivery_options__1.json @@ -16,7 +16,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "mailbox" @@ -41,7 +42,8 @@ "sameDayDelivery": -1, "signature": 1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "evening", "packageType": "package" @@ -65,7 +67,8 @@ "sameDayDelivery": -1, "signature": 1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/PdkOrderTest__it_creates_pdk_order_from_fulfilment_order_with_data_set_one_order_containing_many_attributes__1.json b/tests/__snapshots__/PdkOrderTest__it_creates_pdk_order_from_fulfilment_order_with_data_set_one_order_containing_many_attributes__1.json index 98fa60e91..cb1811cba 100644 --- a/tests/__snapshots__/PdkOrderTest__it_creates_pdk_order_from_fulfilment_order_with_data_set_one_order_containing_many_attributes__1.json +++ b/tests/__snapshots__/PdkOrderTest__it_creates_pdk_order_from_fulfilment_order_with_data_set_one_order_containing_many_attributes__1.json @@ -27,6 +27,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -47,7 +48,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -62,7 +64,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/PdkOrderTest__it_creates_pdk_order_from_fulfilment_order_with_data_set_one_order_with_pickup__1.json b/tests/__snapshots__/PdkOrderTest__it_creates_pdk_order_from_fulfilment_order_with_data_set_one_order_with_pickup__1.json index 98fa60e91..cb1811cba 100644 --- a/tests/__snapshots__/PdkOrderTest__it_creates_pdk_order_from_fulfilment_order_with_data_set_one_order_with_pickup__1.json +++ b/tests/__snapshots__/PdkOrderTest__it_creates_pdk_order_from_fulfilment_order_with_data_set_one_order_with_pickup__1.json @@ -27,6 +27,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [ 0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000 ] @@ -47,7 +48,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -62,7 +64,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/PlatformManagerTest__it_gets_carriers_with_(myparcel)__1.json b/tests/__snapshots__/PlatformManagerTest__it_gets_carriers_with_(myparcel)__1.json index b03e1831e..3fde88bba 100644 --- a/tests/__snapshots__/PlatformManagerTest__it_gets_carriers_with_(myparcel)__1.json +++ b/tests/__snapshots__/PlatformManagerTest__it_gets_carriers_with_(myparcel)__1.json @@ -25,6 +25,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] } }, @@ -41,7 +42,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -65,7 +67,8 @@ "shipmentOptions": { "ageCheck": false, "onlyRecipient": false, - "return": false + "return": false, + "collect": false } } }, @@ -80,15 +83,17 @@ "primary": false, "type": "main", "capabilities": { - "deliveryTypes": ["standard"], + "deliveryTypes": ["standard", "express"], "features": { "labelDescriptionLength": 45 }, "packageTypes": ["package"], "shipmentOptions": { - "ageCheck": false, - "onlyRecipient": false, - "return": false + "ageCheck": true, + "onlyRecipient": true, + "return": true, + "signature": true, + "collect": true } } }, @@ -117,6 +122,7 @@ "signature": true, "saturdayDelivery": true, "hideSender": true, + "collect": false, "insurance": [0, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] } }, @@ -133,7 +139,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": true, - "largeFormat": true + "largeFormat": true, + "collect": false } } }, @@ -161,6 +168,7 @@ "signature": true, "saturdayDelivery": false, "hideSender": false, + "collect": false, "insurance": [0, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] } }, @@ -177,7 +185,8 @@ "ageCheck": false, "onlyRecipient": false, "sameDayDelivery": false, - "largeFormat": false + "largeFormat": false, + "collect": false } } }, diff --git a/tests/__snapshots__/PlatformManagerTest__it_retrieves_config_for_each_platform_with_(myparcel)__1.json b/tests/__snapshots__/PlatformManagerTest__it_retrieves_config_for_each_platform_with_(myparcel)__1.json index 4cb657f0a..d849b6cd8 100644 --- a/tests/__snapshots__/PlatformManagerTest__it_retrieves_config_for_each_platform_with_(myparcel)__1.json +++ b/tests/__snapshots__/PlatformManagerTest__it_retrieves_config_for_each_platform_with_(myparcel)__1.json @@ -25,6 +25,7 @@ "sameDayDelivery": false, "signature": true, "receiptCode": true, + "collect": false, "insurance": [0, 10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] }, "features": { @@ -43,7 +44,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": false, - "largeFormat": true + "largeFormat": true, + "collect": false }, "features": { "labelDescriptionLength": 45 @@ -64,6 +66,7 @@ "signature": true, "saturdayDelivery": true, "hideSender": true, + "collect": false, "insurance": [0, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] }, "features": { @@ -80,7 +83,8 @@ "ageCheck": true, "onlyRecipient": true, "sameDayDelivery": true, - "largeFormat": true + "largeFormat": true, + "collect": false }, "features": { "labelDescriptionLength": 45 @@ -100,6 +104,7 @@ "signature": true, "saturdayDelivery": false, "hideSender": false, + "collect": false, "insurance": [0, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000] }, "features": { @@ -116,7 +121,8 @@ "ageCheck": false, "onlyRecipient": false, "sameDayDelivery": false, - "largeFormat": false + "largeFormat": false, + "collect": false }, "features": { "labelDescriptionLength": 45 @@ -147,11 +153,13 @@ "name": "ups", "capabilities": { "packageTypes": ["package"], - "deliveryTypes": ["standard"], + "deliveryTypes": ["standard", "express"], "shipmentOptions": { - "ageCheck": false, - "onlyRecipient": false, - "return": false + "ageCheck": true, + "onlyRecipient": true, + "return": true, + "signature": true, + "collect": true }, "features": { "labelDescriptionLength": 45 @@ -166,7 +174,8 @@ "shipmentOptions": { "ageCheck": false, "onlyRecipient": false, - "return": false + "return": false, + "collect": false }, "features": { "labelDescriptionLength": 45, diff --git a/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_normal_shipment__1.json b/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_normal_shipment__1.json index c75b56332..8ac9ec117 100644 --- a/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_normal_shipment__1.json +++ b/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_normal_shipment__1.json @@ -60,7 +60,8 @@ "sameDayDelivery": -1, "signature": 0, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": 0 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_contract__1.json b/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_contract__1.json index 55eddf32d..bfab1846e 100644 --- a/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_contract__1.json +++ b/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_contract__1.json @@ -43,7 +43,8 @@ "sameDayDelivery": -1, "signature": -1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": -1 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_drop-off_point__1.json b/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_drop-off_point__1.json index 50ce5a83c..bcffa002f 100644 --- a/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_drop-off_point__1.json +++ b/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_drop-off_point__1.json @@ -41,7 +41,8 @@ "sameDayDelivery": 1, "signature": 0, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": 0 }, "deliveryType": "standard", "packageType": "package" diff --git a/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_pickup__1.json b/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_pickup__1.json index 41f0e04a6..27f64ebfc 100644 --- a/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_pickup__1.json +++ b/tests/__snapshots__/QueryTest__it_creates_shipment_collection_from_queried_data_with_data_set_shipment_with_pickup__1.json @@ -52,7 +52,8 @@ "sameDayDelivery": 0, "signature": 1, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": 0 }, "deliveryType": "pickup", "packageType": "package" diff --git a/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(belgie)__1.json b/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(belgie)__1.json index f41d39404..c5ab8b28b 100644 --- a/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(belgie)__1.json +++ b/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(belgie)__1.json @@ -11,6 +11,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -82,6 +83,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -94,7 +96,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "postnl": { "id": "carrier", @@ -108,6 +112,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -179,6 +184,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -191,7 +197,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "bpost": { "id": "carrier", @@ -205,6 +213,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -276,6 +285,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -288,7 +298,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "dpd": { "id": "carrier", @@ -302,6 +314,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -373,6 +386,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -385,6 +399,8 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 } } diff --git a/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(flespakket)__1.json b/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(flespakket)__1.json index f3ea50c26..53a2ebed9 100644 --- a/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(flespakket)__1.json +++ b/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(flespakket)__1.json @@ -11,6 +11,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -82,6 +83,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -94,7 +96,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "postnl": { "id": "carrier", @@ -108,6 +112,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -179,6 +184,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -191,6 +197,8 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 } } diff --git a/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(myparcel)__1.json b/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(myparcel)__1.json index 07b82a51b..6eb6ff1d4 100644 --- a/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(myparcel)__1.json +++ b/tests/__snapshots__/SettingsManagerTest__it_retrieves_default_carrier_settings_with_(myparcel)__1.json @@ -11,6 +11,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -82,6 +83,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -94,7 +96,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "postnl": { "id": "carrier", @@ -108,6 +112,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -179,6 +184,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -191,7 +197,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "dpd": { "id": "carrier", @@ -205,6 +213,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -276,6 +285,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -288,7 +298,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "ups": { "id": "carrier", @@ -302,6 +314,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -373,6 +386,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -385,7 +399,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "dhlforyou": { "id": "carrier", @@ -399,6 +415,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -470,6 +487,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -482,7 +500,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "dhlparcelconnect": { "id": "carrier", @@ -496,6 +516,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -567,6 +588,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -579,7 +601,9 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 }, "dhleuroplus": { "id": "carrier", @@ -593,6 +617,7 @@ "allowSameDayDelivery": true, "allowSaturdayDelivery": true, "allowSignature": true, + "allowDeliveryTypeExpress": false, "cutoffTime": "17:00", "cutoffTimeSameDay": "09:00", "defaultPackageType": "package", @@ -664,6 +689,7 @@ "exportReturnLargeFormat": false, "exportReturnPackageType": "package", "exportSignature": false, + "exportCollect": false, "priceDeliveryTypeEvening": 0, "priceDeliveryTypeMonday": 0, "priceDeliveryTypeMorning": 0, @@ -676,6 +702,8 @@ "pricePackageTypeMailbox": 0, "priceSignature": 0, "allowInternationalMailbox": false, - "priceInternationalMailbox": 0 + "priceInternationalMailbox": 0, + "priceCollect": 0, + "priceDeliveryTypeExpress": 0 } } diff --git a/tests/__snapshots__/SettingsViewTest__it_gets_settings_view_with_data_set_carrier_settings__1.json b/tests/__snapshots__/SettingsViewTest__it_gets_settings_view_with_data_set_carrier_settings__1.json index 2c2eaffe0..4ab419b10 100644 --- a/tests/__snapshots__/SettingsViewTest__it_gets_settings_view_with_data_set_carrier_settings__1.json +++ b/tests/__snapshots__/SettingsViewTest__it_gets_settings_view_with_data_set_carrier_settings__1.json @@ -1205,6 +1205,57 @@ "label": "settings_carrier_price_only_recipient", "description": "settings_carrier_price_only_recipient_description" }, + { + "name": "allowDeliveryTypeExpress", + "$builders": [ + { + "$visibleWhen": { + "$if": [ + { + "$and": [ + { + "$target": "deliveryOptionsEnabled" + }, + { + "$target": "allowDeliveryOptions" + } + ] + } + ] + } + } + ], + "$component": "ToggleInput", + "label": "settings_carrier_allow_delivery_type_express", + "description": "settings_carrier_allow_delivery_type_express_description" + }, + { + "name": "priceDeliveryTypeExpress", + "$builders": [ + { + "$visibleWhen": { + "$if": [ + { + "$target": "allowDeliveryTypeExpress" + }, + { + "$and": [ + { + "$target": "deliveryOptionsEnabled" + }, + { + "$target": "allowDeliveryOptions" + } + ] + } + ] + } + } + ], + "$component": "CurrencyInput", + "label": "settings_carrier_price_delivery_type_express", + "description": "settings_carrier_price_delivery_type_express_description" + }, { "$builders": [ { diff --git a/tests/__snapshots__/ShipmentTest__it_creates_fulfilment_shipment_from_pdk_shipment_with_data_set_empty_shipment__1.json b/tests/__snapshots__/ShipmentTest__it_creates_fulfilment_shipment_from_pdk_shipment_with_data_set_empty_shipment__1.json index 9c477683f..49b50cc91 100644 --- a/tests/__snapshots__/ShipmentTest__it_creates_fulfilment_shipment_from_pdk_shipment_with_data_set_empty_shipment__1.json +++ b/tests/__snapshots__/ShipmentTest__it_creates_fulfilment_shipment_from_pdk_shipment_with_data_set_empty_shipment__1.json @@ -2,6 +2,7 @@ "carrier": 1, "options": { "ageCheck": false, + "collect": false, "deliveryType": 2, "hideSender": false, "insurance": 0, diff --git a/tests/__snapshots__/ShipmentTest__it_creates_fulfilment_shipment_from_pdk_shipment_with_data_set_shipment_with_all_options__1.json b/tests/__snapshots__/ShipmentTest__it_creates_fulfilment_shipment_from_pdk_shipment_with_data_set_shipment_with_all_options__1.json index 90a9607e1..0ad05e33f 100644 --- a/tests/__snapshots__/ShipmentTest__it_creates_fulfilment_shipment_from_pdk_shipment_with_data_set_shipment_with_all_options__1.json +++ b/tests/__snapshots__/ShipmentTest__it_creates_fulfilment_shipment_from_pdk_shipment_with_data_set_shipment_with_all_options__1.json @@ -21,6 +21,7 @@ }, "options": { "ageCheck": false, + "collect": false, "deliveryType": 2, "hideSender": false, "insurance": 0, diff --git a/tests/__snapshots__/UpdateShipmentsActionTest__it_updates_shipments__1.json b/tests/__snapshots__/UpdateShipmentsActionTest__it_updates_shipments__1.json index e07b171be..d10c00736 100644 --- a/tests/__snapshots__/UpdateShipmentsActionTest__it_updates_shipments__1.json +++ b/tests/__snapshots__/UpdateShipmentsActionTest__it_updates_shipments__1.json @@ -29,7 +29,8 @@ "sameDayDelivery": -1, "signature": 0, "tracked": -1, - "receiptCode": -1 + "receiptCode": -1, + "collect": 0 }, "deliveryType": "standard", "packageType": "package"