repull 0.2.8 → 0.2.9

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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +116 -129
  3. data/lib/repull/api/billing_api.rb +0 -55
  4. data/lib/repull/api/booking_com_api.rb +19 -118
  5. data/lib/repull/api/listings_api.rb +74 -0
  6. data/lib/repull/api/reservations_api.rb +0 -197
  7. data/lib/repull/api/{availability_api.rb → sandbox_api.rb} +35 -66
  8. data/lib/repull/api/vrbo_api.rb +0 -126
  9. data/lib/repull/models/{create_studio_project_request.rb → airbnb_availability_write_request.rb} +38 -52
  10. data/lib/repull/models/{create_studio_deployment201_response_data.rb → airbnb_calendar_operation.rb} +108 -57
  11. data/lib/repull/models/{update_studio_project_request.rb → airbnb_listing_action_request.rb} +55 -47
  12. data/lib/repull/models/{update_availability_request.rb → airbnb_pricing_write_request.rb} +100 -11
  13. data/lib/repull/models/{update_reservation_request.rb → booking_availability_update.rb} +124 -22
  14. data/lib/repull/models/{list_studio_deployments200_response.rb → booking_availability_update_request.rb} +90 -18
  15. data/lib/repull/models/{generate_studio_completion_request_project_id.rb → booking_availability_update_request_property_id.rb} +2 -2
  16. data/lib/repull/models/{get_studio_deployment200_response.rb → booking_availability_update_request_updates_inner.rb} +74 -117
  17. data/lib/repull/models/booking_pricing_rate_update.rb +1 -0
  18. data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +65 -6
  19. data/lib/repull/models/{get_studio_project200_response.rb → listing_content_update_request.rb} +106 -10
  20. data/lib/repull/models/{upsert_studio_project_file200_response.rb → listing_content_update_request_address.rb} +53 -10
  21. data/lib/repull/models/listing_content_update_request_amenities.rb +105 -0
  22. data/lib/repull/models/{create_studio_deployment_request.rb → listing_content_update_request_amenities_one_of_inner.rb} +51 -20
  23. data/lib/repull/models/{create_studio_project_generation_request.rb → listing_content_update_request_occupancy.rb} +42 -28
  24. data/lib/repull/{api/ai_api.rb → models/listing_content_update_request_photos_inner.rb} +77 -59
  25. data/lib/repull/models/{generate_studio_completion200_response_data.rb → listing_content_update_request_photos_inner_one_of.rb} +81 -66
  26. data/lib/repull/models/{generate_studio_completion200_response.rb → listing_content_update_request_policies.rb} +116 -10
  27. data/lib/repull/models/{delete_studio_project200_response_data.rb → listing_content_update_response.rb} +26 -10
  28. data/lib/repull/models/map_airbnb_listing_request.rb +215 -0
  29. data/lib/repull/models/{create_reservation_request.rb → map_airbnb_listing_response.rb} +137 -116
  30. data/lib/repull/models/property.rb +42 -69
  31. data/lib/repull/models/reservation.rb +28 -1
  32. data/lib/repull/models/{upsert_studio_project_file_request.rb → sandbox_fixture_ref.rb} +48 -20
  33. data/lib/repull/models/{delete_studio_deployment200_response_data.rb → sandbox_reset_result.rb} +72 -11
  34. data/lib/repull/models/sandbox_reset_result_deleted.rb +216 -0
  35. data/lib/repull/models/sandbox_seed_result.rb +278 -0
  36. data/lib/repull/version.rb +1 -1
  37. data/lib/repull.rb +24 -35
  38. data/openapi/v1.json +1167 -2030
  39. metadata +26 -37
  40. data/lib/repull/api/studio_api.rb +0 -1094
  41. data/lib/repull/models/create_ai_operation200_response.rb +0 -156
  42. data/lib/repull/models/create_studio_deployment201_response.rb +0 -147
  43. data/lib/repull/models/create_studio_project201_response.rb +0 -147
  44. data/lib/repull/models/create_studio_project201_response_data.rb +0 -199
  45. data/lib/repull/models/create_studio_project_generation201_response.rb +0 -147
  46. data/lib/repull/models/create_studio_project_generation201_response_data.rb +0 -165
  47. data/lib/repull/models/delete_studio_deployment200_response.rb +0 -147
  48. data/lib/repull/models/delete_studio_project200_response.rb +0 -147
  49. data/lib/repull/models/delete_studio_project_file200_response.rb +0 -147
  50. data/lib/repull/models/delete_studio_project_file200_response_data.rb +0 -156
  51. data/lib/repull/models/generate_studio_completion_request.rb +0 -305
  52. data/lib/repull/models/list_studio_project_files200_response.rb +0 -149
  53. data/lib/repull/models/list_studio_projects200_response.rb +0 -149
  54. data/lib/repull/models/upsert_studio_project_file200_response_data.rb +0 -147
@@ -0,0 +1,216 @@
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 SandboxResetResultDeleted < ApiModelBase
18
+ attr_accessor :listings
19
+
20
+ attr_accessor :reservations
21
+
22
+ attr_accessor :connections
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'listings' => :'listings',
28
+ :'reservations' => :'reservations',
29
+ :'connections' => :'connections'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'listings' => :'Integer',
47
+ :'reservations' => :'Integer',
48
+ :'connections' => :'Integer'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::SandboxResetResultDeleted` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::SandboxResetResultDeleted`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'listings')
75
+ self.listings = attributes[:'listings']
76
+ else
77
+ self.listings = nil
78
+ end
79
+
80
+ if attributes.key?(:'reservations')
81
+ self.reservations = attributes[:'reservations']
82
+ else
83
+ self.reservations = nil
84
+ end
85
+
86
+ if attributes.key?(:'connections')
87
+ self.connections = attributes[:'connections']
88
+ else
89
+ self.connections = nil
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ if @listings.nil?
99
+ invalid_properties.push('invalid value for "listings", listings cannot be nil.')
100
+ end
101
+
102
+ if @reservations.nil?
103
+ invalid_properties.push('invalid value for "reservations", reservations cannot be nil.')
104
+ end
105
+
106
+ if @connections.nil?
107
+ invalid_properties.push('invalid value for "connections", connections cannot be nil.')
108
+ end
109
+
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ return false if @listings.nil?
118
+ return false if @reservations.nil?
119
+ return false if @connections.nil?
120
+ true
121
+ end
122
+
123
+ # Custom attribute writer method with validation
124
+ # @param [Object] listings Value to be assigned
125
+ def listings=(listings)
126
+ if listings.nil?
127
+ fail ArgumentError, 'listings cannot be nil'
128
+ end
129
+
130
+ @listings = listings
131
+ end
132
+
133
+ # Custom attribute writer method with validation
134
+ # @param [Object] reservations Value to be assigned
135
+ def reservations=(reservations)
136
+ if reservations.nil?
137
+ fail ArgumentError, 'reservations cannot be nil'
138
+ end
139
+
140
+ @reservations = reservations
141
+ end
142
+
143
+ # Custom attribute writer method with validation
144
+ # @param [Object] connections Value to be assigned
145
+ def connections=(connections)
146
+ if connections.nil?
147
+ fail ArgumentError, 'connections cannot be nil'
148
+ end
149
+
150
+ @connections = connections
151
+ end
152
+
153
+ # Checks equality by comparing each attribute.
154
+ # @param [Object] Object to be compared
155
+ def ==(o)
156
+ return true if self.equal?(o)
157
+ self.class == o.class &&
158
+ listings == o.listings &&
159
+ reservations == o.reservations &&
160
+ connections == o.connections
161
+ end
162
+
163
+ # @see the `==` method
164
+ # @param [Object] Object to be compared
165
+ def eql?(o)
166
+ self == o
167
+ end
168
+
169
+ # Calculates hash code according to all attributes.
170
+ # @return [Integer] Hash code
171
+ def hash
172
+ [listings, reservations, connections].hash
173
+ end
174
+
175
+ # Builds the object from hash
176
+ # @param [Hash] attributes Model attributes in the form of hash
177
+ # @return [Object] Returns the model itself
178
+ def self.build_from_hash(attributes)
179
+ return nil unless attributes.is_a?(Hash)
180
+ attributes = attributes.transform_keys(&:to_sym)
181
+ transformed_hash = {}
182
+ openapi_types.each_pair do |key, type|
183
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
184
+ transformed_hash["#{key}"] = nil
185
+ elsif type =~ /\AArray<(.*)>/i
186
+ # check to ensure the input is an array given that the attribute
187
+ # is documented as an array but the input is not
188
+ if attributes[attribute_map[key]].is_a?(Array)
189
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
190
+ end
191
+ elsif !attributes[attribute_map[key]].nil?
192
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
193
+ end
194
+ end
195
+ new(transformed_hash)
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ if value.nil?
205
+ is_nullable = self.class.openapi_nullable.include?(attr)
206
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
+ end
208
+
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -0,0 +1,278 @@
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
+ # Result of provisioning the sandbox fixture set.
18
+ class SandboxSeedResult < ApiModelBase
19
+ attr_accessor :customer_id
20
+
21
+ attr_accessor :seeded_at
22
+
23
+ # 3 sample listings.
24
+ attr_accessor :listings
25
+
26
+ # 5 reservations across the lifecycle: created, modified, cancelled, date-changed, pending.
27
+ attr_accessor :reservations
28
+
29
+ # 2 fake connected provider accounts: Airbnb + Booking.com.
30
+ attr_accessor :connections
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'customer_id' => :'customerId',
36
+ :'seeded_at' => :'seededAt',
37
+ :'listings' => :'listings',
38
+ :'reservations' => :'reservations',
39
+ :'connections' => :'connections'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'customer_id' => :'String',
57
+ :'seeded_at' => :'Time',
58
+ :'listings' => :'Array<SandboxFixtureRef>',
59
+ :'reservations' => :'Array<SandboxFixtureRef>',
60
+ :'connections' => :'Array<SandboxFixtureRef>'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::SandboxSeedResult` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::SandboxSeedResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'customer_id')
87
+ self.customer_id = attributes[:'customer_id']
88
+ else
89
+ self.customer_id = nil
90
+ end
91
+
92
+ if attributes.key?(:'seeded_at')
93
+ self.seeded_at = attributes[:'seeded_at']
94
+ else
95
+ self.seeded_at = nil
96
+ end
97
+
98
+ if attributes.key?(:'listings')
99
+ if (value = attributes[:'listings']).is_a?(Array)
100
+ self.listings = value
101
+ end
102
+ else
103
+ self.listings = nil
104
+ end
105
+
106
+ if attributes.key?(:'reservations')
107
+ if (value = attributes[:'reservations']).is_a?(Array)
108
+ self.reservations = value
109
+ end
110
+ else
111
+ self.reservations = nil
112
+ end
113
+
114
+ if attributes.key?(:'connections')
115
+ if (value = attributes[:'connections']).is_a?(Array)
116
+ self.connections = value
117
+ end
118
+ else
119
+ self.connections = nil
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
127
+ invalid_properties = Array.new
128
+ if @customer_id.nil?
129
+ invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.')
130
+ end
131
+
132
+ if @seeded_at.nil?
133
+ invalid_properties.push('invalid value for "seeded_at", seeded_at cannot be nil.')
134
+ end
135
+
136
+ if @listings.nil?
137
+ invalid_properties.push('invalid value for "listings", listings cannot be nil.')
138
+ end
139
+
140
+ if @reservations.nil?
141
+ invalid_properties.push('invalid value for "reservations", reservations cannot be nil.')
142
+ end
143
+
144
+ if @connections.nil?
145
+ invalid_properties.push('invalid value for "connections", connections cannot be nil.')
146
+ end
147
+
148
+ invalid_properties
149
+ end
150
+
151
+ # Check to see if the all the properties in the model are valid
152
+ # @return true if the model is valid
153
+ def valid?
154
+ warn '[DEPRECATED] the `valid?` method is obsolete'
155
+ return false if @customer_id.nil?
156
+ return false if @seeded_at.nil?
157
+ return false if @listings.nil?
158
+ return false if @reservations.nil?
159
+ return false if @connections.nil?
160
+ true
161
+ end
162
+
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] customer_id Value to be assigned
165
+ def customer_id=(customer_id)
166
+ if customer_id.nil?
167
+ fail ArgumentError, 'customer_id cannot be nil'
168
+ end
169
+
170
+ @customer_id = customer_id
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] seeded_at Value to be assigned
175
+ def seeded_at=(seeded_at)
176
+ if seeded_at.nil?
177
+ fail ArgumentError, 'seeded_at cannot be nil'
178
+ end
179
+
180
+ @seeded_at = seeded_at
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] listings Value to be assigned
185
+ def listings=(listings)
186
+ if listings.nil?
187
+ fail ArgumentError, 'listings cannot be nil'
188
+ end
189
+
190
+ @listings = listings
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] reservations Value to be assigned
195
+ def reservations=(reservations)
196
+ if reservations.nil?
197
+ fail ArgumentError, 'reservations cannot be nil'
198
+ end
199
+
200
+ @reservations = reservations
201
+ end
202
+
203
+ # Custom attribute writer method with validation
204
+ # @param [Object] connections Value to be assigned
205
+ def connections=(connections)
206
+ if connections.nil?
207
+ fail ArgumentError, 'connections cannot be nil'
208
+ end
209
+
210
+ @connections = connections
211
+ end
212
+
213
+ # Checks equality by comparing each attribute.
214
+ # @param [Object] Object to be compared
215
+ def ==(o)
216
+ return true if self.equal?(o)
217
+ self.class == o.class &&
218
+ customer_id == o.customer_id &&
219
+ seeded_at == o.seeded_at &&
220
+ listings == o.listings &&
221
+ reservations == o.reservations &&
222
+ connections == o.connections
223
+ end
224
+
225
+ # @see the `==` method
226
+ # @param [Object] Object to be compared
227
+ def eql?(o)
228
+ self == o
229
+ end
230
+
231
+ # Calculates hash code according to all attributes.
232
+ # @return [Integer] Hash code
233
+ def hash
234
+ [customer_id, seeded_at, listings, reservations, connections].hash
235
+ end
236
+
237
+ # Builds the object from hash
238
+ # @param [Hash] attributes Model attributes in the form of hash
239
+ # @return [Object] Returns the model itself
240
+ def self.build_from_hash(attributes)
241
+ return nil unless attributes.is_a?(Hash)
242
+ attributes = attributes.transform_keys(&:to_sym)
243
+ transformed_hash = {}
244
+ openapi_types.each_pair do |key, type|
245
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
246
+ transformed_hash["#{key}"] = nil
247
+ elsif type =~ /\AArray<(.*)>/i
248
+ # check to ensure the input is an array given that the attribute
249
+ # is documented as an array but the input is not
250
+ if attributes[attribute_map[key]].is_a?(Array)
251
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
252
+ end
253
+ elsif !attributes[attribute_map[key]].nil?
254
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
255
+ end
256
+ end
257
+ new(transformed_hash)
258
+ end
259
+
260
+ # Returns the object in the form of hash
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_hash
263
+ hash = {}
264
+ self.class.attribute_map.each_pair do |attr, param|
265
+ value = self.send(attr)
266
+ if value.nil?
267
+ is_nullable = self.class.openapi_nullable.include?(attr)
268
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
269
+ end
270
+
271
+ hash[param] = _to_hash(value)
272
+ end
273
+ hash
274
+ end
275
+
276
+ end
277
+
278
+ end
@@ -11,5 +11,5 @@ Generator version: 7.22.0
11
11
  =end
12
12
 
13
13
  module Repull
14
- VERSION = '0.2.8'
14
+ VERSION = '0.2.9'
15
15
  end
data/lib/repull.rb CHANGED
@@ -28,6 +28,8 @@ require 'repull/models/ai_operation_completed_payload'
28
28
  require 'repull/models/ai_operation_failed_event'
29
29
  require 'repull/models/ai_operation_failed_payload'
30
30
  require 'repull/models/ai_operation_failed_payload_error'
31
+ require 'repull/models/airbnb_availability_write_request'
32
+ require 'repull/models/airbnb_calendar_operation'
31
33
  require 'repull/models/airbnb_connection'
32
34
  require 'repull/models/airbnb_connection_accessibility_amenities_inner'
33
35
  require 'repull/models/airbnb_connection_amenities_inner'
@@ -36,13 +38,19 @@ require 'repull/models/airbnb_connection_response'
36
38
  require 'repull/models/airbnb_connection_summary'
37
39
  require 'repull/models/airbnb_data_freshness'
38
40
  require 'repull/models/airbnb_listing'
41
+ require 'repull/models/airbnb_listing_action_request'
39
42
  require 'repull/models/airbnb_listing_list_response'
43
+ require 'repull/models/airbnb_pricing_write_request'
40
44
  require 'repull/models/airbnb_reservation'
41
45
  require 'repull/models/airbnb_reservation_list_response'
42
46
  require 'repull/models/airbnb_review'
43
47
  require 'repull/models/airbnb_review_list_response'
44
48
  require 'repull/models/airbnb_thread'
45
49
  require 'repull/models/airbnb_thread_list_response'
50
+ require 'repull/models/booking_availability_update'
51
+ require 'repull/models/booking_availability_update_request'
52
+ require 'repull/models/booking_availability_update_request_property_id'
53
+ require 'repull/models/booking_availability_update_request_updates_inner'
46
54
  require 'repull/models/booking_connect_listing_option'
47
55
  require 'repull/models/booking_connect_room'
48
56
  require 'repull/models/booking_connect_rooms_response'
@@ -83,20 +91,9 @@ require 'repull/models/conversation_guest_contact'
83
91
  require 'repull/models/conversation_host'
84
92
  require 'repull/models/conversation_list_response'
85
93
  require 'repull/models/conversation_message_attachment'
86
- require 'repull/models/create_ai_operation200_response'
87
94
  require 'repull/models/create_billing_checkout_request'
88
95
  require 'repull/models/create_connect_session_request'
89
96
  require 'repull/models/create_connection_request'
90
- require 'repull/models/create_reservation_request'
91
- require 'repull/models/create_studio_deployment201_response'
92
- require 'repull/models/create_studio_deployment201_response_data'
93
- require 'repull/models/create_studio_deployment_request'
94
- require 'repull/models/create_studio_project201_response'
95
- require 'repull/models/create_studio_project201_response_data'
96
- require 'repull/models/create_studio_project_generation201_response'
97
- require 'repull/models/create_studio_project_generation201_response_data'
98
- require 'repull/models/create_studio_project_generation_request'
99
- require 'repull/models/create_studio_project_request'
100
97
  require 'repull/models/create_webhook_request'
101
98
  require 'repull/models/custom_schema'
102
99
  require 'repull/models/custom_schema_create'
@@ -106,22 +103,10 @@ require 'repull/models/custom_schema_list_response'
106
103
  require 'repull/models/custom_schema_summary'
107
104
  require 'repull/models/custom_schema_update'
108
105
  require 'repull/models/delete_kv200_response'
109
- require 'repull/models/delete_studio_deployment200_response'
110
- require 'repull/models/delete_studio_deployment200_response_data'
111
- require 'repull/models/delete_studio_project200_response'
112
- require 'repull/models/delete_studio_project200_response_data'
113
- require 'repull/models/delete_studio_project_file200_response'
114
- require 'repull/models/delete_studio_project_file200_response_data'
115
106
  require 'repull/models/error'
116
107
  require 'repull/models/error_error'
117
108
  require 'repull/models/error_error_support'
118
- require 'repull/models/generate_studio_completion200_response'
119
- require 'repull/models/generate_studio_completion200_response_data'
120
- require 'repull/models/generate_studio_completion_request'
121
- require 'repull/models/generate_studio_completion_request_project_id'
122
109
  require 'repull/models/get_health200_response'
123
- require 'repull/models/get_studio_deployment200_response'
124
- require 'repull/models/get_studio_project200_response'
125
110
  require 'repull/models/guest'
126
111
  require 'repull/models/guest_contact'
127
112
  require 'repull/models/guest_flag'
@@ -132,9 +117,6 @@ require 'repull/models/guest_reservations_summary'
132
117
  require 'repull/models/list_kv200_response'
133
118
  require 'repull/models/list_kv200_response_data_inner'
134
119
  require 'repull/models/list_kv200_response_pagination'
135
- require 'repull/models/list_studio_deployments200_response'
136
- require 'repull/models/list_studio_project_files200_response'
137
- require 'repull/models/list_studio_projects200_response'
138
120
  require 'repull/models/listing'
139
121
  require 'repull/models/listing_active_request'
140
122
  require 'repull/models/listing_active_response'
@@ -146,6 +128,15 @@ require 'repull/models/listing_comp_nightly'
146
128
  require 'repull/models/listing_comp_ratings'
147
129
  require 'repull/models/listing_comps_response'
148
130
  require 'repull/models/listing_content'
131
+ require 'repull/models/listing_content_update_request'
132
+ require 'repull/models/listing_content_update_request_address'
133
+ require 'repull/models/listing_content_update_request_amenities'
134
+ require 'repull/models/listing_content_update_request_amenities_one_of_inner'
135
+ require 'repull/models/listing_content_update_request_occupancy'
136
+ require 'repull/models/listing_content_update_request_photos_inner'
137
+ require 'repull/models/listing_content_update_request_photos_inner_one_of'
138
+ require 'repull/models/listing_content_update_request_policies'
139
+ require 'repull/models/listing_content_update_response'
149
140
  require 'repull/models/listing_create_request'
150
141
  require 'repull/models/listing_create_response'
151
142
  require 'repull/models/listing_created_event'
@@ -180,6 +171,8 @@ require 'repull/models/listing_segments_response'
180
171
  require 'repull/models/listing_segments_response_scope'
181
172
  require 'repull/models/listing_updated_event'
182
173
  require 'repull/models/listing_updated_payload'
174
+ require 'repull/models/map_airbnb_listing_request'
175
+ require 'repull/models/map_airbnb_listing_response'
183
176
  require 'repull/models/map_connect_booking_rooms_request'
184
177
  require 'repull/models/map_connect_booking_rooms_response'
185
178
  require 'repull/models/market_browse_category'
@@ -238,6 +231,10 @@ require 'repull/models/review_category'
238
231
  require 'repull/models/review_list_response'
239
232
  require 'repull/models/review_response'
240
233
  require 'repull/models/rotate_webhook_secret200_response'
234
+ require 'repull/models/sandbox_fixture_ref'
235
+ require 'repull/models/sandbox_reset_result'
236
+ require 'repull/models/sandbox_reset_result_deleted'
237
+ require 'repull/models/sandbox_seed_result'
241
238
  require 'repull/models/select_connect_provider_request'
242
239
  require 'repull/models/select_provider_response'
243
240
  require 'repull/models/set_kv_request'
@@ -248,14 +245,8 @@ require 'repull/models/studio_file'
248
245
  require 'repull/models/studio_generation'
249
246
  require 'repull/models/studio_project'
250
247
  require 'repull/models/test_webhook_request'
251
- require 'repull/models/update_availability_request'
252
248
  require 'repull/models/update_listing_pricing_strategy200_response'
253
- require 'repull/models/update_reservation_request'
254
- require 'repull/models/update_studio_project_request'
255
249
  require 'repull/models/update_webhook_request'
256
- require 'repull/models/upsert_studio_project_file200_response'
257
- require 'repull/models/upsert_studio_project_file200_response_data'
258
- require 'repull/models/upsert_studio_project_file_request'
259
250
  require 'repull/models/vrbo_listing'
260
251
  require 'repull/models/vrbo_listing_list_response'
261
252
  require 'repull/models/vrbo_reservation'
@@ -272,10 +263,8 @@ require 'repull/models/webhook_list_response'
272
263
  require 'repull/models/webhook_subscription'
273
264
 
274
265
  # APIs
275
- require 'repull/api/ai_api'
276
266
  require 'repull/api/airbnb_api'
277
267
  require 'repull/api/atlas_api'
278
- require 'repull/api/availability_api'
279
268
  require 'repull/api/billing_api'
280
269
  require 'repull/api/booking_com_api'
281
270
  require 'repull/api/connect_api'
@@ -289,8 +278,8 @@ require 'repull/api/pricing_api'
289
278
  require 'repull/api/properties_api'
290
279
  require 'repull/api/reservations_api'
291
280
  require 'repull/api/reviews_api'
281
+ require 'repull/api/sandbox_api'
292
282
  require 'repull/api/schema_api'
293
- require 'repull/api/studio_api'
294
283
  require 'repull/api/system_api'
295
284
  require 'repull/api/vrbo_api'
296
285
  require 'repull/api/webhooks_api'