test_sdk 0.0.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 (95) hide show
  1. checksums.yaml +7 -0
  2. data/lib/core/file_utilities.rb +26 -0
  3. data/lib/environment.rb +7 -0
  4. data/lib/gemconfig.rb +14 -0
  5. data/lib/requests.rb +166 -0
  6. data/lib/test_sdk/benchmark/client.rb +1031 -0
  7. data/lib/test_sdk/company/client.rb +474 -0
  8. data/lib/test_sdk/deal/client.rb +584 -0
  9. data/lib/test_sdk/file/client.rb +692 -0
  10. data/lib/test_sdk/financials/client.rb +97 -0
  11. data/lib/test_sdk/group/client.rb +737 -0
  12. data/lib/test_sdk/macro/client.rb +422 -0
  13. data/lib/test_sdk/metadata/client.rb +95 -0
  14. data/lib/test_sdk/product/client.rb +419 -0
  15. data/lib/test_sdk/talent/client.rb +266 -0
  16. data/lib/test_sdk/types/account_manager_response.rb +74 -0
  17. data/lib/test_sdk/types/all_data_metadata_response.rb +68 -0
  18. data/lib/test_sdk/types/area.rb +74 -0
  19. data/lib/test_sdk/types/authenticate_api_key_response.rb +55 -0
  20. data/lib/test_sdk/types/available_categories_response.rb +5 -0
  21. data/lib/test_sdk/types/available_models_response.rb +69 -0
  22. data/lib/test_sdk/types/band_response.rb +83 -0
  23. data/lib/test_sdk/types/benchmark_quantile.rb +465 -0
  24. data/lib/test_sdk/types/categories_metadata_response.rb +72 -0
  25. data/lib/test_sdk/types/category_growth_rates.rb +143 -0
  26. data/lib/test_sdk/types/category_metadata.rb +79 -0
  27. data/lib/test_sdk/types/category_metadata_default_user_type.rb +8 -0
  28. data/lib/test_sdk/types/cohorts_response.rb +132 -0
  29. data/lib/test_sdk/types/column_metadata.rb +110 -0
  30. data/lib/test_sdk/types/column_mini_metadata.rb +83 -0
  31. data/lib/test_sdk/types/columns_metadata_response.rb +72 -0
  32. data/lib/test_sdk/types/company_response.rb +120 -0
  33. data/lib/test_sdk/types/concentration_endpoint_cdf_detail.rb +96 -0
  34. data/lib/test_sdk/types/concentration_endpoint_top_users_detail.rb +72 -0
  35. data/lib/test_sdk/types/concentration_response.rb +103 -0
  36. data/lib/test_sdk/types/concentration_timeseries_detail.rb +159 -0
  37. data/lib/test_sdk/types/contribution_response.rb +135 -0
  38. data/lib/test_sdk/types/create_api_key_response.rb +55 -0
  39. data/lib/test_sdk/types/create_file_for_signed_url_response.rb +127 -0
  40. data/lib/test_sdk/types/create_file_response.rb +113 -0
  41. data/lib/test_sdk/types/deal_combined_metrics_response.rb +477 -0
  42. data/lib/test_sdk/types/deal_data_availablity_response.rb +109 -0
  43. data/lib/test_sdk/types/deal_with_files_response.rb +194 -0
  44. data/lib/test_sdk/types/endpoint_seniority_count.rb +66 -0
  45. data/lib/test_sdk/types/executive_profile.rb +91 -0
  46. data/lib/test_sdk/types/executive_profile_position.rb +97 -0
  47. data/lib/test_sdk/types/file_response.rb +113 -0
  48. data/lib/test_sdk/types/file_type.rb +14 -0
  49. data/lib/test_sdk/types/financial_metrics.rb +113 -0
  50. data/lib/test_sdk/types/financials_response.rb +102 -0
  51. data/lib/test_sdk/types/frequency.rb +9 -0
  52. data/lib/test_sdk/types/function_level_growth_accounting.rb +111 -0
  53. data/lib/test_sdk/types/gcs_signed_url_response.rb +81 -0
  54. data/lib/test_sdk/types/group_response.rb +158 -0
  55. data/lib/test_sdk/types/group_user.rb +124 -0
  56. data/lib/test_sdk/types/group_with_users_response.rb +170 -0
  57. data/lib/test_sdk/types/growth_accounting_response.rb +226 -0
  58. data/lib/test_sdk/types/healthz_response.rb +55 -0
  59. data/lib/test_sdk/types/http_validation_error.rb +61 -0
  60. data/lib/test_sdk/types/income_statement_entry.rb +81 -0
  61. data/lib/test_sdk/types/model_metadata.rb +76 -0
  62. data/lib/test_sdk/types/models_metadata_response.rb +76 -0
  63. data/lib/test_sdk/types/paginated_response_company_response.rb +83 -0
  64. data/lib/test_sdk/types/paginated_response_deal_with_files_response.rb +84 -0
  65. data/lib/test_sdk/types/paginated_response_file_response.rb +83 -0
  66. data/lib/test_sdk/types/paginated_response_group_user.rb +83 -0
  67. data/lib/test_sdk/types/permission_model.rb +65 -0
  68. data/lib/test_sdk/types/priority.rb +10 -0
  69. data/lib/test_sdk/types/product_info_response.rb +65 -0
  70. data/lib/test_sdk/types/role_response.rb +95 -0
  71. data/lib/test_sdk/types/scale.rb +72 -0
  72. data/lib/test_sdk/types/scale_model.rb +80 -0
  73. data/lib/test_sdk/types/scale_models_response.rb +5 -0
  74. data/lib/test_sdk/types/scaling.rb +10 -0
  75. data/lib/test_sdk/types/status.rb +12 -0
  76. data/lib/test_sdk/types/tradeoff_model.rb +95 -0
  77. data/lib/test_sdk/types/tradeoff_models_response.rb +5 -0
  78. data/lib/test_sdk/types/unit.rb +12 -0
  79. data/lib/test_sdk/types/unit_economics_info_response.rb +55 -0
  80. data/lib/test_sdk/types/user_accounting_response.rb +168 -0
  81. data/lib/test_sdk/types/user_role_response.rb +77 -0
  82. data/lib/test_sdk/types/user_type.rb +12 -0
  83. data/lib/test_sdk/types/user_with_groups_response.rb +140 -0
  84. data/lib/test_sdk/types/user_with_permissions_response.rb +153 -0
  85. data/lib/test_sdk/types/validation_error.rb +76 -0
  86. data/lib/test_sdk/types/validation_error_loc_item.rb +52 -0
  87. data/lib/test_sdk/types/weather_components.rb +123 -0
  88. data/lib/test_sdk/types/weather_gauge.rb +76 -0
  89. data/lib/test_sdk/types/weather_market_context.rb +109 -0
  90. data/lib/test_sdk/types/weather_metadata.rb +113 -0
  91. data/lib/test_sdk/unit_economics/client.rb +124 -0
  92. data/lib/test_sdk/user/client.rb +363 -0
  93. data/lib/test_sdk.rb +190 -0
  94. data/lib/types_export.rb +77 -0
  95. metadata +251 -0
@@ -0,0 +1,194 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "status"
4
+ require_relative "priority"
5
+ require "date"
6
+ require_relative "company_response"
7
+ require_relative "file_response"
8
+ require_relative "deal_data_availablity_response"
9
+ require "ostruct"
10
+ require "json"
11
+
12
+ module NewDemoApiClient
13
+ class DealWithFilesResponse
14
+ # @return [String]
15
+ attr_reader :name
16
+ # @return [String] The name of the round
17
+ attr_reader :round_name
18
+ # @return [NewDemoApiClient::Status] The status of the deal
19
+ attr_reader :status
20
+ # @return [String] Notes about the deal
21
+ attr_reader :notes
22
+ # @return [NewDemoApiClient::Priority] The priority of the deal
23
+ attr_reader :priority
24
+ # @return [Integer] The dollar amount to be raised of the round
25
+ attr_reader :round_amount
26
+ # @return [Integer] The target post-money dollar amount of the round
27
+ attr_reader :round_target
28
+ # @return [Array<String>] The tags associated with the deal
29
+ attr_reader :tags
30
+ # @return [Integer]
31
+ attr_reader :id
32
+ # @return [DateTime]
33
+ attr_reader :created_at
34
+ # @return [DateTime]
35
+ attr_reader :updated_at
36
+ # @return [Boolean]
37
+ attr_reader :is_archived
38
+ # @return [NewDemoApiClient::CompanyResponse]
39
+ attr_reader :company
40
+ # @return [Array<NewDemoApiClient::FileResponse>]
41
+ attr_reader :files
42
+ # @return [NewDemoApiClient::DealDataAvailablityResponse]
43
+ attr_reader :data
44
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
45
+ attr_reader :additional_properties
46
+ # @return [Object]
47
+ attr_reader :_field_set
48
+ protected :_field_set
49
+
50
+ OMIT = Object.new
51
+
52
+ # @param name [String]
53
+ # @param round_name [String] The name of the round
54
+ # @param status [NewDemoApiClient::Status] The status of the deal
55
+ # @param notes [String] Notes about the deal
56
+ # @param priority [NewDemoApiClient::Priority] The priority of the deal
57
+ # @param round_amount [Integer] The dollar amount to be raised of the round
58
+ # @param round_target [Integer] The target post-money dollar amount of the round
59
+ # @param tags [Array<String>] The tags associated with the deal
60
+ # @param id [Integer]
61
+ # @param created_at [DateTime]
62
+ # @param updated_at [DateTime]
63
+ # @param is_archived [Boolean]
64
+ # @param company [NewDemoApiClient::CompanyResponse]
65
+ # @param files [Array<NewDemoApiClient::FileResponse>]
66
+ # @param data [NewDemoApiClient::DealDataAvailablityResponse]
67
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
68
+ # @return [NewDemoApiClient::DealWithFilesResponse]
69
+ def initialize(name:, round_name:, status:, id:, company:, notes: OMIT, priority: OMIT, round_amount: OMIT, round_target: OMIT,
70
+ tags: OMIT, created_at: OMIT, updated_at: OMIT, is_archived: OMIT, files: OMIT, data: OMIT, additional_properties: nil)
71
+ @name = name
72
+ @round_name = round_name
73
+ @status = status
74
+ @notes = notes if notes != OMIT
75
+ @priority = priority if priority != OMIT
76
+ @round_amount = round_amount if round_amount != OMIT
77
+ @round_target = round_target if round_target != OMIT
78
+ @tags = tags if tags != OMIT
79
+ @id = id
80
+ @created_at = created_at if created_at != OMIT
81
+ @updated_at = updated_at if updated_at != OMIT
82
+ @is_archived = is_archived if is_archived != OMIT
83
+ @company = company
84
+ @files = files if files != OMIT
85
+ @data = data if data != OMIT
86
+ @additional_properties = additional_properties
87
+ @_field_set = {
88
+ "name": name,
89
+ "round_name": round_name,
90
+ "status": status,
91
+ "notes": notes,
92
+ "priority": priority,
93
+ "round_amount": round_amount,
94
+ "round_target": round_target,
95
+ "tags": tags,
96
+ "id": id,
97
+ "created_at": created_at,
98
+ "updated_at": updated_at,
99
+ "is_archived": is_archived,
100
+ "company": company,
101
+ "files": files,
102
+ "data": data
103
+ }.reject do |_k, v|
104
+ v == OMIT
105
+ end
106
+ end
107
+
108
+ # Deserialize a JSON object to an instance of DealWithFilesResponse
109
+ #
110
+ # @param json_object [String]
111
+ # @return [NewDemoApiClient::DealWithFilesResponse]
112
+ def self.from_json(json_object:)
113
+ struct = JSON.parse(json_object, object_class: OpenStruct)
114
+ parsed_json = JSON.parse(json_object)
115
+ name = parsed_json["name"]
116
+ round_name = parsed_json["round_name"]
117
+ status = parsed_json["status"]
118
+ notes = parsed_json["notes"]
119
+ priority = parsed_json["priority"]
120
+ round_amount = parsed_json["round_amount"]
121
+ round_target = parsed_json["round_target"]
122
+ tags = parsed_json["tags"]
123
+ id = parsed_json["id"]
124
+ created_at = (DateTime.parse(parsed_json["created_at"]) unless parsed_json["created_at"].nil?)
125
+ updated_at = (DateTime.parse(parsed_json["updated_at"]) unless parsed_json["updated_at"].nil?)
126
+ is_archived = parsed_json["is_archived"]
127
+ if parsed_json["company"].nil?
128
+ company = nil
129
+ else
130
+ company = parsed_json["company"].to_json
131
+ company = NewDemoApiClient::CompanyResponse.from_json(json_object: company)
132
+ end
133
+ files = parsed_json["files"]&.map do |item|
134
+ item = item.to_json
135
+ NewDemoApiClient::FileResponse.from_json(json_object: item)
136
+ end
137
+ if parsed_json["data"].nil?
138
+ data = nil
139
+ else
140
+ data = parsed_json["data"].to_json
141
+ data = NewDemoApiClient::DealDataAvailablityResponse.from_json(json_object: data)
142
+ end
143
+ new(
144
+ name: name,
145
+ round_name: round_name,
146
+ status: status,
147
+ notes: notes,
148
+ priority: priority,
149
+ round_amount: round_amount,
150
+ round_target: round_target,
151
+ tags: tags,
152
+ id: id,
153
+ created_at: created_at,
154
+ updated_at: updated_at,
155
+ is_archived: is_archived,
156
+ company: company,
157
+ files: files,
158
+ data: data,
159
+ additional_properties: struct
160
+ )
161
+ end
162
+
163
+ # Serialize an instance of DealWithFilesResponse to a JSON object
164
+ #
165
+ # @return [String]
166
+ def to_json(*_args)
167
+ @_field_set&.to_json
168
+ end
169
+
170
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
171
+ # hash and check each fields type against the current object's property
172
+ # definitions.
173
+ #
174
+ # @param obj [Object]
175
+ # @return [Void]
176
+ def self.validate_raw(obj:)
177
+ obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
178
+ obj.round_name.is_a?(String) != false || raise("Passed value for field obj.round_name is not the expected type, validation failed.")
179
+ obj.status.is_a?(NewDemoApiClient::Status) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
180
+ obj.notes&.is_a?(String) != false || raise("Passed value for field obj.notes is not the expected type, validation failed.")
181
+ obj.priority&.is_a?(NewDemoApiClient::Priority) != false || raise("Passed value for field obj.priority is not the expected type, validation failed.")
182
+ obj.round_amount&.is_a?(Integer) != false || raise("Passed value for field obj.round_amount is not the expected type, validation failed.")
183
+ obj.round_target&.is_a?(Integer) != false || raise("Passed value for field obj.round_target is not the expected type, validation failed.")
184
+ obj.tags&.is_a?(Array) != false || raise("Passed value for field obj.tags is not the expected type, validation failed.")
185
+ obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
186
+ obj.created_at&.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
187
+ obj.updated_at&.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
188
+ obj.is_archived&.is_a?(Boolean) != false || raise("Passed value for field obj.is_archived is not the expected type, validation failed.")
189
+ NewDemoApiClient::CompanyResponse.validate_raw(obj: obj.company)
190
+ obj.files&.is_a?(Array) != false || raise("Passed value for field obj.files is not the expected type, validation failed.")
191
+ obj.data.nil? || NewDemoApiClient::DealDataAvailablityResponse.validate_raw(obj: obj.data)
192
+ end
193
+ end
194
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module NewDemoApiClient
7
+ # The count of employees at each seniority level at the company
8
+ class EndpointSeniorityCount
9
+ # @return [String] The seniority level of the employee.
10
+ attr_reader :seniority
11
+ # @return [Integer] The count of employees at the seniority level.
12
+ attr_reader :count
13
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
14
+ attr_reader :additional_properties
15
+ # @return [Object]
16
+ attr_reader :_field_set
17
+ protected :_field_set
18
+
19
+ OMIT = Object.new
20
+
21
+ # @param seniority [String] The seniority level of the employee.
22
+ # @param count [Integer] The count of employees at the seniority level.
23
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
24
+ # @return [NewDemoApiClient::EndpointSeniorityCount]
25
+ def initialize(seniority:, count:, additional_properties: nil)
26
+ @seniority = seniority
27
+ @count = count
28
+ @additional_properties = additional_properties
29
+ @_field_set = { "seniority": seniority, "count": count }
30
+ end
31
+
32
+ # Deserialize a JSON object to an instance of EndpointSeniorityCount
33
+ #
34
+ # @param json_object [String]
35
+ # @return [NewDemoApiClient::EndpointSeniorityCount]
36
+ def self.from_json(json_object:)
37
+ struct = JSON.parse(json_object, object_class: OpenStruct)
38
+ parsed_json = JSON.parse(json_object)
39
+ seniority = parsed_json["seniority"]
40
+ count = parsed_json["count"]
41
+ new(
42
+ seniority: seniority,
43
+ count: count,
44
+ additional_properties: struct
45
+ )
46
+ end
47
+
48
+ # Serialize an instance of EndpointSeniorityCount to a JSON object
49
+ #
50
+ # @return [String]
51
+ def to_json(*_args)
52
+ @_field_set&.to_json
53
+ end
54
+
55
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
56
+ # hash and check each fields type against the current object's property
57
+ # definitions.
58
+ #
59
+ # @param obj [Object]
60
+ # @return [Void]
61
+ def self.validate_raw(obj:)
62
+ obj.seniority.is_a?(String) != false || raise("Passed value for field obj.seniority is not the expected type, validation failed.")
63
+ obj.count.is_a?(Integer) != false || raise("Passed value for field obj.count is not the expected type, validation failed.")
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,91 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "executive_profile_position"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module NewDemoApiClient
8
+ # A list of current executives, at the time the talent was pulled, their roles at
9
+ # the company, and their prior
10
+ # positions
11
+ class ExecutiveProfile
12
+ # @return [String] The unique LinkedIn profile id for the executive.
13
+ attr_reader :person_id
14
+ # @return [String] The name of the executive.
15
+ attr_reader :person_name
16
+ # @return [String] The URL to the executive's LinkedIn profile.
17
+ attr_reader :profile_url
18
+ # @return [Array<NewDemoApiClient::ExecutiveProfilePosition>] A list of past and present positions held by the executive.
19
+ attr_reader :positions
20
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
21
+ attr_reader :additional_properties
22
+ # @return [Object]
23
+ attr_reader :_field_set
24
+ protected :_field_set
25
+
26
+ OMIT = Object.new
27
+
28
+ # @param person_id [String] The unique LinkedIn profile id for the executive.
29
+ # @param person_name [String] The name of the executive.
30
+ # @param profile_url [String] The URL to the executive's LinkedIn profile.
31
+ # @param positions [Array<NewDemoApiClient::ExecutiveProfilePosition>] A list of past and present positions held by the executive.
32
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
33
+ # @return [NewDemoApiClient::ExecutiveProfile]
34
+ def initialize(person_id:, person_name:, profile_url:, positions:, additional_properties: nil)
35
+ @person_id = person_id
36
+ @person_name = person_name
37
+ @profile_url = profile_url
38
+ @positions = positions
39
+ @additional_properties = additional_properties
40
+ @_field_set = {
41
+ "person_id": person_id,
42
+ "person_name": person_name,
43
+ "profile_url": profile_url,
44
+ "positions": positions
45
+ }
46
+ end
47
+
48
+ # Deserialize a JSON object to an instance of ExecutiveProfile
49
+ #
50
+ # @param json_object [String]
51
+ # @return [NewDemoApiClient::ExecutiveProfile]
52
+ def self.from_json(json_object:)
53
+ struct = JSON.parse(json_object, object_class: OpenStruct)
54
+ parsed_json = JSON.parse(json_object)
55
+ person_id = parsed_json["person_id"]
56
+ person_name = parsed_json["person_name"]
57
+ profile_url = parsed_json["profile_url"]
58
+ positions = parsed_json["positions"]&.map do |item|
59
+ item = item.to_json
60
+ NewDemoApiClient::ExecutiveProfilePosition.from_json(json_object: item)
61
+ end
62
+ new(
63
+ person_id: person_id,
64
+ person_name: person_name,
65
+ profile_url: profile_url,
66
+ positions: positions,
67
+ additional_properties: struct
68
+ )
69
+ end
70
+
71
+ # Serialize an instance of ExecutiveProfile to a JSON object
72
+ #
73
+ # @return [String]
74
+ def to_json(*_args)
75
+ @_field_set&.to_json
76
+ end
77
+
78
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
79
+ # hash and check each fields type against the current object's property
80
+ # definitions.
81
+ #
82
+ # @param obj [Object]
83
+ # @return [Void]
84
+ def self.validate_raw(obj:)
85
+ obj.person_id.is_a?(String) != false || raise("Passed value for field obj.person_id is not the expected type, validation failed.")
86
+ obj.person_name.is_a?(String) != false || raise("Passed value for field obj.person_name is not the expected type, validation failed.")
87
+ obj.profile_url.is_a?(String) != false || raise("Passed value for field obj.profile_url is not the expected type, validation failed.")
88
+ obj.positions.is_a?(Array) != false || raise("Passed value for field obj.positions is not the expected type, validation failed.")
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,97 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module NewDemoApiClient
7
+ # Contains a list of past and present positions held by an executive at the
8
+ # company
9
+ class ExecutiveProfilePosition
10
+ # @return [String] The name of the company where a position was or is held.
11
+ attr_reader :company_name
12
+ # @return [Boolean] Whether the company is the same as the company associated with the deal.
13
+ attr_reader :is_target_company
14
+ # @return [String] The title of the position held at the company.
15
+ attr_reader :title
16
+ # @return [String] The start date of the position.
17
+ attr_reader :start_date
18
+ # @return [String] The end date of the position. If the position is current, this field is null.
19
+ attr_reader :end_date
20
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
21
+ attr_reader :additional_properties
22
+ # @return [Object]
23
+ attr_reader :_field_set
24
+ protected :_field_set
25
+
26
+ OMIT = Object.new
27
+
28
+ # @param company_name [String] The name of the company where a position was or is held.
29
+ # @param is_target_company [Boolean] Whether the company is the same as the company associated with the deal.
30
+ # @param title [String] The title of the position held at the company.
31
+ # @param start_date [String] The start date of the position.
32
+ # @param end_date [String] The end date of the position. If the position is current, this field is null.
33
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
34
+ # @return [NewDemoApiClient::ExecutiveProfilePosition]
35
+ def initialize(company_name: OMIT, is_target_company: OMIT, title: OMIT, start_date: OMIT, end_date: OMIT,
36
+ additional_properties: nil)
37
+ @company_name = company_name if company_name != OMIT
38
+ @is_target_company = is_target_company if is_target_company != OMIT
39
+ @title = title if title != OMIT
40
+ @start_date = start_date if start_date != OMIT
41
+ @end_date = end_date if end_date != OMIT
42
+ @additional_properties = additional_properties
43
+ @_field_set = {
44
+ "company_name": company_name,
45
+ "is_target_company": is_target_company,
46
+ "title": title,
47
+ "start_date": start_date,
48
+ "end_date": end_date
49
+ }.reject do |_k, v|
50
+ v == OMIT
51
+ end
52
+ end
53
+
54
+ # Deserialize a JSON object to an instance of ExecutiveProfilePosition
55
+ #
56
+ # @param json_object [String]
57
+ # @return [NewDemoApiClient::ExecutiveProfilePosition]
58
+ def self.from_json(json_object:)
59
+ struct = JSON.parse(json_object, object_class: OpenStruct)
60
+ parsed_json = JSON.parse(json_object)
61
+ company_name = parsed_json["company_name"]
62
+ is_target_company = parsed_json["is_target_company"]
63
+ title = parsed_json["title"]
64
+ start_date = parsed_json["start_date"]
65
+ end_date = parsed_json["end_date"]
66
+ new(
67
+ company_name: company_name,
68
+ is_target_company: is_target_company,
69
+ title: title,
70
+ start_date: start_date,
71
+ end_date: end_date,
72
+ additional_properties: struct
73
+ )
74
+ end
75
+
76
+ # Serialize an instance of ExecutiveProfilePosition to a JSON object
77
+ #
78
+ # @return [String]
79
+ def to_json(*_args)
80
+ @_field_set&.to_json
81
+ end
82
+
83
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
84
+ # hash and check each fields type against the current object's property
85
+ # definitions.
86
+ #
87
+ # @param obj [Object]
88
+ # @return [Void]
89
+ def self.validate_raw(obj:)
90
+ obj.company_name&.is_a?(String) != false || raise("Passed value for field obj.company_name is not the expected type, validation failed.")
91
+ obj.is_target_company&.is_a?(Boolean) != false || raise("Passed value for field obj.is_target_company is not the expected type, validation failed.")
92
+ obj.title&.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
93
+ obj.start_date&.is_a?(String) != false || raise("Passed value for field obj.start_date is not the expected type, validation failed.")
94
+ obj.end_date&.is_a?(String) != false || raise("Passed value for field obj.end_date is not the expected type, validation failed.")
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,113 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "file_type"
4
+ require "date"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module NewDemoApiClient
9
+ class FileResponse
10
+ # @return [String]
11
+ attr_reader :name
12
+ # @return [NewDemoApiClient::FileType] The type of the file
13
+ attr_reader :type
14
+ # @return [Integer]
15
+ attr_reader :id
16
+ # @return [DateTime]
17
+ attr_reader :created_at
18
+ # @return [DateTime]
19
+ attr_reader :updated_at
20
+ # @return [Boolean]
21
+ attr_reader :is_archived
22
+ # @return [Integer]
23
+ attr_reader :deal_id
24
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
25
+ attr_reader :additional_properties
26
+ # @return [Object]
27
+ attr_reader :_field_set
28
+ protected :_field_set
29
+
30
+ OMIT = Object.new
31
+
32
+ # @param name [String]
33
+ # @param type [NewDemoApiClient::FileType] The type of the file
34
+ # @param id [Integer]
35
+ # @param created_at [DateTime]
36
+ # @param updated_at [DateTime]
37
+ # @param is_archived [Boolean]
38
+ # @param deal_id [Integer]
39
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
40
+ # @return [NewDemoApiClient::FileResponse]
41
+ def initialize(name:, id:, type: OMIT, created_at: OMIT, updated_at: OMIT, is_archived: OMIT, deal_id: OMIT,
42
+ additional_properties: nil)
43
+ @name = name
44
+ @type = type if type != OMIT
45
+ @id = id
46
+ @created_at = created_at if created_at != OMIT
47
+ @updated_at = updated_at if updated_at != OMIT
48
+ @is_archived = is_archived if is_archived != OMIT
49
+ @deal_id = deal_id if deal_id != OMIT
50
+ @additional_properties = additional_properties
51
+ @_field_set = {
52
+ "name": name,
53
+ "type": type,
54
+ "id": id,
55
+ "created_at": created_at,
56
+ "updated_at": updated_at,
57
+ "is_archived": is_archived,
58
+ "deal_id": deal_id
59
+ }.reject do |_k, v|
60
+ v == OMIT
61
+ end
62
+ end
63
+
64
+ # Deserialize a JSON object to an instance of FileResponse
65
+ #
66
+ # @param json_object [String]
67
+ # @return [NewDemoApiClient::FileResponse]
68
+ def self.from_json(json_object:)
69
+ struct = JSON.parse(json_object, object_class: OpenStruct)
70
+ parsed_json = JSON.parse(json_object)
71
+ name = parsed_json["name"]
72
+ type = parsed_json["type"]
73
+ id = parsed_json["id"]
74
+ created_at = (DateTime.parse(parsed_json["created_at"]) unless parsed_json["created_at"].nil?)
75
+ updated_at = (DateTime.parse(parsed_json["updated_at"]) unless parsed_json["updated_at"].nil?)
76
+ is_archived = parsed_json["is_archived"]
77
+ deal_id = parsed_json["deal_id"]
78
+ new(
79
+ name: name,
80
+ type: type,
81
+ id: id,
82
+ created_at: created_at,
83
+ updated_at: updated_at,
84
+ is_archived: is_archived,
85
+ deal_id: deal_id,
86
+ additional_properties: struct
87
+ )
88
+ end
89
+
90
+ # Serialize an instance of FileResponse to a JSON object
91
+ #
92
+ # @return [String]
93
+ def to_json(*_args)
94
+ @_field_set&.to_json
95
+ end
96
+
97
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
98
+ # hash and check each fields type against the current object's property
99
+ # definitions.
100
+ #
101
+ # @param obj [Object]
102
+ # @return [Void]
103
+ def self.validate_raw(obj:)
104
+ obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
105
+ obj.type&.is_a?(NewDemoApiClient::FileType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
106
+ obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
107
+ obj.created_at&.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
108
+ obj.updated_at&.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
109
+ obj.is_archived&.is_a?(Boolean) != false || raise("Passed value for field obj.is_archived is not the expected type, validation failed.")
110
+ obj.deal_id&.is_a?(Integer) != false || raise("Passed value for field obj.deal_id is not the expected type, validation failed.")
111
+ end
112
+ end
113
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NewDemoApiClient
4
+ class FileType
5
+ DECK = "deck"
6
+ FINANCIALS = "financials"
7
+ RAW_DATA = "raw_data"
8
+ SNAPSHOT = "snapshot"
9
+ FULL = "full"
10
+ MINI = "mini"
11
+ NANO = "nano"
12
+ OTHER = "other"
13
+ end
14
+ end