Module: Ext::Integrations::Organization

Included in:
Organization
Defined in:
app/models/ext/integrations.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
# File 'app/models/ext/integrations.rb', line 20

def self.included(base)
  base.class_eval do
    after_create do
      [TicketingKit,RegularDonationKit].each do |klass|
        kit = klass.new
        kit.state = 'activated'
        kit.organization = self
        kit.save
      end
    end
  end
end

Instance Method Details

#connected?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'app/models/ext/integrations.rb', line 33

def connected?
  false
end

#fspObject



37
38
39
# File 'app/models/ext/integrations.rb', line 37

def fsp
  nil
end

#has_active_fiscally_sponsored_project?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'app/models/ext/integrations.rb', line 41

def has_active_fiscally_sponsored_project?
  false
end

#has_fiscally_sponsored_project?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'app/models/ext/integrations.rb', line 45

def has_fiscally_sponsored_project?
  false
end

#items_sold_as_reseller_during(date_range) ⇒ Object



52
53
54
# File 'app/models/ext/integrations.rb', line 52

def items_sold_as_reseller_during(date_range)
  []
end

#name_for_donationsObject



56
57
58
# File 'app/models/ext/integrations.rb', line 56

def name_for_donations
  self.name
end

#refresh_active_fs_projectObject



49
50
# File 'app/models/ext/integrations.rb', line 49

def refresh_active_fs_project
end

#shows_with_salesObject



67
68
69
70
71
72
73
74
75
# File 'app/models/ext/integrations.rb', line 67

def shows_with_sales
  standard =
    ::Order.
      includes(:items => { :show => :event }).
      where("orders.organization_id = ?", self.id).
      map { |o| o.items.map(&:show) }

  standard.flatten.compact.uniq.sort
end


63
64
65
# File 'app/models/ext/integrations.rb', line 63

def sponsored_kit
  nil
end

#update_kitsObject



60
61
# File 'app/models/ext/integrations.rb', line 60

def update_kits
end