repull 0.2.35 → 0.2.37

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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/connect_api.rb +70 -2
  3. data/lib/repull/api/conversations_api.rb +2 -2
  4. data/lib/repull/api/listings_api.rb +8 -8
  5. data/lib/repull/api/migrate_api.rb +68 -0
  6. data/lib/repull/api/reservations_api.rb +4 -4
  7. data/lib/repull/models/account_disconnected_payload.rb +16 -4
  8. data/lib/repull/models/account_disconnected_payload_listings_inner.rb +157 -0
  9. data/lib/repull/models/airbnb_calendar_operation.rb +12 -12
  10. data/lib/repull/models/booking_unacknowledged_event.rb +281 -0
  11. data/lib/repull/models/booking_unacknowledged_payload.rb +229 -0
  12. data/lib/repull/models/channel_degraded_event.rb +279 -0
  13. data/lib/repull/models/channel_degraded_payload.rb +174 -0
  14. data/lib/repull/models/channel_degraded_payload_object.rb +262 -0
  15. data/lib/repull/models/channel_sync_failed_event.rb +280 -0
  16. data/lib/repull/models/channel_sync_failure_payload.rb +214 -0
  17. data/lib/repull/models/channel_sync_failure_payload_failures_inner.rb +213 -0
  18. data/lib/repull/models/channel_sync_failure_payload_object.rb +289 -0
  19. data/lib/repull/models/charge_per.rb +42 -0
  20. data/lib/repull/models/create_connect_session_request.rb +2 -2
  21. data/lib/repull/models/create_connection_request.rb +1 -1
  22. data/lib/repull/models/import_from_channex200_response.rb +147 -0
  23. data/lib/repull/models/import_from_channex200_response_data.rb +324 -0
  24. data/lib/repull/models/import_from_channex200_response_data_channels_inner.rb +263 -0
  25. data/lib/repull/models/import_from_channex200_response_data_properties_inner.rb +222 -0
  26. data/lib/repull/models/import_from_channex200_response_data_summary.rb +201 -0
  27. data/lib/repull/models/import_from_channex200_response_data_summary_bookings.rb +165 -0
  28. data/lib/repull/models/import_from_channex200_response_data_summary_properties.rb +165 -0
  29. data/lib/repull/models/import_from_channex_request.rb +223 -0
  30. data/lib/repull/models/inquiry_webhook_object.rb +10 -1
  31. data/lib/repull/models/inquiry_webhook_object_guest.rb +159 -0
  32. data/lib/repull/models/list_inquiries200_response_data_inner.rb +27 -1
  33. data/lib/repull/models/list_inquiries200_response_data_inner_guest.rb +160 -0
  34. data/lib/repull/models/listing.rb +82 -1
  35. data/lib/repull/models/listing_channel.rb +15 -4
  36. data/lib/repull/models/listing_content_photo.rb +206 -0
  37. data/lib/repull/models/listing_fee.rb +229 -0
  38. data/lib/repull/models/listing_policies.rb +257 -0
  39. data/lib/repull/models/listing_policies_check_in.rb +179 -0
  40. data/lib/repull/models/listing_policies_check_out.rb +148 -0
  41. data/lib/repull/models/listing_policies_quiet_hours.rb +156 -0
  42. data/lib/repull/models/listing_pricing_settings.rb +233 -0
  43. data/lib/repull/models/listing_room.rb +190 -0
  44. data/lib/repull/models/listing_room_beds_inner.rb +156 -0
  45. data/lib/repull/models/listing_rules.rb +212 -0
  46. data/lib/repull/models/listing_tax.rb +241 -0
  47. data/lib/repull/models/listing_webhook_object_channels_inner.rb +16 -5
  48. data/lib/repull/models/reservation.rb +25 -1
  49. data/lib/repull/models/reservation_access_code.rb +301 -0
  50. data/lib/repull/models/reservation_access_code_locks_inner.rb +190 -0
  51. data/lib/repull/models/reservation_thread_assigned_event.rb +279 -0
  52. data/lib/repull/models/reservation_thread_assigned_payload.rb +174 -0
  53. data/lib/repull/models/reservation_thread_assigned_payload_object.rb +249 -0
  54. data/lib/repull/models/submit_ciirus_credentials200_response.rb +213 -0
  55. data/lib/repull/models/submit_ciirus_credentials200_response_account_info.rb +159 -0
  56. data/lib/repull/models/submit_ciirus_credentials_request.rb +184 -0
  57. data/lib/repull/models/submit_ciirus_credentials_request_credentials.rb +203 -0
  58. data/lib/repull/models/webhook_event.rb +8 -0
  59. data/lib/repull/models/webhook_event_type.rb +5 -1
  60. data/lib/repull/version.rb +1 -1
  61. data/lib/repull.rb +41 -0
  62. data/openapi/v1.json +1937 -32
  63. data/scripts/regen.sh +1 -1
  64. metadata +43 -4
  65. data/spec/api/plumguide_api_spec.rb +0 -85
@@ -0,0 +1,223 @@
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` | unlimited (10 included, then billed per listing) | | `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 ImportFromChannexRequest < ApiModelBase
18
+ # Your Channex API key (the `user-api-key` header value). Used for this request only.
19
+ attr_accessor :api_key
20
+
21
+ # `production` reads app.channex.io, `staging` reads staging.channex.io.
22
+ attr_accessor :environment
23
+
24
+ # Match and report without writing anything.
25
+ attr_accessor :dry_run
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'api_key' => :'apiKey',
53
+ :'environment' => :'environment',
54
+ :'dry_run' => :'dryRun'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'api_key' => :'String',
72
+ :'environment' => :'String',
73
+ :'dry_run' => :'Boolean'
74
+ }
75
+ end
76
+
77
+ # List of attributes with nullable: true
78
+ def self.openapi_nullable
79
+ Set.new([
80
+ ])
81
+ end
82
+
83
+ # Initializes the object
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ def initialize(attributes = {})
86
+ if (!attributes.is_a?(Hash))
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ImportFromChannexRequest` initialize method"
88
+ end
89
+
90
+ # check to see if the attribute exists and convert string to symbol for hash key
91
+ acceptable_attribute_map = self.class.acceptable_attribute_map
92
+ attributes = attributes.each_with_object({}) { |(k, v), h|
93
+ if (!acceptable_attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ImportFromChannexRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
95
+ end
96
+ h[k.to_sym] = v
97
+ }
98
+
99
+ if attributes.key?(:'api_key')
100
+ self.api_key = attributes[:'api_key']
101
+ else
102
+ self.api_key = nil
103
+ end
104
+
105
+ if attributes.key?(:'environment')
106
+ self.environment = attributes[:'environment']
107
+ else
108
+ self.environment = 'production'
109
+ end
110
+
111
+ if attributes.key?(:'dry_run')
112
+ self.dry_run = attributes[:'dry_run']
113
+ else
114
+ self.dry_run = false
115
+ end
116
+ end
117
+
118
+ # Show invalid properties with the reasons. Usually used together with valid?
119
+ # @return Array for valid properties with the reasons
120
+ def list_invalid_properties
121
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
+ invalid_properties = Array.new
123
+ if @api_key.nil?
124
+ invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
125
+ end
126
+
127
+ invalid_properties
128
+ end
129
+
130
+ # Check to see if the all the properties in the model are valid
131
+ # @return true if the model is valid
132
+ def valid?
133
+ warn '[DEPRECATED] the `valid?` method is obsolete'
134
+ return false if @api_key.nil?
135
+ environment_validator = EnumAttributeValidator.new('String', ["production", "staging"])
136
+ return false unless environment_validator.valid?(@environment)
137
+ true
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] api_key Value to be assigned
142
+ def api_key=(api_key)
143
+ if api_key.nil?
144
+ fail ArgumentError, 'api_key cannot be nil'
145
+ end
146
+
147
+ @api_key = api_key
148
+ end
149
+
150
+ # Custom attribute writer method checking allowed values (enum).
151
+ # @param [Object] environment Object to be assigned
152
+ def environment=(environment)
153
+ validator = EnumAttributeValidator.new('String', ["production", "staging"])
154
+ unless validator.valid?(environment)
155
+ fail ArgumentError, "invalid value for \"environment\", must be one of #{validator.allowable_values}."
156
+ end
157
+ @environment = environment
158
+ end
159
+
160
+ # Checks equality by comparing each attribute.
161
+ # @param [Object] Object to be compared
162
+ def ==(o)
163
+ return true if self.equal?(o)
164
+ self.class == o.class &&
165
+ api_key == o.api_key &&
166
+ environment == o.environment &&
167
+ dry_run == o.dry_run
168
+ end
169
+
170
+ # @see the `==` method
171
+ # @param [Object] Object to be compared
172
+ def eql?(o)
173
+ self == o
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Integer] Hash code
178
+ def hash
179
+ [api_key, environment, dry_run].hash
180
+ end
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def self.build_from_hash(attributes)
186
+ return nil unless attributes.is_a?(Hash)
187
+ attributes = attributes.transform_keys(&:to_sym)
188
+ transformed_hash = {}
189
+ openapi_types.each_pair do |key, type|
190
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
191
+ transformed_hash["#{key}"] = nil
192
+ elsif type =~ /\AArray<(.*)>/i
193
+ # check to ensure the input is an array given that the attribute
194
+ # is documented as an array but the input is not
195
+ if attributes[attribute_map[key]].is_a?(Array)
196
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
197
+ end
198
+ elsif !attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
200
+ end
201
+ end
202
+ new(transformed_hash)
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ end
222
+
223
+ end
@@ -33,6 +33,8 @@ module Repull
33
33
 
34
34
  attr_accessor :check_out
35
35
 
36
+ attr_accessor :guest
37
+
36
38
  attr_accessor :guests
37
39
 
38
40
  attr_accessor :expected_payout
@@ -61,6 +63,7 @@ module Repull
61
63
  :'status' => :'status',
62
64
  :'check_in' => :'checkIn',
63
65
  :'check_out' => :'checkOut',
66
+ :'guest' => :'guest',
64
67
  :'guests' => :'guests',
65
68
  :'expected_payout' => :'expectedPayout',
66
69
  :'reservation_id' => :'reservationId',
@@ -92,6 +95,7 @@ module Repull
92
95
  :'status' => :'String',
93
96
  :'check_in' => :'Date',
94
97
  :'check_out' => :'Date',
98
+ :'guest' => :'InquiryWebhookObjectGuest',
95
99
  :'guests' => :'InquiryWebhookObjectGuests',
96
100
  :'expected_payout' => :'InquiryWebhookObjectExpectedPayout',
97
101
  :'reservation_id' => :'String',
@@ -167,6 +171,10 @@ module Repull
167
171
  self.check_out = attributes[:'check_out']
168
172
  end
169
173
 
174
+ if attributes.key?(:'guest')
175
+ self.guest = attributes[:'guest']
176
+ end
177
+
170
178
  if attributes.key?(:'guests')
171
179
  self.guests = attributes[:'guests']
172
180
  end
@@ -257,6 +265,7 @@ module Repull
257
265
  status == o.status &&
258
266
  check_in == o.check_in &&
259
267
  check_out == o.check_out &&
268
+ guest == o.guest &&
260
269
  guests == o.guests &&
261
270
  expected_payout == o.expected_payout &&
262
271
  reservation_id == o.reservation_id &&
@@ -276,7 +285,7 @@ module Repull
276
285
  # Calculates hash code according to all attributes.
277
286
  # @return [Integer] Hash code
278
287
  def hash
279
- [id, conversation_id, listing_id, channel, status, check_in, check_out, guests, expected_payout, reservation_id, relayed_by, respond_by, responded_at, created_at, updated_at].hash
288
+ [id, conversation_id, listing_id, channel, status, check_in, check_out, guest, guests, expected_payout, reservation_id, relayed_by, respond_by, responded_at, created_at, updated_at].hash
280
289
  end
281
290
 
282
291
  # Builds the object from hash
@@ -0,0 +1,159 @@
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` | unlimited (10 included, then billed per listing) | | `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
+ # Who asked. Airbnb shares only the first name before the guest books.
18
+ class InquiryWebhookObjectGuest < ApiModelBase
19
+ attr_accessor :id
20
+
21
+ attr_accessor :first_name
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'id' => :'id',
27
+ :'first_name' => :'firstName'
28
+ }
29
+ end
30
+
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ acceptable_attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'id' => :'String',
45
+ :'first_name' => :'String'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ :'id',
53
+ :'first_name'
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::InquiryWebhookObjectGuest` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ acceptable_attribute_map = self.class.acceptable_attribute_map
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!acceptable_attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::InquiryWebhookObjectGuest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.key?(:'first_name')
78
+ self.first_name = attributes[:'first_name']
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ id == o.id &&
103
+ first_name == o.first_name
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [id, first_name].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ transformed_hash = {}
125
+ openapi_types.each_pair do |key, type|
126
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = nil
128
+ elsif type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[attribute_map[key]].is_a?(Array)
132
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
+ end
134
+ elsif !attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
+ end
137
+ end
138
+ new(transformed_hash)
139
+ end
140
+
141
+ # Returns the object in the form of hash
142
+ # @return [Hash] Returns the object in the form of hash
143
+ def to_hash
144
+ hash = {}
145
+ self.class.attribute_map.each_pair do |attr, param|
146
+ value = self.send(attr)
147
+ if value.nil?
148
+ is_nullable = self.class.openapi_nullable.include?(attr)
149
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
150
+ end
151
+
152
+ hash[param] = _to_hash(value)
153
+ end
154
+ hash
155
+ end
156
+
157
+ end
158
+
159
+ end
@@ -32,6 +32,8 @@ module Repull
32
32
 
33
33
  attr_accessor :check_out
34
34
 
35
+ attr_accessor :guest
36
+
35
37
  attr_accessor :guests
36
38
 
37
39
  attr_accessor :expected_payout
@@ -83,6 +85,7 @@ module Repull
83
85
  :'status' => :'status',
84
86
  :'check_in' => :'checkIn',
85
87
  :'check_out' => :'checkOut',
88
+ :'guest' => :'guest',
86
89
  :'guests' => :'guests',
87
90
  :'expected_payout' => :'expectedPayout',
88
91
  :'reservation_id' => :'reservationId',
@@ -114,6 +117,7 @@ module Repull
114
117
  :'status' => :'String',
115
118
  :'check_in' => :'Date',
116
119
  :'check_out' => :'Date',
120
+ :'guest' => :'ListInquiries200ResponseDataInnerGuest',
117
121
  :'guests' => :'ListInquiries200ResponseDataInnerGuests',
118
122
  :'expected_payout' => :'ListInquiries200ResponseDataInnerExpectedPayout',
119
123
  :'reservation_id' => :'String',
@@ -199,6 +203,12 @@ module Repull
199
203
  self.check_out = nil
200
204
  end
201
205
 
206
+ if attributes.key?(:'guest')
207
+ self.guest = attributes[:'guest']
208
+ else
209
+ self.guest = nil
210
+ end
211
+
202
212
  if attributes.key?(:'guests')
203
213
  self.guests = attributes[:'guests']
204
214
  else
@@ -265,6 +275,10 @@ module Repull
265
275
  invalid_properties.push('invalid value for "status", status cannot be nil.')
266
276
  end
267
277
 
278
+ if @guest.nil?
279
+ invalid_properties.push('invalid value for "guest", guest cannot be nil.')
280
+ end
281
+
268
282
  if @guests.nil?
269
283
  invalid_properties.push('invalid value for "guests", guests cannot be nil.')
270
284
  end
@@ -285,6 +299,7 @@ module Repull
285
299
  return false if @status.nil?
286
300
  status_validator = EnumAttributeValidator.new('String', ["open", "pre_approved", "special_offer_sent", "booked", "expired", "declined", "not_possible"])
287
301
  return false unless status_validator.valid?(@status)
302
+ return false if @guest.nil?
288
303
  return false if @guests.nil?
289
304
  return false if @expected_payout.nil?
290
305
  true
@@ -320,6 +335,16 @@ module Repull
320
335
  @status = status
321
336
  end
322
337
 
338
+ # Custom attribute writer method with validation
339
+ # @param [Object] guest Value to be assigned
340
+ def guest=(guest)
341
+ if guest.nil?
342
+ fail ArgumentError, 'guest cannot be nil'
343
+ end
344
+
345
+ @guest = guest
346
+ end
347
+
323
348
  # Custom attribute writer method with validation
324
349
  # @param [Object] guests Value to be assigned
325
350
  def guests=(guests)
@@ -352,6 +377,7 @@ module Repull
352
377
  status == o.status &&
353
378
  check_in == o.check_in &&
354
379
  check_out == o.check_out &&
380
+ guest == o.guest &&
355
381
  guests == o.guests &&
356
382
  expected_payout == o.expected_payout &&
357
383
  reservation_id == o.reservation_id &&
@@ -371,7 +397,7 @@ module Repull
371
397
  # Calculates hash code according to all attributes.
372
398
  # @return [Integer] Hash code
373
399
  def hash
374
- [id, conversation_id, listing_id, channel, status, check_in, check_out, guests, expected_payout, reservation_id, relayed_by, respond_by, responded_at, created_at, updated_at].hash
400
+ [id, conversation_id, listing_id, channel, status, check_in, check_out, guest, guests, expected_payout, reservation_id, relayed_by, respond_by, responded_at, created_at, updated_at].hash
375
401
  end
376
402
 
377
403
  # Builds the object from hash