Closed Komal2905 closed 4 years ago
Hi @Komal2905 - it looks like the response you printed contains code = GET30;
. This means that the coupon code was GET30
. Hope this helps!
@rebeccajfriedman though I am getting this response, I don't find any way to parse this. like discountApplications.edges.node.first.code - is this possible. or any way like this
The trouble is that you're attempting to use Storefront.DiscountApplication
directly. It is a GraphQL interface, which translates into Swift as a protocol. Since not all discount applications can be treated the same way, you must disambiguate the type before consuming it in your application layer. Please take a look at the sample app example for a more in-depth example on how to work with discount applications.
I have applied coupon code in checkout which is "MoneyV2" based, and it is successfully applied I can see that in checkout detail. but what I could not find is that how to fetch which coupon has applied.
I am using following query and can see coupon code in