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,134 +14,91 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class GetStudioDeployment200Response < ApiModelBase
18
- attr_accessor :data
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'data' => :'data'
24
- }
25
- end
26
-
27
- # Returns attribute mapping this model knows about
28
- def self.acceptable_attribute_map
29
- attribute_map
30
- end
31
-
32
- # Returns all the JSON keys this model knows about
33
- def self.acceptable_attributes
34
- acceptable_attribute_map.values
35
- end
36
-
37
- # Attribute type mapping.
38
- def self.openapi_types
39
- {
40
- :'data' => :'StudioDeployment'
41
- }
42
- end
43
-
44
- # List of attributes with nullable: true
45
- def self.openapi_nullable
46
- Set.new([
47
- ])
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetStudioDeployment200Response` initialize method"
17
+ module BookingAvailabilityUpdateRequestUpdatesInner
18
+ class << self
19
+ # List of class defined in oneOf (OpenAPI v3)
20
+ def openapi_one_of
21
+ [
22
+ :'BookingAvailabilityUpdate',
23
+ :'BookingPricingRateUpdate'
24
+ ]
55
25
  end
56
26
 
57
- # check to see if the attribute exists and convert string to symbol for hash key
58
- acceptable_attribute_map = self.class.acceptable_attribute_map
59
- attributes = attributes.each_with_object({}) { |(k, v), h|
60
- if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetStudioDeployment200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
27
+ # Builds the object
28
+ # @param [Mixed] Data to be matched against the list of oneOf items
29
+ # @return [Object] Returns the model or the data itself
30
+ def build(data)
31
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
32
+ # Note:
33
+ # - We do not attempt to check whether exactly one item matches.
34
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
35
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
36
+ # - TODO: scalar values are de facto behaving as if they were nullable.
37
+ # - TODO: logging when debugging is set.
38
+ openapi_one_of.each do |klass|
39
+ begin
40
+ next if klass == :AnyType # "nullable: true"
41
+ return find_and_cast_into_type(klass, data)
42
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
43
+ end
62
44
  end
63
- h[k.to_sym] = v
64
- }
65
45
 
66
- if attributes.key?(:'data')
67
- self.data = attributes[:'data']
46
+ openapi_one_of.include?(:AnyType) ? data : nil
68
47
  end
69
- end
70
-
71
- # Show invalid properties with the reasons. Usually used together with valid?
72
- # @return Array for valid properties with the reasons
73
- def list_invalid_properties
74
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
- invalid_properties = Array.new
76
- invalid_properties
77
- end
78
48
 
79
- # Check to see if the all the properties in the model are valid
80
- # @return true if the model is valid
81
- def valid?
82
- warn '[DEPRECATED] the `valid?` method is obsolete'
83
- true
84
- end
85
-
86
- # Checks equality by comparing each attribute.
87
- # @param [Object] Object to be compared
88
- def ==(o)
89
- return true if self.equal?(o)
90
- self.class == o.class &&
91
- data == o.data
92
- end
93
-
94
- # @see the `==` method
95
- # @param [Object] Object to be compared
96
- def eql?(o)
97
- self == o
98
- end
99
-
100
- # Calculates hash code according to all attributes.
101
- # @return [Integer] Hash code
102
- def hash
103
- [data].hash
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def self.build_from_hash(attributes)
110
- return nil unless attributes.is_a?(Hash)
111
- attributes = attributes.transform_keys(&:to_sym)
112
- transformed_hash = {}
113
- openapi_types.each_pair do |key, type|
114
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
- transformed_hash["#{key}"] = nil
116
- elsif type =~ /\AArray<(.*)>/i
117
- # check to ensure the input is an array given that the attribute
118
- # is documented as an array but the input is not
119
- if attributes[attribute_map[key]].is_a?(Array)
120
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
49
+ private
50
+
51
+ SchemaMismatchError = Class.new(StandardError)
52
+
53
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
54
+ def find_and_cast_into_type(klass, data)
55
+ return if data.nil?
56
+
57
+ case klass.to_s
58
+ when 'Boolean'
59
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
60
+ when 'Float'
61
+ return data if data.instance_of?(Float)
62
+ when 'Integer'
63
+ return data if data.instance_of?(Integer)
64
+ when 'Time'
65
+ return Time.parse(data)
66
+ when 'Date'
67
+ return Date.iso8601(data)
68
+ when 'String'
69
+ return data if data.instance_of?(String)
70
+ when 'Object' # "type: object"
71
+ return data if data.instance_of?(Hash)
72
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
73
+ if data.instance_of?(Array)
74
+ sub_type = Regexp.last_match[:sub_type]
75
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
76
+ end
77
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
78
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
79
+ sub_type = Regexp.last_match[:sub_type]
80
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
81
+ end
82
+ else # model
83
+ const = Repull.const_get(klass)
84
+ if const
85
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
86
+ model = const.build(data)
87
+ return model if model
88
+ else
89
+ # raise if data contains keys that are not known to the model
90
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
91
+ model = const.build_from_hash(data)
92
+ return model if model
93
+ end
121
94
  end
122
- elsif !attributes[attribute_map[key]].nil?
123
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
- end
125
- end
126
- new(transformed_hash)
127
- end
128
-
129
- # Returns the object in the form of hash
130
- # @return [Hash] Returns the object in the form of hash
131
- def to_hash
132
- hash = {}
133
- self.class.attribute_map.each_pair do |attr, param|
134
- value = self.send(attr)
135
- if value.nil?
136
- is_nullable = self.class.openapi_nullable.include?(attr)
137
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
95
  end
139
96
 
140
- hash[param] = _to_hash(value)
97
+ raise # if no match by now, raise
98
+ rescue
99
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
141
100
  end
142
- hash
143
101
  end
144
-
145
102
  end
146
103
 
147
104
  end
@@ -32,6 +32,7 @@ module Repull
32
32
 
33
33
  attr_accessor :occupancy
34
34
 
35
+ # Rooms to sell for the date range. Set to `0` to stop-sell this room/rate on the rates endpoint (Booking's dedicated `<closed>` stop-sell flag lives on the availability endpoint — see `BookingAvailabilityUpdate.closed`).
35
36
  attr_accessor :rooms_to_sell
36
37
 
37
38
  attr_accessor :restrictions
@@ -14,23 +14,47 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # Optional length-of-stay / availability restrictions for one rate update.
17
+ # Optional length-of-stay / availability restrictions for one rate update. Every field here is forwarded verbatim into Booking.com's rates XML (`minimumstay`, `maximumstay`, `closedonarrival`, `closedondeparture`, …) — omit a field to leave that restriction untouched.
18
18
  class BookingPricingRateUpdateRestrictions < ApiModelBase
19
+ # Minimum length of stay (`minimumstay`).
19
20
  attr_accessor :min_stay
20
21
 
22
+ # Maximum length of stay (`maximumstay`).
21
23
  attr_accessor :max_stay
22
24
 
25
+ # Closed-to-arrival — guests may not check in on the affected dates (`closedonarrival`).
23
26
  attr_accessor :closed_to_arrival
24
27
 
28
+ # Closed-to-departure — guests may not check out on the affected dates (`closedondeparture`).
25
29
  attr_accessor :closed_to_departure
26
30
 
31
+ # Arrival-based minimum length of stay (`minimumstay_arrival`).
32
+ attr_accessor :min_stay_arrival
33
+
34
+ # Arrival-based maximum length of stay (`maximumstay_arrival`).
35
+ attr_accessor :max_stay_arrival
36
+
37
+ # Arrival-based exact length of stay (`exactstay_arrival`).
38
+ attr_accessor :exact_stay_arrival
39
+
40
+ # Minimum advance-reservation window, format `XDY` (X days Y hours) — `min_advance_res`.
41
+ attr_accessor :min_advance_res
42
+
43
+ # Maximum advance-reservation window, format `XDY` (X days Y hours) — `max_advance_res`.
44
+ attr_accessor :max_advance_res
45
+
27
46
  # Attribute mapping from ruby-style variable name to JSON key.
28
47
  def self.attribute_map
29
48
  {
30
49
  :'min_stay' => :'minStay',
31
50
  :'max_stay' => :'maxStay',
32
51
  :'closed_to_arrival' => :'closedToArrival',
33
- :'closed_to_departure' => :'closedToDeparture'
52
+ :'closed_to_departure' => :'closedToDeparture',
53
+ :'min_stay_arrival' => :'minStayArrival',
54
+ :'max_stay_arrival' => :'maxStayArrival',
55
+ :'exact_stay_arrival' => :'exactStayArrival',
56
+ :'min_advance_res' => :'minAdvanceRes',
57
+ :'max_advance_res' => :'maxAdvanceRes'
34
58
  }
35
59
  end
36
60
 
@@ -50,7 +74,12 @@ module Repull
50
74
  :'min_stay' => :'Integer',
51
75
  :'max_stay' => :'Integer',
52
76
  :'closed_to_arrival' => :'Boolean',
53
- :'closed_to_departure' => :'Boolean'
77
+ :'closed_to_departure' => :'Boolean',
78
+ :'min_stay_arrival' => :'Integer',
79
+ :'max_stay_arrival' => :'Integer',
80
+ :'exact_stay_arrival' => :'Integer',
81
+ :'min_advance_res' => :'String',
82
+ :'max_advance_res' => :'String'
54
83
  }
55
84
  end
56
85
 
@@ -60,7 +89,12 @@ module Repull
60
89
  :'min_stay',
61
90
  :'max_stay',
62
91
  :'closed_to_arrival',
63
- :'closed_to_departure'
92
+ :'closed_to_departure',
93
+ :'min_stay_arrival',
94
+ :'max_stay_arrival',
95
+ :'exact_stay_arrival',
96
+ :'min_advance_res',
97
+ :'max_advance_res'
64
98
  ])
65
99
  end
66
100
 
@@ -95,6 +129,26 @@ module Repull
95
129
  if attributes.key?(:'closed_to_departure')
96
130
  self.closed_to_departure = attributes[:'closed_to_departure']
97
131
  end
132
+
133
+ if attributes.key?(:'min_stay_arrival')
134
+ self.min_stay_arrival = attributes[:'min_stay_arrival']
135
+ end
136
+
137
+ if attributes.key?(:'max_stay_arrival')
138
+ self.max_stay_arrival = attributes[:'max_stay_arrival']
139
+ end
140
+
141
+ if attributes.key?(:'exact_stay_arrival')
142
+ self.exact_stay_arrival = attributes[:'exact_stay_arrival']
143
+ end
144
+
145
+ if attributes.key?(:'min_advance_res')
146
+ self.min_advance_res = attributes[:'min_advance_res']
147
+ end
148
+
149
+ if attributes.key?(:'max_advance_res')
150
+ self.max_advance_res = attributes[:'max_advance_res']
151
+ end
98
152
  end
99
153
 
100
154
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -120,7 +174,12 @@ module Repull
120
174
  min_stay == o.min_stay &&
121
175
  max_stay == o.max_stay &&
122
176
  closed_to_arrival == o.closed_to_arrival &&
123
- closed_to_departure == o.closed_to_departure
177
+ closed_to_departure == o.closed_to_departure &&
178
+ min_stay_arrival == o.min_stay_arrival &&
179
+ max_stay_arrival == o.max_stay_arrival &&
180
+ exact_stay_arrival == o.exact_stay_arrival &&
181
+ min_advance_res == o.min_advance_res &&
182
+ max_advance_res == o.max_advance_res
124
183
  end
125
184
 
126
185
  # @see the `==` method
@@ -132,7 +191,7 @@ module Repull
132
191
  # Calculates hash code according to all attributes.
133
192
  # @return [Integer] Hash code
134
193
  def hash
135
- [min_stay, max_stay, closed_to_arrival, closed_to_departure].hash
194
+ [min_stay, max_stay, closed_to_arrival, closed_to_departure, min_stay_arrival, max_stay_arrival, exact_stay_arrival, min_advance_res, max_advance_res].hash
136
195
  end
137
196
 
138
197
  # Builds the object from hash
@@ -14,13 +14,47 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class GetStudioProject200Response < ApiModelBase
18
- attr_accessor :data
17
+ # Canonical PMS-owned listing content. Every field is optional — this is a partial update, only the fields you send are written; absent fields are left untouched. This is a LOCAL write only: it does NOT push to Airbnb/Booking.com. Distribution is a separate explicit publish step. `photos` are ingested by URL and attached to the listing in order (full-replace by default, or append via `photosMode`).
18
+ class ListingContentUpdateRequest < ApiModelBase
19
+ # Guest-facing title. Written to the listing name and the `en` description.
20
+ attr_accessor :title
21
+
22
+ # Alias for `title`.
23
+ attr_accessor :name
24
+
25
+ # Long-form listing description.
26
+ attr_accessor :description
27
+
28
+ # Short summary / tagline.
29
+ attr_accessor :summary
30
+
31
+ attr_accessor :amenities
32
+
33
+ attr_accessor :address
34
+
35
+ attr_accessor :occupancy
36
+
37
+ attr_accessor :policies
38
+
39
+ # Photo set — full replacement by default (pass `photosMode: \"append\"` to add after existing photos, or `[]` to clear; omit to leave untouched). Each entry is a hosted image URL (string) or a structured ref. URL-ingest only: the URL is persisted and attached to the listing in order — the OTA push downloads it at publish time. Binary/multipart upload is a follow-up. A non-empty array with no valid http(s) URL is reported in `deferred` (existing photos left untouched).
40
+ attr_accessor :photos
41
+
42
+ # How `photos` is applied: `replace` (full replacement of the photo set) or `append` (add after the existing photos). Ignored when `photos` is absent.
43
+ attr_accessor :photos_mode
19
44
 
20
45
  # Attribute mapping from ruby-style variable name to JSON key.
21
46
  def self.attribute_map
22
47
  {
23
- :'data' => :'data'
48
+ :'title' => :'title',
49
+ :'name' => :'name',
50
+ :'description' => :'description',
51
+ :'summary' => :'summary',
52
+ :'amenities' => :'amenities',
53
+ :'address' => :'address',
54
+ :'occupancy' => :'occupancy',
55
+ :'policies' => :'policies',
56
+ :'photos' => :'photos',
57
+ :'photos_mode' => :'photosMode'
24
58
  }
25
59
  end
26
60
 
@@ -37,13 +71,26 @@ module Repull
37
71
  # Attribute type mapping.
38
72
  def self.openapi_types
39
73
  {
40
- :'data' => :'StudioProject'
74
+ :'title' => :'String',
75
+ :'name' => :'String',
76
+ :'description' => :'String',
77
+ :'summary' => :'String',
78
+ :'amenities' => :'ListingContentUpdateRequestAmenities',
79
+ :'address' => :'ListingContentUpdateRequestAddress',
80
+ :'occupancy' => :'ListingContentUpdateRequestOccupancy',
81
+ :'policies' => :'ListingContentUpdateRequestPolicies',
82
+ :'photos' => :'Array<ListingContentUpdateRequestPhotosInner>',
83
+ :'photos_mode' => :'String'
41
84
  }
42
85
  end
43
86
 
44
87
  # List of attributes with nullable: true
45
88
  def self.openapi_nullable
46
89
  Set.new([
90
+ :'title',
91
+ :'name',
92
+ :'description',
93
+ :'summary',
47
94
  ])
48
95
  end
49
96
 
@@ -51,20 +98,60 @@ module Repull
51
98
  # @param [Hash] attributes Model attributes in the form of hash
52
99
  def initialize(attributes = {})
53
100
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetStudioProject200Response` initialize method"
101
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListingContentUpdateRequest` initialize method"
55
102
  end
56
103
 
57
104
  # check to see if the attribute exists and convert string to symbol for hash key
58
105
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
106
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
107
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetStudioProject200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
108
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListingContentUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
109
  end
63
110
  h[k.to_sym] = v
64
111
  }
65
112
 
66
- if attributes.key?(:'data')
67
- self.data = attributes[:'data']
113
+ if attributes.key?(:'title')
114
+ self.title = attributes[:'title']
115
+ end
116
+
117
+ if attributes.key?(:'name')
118
+ self.name = attributes[:'name']
119
+ end
120
+
121
+ if attributes.key?(:'description')
122
+ self.description = attributes[:'description']
123
+ end
124
+
125
+ if attributes.key?(:'summary')
126
+ self.summary = attributes[:'summary']
127
+ end
128
+
129
+ if attributes.key?(:'amenities')
130
+ self.amenities = attributes[:'amenities']
131
+ end
132
+
133
+ if attributes.key?(:'address')
134
+ self.address = attributes[:'address']
135
+ end
136
+
137
+ if attributes.key?(:'occupancy')
138
+ self.occupancy = attributes[:'occupancy']
139
+ end
140
+
141
+ if attributes.key?(:'policies')
142
+ self.policies = attributes[:'policies']
143
+ end
144
+
145
+ if attributes.key?(:'photos')
146
+ if (value = attributes[:'photos']).is_a?(Array)
147
+ self.photos = value
148
+ end
149
+ end
150
+
151
+ if attributes.key?(:'photos_mode')
152
+ self.photos_mode = attributes[:'photos_mode']
153
+ else
154
+ self.photos_mode = 'replace'
68
155
  end
69
156
  end
70
157
 
@@ -88,7 +175,16 @@ module Repull
88
175
  def ==(o)
89
176
  return true if self.equal?(o)
90
177
  self.class == o.class &&
91
- data == o.data
178
+ title == o.title &&
179
+ name == o.name &&
180
+ description == o.description &&
181
+ summary == o.summary &&
182
+ amenities == o.amenities &&
183
+ address == o.address &&
184
+ occupancy == o.occupancy &&
185
+ policies == o.policies &&
186
+ photos == o.photos &&
187
+ photos_mode == o.photos_mode
92
188
  end
93
189
 
94
190
  # @see the `==` method
@@ -100,7 +196,7 @@ module Repull
100
196
  # Calculates hash code according to all attributes.
101
197
  # @return [Integer] Hash code
102
198
  def hash
103
- [data].hash
199
+ [title, name, description, summary, amenities, address, occupancy, policies, photos, photos_mode].hash
104
200
  end
105
201
 
106
202
  # Builds the object from hash
@@ -14,13 +14,27 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class UpsertStudioProjectFile200Response < ApiModelBase
18
- attr_accessor :data
17
+ # Partial address. Only provided sub-fields are written.
18
+ class ListingContentUpdateRequestAddress < ApiModelBase
19
+ attr_accessor :street
20
+
21
+ attr_accessor :city
22
+
23
+ # ISO-3166 alpha-2 country code.
24
+ attr_accessor :country_code
25
+
26
+ attr_accessor :lat
27
+
28
+ attr_accessor :lng
19
29
 
20
30
  # Attribute mapping from ruby-style variable name to JSON key.
21
31
  def self.attribute_map
22
32
  {
23
- :'data' => :'data'
33
+ :'street' => :'street',
34
+ :'city' => :'city',
35
+ :'country_code' => :'countryCode',
36
+ :'lat' => :'lat',
37
+ :'lng' => :'lng'
24
38
  }
25
39
  end
26
40
 
@@ -37,13 +51,22 @@ module Repull
37
51
  # Attribute type mapping.
38
52
  def self.openapi_types
39
53
  {
40
- :'data' => :'UpsertStudioProjectFile200ResponseData'
54
+ :'street' => :'String',
55
+ :'city' => :'String',
56
+ :'country_code' => :'String',
57
+ :'lat' => :'Float',
58
+ :'lng' => :'Float'
41
59
  }
42
60
  end
43
61
 
44
62
  # List of attributes with nullable: true
45
63
  def self.openapi_nullable
46
64
  Set.new([
65
+ :'street',
66
+ :'city',
67
+ :'country_code',
68
+ :'lat',
69
+ :'lng'
47
70
  ])
48
71
  end
49
72
 
@@ -51,20 +74,36 @@ module Repull
51
74
  # @param [Hash] attributes Model attributes in the form of hash
52
75
  def initialize(attributes = {})
53
76
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::UpsertStudioProjectFile200Response` initialize method"
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListingContentUpdateRequestAddress` initialize method"
55
78
  end
56
79
 
57
80
  # check to see if the attribute exists and convert string to symbol for hash key
58
81
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
82
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
83
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::UpsertStudioProjectFile200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
84
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListingContentUpdateRequestAddress`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
85
  end
63
86
  h[k.to_sym] = v
64
87
  }
65
88
 
66
- if attributes.key?(:'data')
67
- self.data = attributes[:'data']
89
+ if attributes.key?(:'street')
90
+ self.street = attributes[:'street']
91
+ end
92
+
93
+ if attributes.key?(:'city')
94
+ self.city = attributes[:'city']
95
+ end
96
+
97
+ if attributes.key?(:'country_code')
98
+ self.country_code = attributes[:'country_code']
99
+ end
100
+
101
+ if attributes.key?(:'lat')
102
+ self.lat = attributes[:'lat']
103
+ end
104
+
105
+ if attributes.key?(:'lng')
106
+ self.lng = attributes[:'lng']
68
107
  end
69
108
  end
70
109
 
@@ -88,7 +127,11 @@ module Repull
88
127
  def ==(o)
89
128
  return true if self.equal?(o)
90
129
  self.class == o.class &&
91
- data == o.data
130
+ street == o.street &&
131
+ city == o.city &&
132
+ country_code == o.country_code &&
133
+ lat == o.lat &&
134
+ lng == o.lng
92
135
  end
93
136
 
94
137
  # @see the `==` method
@@ -100,7 +143,7 @@ module Repull
100
143
  # Calculates hash code according to all attributes.
101
144
  # @return [Integer] Hash code
102
145
  def hash
103
- [data].hash
146
+ [street, city, country_code, lat, lng].hash
104
147
  end
105
148
 
106
149
  # Builds the object from hash