-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get coupon description - hosted_description #225
Comments
I asked this to the support (how to get both the description but also the period of application, e.g. number of months) and the reply last week was to issue a coupon request myself (on the server side). That said the Recurly.js library is already itself issuing a call to check the coupon, so all this information is available somewhere, so why not propagating it to the To me the |
After a number of hours of digging, I actually found a way to get more information, but I think the order of the calls are important and maybe why I missed this initially. If I use this, then I'll get the detailed coupon information: recurly.Pricing()
.plan(@recurly_plan(), { quantity: 1 })
.currency(@currency())
.on 'set.coupon', (coupon) =>
@setCouponDescription(coupon)
.on 'unset.coupon', () =>
@clearCouponDescription()
.coupon @coupon_code()
.address(address)
.catch (err) =>
# snip
.done (price) =>
# snip With this exact order, I will get detailed information on |
Thank you for answering this @thbar -- yes, the pricing promise chain will only resolve with price data -- we chose not to make this polymorphic to make it easier to trust its output. The |
It would be great if when applying a coupon we can get the description, it looks to be hosted_description in the xml response.
The text was updated successfully, but these errors were encountered: