repull 0.2.25 → 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 (63) 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 +6 -6
  5. data/lib/repull/api/conversations_api.rb +3 -0
  6. data/lib/repull/api/listings_api.rb +2 -2
  7. data/lib/repull/api/properties_api.rb +5 -2
  8. data/lib/repull/api/reservations_api.rb +96 -6
  9. data/lib/repull/api/reviews_api.rb +3 -0
  10. data/lib/repull/api/vrbo_api.rb +11 -4
  11. data/lib/repull/models/airbnb_listing.rb +13 -2
  12. data/lib/repull/models/airbnb_listing_details_write_request.rb +109 -5
  13. data/lib/repull/models/airbnb_listing_details_write_request_check_in_option.rb +1 -1
  14. data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +2 -2
  15. data/lib/repull/models/airbnb_pricing_write_request.rb +30 -2
  16. data/lib/repull/models/airbnb_pricing_write_request_fees_inner.rb +291 -0
  17. data/lib/repull/models/booking_property_listings_inner.rb +57 -1
  18. data/lib/repull/models/cancel_reservation200_response.rb +1 -1
  19. data/lib/repull/models/connect_session_completed_event.rb +281 -0
  20. data/lib/repull/models/connect_session_completed_payload.rb +210 -0
  21. data/lib/repull/models/connect_status.rb +35 -4
  22. data/lib/repull/models/connect_status_capabilities.rb +148 -0
  23. data/lib/repull/models/connection.rb +28 -5
  24. data/lib/repull/models/connection_action.rb +188 -0
  25. data/lib/repull/models/conversation.rb +12 -1
  26. data/lib/repull/models/conversation_detail.rb +12 -1
  27. data/lib/repull/models/create_connect_session_request.rb +40 -2
  28. data/lib/repull/models/create_connection_request.rb +46 -8
  29. data/lib/repull/models/error_error.rb +13 -1
  30. data/lib/repull/models/{cancel_reservation200_response_pms.rb → error_error_listings_inner.rb} +36 -30
  31. data/lib/repull/models/get_booking_extranet_login_status200_response.rb +2 -1
  32. data/lib/repull/models/list_listing_units200_response.rb +2 -1
  33. data/lib/repull/models/listing.rb +23 -2
  34. data/lib/repull/models/listing_capabilities.rb +148 -0
  35. data/lib/repull/models/property.rb +26 -3
  36. data/lib/repull/models/record_account.rb +170 -0
  37. data/lib/repull/models/reservation.rb +12 -1
  38. data/lib/repull/models/reservation_capabilities.rb +230 -0
  39. data/lib/repull/models/reservation_create_request.rb +172 -33
  40. data/lib/repull/models/reservation_create_response.rb +6 -6
  41. data/lib/repull/models/reservation_create_response_unit.rb +1 -1
  42. data/lib/repull/models/{reservation_create_response_pms.rb → reservation_pms_outcome.rb} +38 -8
  43. data/lib/repull/models/reservation_pms_outcome_quote.rb +168 -0
  44. data/lib/repull/models/{cancel_reservation200_response_pms_errors_inner.rb → reservation_pms_section_error.rb} +16 -16
  45. data/lib/repull/models/reservation_quote_request.rb +312 -0
  46. data/lib/repull/models/reservation_quote_response.rb +228 -0
  47. data/lib/repull/models/reservation_quote_response_breakdown.rb +175 -0
  48. data/lib/repull/models/reservation_update_response.rb +16 -6
  49. data/lib/repull/models/review.rb +12 -1
  50. data/lib/repull/models/submit_smoobu_credentials_request.rb +2 -5
  51. data/lib/repull/models/submit_smoobu_credentials_request_credentials.rb +193 -0
  52. data/lib/repull/models/update_airbnb_checkin_guide200_response.rb +147 -0
  53. data/lib/repull/models/update_airbnb_checkin_guide200_response_data.rb +177 -0
  54. data/lib/repull/models/{airbnb_permits_write_request_permits_inner_answers_value.rb → update_airbnb_checkin_guide200_response_data_steps_inner.rb} +24 -43
  55. data/lib/repull/models/update_airbnb_checkin_guide_request.rb +186 -0
  56. data/lib/repull/models/update_airbnb_checkin_guide_request_steps_inner.rb +182 -0
  57. data/lib/repull/models/webhook_event.rb +2 -0
  58. data/lib/repull/models/webhook_event_type.rb +2 -1
  59. data/lib/repull/version.rb +1 -1
  60. data/lib/repull.rb +21 -4
  61. data/openapi/v1.json +2221 -340
  62. data/scripts/regen.sh +1 -1
  63. metadata +23 -6
@@ -18,9 +18,12 @@ module Repull
18
18
  # Where to send the user after they finish (or cancel). Status query params are appended.
19
19
  attr_accessor :redirect_url
20
20
 
21
- # Opaque pass-through correlation token. Echoed back in the response.
21
+ # Your own correlation token, e.g. your user id (at most 500 characters). Echoed in this response, on the redirect back (`&state=`), in the popup message, and in the `connect.session.completed` webhook.
22
22
  attr_accessor :state
23
23
 
24
+ # Airbnb — how many months of past reservations the first import pulls (1–60). Omit it for the default window. Upcoming stays are always imported. A wider window takes longer to import, because every extra month is more stays to fetch.
25
+ attr_accessor :reservation_history_months
26
+
24
27
  # What the connection may do. Airbnb: the OAuth scope tier. Vrbo: `messaging` (or `read_only`) imports bookings and messages and never pushes the calendar; `full_access` also pushes prices and availability. Setting it locks the choice; omit it to let the host choose on the hosted page (default `full_access`).
25
28
  attr_accessor :access_type
26
29
 
@@ -67,6 +70,7 @@ module Repull
67
70
  {
68
71
  :'redirect_url' => :'redirectUrl',
69
72
  :'state' => :'state',
73
+ :'reservation_history_months' => :'reservationHistoryMonths',
70
74
  :'access_type' => :'accessType',
71
75
  :'allowed_providers' => :'allowedProviders',
72
76
  :'locale' => :'locale',
@@ -92,6 +96,7 @@ module Repull
92
96
  {
93
97
  :'redirect_url' => :'String',
94
98
  :'state' => :'String',
99
+ :'reservation_history_months' => :'Integer',
95
100
  :'access_type' => :'String',
96
101
  :'allowed_providers' => :'Array<String>',
97
102
  :'locale' => :'String',
@@ -137,6 +142,10 @@ module Repull
137
142
  self.state = attributes[:'state']
138
143
  end
139
144
 
145
+ if attributes.key?(:'reservation_history_months')
146
+ self.reservation_history_months = attributes[:'reservation_history_months']
147
+ end
148
+
140
149
  if attributes.key?(:'access_type')
141
150
  self.access_type = attributes[:'access_type']
142
151
  end
@@ -181,6 +190,14 @@ module Repull
181
190
  invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
182
191
  end
183
192
 
193
+ if !@reservation_history_months.nil? && @reservation_history_months > 60
194
+ invalid_properties.push('invalid value for "reservation_history_months", must be smaller than or equal to 60.')
195
+ end
196
+
197
+ if !@reservation_history_months.nil? && @reservation_history_months < 1
198
+ invalid_properties.push('invalid value for "reservation_history_months", must be greater than or equal to 1.')
199
+ end
200
+
184
201
  invalid_properties
185
202
  end
186
203
 
@@ -189,6 +206,8 @@ module Repull
189
206
  def valid?
190
207
  warn '[DEPRECATED] the `valid?` method is obsolete'
191
208
  return false if @redirect_url.nil?
209
+ return false if !@reservation_history_months.nil? && @reservation_history_months > 60
210
+ return false if !@reservation_history_months.nil? && @reservation_history_months < 1
192
211
  access_type_validator = EnumAttributeValidator.new('String', ["full_access", "messaging", "read_only"])
193
212
  return false unless access_type_validator.valid?(@access_type)
194
213
  purpose_validator = EnumAttributeValidator.new('String', ["connect", "migrate"])
@@ -206,6 +225,24 @@ module Repull
206
225
  @redirect_url = redirect_url
207
226
  end
208
227
 
228
+ # Custom attribute writer method with validation
229
+ # @param [Object] reservation_history_months Value to be assigned
230
+ def reservation_history_months=(reservation_history_months)
231
+ if reservation_history_months.nil?
232
+ fail ArgumentError, 'reservation_history_months cannot be nil'
233
+ end
234
+
235
+ if reservation_history_months > 60
236
+ fail ArgumentError, 'invalid value for "reservation_history_months", must be smaller than or equal to 60.'
237
+ end
238
+
239
+ if reservation_history_months < 1
240
+ fail ArgumentError, 'invalid value for "reservation_history_months", must be greater than or equal to 1.'
241
+ end
242
+
243
+ @reservation_history_months = reservation_history_months
244
+ end
245
+
209
246
  # Custom attribute writer method checking allowed values (enum).
210
247
  # @param [Object] access_type Object to be assigned
211
248
  def access_type=(access_type)
@@ -233,6 +270,7 @@ module Repull
233
270
  self.class == o.class &&
234
271
  redirect_url == o.redirect_url &&
235
272
  state == o.state &&
273
+ reservation_history_months == o.reservation_history_months &&
236
274
  access_type == o.access_type &&
237
275
  allowed_providers == o.allowed_providers &&
238
276
  locale == o.locale &&
@@ -251,7 +289,7 @@ module Repull
251
289
  # Calculates hash code according to all attributes.
252
290
  # @return [Integer] Hash code
253
291
  def hash
254
- [redirect_url, state, access_type, allowed_providers, locale, purpose, workspace, copy, scope].hash
292
+ [redirect_url, state, reservation_history_months, access_type, allowed_providers, locale, purpose, workspace, copy, scope].hash
255
293
  end
256
294
 
257
295
  # Builds the object from hash
@@ -22,8 +22,11 @@ module Repull
22
22
  # Airbnb only — selects the OAuth scope set. 'read_only' grants read-only scopes; 'messaging' grants read scopes plus message read/send but NOT property management, so it can coexist with another app (e.g. an existing PMS) that already holds property management on the same Airbnb account; 'full_access' (default) grants full host scopes including the exclusive property management (only one app per Airbnb account can hold it). The hosted consent screen normally lets the host pick a tier; passing `accessType` explicitly fixes the tier and hides that choice, so the host can only continue with the tier you requested. Omit it to let the host choose.
23
23
  attr_accessor :access_type
24
24
 
25
- # PMS providers — API key.
26
- attr_accessor :api_key
25
+ # Airbnb — how many months of past reservations the first import pulls (1–60). Omit it for the default window. Upcoming stays are always imported. A wider window takes longer to import, because every extra month is more stays to fetch.
26
+ attr_accessor :reservation_history_months
27
+
28
+ # Airbnb + Booking.com — your own correlation token, e.g. your user id (at most 500 characters). Echoed on the redirect back (`&state=`) and in the `connect.session.completed` webhook.
29
+ attr_accessor :state
27
30
 
28
31
  # Plumguide — client ID.
29
32
  attr_accessor :client_id
@@ -61,7 +64,8 @@ module Repull
61
64
  {
62
65
  :'redirect_url' => :'redirectUrl',
63
66
  :'access_type' => :'accessType',
64
- :'api_key' => :'apiKey',
67
+ :'reservation_history_months' => :'reservationHistoryMonths',
68
+ :'state' => :'state',
65
69
  :'client_id' => :'clientId',
66
70
  :'client_secret' => :'clientSecret',
67
71
  :'locale' => :'locale'
@@ -83,7 +87,8 @@ module Repull
83
87
  {
84
88
  :'redirect_url' => :'String',
85
89
  :'access_type' => :'String',
86
- :'api_key' => :'String',
90
+ :'reservation_history_months' => :'Integer',
91
+ :'state' => :'String',
87
92
  :'client_id' => :'String',
88
93
  :'client_secret' => :'String',
89
94
  :'locale' => :'String'
@@ -123,8 +128,12 @@ module Repull
123
128
  self.access_type = 'full_access'
124
129
  end
125
130
 
126
- if attributes.key?(:'api_key')
127
- self.api_key = attributes[:'api_key']
131
+ if attributes.key?(:'reservation_history_months')
132
+ self.reservation_history_months = attributes[:'reservation_history_months']
133
+ end
134
+
135
+ if attributes.key?(:'state')
136
+ self.state = attributes[:'state']
128
137
  end
129
138
 
130
139
  if attributes.key?(:'client_id')
@@ -145,6 +154,14 @@ module Repull
145
154
  def list_invalid_properties
146
155
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
147
156
  invalid_properties = Array.new
157
+ if !@reservation_history_months.nil? && @reservation_history_months > 60
158
+ invalid_properties.push('invalid value for "reservation_history_months", must be smaller than or equal to 60.')
159
+ end
160
+
161
+ if !@reservation_history_months.nil? && @reservation_history_months < 1
162
+ invalid_properties.push('invalid value for "reservation_history_months", must be greater than or equal to 1.')
163
+ end
164
+
148
165
  invalid_properties
149
166
  end
150
167
 
@@ -154,6 +171,8 @@ module Repull
154
171
  warn '[DEPRECATED] the `valid?` method is obsolete'
155
172
  access_type_validator = EnumAttributeValidator.new('String', ["read_only", "full_access", "messaging"])
156
173
  return false unless access_type_validator.valid?(@access_type)
174
+ return false if !@reservation_history_months.nil? && @reservation_history_months > 60
175
+ return false if !@reservation_history_months.nil? && @reservation_history_months < 1
157
176
  true
158
177
  end
159
178
 
@@ -167,6 +186,24 @@ module Repull
167
186
  @access_type = access_type
168
187
  end
169
188
 
189
+ # Custom attribute writer method with validation
190
+ # @param [Object] reservation_history_months Value to be assigned
191
+ def reservation_history_months=(reservation_history_months)
192
+ if reservation_history_months.nil?
193
+ fail ArgumentError, 'reservation_history_months cannot be nil'
194
+ end
195
+
196
+ if reservation_history_months > 60
197
+ fail ArgumentError, 'invalid value for "reservation_history_months", must be smaller than or equal to 60.'
198
+ end
199
+
200
+ if reservation_history_months < 1
201
+ fail ArgumentError, 'invalid value for "reservation_history_months", must be greater than or equal to 1.'
202
+ end
203
+
204
+ @reservation_history_months = reservation_history_months
205
+ end
206
+
170
207
  # Checks equality by comparing each attribute.
171
208
  # @param [Object] Object to be compared
172
209
  def ==(o)
@@ -174,7 +211,8 @@ module Repull
174
211
  self.class == o.class &&
175
212
  redirect_url == o.redirect_url &&
176
213
  access_type == o.access_type &&
177
- api_key == o.api_key &&
214
+ reservation_history_months == o.reservation_history_months &&
215
+ state == o.state &&
178
216
  client_id == o.client_id &&
179
217
  client_secret == o.client_secret &&
180
218
  locale == o.locale
@@ -189,7 +227,7 @@ module Repull
189
227
  # Calculates hash code according to all attributes.
190
228
  # @return [Integer] Hash code
191
229
  def hash
192
- [redirect_url, access_type, api_key, client_id, client_secret, locale].hash
230
+ [redirect_url, access_type, reservation_history_months, state, client_id, client_secret, locale].hash
193
231
  end
194
232
 
195
233
  # Builds the object from hash
@@ -54,6 +54,9 @@ module Repull
54
54
  # Every inactive listing the request involved. Present on `code: \"listing_inactive\"` (HTTP 403) — activate these ids and retry.
55
55
  attr_accessor :listing_ids
56
56
 
57
+ # The same inactive listings with their names, so you can show the user which ones to activate. Present on `code: \"listing_inactive\"` (HTTP 403). `name` is null only when the request did not resolve it.
58
+ attr_accessor :listings
59
+
57
60
  # The single Repull listing the error is about. Present on `code: \"listing_not_api_connected\"` (HTTP 403).
58
61
  attr_accessor :listing_id
59
62
 
@@ -84,6 +87,7 @@ module Repull
84
87
  :'did_you_mean' => :'did_you_mean',
85
88
  :'previous_code' => :'previous_code',
86
89
  :'listing_ids' => :'listing_ids',
90
+ :'listings' => :'listings',
87
91
  :'listing_id' => :'listing_id',
88
92
  :'airbnb_listing_id' => :'airbnb_listing_id',
89
93
  :'sync_category' => :'sync_category',
@@ -118,6 +122,7 @@ module Repull
118
122
  :'did_you_mean' => :'String',
119
123
  :'previous_code' => :'String',
120
124
  :'listing_ids' => :'Array<String>',
125
+ :'listings' => :'Array<ErrorErrorListingsInner>',
121
126
  :'listing_id' => :'String',
122
127
  :'airbnb_listing_id' => :'String',
123
128
  :'sync_category' => :'String',
@@ -217,6 +222,12 @@ module Repull
217
222
  end
218
223
  end
219
224
 
225
+ if attributes.key?(:'listings')
226
+ if (value = attributes[:'listings']).is_a?(Array)
227
+ self.listings = value
228
+ end
229
+ end
230
+
220
231
  if attributes.key?(:'listing_id')
221
232
  self.listing_id = attributes[:'listing_id']
222
233
  end
@@ -346,6 +357,7 @@ module Repull
346
357
  did_you_mean == o.did_you_mean &&
347
358
  previous_code == o.previous_code &&
348
359
  listing_ids == o.listing_ids &&
360
+ listings == o.listings &&
349
361
  listing_id == o.listing_id &&
350
362
  airbnb_listing_id == o.airbnb_listing_id &&
351
363
  sync_category == o.sync_category &&
@@ -362,7 +374,7 @@ module Repull
362
374
  # Calculates hash code according to all attributes.
363
375
  # @return [Integer] Hash code
364
376
  def hash
365
- [code, message, fix, docs_url, request_id, field, value_received, valid_values, valid_params, endpoint, did_you_mean, previous_code, listing_ids, listing_id, airbnb_listing_id, sync_category, retry_after, support].hash
377
+ [code, message, fix, docs_url, request_id, field, value_received, valid_values, valid_params, endpoint, did_you_mean, previous_code, listing_ids, listings, listing_id, airbnb_listing_id, sync_category, retry_after, support].hash
366
378
  end
367
379
 
368
380
  # Builds the object from hash
@@ -14,20 +14,16 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # Present when the cancellation was made in a PMS.
18
- class CancelReservation200ResponsePms < ApiModelBase
19
- attr_accessor :provider
17
+ class ErrorErrorListingsInner < ApiModelBase
18
+ attr_accessor :id
20
19
 
21
- attr_accessor :applied
22
-
23
- attr_accessor :errors
20
+ attr_accessor :name
24
21
 
25
22
  # Attribute mapping from ruby-style variable name to JSON key.
26
23
  def self.attribute_map
27
24
  {
28
- :'provider' => :'provider',
29
- :'applied' => :'applied',
30
- :'errors' => :'errors'
25
+ :'id' => :'id',
26
+ :'name' => :'name'
31
27
  }
32
28
  end
33
29
 
@@ -44,15 +40,15 @@ module Repull
44
40
  # Attribute type mapping.
45
41
  def self.openapi_types
46
42
  {
47
- :'provider' => :'String',
48
- :'applied' => :'Array<String>',
49
- :'errors' => :'Array<CancelReservation200ResponsePmsErrorsInner>'
43
+ :'id' => :'String',
44
+ :'name' => :'String'
50
45
  }
51
46
  end
52
47
 
53
48
  # List of attributes with nullable: true
54
49
  def self.openapi_nullable
55
50
  Set.new([
51
+ :'name'
56
52
  ])
57
53
  end
58
54
 
@@ -60,32 +56,28 @@ module Repull
60
56
  # @param [Hash] attributes Model attributes in the form of hash
61
57
  def initialize(attributes = {})
62
58
  if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::CancelReservation200ResponsePms` initialize method"
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ErrorErrorListingsInner` initialize method"
64
60
  end
65
61
 
66
62
  # check to see if the attribute exists and convert string to symbol for hash key
67
63
  acceptable_attribute_map = self.class.acceptable_attribute_map
68
64
  attributes = attributes.each_with_object({}) { |(k, v), h|
69
65
  if (!acceptable_attribute_map.key?(k.to_sym))
70
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::CancelReservation200ResponsePms`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ErrorErrorListingsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
67
  end
72
68
  h[k.to_sym] = v
73
69
  }
74
70
 
75
- if attributes.key?(:'provider')
76
- self.provider = attributes[:'provider']
77
- end
78
-
79
- if attributes.key?(:'applied')
80
- if (value = attributes[:'applied']).is_a?(Array)
81
- self.applied = value
82
- end
71
+ if attributes.key?(:'id')
72
+ self.id = attributes[:'id']
73
+ else
74
+ self.id = nil
83
75
  end
84
76
 
85
- if attributes.key?(:'errors')
86
- if (value = attributes[:'errors']).is_a?(Array)
87
- self.errors = value
88
- end
77
+ if attributes.key?(:'name')
78
+ self.name = attributes[:'name']
79
+ else
80
+ self.name = nil
89
81
  end
90
82
  end
91
83
 
@@ -94,6 +86,10 @@ module Repull
94
86
  def list_invalid_properties
95
87
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
96
88
  invalid_properties = Array.new
89
+ if @id.nil?
90
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
91
+ end
92
+
97
93
  invalid_properties
98
94
  end
99
95
 
@@ -101,17 +97,27 @@ module Repull
101
97
  # @return true if the model is valid
102
98
  def valid?
103
99
  warn '[DEPRECATED] the `valid?` method is obsolete'
100
+ return false if @id.nil?
104
101
  true
105
102
  end
106
103
 
104
+ # Custom attribute writer method with validation
105
+ # @param [Object] id Value to be assigned
106
+ def id=(id)
107
+ if id.nil?
108
+ fail ArgumentError, 'id cannot be nil'
109
+ end
110
+
111
+ @id = id
112
+ end
113
+
107
114
  # Checks equality by comparing each attribute.
108
115
  # @param [Object] Object to be compared
109
116
  def ==(o)
110
117
  return true if self.equal?(o)
111
118
  self.class == o.class &&
112
- provider == o.provider &&
113
- applied == o.applied &&
114
- errors == o.errors
119
+ id == o.id &&
120
+ name == o.name
115
121
  end
116
122
 
117
123
  # @see the `==` method
@@ -123,7 +129,7 @@ module Repull
123
129
  # Calculates hash code according to all attributes.
124
130
  # @return [Integer] Hash code
125
131
  def hash
126
- [provider, applied, errors].hash
132
+ [id, name].hash
127
133
  end
128
134
 
129
135
  # Builds the object from hash
@@ -15,6 +15,7 @@ require 'time'
15
15
 
16
16
  module Repull
17
17
  class GetBookingExtranetLoginStatus200Response < ApiModelBase
18
+ # The connection id (numeric string, like every `*Id` on the wire).
18
19
  attr_accessor :account_id
19
20
 
20
21
  attr_accessor :status
@@ -52,7 +53,7 @@ module Repull
52
53
  # Attribute type mapping.
53
54
  def self.openapi_types
54
55
  {
55
- :'account_id' => :'Integer',
56
+ :'account_id' => :'String',
56
57
  :'status' => :'String',
57
58
  :'error_message' => :'String',
58
59
  :'friendly_error' => :'String',
@@ -15,6 +15,7 @@ require 'time'
15
15
 
16
16
  module Repull
17
17
  class ListListingUnits200Response < ApiModelBase
18
+ # Repull listing id (numeric string, like every `*Id` on the wire).
18
19
  attr_accessor :listing_id
19
20
 
20
21
  attr_accessor :total
@@ -43,7 +44,7 @@ module Repull
43
44
  # Attribute type mapping.
44
45
  def self.openapi_types
45
46
  {
46
- :'listing_id' => :'Integer',
47
+ :'listing_id' => :'String',
47
48
  :'total' => :'Integer',
48
49
  :'data' => :'Array<ListListingUnits200ResponseDataInner>'
49
50
  }
@@ -14,16 +14,22 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # A vacation rental listing in your Repull workspace. An **inactive** listing appears only in `GET /v1/listings`, and only when `?status=` asks for it. Such a row carries identity fields only — `id`, `name`, `status`, `channels` — so `address`, `content`, `details`, `createdAt` and `updatedAt` are absent until the listing is activated. `GET /v1/listings/{id}` and every other listing endpoint answer `403 listing_inactive` for it. The one field you can add back is `thumbnailUrl`, by passing `?include=thumbnail` — enough to render an activate/deactivate picker with pictures from a single request.
17
+ # A vacation rental listing in your Repull workspace. An **inactive** listing appears only in `GET /v1/listings`, and only when `?status=` asks for it. Such a row carries identity fields only — `id`, `name`, `status`, `inactiveReason`, `address.city`, `channels` — so the street, `content`, `details`, `createdAt` and `updatedAt` are absent until the listing is activated. `inactiveReason` is `plan_limit` (held back by the plan; activating needs a free slot or an upgrade), `unlisted_on_airbnb`, or `deactivated` (switched off by you). `GET /v1/listings/{id}` and every other listing endpoint answer `403 listing_inactive` for it. The one field you can add back is `thumbnailUrl`, by passing `?include=thumbnail` — enough to render an activate/deactivate picker with pictures from a single request.
18
18
  class Listing < ApiModelBase
19
+ attr_accessor :capabilities
20
+
19
21
  # `GET /v1/listings/{id}` only. The physical rooms under a hotel-model listing (a Mews or Cloudbeds room type); empty for a single home. Same items as `GET /v1/listings/{id}/units`.
20
22
  attr_accessor :units
21
23
 
22
24
  # Repull listing id
23
25
  attr_accessor :id
24
26
 
27
+ # The host's internal nickname for the listing.
25
28
  attr_accessor :name
26
29
 
30
+ # The title guests see on the channel (e.g. the Airbnb listing title). `name` is the host's internal nickname for the listing; show `publicName` in anything a guest or end user reads. Present on inactive rows too.
31
+ attr_accessor :public_name
32
+
27
33
  attr_accessor :address
28
34
 
29
35
  # Cover photo URL. Always present on an active listing. On an **inactive** one it is present only when the caller passes `?include=thumbnail`; `null` means the listing has no cover photo stored, absent means the expansion was not requested.
@@ -50,9 +56,11 @@ module Repull
50
56
  # Attribute mapping from ruby-style variable name to JSON key.
51
57
  def self.attribute_map
52
58
  {
59
+ :'capabilities' => :'capabilities',
53
60
  :'units' => :'units',
54
61
  :'id' => :'id',
55
62
  :'name' => :'name',
63
+ :'public_name' => :'publicName',
56
64
  :'address' => :'address',
57
65
  :'thumbnail_url' => :'thumbnailUrl',
58
66
  :'status' => :'status',
@@ -78,9 +86,11 @@ module Repull
78
86
  # Attribute type mapping.
79
87
  def self.openapi_types
80
88
  {
89
+ :'capabilities' => :'ListingCapabilities',
81
90
  :'units' => :'Array<ListingUnitsInner>',
82
91
  :'id' => :'String',
83
92
  :'name' => :'String',
93
+ :'public_name' => :'String',
84
94
  :'address' => :'ListingAddress',
85
95
  :'thumbnail_url' => :'String',
86
96
  :'status' => :'String',
@@ -96,6 +106,7 @@ module Repull
96
106
  # List of attributes with nullable: true
97
107
  def self.openapi_nullable
98
108
  Set.new([
109
+ :'public_name',
99
110
  :'thumbnail_url',
100
111
  :'content',
101
112
  :'details',
@@ -118,6 +129,10 @@ module Repull
118
129
  h[k.to_sym] = v
119
130
  }
120
131
 
132
+ if attributes.key?(:'capabilities')
133
+ self.capabilities = attributes[:'capabilities']
134
+ end
135
+
121
136
  if attributes.key?(:'units')
122
137
  if (value = attributes[:'units']).is_a?(Array)
123
138
  self.units = value
@@ -132,6 +147,10 @@ module Repull
132
147
  self.name = attributes[:'name']
133
148
  end
134
149
 
150
+ if attributes.key?(:'public_name')
151
+ self.public_name = attributes[:'public_name']
152
+ end
153
+
135
154
  if attributes.key?(:'address')
136
155
  self.address = attributes[:'address']
137
156
  end
@@ -193,9 +212,11 @@ module Repull
193
212
  def ==(o)
194
213
  return true if self.equal?(o)
195
214
  self.class == o.class &&
215
+ capabilities == o.capabilities &&
196
216
  units == o.units &&
197
217
  id == o.id &&
198
218
  name == o.name &&
219
+ public_name == o.public_name &&
199
220
  address == o.address &&
200
221
  thumbnail_url == o.thumbnail_url &&
201
222
  status == o.status &&
@@ -216,7 +237,7 @@ module Repull
216
237
  # Calculates hash code according to all attributes.
217
238
  # @return [Integer] Hash code
218
239
  def hash
219
- [units, id, name, address, thumbnail_url, status, channels, amenities, content, details, created_at, updated_at].hash
240
+ [capabilities, units, id, name, public_name, address, thumbnail_url, status, channels, amenities, content, details, created_at, updated_at].hash
220
241
  end
221
242
 
222
243
  # Builds the object from hash