Module: Drip::Resources

Defined in:
lib/drip/resources.rb

Class Method Summary collapse

Class Method Details

.classesObject



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/drip/resources.rb', line 18

def self.classes
  [
    Drip::Account,
    Drip::Broadcast,
    Drip::Campaign,
    Drip::CampaignSubscription,
    Drip::Error,
    Drip::Order,
    Drip::Purchase,
    Drip::Subscriber,
    Drip::Tag,
    Drip::Webhook,
    Drip::Workflow,
    Drip::WorkflowTrigger
  ]
end

.find_class(name) ⇒ Object



35
36
37
# File 'lib/drip/resources.rb', line 35

def self.find_class(name)
  classes.find { |c| c.resource_name == name } || Drip::Resource
end