Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Adjust duplicated zero_money function

Pacu2a37698a9dd65
diff --git a/saleor/checkout/migrations/0015_auto_20181017_1346.py b/saleor/checkout/migrations/0015_auto_20181017_1346.py
index c3690d686b..9adb0a90fa 100644
--- a/saleor/checkout/migrations/0015_auto_20181017_1346.py
+++ b/saleor/checkout/migrations/0015_auto_20181017_1346.py
@@ -15,6 +15,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='cart',
name='discount_amount',
- field=django_prices.models.MoneyField(currency='USD', decimal_places=2, default=saleor.core.zero_money, max_digits=12),
+ field=django_prices.models.MoneyField(currency='USD', decimal_places=2, default=saleor.core.utils.taxes.zero_money, max_digits=12),
),
]
diff --git a/saleor/checkout/models.py b/saleor/checkout/models.py
index e5e0520c89..09175e30c8 100644
--- a/saleor/checkout/models.py
+++ b/saleor/checkout/models.py
@@ -11,8 +11,7 @@ from django_prices.models import MoneyField
from measurement.measures import Weight
from ..account.models import Address
-from ..core import zero_money
-from ..core.utils.taxes import ZERO_TAXED_MONEY
+from ..core.utils.taxes import ZERO_TAXED_MONEY, zero_money
from ..shipping.models import ShippingMethod
CENTS = Decimal('0.01')
diff --git a/saleor/core/__init__.py b/saleor/core/__init__.py
index 8870465617..9f906c6f35 100644
--- a/saleor/core/__init__.py
+++ b/saleor/core/__init__.py
@@ -85,9 +85,3 @@ class TaxRateType:
(SOCIAL_HOUSING, pgettext_lazy('VAT rate type', 'social housing')),
(STANDARD, pgettext_lazy('VAT rate type', 'standard')),
(WATER, pgettext_lazy('VAT rate type', 'water')))
-
-
-# FIXME: duplicate of saleor.core.taxes.ZERO_MONEY
-def zero_money():
- """Function used as a model's default."""
- return Money(0, currency=settings.DEFAULT_CURRENCY)
diff --git a/saleor/core/utils/taxes.py b/saleor/core/utils/taxes.py
index aa13532ee4..9135b7cea0 100644
--- a/saleor/core/utils/taxes.py
+++ b/saleor/core/utils/taxes.py
@@ -13,6 +13,11 @@ ZERO_MONEY = Money(0, settings.DEFAULT_CURRENCY)
ZERO_TAXED_MONEY = TaxedMoney(net=ZERO_MONEY, gross=ZERO_MONEY)
+def zero_money():
+ """Function used as a model's default."""
+ return ZERO_MONEY
+
+
def apply_tax_to_price(taxes, rate_name, base):
if not taxes or not rate_name:
# Naively convert Money to TaxedMoney for consistency with price
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.py
index 45737991d1..cc4a35df00 100644
--- a/saleor/graphql/api.py
+++ b/saleor/graphql/api.py
@@ -44,7 +44,8 @@ from .page.resolvers import resolve_page, resolve_pages
from .page.types import Page
from .product.schema import ProductMutations, ProductQueries
from .payment.types import Payment, PaymentGatewayEnum
-from .payment.resolvers import resolve_payments, resolve_payment_transaction_token
+from .payment.resolvers import (
+ resolve_payments, resolve_payment_transaction_token)
from .payment.mutations import (
CheckoutPaymentCreate, PaymentCapture, PaymentRefund,
PaymentVoid)
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index cdd7d5836b..691b71b004 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -958,7 +958,7 @@ type Order implements Node {
displayGrossPrices: Boolean!
customerNote: String!
weight: Weight
- lines(before: String, after: String, first: Int, last: Int): OrderLineCountableConnection
+ lines: [OrderLine]!
fulfillments: [Fulfillment]!
events: [OrderEvent]
payments(before: String, after: String, first: Int, last: Int, id: ID): PaymentCountableConnection
@@ -1226,8 +1226,9 @@ type Payment implements Node {
customerIpAddress: String
extraData: String!
token: String!
- total: Money
- capturedAmount: Money
+ currency: String!
+ total: Float!
+ capturedAmount: Float!
checkout: Checkout
order: Order
transactions(before: String, after: String, first: Int, last: Int, id: ID): TransactionCountableConnection
@@ -1899,7 +1900,8 @@ type Transaction implements Node {
token: String!
transactionType: TransactionTransactionType!
isSuccess: Boolean!
- amount: Money
+ currency: String!
+ amount: Float!
gatewayResponse: JSONString!
}
diff --git a/saleor/order/migrations/0065_auto_20181017_1346.py b/saleor/order/migrations/0065_auto_20181017_1346.py
index f8137bbb72..05c13f7c40 100644
--- a/saleor/order/migrations/0065_auto_20181017_1346.py
+++ b/saleor/order/migrations/0065_auto_20181017_1346.py
@@ -17,17 +17,17 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='order',
name='discount_amount',
- field=django_prices.models.MoneyField(currency='USD', decimal_places=2, default=saleor.core.zero_money, max_digits=12),
+ field=django_prices.models.MoneyField(currency='USD', decimal_places=2, default=saleor.core.utils.taxes.zero_money, max_digits=12),
),
migrations.AlterField(
model_name='order',
name='total_gross',
- field=django_prices.models.MoneyField(currency='USD', decimal_places=2, default=saleor.core.zero_money, max_digits=12),
+ field=django_prices.models.MoneyField(currency='USD', decimal_places=2, default=saleor.core.utils.taxes.zero_money, max_digits=12),
),
migrations.AlterField(
model_name='order',
name='total_net',
- field=django_prices.models.MoneyField(currency='USD', decimal_places=2, default=saleor.core.zero_money, max_digits=12),
+ field=django_prices.models.MoneyField(currency='USD', decimal_places=2, default=saleor.core.utils.taxes.zero_money, max_digits=12),
),
migrations.RemoveField(
model_name='payment',
diff --git a/saleor/order/models.py b/saleor/order/models.py
index adc0299efc..08eae4d5ac 100644
--- a/saleor/order/models.py
+++ b/saleor/order/models.py
@@ -19,9 +19,8 @@ from . import (
CustomPaymentChoices, FulfillmentStatus, OrderEvents, OrderStatus,
display_order_event)
from ..account.models import Address
-from ..core import zero_money
from ..core.utils.json_serializer import CustomJsonEncoder
-from ..core.utils.taxes import ZERO_TAXED_MONEY
+from ..core.utils.taxes import ZERO_TAXED_MONEY, zero_money
from ..core.weight import WeightUnits, zero_weight
from ..discount.models import Voucher
from ..payment import ChargeStatus, TransactionType
diff --git a/saleor/payment/forms.py b/saleor/payment/forms.py
index 10ac22e6ac..6810acc2ea 100644
--- a/saleor/payment/forms.py
+++ b/saleor/payment/forms.py
@@ -54,7 +54,7 @@ class BraintreePaymentForm(forms.Form):
self.instance = instance
super().__init__(*args, **kwargs)
self.fields['amount'].initial = self.instance.total
- #FIXME if environment is Sandbox, we could provide couple of predefined
+ # FIXME if environment is Sandbox, we could provide couple of predefined
# nounces for easier testing
def clean(self):
diff --git a/saleor/payment/models.py b/saleor/payment/models.py
index b122a6c117..a9c4158991 100644
--- a/saleor/payment/models.py
+++ b/saleor/payment/models.py
@@ -1,3 +1,4 @@
+from decimal import Decimal
from operator import attrgetter
from django.conf import settings
@@ -8,9 +9,8 @@ from prices import Money
from . import ChargeStatus, TransactionType
from ..checkout.models import Cart
-from ..core import zero_money
+from ..core.utils.taxes import zero_money
from ..order.models import Order
-from decimal import Decimal
class Payment(models.Model):
diff --git a/saleor/payment/utils.py b/saleor/payment/utils.py
index 2b64141d4e..7304afb3e0 100644
--- a/saleor/payment/utils.py
+++ b/saleor/payment/utils.py
@@ -103,7 +103,7 @@ def gateway_authorize(payment: Payment, transaction_token: str) -> Transaction:
with transaction.atomic():
txn, error = provider.authorize(
payment, transaction_token, **provider_params)
- # FIXME Create an order event ?
+ # FIXME Create an order event ?
if not txn.is_success:
raise PaymentError(error)
return txn
@@ -168,11 +168,11 @@ def gateway_refund(payment, amount: Decimal) -> Transaction:
txn, error = provider.refund(payment, amount, **provider_params)
if txn.is_success:
changed_fields = ['captured_amount']
- if txn.amount == payment.total:
+ payment.captured_amount -= txn.amount
+ if not payment.captured_amount:
payment.charge_status = ChargeStatus.FULLY_REFUNDED
payment.is_active = False
changed_fields += ['charge_status', 'is_active']
- payment.captured_amount -= txn.amount
payment.save(update_fields=changed_fields)
# FIXME Create an order event ?
if not txn.is_success:
diff --git a/saleor/static/dashboard-next/orders/types/OrderCancel.ts b/saleor/static/dashboard-next/orders/types/OrderCancel.ts
index 8fab87da4c..3a98b58860 100644
--- a/saleor/static/dashboard-next/orders/types/OrderCancel.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderCancel.ts
@@ -247,8 +247,8 @@ export interface OrderCancel_orderCancel_order {
subtotal: OrderCancel_orderCancel_order_subtotal | null;
total: OrderCancel_orderCancel_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderCancel_orderCancel_order_totalAuthorized;
- totalCaptured: OrderCancel_orderCancel_order_totalCaptured;
+ totalAuthorized: OrderCancel_orderCancel_order_totalAuthorized | null;
+ totalCaptured: OrderCancel_orderCancel_order_totalCaptured | null;
user: OrderCancel_orderCancel_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderCancel_orderCancel_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderCapture.ts b/saleor/static/dashboard-next/orders/types/OrderCapture.ts
index 358c77652d..4554a67724 100644
--- a/saleor/static/dashboard-next/orders/types/OrderCapture.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderCapture.ts
@@ -253,8 +253,8 @@ export interface OrderCapture_orderCapture_order {
subtotal: OrderCapture_orderCapture_order_subtotal | null;
total: OrderCapture_orderCapture_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderCapture_orderCapture_order_totalAuthorized;
- totalCaptured: OrderCapture_orderCapture_order_totalCaptured;
+ totalAuthorized: OrderCapture_orderCapture_order_totalAuthorized | null;
+ totalCaptured: OrderCapture_orderCapture_order_totalCaptured | null;
user: OrderCapture_orderCapture_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderCapture_orderCapture_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderCreateFulfillment.ts b/saleor/static/dashboard-next/orders/types/OrderCreateFulfillment.ts
index 27b13cd035..3aa6106a37 100644
--- a/saleor/static/dashboard-next/orders/types/OrderCreateFulfillment.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderCreateFulfillment.ts
@@ -253,8 +253,8 @@ export interface OrderCreateFulfillment_orderFulfillmentCreate_order {
subtotal: OrderCreateFulfillment_orderFulfillmentCreate_order_subtotal | null;
total: OrderCreateFulfillment_orderFulfillmentCreate_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderCreateFulfillment_orderFulfillmentCreate_order_totalAuthorized;
- totalCaptured: OrderCreateFulfillment_orderFulfillmentCreate_order_totalCaptured;
+ totalAuthorized: OrderCreateFulfillment_orderFulfillmentCreate_order_totalAuthorized | null;
+ totalCaptured: OrderCreateFulfillment_orderFulfillmentCreate_order_totalCaptured | null;
user: OrderCreateFulfillment_orderFulfillmentCreate_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderCreateFulfillment_orderFulfillmentCreate_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderDetails.ts b/saleor/static/dashboard-next/orders/types/OrderDetails.ts
index 047b108e65..01378c815c 100644
--- a/saleor/static/dashboard-next/orders/types/OrderDetails.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderDetails.ts
@@ -247,8 +247,8 @@ export interface OrderDetails_order {
subtotal: OrderDetails_order_subtotal | null;
total: OrderDetails_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderDetails_order_totalAuthorized;
- totalCaptured: OrderDetails_order_totalCaptured;
+ totalAuthorized: OrderDetails_order_totalAuthorized | null;
+ totalCaptured: OrderDetails_order_totalCaptured | null;
user: OrderDetails_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderDetails_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderDetailsFragment.ts b/saleor/static/dashboard-next/orders/types/OrderDetailsFragment.ts
index 0773d30b2d..4dcca11531 100644
--- a/saleor/static/dashboard-next/orders/types/OrderDetailsFragment.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderDetailsFragment.ts
@@ -247,8 +247,8 @@ export interface OrderDetailsFragment {
subtotal: OrderDetailsFragment_subtotal | null;
total: OrderDetailsFragment_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderDetailsFragment_totalAuthorized;
- totalCaptured: OrderDetailsFragment_totalCaptured;
+ totalAuthorized: OrderDetailsFragment_totalAuthorized | null;
+ totalCaptured: OrderDetailsFragment_totalCaptured | null;
user: OrderDetailsFragment_user | null;
userEmail: string | null;
availableShippingMethods: (OrderDetailsFragment_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderDraftCancel.ts b/saleor/static/dashboard-next/orders/types/OrderDraftCancel.ts
index a34d63be91..aa58822b35 100644
--- a/saleor/static/dashboard-next/orders/types/OrderDraftCancel.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderDraftCancel.ts
@@ -247,8 +247,8 @@ export interface OrderDraftCancel_draftOrderDelete_order {
subtotal: OrderDraftCancel_draftOrderDelete_order_subtotal | null;
total: OrderDraftCancel_draftOrderDelete_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderDraftCancel_draftOrderDelete_order_totalAuthorized;
- totalCaptured: OrderDraftCancel_draftOrderDelete_order_totalCaptured;
+ totalAuthorized: OrderDraftCancel_draftOrderDelete_order_totalAuthorized | null;
+ totalCaptured: OrderDraftCancel_draftOrderDelete_order_totalCaptured | null;
user: OrderDraftCancel_draftOrderDelete_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderDraftCancel_draftOrderDelete_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderDraftFinalize.ts b/saleor/static/dashboard-next/orders/types/OrderDraftFinalize.ts
index 5156a7bc60..fb8b764e52 100644
--- a/saleor/static/dashboard-next/orders/types/OrderDraftFinalize.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderDraftFinalize.ts
@@ -253,8 +253,8 @@ export interface OrderDraftFinalize_draftOrderComplete_order {
subtotal: OrderDraftFinalize_draftOrderComplete_order_subtotal | null;
total: OrderDraftFinalize_draftOrderComplete_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderDraftFinalize_draftOrderComplete_order_totalAuthorized;
- totalCaptured: OrderDraftFinalize_draftOrderComplete_order_totalCaptured;
+ totalAuthorized: OrderDraftFinalize_draftOrderComplete_order_totalAuthorized | null;
+ totalCaptured: OrderDraftFinalize_draftOrderComplete_order_totalCaptured | null;
user: OrderDraftFinalize_draftOrderComplete_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderDraftFinalize_draftOrderComplete_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderDraftUpdate.ts b/saleor/static/dashboard-next/orders/types/OrderDraftUpdate.ts
index 9bc1a31b35..10f356fc1d 100644
--- a/saleor/static/dashboard-next/orders/types/OrderDraftUpdate.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderDraftUpdate.ts
@@ -253,8 +253,8 @@ export interface OrderDraftUpdate_draftOrderUpdate_order {
subtotal: OrderDraftUpdate_draftOrderUpdate_order_subtotal | null;
total: OrderDraftUpdate_draftOrderUpdate_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderDraftUpdate_draftOrderUpdate_order_totalAuthorized;
- totalCaptured: OrderDraftUpdate_draftOrderUpdate_order_totalCaptured;
+ totalAuthorized: OrderDraftUpdate_draftOrderUpdate_order_totalAuthorized | null;
+ totalCaptured: OrderDraftUpdate_draftOrderUpdate_order_totalCaptured | null;
user: OrderDraftUpdate_draftOrderUpdate_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderDraftUpdate_draftOrderUpdate_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderFulfillmentCancel.ts b/saleor/static/dashboard-next/orders/types/OrderFulfillmentCancel.ts
index 6b58780804..125f23e011 100644
--- a/saleor/static/dashboard-next/orders/types/OrderFulfillmentCancel.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderFulfillmentCancel.ts
@@ -253,8 +253,8 @@ export interface OrderFulfillmentCancel_orderFulfillmentCancel_order {
subtotal: OrderFulfillmentCancel_orderFulfillmentCancel_order_subtotal | null;
total: OrderFulfillmentCancel_orderFulfillmentCancel_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderFulfillmentCancel_orderFulfillmentCancel_order_totalAuthorized;
- totalCaptured: OrderFulfillmentCancel_orderFulfillmentCancel_order_totalCaptured;
+ totalAuthorized: OrderFulfillmentCancel_orderFulfillmentCancel_order_totalAuthorized | null;
+ totalCaptured: OrderFulfillmentCancel_orderFulfillmentCancel_order_totalCaptured | null;
user: OrderFulfillmentCancel_orderFulfillmentCancel_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderFulfillmentCancel_orderFulfillmentCancel_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderFulfillmentUpdateTracking.ts b/saleor/static/dashboard-next/orders/types/OrderFulfillmentUpdateTracking.ts
index 41577365f4..4690160330 100644
--- a/saleor/static/dashboard-next/orders/types/OrderFulfillmentUpdateTracking.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderFulfillmentUpdateTracking.ts
@@ -253,8 +253,8 @@ export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_o
subtotal: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_subtotal | null;
total: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_totalAuthorized;
- totalCaptured: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_totalCaptured;
+ totalAuthorized: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_totalAuthorized | null;
+ totalCaptured: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_totalCaptured | null;
user: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderLineAdd.ts b/saleor/static/dashboard-next/orders/types/OrderLineAdd.ts
index fc2b7ae1dc..ca773ce761 100644
--- a/saleor/static/dashboard-next/orders/types/OrderLineAdd.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderLineAdd.ts
@@ -253,8 +253,8 @@ export interface OrderLineAdd_draftOrderLineCreate_order {
subtotal: OrderLineAdd_draftOrderLineCreate_order_subtotal | null;
total: OrderLineAdd_draftOrderLineCreate_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderLineAdd_draftOrderLineCreate_order_totalAuthorized;
- totalCaptured: OrderLineAdd_draftOrderLineCreate_order_totalCaptured;
+ totalAuthorized: OrderLineAdd_draftOrderLineCreate_order_totalAuthorized | null;
+ totalCaptured: OrderLineAdd_draftOrderLineCreate_order_totalCaptured | null;
user: OrderLineAdd_draftOrderLineCreate_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderLineAdd_draftOrderLineCreate_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderLineDelete.ts b/saleor/static/dashboard-next/orders/types/OrderLineDelete.ts
index 5ffcb7d998..3bba660fb1 100644
--- a/saleor/static/dashboard-next/orders/types/OrderLineDelete.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderLineDelete.ts
@@ -253,8 +253,8 @@ export interface OrderLineDelete_draftOrderLineDelete_order {
subtotal: OrderLineDelete_draftOrderLineDelete_order_subtotal | null;
total: OrderLineDelete_draftOrderLineDelete_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderLineDelete_draftOrderLineDelete_order_totalAuthorized;
- totalCaptured: OrderLineDelete_draftOrderLineDelete_order_totalCaptured;
+ totalAuthorized: OrderLineDelete_draftOrderLineDelete_order_totalAuthorized | null;
+ totalCaptured: OrderLineDelete_draftOrderLineDelete_order_totalCaptured | null;
user: OrderLineDelete_draftOrderLineDelete_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderLineDelete_draftOrderLineDelete_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderLineUpdate.ts b/saleor/static/dashboard-next/orders/types/OrderLineUpdate.ts
index c30477691c..de3a4e0ff4 100644
--- a/saleor/static/dashboard-next/orders/types/OrderLineUpdate.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderLineUpdate.ts
@@ -253,8 +253,8 @@ export interface OrderLineUpdate_draftOrderLineUpdate_order {
subtotal: OrderLineUpdate_draftOrderLineUpdate_order_subtotal | null;
total: OrderLineUpdate_draftOrderLineUpdate_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderLineUpdate_draftOrderLineUpdate_order_totalAuthorized;
- totalCaptured: OrderLineUpdate_draftOrderLineUpdate_order_totalCaptured;
+ totalAuthorized: OrderLineUpdate_draftOrderLineUpdate_order_totalAuthorized | null;
+ totalCaptured: OrderLineUpdate_draftOrderLineUpdate_order_totalCaptured | null;
user: OrderLineUpdate_draftOrderLineUpdate_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderLineUpdate_draftOrderLineUpdate_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderMarkAsPaid.ts b/saleor/static/dashboard-next/orders/types/OrderMarkAsPaid.ts
index a7a667bd95..1ae67dba4e 100644
--- a/saleor/static/dashboard-next/orders/types/OrderMarkAsPaid.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderMarkAsPaid.ts
@@ -253,8 +253,8 @@ export interface OrderMarkAsPaid_orderMarkAsPaid_order {
subtotal: OrderMarkAsPaid_orderMarkAsPaid_order_subtotal | null;
total: OrderMarkAsPaid_orderMarkAsPaid_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderMarkAsPaid_orderMarkAsPaid_order_totalAuthorized;
- totalCaptured: OrderMarkAsPaid_orderMarkAsPaid_order_totalCaptured;
+ totalAuthorized: OrderMarkAsPaid_orderMarkAsPaid_order_totalAuthorized | null;
+ totalCaptured: OrderMarkAsPaid_orderMarkAsPaid_order_totalCaptured | null;
user: OrderMarkAsPaid_orderMarkAsPaid_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderMarkAsPaid_orderMarkAsPaid_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderRefund.ts b/saleor/static/dashboard-next/orders/types/OrderRefund.ts
index 8a3cd34917..c8696fc933 100644
--- a/saleor/static/dashboard-next/orders/types/OrderRefund.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderRefund.ts
@@ -253,8 +253,8 @@ export interface OrderRefund_orderRefund_order {
subtotal: OrderRefund_orderRefund_order_subtotal | null;
total: OrderRefund_orderRefund_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderRefund_orderRefund_order_totalAuthorized;
- totalCaptured: OrderRefund_orderRefund_order_totalCaptured;
+ totalAuthorized: OrderRefund_orderRefund_order_totalAuthorized | null;
+ totalCaptured: OrderRefund_orderRefund_order_totalCaptured | null;
user: OrderRefund_orderRefund_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderRefund_orderRefund_order_availableShippingMethods | null)[] | null;
diff --git a/saleor/static/dashboard-next/orders/types/OrderVoid.ts b/saleor/static/dashboard-next/orders/types/OrderVoid.ts
index 4b55860c10..60d4e7675a 100644
--- a/saleor/static/dashboard-next/orders/types/OrderVoid.ts
+++ b/saleor/static/dashboard-next/orders/types/OrderVoid.ts
@@ -80,7 +80,7 @@ export interface OrderVoid_orderVoid_order_fulfillments_lines_edges_node {
__typename: "FulfillmentLine";
id: string;
quantity: number;
- orderLine: OrderVoid_orderVoid_order_fulfillments_lines_edges_node_orderLine;
+ orderLine: OrderVoid_orderVoid_order_fulfillments_lines_edges_node_orderLine | null;
}
export interface OrderVoid_orderVoid_order_fulfillments_lines_edges {
@@ -247,8 +247,8 @@ export interface OrderVoid_orderVoid_order {
subtotal: OrderVoid_orderVoid_order_subtotal | null;
total: OrderVoid_orderVoid_order_total | null;
actions: (OrderAction | null)[];
- totalAuthorized: OrderVoid_orderVoid_order_totalAuthorized;
- totalCaptured: OrderVoid_orderVoid_order_totalCaptured;
+ totalAuthorized: OrderVoid_orderVoid_order_totalAuthorized | null;
+ totalCaptured: OrderVoid_orderVoid_order_totalCaptured | null;
user: OrderVoid_orderVoid_order_user | null;
userEmail: string | null;
availableShippingMethods: (OrderVoid_orderVoid_order_availableShippingMethods | null)[] | null;