Sha256: df31d674691e64492dc0ebc48cb4073ef6606c271996e967e4325d1299cc8b66

Contents?: true

Size: 508 Bytes

Versions: 11

Compression:

Stored size: 508 Bytes

Contents

class Kaui::AccountEmail < KillBillClient::Model::AccountEmailAttributes

  def self.find_all_sorted_by_account_id(account_id, audit = 'NONE', options = {})
    emails = Kaui::Account.new(:account_id => account_id).emails(audit, options)
    emails.map { |email| Kaui::AccountEmail.new(email.to_hash) }.sort
  end

  def <=>(account_email)
    if account_email.nil?
      -1
    elsif account_email.email.nil?
      email.nil? ? 0 : 1
    else
      email.to_s <=> account_email.email.to_s
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kaui-0.11.0 app/models/kaui/account_email.rb
kaui-0.10.0 app/models/kaui/account_email.rb
kaui-0.9.0 app/models/kaui/account_email.rb
kaui-0.8.4 app/models/kaui/account_email.rb
kaui-0.8.3 app/models/kaui/account_email.rb
kaui-0.8.2 app/models/kaui/account_email.rb
kaui-0.8.1 app/models/kaui/account_email.rb
kaui-0.8.0 app/models/kaui/account_email.rb
kaui-0.7.2 app/models/kaui/account_email.rb
kaui-0.7.1 app/models/kaui/account_email.rb
kaui-0.7.0 app/models/kaui/account_email.rb