Class: SalsaLabs::Action

Inherits:
SalsaObject show all
Defined in:
lib/salsa_labs/action.rb

Overview

Action represents a single instance of an advocacy campaign (“Action”) in the Salsa Labs / DemocracyInAction CRM.

Instance Attribute Summary

Attributes inherited from SalsaObject

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SalsaObject

#initialize, #organization_key

Constructor Details

This class inherits a constructor from SalsaLabs::SalsaObject

Class Method Details

.fetch(credentials = {}) ⇒ Object



27
28
29
30
# File 'lib/salsa_labs/action.rb', line 27

def self.fetch(credentials = {})
  ObjectsFetcher.fetch(type: 'Action', item_class: self,
                       credentials: credentials)
end

Instance Method Details

#action_keyObject



7
8
9
# File 'lib/salsa_labs/action.rb', line 7

def action_key
  (attributes['action_key'] || 0).to_i
end

#chapter_keyObject



11
12
13
# File 'lib/salsa_labs/action.rb', line 11

def chapter_key
  attributes['chapter_key'].to_i if attributes['chapter_key']
end

#descriptionObject



15
16
17
# File 'lib/salsa_labs/action.rb', line 15

def description
  attributes['description']
end

#reference_nameObject



19
20
21
# File 'lib/salsa_labs/action.rb', line 19

def reference_name
  attributes['reference_name']
end

#titleObject



23
24
25
# File 'lib/salsa_labs/action.rb', line 23

def title
  attributes['title']
end