Skip to content

Commit 55631ef

Browse files
Humunized price in graph api
1 parent bb89143 commit 55631ef

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

nxtbn/order/admin_types.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ class OrderType(DjangoObjectType):
4343
line_items = graphene.List(OrderLineItemsType)
4444
overcharged_amount = graphene.String()
4545
is_overdue = graphene.Boolean()
46+
payment_method = graphene.String()
47+
humanize_total_price = graphene.String()
48+
humanize_total_shipping_cost = graphene.String()
49+
humanize_total_discounted_amount = graphene.String()
50+
humanize_total_tax = graphene.String()
51+
humanize_total_paid_amount = graphene.String()
52+
due = graphene.String()
53+
4654

4755
def resolve_humanize_total_price(self, info):
4856
return self.humanize_total_price()
@@ -55,6 +63,29 @@ def resolve_overcharged_amount(self, info):
5563

5664
def resolve_is_overdue(self, info):
5765
return self.is_overdue()
66+
67+
def resolve_payment_method(self, info):
68+
return self.get_payment_method()
69+
70+
def resolve_humanize_total_price(self, info):
71+
return self.humanize_total_price()
72+
73+
def resolve_humanize_total_shipping_cost(self, info):
74+
return self.humanize_total_shipping_cost()
75+
76+
def resolve_humanize_total_discounted_amount(self, info):
77+
return self.humanize_total_discounted_amount()
78+
79+
def resolve_humanize_total_tax(self, info):
80+
return self.humanize_total_tax()
81+
82+
def resolve_humanize_total_paid_amount(self, info):
83+
return self.humanize_total_paid_amount()
84+
85+
def resolve_due(self, info):
86+
return self.get_due()
87+
88+
5889
class Meta:
5990
model = Order
6091
fields = (

0 commit comments

Comments
 (0)