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

Version Path
tessitura_rest-1.4.6 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.4.5 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.4.4 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.4.3 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.4.2 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.4.1 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.4.0 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.3.9 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.3.8 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.3.7 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.3.6 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.3.5 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.3.4 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.3.3 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.3.2 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.3.1 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.3 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.2.9 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.2.8 lib/tessitura_rest/crm/constituencies.rb
tessitura_rest-1.2.7 lib/tessitura_rest/crm/constituencies.rb