class ActionNetworkRest::Signatures

Attributes

petition_id[RW]

Public Instance Methods

base_path() click to toggle source
# File lib/action_network_rest/signatures.rb, line 7
def base_path
  "petitions/#{url_escape(petition_id)}/signatures/"
end
create(signature_data, tags: []) click to toggle source
# File lib/action_network_rest/signatures.rb, line 11
def create(signature_data, tags: [])
  post_body = signature_data
  post_body['add_tags'] = tags if tags.any?

  response = client.post_request(base_path, post_body)
  object_from_response(response)
end
update(id, signature_data) click to toggle source
# File lib/action_network_rest/signatures.rb, line 19
def update(id, signature_data)
  response = client.put_request("#{base_path}#{url_escape(id)}", signature_data)
  object_from_response(response)
end

Private Instance Methods

osdi_key() click to toggle source
# File lib/action_network_rest/signatures.rb, line 26
def osdi_key
  'osdi:signatures'
end