repull 0.2.30 → 0.2.32

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +2 -2
  3. data/lib/repull/api/billing_api.rb +68 -9
  4. data/lib/repull/api/booking_com_api.rb +80 -0
  5. data/lib/repull/api/connect_api.rb +139 -0
  6. data/lib/repull/api/conversations_api.rb +5 -2
  7. data/lib/repull/api/health_api.rb +2 -2
  8. data/lib/repull/api/hotels_api.rb +142 -0
  9. data/lib/repull/api/transactions_api.rb +109 -0
  10. data/lib/repull/api/workspaces_api.rb +96 -0
  11. data/lib/repull/configuration.rb +0 -4
  12. data/lib/repull/models/availability_batch_write_request.rb +30 -1
  13. data/lib/repull/models/availability_write_request.rb +30 -1
  14. data/lib/repull/models/availability_write_settings.rb +33 -4
  15. data/lib/repull/models/connect_provider.rb +2 -2
  16. data/lib/repull/models/connect_session.rb +12 -2
  17. data/lib/repull/models/create_billing_checkout200_response.rb +156 -0
  18. data/lib/repull/models/create_billing_checkout_request.rb +2 -2
  19. data/lib/repull/models/create_connect_session_request.rb +13 -1
  20. data/lib/repull/models/create_connect_session_request_workspace.rb +1 -1
  21. data/lib/repull/models/get_billing200_response.rb +183 -0
  22. data/lib/repull/models/get_billing200_response_limits.rb +160 -0
  23. data/lib/repull/models/get_billing200_response_used.rb +156 -0
  24. data/lib/repull/models/get_channel_health200_response_vrbo.rb +11 -1
  25. data/lib/repull/models/get_hotel200_response.rb +252 -0
  26. data/lib/repull/models/get_hotel200_response_room_types_inner.rb +168 -0
  27. data/lib/repull/models/get_usage_summary200_response.rb +10 -1
  28. data/lib/repull/models/get_usage_summary200_response_credits.rb +186 -0
  29. data/lib/repull/models/list_booking_transactions200_response.rb +158 -0
  30. data/lib/repull/models/list_hotels200_response.rb +158 -0
  31. data/lib/repull/models/list_hotels200_response_data_inner.rb +241 -0
  32. data/lib/repull/models/list_workspaces200_response.rb +158 -0
  33. data/lib/repull/models/listing.rb +50 -1
  34. data/lib/repull/models/listing_hotel.rb +202 -0
  35. data/lib/repull/models/record_account.rb +15 -5
  36. data/lib/repull/models/reservation.rb +45 -1
  37. data/lib/repull/models/reservation_message_received_payload.rb +12 -1
  38. data/lib/repull/models/reservation_message_sent_payload.rb +12 -1
  39. data/lib/repull/models/reservation_message_updated_payload.rb +12 -1
  40. data/lib/repull/models/reservation_webhook_object.rb +49 -5
  41. data/lib/repull/models/select_provider_response.rb +1 -1
  42. data/lib/repull/models/transaction.rb +349 -0
  43. data/lib/repull/models/transaction_fees.rb +176 -0
  44. data/lib/repull/models/transaction_payout.rb +198 -0
  45. data/lib/repull/models/workspace.rb +265 -0
  46. data/lib/repull/version.rb +1 -1
  47. data/lib/repull.rb +19 -0
  48. data/openapi/v1.json +1008 -18
  49. metadata +21 -2
@@ -0,0 +1,198 @@
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 TransactionPayout < ApiModelBase
18
+ # Reference of the payout this row belongs to.
19
+ attr_accessor :payout_id
20
+
21
+ attr_accessor :payout_date
22
+
23
+ # On a payout row: the net paid out to the host.
24
+ attr_accessor :paid_out_amount
25
+
26
+ # Masked destination bank account the payout was sent to (Booking.com payouts, from the statement PDF). Null on channels/rows without one.
27
+ attr_accessor :bank_destination
28
+
29
+ # Link to the channel's original payout statement PDF — the authoritative settlement record (Booking.com). Null when none.
30
+ attr_accessor :statement_url
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'payout_id' => :'payoutId',
36
+ :'payout_date' => :'payoutDate',
37
+ :'paid_out_amount' => :'paidOutAmount',
38
+ :'bank_destination' => :'bankDestination',
39
+ :'statement_url' => :'statementUrl'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'payout_id' => :'String',
57
+ :'payout_date' => :'String',
58
+ :'paid_out_amount' => :'Float',
59
+ :'bank_destination' => :'String',
60
+ :'statement_url' => :'String'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ :'payout_id',
68
+ :'payout_date',
69
+ :'paid_out_amount',
70
+ :'bank_destination',
71
+ :'statement_url'
72
+ ])
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::TransactionPayout` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ acceptable_attribute_map = self.class.acceptable_attribute_map
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!acceptable_attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::TransactionPayout`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'payout_id')
92
+ self.payout_id = attributes[:'payout_id']
93
+ else
94
+ self.payout_id = nil
95
+ end
96
+
97
+ if attributes.key?(:'payout_date')
98
+ self.payout_date = attributes[:'payout_date']
99
+ else
100
+ self.payout_date = nil
101
+ end
102
+
103
+ if attributes.key?(:'paid_out_amount')
104
+ self.paid_out_amount = attributes[:'paid_out_amount']
105
+ else
106
+ self.paid_out_amount = nil
107
+ end
108
+
109
+ if attributes.key?(:'bank_destination')
110
+ self.bank_destination = attributes[:'bank_destination']
111
+ end
112
+
113
+ if attributes.key?(:'statement_url')
114
+ self.statement_url = attributes[:'statement_url']
115
+ end
116
+ end
117
+
118
+ # Show invalid properties with the reasons. Usually used together with valid?
119
+ # @return Array for valid properties with the reasons
120
+ def list_invalid_properties
121
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
+ invalid_properties = Array.new
123
+ invalid_properties
124
+ end
125
+
126
+ # Check to see if the all the properties in the model are valid
127
+ # @return true if the model is valid
128
+ def valid?
129
+ warn '[DEPRECATED] the `valid?` method is obsolete'
130
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ payout_id == o.payout_id &&
139
+ payout_date == o.payout_date &&
140
+ paid_out_amount == o.paid_out_amount &&
141
+ bank_destination == o.bank_destination &&
142
+ statement_url == o.statement_url
143
+ end
144
+
145
+ # @see the `==` method
146
+ # @param [Object] Object to be compared
147
+ def eql?(o)
148
+ self == o
149
+ end
150
+
151
+ # Calculates hash code according to all attributes.
152
+ # @return [Integer] Hash code
153
+ def hash
154
+ [payout_id, payout_date, paid_out_amount, bank_destination, statement_url].hash
155
+ end
156
+
157
+ # Builds the object from hash
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ # @return [Object] Returns the model itself
160
+ def self.build_from_hash(attributes)
161
+ return nil unless attributes.is_a?(Hash)
162
+ attributes = attributes.transform_keys(&:to_sym)
163
+ transformed_hash = {}
164
+ openapi_types.each_pair do |key, type|
165
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = nil
167
+ elsif type =~ /\AArray<(.*)>/i
168
+ # check to ensure the input is an array given that the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[attribute_map[key]].is_a?(Array)
171
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
172
+ end
173
+ elsif !attributes[attribute_map[key]].nil?
174
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
175
+ end
176
+ end
177
+ new(transformed_hash)
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.openapi_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ end
197
+
198
+ end
@@ -0,0 +1,265 @@
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
+ # A sub-workspace: one customer of yours, with its own connections, listings and data. Send its `workspaceId` as `X-Workspace-Id` to act on it.
18
+ class Workspace < ApiModelBase
19
+ attr_accessor :workspace_id
20
+
21
+ attr_accessor :name
22
+
23
+ # Your own id for this customer, as you sent it.
24
+ attr_accessor :external_ref
25
+
26
+ # `connect` — opened by a Connect session; `migrate` — opened by Repull Migrate.
27
+ attr_accessor :created_via
28
+
29
+ attr_accessor :active
30
+
31
+ attr_accessor :created_at
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'workspace_id' => :'workspaceId',
37
+ :'name' => :'name',
38
+ :'external_ref' => :'externalRef',
39
+ :'created_via' => :'createdVia',
40
+ :'active' => :'active',
41
+ :'created_at' => :'createdAt'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'workspace_id' => :'String',
59
+ :'name' => :'String',
60
+ :'external_ref' => :'String',
61
+ :'created_via' => :'String',
62
+ :'active' => :'Boolean',
63
+ :'created_at' => :'Time'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ :'external_ref',
71
+ :'created_via',
72
+ ])
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::Workspace` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ acceptable_attribute_map = self.class.acceptable_attribute_map
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!acceptable_attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::Workspace`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'workspace_id')
92
+ self.workspace_id = attributes[:'workspace_id']
93
+ else
94
+ self.workspace_id = nil
95
+ end
96
+
97
+ if attributes.key?(:'name')
98
+ self.name = attributes[:'name']
99
+ else
100
+ self.name = nil
101
+ end
102
+
103
+ if attributes.key?(:'external_ref')
104
+ self.external_ref = attributes[:'external_ref']
105
+ end
106
+
107
+ if attributes.key?(:'created_via')
108
+ self.created_via = attributes[:'created_via']
109
+ end
110
+
111
+ if attributes.key?(:'active')
112
+ self.active = attributes[:'active']
113
+ else
114
+ self.active = nil
115
+ end
116
+
117
+ if attributes.key?(:'created_at')
118
+ self.created_at = attributes[:'created_at']
119
+ else
120
+ self.created_at = nil
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
128
+ invalid_properties = Array.new
129
+ if @workspace_id.nil?
130
+ invalid_properties.push('invalid value for "workspace_id", workspace_id cannot be nil.')
131
+ end
132
+
133
+ if @name.nil?
134
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
135
+ end
136
+
137
+ if @active.nil?
138
+ invalid_properties.push('invalid value for "active", active cannot be nil.')
139
+ end
140
+
141
+ if @created_at.nil?
142
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
143
+ end
144
+
145
+ invalid_properties
146
+ end
147
+
148
+ # Check to see if the all the properties in the model are valid
149
+ # @return true if the model is valid
150
+ def valid?
151
+ warn '[DEPRECATED] the `valid?` method is obsolete'
152
+ return false if @workspace_id.nil?
153
+ return false if @name.nil?
154
+ return false if @active.nil?
155
+ return false if @created_at.nil?
156
+ true
157
+ end
158
+
159
+ # Custom attribute writer method with validation
160
+ # @param [Object] workspace_id Value to be assigned
161
+ def workspace_id=(workspace_id)
162
+ if workspace_id.nil?
163
+ fail ArgumentError, 'workspace_id cannot be nil'
164
+ end
165
+
166
+ @workspace_id = workspace_id
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] name Value to be assigned
171
+ def name=(name)
172
+ if name.nil?
173
+ fail ArgumentError, 'name cannot be nil'
174
+ end
175
+
176
+ @name = name
177
+ end
178
+
179
+ # Custom attribute writer method with validation
180
+ # @param [Object] active Value to be assigned
181
+ def active=(active)
182
+ if active.nil?
183
+ fail ArgumentError, 'active cannot be nil'
184
+ end
185
+
186
+ @active = active
187
+ end
188
+
189
+ # Custom attribute writer method with validation
190
+ # @param [Object] created_at Value to be assigned
191
+ def created_at=(created_at)
192
+ if created_at.nil?
193
+ fail ArgumentError, 'created_at cannot be nil'
194
+ end
195
+
196
+ @created_at = created_at
197
+ end
198
+
199
+ # Checks equality by comparing each attribute.
200
+ # @param [Object] Object to be compared
201
+ def ==(o)
202
+ return true if self.equal?(o)
203
+ self.class == o.class &&
204
+ workspace_id == o.workspace_id &&
205
+ name == o.name &&
206
+ external_ref == o.external_ref &&
207
+ created_via == o.created_via &&
208
+ active == o.active &&
209
+ created_at == o.created_at
210
+ end
211
+
212
+ # @see the `==` method
213
+ # @param [Object] Object to be compared
214
+ def eql?(o)
215
+ self == o
216
+ end
217
+
218
+ # Calculates hash code according to all attributes.
219
+ # @return [Integer] Hash code
220
+ def hash
221
+ [workspace_id, name, external_ref, created_via, active, created_at].hash
222
+ end
223
+
224
+ # Builds the object from hash
225
+ # @param [Hash] attributes Model attributes in the form of hash
226
+ # @return [Object] Returns the model itself
227
+ def self.build_from_hash(attributes)
228
+ return nil unless attributes.is_a?(Hash)
229
+ attributes = attributes.transform_keys(&:to_sym)
230
+ transformed_hash = {}
231
+ openapi_types.each_pair do |key, type|
232
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
233
+ transformed_hash["#{key}"] = nil
234
+ elsif type =~ /\AArray<(.*)>/i
235
+ # check to ensure the input is an array given that the attribute
236
+ # is documented as an array but the input is not
237
+ if attributes[attribute_map[key]].is_a?(Array)
238
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
239
+ end
240
+ elsif !attributes[attribute_map[key]].nil?
241
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
242
+ end
243
+ end
244
+ new(transformed_hash)
245
+ end
246
+
247
+ # Returns the object in the form of hash
248
+ # @return [Hash] Returns the object in the form of hash
249
+ def to_hash
250
+ hash = {}
251
+ self.class.attribute_map.each_pair do |attr, param|
252
+ value = self.send(attr)
253
+ if value.nil?
254
+ is_nullable = self.class.openapi_nullable.include?(attr)
255
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
256
+ end
257
+
258
+ hash[param] = _to_hash(value)
259
+ end
260
+ hash
261
+ end
262
+
263
+ end
264
+
265
+ end
@@ -11,5 +11,5 @@ Generator version: 7.22.0
11
11
  =end
12
12
 
13
13
  module Repull
14
- VERSION = '0.2.30'
14
+ VERSION = '0.2.32'
15
15
  end
data/lib/repull.rb CHANGED
@@ -177,6 +177,7 @@ require 'repull/models/conversation_message_attachment'
177
177
  require 'repull/models/create_airbnb_listing_room_request'
178
178
  require 'repull/models/create_airbnb_offer_request'
179
179
  require 'repull/models/create_airbnb_offer_request_guest_details'
180
+ require 'repull/models/create_billing_checkout200_response'
180
181
  require 'repull/models/create_billing_checkout_request'
181
182
  require 'repull/models/create_booking_webhook_request'
182
183
  require 'repull/models/create_connect_session_request'
@@ -227,12 +228,17 @@ require 'repull/models/get_airbnb_listing_quality200_response'
227
228
  require 'repull/models/get_airbnb_listing_settings200_response'
228
229
  require 'repull/models/get_airbnb_offer200_response'
229
230
  require 'repull/models/get_airbnb_thread200_response'
231
+ require 'repull/models/get_billing200_response'
232
+ require 'repull/models/get_billing200_response_limits'
233
+ require 'repull/models/get_billing200_response_used'
230
234
  require 'repull/models/get_booking_extranet_login_config200_response'
231
235
  require 'repull/models/get_booking_extranet_login_status200_response'
232
236
  require 'repull/models/get_channel_health200_response'
233
237
  require 'repull/models/get_channel_health200_response_vrbo'
234
238
  require 'repull/models/get_connect_write_policy200_response'
235
239
  require 'repull/models/get_health200_response'
240
+ require 'repull/models/get_hotel200_response'
241
+ require 'repull/models/get_hotel200_response_room_types_inner'
236
242
  require 'repull/models/get_listing_calendar_sync200_response'
237
243
  require 'repull/models/get_listing_calendar_sync200_response_channels_inner'
238
244
  require 'repull/models/get_listing_calendar_sync200_response_channels_inner_problems_inner'
@@ -249,6 +255,7 @@ require 'repull/models/get_usage_logs200_response_data_inner'
249
255
  require 'repull/models/get_usage_logs200_response_pagination'
250
256
  require 'repull/models/get_usage_summary200_response'
251
257
  require 'repull/models/get_usage_summary200_response_breakdown_inner'
258
+ require 'repull/models/get_usage_summary200_response_credits'
252
259
  require 'repull/models/get_usage_summary200_response_limits'
253
260
  require 'repull/models/get_usage_summary200_response_remaining'
254
261
  require 'repull/models/get_usage_summary200_response_status_distribution'
@@ -292,9 +299,12 @@ require 'repull/models/list_airbnb_thread_messages200_response_data_inner'
292
299
  require 'repull/models/list_airbnb_thread_messages200_response_pagination'
293
300
  require 'repull/models/list_airbnb_transactions200_response'
294
301
  require 'repull/models/list_booking_reservations200_response'
302
+ require 'repull/models/list_booking_transactions200_response'
295
303
  require 'repull/models/list_connection_units200_response'
296
304
  require 'repull/models/list_connection_units200_response_listing_options_inner'
297
305
  require 'repull/models/list_connection_units200_response_units_inner'
306
+ require 'repull/models/list_hotels200_response'
307
+ require 'repull/models/list_hotels200_response_data_inner'
298
308
  require 'repull/models/list_inquiries200_response'
299
309
  require 'repull/models/list_inquiries200_response_data_inner'
300
310
  require 'repull/models/list_inquiries200_response_data_inner_expected_payout'
@@ -305,6 +315,7 @@ require 'repull/models/list_kv200_response_pagination'
305
315
  require 'repull/models/list_listing_units200_response'
306
316
  require 'repull/models/list_listing_units200_response_data_inner'
307
317
  require 'repull/models/list_migrations200_response'
318
+ require 'repull/models/list_workspaces200_response'
308
319
  require 'repull/models/listing'
309
320
  require 'repull/models/listing_active_request'
310
321
  require 'repull/models/listing_active_response'
@@ -344,6 +355,7 @@ require 'repull/models/listing_deleted_payload'
344
355
  require 'repull/models/listing_details'
345
356
  require 'repull/models/listing_generate_content_request'
346
357
  require 'repull/models/listing_generate_content_response'
358
+ require 'repull/models/listing_hotel'
347
359
  require 'repull/models/listing_list_response'
348
360
  require 'repull/models/listing_market_state_request'
349
361
  require 'repull/models/listing_market_state_response'
@@ -600,6 +612,9 @@ require 'repull/models/sync_airbnb_transactions200_response_accounts_inner'
600
612
  require 'repull/models/sync_airbnb_transactions200_response_accounts_inner_error'
601
613
  require 'repull/models/sync_airbnb_transactions_request'
602
614
  require 'repull/models/test_webhook_request'
615
+ require 'repull/models/transaction'
616
+ require 'repull/models/transaction_fees'
617
+ require 'repull/models/transaction_payout'
603
618
  require 'repull/models/update_airbnb_booking_settings200_response'
604
619
  require 'repull/models/update_airbnb_booking_settings200_response_data'
605
620
  require 'repull/models/update_airbnb_booking_settings_request'
@@ -665,6 +680,7 @@ require 'repull/models/webhook_list_response'
665
680
  require 'repull/models/webhook_subscription'
666
681
  require 'repull/models/withdraw_conversation_preapproval200_response'
667
682
  require 'repull/models/withdraw_conversation_special_offer200_response'
683
+ require 'repull/models/workspace'
668
684
 
669
685
  # APIs
670
686
  require 'repull/api/airbnb_api'
@@ -677,6 +693,7 @@ require 'repull/api/connections_api'
677
693
  require 'repull/api/conversations_api'
678
694
  require 'repull/api/guests_api'
679
695
  require 'repull/api/health_api'
696
+ require 'repull/api/hotels_api'
680
697
  require 'repull/api/kv_api'
681
698
  require 'repull/api/listings_api'
682
699
  require 'repull/api/markets_api'
@@ -689,8 +706,10 @@ require 'repull/api/reservations_api'
689
706
  require 'repull/api/reviews_api'
690
707
  require 'repull/api/schema_api'
691
708
  require 'repull/api/system_api'
709
+ require 'repull/api/transactions_api'
692
710
  require 'repull/api/vrbo_api'
693
711
  require 'repull/api/webhooks_api'
712
+ require 'repull/api/workspaces_api'
694
713
 
695
714
  module Repull
696
715
  class << self