common_app

This is gem for integration of common app

MIT License

Stars
0

Common App

Common App Partner API

Installation

Add these lines to your application's Gemfile:

gem 'savon', git: 'https://github.com/haider-cialfo/savon.git'
gem 'common_app'

And then execute:

$ bundle

Configuration

Create a file with a name common_app.rb in config/initializers

Add these lines to config/initializers/common_app.rb:

CommonApp.configure do |config|
  config.rest_api     = '' # Common App Partner REST API URL
  config.soap_service = '' # Common App Partner Soap Service WSDL URL
  config.api_key      = '' # Your API Key
  config.username     = '' # Your Username
  config.password     = '' # Your Password
  config.proxy        = '' # (Optional) Your Proxy URL
  config.cache        = Rails.cache # Or replace with cache of your own choice
end

Usage

Table of Contents

Auth

In the configuration, supply:

  • rest_api
  • soap_service
  • api_key
  • username
  • password
  • proxy
  • cache

Create

Applicant

params  = {
  "address" : {
    "addressline1" : "Address line 1",
    "addressline2" : "Address line 1",
    "addressline3" : "Address line 1",
    "city" : "City name",
    "country" : "Country name",
    "state" : "State name",
    "zip" : "123456"
  },
  "birthdate" : "03/21/2000",
  "email" : "[email protected]",
  "firstname" : "Example",
  "lastname" : "Last Name",
  "phone" : {
    "countrycode" : "+65",
    "number" : "123456789"
  }
}

CommonApp::Create::Applicant.new(params).call

Get

Applicant

Application Status

params = {
    "applicant_id" : "Applicant ID"
    "member_id" : "Member ID"
}

CommonApp::Get::Applicant::ApplicationStatus.new(params).call

Authorization Status

params = {
    "applicant_id" : "Applicant ID"
}

CommonApp::Get::Applicant::AuthorizationStatus.new(params).call

Details

params = {
    "applicant_id" : "Applicant ID"
}

CommonApp::Get::Applicant::Detail.new(params).call

Get

params = {
    "email" : "Email Address"
}

CommonApp::Get::Applicant::Get.new(params).call

Counselor

ED2 Status

"applicant_id" : "Applicant ID"
"recommender_id" : "Recommender ID"
"member_id": "Member ID"

CommonApp::Get::Counselor::EarlyDecision2Status.new(applicant_id, recommender_id, member_id).call

ED Status

params = {
  "applicant_id" : "Applicant ID"
  "recommender_id" : "Recommender ID"
  "member_id": "Member ID"
}

CommonApp::Get::Counselor::EarlyDecisionStatus.new(params).call

FeeWaiver Status

params = {
  "applicant_id" : "Applicant ID"
  "recommender_id" : "Recommender ID"
  "member_id": "Member ID"
}

CommonApp::Get::Counselor::FeeWavierStatus.new(params).call

Final Report Status

params = {
  "applicant_id" : "Applicant ID"
  "recommender_id" : "Recommender ID"
  "member_id": "Member ID"
}

CommonApp::Get::Counselor::FinalReportStatus.new(params).call

Get

params = {
  "email" : "Email Address"
}

CommonApp::Get::Counselor::Get.new(params).call

Midyear Report Status

params = {
  "applicant_id" : "Applicant ID"
  "recommender_id" : "Recommender ID"
  "member_id": "Member ID"
}

CommonApp::Get::Counselor::MidyearReportStatus.new(params).call

Optional Report Status

params = {
  "applicant_id" : "Applicant ID"
  "recommender_id" : "Recommender ID"
  "member_id": "Member ID"
}

CommonApp::Get::Counselor::OptionalReportStatus.new(params).call

Recommendation Status

params = {
  "applicant_id" : "Applicant ID"
  "recommender_id" : "Recommender ID"
  "member_id": "Member ID"
}

CommonApp::Get::Counselor::RecommendationStatus.new(params).call

Secondary Report Status

params = {
  "applicant_id" : "Applicant ID"
  "recommender_id" : "Recommender ID"
  "member_id": "Member ID"
}

CommonApp::Get::Counselor::SecondaryReportStatus.new(params).call

Status

params = {
  "recommender_id" : "Recommender ID"
}

CommonApp::Get::Counselor::Status.new(params).call

Members

Deadlines

CommonApp::Get::Members::Deadlines.new.call

List

CommonApp::Get::Members::List.new.call

Teacher

RecommendationStatus

params = {
    "applicant_id" : "Applicant ID"
    "recommender_id" : "recommender_id"
    "member_id" : "member_id"
}

CommonApp::Get::Teacher::RecommendationStatus.new(params).call

SecondarySchools

CommonApp::Get::SecondarySchools.new.call

Invite

Assign

Remove Teacher

params = {
    "applicant_id" : "Applicant ID"
    "recommender_id" : "Recommender ID"
    "member_id" : "Member ID"
}

CommonApp::Invite::Assign::RemoveTeacher.new(params).call

Teacher

params = {
    "applicant_id" : "Applicant ID"
    "recommender_id" : "Recommender ID"
    "member_id" : "Member ID"
}

CommonApp::Invite::Assign::Teacher.new(params).call

Counselor

params = {
    "applicant_id" = "Applicant ID"
    "counselor" = "Counselor"
}

CommonApp::Invite::Counselor.new(params).call

RemoveCounselor

params = {
    "applicant_id" = "Applicant ID"
    "counselor" = "Counselor"
}

CommonApp::Invite::RemoveCounselor.new(params).call

RemoveTeacher

params = {
    "applicant_id" = "Applicant ID"
    "recommender_id" = "Recommender ID"
}

CommonApp::Invite::RemoveTeacher.new(params).call

Teacher

params = {
    "applicant_id" = "Applicant ID"
    "teacher" = "Teacher"
    "subject" = "Subject"
}

CommonApp::Invite::Teacher.new(params).call

Post

Counselor

ED

  Answers: [
    {
     AnswerData: {
              QuestionId: question_id,
              Response: response
            },
     AnswerData: {
              QuestionId: question_id,
              UploadFileContents: file content
            }       
    }
  }
  ],
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Post::Counselor::ED.new(params).call

ED2

  Answers: [
    {
     AnswerData: {
              QuestionId: question_id,
              Response: response
            },
     AnswerData: {
              QuestionId: question_id,
              UploadFileContents: file content
            }       
    }
  }
  ],
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Post::Counselor::ED2.new(params).call

Fee Waiver

  Answers: [
    {
     AnswerData: {
              QuestionId: question_id,
              Response: response
            },
     AnswerData: {
              QuestionId: question_id,
              UploadFileContents: file content
            }       
    }
  }
  ],
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Post::Counselor::FeeWaiver.new(params).call

Final Report

  Answers: [
    {
     AnswerData: {
              QuestionId: question_id,
              Response: response
            },
     AnswerData: {
              QuestionId: question_id,
              UploadFileContents: file content
            }       
    }
  }
  ],
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Post::Counselor::FinalReport.new(params).call

Midyear Report

  Answers: [
    {
     AnswerData: {
              QuestionId: question_id,
              Response: response
            },
     AnswerData: {
              QuestionId: question_id,
              UploadFileContents: file content
            }       
    }
  }
  ],
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Post::Counselor::MidyearReport.new(params).call

Optional Report

  Answers: [
    {
     AnswerData: {
              QuestionId: question_id,
              Response: response
            },
     AnswerData: {
              QuestionId: question_id,
              UploadFileContents: file content
            }       
    }
  }
  ],
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Post::Counselor::OptionalReport.new(params).call

Recommendation

  Answers: [
    {
     AnswerData: {
              QuestionId: question_id,
              Response: response
            },
     AnswerData: {
              QuestionId: question_id,
              UploadFileContents: file content
            }       
    }
  }
  ],
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Post::Counselor::Recommendation.new(params).call

Secondary Report

  Answers: [
    {
     AnswerData: {
              QuestionId: question_id,
              Response: response
            },
     AnswerData: {
              QuestionId: question_id,
              UploadFileContents: file content
            }       
    }
  }
  ],
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Post::Counselor::SecondaryReport.new(params).call

Teacher

Recommendation

params = {
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Post::Teacher::Recommendation.new(params).call

Submit

Counselor

ED

params = {
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Submit::Counselor::EarlyDecision.new(params).call

ED2

params = {
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Submit::Counselor::EarlyDecision2.new(params).call

Fee Waiver

params = {
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Submit::Counselor::FeeWaiver.new(params).call

Final Report

params = {
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
  MemberId: member_id
  SchoolId: school_id
}

CommonApp::Submit::Counselor::FinalReport.new(params).call

Midyear Report

params = {
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Submit::Counselor::MidYearReport.new(params).call

Optional Report

params = {
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Submit::Counselor::OptionalReport.new(params).call

Recommendation

params = {
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Submit::Counselor::Recommendation.new(params).call

School Report

params = {
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
}

CommonApp::Submit::Counselor::SchoolReport.new(params).call

Teacher

Recommendation

params = {
  ApplicantId: common_app_applicant_id,
  RecommenderId: common_app_recommender_id
  MemberId: member_id
  SchoolId: school_id
}

CommonApp::Submit::Teacher::Recommendation.new(params).call

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Hitendra1632/common_app. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the CommonApp project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.