merge_ruby_client 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/lib/merge_ruby_client/accounting/types/credit_note_line_item.rb +4 -4
  3. data/lib/merge_ruby_client/accounting/types/purchase_order_line_item.rb +4 -4
  4. data/lib/merge_ruby_client/accounting/types/purchase_order_line_item_request.rb +4 -4
  5. data/lib/merge_ruby_client/accounting/types/transaction_line_item.rb +4 -4
  6. data/lib/merge_ruby_client/accounting/types/vendor_credit_line.rb +4 -4
  7. data/lib/merge_ruby_client/ats/applications/client.rb +2 -0
  8. data/lib/merge_ruby_client/ats/applications/types/applications_list_request_expand.rb +192 -0
  9. data/lib/merge_ruby_client/ats/applications/types/applications_retrieve_request_expand.rb +192 -0
  10. data/lib/merge_ruby_client/ats/audit_trail/client.rb +4 -2
  11. data/lib/merge_ruby_client/ats/issues/client.rb +10 -4
  12. data/lib/merge_ruby_client/ats/link_token/client.rb +10 -2
  13. data/lib/merge_ruby_client/ats/types/account_integration.rb +16 -2
  14. data/lib/merge_ruby_client/ats/types/activity.rb +2 -2
  15. data/lib/merge_ruby_client/ats/types/activity_request.rb +2 -2
  16. data/lib/merge_ruby_client/ats/types/application.rb +13 -1
  17. data/lib/merge_ruby_client/ats/types/application_request.rb +13 -1
  18. data/lib/merge_ruby_client/ats/types/application_request_screening_question_answers_item.rb +56 -0
  19. data/lib/merge_ruby_client/ats/types/application_screening_question_answers_item.rb +56 -0
  20. data/lib/merge_ruby_client/ats/types/audit_log_event.rb +2 -0
  21. data/lib/merge_ruby_client/ats/types/email_address.rb +12 -2
  22. data/lib/merge_ruby_client/ats/types/event_type_enum.rb +2 -0
  23. data/lib/merge_ruby_client/ats/types/phone_number.rb +12 -2
  24. data/lib/merge_ruby_client/ats/types/remote_field_api.rb +3 -3
  25. data/lib/merge_ruby_client/ats/types/screening_question.rb +12 -2
  26. data/lib/merge_ruby_client/ats/types/screening_question_answer.rb +132 -0
  27. data/lib/merge_ruby_client/ats/types/screening_question_answer_question.rb +58 -0
  28. data/lib/merge_ruby_client/ats/types/screening_question_answer_request.rb +113 -0
  29. data/lib/merge_ruby_client/ats/types/screening_question_answer_request_question.rb +59 -0
  30. data/lib/merge_ruby_client/ats/types/screening_question_option.rb +12 -2
  31. data/lib/merge_ruby_client/ats/types/url.rb +13 -2
  32. data/lib/merge_ruby_client/crm/accounts/client.rb +8 -2
  33. data/lib/merge_ruby_client/crm/audit_trail/client.rb +4 -2
  34. data/lib/merge_ruby_client/crm/contacts/client.rb +8 -2
  35. data/lib/merge_ruby_client/crm/custom_objects/client.rb +99 -0
  36. data/lib/merge_ruby_client/crm/engagement_types/client.rb +8 -2
  37. data/lib/merge_ruby_client/crm/engagements/client.rb +8 -2
  38. data/lib/merge_ruby_client/crm/issues/client.rb +10 -4
  39. data/lib/merge_ruby_client/crm/leads/client.rb +8 -2
  40. data/lib/merge_ruby_client/crm/link_token/client.rb +10 -2
  41. data/lib/merge_ruby_client/crm/notes/client.rb +8 -2
  42. data/lib/merge_ruby_client/crm/opportunities/client.rb +16 -4
  43. data/lib/merge_ruby_client/crm/stages/client.rb +8 -2
  44. data/lib/merge_ruby_client/crm/tasks/client.rb +8 -2
  45. data/lib/merge_ruby_client/crm/types/account_integration.rb +16 -2
  46. data/lib/merge_ruby_client/crm/types/association.rb +6 -6
  47. data/lib/merge_ruby_client/crm/types/audit_log_event.rb +2 -0
  48. data/lib/merge_ruby_client/crm/types/event_type_enum.rb +2 -0
  49. data/lib/merge_ruby_client/crm/types/remote_field.rb +3 -3
  50. data/lib/merge_ruby_client/crm/types/remote_field_api.rb +3 -3
  51. data/lib/merge_ruby_client/crm/types/remote_field_request.rb +3 -3
  52. data/lib/merge_ruby_client/crm/users/client.rb +8 -2
  53. data/lib/merge_ruby_client/filestorage/audit_trail/client.rb +4 -2
  54. data/lib/merge_ruby_client/filestorage/files/client.rb +2 -2
  55. data/lib/merge_ruby_client/filestorage/issues/client.rb +10 -4
  56. data/lib/merge_ruby_client/filestorage/link_token/client.rb +10 -2
  57. data/lib/merge_ruby_client/filestorage/linked_accounts/client.rb +2 -4
  58. data/lib/merge_ruby_client/filestorage/types/account_integration.rb +16 -2
  59. data/lib/merge_ruby_client/filestorage/types/audit_log_event.rb +2 -0
  60. data/lib/merge_ruby_client/filestorage/types/event_type_enum.rb +2 -0
  61. data/lib/merge_ruby_client/filestorage/types/group.rb +1 -1
  62. data/lib/merge_ruby_client/filestorage/types/remote_field_api.rb +3 -3
  63. data/lib/merge_ruby_client/hris/audit_trail/client.rb +4 -2
  64. data/lib/merge_ruby_client/hris/bank_info/client.rb +4 -2
  65. data/lib/merge_ruby_client/hris/employments/client.rb +4 -2
  66. data/lib/merge_ruby_client/hris/issues/client.rb +10 -4
  67. data/lib/merge_ruby_client/hris/link_token/client.rb +10 -2
  68. data/lib/merge_ruby_client/hris/linked_accounts/client.rb +2 -4
  69. data/lib/merge_ruby_client/hris/timesheet_entries/client.rb +10 -12
  70. data/lib/merge_ruby_client/hris/types/account_integration.rb +16 -2
  71. data/lib/merge_ruby_client/hris/types/audit_log_event.rb +2 -0
  72. data/lib/merge_ruby_client/hris/types/event_type_enum.rb +2 -0
  73. data/lib/merge_ruby_client/hris/types/remote_field_api.rb +3 -3
  74. data/lib/merge_ruby_client/ticketing/attachments/client.rb +2 -2
  75. data/lib/merge_ruby_client/ticketing/audit_trail/client.rb +4 -2
  76. data/lib/merge_ruby_client/ticketing/issues/client.rb +10 -4
  77. data/lib/merge_ruby_client/ticketing/link_token/client.rb +10 -2
  78. data/lib/merge_ruby_client/ticketing/linked_accounts/client.rb +2 -4
  79. data/lib/merge_ruby_client/ticketing/tickets/client.rb +20 -8
  80. data/lib/merge_ruby_client/ticketing/types/account_integration.rb +16 -2
  81. data/lib/merge_ruby_client/ticketing/types/audit_log_event.rb +2 -0
  82. data/lib/merge_ruby_client/ticketing/types/event_type_enum.rb +2 -0
  83. data/lib/merge_ruby_client/ticketing/types/remote_field_api.rb +3 -3
  84. data/lib/merge_ruby_client/ticketing/types/tag.rb +10 -2
  85. data/lib/merge_ruby_client.rb +7 -7
  86. data/lib/requests.rb +2 -2
  87. data/lib/types_export.rb +112 -106
  88. metadata +8 -2
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+ require_relative "screening_question_answer_request"
5
+
6
+ module Merge
7
+ module Ats
8
+ class ApplicationRequestScreeningQuestionAnswersItem
9
+ # Deserialize a JSON object to an instance of
10
+ # ApplicationRequestScreeningQuestionAnswersItem
11
+ #
12
+ # @param json_object [String]
13
+ # @return [Merge::Ats::ApplicationRequestScreeningQuestionAnswersItem]
14
+ def self.from_json(json_object:)
15
+ struct = JSON.parse(json_object, object_class: OpenStruct)
16
+ begin
17
+ struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
18
+ return struct unless struct.nil?
19
+
20
+ return nil
21
+ rescue StandardError
22
+ # noop
23
+ end
24
+ begin
25
+ Merge::Ats::ScreeningQuestionAnswerRequest.validate_raw(obj: struct)
26
+ return Merge::Ats::ScreeningQuestionAnswerRequest.from_json(json_object: struct) unless struct.nil?
27
+
28
+ return nil
29
+ rescue StandardError
30
+ # noop
31
+ end
32
+ struct
33
+ end
34
+
35
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
36
+ # hash and check each fields type against the current object's property
37
+ # definitions.
38
+ #
39
+ # @param obj [Object]
40
+ # @return [Void]
41
+ def self.validate_raw(obj:)
42
+ begin
43
+ return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
44
+ rescue StandardError
45
+ # noop
46
+ end
47
+ begin
48
+ return Merge::Ats::ScreeningQuestionAnswerRequest.validate_raw(obj: obj)
49
+ rescue StandardError
50
+ # noop
51
+ end
52
+ raise("Passed value matched no type within the union, validation failed.")
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+ require_relative "screening_question_answer"
5
+
6
+ module Merge
7
+ module Ats
8
+ class ApplicationScreeningQuestionAnswersItem
9
+ # Deserialize a JSON object to an instance of
10
+ # ApplicationScreeningQuestionAnswersItem
11
+ #
12
+ # @param json_object [String]
13
+ # @return [Merge::Ats::ApplicationScreeningQuestionAnswersItem]
14
+ def self.from_json(json_object:)
15
+ struct = JSON.parse(json_object, object_class: OpenStruct)
16
+ begin
17
+ struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
18
+ return struct unless struct.nil?
19
+
20
+ return nil
21
+ rescue StandardError
22
+ # noop
23
+ end
24
+ begin
25
+ Merge::Ats::ScreeningQuestionAnswer.validate_raw(obj: struct)
26
+ return Merge::Ats::ScreeningQuestionAnswer.from_json(json_object: struct) unless struct.nil?
27
+
28
+ return nil
29
+ rescue StandardError
30
+ # noop
31
+ end
32
+ struct
33
+ end
34
+
35
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
36
+ # hash and check each fields type against the current object's property
37
+ # definitions.
38
+ #
39
+ # @param obj [Object]
40
+ # @return [Void]
41
+ def self.validate_raw(obj:)
42
+ begin
43
+ return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
44
+ rescue StandardError
45
+ # noop
46
+ end
47
+ begin
48
+ return Merge::Ats::ScreeningQuestionAnswer.validate_raw(obj: obj)
49
+ rescue StandardError
50
+ # noop
51
+ end
52
+ raise("Passed value matched no type within the union, validation failed.")
53
+ end
54
+ end
55
+ end
56
+ end
@@ -71,6 +71,7 @@ module Merge
71
71
  # - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
72
72
  # - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
73
73
  # - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
74
+ # - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED
74
75
  attr_reader :event_type
75
76
  # @return [String]
76
77
  attr_reader :event_description
@@ -141,6 +142,7 @@ module Merge
141
142
  # - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
142
143
  # - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
143
144
  # - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
145
+ # - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED
144
146
  # @param event_description [String]
145
147
  # @param created_at [DateTime]
146
148
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
@@ -24,6 +24,9 @@ module Merge
24
24
  # - `WORK` - WORK
25
25
  # - `OTHER` - OTHER
26
26
  attr_reader :email_address_type
27
+ # @return [Boolean] Indicates whether or not this object has been deleted in the third party
28
+ # platform.
29
+ attr_reader :remote_was_deleted
27
30
  # @return [OpenStruct] Additional properties unmapped to the current class definition
28
31
  attr_reader :additional_properties
29
32
  # @return [Object]
@@ -39,20 +42,24 @@ module Merge
39
42
  # - `PERSONAL` - PERSONAL
40
43
  # - `WORK` - WORK
41
44
  # - `OTHER` - OTHER
45
+ # @param remote_was_deleted [Boolean] Indicates whether or not this object has been deleted in the third party
46
+ # platform.
42
47
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
43
48
  # @return [Merge::Ats::EmailAddress]
44
49
  def initialize(created_at: OMIT, modified_at: OMIT, value: OMIT, email_address_type: OMIT,
45
- additional_properties: nil)
50
+ remote_was_deleted: OMIT, additional_properties: nil)
46
51
  @created_at = created_at if created_at != OMIT
47
52
  @modified_at = modified_at if modified_at != OMIT
48
53
  @value = value if value != OMIT
49
54
  @email_address_type = email_address_type if email_address_type != OMIT
55
+ @remote_was_deleted = remote_was_deleted if remote_was_deleted != OMIT
50
56
  @additional_properties = additional_properties
51
57
  @_field_set = {
52
58
  "created_at": created_at,
53
59
  "modified_at": modified_at,
54
60
  "value": value,
55
- "email_address_type": email_address_type
61
+ "email_address_type": email_address_type,
62
+ "remote_was_deleted": remote_was_deleted
56
63
  }.reject do |_k, v|
57
64
  v == OMIT
58
65
  end
@@ -69,11 +76,13 @@ module Merge
69
76
  modified_at = (DateTime.parse(parsed_json["modified_at"]) unless parsed_json["modified_at"].nil?)
70
77
  value = parsed_json["value"]
71
78
  email_address_type = parsed_json["email_address_type"]
79
+ remote_was_deleted = parsed_json["remote_was_deleted"]
72
80
  new(
73
81
  created_at: created_at,
74
82
  modified_at: modified_at,
75
83
  value: value,
76
84
  email_address_type: email_address_type,
85
+ remote_was_deleted: remote_was_deleted,
77
86
  additional_properties: struct
78
87
  )
79
88
  end
@@ -96,6 +105,7 @@ module Merge
96
105
  obj.modified_at&.is_a?(DateTime) != false || raise("Passed value for field obj.modified_at is not the expected type, validation failed.")
97
106
  obj.value&.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
98
107
  obj.email_address_type&.is_a?(Merge::Ats::EmailAddressTypeEnum) != false || raise("Passed value for field obj.email_address_type is not the expected type, validation failed.")
108
+ obj.remote_was_deleted&.is_a?(Boolean) != false || raise("Passed value for field obj.remote_was_deleted is not the expected type, validation failed.")
99
109
  end
100
110
  end
101
111
  end
@@ -46,6 +46,7 @@ module Merge
46
46
  # - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
47
47
  # - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
48
48
  # - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
49
+ # - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED
49
50
  class EventTypeEnum
50
51
  CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY"
51
52
  DELETED_REMOTE_PRODUCTION_API_KEY = "DELETED_REMOTE_PRODUCTION_API_KEY"
@@ -84,6 +85,7 @@ module Merge
84
85
  ENABLED_MERGE_WEBHOOK = "ENABLED_MERGE_WEBHOOK"
85
86
  DISABLED_MERGE_WEBHOOK = "DISABLED_MERGE_WEBHOOK"
86
87
  MERGE_WEBHOOK_TARGET_CHANGED = "MERGE_WEBHOOK_TARGET_CHANGED"
88
+ END_USER_CREDENTIALS_ACCESSED = "END_USER_CREDENTIALS_ACCESSED"
87
89
  end
88
90
  end
89
91
  end
@@ -26,6 +26,9 @@ module Merge
26
26
  # - `SKYPE` - SKYPE
27
27
  # - `OTHER` - OTHER
28
28
  attr_reader :phone_number_type
29
+ # @return [Boolean] Indicates whether or not this object has been deleted in the third party
30
+ # platform.
31
+ attr_reader :remote_was_deleted
29
32
  # @return [OpenStruct] Additional properties unmapped to the current class definition
30
33
  attr_reader :additional_properties
31
34
  # @return [Object]
@@ -43,20 +46,24 @@ module Merge
43
46
  # - `MOBILE` - MOBILE
44
47
  # - `SKYPE` - SKYPE
45
48
  # - `OTHER` - OTHER
49
+ # @param remote_was_deleted [Boolean] Indicates whether or not this object has been deleted in the third party
50
+ # platform.
46
51
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
47
52
  # @return [Merge::Ats::PhoneNumber]
48
53
  def initialize(created_at: OMIT, modified_at: OMIT, value: OMIT, phone_number_type: OMIT,
49
- additional_properties: nil)
54
+ remote_was_deleted: OMIT, additional_properties: nil)
50
55
  @created_at = created_at if created_at != OMIT
51
56
  @modified_at = modified_at if modified_at != OMIT
52
57
  @value = value if value != OMIT
53
58
  @phone_number_type = phone_number_type if phone_number_type != OMIT
59
+ @remote_was_deleted = remote_was_deleted if remote_was_deleted != OMIT
54
60
  @additional_properties = additional_properties
55
61
  @_field_set = {
56
62
  "created_at": created_at,
57
63
  "modified_at": modified_at,
58
64
  "value": value,
59
- "phone_number_type": phone_number_type
65
+ "phone_number_type": phone_number_type,
66
+ "remote_was_deleted": remote_was_deleted
60
67
  }.reject do |_k, v|
61
68
  v == OMIT
62
69
  end
@@ -73,11 +80,13 @@ module Merge
73
80
  modified_at = (DateTime.parse(parsed_json["modified_at"]) unless parsed_json["modified_at"].nil?)
74
81
  value = parsed_json["value"]
75
82
  phone_number_type = parsed_json["phone_number_type"]
83
+ remote_was_deleted = parsed_json["remote_was_deleted"]
76
84
  new(
77
85
  created_at: created_at,
78
86
  modified_at: modified_at,
79
87
  value: value,
80
88
  phone_number_type: phone_number_type,
89
+ remote_was_deleted: remote_was_deleted,
81
90
  additional_properties: struct
82
91
  )
83
92
  end
@@ -100,6 +109,7 @@ module Merge
100
109
  obj.modified_at&.is_a?(DateTime) != false || raise("Passed value for field obj.modified_at is not the expected type, validation failed.")
101
110
  obj.value&.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
102
111
  obj.phone_number_type&.is_a?(Merge::Ats::PhoneNumberTypeEnum) != false || raise("Passed value for field obj.phone_number_type is not the expected type, validation failed.")
112
+ obj.remote_was_deleted&.is_a?(Boolean) != false || raise("Passed value for field obj.remote_was_deleted is not the expected type, validation failed.")
103
113
  end
104
114
  end
105
115
  end
@@ -37,12 +37,12 @@ module Merge
37
37
  # @param coverage [Merge::Ats::RemoteFieldApiCoverage]
38
38
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
39
  # @return [Merge::Ats::RemoteFieldApi]
40
- def initialize(schema:, remote_key_name:, remote_endpoint_info:, example_values:, advanced_metadata: OMIT,
40
+ def initialize(schema:, remote_key_name:, remote_endpoint_info:, example_values: OMIT, advanced_metadata: OMIT,
41
41
  coverage: OMIT, additional_properties: nil)
42
42
  @schema = schema
43
43
  @remote_key_name = remote_key_name
44
44
  @remote_endpoint_info = remote_endpoint_info
45
- @example_values = example_values
45
+ @example_values = example_values if example_values != OMIT
46
46
  @advanced_metadata = advanced_metadata if advanced_metadata != OMIT
47
47
  @coverage = coverage if coverage != OMIT
48
48
  @additional_properties = additional_properties
@@ -114,7 +114,7 @@ module Merge
114
114
  obj.schema.is_a?(Hash) != false || raise("Passed value for field obj.schema is not the expected type, validation failed.")
115
115
  obj.remote_key_name.is_a?(String) != false || raise("Passed value for field obj.remote_key_name is not the expected type, validation failed.")
116
116
  Merge::Ats::RemoteEndpointInfo.validate_raw(obj: obj.remote_endpoint_info)
117
- obj.example_values.is_a?(Array) != false || raise("Passed value for field obj.example_values is not the expected type, validation failed.")
117
+ obj.example_values&.is_a?(Array) != false || raise("Passed value for field obj.example_values is not the expected type, validation failed.")
118
118
  obj.advanced_metadata.nil? || Merge::Ats::AdvancedMetadata.validate_raw(obj: obj.advanced_metadata)
119
119
  obj.coverage.nil? || Merge::Ats::RemoteFieldApiCoverage.validate_raw(obj: obj.coverage)
120
120
  end
@@ -43,6 +43,9 @@ module Merge
43
43
  attr_reader :required
44
44
  # @return [Array<Object>]
45
45
  attr_reader :options
46
+ # @return [Boolean] Indicates whether or not this object has been deleted in the third party
47
+ # platform.
48
+ attr_reader :remote_was_deleted
46
49
  # @return [OpenStruct] Additional properties unmapped to the current class definition
47
50
  attr_reader :additional_properties
48
51
  # @return [Object]
@@ -69,10 +72,12 @@ module Merge
69
72
  # - `BOOLEAN` - BOOLEAN
70
73
  # @param required [Boolean] Whether or not the screening question is required.
71
74
  # @param options [Array<Object>]
75
+ # @param remote_was_deleted [Boolean] Indicates whether or not this object has been deleted in the third party
76
+ # platform.
72
77
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
73
78
  # @return [Merge::Ats::ScreeningQuestion]
74
79
  def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, job: OMIT, description: OMIT,
75
- title: OMIT, type: OMIT, required: OMIT, options: OMIT, additional_properties: nil)
80
+ title: OMIT, type: OMIT, required: OMIT, options: OMIT, remote_was_deleted: OMIT, additional_properties: nil)
76
81
  @id = id if id != OMIT
77
82
  @remote_id = remote_id if remote_id != OMIT
78
83
  @created_at = created_at if created_at != OMIT
@@ -83,6 +88,7 @@ module Merge
83
88
  @type = type if type != OMIT
84
89
  @required = required if required != OMIT
85
90
  @options = options if options != OMIT
91
+ @remote_was_deleted = remote_was_deleted if remote_was_deleted != OMIT
86
92
  @additional_properties = additional_properties
87
93
  @_field_set = {
88
94
  "id": id,
@@ -94,7 +100,8 @@ module Merge
94
100
  "title": title,
95
101
  "type": type,
96
102
  "required": required,
97
- "options": options
103
+ "options": options,
104
+ "remote_was_deleted": remote_was_deleted
98
105
  }.reject do |_k, v|
99
106
  v == OMIT
100
107
  end
@@ -122,6 +129,7 @@ module Merge
122
129
  type = parsed_json["type"]
123
130
  required = parsed_json["required"]
124
131
  options = parsed_json["options"]
132
+ remote_was_deleted = parsed_json["remote_was_deleted"]
125
133
  new(
126
134
  id: id,
127
135
  remote_id: remote_id,
@@ -133,6 +141,7 @@ module Merge
133
141
  type: type,
134
142
  required: required,
135
143
  options: options,
144
+ remote_was_deleted: remote_was_deleted,
136
145
  additional_properties: struct
137
146
  )
138
147
  end
@@ -161,6 +170,7 @@ module Merge
161
170
  obj.type&.is_a?(Merge::Ats::ScreeningQuestionTypeEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
162
171
  obj.required&.is_a?(Boolean) != false || raise("Passed value for field obj.required is not the expected type, validation failed.")
163
172
  obj.options&.is_a?(Array) != false || raise("Passed value for field obj.options is not the expected type, validation failed.")
173
+ obj.remote_was_deleted&.is_a?(Boolean) != false || raise("Passed value for field obj.remote_was_deleted is not the expected type, validation failed.")
164
174
  end
165
175
  end
166
176
  end
@@ -0,0 +1,132 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "date"
4
+ require_relative "screening_question_answer_question"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module Merge
9
+ module Ats
10
+ # # The ScreeningQuestionAnswer Object
11
+ # ### Description
12
+ # The `ScreeningQuestionAnswer` object is used to represent candidate responses to
13
+ # a screening question, for a specific application.
14
+ # ### Usage Example
15
+ # TODO
16
+ class ScreeningQuestionAnswer
17
+ # @return [String]
18
+ attr_reader :id
19
+ # @return [String] The third-party API ID of the matching object.
20
+ attr_reader :remote_id
21
+ # @return [DateTime] The datetime that this object was created by Merge.
22
+ attr_reader :created_at
23
+ # @return [DateTime] The datetime that this object was modified by Merge.
24
+ attr_reader :modified_at
25
+ # @return [Merge::Ats::ScreeningQuestionAnswerQuestion] The screening question associated with the candidate’s answer. To determine the
26
+ # data type of the answer, you can expand on the screening question by adding
27
+ # `screening_question_answers.question` to the `expand` query parameter.
28
+ attr_reader :question
29
+ # @return [String] The candidate’s response to the screening question.
30
+ attr_reader :answer
31
+ # @return [Boolean] Indicates whether or not this object has been deleted in the third party
32
+ # platform.
33
+ attr_reader :remote_was_deleted
34
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
35
+ attr_reader :additional_properties
36
+ # @return [Object]
37
+ attr_reader :_field_set
38
+ protected :_field_set
39
+
40
+ OMIT = Object.new
41
+
42
+ # @param id [String]
43
+ # @param remote_id [String] The third-party API ID of the matching object.
44
+ # @param created_at [DateTime] The datetime that this object was created by Merge.
45
+ # @param modified_at [DateTime] The datetime that this object was modified by Merge.
46
+ # @param question [Merge::Ats::ScreeningQuestionAnswerQuestion] The screening question associated with the candidate’s answer. To determine the
47
+ # data type of the answer, you can expand on the screening question by adding
48
+ # `screening_question_answers.question` to the `expand` query parameter.
49
+ # @param answer [String] The candidate’s response to the screening question.
50
+ # @param remote_was_deleted [Boolean] Indicates whether or not this object has been deleted in the third party
51
+ # platform.
52
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
53
+ # @return [Merge::Ats::ScreeningQuestionAnswer]
54
+ def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, question: OMIT, answer: OMIT,
55
+ remote_was_deleted: OMIT, additional_properties: nil)
56
+ @id = id if id != OMIT
57
+ @remote_id = remote_id if remote_id != OMIT
58
+ @created_at = created_at if created_at != OMIT
59
+ @modified_at = modified_at if modified_at != OMIT
60
+ @question = question if question != OMIT
61
+ @answer = answer if answer != OMIT
62
+ @remote_was_deleted = remote_was_deleted if remote_was_deleted != OMIT
63
+ @additional_properties = additional_properties
64
+ @_field_set = {
65
+ "id": id,
66
+ "remote_id": remote_id,
67
+ "created_at": created_at,
68
+ "modified_at": modified_at,
69
+ "question": question,
70
+ "answer": answer,
71
+ "remote_was_deleted": remote_was_deleted
72
+ }.reject do |_k, v|
73
+ v == OMIT
74
+ end
75
+ end
76
+
77
+ # Deserialize a JSON object to an instance of ScreeningQuestionAnswer
78
+ #
79
+ # @param json_object [String]
80
+ # @return [Merge::Ats::ScreeningQuestionAnswer]
81
+ def self.from_json(json_object:)
82
+ struct = JSON.parse(json_object, object_class: OpenStruct)
83
+ parsed_json = JSON.parse(json_object)
84
+ id = parsed_json["id"]
85
+ remote_id = parsed_json["remote_id"]
86
+ created_at = (DateTime.parse(parsed_json["created_at"]) unless parsed_json["created_at"].nil?)
87
+ modified_at = (DateTime.parse(parsed_json["modified_at"]) unless parsed_json["modified_at"].nil?)
88
+ if parsed_json["question"].nil?
89
+ question = nil
90
+ else
91
+ question = parsed_json["question"].to_json
92
+ question = Merge::Ats::ScreeningQuestionAnswerQuestion.from_json(json_object: question)
93
+ end
94
+ answer = parsed_json["answer"]
95
+ remote_was_deleted = parsed_json["remote_was_deleted"]
96
+ new(
97
+ id: id,
98
+ remote_id: remote_id,
99
+ created_at: created_at,
100
+ modified_at: modified_at,
101
+ question: question,
102
+ answer: answer,
103
+ remote_was_deleted: remote_was_deleted,
104
+ additional_properties: struct
105
+ )
106
+ end
107
+
108
+ # Serialize an instance of ScreeningQuestionAnswer to a JSON object
109
+ #
110
+ # @return [String]
111
+ def to_json(*_args)
112
+ @_field_set&.to_json
113
+ end
114
+
115
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
116
+ # hash and check each fields type against the current object's property
117
+ # definitions.
118
+ #
119
+ # @param obj [Object]
120
+ # @return [Void]
121
+ def self.validate_raw(obj:)
122
+ obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
123
+ obj.remote_id&.is_a?(String) != false || raise("Passed value for field obj.remote_id is not the expected type, validation failed.")
124
+ obj.created_at&.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
125
+ obj.modified_at&.is_a?(DateTime) != false || raise("Passed value for field obj.modified_at is not the expected type, validation failed.")
126
+ obj.question.nil? || Merge::Ats::ScreeningQuestionAnswerQuestion.validate_raw(obj: obj.question)
127
+ obj.answer&.is_a?(String) != false || raise("Passed value for field obj.answer is not the expected type, validation failed.")
128
+ obj.remote_was_deleted&.is_a?(Boolean) != false || raise("Passed value for field obj.remote_was_deleted is not the expected type, validation failed.")
129
+ end
130
+ end
131
+ end
132
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+ require_relative "screening_question"
5
+
6
+ module Merge
7
+ module Ats
8
+ # The screening question associated with the candidate’s answer. To determine the
9
+ # data type of the answer, you can expand on the screening question by adding
10
+ # `screening_question_answers.question` to the `expand` query parameter.
11
+ class ScreeningQuestionAnswerQuestion
12
+ # Deserialize a JSON object to an instance of ScreeningQuestionAnswerQuestion
13
+ #
14
+ # @param json_object [String]
15
+ # @return [Merge::Ats::ScreeningQuestionAnswerQuestion]
16
+ def self.from_json(json_object:)
17
+ struct = JSON.parse(json_object, object_class: OpenStruct)
18
+ begin
19
+ struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
20
+ return struct unless struct.nil?
21
+
22
+ return nil
23
+ rescue StandardError
24
+ # noop
25
+ end
26
+ begin
27
+ Merge::Ats::ScreeningQuestion.validate_raw(obj: struct)
28
+ return Merge::Ats::ScreeningQuestion.from_json(json_object: struct) unless struct.nil?
29
+
30
+ return nil
31
+ rescue StandardError
32
+ # noop
33
+ end
34
+ struct
35
+ end
36
+
37
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
38
+ # hash and check each fields type against the current object's property
39
+ # definitions.
40
+ #
41
+ # @param obj [Object]
42
+ # @return [Void]
43
+ def self.validate_raw(obj:)
44
+ begin
45
+ return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
46
+ rescue StandardError
47
+ # noop
48
+ end
49
+ begin
50
+ return Merge::Ats::ScreeningQuestion.validate_raw(obj: obj)
51
+ rescue StandardError
52
+ # noop
53
+ end
54
+ raise("Passed value matched no type within the union, validation failed.")
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,113 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "screening_question_answer_request_question"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Merge
8
+ module Ats
9
+ # # The ScreeningQuestionAnswer Object
10
+ # ### Description
11
+ # The `ScreeningQuestionAnswer` object is used to represent candidate responses to
12
+ # a screening question, for a specific application.
13
+ # ### Usage Example
14
+ # TODO
15
+ class ScreeningQuestionAnswerRequest
16
+ # @return [String] The third-party API ID of the matching object.
17
+ attr_reader :remote_id
18
+ # @return [Merge::Ats::ScreeningQuestionAnswerRequestQuestion] The screening question associated with the candidate’s answer. To determine the
19
+ # data type of the answer, you can expand on the screening question by adding
20
+ # `screening_question_answers.question` to the `expand` query parameter.
21
+ attr_reader :question
22
+ # @return [String] The candidate’s response to the screening question.
23
+ attr_reader :answer
24
+ # @return [Hash{String => Object}]
25
+ attr_reader :integration_params
26
+ # @return [Hash{String => Object}]
27
+ attr_reader :linked_account_params
28
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
29
+ attr_reader :additional_properties
30
+ # @return [Object]
31
+ attr_reader :_field_set
32
+ protected :_field_set
33
+
34
+ OMIT = Object.new
35
+
36
+ # @param remote_id [String] The third-party API ID of the matching object.
37
+ # @param question [Merge::Ats::ScreeningQuestionAnswerRequestQuestion] The screening question associated with the candidate’s answer. To determine the
38
+ # data type of the answer, you can expand on the screening question by adding
39
+ # `screening_question_answers.question` to the `expand` query parameter.
40
+ # @param answer [String] The candidate’s response to the screening question.
41
+ # @param integration_params [Hash{String => Object}]
42
+ # @param linked_account_params [Hash{String => Object}]
43
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
44
+ # @return [Merge::Ats::ScreeningQuestionAnswerRequest]
45
+ def initialize(remote_id: OMIT, question: OMIT, answer: OMIT, integration_params: OMIT,
46
+ linked_account_params: OMIT, additional_properties: nil)
47
+ @remote_id = remote_id if remote_id != OMIT
48
+ @question = question if question != OMIT
49
+ @answer = answer if answer != OMIT
50
+ @integration_params = integration_params if integration_params != OMIT
51
+ @linked_account_params = linked_account_params if linked_account_params != OMIT
52
+ @additional_properties = additional_properties
53
+ @_field_set = {
54
+ "remote_id": remote_id,
55
+ "question": question,
56
+ "answer": answer,
57
+ "integration_params": integration_params,
58
+ "linked_account_params": linked_account_params
59
+ }.reject do |_k, v|
60
+ v == OMIT
61
+ end
62
+ end
63
+
64
+ # Deserialize a JSON object to an instance of ScreeningQuestionAnswerRequest
65
+ #
66
+ # @param json_object [String]
67
+ # @return [Merge::Ats::ScreeningQuestionAnswerRequest]
68
+ def self.from_json(json_object:)
69
+ struct = JSON.parse(json_object, object_class: OpenStruct)
70
+ parsed_json = JSON.parse(json_object)
71
+ remote_id = parsed_json["remote_id"]
72
+ if parsed_json["question"].nil?
73
+ question = nil
74
+ else
75
+ question = parsed_json["question"].to_json
76
+ question = Merge::Ats::ScreeningQuestionAnswerRequestQuestion.from_json(json_object: question)
77
+ end
78
+ answer = parsed_json["answer"]
79
+ integration_params = parsed_json["integration_params"]
80
+ linked_account_params = parsed_json["linked_account_params"]
81
+ new(
82
+ remote_id: remote_id,
83
+ question: question,
84
+ answer: answer,
85
+ integration_params: integration_params,
86
+ linked_account_params: linked_account_params,
87
+ additional_properties: struct
88
+ )
89
+ end
90
+
91
+ # Serialize an instance of ScreeningQuestionAnswerRequest to a JSON object
92
+ #
93
+ # @return [String]
94
+ def to_json(*_args)
95
+ @_field_set&.to_json
96
+ end
97
+
98
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
99
+ # hash and check each fields type against the current object's property
100
+ # definitions.
101
+ #
102
+ # @param obj [Object]
103
+ # @return [Void]
104
+ def self.validate_raw(obj:)
105
+ obj.remote_id&.is_a?(String) != false || raise("Passed value for field obj.remote_id is not the expected type, validation failed.")
106
+ obj.question.nil? || Merge::Ats::ScreeningQuestionAnswerRequestQuestion.validate_raw(obj: obj.question)
107
+ obj.answer&.is_a?(String) != false || raise("Passed value for field obj.answer is not the expected type, validation failed.")
108
+ obj.integration_params&.is_a?(Hash) != false || raise("Passed value for field obj.integration_params is not the expected type, validation failed.")
109
+ obj.linked_account_params&.is_a?(Hash) != false || raise("Passed value for field obj.linked_account_params is not the expected type, validation failed.")
110
+ end
111
+ end
112
+ end
113
+ end