class PagSeguro::PaymentReleases

Public Class Methods

new() click to toggle source
# File lib/pagseguro/payment_releases.rb, line 9
def initialize
  @payments = []
end

Public Instance Methods

<<(payment) click to toggle source

Adds payment to payment list.

# File lib/pagseguro/payment_releases.rb, line 14
def <<(payment)
  payment = ensure_type(PaymentRelease, payment)

  @payments << payment unless @payments.include? payment
end
include?(payment) click to toggle source

Verify if a payment is already included to payment list. Returns Boolean.

# File lib/pagseguro/payment_releases.rb, line 22
def include?(payment)
  self.find do |included_payment|
    included_payment.installment == ensure_type(PaymentRelease, payment).installment
  end
end