repull 0.2.8 → 0.2.10

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 (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +1443 -182
  3. data/lib/repull/api/availability_api.rb +24 -92
  4. data/lib/repull/api/billing_api.rb +186 -15
  5. data/lib/repull/api/booking_com_api.rb +532 -41
  6. data/lib/repull/api/listings_api.rb +74 -0
  7. data/lib/repull/api/plumguide_api.rb +245 -0
  8. data/lib/repull/api/reservations_api.rb +0 -197
  9. data/lib/repull/api/sandbox_api.rb +136 -0
  10. data/lib/repull/api/vrbo_api.rb +0 -126
  11. data/lib/repull/models/acknowledge_booking_reservations_request.rb +176 -0
  12. data/lib/repull/models/{create_studio_project201_response_data.rb → airbnb_alteration.rb} +44 -52
  13. data/lib/repull/models/airbnb_amenity.rb +171 -0
  14. data/lib/repull/models/{get_studio_deployment200_response.rb → airbnb_availability_write_request.rb} +52 -10
  15. data/lib/repull/models/airbnb_calendar_operation.rb +250 -0
  16. data/lib/repull/models/airbnb_listing_action_request.rb +198 -0
  17. data/lib/repull/models/{update_availability_request.rb → airbnb_pricing_write_request.rb} +100 -11
  18. data/lib/repull/models/booking_availability_update.rb +276 -0
  19. data/lib/repull/models/booking_availability_update_request.rb +230 -0
  20. data/lib/repull/models/{generate_studio_completion_request_project_id.rb → booking_availability_update_request_property_id.rb} +2 -2
  21. data/lib/repull/models/booking_availability_update_request_updates_inner.rb +104 -0
  22. data/lib/repull/models/booking_pricing_rate_update.rb +1 -0
  23. data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +65 -6
  24. data/lib/repull/models/booking_setup_request.rb +220 -0
  25. data/lib/repull/models/create_airbnb_alteration_request.rb +195 -0
  26. data/lib/repull/models/{create_studio_deployment201_response_data.rb → create_airbnb_offer_request.rb} +42 -30
  27. data/lib/repull/models/{create_studio_project_request.rb → create_booking_webhook_request.rb} +36 -47
  28. data/lib/repull/models/{generate_studio_completion200_response.rb → delete_airbnb_listing_photo200_response.rb} +10 -10
  29. data/lib/repull/models/{delete_studio_project200_response.rb → get_airbnb_alteration200_response.rb} +50 -7
  30. data/lib/repull/models/{delete_studio_project_file200_response.rb → get_airbnb_listing_quality200_response.rb} +37 -7
  31. data/lib/repull/models/{create_studio_project_generation201_response.rb → get_airbnb_listing_settings200_response.rb} +37 -7
  32. data/lib/repull/models/{delete_studio_deployment200_response.rb → get_airbnb_thread200_response.rb} +50 -7
  33. data/lib/repull/models/{list_studio_deployments200_response.rb → get_usage_logs200_response.rb} +17 -8
  34. data/lib/repull/models/get_usage_logs200_response_data_inner.rb +264 -0
  35. data/lib/repull/models/{create_studio_deployment201_response.rb → get_usage_logs200_response_pagination.rb} +29 -10
  36. data/lib/repull/models/get_usage_summary200_response.rb +232 -0
  37. data/lib/repull/models/get_usage_summary200_response_breakdown_inner.rb +183 -0
  38. data/lib/repull/models/{delete_studio_deployment200_response_data.rb → get_usage_summary200_response_limits.rb} +18 -16
  39. data/lib/repull/models/{delete_studio_project200_response_data.rb → get_usage_summary200_response_remaining.rb} +18 -16
  40. data/lib/repull/models/{create_studio_project_generation201_response_data.rb → get_usage_summary200_response_status_distribution.rb} +31 -22
  41. data/lib/repull/models/{upsert_studio_project_file_request.rb → get_usage_summary200_response_timeline_inner.rb} +28 -28
  42. data/lib/repull/models/{create_studio_project_generation_request.rb → get_usage_summary200_response_totals.rb} +28 -28
  43. data/lib/repull/models/{create_studio_project201_response.rb → get_usage_summary200_response_used.rb} +19 -10
  44. data/lib/repull/models/get_usage_tier200_response.rb +183 -0
  45. data/lib/repull/models/{list_studio_projects200_response.rb → get_usage_tier200_response_limits.rb} +31 -12
  46. data/lib/repull/models/{update_reservation_request.rb → get_usage_tier200_response_remaining.rb} +25 -31
  47. data/lib/repull/models/{get_studio_project200_response.rb → get_usage_tier200_response_used.rb} +28 -10
  48. data/lib/repull/models/list_airbnb_alterations200_response.rb +192 -0
  49. data/lib/repull/models/list_airbnb_listing_amenities200_response.rb +190 -0
  50. data/lib/repull/models/{create_studio_deployment_request.rb → list_airbnb_listing_amenities200_response_data.rb} +23 -28
  51. data/lib/repull/models/{list_studio_project_files200_response.rb → list_airbnb_transactions200_response.rb} +50 -7
  52. data/lib/repull/models/listing_content_update_request.rb +243 -0
  53. data/lib/repull/models/{upsert_studio_project_file200_response.rb → listing_content_update_request_address.rb} +53 -10
  54. data/lib/repull/models/listing_content_update_request_amenities.rb +105 -0
  55. data/lib/repull/models/listing_content_update_request_amenities_one_of_inner.rb +196 -0
  56. data/lib/repull/models/listing_content_update_request_occupancy.rb +179 -0
  57. data/lib/repull/{api/ai_api.rb → models/listing_content_update_request_photos_inner.rb} +77 -59
  58. data/lib/repull/models/{generate_studio_completion200_response_data.rb → listing_content_update_request_photos_inner_one_of.rb} +81 -66
  59. data/lib/repull/models/listing_content_update_request_policies.rb +253 -0
  60. data/lib/repull/models/{create_ai_operation200_response.rb → listing_content_update_response.rb} +32 -16
  61. data/lib/repull/models/map_airbnb_listing_request.rb +215 -0
  62. data/lib/repull/models/{create_reservation_request.rb → map_airbnb_listing_response.rb} +137 -116
  63. data/lib/repull/models/property.rb +42 -69
  64. data/lib/repull/models/property_availability.rb +222 -0
  65. data/lib/repull/models/property_availability_day.rb +247 -0
  66. data/lib/repull/models/reservation.rb +28 -1
  67. data/lib/repull/models/sandbox_fixture_ref.rb +193 -0
  68. data/lib/repull/models/{delete_studio_project_file200_response_data.rb → sandbox_reset_result.rb} +72 -11
  69. data/lib/repull/models/sandbox_reset_result_deleted.rb +216 -0
  70. data/lib/repull/models/sandbox_seed_result.rb +278 -0
  71. data/lib/repull/models/{update_studio_project_request.rb → update_airbnb_message_request.rb} +43 -24
  72. data/lib/repull/models/update_booking_charges_request.rb +194 -0
  73. data/lib/repull/version.rb +1 -1
  74. data/lib/repull.rb +59 -34
  75. data/openapi/v1.json +3956 -2522
  76. metadata +61 -36
  77. data/lib/repull/api/studio_api.rb +0 -1094
  78. data/lib/repull/models/generate_studio_completion_request.rb +0 -305
  79. data/lib/repull/models/upsert_studio_project_file200_response_data.rb +0 -147
@@ -0,0 +1,232 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: ivan@vanio.ai
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class GetUsageSummary200Response < ApiModelBase
18
+ attr_accessor :tier
19
+
20
+ attr_accessor :limits
21
+
22
+ attr_accessor :used
23
+
24
+ attr_accessor :remaining
25
+
26
+ attr_accessor :resets_at
27
+
28
+ attr_accessor :breakdown
29
+
30
+ attr_accessor :timeline
31
+
32
+ attr_accessor :status_distribution
33
+
34
+ attr_accessor :totals
35
+
36
+ attr_accessor :range
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'tier' => :'tier',
42
+ :'limits' => :'limits',
43
+ :'used' => :'used',
44
+ :'remaining' => :'remaining',
45
+ :'resets_at' => :'resets_at',
46
+ :'breakdown' => :'breakdown',
47
+ :'timeline' => :'timeline',
48
+ :'status_distribution' => :'statusDistribution',
49
+ :'totals' => :'totals',
50
+ :'range' => :'range'
51
+ }
52
+ end
53
+
54
+ # Returns attribute mapping this model knows about
55
+ def self.acceptable_attribute_map
56
+ attribute_map
57
+ end
58
+
59
+ # Returns all the JSON keys this model knows about
60
+ def self.acceptable_attributes
61
+ acceptable_attribute_map.values
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.openapi_types
66
+ {
67
+ :'tier' => :'String',
68
+ :'limits' => :'GetUsageSummary200ResponseLimits',
69
+ :'used' => :'GetUsageSummary200ResponseUsed',
70
+ :'remaining' => :'GetUsageSummary200ResponseRemaining',
71
+ :'resets_at' => :'Time',
72
+ :'breakdown' => :'Array<GetUsageSummary200ResponseBreakdownInner>',
73
+ :'timeline' => :'Array<GetUsageSummary200ResponseTimelineInner>',
74
+ :'status_distribution' => :'GetUsageSummary200ResponseStatusDistribution',
75
+ :'totals' => :'GetUsageSummary200ResponseTotals',
76
+ :'range' => :'String'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ if (!attributes.is_a?(Hash))
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageSummary200Response` initialize method"
91
+ end
92
+
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ acceptable_attribute_map = self.class.acceptable_attribute_map
95
+ attributes = attributes.each_with_object({}) { |(k, v), h|
96
+ if (!acceptable_attribute_map.key?(k.to_sym))
97
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetUsageSummary200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
98
+ end
99
+ h[k.to_sym] = v
100
+ }
101
+
102
+ if attributes.key?(:'tier')
103
+ self.tier = attributes[:'tier']
104
+ end
105
+
106
+ if attributes.key?(:'limits')
107
+ self.limits = attributes[:'limits']
108
+ end
109
+
110
+ if attributes.key?(:'used')
111
+ self.used = attributes[:'used']
112
+ end
113
+
114
+ if attributes.key?(:'remaining')
115
+ self.remaining = attributes[:'remaining']
116
+ end
117
+
118
+ if attributes.key?(:'resets_at')
119
+ self.resets_at = attributes[:'resets_at']
120
+ end
121
+
122
+ if attributes.key?(:'breakdown')
123
+ if (value = attributes[:'breakdown']).is_a?(Array)
124
+ self.breakdown = value
125
+ end
126
+ end
127
+
128
+ if attributes.key?(:'timeline')
129
+ if (value = attributes[:'timeline']).is_a?(Array)
130
+ self.timeline = value
131
+ end
132
+ end
133
+
134
+ if attributes.key?(:'status_distribution')
135
+ self.status_distribution = attributes[:'status_distribution']
136
+ end
137
+
138
+ if attributes.key?(:'totals')
139
+ self.totals = attributes[:'totals']
140
+ end
141
+
142
+ if attributes.key?(:'range')
143
+ self.range = attributes[:'range']
144
+ end
145
+ end
146
+
147
+ # Show invalid properties with the reasons. Usually used together with valid?
148
+ # @return Array for valid properties with the reasons
149
+ def list_invalid_properties
150
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
151
+ invalid_properties = Array.new
152
+ invalid_properties
153
+ end
154
+
155
+ # Check to see if the all the properties in the model are valid
156
+ # @return true if the model is valid
157
+ def valid?
158
+ warn '[DEPRECATED] the `valid?` method is obsolete'
159
+ true
160
+ end
161
+
162
+ # Checks equality by comparing each attribute.
163
+ # @param [Object] Object to be compared
164
+ def ==(o)
165
+ return true if self.equal?(o)
166
+ self.class == o.class &&
167
+ tier == o.tier &&
168
+ limits == o.limits &&
169
+ used == o.used &&
170
+ remaining == o.remaining &&
171
+ resets_at == o.resets_at &&
172
+ breakdown == o.breakdown &&
173
+ timeline == o.timeline &&
174
+ status_distribution == o.status_distribution &&
175
+ totals == o.totals &&
176
+ range == o.range
177
+ end
178
+
179
+ # @see the `==` method
180
+ # @param [Object] Object to be compared
181
+ def eql?(o)
182
+ self == o
183
+ end
184
+
185
+ # Calculates hash code according to all attributes.
186
+ # @return [Integer] Hash code
187
+ def hash
188
+ [tier, limits, used, remaining, resets_at, breakdown, timeline, status_distribution, totals, range].hash
189
+ end
190
+
191
+ # Builds the object from hash
192
+ # @param [Hash] attributes Model attributes in the form of hash
193
+ # @return [Object] Returns the model itself
194
+ def self.build_from_hash(attributes)
195
+ return nil unless attributes.is_a?(Hash)
196
+ attributes = attributes.transform_keys(&:to_sym)
197
+ transformed_hash = {}
198
+ openapi_types.each_pair do |key, type|
199
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
200
+ transformed_hash["#{key}"] = nil
201
+ elsif type =~ /\AArray<(.*)>/i
202
+ # check to ensure the input is an array given that the attribute
203
+ # is documented as an array but the input is not
204
+ if attributes[attribute_map[key]].is_a?(Array)
205
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
206
+ end
207
+ elsif !attributes[attribute_map[key]].nil?
208
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
209
+ end
210
+ end
211
+ new(transformed_hash)
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ if value.nil?
221
+ is_nullable = self.class.openapi_nullable.include?(attr)
222
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
+ end
224
+
225
+ hash[param] = _to_hash(value)
226
+ end
227
+ hash
228
+ end
229
+
230
+ end
231
+
232
+ end
@@ -0,0 +1,183 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: ivan@vanio.ai
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class GetUsageSummary200ResponseBreakdownInner < ApiModelBase
18
+ attr_accessor :operation_id
19
+
20
+ attr_accessor :request_count
21
+
22
+ attr_accessor :error_count
23
+
24
+ attr_accessor :error_rate
25
+
26
+ attr_accessor :avg_latency_ms
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'operation_id' => :'operationId',
32
+ :'request_count' => :'requestCount',
33
+ :'error_count' => :'errorCount',
34
+ :'error_rate' => :'errorRate',
35
+ :'avg_latency_ms' => :'avgLatencyMs'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'operation_id' => :'String',
53
+ :'request_count' => :'Integer',
54
+ :'error_count' => :'Integer',
55
+ :'error_rate' => :'Float',
56
+ :'avg_latency_ms' => :'Integer'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageSummary200ResponseBreakdownInner` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetUsageSummary200ResponseBreakdownInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'operation_id')
83
+ self.operation_id = attributes[:'operation_id']
84
+ end
85
+
86
+ if attributes.key?(:'request_count')
87
+ self.request_count = attributes[:'request_count']
88
+ end
89
+
90
+ if attributes.key?(:'error_count')
91
+ self.error_count = attributes[:'error_count']
92
+ end
93
+
94
+ if attributes.key?(:'error_rate')
95
+ self.error_rate = attributes[:'error_rate']
96
+ end
97
+
98
+ if attributes.key?(:'avg_latency_ms')
99
+ self.avg_latency_ms = attributes[:'avg_latency_ms']
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ operation_id == o.operation_id &&
124
+ request_count == o.request_count &&
125
+ error_count == o.error_count &&
126
+ error_rate == o.error_rate &&
127
+ avg_latency_ms == o.avg_latency_ms
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [operation_id, request_count, error_count, error_rate, avg_latency_ms].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ transformed_hash = {}
149
+ openapi_types.each_pair do |key, type|
150
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = nil
152
+ elsif type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[attribute_map[key]].is_a?(Array)
156
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
+ end
158
+ elsif !attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
160
+ end
161
+ end
162
+ new(transformed_hash)
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ if value.nil?
172
+ is_nullable = self.class.openapi_nullable.include?(attr)
173
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
174
+ end
175
+
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ end
182
+
183
+ end
@@ -14,16 +14,16 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class DeleteStudioDeployment200ResponseData < ApiModelBase
18
- attr_accessor :deployment_id
17
+ class GetUsageSummary200ResponseLimits < ApiModelBase
18
+ attr_accessor :monthly_requests
19
19
 
20
- attr_accessor :deleted
20
+ attr_accessor :daily_ai_requests
21
21
 
22
22
  # Attribute mapping from ruby-style variable name to JSON key.
23
23
  def self.attribute_map
24
24
  {
25
- :'deployment_id' => :'deployment_id',
26
- :'deleted' => :'deleted'
25
+ :'monthly_requests' => :'monthly_requests',
26
+ :'daily_ai_requests' => :'daily_ai_requests'
27
27
  }
28
28
  end
29
29
 
@@ -40,14 +40,16 @@ module Repull
40
40
  # Attribute type mapping.
41
41
  def self.openapi_types
42
42
  {
43
- :'deployment_id' => :'String',
44
- :'deleted' => :'Boolean'
43
+ :'monthly_requests' => :'Integer',
44
+ :'daily_ai_requests' => :'Integer'
45
45
  }
46
46
  end
47
47
 
48
48
  # List of attributes with nullable: true
49
49
  def self.openapi_nullable
50
50
  Set.new([
51
+ :'monthly_requests',
52
+ :'daily_ai_requests'
51
53
  ])
52
54
  end
53
55
 
@@ -55,24 +57,24 @@ module Repull
55
57
  # @param [Hash] attributes Model attributes in the form of hash
56
58
  def initialize(attributes = {})
57
59
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::DeleteStudioDeployment200ResponseData` initialize method"
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageSummary200ResponseLimits` initialize method"
59
61
  end
60
62
 
61
63
  # check to see if the attribute exists and convert string to symbol for hash key
62
64
  acceptable_attribute_map = self.class.acceptable_attribute_map
63
65
  attributes = attributes.each_with_object({}) { |(k, v), h|
64
66
  if (!acceptable_attribute_map.key?(k.to_sym))
65
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::DeleteStudioDeployment200ResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetUsageSummary200ResponseLimits`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
68
  end
67
69
  h[k.to_sym] = v
68
70
  }
69
71
 
70
- if attributes.key?(:'deployment_id')
71
- self.deployment_id = attributes[:'deployment_id']
72
+ if attributes.key?(:'monthly_requests')
73
+ self.monthly_requests = attributes[:'monthly_requests']
72
74
  end
73
75
 
74
- if attributes.key?(:'deleted')
75
- self.deleted = attributes[:'deleted']
76
+ if attributes.key?(:'daily_ai_requests')
77
+ self.daily_ai_requests = attributes[:'daily_ai_requests']
76
78
  end
77
79
  end
78
80
 
@@ -96,8 +98,8 @@ module Repull
96
98
  def ==(o)
97
99
  return true if self.equal?(o)
98
100
  self.class == o.class &&
99
- deployment_id == o.deployment_id &&
100
- deleted == o.deleted
101
+ monthly_requests == o.monthly_requests &&
102
+ daily_ai_requests == o.daily_ai_requests
101
103
  end
102
104
 
103
105
  # @see the `==` method
@@ -109,7 +111,7 @@ module Repull
109
111
  # Calculates hash code according to all attributes.
110
112
  # @return [Integer] Hash code
111
113
  def hash
112
- [deployment_id, deleted].hash
114
+ [monthly_requests, daily_ai_requests].hash
113
115
  end
114
116
 
115
117
  # Builds the object from hash
@@ -14,16 +14,16 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class DeleteStudioProject200ResponseData < ApiModelBase
18
- attr_accessor :id
17
+ class GetUsageSummary200ResponseRemaining < ApiModelBase
18
+ attr_accessor :monthly
19
19
 
20
- attr_accessor :deleted
20
+ attr_accessor :daily_ai
21
21
 
22
22
  # Attribute mapping from ruby-style variable name to JSON key.
23
23
  def self.attribute_map
24
24
  {
25
- :'id' => :'id',
26
- :'deleted' => :'deleted'
25
+ :'monthly' => :'monthly',
26
+ :'daily_ai' => :'daily_ai'
27
27
  }
28
28
  end
29
29
 
@@ -40,14 +40,16 @@ module Repull
40
40
  # Attribute type mapping.
41
41
  def self.openapi_types
42
42
  {
43
- :'id' => :'String',
44
- :'deleted' => :'Boolean'
43
+ :'monthly' => :'Integer',
44
+ :'daily_ai' => :'Integer'
45
45
  }
46
46
  end
47
47
 
48
48
  # List of attributes with nullable: true
49
49
  def self.openapi_nullable
50
50
  Set.new([
51
+ :'monthly',
52
+ :'daily_ai'
51
53
  ])
52
54
  end
53
55
 
@@ -55,24 +57,24 @@ module Repull
55
57
  # @param [Hash] attributes Model attributes in the form of hash
56
58
  def initialize(attributes = {})
57
59
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::DeleteStudioProject200ResponseData` initialize method"
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageSummary200ResponseRemaining` initialize method"
59
61
  end
60
62
 
61
63
  # check to see if the attribute exists and convert string to symbol for hash key
62
64
  acceptable_attribute_map = self.class.acceptable_attribute_map
63
65
  attributes = attributes.each_with_object({}) { |(k, v), h|
64
66
  if (!acceptable_attribute_map.key?(k.to_sym))
65
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::DeleteStudioProject200ResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetUsageSummary200ResponseRemaining`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
68
  end
67
69
  h[k.to_sym] = v
68
70
  }
69
71
 
70
- if attributes.key?(:'id')
71
- self.id = attributes[:'id']
72
+ if attributes.key?(:'monthly')
73
+ self.monthly = attributes[:'monthly']
72
74
  end
73
75
 
74
- if attributes.key?(:'deleted')
75
- self.deleted = attributes[:'deleted']
76
+ if attributes.key?(:'daily_ai')
77
+ self.daily_ai = attributes[:'daily_ai']
76
78
  end
77
79
  end
78
80
 
@@ -96,8 +98,8 @@ module Repull
96
98
  def ==(o)
97
99
  return true if self.equal?(o)
98
100
  self.class == o.class &&
99
- id == o.id &&
100
- deleted == o.deleted
101
+ monthly == o.monthly &&
102
+ daily_ai == o.daily_ai
101
103
  end
102
104
 
103
105
  # @see the `==` method
@@ -109,7 +111,7 @@ module Repull
109
111
  # Calculates hash code according to all attributes.
110
112
  # @return [Integer] Hash code
111
113
  def hash
112
- [id, deleted].hash
114
+ [monthly, daily_ai].hash
113
115
  end
114
116
 
115
117
  # Builds the object from hash