Class: SparteraApiSdk::Endpoints
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- SparteraApiSdk::Endpoints
- Defined in:
- lib/spartera_api_sdk/models/endpoints.rb
Overview
A configured API endpoint exposing seller data with access controls and rate limiting
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#access_method ⇒ Object
Access control method (OPEN, API_KEY, IP, EMAIL, DOMAIN).
-
#access_whitelist ⇒ Object
List of allowed IPs, emails, or domains based on access_method.
-
#active ⇒ Object
Required.
-
#approval_status ⇒ Object
Approval status before marketplace publication.
-
#approved_at ⇒ Object
Timestamp of marketplace approval.
-
#approved_by_user_id ⇒ Object
User who approved this endpoint for marketplace.
-
#auc_id ⇒ Object
Primary use case for marketplace discovery.
-
#company_id ⇒ Object
References companies.company_id — A Spartera seller or buyer company account.
-
#connection_id ⇒ Object
Connection to the data source.
-
#customer_name ⇒ Object
Named customer for B2B deals (pricing handled via asset_price_history).
-
#data_source_refresh_frequency ⇒ Object
How often the source data is refreshed.
-
#data_time_period_end ⇒ Object
End date of the data time period covered.
-
#data_time_period_start ⇒ Object
Start date of the data time period covered.
-
#date_collection_start ⇒ Object
When the seller began actively collecting this data.
-
#date_created ⇒ Object
Required.
-
#description ⇒ Object
Description of what this endpoint provides.
-
#detailed_description ⇒ Object
Long-form HTML description for product pages and SEO.
-
#endpoint_id ⇒ Object
Unique identifier.
-
#endpoint_schema ⇒ Object
Column configurations including aggregations, filters, and visibility.
-
#export_enabled ⇒ Object
Whether this endpoint supports bulk export to GCS.
-
#geographic_coverage_details ⇒ Object
Specific regions/countries covered (e.g., ‘United States, Canada, Mexico’).
-
#geographic_coverage_type ⇒ Object
Type of geographic coverage.
-
#industry_id ⇒ Object
Industry / category for marketplace discovery.
-
#last_accessed ⇒ Object
When this endpoint was last called.
-
#last_updated ⇒ Object
Required.
-
#max_records_per_export ⇒ Object
Hard ceiling on rows returned per GCS export.
-
#max_records_per_request ⇒ Object
Seller-enforced row cap per request.
-
#name ⇒ Object
Human-readable name for the endpoint.
-
#rate_limit_granularity ⇒ Object
How to group rate limits (IP, USER, COMPANY, API_KEY, GLOBAL).
-
#rate_limit_number ⇒ Object
Number of requests allowed per rate_limit_period.
-
#rate_limit_period ⇒ Object
Time period for rate limiting (HOUR, DAY, MONTH).
-
#sample_response ⇒ Object
Last successful request, response envelope.
-
#sell_in_marketplace ⇒ Object
Whether this endpoint appears in the public marketplace.
-
#slug ⇒ Object
Human-readable, URL-safe slug derived from name at creation time.
-
#source_schema_name ⇒ Object
Schema/database name where the table resides.
-
#source_table_name ⇒ Object
Table name to query from.
-
#status ⇒ Object
Current status of the endpoint (ACTIVE, INACTIVE, DEPRECATED).
-
#tags ⇒ Object
Comma-separated tags for organizing endpoints.
-
#top_questions ⇒ Object
Top 3 questions this endpoint can help answer, in English.
-
#user_id ⇒ Object
User who created this endpoint.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Endpoints
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ Endpoints
Initializes the object
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 271 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::Endpoints` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::Endpoints`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'date_created') self.date_created = attributes[:'date_created'] else self.date_created = nil end if attributes.key?(:'last_updated') self.last_updated = attributes[:'last_updated'] else self.last_updated = nil end if attributes.key?(:'endpoint_id') self.endpoint_id = attributes[:'endpoint_id'] end if attributes.key?(:'user_id') self.user_id = attributes[:'user_id'] end if attributes.key?(:'company_id') self.company_id = attributes[:'company_id'] else self.company_id = nil end if attributes.key?(:'connection_id') self.connection_id = attributes[:'connection_id'] else self.connection_id = nil end if attributes.key?(:'industry_id') self.industry_id = attributes[:'industry_id'] end if attributes.key?(:'auc_id') self.auc_id = attributes[:'auc_id'] end if attributes.key?(:'approval_status') self.approval_status = attributes[:'approval_status'] end if attributes.key?(:'approved_by_user_id') self.approved_by_user_id = attributes[:'approved_by_user_id'] end if attributes.key?(:'approved_at') self.approved_at = attributes[:'approved_at'] end if attributes.key?(:'sell_in_marketplace') self.sell_in_marketplace = attributes[:'sell_in_marketplace'] else self.sell_in_marketplace = nil end if attributes.key?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'slug') self.slug = attributes[:'slug'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'detailed_description') self.detailed_description = attributes[:'detailed_description'] end if attributes.key?(:'top_questions') self.top_questions = attributes[:'top_questions'] end if attributes.key?(:'source_schema_name') self.source_schema_name = attributes[:'source_schema_name'] end if attributes.key?(:'source_table_name') self.source_table_name = attributes[:'source_table_name'] end if attributes.key?(:'customer_name') self.customer_name = attributes[:'customer_name'] end if attributes.key?(:'endpoint_schema') self.endpoint_schema = attributes[:'endpoint_schema'] end if attributes.key?(:'rate_limit_number') self.rate_limit_number = attributes[:'rate_limit_number'] end if attributes.key?(:'rate_limit_period') self.rate_limit_period = attributes[:'rate_limit_period'] end if attributes.key?(:'rate_limit_granularity') self.rate_limit_granularity = attributes[:'rate_limit_granularity'] end if attributes.key?(:'access_method') self.access_method = attributes[:'access_method'] end if attributes.key?(:'access_whitelist') self.access_whitelist = attributes[:'access_whitelist'] end if attributes.key?(:'status') self.status = attributes[:'status'] else self.status = nil end if attributes.key?(:'data_time_period_start') self.data_time_period_start = attributes[:'data_time_period_start'] end if attributes.key?(:'data_time_period_end') self.data_time_period_end = attributes[:'data_time_period_end'] end if attributes.key?(:'date_collection_start') self.date_collection_start = attributes[:'date_collection_start'] end if attributes.key?(:'geographic_coverage_type') self.geographic_coverage_type = attributes[:'geographic_coverage_type'] end if attributes.key?(:'geographic_coverage_details') self.geographic_coverage_details = attributes[:'geographic_coverage_details'] end if attributes.key?(:'data_source_refresh_frequency') self.data_source_refresh_frequency = attributes[:'data_source_refresh_frequency'] end if attributes.key?(:'tags') self. = attributes[:'tags'] end if attributes.key?(:'last_accessed') self.last_accessed = attributes[:'last_accessed'] end if attributes.key?(:'max_records_per_request') self.max_records_per_request = attributes[:'max_records_per_request'] end if attributes.key?(:'export_enabled') self.export_enabled = attributes[:'export_enabled'] else self.export_enabled = nil end if attributes.key?(:'max_records_per_export') self.max_records_per_export = attributes[:'max_records_per_export'] end if attributes.key?(:'sample_response') self.sample_response = attributes[:'sample_response'] end if attributes.key?(:'active') self.active = attributes[:'active'] else self.active = nil end end |
Instance Attribute Details
#access_method ⇒ Object
Access control method (OPEN, API_KEY, IP, EMAIL, DOMAIN)
92 93 94 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 92 def access_method @access_method end |
#access_whitelist ⇒ Object
List of allowed IPs, emails, or domains based on access_method. Format: ‘ip’|‘email’|‘domain’, values: [‘192.168.1.1’, …]
95 96 97 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 95 def access_whitelist @access_whitelist end |
#active ⇒ Object
Required.
137 138 139 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 137 def active @active end |
#approval_status ⇒ Object
Approval status before marketplace publication
44 45 46 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 44 def approval_status @approval_status end |
#approved_at ⇒ Object
Timestamp of marketplace approval
50 51 52 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 50 def approved_at @approved_at end |
#approved_by_user_id ⇒ Object
User who approved this endpoint for marketplace
47 48 49 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 47 def approved_by_user_id @approved_by_user_id end |
#auc_id ⇒ Object
Primary use case for marketplace discovery
41 42 43 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 41 def auc_id @auc_id end |
#company_id ⇒ Object
References companies.company_id — A Spartera seller or buyer company account. See GET /companies for valid values. Required.
32 33 34 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 32 def company_id @company_id end |
#connection_id ⇒ Object
Connection to the data source
35 36 37 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 35 def connection_id @connection_id end |
#customer_name ⇒ Object
Named customer for B2B deals (pricing handled via asset_price_history)
77 78 79 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 77 def customer_name @customer_name end |
#data_source_refresh_frequency ⇒ Object
How often the source data is refreshed
116 117 118 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 116 def data_source_refresh_frequency @data_source_refresh_frequency end |
#data_time_period_end ⇒ Object
End date of the data time period covered
104 105 106 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 104 def data_time_period_end @data_time_period_end end |
#data_time_period_start ⇒ Object
Start date of the data time period covered
101 102 103 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 101 def data_time_period_start @data_time_period_start end |
#date_collection_start ⇒ Object
When the seller began actively collecting this data. Distinct from data_time_period_start, which describes when the records themselves begin. Backfilled historical data will have date_collection_start > data_time_period_start.
107 108 109 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 107 def date_collection_start @date_collection_start end |
#date_created ⇒ Object
Required.
20 21 22 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 20 def date_created @date_created end |
#description ⇒ Object
Description of what this endpoint provides
62 63 64 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 62 def description @description end |
#detailed_description ⇒ Object
Long-form HTML description for product pages and SEO
65 66 67 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 65 def detailed_description @detailed_description end |
#endpoint_id ⇒ Object
Unique identifier.
26 27 28 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 26 def endpoint_id @endpoint_id end |
#endpoint_schema ⇒ Object
Column configurations including aggregations, filters, and visibility. Format: [{name, type, aggregation, filter, is_hidden, alias, …]}. This is the source of truth — SQL is generated at runtime from this configuration.
80 81 82 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 80 def endpoint_schema @endpoint_schema end |
#export_enabled ⇒ Object
Whether this endpoint supports bulk export to GCS. When True, buyers can request delivery=gcs with format=csv|parquet. Independent of max_records_per_request, which only governs inline JSON.
128 129 130 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 128 def export_enabled @export_enabled end |
#geographic_coverage_details ⇒ Object
Specific regions/countries covered (e.g., ‘United States, Canada, Mexico’)
113 114 115 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 113 def geographic_coverage_details @geographic_coverage_details end |
#geographic_coverage_type ⇒ Object
Type of geographic coverage
110 111 112 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 110 def geographic_coverage_type @geographic_coverage_type end |
#industry_id ⇒ Object
Industry / category for marketplace discovery
38 39 40 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 38 def industry_id @industry_id end |
#last_accessed ⇒ Object
When this endpoint was last called
122 123 124 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 122 def last_accessed @last_accessed end |
#last_updated ⇒ Object
Required.
23 24 25 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 23 def last_updated @last_updated end |
#max_records_per_export ⇒ Object
Hard ceiling on rows returned per GCS export. Separate from max_records_per_request so sellers can offer larger downloads via file delivery without expanding inline JSON responses.
131 132 133 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 131 def max_records_per_export @max_records_per_export end |
#max_records_per_request ⇒ Object
Seller-enforced row cap per request. Buyers cannot exceed this. Default 1000.
125 126 127 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 125 def max_records_per_request @max_records_per_request end |
#name ⇒ Object
Human-readable name for the endpoint
56 57 58 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 56 def name @name end |
#rate_limit_granularity ⇒ Object
How to group rate limits (IP, USER, COMPANY, API_KEY, GLOBAL)
89 90 91 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 89 def rate_limit_granularity @rate_limit_granularity end |
#rate_limit_number ⇒ Object
Number of requests allowed per rate_limit_period
83 84 85 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 83 def rate_limit_number @rate_limit_number end |
#rate_limit_period ⇒ Object
Time period for rate limiting (HOUR, DAY, MONTH)
86 87 88 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 86 def rate_limit_period @rate_limit_period end |
#sample_response ⇒ Object
Last successful request, response envelope. Saved on each successful marketplace run. Displayed as preview on product page load.
134 135 136 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 134 def sample_response @sample_response end |
#sell_in_marketplace ⇒ Object
Whether this endpoint appears in the public marketplace
53 54 55 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 53 def sell_in_marketplace @sell_in_marketplace end |
#slug ⇒ Object
Human-readable, URL-safe slug derived from name at creation time. e.g. ‘NFL Live Moneyline & Spread Odds’ → ‘nfl-live-moneyline-spread-odds’. Never changes after creation. Unique within company (DB constraint). Creation fails with 409 if a duplicate name exists in the same company.
59 60 61 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 59 def slug @slug end |
#source_schema_name ⇒ Object
Schema/database name where the table resides
71 72 73 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 71 def source_schema_name @source_schema_name end |
#source_table_name ⇒ Object
Table name to query from
74 75 76 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 74 def source_table_name @source_table_name end |
#status ⇒ Object
Current status of the endpoint (ACTIVE, INACTIVE, DEPRECATED)
98 99 100 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 98 def status @status end |
#tags ⇒ Object
Comma-separated tags for organizing endpoints
119 120 121 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 119 def @tags end |
#top_questions ⇒ Object
Top 3 questions this endpoint can help answer, in English. Stored as JSON array of strings (1-3 items, 15-200 chars each). Strongly encouraged for marketplace endpoints but not required — nudge via UI completeness score, not hard validation.
68 69 70 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 68 def top_questions @top_questions end |
#user_id ⇒ Object
User who created this endpoint
29 30 31 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 29 def user_id @user_id end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
208 209 210 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 208 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
213 214 215 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 213 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 162 def self.attribute_map { :'date_created' => :'date_created', :'last_updated' => :'last_updated', :'endpoint_id' => :'endpoint_id', :'user_id' => :'user_id', :'company_id' => :'company_id', :'connection_id' => :'connection_id', :'industry_id' => :'industry_id', :'auc_id' => :'auc_id', :'approval_status' => :'approval_status', :'approved_by_user_id' => :'approved_by_user_id', :'approved_at' => :'approved_at', :'sell_in_marketplace' => :'sell_in_marketplace', :'name' => :'name', :'slug' => :'slug', :'description' => :'description', :'detailed_description' => :'detailed_description', :'top_questions' => :'top_questions', :'source_schema_name' => :'source_schema_name', :'source_table_name' => :'source_table_name', :'customer_name' => :'customer_name', :'endpoint_schema' => :'endpoint_schema', :'rate_limit_number' => :'rate_limit_number', :'rate_limit_period' => :'rate_limit_period', :'rate_limit_granularity' => :'rate_limit_granularity', :'access_method' => :'access_method', :'access_whitelist' => :'access_whitelist', :'status' => :'status', :'data_time_period_start' => :'data_time_period_start', :'data_time_period_end' => :'data_time_period_end', :'date_collection_start' => :'date_collection_start', :'geographic_coverage_type' => :'geographic_coverage_type', :'geographic_coverage_details' => :'geographic_coverage_details', :'data_source_refresh_frequency' => :'data_source_refresh_frequency', :'tags' => :'tags', :'last_accessed' => :'last_accessed', :'max_records_per_request' => :'max_records_per_request', :'export_enabled' => :'export_enabled', :'max_records_per_export' => :'max_records_per_export', :'sample_response' => :'sample_response', :'active' => :'active' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 750 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
264 265 266 267 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 264 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 218 def self.openapi_types { :'date_created' => :'Time', :'last_updated' => :'Time', :'endpoint_id' => :'String', :'user_id' => :'String', :'company_id' => :'String', :'connection_id' => :'String', :'industry_id' => :'Integer', :'auc_id' => :'Integer', :'approval_status' => :'String', :'approved_by_user_id' => :'String', :'approved_at' => :'Time', :'sell_in_marketplace' => :'Boolean', :'name' => :'String', :'slug' => :'String', :'description' => :'String', :'detailed_description' => :'String', :'top_questions' => :'String', :'source_schema_name' => :'String', :'source_table_name' => :'String', :'customer_name' => :'String', :'endpoint_schema' => :'Object', :'rate_limit_number' => :'Integer', :'rate_limit_period' => :'String', :'rate_limit_granularity' => :'String', :'access_method' => :'String', :'access_whitelist' => :'Object', :'status' => :'String', :'data_time_period_start' => :'Time', :'data_time_period_end' => :'Time', :'date_collection_start' => :'Time', :'geographic_coverage_type' => :'String', :'geographic_coverage_details' => :'String', :'data_source_refresh_frequency' => :'String', :'tags' => :'String', :'last_accessed' => :'Time', :'max_records_per_request' => :'Integer', :'export_enabled' => :'Boolean', :'max_records_per_export' => :'Integer', :'sample_response' => :'Object', :'active' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 690 def ==(o) return true if self.equal?(o) self.class == o.class && date_created == o.date_created && last_updated == o.last_updated && endpoint_id == o.endpoint_id && user_id == o.user_id && company_id == o.company_id && connection_id == o.connection_id && industry_id == o.industry_id && auc_id == o.auc_id && approval_status == o.approval_status && approved_by_user_id == o.approved_by_user_id && approved_at == o.approved_at && sell_in_marketplace == o.sell_in_marketplace && name == o.name && slug == o.slug && description == o.description && detailed_description == o.detailed_description && top_questions == o.top_questions && source_schema_name == o.source_schema_name && source_table_name == o.source_table_name && customer_name == o.customer_name && endpoint_schema == o.endpoint_schema && rate_limit_number == o.rate_limit_number && rate_limit_period == o.rate_limit_period && rate_limit_granularity == o.rate_limit_granularity && access_method == o.access_method && access_whitelist == o.access_whitelist && status == o.status && data_time_period_start == o.data_time_period_start && data_time_period_end == o.data_time_period_end && date_collection_start == o.date_collection_start && geographic_coverage_type == o.geographic_coverage_type && geographic_coverage_details == o.geographic_coverage_details && data_source_refresh_frequency == o.data_source_refresh_frequency && == o. && last_accessed == o.last_accessed && max_records_per_request == o.max_records_per_request && export_enabled == o.export_enabled && max_records_per_export == o.max_records_per_export && sample_response == o.sample_response && active == o.active end |
#eql?(o) ⇒ Boolean
737 738 739 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 737 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
743 744 745 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 743 def hash [date_created, last_updated, endpoint_id, user_id, company_id, connection_id, industry_id, auc_id, approval_status, approved_by_user_id, approved_at, sell_in_marketplace, name, slug, description, detailed_description, top_questions, source_schema_name, source_table_name, customer_name, endpoint_schema, rate_limit_number, rate_limit_period, rate_limit_granularity, access_method, access_whitelist, status, data_time_period_start, data_time_period_end, date_collection_start, geographic_coverage_type, geographic_coverage_details, data_source_refresh_frequency, , last_accessed, max_records_per_request, export_enabled, max_records_per_export, sample_response, active].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 466 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @date_created.nil? invalid_properties.push('invalid value for "date_created", date_created cannot be nil.') end if @last_updated.nil? invalid_properties.push('invalid value for "last_updated", last_updated cannot be nil.') end if @company_id.nil? invalid_properties.push('invalid value for "company_id", company_id cannot be nil.') end if @connection_id.nil? invalid_properties.push('invalid value for "connection_id", connection_id cannot be nil.') end if @sell_in_marketplace.nil? invalid_properties.push('invalid value for "sell_in_marketplace", sell_in_marketplace cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end if @export_enabled.nil? invalid_properties.push('invalid value for "export_enabled", export_enabled cannot be nil.') end if @active.nil? invalid_properties.push('invalid value for "active", active cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
772 773 774 775 776 777 778 779 780 781 782 783 784 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 772 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 |
# File 'lib/spartera_api_sdk/models/endpoints.rb', line 510 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @date_created.nil? return false if @last_updated.nil? return false if @company_id.nil? return false if @connection_id.nil? approval_status_validator = EnumAttributeValidator.new('String', ["PENDING", "APPROVED", "REJECTED", "NEEDS_REVISION"]) return false unless approval_status_validator.valid?(@approval_status) return false if @sell_in_marketplace.nil? return false if @name.nil? rate_limit_period_validator = EnumAttributeValidator.new('String', ["SECOND", "MINUTE", "HOUR", "DAY"]) return false unless rate_limit_period_validator.valid?(@rate_limit_period) rate_limit_granularity_validator = EnumAttributeValidator.new('String', ["USER", "COMPANY", "IP", "GLOBAL"]) return false unless rate_limit_granularity_validator.valid?(@rate_limit_granularity) access_method_validator = EnumAttributeValidator.new('String', ["OPEN", "API_KEY", "IP", "EMAIL", "DOMAIN"]) return false unless access_method_validator.valid?(@access_method) return false if @status.nil? status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "INACTIVE", "DEPRECATED"]) return false unless status_validator.valid?(@status) geographic_coverage_type_validator = EnumAttributeValidator.new('String', ["GLOBAL", "CONTINENTAL", "REGIONAL", "NATIONAL", "STATE", "LOCAL", "CUSTOM", "UNKNOWN"]) return false unless geographic_coverage_type_validator.valid?(@geographic_coverage_type) data_source_refresh_frequency_validator = EnumAttributeValidator.new('String', ["EVERY_SECOND", "EVERY_MINUTE", "EVERY_HOUR", "EVERY_DAY", "EVERY_WEEK", "EVERY_MONTH", "EVERY_QUARTER", "EVERY_YEAR", "NEVER", "UNKNOWN"]) return false unless data_source_refresh_frequency_validator.valid?(@data_source_refresh_frequency) return false if @export_enabled.nil? return false if @active.nil? true end |