lib/recurly/invoice.rb in recurly-2.18.30 vs lib/recurly/invoice.rb in recurly-2.18.31
- old
+ new
@@ -175,9 +175,19 @@
return false unless link? :void
reload follow_link :void
true
end
+ # Applies the open credit balance on the account to the invoice balance.
+ #
+ # @return [true, false] +true+ when successful, +false+ when unable to
+ # (e.g., the invoice is no longer collectible).
+ def apply_credit_balance
+ return false unless link? :apply_credit_balance
+ reload follow_link :apply_credit_balance
+ true
+ end
+
# Posts an offline payment on this invoice
#
# @return [Transaction]
# @raise [Error] If the transaction fails.
def enter_offline_payment(attrs={})