repull 0.2.35 → 0.2.36

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/connect_api.rb +2 -2
  3. data/lib/repull/api/listings_api.rb +8 -8
  4. data/lib/repull/api/migrate_api.rb +68 -0
  5. data/lib/repull/models/booking_unacknowledged_event.rb +281 -0
  6. data/lib/repull/models/booking_unacknowledged_payload.rb +229 -0
  7. data/lib/repull/models/channel_degraded_event.rb +279 -0
  8. data/lib/repull/models/channel_degraded_payload.rb +174 -0
  9. data/lib/repull/models/channel_degraded_payload_object.rb +262 -0
  10. data/lib/repull/models/channel_sync_failed_event.rb +280 -0
  11. data/lib/repull/models/channel_sync_failure_payload.rb +214 -0
  12. data/lib/repull/models/channel_sync_failure_payload_failures_inner.rb +213 -0
  13. data/lib/repull/models/channel_sync_failure_payload_object.rb +289 -0
  14. data/lib/repull/models/charge_per.rb +42 -0
  15. data/lib/repull/models/create_connect_session_request.rb +2 -2
  16. data/lib/repull/models/create_connection_request.rb +1 -1
  17. data/lib/repull/models/import_from_channex200_response.rb +147 -0
  18. data/lib/repull/models/import_from_channex200_response_data.rb +324 -0
  19. data/lib/repull/models/import_from_channex200_response_data_channels_inner.rb +263 -0
  20. data/lib/repull/models/import_from_channex200_response_data_properties_inner.rb +222 -0
  21. data/lib/repull/models/import_from_channex200_response_data_summary.rb +201 -0
  22. data/lib/repull/models/import_from_channex200_response_data_summary_bookings.rb +165 -0
  23. data/lib/repull/models/import_from_channex200_response_data_summary_properties.rb +165 -0
  24. data/lib/repull/models/import_from_channex_request.rb +223 -0
  25. data/lib/repull/models/listing.rb +82 -1
  26. data/lib/repull/models/listing_content_photo.rb +206 -0
  27. data/lib/repull/models/listing_fee.rb +229 -0
  28. data/lib/repull/models/listing_policies.rb +257 -0
  29. data/lib/repull/models/listing_policies_check_in.rb +179 -0
  30. data/lib/repull/models/listing_policies_check_out.rb +148 -0
  31. data/lib/repull/models/listing_policies_quiet_hours.rb +156 -0
  32. data/lib/repull/models/listing_pricing_settings.rb +233 -0
  33. data/lib/repull/models/listing_room.rb +190 -0
  34. data/lib/repull/models/listing_room_beds_inner.rb +156 -0
  35. data/lib/repull/models/listing_rules.rb +212 -0
  36. data/lib/repull/models/listing_tax.rb +241 -0
  37. data/lib/repull/models/reservation_thread_assigned_event.rb +279 -0
  38. data/lib/repull/models/reservation_thread_assigned_payload.rb +174 -0
  39. data/lib/repull/models/reservation_thread_assigned_payload_object.rb +249 -0
  40. data/lib/repull/models/webhook_event.rb +8 -0
  41. data/lib/repull/models/webhook_event_type.rb +5 -1
  42. data/lib/repull/version.rb +1 -1
  43. data/lib/repull.rb +32 -0
  44. data/openapi/v1.json +1591 -8
  45. metadata +34 -4
  46. data/spec/api/plumguide_api_spec.rb +0 -85
@@ -0,0 +1,147 @@
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 ImportFromChannex200Response < 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' => :'ImportFromChannex200ResponseData'
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::ImportFromChannex200Response` initialize method"
55
+ end
56
+
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::ImportFromChannex200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'data')
67
+ self.data = attributes[:'data']
68
+ 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
+
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) }
121
+ 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
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ end
@@ -0,0 +1,324 @@
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 ImportFromChannex200ResponseData < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :environment
21
+
22
+ attr_accessor :dry_run
23
+
24
+ # False when the time budget ran out; run the same request again to continue.
25
+ attr_accessor :complete
26
+
27
+ attr_accessor :started_at
28
+
29
+ attr_accessor :finished_at
30
+
31
+ attr_accessor :summary
32
+
33
+ attr_accessor :properties
34
+
35
+ attr_accessor :room_types
36
+
37
+ attr_accessor :rate_plans
38
+
39
+ attr_accessor :webhooks
40
+
41
+ attr_accessor :signing_keys
42
+
43
+ attr_accessor :channels
44
+
45
+ attr_accessor :warnings
46
+
47
+ attr_accessor :next_steps
48
+
49
+ class EnumAttributeValidator
50
+ attr_reader :datatype
51
+ attr_reader :allowable_values
52
+
53
+ def initialize(datatype, allowable_values)
54
+ @allowable_values = allowable_values.map do |value|
55
+ case datatype.to_s
56
+ when /Integer/i
57
+ value.to_i
58
+ when /Float/i
59
+ value.to_f
60
+ else
61
+ value
62
+ end
63
+ end
64
+ end
65
+
66
+ def valid?(value)
67
+ !value || allowable_values.include?(value)
68
+ end
69
+ end
70
+
71
+ # Attribute mapping from ruby-style variable name to JSON key.
72
+ def self.attribute_map
73
+ {
74
+ :'id' => :'id',
75
+ :'environment' => :'environment',
76
+ :'dry_run' => :'dryRun',
77
+ :'complete' => :'complete',
78
+ :'started_at' => :'startedAt',
79
+ :'finished_at' => :'finishedAt',
80
+ :'summary' => :'summary',
81
+ :'properties' => :'properties',
82
+ :'room_types' => :'roomTypes',
83
+ :'rate_plans' => :'ratePlans',
84
+ :'webhooks' => :'webhooks',
85
+ :'signing_keys' => :'signingKeys',
86
+ :'channels' => :'channels',
87
+ :'warnings' => :'warnings',
88
+ :'next_steps' => :'nextSteps'
89
+ }
90
+ end
91
+
92
+ # Returns attribute mapping this model knows about
93
+ def self.acceptable_attribute_map
94
+ attribute_map
95
+ end
96
+
97
+ # Returns all the JSON keys this model knows about
98
+ def self.acceptable_attributes
99
+ acceptable_attribute_map.values
100
+ end
101
+
102
+ # Attribute type mapping.
103
+ def self.openapi_types
104
+ {
105
+ :'id' => :'String',
106
+ :'environment' => :'String',
107
+ :'dry_run' => :'Boolean',
108
+ :'complete' => :'Boolean',
109
+ :'started_at' => :'Time',
110
+ :'finished_at' => :'Time',
111
+ :'summary' => :'ImportFromChannex200ResponseDataSummary',
112
+ :'properties' => :'Array<ImportFromChannex200ResponseDataPropertiesInner>',
113
+ :'room_types' => :'Array<ImportFromChannex200ResponseDataPropertiesInner>',
114
+ :'rate_plans' => :'Array<ImportFromChannex200ResponseDataPropertiesInner>',
115
+ :'webhooks' => :'Array<ImportFromChannex200ResponseDataPropertiesInner>',
116
+ :'signing_keys' => :'Array<ImportFromChannex200ResponseDataPropertiesInner>',
117
+ :'channels' => :'Array<ImportFromChannex200ResponseDataChannelsInner>',
118
+ :'warnings' => :'Array<String>',
119
+ :'next_steps' => :'Array<String>'
120
+ }
121
+ end
122
+
123
+ # List of attributes with nullable: true
124
+ def self.openapi_nullable
125
+ Set.new([
126
+ ])
127
+ end
128
+
129
+ # Initializes the object
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ def initialize(attributes = {})
132
+ if (!attributes.is_a?(Hash))
133
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ImportFromChannex200ResponseData` initialize method"
134
+ end
135
+
136
+ # check to see if the attribute exists and convert string to symbol for hash key
137
+ acceptable_attribute_map = self.class.acceptable_attribute_map
138
+ attributes = attributes.each_with_object({}) { |(k, v), h|
139
+ if (!acceptable_attribute_map.key?(k.to_sym))
140
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ImportFromChannex200ResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
141
+ end
142
+ h[k.to_sym] = v
143
+ }
144
+
145
+ if attributes.key?(:'id')
146
+ self.id = attributes[:'id']
147
+ end
148
+
149
+ if attributes.key?(:'environment')
150
+ self.environment = attributes[:'environment']
151
+ end
152
+
153
+ if attributes.key?(:'dry_run')
154
+ self.dry_run = attributes[:'dry_run']
155
+ end
156
+
157
+ if attributes.key?(:'complete')
158
+ self.complete = attributes[:'complete']
159
+ end
160
+
161
+ if attributes.key?(:'started_at')
162
+ self.started_at = attributes[:'started_at']
163
+ end
164
+
165
+ if attributes.key?(:'finished_at')
166
+ self.finished_at = attributes[:'finished_at']
167
+ end
168
+
169
+ if attributes.key?(:'summary')
170
+ self.summary = attributes[:'summary']
171
+ end
172
+
173
+ if attributes.key?(:'properties')
174
+ if (value = attributes[:'properties']).is_a?(Array)
175
+ self.properties = value
176
+ end
177
+ end
178
+
179
+ if attributes.key?(:'room_types')
180
+ if (value = attributes[:'room_types']).is_a?(Array)
181
+ self.room_types = value
182
+ end
183
+ end
184
+
185
+ if attributes.key?(:'rate_plans')
186
+ if (value = attributes[:'rate_plans']).is_a?(Array)
187
+ self.rate_plans = value
188
+ end
189
+ end
190
+
191
+ if attributes.key?(:'webhooks')
192
+ if (value = attributes[:'webhooks']).is_a?(Array)
193
+ self.webhooks = value
194
+ end
195
+ end
196
+
197
+ if attributes.key?(:'signing_keys')
198
+ if (value = attributes[:'signing_keys']).is_a?(Array)
199
+ self.signing_keys = value
200
+ end
201
+ end
202
+
203
+ if attributes.key?(:'channels')
204
+ if (value = attributes[:'channels']).is_a?(Array)
205
+ self.channels = value
206
+ end
207
+ end
208
+
209
+ if attributes.key?(:'warnings')
210
+ if (value = attributes[:'warnings']).is_a?(Array)
211
+ self.warnings = value
212
+ end
213
+ end
214
+
215
+ if attributes.key?(:'next_steps')
216
+ if (value = attributes[:'next_steps']).is_a?(Array)
217
+ self.next_steps = value
218
+ end
219
+ end
220
+ end
221
+
222
+ # Show invalid properties with the reasons. Usually used together with valid?
223
+ # @return Array for valid properties with the reasons
224
+ def list_invalid_properties
225
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
226
+ invalid_properties = Array.new
227
+ invalid_properties
228
+ end
229
+
230
+ # Check to see if the all the properties in the model are valid
231
+ # @return true if the model is valid
232
+ def valid?
233
+ warn '[DEPRECATED] the `valid?` method is obsolete'
234
+ environment_validator = EnumAttributeValidator.new('String', ["production", "staging"])
235
+ return false unless environment_validator.valid?(@environment)
236
+ true
237
+ end
238
+
239
+ # Custom attribute writer method checking allowed values (enum).
240
+ # @param [Object] environment Object to be assigned
241
+ def environment=(environment)
242
+ validator = EnumAttributeValidator.new('String', ["production", "staging"])
243
+ unless validator.valid?(environment)
244
+ fail ArgumentError, "invalid value for \"environment\", must be one of #{validator.allowable_values}."
245
+ end
246
+ @environment = environment
247
+ end
248
+
249
+ # Checks equality by comparing each attribute.
250
+ # @param [Object] Object to be compared
251
+ def ==(o)
252
+ return true if self.equal?(o)
253
+ self.class == o.class &&
254
+ id == o.id &&
255
+ environment == o.environment &&
256
+ dry_run == o.dry_run &&
257
+ complete == o.complete &&
258
+ started_at == o.started_at &&
259
+ finished_at == o.finished_at &&
260
+ summary == o.summary &&
261
+ properties == o.properties &&
262
+ room_types == o.room_types &&
263
+ rate_plans == o.rate_plans &&
264
+ webhooks == o.webhooks &&
265
+ signing_keys == o.signing_keys &&
266
+ channels == o.channels &&
267
+ warnings == o.warnings &&
268
+ next_steps == o.next_steps
269
+ end
270
+
271
+ # @see the `==` method
272
+ # @param [Object] Object to be compared
273
+ def eql?(o)
274
+ self == o
275
+ end
276
+
277
+ # Calculates hash code according to all attributes.
278
+ # @return [Integer] Hash code
279
+ def hash
280
+ [id, environment, dry_run, complete, started_at, finished_at, summary, properties, room_types, rate_plans, webhooks, signing_keys, channels, warnings, next_steps].hash
281
+ end
282
+
283
+ # Builds the object from hash
284
+ # @param [Hash] attributes Model attributes in the form of hash
285
+ # @return [Object] Returns the model itself
286
+ def self.build_from_hash(attributes)
287
+ return nil unless attributes.is_a?(Hash)
288
+ attributes = attributes.transform_keys(&:to_sym)
289
+ transformed_hash = {}
290
+ openapi_types.each_pair do |key, type|
291
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
292
+ transformed_hash["#{key}"] = nil
293
+ elsif type =~ /\AArray<(.*)>/i
294
+ # check to ensure the input is an array given that the attribute
295
+ # is documented as an array but the input is not
296
+ if attributes[attribute_map[key]].is_a?(Array)
297
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
298
+ end
299
+ elsif !attributes[attribute_map[key]].nil?
300
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
301
+ end
302
+ end
303
+ new(transformed_hash)
304
+ end
305
+
306
+ # Returns the object in the form of hash
307
+ # @return [Hash] Returns the object in the form of hash
308
+ def to_hash
309
+ hash = {}
310
+ self.class.attribute_map.each_pair do |attr, param|
311
+ value = self.send(attr)
312
+ if value.nil?
313
+ is_nullable = self.class.openapi_nullable.include?(attr)
314
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
315
+ end
316
+
317
+ hash[param] = _to_hash(value)
318
+ end
319
+ hash
320
+ end
321
+
322
+ end
323
+
324
+ end