Class: NewDemoApiClient::WeatherComponents
- Inherits:
-
Object
- Object
- NewDemoApiClient::WeatherComponents
- Defined in:
- lib/test_sdk/types/weather_components.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#actual_annualized ⇒ Float
readonly
The measured actual annualized fundraising amount for the stage in a rolling window, subset only to companies that have known amounts raised in the prior stage.
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#date ⇒ String
readonly
The date of the data point.
-
#potential_annualized ⇒ Float
readonly
The estimated present and past potential annualized fundraising amount for the stage in a rolling window, which measures the amount of fundraising one would expect under normal conditions, based on investment in the prior stage and accounting for exits.
-
#potential_annualized_forecast ⇒ Float
readonly
The estimated future potential annualized fundraising amount for the stage in a rolling window, which measures the amount of fundraising one would expect under normal conditions, based on investment in the prior stage and accounting for exits.
-
#stage ⇒ String
readonly
The stage of the weather gauge.
-
#weather_gauge ⇒ Float
readonly
The values of the individual components of the weather gauge.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ NewDemoApiClient::WeatherComponents
Deserialize a JSON object to an instance of WeatherComponents.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(stage:, date:, weather_gauge: OMIT, actual_annualized: OMIT, potential_annualized: OMIT, potential_annualized_forecast: OMIT, additional_properties: nil) ⇒ NewDemoApiClient::WeatherComponents constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of WeatherComponents to a JSON object.
Constructor Details
#initialize(stage:, date:, weather_gauge: OMIT, actual_annualized: OMIT, potential_annualized: OMIT, potential_annualized_forecast: OMIT, additional_properties: nil) ⇒ NewDemoApiClient::WeatherComponents
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/test_sdk/types/weather_components.rb', line 56 def initialize(stage:, date:, weather_gauge: OMIT, actual_annualized: OMIT, potential_annualized: OMIT, potential_annualized_forecast: OMIT, additional_properties: nil) @stage = stage @date = date @weather_gauge = weather_gauge if weather_gauge != OMIT @actual_annualized = actual_annualized if actual_annualized != OMIT @potential_annualized = potential_annualized if potential_annualized != OMIT @potential_annualized_forecast = potential_annualized_forecast if potential_annualized_forecast != OMIT @additional_properties = additional_properties @_field_set = { "stage": stage, "date": date, "weather_gauge": weather_gauge, "actual_annualized": actual_annualized, "potential_annualized": potential_annualized, "potential_annualized_forecast": potential_annualized_forecast }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#actual_annualized ⇒ Float (readonly)
Returns The measured actual annualized fundraising amount for the stage in a rolling window, subset only to companies that have known amounts raised in the prior stage. The value is null for future dates beyond the last valid date of the indicator.
18 19 20 |
# File 'lib/test_sdk/types/weather_components.rb', line 18 def actual_annualized @actual_annualized end |
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
31 32 33 |
# File 'lib/test_sdk/types/weather_components.rb', line 31 def additional_properties @additional_properties end |
#date ⇒ String (readonly)
Returns The date of the data point.
11 12 13 |
# File 'lib/test_sdk/types/weather_components.rb', line 11 def date @date end |
#potential_annualized ⇒ Float (readonly)
Returns The estimated present and past potential annualized fundraising amount for the stage in a rolling window, which measures the amount of fundraising one would expect under normal conditions, based on investment in the prior stage and accounting for exits. The value is null for future dates beyond the last valid date of the indicator.
24 25 26 |
# File 'lib/test_sdk/types/weather_components.rb', line 24 def potential_annualized @potential_annualized end |
#potential_annualized_forecast ⇒ Float (readonly)
Returns The estimated future potential annualized fundraising amount for the stage in a rolling window, which measures the amount of fundraising one would expect under normal conditions, based on investment in the prior stage and accounting for exits. The value is null for past dates and forecasted for future dates.
29 30 31 |
# File 'lib/test_sdk/types/weather_components.rb', line 29 def potential_annualized_forecast @potential_annualized_forecast end |
#stage ⇒ String (readonly)
Returns The stage of the weather gauge.
9 10 11 |
# File 'lib/test_sdk/types/weather_components.rb', line 9 def stage @stage end |
#weather_gauge ⇒ Float (readonly)
Returns The values of the individual components of the weather gauge.
13 14 15 |
# File 'lib/test_sdk/types/weather_components.rb', line 13 def weather_gauge @weather_gauge end |
Class Method Details
.from_json(json_object:) ⇒ NewDemoApiClient::WeatherComponents
Deserialize a JSON object to an instance of WeatherComponents
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/test_sdk/types/weather_components.rb', line 81 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) stage = parsed_json["stage"] date = parsed_json["date"] weather_gauge = parsed_json["weather_gauge"] actual_annualized = parsed_json["actual_annualized"] potential_annualized = parsed_json["potential_annualized"] potential_annualized_forecast = parsed_json["potential_annualized_forecast"] new( stage: stage, date: date, weather_gauge: weather_gauge, actual_annualized: actual_annualized, potential_annualized: potential_annualized, potential_annualized_forecast: potential_annualized_forecast, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
114 115 116 117 118 119 120 121 |
# File 'lib/test_sdk/types/weather_components.rb', line 114 def self.validate_raw(obj:) obj.stage.is_a?(String) != false || raise("Passed value for field obj.stage is not the expected type, validation failed.") obj.date.is_a?(String) != false || raise("Passed value for field obj.date is not the expected type, validation failed.") obj.weather_gauge&.is_a?(Float) != false || raise("Passed value for field obj.weather_gauge is not the expected type, validation failed.") obj.actual_annualized&.is_a?(Float) != false || raise("Passed value for field obj.actual_annualized is not the expected type, validation failed.") obj.potential_annualized&.is_a?(Float) != false || raise("Passed value for field obj.potential_annualized is not the expected type, validation failed.") obj.potential_annualized_forecast&.is_a?(Float) != false || raise("Passed value for field obj.potential_annualized_forecast is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of WeatherComponents to a JSON object
104 105 106 |
# File 'lib/test_sdk/types/weather_components.rb', line 104 def to_json(*_args) @_field_set&.to_json end |