bullhorn-rest 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +15 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +117 -0
  6. data/Rakefile +1 -0
  7. data/bullhorn-rest.gemspec +26 -0
  8. data/lib/bullhorn/rest.rb +8 -0
  9. data/lib/bullhorn/rest/authentication.rb +79 -0
  10. data/lib/bullhorn/rest/client.rb +77 -0
  11. data/lib/bullhorn/rest/entities/appointment.rb +13 -0
  12. data/lib/bullhorn/rest/entities/appointment_attendee.rb +13 -0
  13. data/lib/bullhorn/rest/entities/base.rb +73 -0
  14. data/lib/bullhorn/rest/entities/business_sector.rb +13 -0
  15. data/lib/bullhorn/rest/entities/candidate.rb +13 -0
  16. data/lib/bullhorn/rest/entities/candidate_certification.rb +13 -0
  17. data/lib/bullhorn/rest/entities/candidate_education.rb +13 -0
  18. data/lib/bullhorn/rest/entities/candidate_reference.rb +13 -0
  19. data/lib/bullhorn/rest/entities/candidate_work_history.rb +13 -0
  20. data/lib/bullhorn/rest/entities/category.rb +13 -0
  21. data/lib/bullhorn/rest/entities/client_contact.rb +13 -0
  22. data/lib/bullhorn/rest/entities/client_corporation.rb +13 -0
  23. data/lib/bullhorn/rest/entities/corporate_user.rb +13 -0
  24. data/lib/bullhorn/rest/entities/corporation_department.rb +13 -0
  25. data/lib/bullhorn/rest/entities/country.rb +13 -0
  26. data/lib/bullhorn/rest/entities/custom_action.rb +13 -0
  27. data/lib/bullhorn/rest/entities/job_order.rb +13 -0
  28. data/lib/bullhorn/rest/entities/job_submission.rb +13 -0
  29. data/lib/bullhorn/rest/entities/note.rb +13 -0
  30. data/lib/bullhorn/rest/entities/note_entity.rb +13 -0
  31. data/lib/bullhorn/rest/entities/placement.rb +13 -0
  32. data/lib/bullhorn/rest/entities/placement_change_request.rb +13 -0
  33. data/lib/bullhorn/rest/entities/placement_commission.rb +13 -0
  34. data/lib/bullhorn/rest/entities/sendout.rb +13 -0
  35. data/lib/bullhorn/rest/entities/skill.rb +13 -0
  36. data/lib/bullhorn/rest/entities/specialty.rb +13 -0
  37. data/lib/bullhorn/rest/entities/state.rb +13 -0
  38. data/lib/bullhorn/rest/entities/task.rb +13 -0
  39. data/lib/bullhorn/rest/entities/tearsheet.rb +13 -0
  40. data/lib/bullhorn/rest/entities/tearsheet_recipient.rb +13 -0
  41. data/lib/bullhorn/rest/entities/time_unit.rb +13 -0
  42. data/lib/bullhorn/rest/version.rb +5 -0
  43. data/spec/bullhorn/rest/client_spec.rb +32 -0
  44. data/spec/bullhorn/rest/entities_spec.rb +69 -0
  45. data/spec/cassettes/Bullhorn_Rest_Client/authentication/when_username_and_password_set/authenticates.json +1 -0
  46. data/spec/cassettes/Bullhorn_Rest_Entities/appointment/_appointments_returns_appointments.json +1 -0
  47. data/spec/cassettes/Bullhorn_Rest_Entities/appointment_attendee/_appointment_attendees_returns_appointment_attendees.json +1 -0
  48. data/spec/cassettes/Bullhorn_Rest_Entities/business_sector/_business_sectors_returns_business_sectors.json +1 -0
  49. data/spec/cassettes/Bullhorn_Rest_Entities/candidate/_candidates_returns_candidates.json +1 -0
  50. data/spec/cassettes/Bullhorn_Rest_Entities/candidate/_department_candidates_returns_candidates.json +1 -0
  51. data/spec/cassettes/Bullhorn_Rest_Entities/candidate/_user_candidates_returns_candidates.json +1 -0
  52. data/spec/cassettes/Bullhorn_Rest_Entities/candidate_certification/_candidate_certifications_returns_candidate_certifications.json +1 -0
  53. data/spec/cassettes/Bullhorn_Rest_Entities/candidate_education/_candidate_educations_returns_candidate_educations.json +1 -0
  54. data/spec/cassettes/Bullhorn_Rest_Entities/candidate_reference/_candidate_references_returns_candidate_references.json +1 -0
  55. data/spec/cassettes/Bullhorn_Rest_Entities/candidate_work_history/_candidate_work_histories_returns_candidate_work_histories.json +1 -0
  56. data/spec/cassettes/Bullhorn_Rest_Entities/category/_categories_returns_categories.json +1 -0
  57. data/spec/cassettes/Bullhorn_Rest_Entities/client_contact/_client_contacts_returns_client_contacts.json +1 -0
  58. data/spec/cassettes/Bullhorn_Rest_Entities/client_contact/_department_client_contacts_returns_client_contacts.json +1 -0
  59. data/spec/cassettes/Bullhorn_Rest_Entities/client_contact/_user_client_contacts_returns_client_contacts.json +1 -0
  60. data/spec/cassettes/Bullhorn_Rest_Entities/client_corporation/_client_corporations_returns_client_corporations.json +1 -0
  61. data/spec/cassettes/Bullhorn_Rest_Entities/client_corporation/_department_client_corporations_returns_client_corporations.json +1 -0
  62. data/spec/cassettes/Bullhorn_Rest_Entities/client_corporation/_user_client_corporations_returns_client_corporations.json +1 -0
  63. data/spec/cassettes/Bullhorn_Rest_Entities/corporate_user/_corporate_users_returns_corporate_users.json +1 -0
  64. data/spec/cassettes/Bullhorn_Rest_Entities/corporation_department/_corporation_departments_returns_corporation_departments.json +1 -0
  65. data/spec/cassettes/Bullhorn_Rest_Entities/country/_countries_returns_countries.json +1 -0
  66. data/spec/cassettes/Bullhorn_Rest_Entities/custom_action/_custom_actions_returns_custom_actions.json +1 -0
  67. data/spec/cassettes/Bullhorn_Rest_Entities/job_order/_department_job_orders_returns_job_orders.json +1 -0
  68. data/spec/cassettes/Bullhorn_Rest_Entities/job_order/_job_orders_returns_job_orders.json +1 -0
  69. data/spec/cassettes/Bullhorn_Rest_Entities/job_order/_user_job_orders_returns_job_orders.json +1 -0
  70. data/spec/cassettes/Bullhorn_Rest_Entities/job_submission/_job_submissions_returns_job_submissions.json +1 -0
  71. data/spec/cassettes/Bullhorn_Rest_Entities/note/_department_notes_returns_notes.json +1 -0
  72. data/spec/cassettes/Bullhorn_Rest_Entities/note/_notes_returns_notes.json +1 -0
  73. data/spec/cassettes/Bullhorn_Rest_Entities/note/_user_notes_returns_notes.json +1 -0
  74. data/spec/cassettes/Bullhorn_Rest_Entities/note_entity/_note_entities_returns_note_entities.json +1 -0
  75. data/spec/cassettes/Bullhorn_Rest_Entities/placement/_department_placements_returns_placements.json +1 -0
  76. data/spec/cassettes/Bullhorn_Rest_Entities/placement/_placements_returns_placements.json +1 -0
  77. data/spec/cassettes/Bullhorn_Rest_Entities/placement/_user_placements_returns_placements.json +1 -0
  78. data/spec/cassettes/Bullhorn_Rest_Entities/placement_change_request/_placement_change_requests_returns_placement_change_requests.json +1 -0
  79. data/spec/cassettes/Bullhorn_Rest_Entities/placement_commission/_placement_commissions_returns_placement_commissions.json +1 -0
  80. data/spec/cassettes/Bullhorn_Rest_Entities/sendout/_sendouts_returns_sendouts.json +1 -0
  81. data/spec/cassettes/Bullhorn_Rest_Entities/skill/_skills_returns_skills.json +1 -0
  82. data/spec/cassettes/Bullhorn_Rest_Entities/specialty/_specialties_returns_specialties.json +1 -0
  83. data/spec/cassettes/Bullhorn_Rest_Entities/state/_states_returns_states.json +1 -0
  84. data/spec/cassettes/Bullhorn_Rest_Entities/task/_tasks_returns_tasks.json +1 -0
  85. data/spec/cassettes/Bullhorn_Rest_Entities/tearsheet/_tearsheets_returns_tearsheets.json +1 -0
  86. data/spec/cassettes/Bullhorn_Rest_Entities/tearsheet_recipient/_tearsheet_recipients_returns_tearsheet_recipients.json +1 -0
  87. data/spec/cassettes/Bullhorn_Rest_Entities/time_unit/_time_units_returns_time_units.json +1 -0
  88. data/spec/spec_helper.rb +74 -0
  89. metadata +247 -0
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module BusinessSector
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module Candidate
6
+ extend Base
7
+
8
+ define_methods(:owner_methods => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module CandidateCertification
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module CandidateEducation
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module CandidateReference
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module CandidateWorkHistory
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module Category
6
+ extend Base
7
+
8
+ define_methods(:immutable => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module ClientContact
6
+ extend Base
7
+
8
+ define_methods(:owner_methods => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module ClientCorporation
6
+ extend Base
7
+
8
+ define_methods(:owner_methods => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module CorporateUser
6
+ extend Base
7
+
8
+ define_methods(:immutable => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module CorporationDepartment
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module Country
6
+ extend Base
7
+
8
+ define_methods(:immutable => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module CustomAction
6
+ extend Base
7
+
8
+ define_methods(:immutable => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module JobOrder
6
+ extend Base
7
+
8
+ define_methods(:owner_methods => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module JobSubmission
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module Note
6
+ extend Base
7
+
8
+ define_methods(:owner_methods => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module NoteEntity
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module Placement
6
+ extend Base
7
+
8
+ define_methods(:owner_methods => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module PlacementChangeRequest
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module PlacementCommission
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module Sendout
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module Skill
6
+ extend Base
7
+
8
+ define_methods(:immutable => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module Specialty
6
+ extend Base
7
+
8
+ define_methods(:immutable => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module State
6
+ extend Base
7
+
8
+ define_methods(:immutable => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module Task
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module Tearsheet
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module TearsheetRecipient
6
+ extend Base
7
+
8
+ define_methods
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Bullhorn
2
+ module Rest
3
+ module Entities
4
+
5
+ module TimeUnit
6
+ extend Base
7
+
8
+ define_methods(:immutable => true)
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ module Bullhorn
2
+ module Rest
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+
3
+ describe Bullhorn::Rest::Client, :vcr do
4
+
5
+ let(:options) {{}}
6
+ let(:client) { Bullhorn::Rest::Client.new({client_id: test_bh_client_id, client_secret: test_bh_client_secret}.merge(options)) }
7
+
8
+ describe 'authentication' do
9
+
10
+ context 'when username and password set' do
11
+
12
+ let(:options) {{username: test_bh_username, password: test_bh_password}}
13
+
14
+ it 'authenticates' do
15
+
16
+ expect(client.auth_code).to be_nil
17
+ expect(client.access_token).to be_nil
18
+ expect(client.rest_token).to be_nil
19
+
20
+ client.authenticate
21
+
22
+ expect(client.auth_code).to_not be_nil
23
+ expect(client.access_token).to_not be_nil
24
+ expect(client.rest_token).to_not be_nil
25
+
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+
32
+ end