lib/recurly/invoice.rb in recurly-2.14.1 vs lib/recurly/invoice.rb in recurly-2.15.0

- old
+ new

@@ -162,31 +162,31 @@ self.class.find(to_param, format: 'pdf') end # Refunds specific line items on the invoice. # - # @return [InvoiceCollection, false] A new refund invoice, false if the invoice isn't + # @return [Invoice, false] Invoice if successful, false if the invoice isn't # refundable. # @raise [Error] If the refund fails. # @param line_items [Array, nil] An array of line items to refund. # @param refund_method ["credit_first", "transaction_first"] The method used to refund. def refund(line_items = nil, refund_method = 'credit_first') return false unless link? :refund - InvoiceCollection.from_response( + self.class.from_response( follow_link :refund, :body => refund_line_items_to_xml(line_items, refund_method) ) end # Refunds the invoice for a specific amount. # - # @return [Invoice, false] A new refund invoice, false if the invoice isn't + # @return [Invoice, false] Invoice if successful, false if the invoice isn't # refundable. # @raise [Error] If the refund fails. # @param amount_in_cents [Integer, nil] The amount (in cents) to refund. # @param refund_method ["credit_first", "transaction_first"] The method used to refund. def refund_amount amount_in_cents = nil, refund_method = 'credit_first' return false unless link? :refund - InvoiceCollection.from_response( + self.class.from_response( follow_link :refund, :body => refund_amount_to_xml(amount_in_cents, refund_method) ) end def xml_keys