Skip to content

Commit

Permalink
Revert "rename variable differentDeliveryAddress into isDeliveryAddre…
Browse files Browse the repository at this point in the history
…ssDifferentFromBilling"

This reverts commit b53e9d1.
  • Loading branch information
Andrej Blaho committed May 13, 2024
1 parent b53e9d1 commit ee91bbb
Show file tree
Hide file tree
Showing 32 changed files with 103 additions and 103 deletions.
38 changes: 19 additions & 19 deletions packages/frontend-api/apiary.apib
Expand Up @@ -1224,15 +1224,15 @@ Creates complete order with products and addresses
- city (required) - Billing address city name (will be on the tax invoice)
- postcode (required) - Billing address zip code (will be on the tax invoice)
- country (required) - Billing address country code in ISO 3166-1 alpha-2 (Country will be on the tax invoice)
- IsDeliveryAddressDifferentFromBilling (boolean, required) - Determines whether to deliver products to a different address than the billing one
- deliveryFirstName - First name of the contact person for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- deliveryLastName - Last name of the contact person for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- differentDeliveryAddress (boolean, required) - Determines whether to deliver products to a different address than the billing one
- deliveryFirstName - First name of the contact person for delivery (required when differentDeliveryAddress is true)
- deliveryLastName - Last name of the contact person for delivery (required when differentDeliveryAddress is true)
- deliveryCompanyName - Company name for delivery
- deliveryTelephone - Contact telephone number for delivery
- deliveryStreet - Street name for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- deliveryCity - City name for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- deliveryPostcode - Zip code for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- deliveryCountry - Country code in ISO 3166-1 alpha-2 for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- deliveryStreet - Street name for delivery (required when differentDeliveryAddress is true)
- deliveryCity - City name for delivery (required when differentDeliveryAddress is true)
- deliveryPostcode - Zip code for delivery (required when differentDeliveryAddress is true)
- deliveryCountry - Country code in ISO 3166-1 alpha-2 for delivery (required when differentDeliveryAddress is true)
- note - Other information related to the order
- payment (InputPayment, required) - Payment method applied to the order
- transport (InputTransport, required) - Transport method applied to the order
Expand Down Expand Up @@ -1273,7 +1273,7 @@ Creates complete order with products and addresses
vatAmount: "0.84"
}
}
IsDeliveryAddressDifferentFromBilling: true
differentDeliveryAddress: true
deliveryFirstName: "deliveryFirstName"
deliveryLastName: "deliveryLastName"
deliveryStreet: "deliveryStreet"
Expand Down Expand Up @@ -1332,7 +1332,7 @@ Creates complete order with products and addresses
city
postcode
country
IsDeliveryAddressDifferentFromBilling
differentDeliveryAddress
deliveryFirstName
deliveryLastName
deliveryCompanyName
Expand Down Expand Up @@ -1423,7 +1423,7 @@ Creates complete order with products and addresses
"city": "Springfield",
"postcode": "12345",
"country": "CZ",
"IsDeliveryAddressDifferentFromBilling": true,
"differentDeliveryAddress": true,
"deliveryFirstName": "deliveryFirstName",
"deliveryLastName": "deliveryLastName",
"deliveryCompanyName": null,
Expand Down Expand Up @@ -1474,7 +1474,7 @@ Returns validation error
vatAmount: "0.84"
}
}
IsDeliveryAddressDifferentFromBilling: true
differentDeliveryAddress: true
deliveryFirstName: "deliveryFirstName"
deliveryLastName: "deliveryLastName"
deliveryStreet: "deliveryStreet"
Expand Down Expand Up @@ -1533,7 +1533,7 @@ Returns validation error
city
postcode
country
IsDeliveryAddressDifferentFromBilling
differentDeliveryAddress
deliveryFirstName
deliveryLastName
deliveryCompanyName
Expand Down Expand Up @@ -1636,7 +1636,7 @@ You can read more about Connection specification in [connections article](https:
city
postcode
country
IsDeliveryAddressDifferentFromBilling
differentDeliveryAddress
note
}
}
Expand Down Expand Up @@ -1687,7 +1687,7 @@ You can read more about Connection specification in [connections article](https:
"city": "Ostrava",
"postcode": "71300",
"country": "CZ",
"IsDeliveryAddressDifferentFromBilling": false,
"differentDeliveryAddress": false,
"note": null
}
},
Expand Down Expand Up @@ -1728,7 +1728,7 @@ You can read more about Connection specification in [connections article](https:
"city": "Ostrava",
"postcode": "71200",
"country": "CZ",
"IsDeliveryAddressDifferentFromBilling": false,
"differentDeliveryAddress": false,
"note": null
}
}
Expand Down Expand Up @@ -1784,7 +1784,7 @@ Returns order filtered using UUID and access token
city
postcode
country
IsDeliveryAddressDifferentFromBilling
differentDeliveryAddress
note
}
}
Expand Down Expand Up @@ -1829,7 +1829,7 @@ Returns order filtered using UUID and access token
"city": "Ostrava",
"postcode": "71300",
"country": "CZ",
"IsDeliveryAddressDifferentFromBilling": false,
"differentDeliveryAddress": false,
"note": null
}
}
Expand Down Expand Up @@ -1878,7 +1878,7 @@ Returns order filtered using url hash
city
postcode
country
IsDeliveryAddressDifferentFromBilling
differentDeliveryAddress
note
}
}
Expand Down Expand Up @@ -1924,7 +1924,7 @@ Returns order filtered using url hash
"city": "Ostrava",
"postcode": "71300",
"country": "CZ",
"IsDeliveryAddressDifferentFromBilling": false,
"differentDeliveryAddress": false,
"note": null
}
}
Expand Down
Expand Up @@ -35,7 +35,7 @@ Returns validation error
vatAmount: "0.84"
}
}
IsDeliveryAddressDifferentFromBilling: true
differentDeliveryAddress: true
deliveryFirstName: "deliveryFirstName"
deliveryLastName: "deliveryLastName"
deliveryStreet: "deliveryStreet"
Expand Down Expand Up @@ -94,7 +94,7 @@ Returns validation error
city
postcode
country
IsDeliveryAddressDifferentFromBilling
differentDeliveryAddress
deliveryFirstName
deliveryLastName
deliveryCompanyName
Expand Down
20 changes: 10 additions & 10 deletions packages/frontend-api/apiary/order/methods/create-order.md
Expand Up @@ -24,15 +24,15 @@ Creates complete order with products and addresses
- city (required) - Billing address city name (will be on the tax invoice)
- postcode (required) - Billing address zip code (will be on the tax invoice)
- country (required) - Billing address country code in ISO 3166-1 alpha-2 (Country will be on the tax invoice)
- IsDeliveryAddressDifferentFromBilling (boolean, required) - Determines whether to deliver products to a different address than the billing one
- deliveryFirstName - First name of the contact person for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- deliveryLastName - Last name of the contact person for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- differentDeliveryAddress (boolean, required) - Determines whether to deliver products to a different address than the billing one
- deliveryFirstName - First name of the contact person for delivery (required when differentDeliveryAddress is true)
- deliveryLastName - Last name of the contact person for delivery (required when differentDeliveryAddress is true)
- deliveryCompanyName - Company name for delivery
- deliveryTelephone - Contact telephone number for delivery
- deliveryStreet - Street name for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- deliveryCity - City name for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- deliveryPostcode - Zip code for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- deliveryCountry - Country code in ISO 3166-1 alpha-2 for delivery (required when IsDeliveryAddressDifferentFromBilling is true)
- deliveryStreet - Street name for delivery (required when differentDeliveryAddress is true)
- deliveryCity - City name for delivery (required when differentDeliveryAddress is true)
- deliveryPostcode - Zip code for delivery (required when differentDeliveryAddress is true)
- deliveryCountry - Country code in ISO 3166-1 alpha-2 for delivery (required when differentDeliveryAddress is true)
- note - Other information related to the order
- payment (InputPayment, required) - Payment method applied to the order
- transport (InputTransport, required) - Transport method applied to the order
Expand Down Expand Up @@ -73,7 +73,7 @@ Creates complete order with products and addresses
vatAmount: "0.84"
}
}
IsDeliveryAddressDifferentFromBilling: true
differentDeliveryAddress: true
deliveryFirstName: "deliveryFirstName"
deliveryLastName: "deliveryLastName"
deliveryStreet: "deliveryStreet"
Expand Down Expand Up @@ -132,7 +132,7 @@ Creates complete order with products and addresses
city
postcode
country
IsDeliveryAddressDifferentFromBilling
differentDeliveryAddress
deliveryFirstName
deliveryLastName
deliveryCompanyName
Expand Down Expand Up @@ -223,7 +223,7 @@ Creates complete order with products and addresses
"city": "Springfield",
"postcode": "12345",
"country": "CZ",
"IsDeliveryAddressDifferentFromBilling": true,
"differentDeliveryAddress": true,
"deliveryFirstName": "deliveryFirstName",
"deliveryLastName": "deliveryLastName",
"deliveryCompanyName": null,
Expand Down
Expand Up @@ -52,7 +52,7 @@ You can read more about Connection specification in [connections article](https:
city
postcode
country
IsDeliveryAddressDifferentFromBilling
differentDeliveryAddress
note
}
}
Expand Down Expand Up @@ -103,7 +103,7 @@ You can read more about Connection specification in [connections article](https:
"city": "Ostrava",
"postcode": "71300",
"country": "CZ",
"IsDeliveryAddressDifferentFromBilling": false,
"differentDeliveryAddress": false,
"note": null
}
},
Expand Down Expand Up @@ -144,7 +144,7 @@ You can read more about Connection specification in [connections article](https:
"city": "Ostrava",
"postcode": "71200",
"country": "CZ",
"IsDeliveryAddressDifferentFromBilling": false,
"differentDeliveryAddress": false,
"note": null
}
}
Expand Down
Expand Up @@ -45,7 +45,7 @@ Returns order filtered using UUID and access token
city
postcode
country
IsDeliveryAddressDifferentFromBilling
differentDeliveryAddress
note
}
}
Expand Down Expand Up @@ -90,7 +90,7 @@ Returns order filtered using UUID and access token
"city": "Ostrava",
"postcode": "71300",
"country": "CZ",
"IsDeliveryAddressDifferentFromBilling": false,
"differentDeliveryAddress": false,
"note": null
}
}
Expand Down
Expand Up @@ -41,7 +41,7 @@ Returns order filtered using url hash
city
postcode
country
IsDeliveryAddressDifferentFromBilling
differentDeliveryAddress
note
}
}
Expand Down Expand Up @@ -87,7 +87,7 @@ Returns order filtered using url hash
"city": "Ostrava",
"postcode": "71300",
"country": "CZ",
"IsDeliveryAddressDifferentFromBilling": false,
"differentDeliveryAddress": false,
"note": null
}
}
Expand Down
Expand Up @@ -22,7 +22,7 @@

class CreateOrderMutation extends AbstractMutation
{
public const VALIDATION_GROUP_DIFFERENT_DELIVERY_ADDRESS_WITHOUT_PRESELECTED = 'IsDeliveryAddressDifferentFromBillingWithoutPreselected';
public const VALIDATION_GROUP_DIFFERENT_DELIVERY_ADDRESS_WITHOUT_PRESELECTED = 'differentDeliveryAddressWithoutPreselected';
public const VALIDATION_GROUP_ON_COMPANY_BEHALF = 'onCompanyBehalf';

/**
Expand Down Expand Up @@ -112,7 +112,7 @@ protected function computeValidationGroups(Argument $argument): array
$validationGroups[] = self::VALIDATION_GROUP_ON_COMPANY_BEHALF;
}

if ($input['IsDeliveryAddressDifferentFromBilling'] === true && $input['deliveryAddressUuid'] === null) {
if ($input['differentDeliveryAddress'] === true && $input['deliveryAddressUuid'] === null) {
$validationGroups[] = self::VALIDATION_GROUP_DIFFERENT_DELIVERY_ADDRESS_WITHOUT_PRESELECTED;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/frontend-api/src/Model/Order/OrderDataFactory.php
Expand Up @@ -58,7 +58,7 @@ public function createOrderDataFromArgument(Argument $argument): OrderData

$orderData->domainId = $this->domain->getId();
$orderData->origin = static::ORDER_ORIGIN_GRAPHQL;
$orderData->deliveryAddressSameAsBillingAddress = !$input['IsDeliveryAddressDifferentFromBilling'];
$orderData->deliveryAddressSameAsBillingAddress = !$input['differentDeliveryAddress'];
$orderData->isCompanyCustomer = $input['onCompanyBehalf'];

$orderData = $this->withResolvedFields($input, $orderData);
Expand All @@ -79,7 +79,7 @@ protected function withResolvedFields(array $input, OrderData $orderData): Order

$cloneOrderData->country = $this->countryFacade->findByCode($input['country']);

if ($input['IsDeliveryAddressDifferentFromBilling'] && array_key_exists('deliveryCountry', $input)) {
if ($input['differentDeliveryAddress'] && array_key_exists('deliveryCountry', $input)) {
$cloneOrderData->deliveryCountry = $this->countryFacade->findByCode($input['deliveryCountry']);
}

Expand Down
Expand Up @@ -34,7 +34,7 @@ protected function map(): array
'deliveryCountry' => function (Order $order) {
return $order->getDeliveryCountry() === null ? '' : $order->getDeliveryCountry()->getCode();
},
'IsDeliveryAddressDifferentFromBilling' => function (Order $order) {
'differentDeliveryAddress' => function (Order $order) {
return !$order->isDeliveryAddressSameAsBillingAddress();
},
'status' => function (Order $order) {
Expand Down
Expand Up @@ -68,7 +68,7 @@ OrderDecorator:
type: "String!"
description: "Billing address country code"

IsDeliveryAddressDifferentFromBilling:
differentDeliveryAddress:
type: "Boolean!"
description: "Indicates whether the billing address is other than a delivery address"

Expand Down

0 comments on commit ee91bbb

Please sign in to comment.