Sha256: cf0cb5e33e76fcda83b24e850cfce8c71ef350fea29e64fbda9af98455483920
Contents?: true
Size: 666 Bytes
Versions: 31
Compression:
Stored size: 666 Bytes
Contents
module Constituencies def get_constituencies(id, options = {}) options.merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("CRM/Constituencies?constituentId=#{id}"), options) JSON.parse(response.body) end def create_constituencies(constituency, id, options = {}) parameters = { 'ConstituencyType': { 'Id': constituency, }, 'Constituent': { 'Id': id, }, } options.merge!(basic_auth: @auth, headers: @headers) options.merge!(:body => parameters) response = self.class.post(base_api_endpoint('CRM/Constituencies'), options) end end
Version data entries
31 entries across 31 versions & 1 rubygems