Class: Change::Resources::Petition

Inherits:
MemberResource show all
Defined in:
lib/resources/petition.rb

Instance Attribute Summary collapse

Attributes inherited from MemberResource

#id, #properties

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from MemberResource

collection_name, #get_id, #load, #load_collection, member_name

Methods inherited from Resource

#auth_key, #auth_key=, #endpoint, #make_request, #needs_authorization?, #needs_request_signature?, #request_auth_key

Constructor Details

#initialize(client, properties = {}) ⇒ Petition

Returns a new instance of Petition.



10
11
12
13
14
15
16
# File 'lib/resources/petition.rb', line 10

def initialize(client, properties = {})
  super(client, properties)
  @signatures = SignatureCollection.new(self)
  @targets = TargetCollection.new(self)
  @reasons = ReasonCollection.new(self)
  @updates = UpdateCollection.new(self)
end

Instance Attribute Details

#reasonsObject

Returns the value of attribute reasons.



7
8
9
# File 'lib/resources/petition.rb', line 7

def reasons
  @reasons
end

#signaturesObject

Returns the value of attribute signatures.



5
6
7
# File 'lib/resources/petition.rb', line 5

def signatures
  @signatures
end

#targetsObject

Returns the value of attribute targets.



6
7
8
# File 'lib/resources/petition.rb', line 6

def targets
  @targets
end

#updatesObject

Returns the value of attribute updates.



8
9
10
# File 'lib/resources/petition.rb', line 8

def updates
  @updates
end