repull 0.2.17 → 0.2.18

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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +4 -4
  3. data/lib/repull/api/health_api.rb +0 -57
  4. data/lib/repull/api/migrate_api.rb +552 -0
  5. data/lib/repull/api/reservations_api.rb +2 -2
  6. data/lib/repull/models/airbnb_permits_response.rb +1 -1
  7. data/lib/repull/models/airbnb_permits_write_request.rb +1 -1
  8. data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +43 -4
  9. data/lib/repull/models/{airbnb_permits_write_request_permits_inner_answers_inner.rb → airbnb_permits_write_request_permits_inner_answers_value.rb} +22 -34
  10. data/lib/repull/models/check_migration_cutover200_response.rb +147 -0
  11. data/lib/repull/models/check_migration_cutover_request.rb +175 -0
  12. data/lib/repull/models/check_migration_cutover_request_reservations_inner.rb +216 -0
  13. data/lib/repull/models/connect_provider.rb +18 -5
  14. data/lib/repull/models/connect_session.rb +25 -5
  15. data/lib/repull/models/create_connect_session_request.rb +81 -5
  16. data/lib/repull/models/create_connect_session_request_copy.rb +251 -0
  17. data/lib/repull/models/create_connect_session_request_workspace.rb +196 -0
  18. data/lib/repull/models/delete_migration200_response.rb +147 -0
  19. data/lib/repull/models/delete_migration200_response_data.rb +165 -0
  20. data/lib/repull/models/get_migration200_response.rb +147 -0
  21. data/lib/repull/models/get_migration_channel_map200_response.rb +147 -0
  22. data/lib/repull/models/get_migration_report200_response.rb +147 -0
  23. data/lib/repull/models/list_migrations200_response.rb +158 -0
  24. data/lib/repull/models/listing_content_update_request.rb +10 -1
  25. data/lib/repull/models/listing_content_update_request_pricing.rb +235 -0
  26. data/lib/repull/models/listing_content_update_response.rb +1 -1
  27. data/lib/repull/models/listing_create_request.rb +24 -1
  28. data/lib/repull/models/listing_create_response.rb +14 -4
  29. data/lib/repull/models/migration.rb +303 -0
  30. data/lib/repull/models/migration_channel_map.rb +169 -0
  31. data/lib/repull/models/migration_channel_map_listings_inner.rb +208 -0
  32. data/lib/repull/models/migration_channel_map_listings_inner_airbnb.rb +156 -0
  33. data/lib/repull/models/migration_channel_map_listings_inner_booking.rb +156 -0
  34. data/lib/repull/models/migration_channel_map_sources_inner.rb +167 -0
  35. data/lib/repull/models/migration_completed_event.rb +309 -0
  36. data/lib/repull/models/migration_connections_inner.rb +195 -0
  37. data/lib/repull/models/migration_counts.rb +183 -0
  38. data/lib/repull/models/migration_cutover_check.rb +200 -0
  39. data/lib/repull/models/migration_cutover_check_mismatched_inner.rb +156 -0
  40. data/lib/repull/models/migration_failed_event.rb +309 -0
  41. data/lib/repull/models/migration_import_payload.rb +225 -0
  42. data/lib/repull/models/migration_import_payload_results_inner.rb +165 -0
  43. data/lib/repull/models/migration_import_run.rb +202 -0
  44. data/lib/repull/models/migration_import_run_results_inner.rb +165 -0
  45. data/lib/repull/models/migration_report.rb +179 -0
  46. data/lib/repull/models/migration_report_issues_inner.rb +229 -0
  47. data/lib/repull/models/migration_reservation_ref.rb +184 -0
  48. data/lib/repull/models/reservation.rb +12 -2
  49. data/lib/repull/models/run_migration_import202_response.rb +147 -0
  50. data/lib/repull/models/run_migration_import202_response_data.rb +158 -0
  51. data/lib/repull/models/run_migration_import202_response_data_queued_inner.rb +174 -0
  52. data/lib/repull/models/run_migration_import_request.rb +182 -0
  53. data/lib/repull/models/webhook_event.rb +4 -0
  54. data/lib/repull/models/webhook_event_type.rb +3 -1
  55. data/lib/repull/version.rb +1 -1
  56. data/lib/repull.rb +37 -1
  57. data/openapi/v1.json +3426 -2244
  58. metadata +39 -3
@@ -0,0 +1,216 @@
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` | 50 | | `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
+ Contact: ivan@vanio.ai
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 CheckMigrationCutoverRequestReservationsInner < ApiModelBase
18
+ attr_accessor :confirmation_code
19
+
20
+ attr_accessor :check_in
21
+
22
+ attr_accessor :check_out
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'confirmation_code' => :'confirmationCode',
28
+ :'check_in' => :'checkIn',
29
+ :'check_out' => :'checkOut'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'confirmation_code' => :'String',
47
+ :'check_in' => :'Date',
48
+ :'check_out' => :'Date'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::CheckMigrationCutoverRequestReservationsInner` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::CheckMigrationCutoverRequestReservationsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'confirmation_code')
75
+ self.confirmation_code = attributes[:'confirmation_code']
76
+ else
77
+ self.confirmation_code = nil
78
+ end
79
+
80
+ if attributes.key?(:'check_in')
81
+ self.check_in = attributes[:'check_in']
82
+ else
83
+ self.check_in = nil
84
+ end
85
+
86
+ if attributes.key?(:'check_out')
87
+ self.check_out = attributes[:'check_out']
88
+ else
89
+ self.check_out = nil
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ if @confirmation_code.nil?
99
+ invalid_properties.push('invalid value for "confirmation_code", confirmation_code cannot be nil.')
100
+ end
101
+
102
+ if @check_in.nil?
103
+ invalid_properties.push('invalid value for "check_in", check_in cannot be nil.')
104
+ end
105
+
106
+ if @check_out.nil?
107
+ invalid_properties.push('invalid value for "check_out", check_out cannot be nil.')
108
+ end
109
+
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ return false if @confirmation_code.nil?
118
+ return false if @check_in.nil?
119
+ return false if @check_out.nil?
120
+ true
121
+ end
122
+
123
+ # Custom attribute writer method with validation
124
+ # @param [Object] confirmation_code Value to be assigned
125
+ def confirmation_code=(confirmation_code)
126
+ if confirmation_code.nil?
127
+ fail ArgumentError, 'confirmation_code cannot be nil'
128
+ end
129
+
130
+ @confirmation_code = confirmation_code
131
+ end
132
+
133
+ # Custom attribute writer method with validation
134
+ # @param [Object] check_in Value to be assigned
135
+ def check_in=(check_in)
136
+ if check_in.nil?
137
+ fail ArgumentError, 'check_in cannot be nil'
138
+ end
139
+
140
+ @check_in = check_in
141
+ end
142
+
143
+ # Custom attribute writer method with validation
144
+ # @param [Object] check_out Value to be assigned
145
+ def check_out=(check_out)
146
+ if check_out.nil?
147
+ fail ArgumentError, 'check_out cannot be nil'
148
+ end
149
+
150
+ @check_out = check_out
151
+ end
152
+
153
+ # Checks equality by comparing each attribute.
154
+ # @param [Object] Object to be compared
155
+ def ==(o)
156
+ return true if self.equal?(o)
157
+ self.class == o.class &&
158
+ confirmation_code == o.confirmation_code &&
159
+ check_in == o.check_in &&
160
+ check_out == o.check_out
161
+ end
162
+
163
+ # @see the `==` method
164
+ # @param [Object] Object to be compared
165
+ def eql?(o)
166
+ self == o
167
+ end
168
+
169
+ # Calculates hash code according to all attributes.
170
+ # @return [Integer] Hash code
171
+ def hash
172
+ [confirmation_code, check_in, check_out].hash
173
+ end
174
+
175
+ # Builds the object from hash
176
+ # @param [Hash] attributes Model attributes in the form of hash
177
+ # @return [Object] Returns the model itself
178
+ def self.build_from_hash(attributes)
179
+ return nil unless attributes.is_a?(Hash)
180
+ attributes = attributes.transform_keys(&:to_sym)
181
+ transformed_hash = {}
182
+ openapi_types.each_pair do |key, type|
183
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
184
+ transformed_hash["#{key}"] = nil
185
+ elsif type =~ /\AArray<(.*)>/i
186
+ # check to ensure the input is an array given that the attribute
187
+ # is documented as an array but the input is not
188
+ if attributes[attribute_map[key]].is_a?(Array)
189
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
190
+ end
191
+ elsif !attributes[attribute_map[key]].nil?
192
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
193
+ end
194
+ end
195
+ new(transformed_hash)
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ if value.nil?
205
+ is_nullable = self.class.openapi_nullable.include?(attr)
206
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
+ end
208
+
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -40,6 +40,9 @@ module Repull
40
40
  # Optional friendly aliases the picker's search box can match.
41
41
  attr_accessor :aliases
42
42
 
43
+ # PMS providers: what Repull Migrate can carry across, per entity — `{ read: { listings: { level, notes }, … }, write: { … } }` with `level` `full` | `partial` | `none`. `null` for channels (OTAs).
44
+ attr_accessor :migration_capabilities
45
+
43
46
  # Attribute mapping from ruby-style variable name to JSON key.
44
47
  def self.attribute_map
45
48
  {
@@ -51,7 +54,8 @@ module Repull
51
54
  :'logo_url' => :'logoUrl',
52
55
  :'description' => :'description',
53
56
  :'docs_url' => :'docsUrl',
54
- :'aliases' => :'aliases'
57
+ :'aliases' => :'aliases',
58
+ :'migration_capabilities' => :'migrationCapabilities'
55
59
  }
56
60
  end
57
61
 
@@ -76,14 +80,16 @@ module Repull
76
80
  :'logo_url' => :'String',
77
81
  :'description' => :'String',
78
82
  :'docs_url' => :'String',
79
- :'aliases' => :'Array<String>'
83
+ :'aliases' => :'Array<String>',
84
+ :'migration_capabilities' => :'Hash<String, Object>'
80
85
  }
81
86
  end
82
87
 
83
88
  # List of attributes with nullable: true
84
89
  def self.openapi_nullable
85
90
  Set.new([
86
- :'aliases'
91
+ :'aliases',
92
+ :'migration_capabilities'
87
93
  ])
88
94
  end
89
95
 
@@ -156,6 +162,12 @@ module Repull
156
162
  self.aliases = value
157
163
  end
158
164
  end
165
+
166
+ if attributes.key?(:'migration_capabilities')
167
+ if (value = attributes[:'migration_capabilities']).is_a?(Hash)
168
+ self.migration_capabilities = value
169
+ end
170
+ end
159
171
  end
160
172
 
161
173
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -306,7 +318,8 @@ module Repull
306
318
  logo_url == o.logo_url &&
307
319
  description == o.description &&
308
320
  docs_url == o.docs_url &&
309
- aliases == o.aliases
321
+ aliases == o.aliases &&
322
+ migration_capabilities == o.migration_capabilities
310
323
  end
311
324
 
312
325
  # @see the `==` method
@@ -318,7 +331,7 @@ module Repull
318
331
  # Calculates hash code according to all attributes.
319
332
  # @return [Integer] Hash code
320
333
  def hash
321
- [id, display_name, category, connect_pattern, status, logo_url, description, docs_url, aliases].hash
334
+ [id, display_name, category, connect_pattern, status, logo_url, description, docs_url, aliases, migration_capabilities].hash
322
335
  end
323
336
 
324
337
  # Builds the object from hash
@@ -25,13 +25,21 @@ module Repull
25
25
  # Echoed back from the request body for SDK consumers that pass an opaque correlation token.
26
26
  attr_accessor :state
27
27
 
28
+ # Present only on a Repull Migrate session.
29
+ attr_accessor :purpose
30
+
31
+ # Repull Migrate only: the workspace the property manager's data lands in. Read it with `X-Workspace-Id`, track it with `GET /v1/migrations/{workspaceId}`.
32
+ attr_accessor :workspace_id
33
+
28
34
  # Attribute mapping from ruby-style variable name to JSON key.
29
35
  def self.attribute_map
30
36
  {
31
37
  :'session_id' => :'sessionId',
32
38
  :'url' => :'url',
33
39
  :'expires_at' => :'expiresAt',
34
- :'state' => :'state'
40
+ :'state' => :'state',
41
+ :'purpose' => :'purpose',
42
+ :'workspace_id' => :'workspaceId'
35
43
  }
36
44
  end
37
45
 
@@ -51,14 +59,16 @@ module Repull
51
59
  :'session_id' => :'String',
52
60
  :'url' => :'String',
53
61
  :'expires_at' => :'Time',
54
- :'state' => :'String'
62
+ :'state' => :'String',
63
+ :'purpose' => :'String',
64
+ :'workspace_id' => :'String'
55
65
  }
56
66
  end
57
67
 
58
68
  # List of attributes with nullable: true
59
69
  def self.openapi_nullable
60
70
  Set.new([
61
- :'state'
71
+ :'state',
62
72
  ])
63
73
  end
64
74
 
@@ -99,6 +109,14 @@ module Repull
99
109
  if attributes.key?(:'state')
100
110
  self.state = attributes[:'state']
101
111
  end
112
+
113
+ if attributes.key?(:'purpose')
114
+ self.purpose = attributes[:'purpose']
115
+ end
116
+
117
+ if attributes.key?(:'workspace_id')
118
+ self.workspace_id = attributes[:'workspace_id']
119
+ end
102
120
  end
103
121
 
104
122
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -169,7 +187,9 @@ module Repull
169
187
  session_id == o.session_id &&
170
188
  url == o.url &&
171
189
  expires_at == o.expires_at &&
172
- state == o.state
190
+ state == o.state &&
191
+ purpose == o.purpose &&
192
+ workspace_id == o.workspace_id
173
193
  end
174
194
 
175
195
  # @see the `==` method
@@ -181,7 +201,7 @@ module Repull
181
201
  # Calculates hash code according to all attributes.
182
202
  # @return [Integer] Hash code
183
203
  def hash
184
- [session_id, url, expires_at, state].hash
204
+ [session_id, url, expires_at, state, purpose, workspace_id].hash
185
205
  end
186
206
 
187
207
  # Builds the object from hash
@@ -27,13 +27,49 @@ module Repull
27
27
  # Optional UI language for the hosted Connect pages. Accepts any supported locale code (currently `en`, `fr`). When set it pins the language for the whole flow, overriding the workspace `default_language`. Unknown codes are ignored and the page falls back to the workspace default, then `Accept-Language`, then `en`. The end user can still override per-visit with a `?locale=` query param on the hosted page.
28
28
  attr_accessor :locale
29
29
 
30
+ # `migrate` starts a Repull Migrate session: the property manager connects their current PMS (or channel) and their data is copied into a new workspace of theirs, which you read with `X-Workspace-Id`. The hosted pages use migration wording, and after connecting they show the import's progress.
31
+ attr_accessor :purpose
32
+
33
+ attr_accessor :workspace
34
+
35
+ attr_accessor :copy
36
+
37
+ # Migrate only — what you want brought across, listed to the property manager before they connect.
38
+ attr_accessor :scope
39
+
40
+ class EnumAttributeValidator
41
+ attr_reader :datatype
42
+ attr_reader :allowable_values
43
+
44
+ def initialize(datatype, allowable_values)
45
+ @allowable_values = allowable_values.map do |value|
46
+ case datatype.to_s
47
+ when /Integer/i
48
+ value.to_i
49
+ when /Float/i
50
+ value.to_f
51
+ else
52
+ value
53
+ end
54
+ end
55
+ end
56
+
57
+ def valid?(value)
58
+ !value || allowable_values.include?(value)
59
+ end
60
+ end
61
+
30
62
  # Attribute mapping from ruby-style variable name to JSON key.
31
63
  def self.attribute_map
32
64
  {
33
65
  :'redirect_url' => :'redirectUrl',
34
66
  :'state' => :'state',
35
67
  :'allowed_providers' => :'allowedProviders',
36
- :'locale' => :'locale'
68
+ :'locale' => :'locale',
69
+ :'purpose' => :'purpose',
70
+ :'workspace' => :'workspace',
71
+ :'copy' => :'copy',
72
+ :'scope' => :'scope'
37
73
  }
38
74
  end
39
75
 
@@ -53,7 +89,11 @@ module Repull
53
89
  :'redirect_url' => :'String',
54
90
  :'state' => :'String',
55
91
  :'allowed_providers' => :'Array<String>',
56
- :'locale' => :'String'
92
+ :'locale' => :'String',
93
+ :'purpose' => :'String',
94
+ :'workspace' => :'CreateConnectSessionRequestWorkspace',
95
+ :'copy' => :'CreateConnectSessionRequestCopy',
96
+ :'scope' => :'Array<String>'
57
97
  }
58
98
  end
59
99
 
@@ -62,7 +102,7 @@ module Repull
62
102
  Set.new([
63
103
  :'state',
64
104
  :'allowed_providers',
65
- :'locale'
105
+ :'locale',
66
106
  ])
67
107
  end
68
108
 
@@ -101,6 +141,26 @@ module Repull
101
141
  if attributes.key?(:'locale')
102
142
  self.locale = attributes[:'locale']
103
143
  end
144
+
145
+ if attributes.key?(:'purpose')
146
+ self.purpose = attributes[:'purpose']
147
+ else
148
+ self.purpose = 'connect'
149
+ end
150
+
151
+ if attributes.key?(:'workspace')
152
+ self.workspace = attributes[:'workspace']
153
+ end
154
+
155
+ if attributes.key?(:'copy')
156
+ self.copy = attributes[:'copy']
157
+ end
158
+
159
+ if attributes.key?(:'scope')
160
+ if (value = attributes[:'scope']).is_a?(Array)
161
+ self.scope = value
162
+ end
163
+ end
104
164
  end
105
165
 
106
166
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -120,6 +180,8 @@ module Repull
120
180
  def valid?
121
181
  warn '[DEPRECATED] the `valid?` method is obsolete'
122
182
  return false if @redirect_url.nil?
183
+ purpose_validator = EnumAttributeValidator.new('String', ["connect", "migrate"])
184
+ return false unless purpose_validator.valid?(@purpose)
123
185
  true
124
186
  end
125
187
 
@@ -133,6 +195,16 @@ module Repull
133
195
  @redirect_url = redirect_url
134
196
  end
135
197
 
198
+ # Custom attribute writer method checking allowed values (enum).
199
+ # @param [Object] purpose Object to be assigned
200
+ def purpose=(purpose)
201
+ validator = EnumAttributeValidator.new('String', ["connect", "migrate"])
202
+ unless validator.valid?(purpose)
203
+ fail ArgumentError, "invalid value for \"purpose\", must be one of #{validator.allowable_values}."
204
+ end
205
+ @purpose = purpose
206
+ end
207
+
136
208
  # Checks equality by comparing each attribute.
137
209
  # @param [Object] Object to be compared
138
210
  def ==(o)
@@ -141,7 +213,11 @@ module Repull
141
213
  redirect_url == o.redirect_url &&
142
214
  state == o.state &&
143
215
  allowed_providers == o.allowed_providers &&
144
- locale == o.locale
216
+ locale == o.locale &&
217
+ purpose == o.purpose &&
218
+ workspace == o.workspace &&
219
+ copy == o.copy &&
220
+ scope == o.scope
145
221
  end
146
222
 
147
223
  # @see the `==` method
@@ -153,7 +229,7 @@ module Repull
153
229
  # Calculates hash code according to all attributes.
154
230
  # @return [Integer] Hash code
155
231
  def hash
156
- [redirect_url, state, allowed_providers, locale].hash
232
+ [redirect_url, state, allowed_providers, locale, purpose, workspace, copy, scope].hash
157
233
  end
158
234
 
159
235
  # Builds the object from hash