Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update schema
Jakub Draganek9240af05f239
diff --git a/saleor/graphql/account/resolvers.py b/saleor/graphql/account/resolvers.pyindex 776475b215..5923f876b3 100644--- a/saleor/graphql/account/resolvers.py+++ b/saleor/graphql/account/resolvers.py@@ -1,4 +1,5 @@from itertools import chain+import graphene_django_optimizer as gql_optimizerfrom django.db.models import Qfrom i18naddress import get_validation_rulesdiff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 273884bde6..9e1d013ee9 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -2510,7 +2510,6 @@ type Query {reportProductSales(period: ReportingPeriod!, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnectionpayment(id: ID): Paymentpayments(before: String, after: String, first: Int, last: Int): PaymentCountableConnection- paymentStoredSources: [PaymentSource]paymentClientToken(gateway: GatewaysEnum): Stringpage(id: ID, slug: String): Pagepages(query: String, before: String, after: String, first: Int, last: Int): PageCountableConnection@@ -3047,6 +3046,7 @@ type User implements Node {permissions: [PermissionDisplay]avatar(size: Int): Imageevents: [CustomerEvent]+ storedPaymentSources: [PaymentSource]}input UserAddressInput {diff --git a/saleor/order/utils.py b/saleor/order/utils.pyindex 5058c23259..e031e9db71 100644--- a/saleor/order/utils.py+++ b/saleor/order/utils.py@@ -16,7 +16,6 @@ from ..discount.models import NotApplicablefrom ..order import FulfillmentStatus, OrderStatus, emailsfrom ..order.models import Fulfillment, FulfillmentLine, Order, OrderLinefrom ..payment import ChargeStatus-from ..payment.utils import gateway_refund, gateway_voidfrom ..product.utils import (allocate_stock,deallocate_stock,@@ -198,6 +197,8 @@ def cancel_order(user, order, restock):charge_status=ChargeStatus.FULLY_REFUNDED)+ from ..payment.utils import gateway_refund, gateway_void+for payment in payments:if payment.can_refund():gateway_refund(payment)diff --git a/tests/api/test_payment.py b/tests/api/test_payment.pyindex 072740835c..ea84f7e680 100644--- a/tests/api/test_payment.py+++ b/tests/api/test_payment.py@@ -3,7 +3,6 @@ from decimal import Decimalimport grapheneimport pytestfrom prices import TaxedMoney-from tests.api.utils import get_graphql_contentfrom saleor.core.utils import get_country_name_by_codefrom saleor.graphql.payment.enums import (@@ -14,6 +13,7 @@ from saleor.graphql.payment.enums import (from saleor.payment.interface import CreditCardInfo, CustomerSource, TokenConfigfrom saleor.payment.models import ChargeStatus, Payment, TransactionKindfrom saleor.payment.utils import fetch_customer_id, store_customer_id+from tests.api.utils import get_graphql_contentVOID_QUERY = """mutation PaymentVoid($paymentId: ID!) {