repull 0.2.26 → 0.2.27

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 (52) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +38 -23
  3. data/lib/repull/api/booking_com_api.rb +9 -2
  4. data/lib/repull/api/connect_api.rb +4 -4
  5. data/lib/repull/api/listings_api.rb +2 -2
  6. data/lib/repull/api/properties_api.rb +2 -2
  7. data/lib/repull/api/reservations_api.rb +93 -6
  8. data/lib/repull/api/vrbo_api.rb +9 -2
  9. data/lib/repull/models/airbnb_listing.rb +13 -2
  10. data/lib/repull/models/airbnb_listing_details_write_request.rb +109 -5
  11. data/lib/repull/models/airbnb_listing_details_write_request_check_in_option.rb +1 -1
  12. data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +2 -2
  13. data/lib/repull/models/airbnb_pricing_write_request.rb +30 -2
  14. data/lib/repull/models/airbnb_pricing_write_request_fees_inner.rb +291 -0
  15. data/lib/repull/models/booking_property_listings_inner.rb +57 -1
  16. data/lib/repull/models/cancel_reservation200_response.rb +1 -1
  17. data/lib/repull/models/connect_status.rb +35 -4
  18. data/lib/repull/models/connect_status_capabilities.rb +148 -0
  19. data/lib/repull/models/connection.rb +28 -5
  20. data/lib/repull/models/connection_action.rb +188 -0
  21. data/lib/repull/models/create_connect_session_request.rb +39 -1
  22. data/lib/repull/models/create_connection_request.rb +39 -1
  23. data/lib/repull/models/error_error.rb +13 -1
  24. data/lib/repull/models/{cancel_reservation200_response_pms.rb → error_error_listings_inner.rb} +36 -30
  25. data/lib/repull/models/get_booking_extranet_login_status200_response.rb +2 -1
  26. data/lib/repull/models/list_listing_units200_response.rb +2 -1
  27. data/lib/repull/models/listing.rb +23 -2
  28. data/lib/repull/models/listing_capabilities.rb +148 -0
  29. data/lib/repull/models/property.rb +14 -3
  30. data/lib/repull/models/reservation_capabilities.rb +230 -0
  31. data/lib/repull/models/reservation_create_request.rb +172 -33
  32. data/lib/repull/models/reservation_create_response.rb +6 -6
  33. data/lib/repull/models/reservation_create_response_unit.rb +1 -1
  34. data/lib/repull/models/{reservation_create_response_pms.rb → reservation_pms_outcome.rb} +38 -8
  35. data/lib/repull/models/reservation_pms_outcome_quote.rb +168 -0
  36. data/lib/repull/models/{cancel_reservation200_response_pms_errors_inner.rb → reservation_pms_section_error.rb} +16 -16
  37. data/lib/repull/models/reservation_quote_request.rb +312 -0
  38. data/lib/repull/models/reservation_quote_response.rb +228 -0
  39. data/lib/repull/models/reservation_quote_response_breakdown.rb +175 -0
  40. data/lib/repull/models/reservation_update_response.rb +16 -6
  41. data/lib/repull/models/submit_smoobu_credentials_request.rb +2 -5
  42. data/lib/repull/models/submit_smoobu_credentials_request_credentials.rb +193 -0
  43. data/lib/repull/models/update_airbnb_checkin_guide200_response.rb +147 -0
  44. data/lib/repull/models/update_airbnb_checkin_guide200_response_data.rb +177 -0
  45. data/lib/repull/models/{airbnb_permits_write_request_permits_inner_answers_value.rb → update_airbnb_checkin_guide200_response_data_steps_inner.rb} +24 -43
  46. data/lib/repull/models/update_airbnb_checkin_guide_request.rb +186 -0
  47. data/lib/repull/models/update_airbnb_checkin_guide_request_steps_inner.rb +182 -0
  48. data/lib/repull/version.rb +1 -1
  49. data/lib/repull.rb +18 -4
  50. data/openapi/v1.json +2059 -335
  51. data/scripts/regen.sh +1 -1
  52. metadata +20 -6
@@ -0,0 +1,228 @@
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_live_YOUR_API_KEY ``` ## 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 `resetsAt` 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
+
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 ReservationQuoteResponse < ApiModelBase
18
+ attr_accessor :listing_id
19
+
20
+ # The PMS that priced it.
21
+ attr_accessor :provider
22
+
23
+ attr_accessor :check_in
24
+
25
+ attr_accessor :check_out
26
+
27
+ # Whether the PMS would take the booking as asked.
28
+ attr_accessor :available
29
+
30
+ # Total for the stay, in `currency`. Null when the PMS gave no price (e.g. not available).
31
+ attr_accessor :total
32
+
33
+ attr_accessor :currency
34
+
35
+ attr_accessor :breakdown
36
+
37
+ # The PMS's reasons, verbatim, when `available` is false.
38
+ attr_accessor :restrictions
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'listing_id' => :'listingId',
44
+ :'provider' => :'provider',
45
+ :'check_in' => :'checkIn',
46
+ :'check_out' => :'checkOut',
47
+ :'available' => :'available',
48
+ :'total' => :'total',
49
+ :'currency' => :'currency',
50
+ :'breakdown' => :'breakdown',
51
+ :'restrictions' => :'restrictions'
52
+ }
53
+ end
54
+
55
+ # Returns attribute mapping this model knows about
56
+ def self.acceptable_attribute_map
57
+ attribute_map
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ acceptable_attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'listing_id' => :'String',
69
+ :'provider' => :'String',
70
+ :'check_in' => :'Date',
71
+ :'check_out' => :'Date',
72
+ :'available' => :'Boolean',
73
+ :'total' => :'Float',
74
+ :'currency' => :'String',
75
+ :'breakdown' => :'ReservationQuoteResponseBreakdown',
76
+ :'restrictions' => :'Array<String>'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ :'total',
84
+ :'currency',
85
+ :'breakdown',
86
+ ])
87
+ end
88
+
89
+ # Initializes the object
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ def initialize(attributes = {})
92
+ if (!attributes.is_a?(Hash))
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ReservationQuoteResponse` initialize method"
94
+ end
95
+
96
+ # check to see if the attribute exists and convert string to symbol for hash key
97
+ acceptable_attribute_map = self.class.acceptable_attribute_map
98
+ attributes = attributes.each_with_object({}) { |(k, v), h|
99
+ if (!acceptable_attribute_map.key?(k.to_sym))
100
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ReservationQuoteResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
101
+ end
102
+ h[k.to_sym] = v
103
+ }
104
+
105
+ if attributes.key?(:'listing_id')
106
+ self.listing_id = attributes[:'listing_id']
107
+ end
108
+
109
+ if attributes.key?(:'provider')
110
+ self.provider = attributes[:'provider']
111
+ end
112
+
113
+ if attributes.key?(:'check_in')
114
+ self.check_in = attributes[:'check_in']
115
+ end
116
+
117
+ if attributes.key?(:'check_out')
118
+ self.check_out = attributes[:'check_out']
119
+ end
120
+
121
+ if attributes.key?(:'available')
122
+ self.available = attributes[:'available']
123
+ end
124
+
125
+ if attributes.key?(:'total')
126
+ self.total = attributes[:'total']
127
+ end
128
+
129
+ if attributes.key?(:'currency')
130
+ self.currency = attributes[:'currency']
131
+ end
132
+
133
+ if attributes.key?(:'breakdown')
134
+ self.breakdown = attributes[:'breakdown']
135
+ end
136
+
137
+ if attributes.key?(:'restrictions')
138
+ if (value = attributes[:'restrictions']).is_a?(Array)
139
+ self.restrictions = value
140
+ end
141
+ end
142
+ end
143
+
144
+ # Show invalid properties with the reasons. Usually used together with valid?
145
+ # @return Array for valid properties with the reasons
146
+ def list_invalid_properties
147
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
148
+ invalid_properties = Array.new
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ warn '[DEPRECATED] the `valid?` method is obsolete'
156
+ true
157
+ end
158
+
159
+ # Checks equality by comparing each attribute.
160
+ # @param [Object] Object to be compared
161
+ def ==(o)
162
+ return true if self.equal?(o)
163
+ self.class == o.class &&
164
+ listing_id == o.listing_id &&
165
+ provider == o.provider &&
166
+ check_in == o.check_in &&
167
+ check_out == o.check_out &&
168
+ available == o.available &&
169
+ total == o.total &&
170
+ currency == o.currency &&
171
+ breakdown == o.breakdown &&
172
+ restrictions == o.restrictions
173
+ end
174
+
175
+ # @see the `==` method
176
+ # @param [Object] Object to be compared
177
+ def eql?(o)
178
+ self == o
179
+ end
180
+
181
+ # Calculates hash code according to all attributes.
182
+ # @return [Integer] Hash code
183
+ def hash
184
+ [listing_id, provider, check_in, check_out, available, total, currency, breakdown, restrictions].hash
185
+ end
186
+
187
+ # Builds the object from hash
188
+ # @param [Hash] attributes Model attributes in the form of hash
189
+ # @return [Object] Returns the model itself
190
+ def self.build_from_hash(attributes)
191
+ return nil unless attributes.is_a?(Hash)
192
+ attributes = attributes.transform_keys(&:to_sym)
193
+ transformed_hash = {}
194
+ openapi_types.each_pair do |key, type|
195
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = nil
197
+ elsif type =~ /\AArray<(.*)>/i
198
+ # check to ensure the input is an array given that the attribute
199
+ # is documented as an array but the input is not
200
+ if attributes[attribute_map[key]].is_a?(Array)
201
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
202
+ end
203
+ elsif !attributes[attribute_map[key]].nil?
204
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
205
+ end
206
+ end
207
+ new(transformed_hash)
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ end
227
+
228
+ end
@@ -0,0 +1,175 @@
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_live_YOUR_API_KEY ``` ## 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 `resetsAt` 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
+
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
+ # The parts the PMS itemized; absent parts were not itemized.
18
+ class ReservationQuoteResponseBreakdown < ApiModelBase
19
+ attr_accessor :accommodation
20
+
21
+ attr_accessor :cleaning_fee
22
+
23
+ attr_accessor :taxes
24
+
25
+ attr_accessor :fees
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'accommodation' => :'accommodation',
31
+ :'cleaning_fee' => :'cleaningFee',
32
+ :'taxes' => :'taxes',
33
+ :'fees' => :'fees'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'accommodation' => :'Float',
51
+ :'cleaning_fee' => :'Float',
52
+ :'taxes' => :'Float',
53
+ :'fees' => :'Float'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ReservationQuoteResponseBreakdown` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ acceptable_attribute_map = self.class.acceptable_attribute_map
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!acceptable_attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ReservationQuoteResponseBreakdown`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'accommodation')
80
+ self.accommodation = attributes[:'accommodation']
81
+ end
82
+
83
+ if attributes.key?(:'cleaning_fee')
84
+ self.cleaning_fee = attributes[:'cleaning_fee']
85
+ end
86
+
87
+ if attributes.key?(:'taxes')
88
+ self.taxes = attributes[:'taxes']
89
+ end
90
+
91
+ if attributes.key?(:'fees')
92
+ self.fees = attributes[:'fees']
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
+ true
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ accommodation == o.accommodation &&
117
+ cleaning_fee == o.cleaning_fee &&
118
+ taxes == o.taxes &&
119
+ fees == o.fees
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [accommodation, cleaning_fee, taxes, fees].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ attributes = attributes.transform_keys(&:to_sym)
140
+ transformed_hash = {}
141
+ openapi_types.each_pair do |key, type|
142
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = nil
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[attribute_map[key]].is_a?(Array)
148
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
+ end
150
+ elsif !attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
+ end
153
+ end
154
+ new(transformed_hash)
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ if value.nil?
164
+ is_nullable = self.class.openapi_nullable.include?(attr)
165
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
166
+ end
167
+
168
+ hash[param] = _to_hash(value)
169
+ end
170
+ hash
171
+ end
172
+
173
+ end
174
+
175
+ end
@@ -15,6 +15,7 @@ require 'time'
15
15
 
16
16
  module Repull
17
17
  class ReservationUpdateResponse < ApiModelBase
18
+ # A string, like every id in API responses.
18
19
  attr_accessor :id
19
20
 
20
21
  attr_accessor :confirmation_code
@@ -37,6 +38,8 @@ module Repull
37
38
  # The fields this request actually changed.
38
39
  attr_accessor :changed
39
40
 
41
+ attr_accessor :pms
42
+
40
43
  # Attribute mapping from ruby-style variable name to JSON key.
41
44
  def self.attribute_map
42
45
  {
@@ -49,7 +52,8 @@ module Repull
49
52
  :'check_out_time' => :'checkOutTime',
50
53
  :'status' => :'status',
51
54
  :'updated_at' => :'updatedAt',
52
- :'changed' => :'changed'
55
+ :'changed' => :'changed',
56
+ :'pms' => :'pms'
53
57
  }
54
58
  end
55
59
 
@@ -66,16 +70,17 @@ module Repull
66
70
  # Attribute type mapping.
67
71
  def self.openapi_types
68
72
  {
69
- :'id' => :'Integer',
73
+ :'id' => :'String',
70
74
  :'confirmation_code' => :'String',
71
- :'listing_id' => :'Integer',
75
+ :'listing_id' => :'String',
72
76
  :'check_in' => :'Date',
73
77
  :'check_out' => :'Date',
74
78
  :'check_in_time' => :'String',
75
79
  :'check_out_time' => :'String',
76
80
  :'status' => :'String',
77
81
  :'updated_at' => :'Time',
78
- :'changed' => :'Array<String>'
82
+ :'changed' => :'Array<String>',
83
+ :'pms' => :'ReservationPmsOutcome'
79
84
  }
80
85
  end
81
86
 
@@ -150,6 +155,10 @@ module Repull
150
155
  self.changed = value
151
156
  end
152
157
  end
158
+
159
+ if attributes.key?(:'pms')
160
+ self.pms = attributes[:'pms']
161
+ end
153
162
  end
154
163
 
155
164
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -181,7 +190,8 @@ module Repull
181
190
  check_out_time == o.check_out_time &&
182
191
  status == o.status &&
183
192
  updated_at == o.updated_at &&
184
- changed == o.changed
193
+ changed == o.changed &&
194
+ pms == o.pms
185
195
  end
186
196
 
187
197
  # @see the `==` method
@@ -193,7 +203,7 @@ module Repull
193
203
  # Calculates hash code according to all attributes.
194
204
  # @return [Integer] Hash code
195
205
  def hash
196
- [id, confirmation_code, listing_id, check_in, check_out, check_in_time, check_out_time, status, updated_at, changed].hash
206
+ [id, confirmation_code, listing_id, check_in, check_out, check_in_time, check_out_time, status, updated_at, changed, pms].hash
197
207
  end
198
208
 
199
209
  # Builds the object from hash
@@ -18,7 +18,6 @@ module Repull
18
18
  # Connect session id from `POST /v1/connect/smoobu`.
19
19
  attr_accessor :session_id
20
20
 
21
- # API key from Smoobu → Settings → For developers.
22
21
  attr_accessor :credentials
23
22
 
24
23
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -43,7 +42,7 @@ module Repull
43
42
  def self.openapi_types
44
43
  {
45
44
  :'session_id' => :'String',
46
- :'credentials' => :'Hash<String, Object>'
45
+ :'credentials' => :'SubmitSmoobuCredentialsRequestCredentials'
47
46
  }
48
47
  end
49
48
 
@@ -74,9 +73,7 @@ module Repull
74
73
  end
75
74
 
76
75
  if attributes.key?(:'credentials')
77
- if (value = attributes[:'credentials']).is_a?(Hash)
78
- self.credentials = value
79
- end
76
+ self.credentials = attributes[:'credentials']
80
77
  else
81
78
  self.credentials = nil
82
79
  end