repull 0.2.55 → 0.2.56

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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/reservations_api.rb +4 -4
  3. data/lib/repull/api/reviews_api.rb +6 -6
  4. data/lib/repull/api/vrbo_api.rb +371 -0
  5. data/lib/repull/models/create_vrbo_alteration200_response.rb +157 -0
  6. data/lib/repull/models/create_vrbo_alteration200_response_data.rb +202 -0
  7. data/lib/repull/models/create_vrbo_alteration200_response_data_before.rb +201 -0
  8. data/lib/repull/models/create_vrbo_alteration200_response_data_due_date.rb +168 -0
  9. data/lib/repull/models/create_vrbo_alteration200_response_data_payment.rb +168 -0
  10. data/lib/repull/models/create_vrbo_alteration200_response_data_payment_lines_inner.rb +157 -0
  11. data/lib/repull/models/create_vrbo_alteration200_response_data_payment_total.rb +159 -0
  12. data/lib/repull/models/create_vrbo_alteration201_response.rb +157 -0
  13. data/lib/repull/models/create_vrbo_alteration201_response_data.rb +193 -0
  14. data/lib/repull/models/create_vrbo_alteration_request.rb +305 -0
  15. data/lib/repull/models/get_vrbo_reservation200_response.rb +175 -0
  16. data/lib/repull/models/get_vrbo_reservation200_response_data.rb +310 -0
  17. data/lib/repull/models/get_vrbo_reservation200_response_data_available_actions_inner.rb +156 -0
  18. data/lib/repull/models/get_vrbo_reservation200_response_data_freshness.rb +219 -0
  19. data/lib/repull/models/get_vrbo_reservation200_response_data_freshness_accounts_inner.rb +174 -0
  20. data/lib/repull/models/list_vrbo_transactions200_response.rb +167 -0
  21. data/lib/repull/models/list_vrbo_transactions200_response_data_freshness.rb +220 -0
  22. data/lib/repull/models/list_vrbo_transactions200_response_data_inner.rb +362 -0
  23. data/lib/repull/models/list_vrbo_transactions200_response_data_inner_payout.rb +189 -0
  24. data/lib/repull/models/submit_guest_review200_response.rb +26 -4
  25. data/lib/repull/models/sync_vrbo_transactions200_response.rb +167 -0
  26. data/lib/repull/models/sync_vrbo_transactions200_response_accounts_inner.rb +183 -0
  27. data/lib/repull/models/sync_vrbo_transactions200_response_accounts_inner_error.rb +156 -0
  28. data/lib/repull/models/sync_vrbo_transactions_request.rb +156 -0
  29. data/lib/repull/models/vrbo_reservation_action200_response.rb +166 -0
  30. data/lib/repull/models/vrbo_reservation_action200_response_data.rb +215 -0
  31. data/lib/repull/models/vrbo_reservation_action200_response_data_payment.rb +169 -0
  32. data/lib/repull/models/vrbo_reservation_action200_response_data_penalties.rb +168 -0
  33. data/lib/repull/models/vrbo_reservation_action200_response_data_terms_inner.rb +158 -0
  34. data/lib/repull/models/vrbo_reservation_action_request.rb +268 -0
  35. data/lib/repull/version.rb +1 -1
  36. data/lib/repull.rb +29 -0
  37. data/openapi/v1.json +1695 -7
  38. metadata +30 -1
@@ -0,0 +1,310 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## 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`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
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
+ # The booking as Vrbo shows it; with `?options=`, Vrbo's choices for that action.
18
+ class GetVrboReservation200ResponseData < ApiModelBase
19
+ attr_accessor :reservation_code
20
+
21
+ attr_accessor :reservation_uuid
22
+
23
+ attr_accessor :state
24
+
25
+ attr_accessor :check_in
26
+
27
+ attr_accessor :check_out
28
+
29
+ attr_accessor :adults
30
+
31
+ attr_accessor :children
32
+
33
+ attr_accessor :pets
34
+
35
+ attr_accessor :guest_name
36
+
37
+ attr_accessor :currency
38
+
39
+ attr_accessor :guest_lines
40
+
41
+ attr_accessor :host_lines
42
+
43
+ attr_accessor :total_guest_payment
44
+
45
+ attr_accessor :payout
46
+
47
+ attr_accessor :cancellation_policy
48
+
49
+ attr_accessor :damage_deposit
50
+
51
+ attr_accessor :available_actions
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+ :'reservation_code' => :'reservationCode',
57
+ :'reservation_uuid' => :'reservationUuid',
58
+ :'state' => :'state',
59
+ :'check_in' => :'checkIn',
60
+ :'check_out' => :'checkOut',
61
+ :'adults' => :'adults',
62
+ :'children' => :'children',
63
+ :'pets' => :'pets',
64
+ :'guest_name' => :'guestName',
65
+ :'currency' => :'currency',
66
+ :'guest_lines' => :'guestLines',
67
+ :'host_lines' => :'hostLines',
68
+ :'total_guest_payment' => :'totalGuestPayment',
69
+ :'payout' => :'payout',
70
+ :'cancellation_policy' => :'cancellationPolicy',
71
+ :'damage_deposit' => :'damageDeposit',
72
+ :'available_actions' => :'availableActions'
73
+ }
74
+ end
75
+
76
+ # Returns attribute mapping this model knows about
77
+ def self.acceptable_attribute_map
78
+ attribute_map
79
+ end
80
+
81
+ # Returns all the JSON keys this model knows about
82
+ def self.acceptable_attributes
83
+ acceptable_attribute_map.values
84
+ end
85
+
86
+ # Attribute type mapping.
87
+ def self.openapi_types
88
+ {
89
+ :'reservation_code' => :'String',
90
+ :'reservation_uuid' => :'String',
91
+ :'state' => :'String',
92
+ :'check_in' => :'String',
93
+ :'check_out' => :'String',
94
+ :'adults' => :'Integer',
95
+ :'children' => :'Integer',
96
+ :'pets' => :'Integer',
97
+ :'guest_name' => :'String',
98
+ :'currency' => :'String',
99
+ :'guest_lines' => :'Array<CreateVrboAlteration200ResponseDataPaymentLinesInner>',
100
+ :'host_lines' => :'Array<CreateVrboAlteration200ResponseDataPaymentLinesInner>',
101
+ :'total_guest_payment' => :'Float',
102
+ :'payout' => :'Float',
103
+ :'cancellation_policy' => :'String',
104
+ :'damage_deposit' => :'Float',
105
+ :'available_actions' => :'Array<GetVrboReservation200ResponseDataAvailableActionsInner>'
106
+ }
107
+ end
108
+
109
+ # List of attributes with nullable: true
110
+ def self.openapi_nullable
111
+ Set.new([
112
+ :'state',
113
+ :'check_in',
114
+ :'check_out',
115
+ :'adults',
116
+ :'children',
117
+ :'pets',
118
+ :'guest_name',
119
+ :'currency',
120
+ :'total_guest_payment',
121
+ :'payout',
122
+ :'cancellation_policy',
123
+ :'damage_deposit',
124
+ ])
125
+ end
126
+
127
+ # Initializes the object
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ def initialize(attributes = {})
130
+ if (!attributes.is_a?(Hash))
131
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetVrboReservation200ResponseData` initialize method"
132
+ end
133
+
134
+ # check to see if the attribute exists and convert string to symbol for hash key
135
+ acceptable_attribute_map = self.class.acceptable_attribute_map
136
+ attributes = attributes.each_with_object({}) { |(k, v), h|
137
+ if (!acceptable_attribute_map.key?(k.to_sym))
138
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetVrboReservation200ResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
139
+ end
140
+ h[k.to_sym] = v
141
+ }
142
+
143
+ if attributes.key?(:'reservation_code')
144
+ self.reservation_code = attributes[:'reservation_code']
145
+ end
146
+
147
+ if attributes.key?(:'reservation_uuid')
148
+ self.reservation_uuid = attributes[:'reservation_uuid']
149
+ end
150
+
151
+ if attributes.key?(:'state')
152
+ self.state = attributes[:'state']
153
+ end
154
+
155
+ if attributes.key?(:'check_in')
156
+ self.check_in = attributes[:'check_in']
157
+ end
158
+
159
+ if attributes.key?(:'check_out')
160
+ self.check_out = attributes[:'check_out']
161
+ end
162
+
163
+ if attributes.key?(:'adults')
164
+ self.adults = attributes[:'adults']
165
+ end
166
+
167
+ if attributes.key?(:'children')
168
+ self.children = attributes[:'children']
169
+ end
170
+
171
+ if attributes.key?(:'pets')
172
+ self.pets = attributes[:'pets']
173
+ end
174
+
175
+ if attributes.key?(:'guest_name')
176
+ self.guest_name = attributes[:'guest_name']
177
+ end
178
+
179
+ if attributes.key?(:'currency')
180
+ self.currency = attributes[:'currency']
181
+ end
182
+
183
+ if attributes.key?(:'guest_lines')
184
+ if (value = attributes[:'guest_lines']).is_a?(Array)
185
+ self.guest_lines = value
186
+ end
187
+ end
188
+
189
+ if attributes.key?(:'host_lines')
190
+ if (value = attributes[:'host_lines']).is_a?(Array)
191
+ self.host_lines = value
192
+ end
193
+ end
194
+
195
+ if attributes.key?(:'total_guest_payment')
196
+ self.total_guest_payment = attributes[:'total_guest_payment']
197
+ end
198
+
199
+ if attributes.key?(:'payout')
200
+ self.payout = attributes[:'payout']
201
+ end
202
+
203
+ if attributes.key?(:'cancellation_policy')
204
+ self.cancellation_policy = attributes[:'cancellation_policy']
205
+ end
206
+
207
+ if attributes.key?(:'damage_deposit')
208
+ self.damage_deposit = attributes[:'damage_deposit']
209
+ end
210
+
211
+ if attributes.key?(:'available_actions')
212
+ if (value = attributes[:'available_actions']).is_a?(Array)
213
+ self.available_actions = value
214
+ end
215
+ end
216
+ end
217
+
218
+ # Show invalid properties with the reasons. Usually used together with valid?
219
+ # @return Array for valid properties with the reasons
220
+ def list_invalid_properties
221
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
222
+ invalid_properties = Array.new
223
+ invalid_properties
224
+ end
225
+
226
+ # Check to see if the all the properties in the model are valid
227
+ # @return true if the model is valid
228
+ def valid?
229
+ warn '[DEPRECATED] the `valid?` method is obsolete'
230
+ true
231
+ end
232
+
233
+ # Checks equality by comparing each attribute.
234
+ # @param [Object] Object to be compared
235
+ def ==(o)
236
+ return true if self.equal?(o)
237
+ self.class == o.class &&
238
+ reservation_code == o.reservation_code &&
239
+ reservation_uuid == o.reservation_uuid &&
240
+ state == o.state &&
241
+ check_in == o.check_in &&
242
+ check_out == o.check_out &&
243
+ adults == o.adults &&
244
+ children == o.children &&
245
+ pets == o.pets &&
246
+ guest_name == o.guest_name &&
247
+ currency == o.currency &&
248
+ guest_lines == o.guest_lines &&
249
+ host_lines == o.host_lines &&
250
+ total_guest_payment == o.total_guest_payment &&
251
+ payout == o.payout &&
252
+ cancellation_policy == o.cancellation_policy &&
253
+ damage_deposit == o.damage_deposit &&
254
+ available_actions == o.available_actions
255
+ end
256
+
257
+ # @see the `==` method
258
+ # @param [Object] Object to be compared
259
+ def eql?(o)
260
+ self == o
261
+ end
262
+
263
+ # Calculates hash code according to all attributes.
264
+ # @return [Integer] Hash code
265
+ def hash
266
+ [reservation_code, reservation_uuid, state, check_in, check_out, adults, children, pets, guest_name, currency, guest_lines, host_lines, total_guest_payment, payout, cancellation_policy, damage_deposit, available_actions].hash
267
+ end
268
+
269
+ # Builds the object from hash
270
+ # @param [Hash] attributes Model attributes in the form of hash
271
+ # @return [Object] Returns the model itself
272
+ def self.build_from_hash(attributes)
273
+ return nil unless attributes.is_a?(Hash)
274
+ attributes = attributes.transform_keys(&:to_sym)
275
+ transformed_hash = {}
276
+ openapi_types.each_pair do |key, type|
277
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
278
+ transformed_hash["#{key}"] = nil
279
+ elsif type =~ /\AArray<(.*)>/i
280
+ # check to ensure the input is an array given that the attribute
281
+ # is documented as an array but the input is not
282
+ if attributes[attribute_map[key]].is_a?(Array)
283
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
284
+ end
285
+ elsif !attributes[attribute_map[key]].nil?
286
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
287
+ end
288
+ end
289
+ new(transformed_hash)
290
+ end
291
+
292
+ # Returns the object in the form of hash
293
+ # @return [Hash] Returns the object in the form of hash
294
+ def to_hash
295
+ hash = {}
296
+ self.class.attribute_map.each_pair do |attr, param|
297
+ value = self.send(attr)
298
+ if value.nil?
299
+ is_nullable = self.class.openapi_nullable.include?(attr)
300
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
301
+ end
302
+
303
+ hash[param] = _to_hash(value)
304
+ end
305
+ hash
306
+ end
307
+
308
+ end
309
+
310
+ end
@@ -0,0 +1,156 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## 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`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
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 GetVrboReservation200ResponseDataAvailableActionsInner < ApiModelBase
18
+ attr_accessor :type
19
+
20
+ attr_accessor :label
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'type' => :'type',
26
+ :'label' => :'label'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'type' => :'String',
44
+ :'label' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetVrboReservation200ResponseDataAvailableActionsInner` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetVrboReservation200ResponseDataAvailableActionsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'type')
71
+ self.type = attributes[:'type']
72
+ end
73
+
74
+ if attributes.key?(:'label')
75
+ self.label = attributes[:'label']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ type == o.type &&
100
+ label == o.label
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [type, label].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+
154
+ end
155
+
156
+ end