xamarin/XamarinStripe — pull request #7 by mqudsi (2013-04-22 20:41:44+00:00)
Title: Updated StripeCoupon to support both percent/amount off

Stripe allows for a coupon to be defined in terms of either percent
off or amount off. Previous StripeCoupon.cs code assumed that the
coupon could only be PercentOff and crashed when JSON percent_off was
null.

This patch changes percent_off to nullable-int and introduces a new
member amount_off, also nullable-int.

Stripe coupons are required to have one and only one of these two
properties set. As such, any usage of these variables should be
tested for HasValue before use.

Note that this is a breaking API change, code using old API will need
to be updated to work with this change, and swapping out the DLLs
without recompiling will cause code to crash if an attempt to use
StripeCoupon is made.