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
@@ -14,13 +14,38 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class UpdateAvailabilityRequest < ApiModelBase
18
- attr_accessor :dates
17
+ # Body for `PUT /v1/channels/airbnb/listings/{id}/pricing`. The `type` discriminator selects the pricing sub-resource. `type: \"calendar\"` shares the same per-date restriction shape as the availability endpoint (min/max nights, closed-to-arrival/departure, stop-sell via `availability: \"unavailable\"`).
18
+ class AirbnbPricingWriteRequest < ApiModelBase
19
+ attr_accessor :type
20
+
21
+ # Required when `type: \"calendar\"`. Batch of per-date price + restriction operations.
22
+ attr_accessor :operations
23
+
24
+ # Required when `type: \"model\"` — the pricing-availability model to switch the listing to.
25
+ attr_accessor :model_type
26
+
27
+ # Required for `type: \"standard\" | \"rate-plan\" | \"fees\"` — the pricing-settings object to PUT.
28
+ attr_accessor :settings
29
+
30
+ # Required for `type: \"los\"` — length-of-stay records.
31
+ attr_accessor :records
32
+
33
+ # Required for `type: \"currency\"` — ISO 4217 code.
34
+ attr_accessor :currency
35
+
36
+ # Required for `type: \"rule\"` — a single pricing rule appended to the listing.
37
+ attr_accessor :rule
19
38
 
20
39
  # Attribute mapping from ruby-style variable name to JSON key.
21
40
  def self.attribute_map
22
41
  {
23
- :'dates' => :'dates'
42
+ :'type' => :'type',
43
+ :'operations' => :'operations',
44
+ :'model_type' => :'modelType',
45
+ :'settings' => :'settings',
46
+ :'records' => :'records',
47
+ :'currency' => :'currency',
48
+ :'rule' => :'rule'
24
49
  }
25
50
  end
26
51
 
@@ -37,13 +62,24 @@ module Repull
37
62
  # Attribute type mapping.
38
63
  def self.openapi_types
39
64
  {
40
- :'dates' => :'Array<CalendarDay>'
65
+ :'type' => :'String',
66
+ :'operations' => :'Array<AirbnbCalendarOperation>',
67
+ :'model_type' => :'String',
68
+ :'settings' => :'Hash<String, Object>',
69
+ :'records' => :'Array<Hash<String, Object>>',
70
+ :'currency' => :'String',
71
+ :'rule' => :'Hash<String, Object>'
41
72
  }
42
73
  end
43
74
 
44
75
  # List of attributes with nullable: true
45
76
  def self.openapi_nullable
46
77
  Set.new([
78
+ :'model_type',
79
+ :'settings',
80
+ :'records',
81
+ :'currency',
82
+ :'rule'
47
83
  ])
48
84
  end
49
85
 
@@ -51,21 +87,53 @@ module Repull
51
87
  # @param [Hash] attributes Model attributes in the form of hash
52
88
  def initialize(attributes = {})
53
89
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::UpdateAvailabilityRequest` initialize method"
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AirbnbPricingWriteRequest` initialize method"
55
91
  end
56
92
 
57
93
  # check to see if the attribute exists and convert string to symbol for hash key
58
94
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
95
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
96
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::UpdateAvailabilityRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
97
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AirbnbPricingWriteRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
98
  end
63
99
  h[k.to_sym] = v
64
100
  }
65
101
 
66
- if attributes.key?(:'dates')
67
- if (value = attributes[:'dates']).is_a?(Array)
68
- self.dates = value
102
+ if attributes.key?(:'type')
103
+ self.type = attributes[:'type']
104
+ else
105
+ self.type = nil
106
+ end
107
+
108
+ if attributes.key?(:'operations')
109
+ if (value = attributes[:'operations']).is_a?(Array)
110
+ self.operations = value
111
+ end
112
+ end
113
+
114
+ if attributes.key?(:'model_type')
115
+ self.model_type = attributes[:'model_type']
116
+ end
117
+
118
+ if attributes.key?(:'settings')
119
+ if (value = attributes[:'settings']).is_a?(Hash)
120
+ self.settings = value
121
+ end
122
+ end
123
+
124
+ if attributes.key?(:'records')
125
+ if (value = attributes[:'records']).is_a?(Array)
126
+ self.records = value
127
+ end
128
+ end
129
+
130
+ if attributes.key?(:'currency')
131
+ self.currency = attributes[:'currency']
132
+ end
133
+
134
+ if attributes.key?(:'rule')
135
+ if (value = attributes[:'rule']).is_a?(Hash)
136
+ self.rule = value
69
137
  end
70
138
  end
71
139
  end
@@ -75,6 +143,10 @@ module Repull
75
143
  def list_invalid_properties
76
144
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
145
  invalid_properties = Array.new
146
+ if @type.nil?
147
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
148
+ end
149
+
78
150
  invalid_properties
79
151
  end
80
152
 
@@ -82,15 +154,32 @@ module Repull
82
154
  # @return true if the model is valid
83
155
  def valid?
84
156
  warn '[DEPRECATED] the `valid?` method is obsolete'
157
+ return false if @type.nil?
85
158
  true
86
159
  end
87
160
 
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] type Value to be assigned
163
+ def type=(type)
164
+ if type.nil?
165
+ fail ArgumentError, 'type cannot be nil'
166
+ end
167
+
168
+ @type = type
169
+ end
170
+
88
171
  # Checks equality by comparing each attribute.
89
172
  # @param [Object] Object to be compared
90
173
  def ==(o)
91
174
  return true if self.equal?(o)
92
175
  self.class == o.class &&
93
- dates == o.dates
176
+ type == o.type &&
177
+ operations == o.operations &&
178
+ model_type == o.model_type &&
179
+ settings == o.settings &&
180
+ records == o.records &&
181
+ currency == o.currency &&
182
+ rule == o.rule
94
183
  end
95
184
 
96
185
  # @see the `==` method
@@ -102,7 +191,7 @@ module Repull
102
191
  # Calculates hash code according to all attributes.
103
192
  # @return [Integer] Hash code
104
193
  def hash
105
- [dates].hash
194
+ [type, operations, model_type, settings, records, currency, rule].hash
106
195
  end
107
196
 
108
197
  # Builds the object from hash
@@ -14,22 +14,36 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class UpdateReservationRequest < ApiModelBase
18
- attr_accessor :check_in
17
+ # One (room, rate-plan, date-range) availability update. Carries inventory (`availableRooms`), the dedicated stop-sell flag (`closed`), and the same length-of-stay / arrival restrictions as a rate update.
18
+ class BookingAvailabilityUpdate < ApiModelBase
19
+ # Booking.com room id.
20
+ attr_accessor :room_id
19
21
 
20
- attr_accessor :check_out
22
+ # Booking.com rate-plan id.
23
+ attr_accessor :rate_id
24
+
25
+ attr_accessor :date_range
26
+
27
+ # Rooms to sell (`roomstosell`). `0` blocks the room for the range.
28
+ attr_accessor :available_rooms
21
29
 
22
30
  attr_accessor :status
23
31
 
24
- attr_accessor :total_price
32
+ # Dedicated stop-sell flag (`<closed>` in Booking's XML). `true` fully stops sale for the room/date-range regardless of `availableRooms`.
33
+ attr_accessor :closed
34
+
35
+ attr_accessor :restrictions
25
36
 
26
37
  # Attribute mapping from ruby-style variable name to JSON key.
27
38
  def self.attribute_map
28
39
  {
29
- :'check_in' => :'checkIn',
30
- :'check_out' => :'checkOut',
40
+ :'room_id' => :'roomId',
41
+ :'rate_id' => :'rateId',
42
+ :'date_range' => :'dateRange',
43
+ :'available_rooms' => :'availableRooms',
31
44
  :'status' => :'status',
32
- :'total_price' => :'totalPrice'
45
+ :'closed' => :'closed',
46
+ :'restrictions' => :'restrictions'
33
47
  }
34
48
  end
35
49
 
@@ -46,16 +60,21 @@ module Repull
46
60
  # Attribute type mapping.
47
61
  def self.openapi_types
48
62
  {
49
- :'check_in' => :'Date',
50
- :'check_out' => :'Date',
63
+ :'room_id' => :'String',
64
+ :'rate_id' => :'String',
65
+ :'date_range' => :'BookingPricingRateUpdateDateRange',
66
+ :'available_rooms' => :'Integer',
51
67
  :'status' => :'String',
52
- :'total_price' => :'Float'
68
+ :'closed' => :'Boolean',
69
+ :'restrictions' => :'BookingPricingRateUpdateRestrictions'
53
70
  }
54
71
  end
55
72
 
56
73
  # List of attributes with nullable: true
57
74
  def self.openapi_nullable
58
75
  Set.new([
76
+ :'status',
77
+ :'closed',
59
78
  ])
60
79
  end
61
80
 
@@ -63,32 +82,52 @@ module Repull
63
82
  # @param [Hash] attributes Model attributes in the form of hash
64
83
  def initialize(attributes = {})
65
84
  if (!attributes.is_a?(Hash))
66
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::UpdateReservationRequest` initialize method"
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::BookingAvailabilityUpdate` initialize method"
67
86
  end
68
87
 
69
88
  # check to see if the attribute exists and convert string to symbol for hash key
70
89
  acceptable_attribute_map = self.class.acceptable_attribute_map
71
90
  attributes = attributes.each_with_object({}) { |(k, v), h|
72
91
  if (!acceptable_attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::UpdateReservationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::BookingAvailabilityUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
93
  end
75
94
  h[k.to_sym] = v
76
95
  }
77
96
 
78
- if attributes.key?(:'check_in')
79
- self.check_in = attributes[:'check_in']
97
+ if attributes.key?(:'room_id')
98
+ self.room_id = attributes[:'room_id']
99
+ else
100
+ self.room_id = nil
101
+ end
102
+
103
+ if attributes.key?(:'rate_id')
104
+ self.rate_id = attributes[:'rate_id']
105
+ else
106
+ self.rate_id = nil
80
107
  end
81
108
 
82
- if attributes.key?(:'check_out')
83
- self.check_out = attributes[:'check_out']
109
+ if attributes.key?(:'date_range')
110
+ self.date_range = attributes[:'date_range']
111
+ else
112
+ self.date_range = nil
113
+ end
114
+
115
+ if attributes.key?(:'available_rooms')
116
+ self.available_rooms = attributes[:'available_rooms']
117
+ else
118
+ self.available_rooms = nil
84
119
  end
85
120
 
86
121
  if attributes.key?(:'status')
87
122
  self.status = attributes[:'status']
88
123
  end
89
124
 
90
- if attributes.key?(:'total_price')
91
- self.total_price = attributes[:'total_price']
125
+ if attributes.key?(:'closed')
126
+ self.closed = attributes[:'closed']
127
+ end
128
+
129
+ if attributes.key?(:'restrictions')
130
+ self.restrictions = attributes[:'restrictions']
92
131
  end
93
132
  end
94
133
 
@@ -97,6 +136,22 @@ module Repull
97
136
  def list_invalid_properties
98
137
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
138
  invalid_properties = Array.new
139
+ if @room_id.nil?
140
+ invalid_properties.push('invalid value for "room_id", room_id cannot be nil.')
141
+ end
142
+
143
+ if @rate_id.nil?
144
+ invalid_properties.push('invalid value for "rate_id", rate_id cannot be nil.')
145
+ end
146
+
147
+ if @date_range.nil?
148
+ invalid_properties.push('invalid value for "date_range", date_range cannot be nil.')
149
+ end
150
+
151
+ if @available_rooms.nil?
152
+ invalid_properties.push('invalid value for "available_rooms", available_rooms cannot be nil.')
153
+ end
154
+
100
155
  invalid_properties
101
156
  end
102
157
 
@@ -104,18 +159,65 @@ module Repull
104
159
  # @return true if the model is valid
105
160
  def valid?
106
161
  warn '[DEPRECATED] the `valid?` method is obsolete'
162
+ return false if @room_id.nil?
163
+ return false if @rate_id.nil?
164
+ return false if @date_range.nil?
165
+ return false if @available_rooms.nil?
107
166
  true
108
167
  end
109
168
 
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] room_id Value to be assigned
171
+ def room_id=(room_id)
172
+ if room_id.nil?
173
+ fail ArgumentError, 'room_id cannot be nil'
174
+ end
175
+
176
+ @room_id = room_id
177
+ end
178
+
179
+ # Custom attribute writer method with validation
180
+ # @param [Object] rate_id Value to be assigned
181
+ def rate_id=(rate_id)
182
+ if rate_id.nil?
183
+ fail ArgumentError, 'rate_id cannot be nil'
184
+ end
185
+
186
+ @rate_id = rate_id
187
+ end
188
+
189
+ # Custom attribute writer method with validation
190
+ # @param [Object] date_range Value to be assigned
191
+ def date_range=(date_range)
192
+ if date_range.nil?
193
+ fail ArgumentError, 'date_range cannot be nil'
194
+ end
195
+
196
+ @date_range = date_range
197
+ end
198
+
199
+ # Custom attribute writer method with validation
200
+ # @param [Object] available_rooms Value to be assigned
201
+ def available_rooms=(available_rooms)
202
+ if available_rooms.nil?
203
+ fail ArgumentError, 'available_rooms cannot be nil'
204
+ end
205
+
206
+ @available_rooms = available_rooms
207
+ end
208
+
110
209
  # Checks equality by comparing each attribute.
111
210
  # @param [Object] Object to be compared
112
211
  def ==(o)
113
212
  return true if self.equal?(o)
114
213
  self.class == o.class &&
115
- check_in == o.check_in &&
116
- check_out == o.check_out &&
214
+ room_id == o.room_id &&
215
+ rate_id == o.rate_id &&
216
+ date_range == o.date_range &&
217
+ available_rooms == o.available_rooms &&
117
218
  status == o.status &&
118
- total_price == o.total_price
219
+ closed == o.closed &&
220
+ restrictions == o.restrictions
119
221
  end
120
222
 
121
223
  # @see the `==` method
@@ -127,7 +229,7 @@ module Repull
127
229
  # Calculates hash code according to all attributes.
128
230
  # @return [Integer] Hash code
129
231
  def hash
130
- [check_in, check_out, status, total_price].hash
232
+ [room_id, rate_id, date_range, available_rooms, status, closed, restrictions].hash
131
233
  end
132
234
 
133
235
  # Builds the object from hash
@@ -14,16 +14,22 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class ListStudioDeployments200Response < ApiModelBase
18
- attr_accessor :data
17
+ # Body for `PUT /v1/channels/booking/availability`. Selects one of Booking's three ARI write paths via `type` and forwards `updates` verbatim to the connector.
18
+ class BookingAvailabilityUpdateRequest < ApiModelBase
19
+ # `rates` → price + restrictions (`updateRates`); `availability` → inventory + stop-sell + restrictions (`updateAvailability`); `derived-pricing` → occupancy-derived pricing rules (`updateDerivedPricing`).
20
+ attr_accessor :type
19
21
 
20
- attr_accessor :pagination
22
+ attr_accessor :property_id
23
+
24
+ # For `type: \"rates\"` each item is a `BookingPricingRateUpdate`; for `type: \"availability\"` a `BookingAvailabilityUpdate`; for `type: \"derived-pricing\"` a derived-price rule set.
25
+ attr_accessor :updates
21
26
 
22
27
  # Attribute mapping from ruby-style variable name to JSON key.
23
28
  def self.attribute_map
24
29
  {
25
- :'data' => :'data',
26
- :'pagination' => :'pagination'
30
+ :'type' => :'type',
31
+ :'property_id' => :'property_id',
32
+ :'updates' => :'updates'
27
33
  }
28
34
  end
29
35
 
@@ -40,8 +46,9 @@ module Repull
40
46
  # Attribute type mapping.
41
47
  def self.openapi_types
42
48
  {
43
- :'data' => :'Array<StudioDeployment>',
44
- :'pagination' => :'Pagination'
49
+ :'type' => :'String',
50
+ :'property_id' => :'BookingAvailabilityUpdateRequestPropertyId',
51
+ :'updates' => :'Array<BookingAvailabilityUpdateRequestUpdatesInner>'
45
52
  }
46
53
  end
47
54
 
@@ -55,26 +62,36 @@ module Repull
55
62
  # @param [Hash] attributes Model attributes in the form of hash
56
63
  def initialize(attributes = {})
57
64
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListStudioDeployments200Response` initialize method"
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::BookingAvailabilityUpdateRequest` initialize method"
59
66
  end
60
67
 
61
68
  # check to see if the attribute exists and convert string to symbol for hash key
62
69
  acceptable_attribute_map = self.class.acceptable_attribute_map
63
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
64
71
  if (!acceptable_attribute_map.key?(k.to_sym))
65
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListStudioDeployments200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::BookingAvailabilityUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
73
  end
67
74
  h[k.to_sym] = v
68
75
  }
69
76
 
70
- if attributes.key?(:'data')
71
- if (value = attributes[:'data']).is_a?(Array)
72
- self.data = value
73
- end
77
+ if attributes.key?(:'type')
78
+ self.type = attributes[:'type']
79
+ else
80
+ self.type = nil
74
81
  end
75
82
 
76
- if attributes.key?(:'pagination')
77
- self.pagination = attributes[:'pagination']
83
+ if attributes.key?(:'property_id')
84
+ self.property_id = attributes[:'property_id']
85
+ else
86
+ self.property_id = nil
87
+ end
88
+
89
+ if attributes.key?(:'updates')
90
+ if (value = attributes[:'updates']).is_a?(Array)
91
+ self.updates = value
92
+ end
93
+ else
94
+ self.updates = nil
78
95
  end
79
96
  end
80
97
 
@@ -83,6 +100,22 @@ module Repull
83
100
  def list_invalid_properties
84
101
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
102
  invalid_properties = Array.new
103
+ if @type.nil?
104
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
105
+ end
106
+
107
+ if @property_id.nil?
108
+ invalid_properties.push('invalid value for "property_id", property_id cannot be nil.')
109
+ end
110
+
111
+ if @updates.nil?
112
+ invalid_properties.push('invalid value for "updates", updates cannot be nil.')
113
+ end
114
+
115
+ if @updates.length < 1
116
+ invalid_properties.push('invalid value for "updates", number of items must be greater than or equal to 1.')
117
+ end
118
+
86
119
  invalid_properties
87
120
  end
88
121
 
@@ -90,16 +123,55 @@ module Repull
90
123
  # @return true if the model is valid
91
124
  def valid?
92
125
  warn '[DEPRECATED] the `valid?` method is obsolete'
126
+ return false if @type.nil?
127
+ return false if @property_id.nil?
128
+ return false if @updates.nil?
129
+ return false if @updates.length < 1
93
130
  true
94
131
  end
95
132
 
133
+ # Custom attribute writer method with validation
134
+ # @param [Object] type Value to be assigned
135
+ def type=(type)
136
+ if type.nil?
137
+ fail ArgumentError, 'type cannot be nil'
138
+ end
139
+
140
+ @type = type
141
+ end
142
+
143
+ # Custom attribute writer method with validation
144
+ # @param [Object] property_id Value to be assigned
145
+ def property_id=(property_id)
146
+ if property_id.nil?
147
+ fail ArgumentError, 'property_id cannot be nil'
148
+ end
149
+
150
+ @property_id = property_id
151
+ end
152
+
153
+ # Custom attribute writer method with validation
154
+ # @param [Object] updates Value to be assigned
155
+ def updates=(updates)
156
+ if updates.nil?
157
+ fail ArgumentError, 'updates cannot be nil'
158
+ end
159
+
160
+ if updates.length < 1
161
+ fail ArgumentError, 'invalid value for "updates", number of items must be greater than or equal to 1.'
162
+ end
163
+
164
+ @updates = updates
165
+ end
166
+
96
167
  # Checks equality by comparing each attribute.
97
168
  # @param [Object] Object to be compared
98
169
  def ==(o)
99
170
  return true if self.equal?(o)
100
171
  self.class == o.class &&
101
- data == o.data &&
102
- pagination == o.pagination
172
+ type == o.type &&
173
+ property_id == o.property_id &&
174
+ updates == o.updates
103
175
  end
104
176
 
105
177
  # @see the `==` method
@@ -111,7 +183,7 @@ module Repull
111
183
  # Calculates hash code according to all attributes.
112
184
  # @return [Integer] Hash code
113
185
  def hash
114
- [data, pagination].hash
186
+ [type, property_id, updates].hash
115
187
  end
116
188
 
117
189
  # Builds the object from hash
@@ -14,8 +14,8 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # Project the generation belongs to (used for billing + rate limits).
18
- module GenerateStudioCompletionRequestProjectId
17
+ # Booking.com hotel/property id (numeric; accepted as int or numeric string).
18
+ module BookingAvailabilityUpdateRequestPropertyId
19
19
  class << self
20
20
  # List of class defined in oneOf (OpenAPI v3)
21
21
  def openapi_one_of