repull 0.2.32 → 0.2.34
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/repull/api/connections_api.rb +77 -0
- data/lib/repull/api/promotions_api.rb +574 -0
- data/lib/repull/api/resolutions_api.rb +236 -0
- data/lib/repull/api/transactions_api.rb +73 -0
- data/lib/repull/models/account_import.rb +237 -0
- data/lib/repull/models/account_import_completed_event.rb +282 -0
- data/lib/repull/models/account_import_counts.rb +193 -0
- data/lib/repull/models/account_import_failed_event.rb +282 -0
- data/lib/repull/models/account_import_finished_payload.rb +224 -0
- data/lib/repull/models/account_import_stage.rb +177 -0
- data/lib/repull/models/account_import_started_event.rb +282 -0
- data/lib/repull/models/account_import_started_payload.rb +177 -0
- data/lib/repull/models/connection.rb +16 -5
- data/lib/repull/models/list_airbnb_resolutions200_response.rb +192 -0
- data/lib/repull/models/list_connection_imports200_response.rb +158 -0
- data/lib/repull/models/listing_updated_payload.rb +2 -2
- data/lib/repull/models/promotion.rb +344 -0
- data/lib/repull/models/promotion_applies_to.rb +161 -0
- data/lib/repull/models/promotion_bulk_request.rb +236 -0
- data/lib/repull/models/promotion_bulk_response.rb +158 -0
- data/lib/repull/models/promotion_bulk_response_data_inner.rb +174 -0
- data/lib/repull/models/promotion_bulk_response_data_inner_error.rb +165 -0
- data/lib/repull/models/promotion_bulk_response_summary.rb +156 -0
- data/lib/repull/models/promotion_catalog.rb +158 -0
- data/lib/repull/models/promotion_catalog_channels_inner.rb +222 -0
- data/lib/repull/models/promotion_catalog_entry.rb +265 -0
- data/lib/repull/models/promotion_catalog_field.rb +205 -0
- data/lib/repull/models/promotion_catalog_field_options_inner.rb +156 -0
- data/lib/repull/models/promotion_catalog_response.rb +147 -0
- data/lib/repull/models/promotion_create_request.rb +258 -0
- data/lib/repull/models/promotion_delete_response.rb +147 -0
- data/lib/repull/models/promotion_delete_response_data.rb +156 -0
- data/lib/repull/models/promotion_discount.rb +191 -0
- data/lib/repull/models/promotion_input.rb +241 -0
- data/lib/repull/models/promotion_list_response.rb +170 -0
- data/lib/repull/models/promotion_refresh_response.rb +170 -0
- data/lib/repull/models/promotion_response.rb +147 -0
- data/lib/repull/models/promotion_rules.rb +290 -0
- data/lib/repull/models/promotion_rules_blackout_dates_quota.rb +156 -0
- data/lib/repull/models/promotion_rules_booking_window.rb +230 -0
- data/lib/repull/models/promotion_rules_last_minute.rb +218 -0
- data/lib/repull/models/promotion_rules_stay_window.rb +211 -0
- data/lib/repull/models/promotion_type.rb +47 -0
- data/lib/repull/models/promotion_update_request.rb +175 -0
- data/lib/repull/models/promotion_usage.rb +193 -0
- data/lib/repull/models/promotion_usage_revenue.rb +156 -0
- data/lib/repull/models/refresh_airbnb_resolutions200_response.rb +219 -0
- data/lib/repull/models/refresh_airbnb_resolutions200_response_accounts_inner.rb +200 -0
- data/lib/repull/models/refresh_airbnb_resolutions200_response_accounts_inner_error.rb +156 -0
- data/lib/repull/models/refresh_airbnb_resolutions_request.rb +192 -0
- data/lib/repull/models/reservation_money_line.rb +14 -4
- data/lib/repull/models/resolution.rb +329 -0
- data/lib/repull/models/transaction_payout.rb +17 -6
- data/lib/repull/models/webhook_event.rb +6 -0
- data/lib/repull/models/webhook_event_type.rb +4 -1
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +47 -0
- data/openapi/v1.json +2211 -385
- data/scripts/regen.sh +1 -1
- metadata +49 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6a248ac037a338371cfaa5c3460bc42fd061099795538f7a81aa66b4d21272be
|
|
4
|
+
data.tar.gz: 3a664de3e52c9602b1dd8d2513c3e401b6948a8bf069af0664c3bc27961546b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c81c265d78915514dfa9e52b3e90e626c74682806bd8e2d820486a01dbedd5f50a2c466542272bb89da2a646a6cf4005574970628c793d9637d52b197e24c75
|
|
7
|
+
data.tar.gz: fd89562f25b577ee6716952ae8379c00cd3cad4e6a01ca1055b7e2d2311b82b4459ab098f6d31fda0a59a33269eba7d5aaa6041546709dc3ae5ab1a58a705347
|
data/README.md
CHANGED
|
@@ -163,6 +163,83 @@ module Repull
|
|
|
163
163
|
return data, status_code, headers
|
|
164
164
|
end
|
|
165
165
|
|
|
166
|
+
# List a connection's imports
|
|
167
|
+
# The import runs of one connected account, newest first: the first sync after connecting, a room or unit mapped later, a reconnect, a re-sync. Each run says where it stands (`running`, `completed`, `failed`), its stages and what it imported. To know when an account's first sync is done, wait for the `account.import.completed` webhook, or poll this endpoint (or `GET /v1/connect`, whose connections carry their latest `import`) until the newest run is no longer `running`. Auth: a Repull API key, or a Connect session token (`sessionId`).
|
|
168
|
+
# @param id [String] Connection handle `{provider}:{externalAccountId}`, e.g. `booking_extranet:36`, `vrbo:12`, `airbnb:1234567`, `hostaway:27434` — the `provider` and `externalAccountId` of a connection on `GET /v1/connect`, or the account of an `account.*` webhook.
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @option opts [Integer] :limit How many runs to return, newest first. (default to 20)
|
|
171
|
+
# @option opts [String] :session_id The Connect session ID (capability token).
|
|
172
|
+
# @return [ListConnectionImports200Response]
|
|
173
|
+
def list_connection_imports(id, opts = {})
|
|
174
|
+
data, _status_code, _headers = list_connection_imports_with_http_info(id, opts)
|
|
175
|
+
data
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# List a connection's imports
|
|
179
|
+
# The import runs of one connected account, newest first: the first sync after connecting, a room or unit mapped later, a reconnect, a re-sync. Each run says where it stands (`running`, `completed`, `failed`), its stages and what it imported. To know when an account's first sync is done, wait for the `account.import.completed` webhook, or poll this endpoint (or `GET /v1/connect`, whose connections carry their latest `import`) until the newest run is no longer `running`. Auth: a Repull API key, or a Connect session token (`sessionId`).
|
|
180
|
+
# @param id [String] Connection handle `{provider}:{externalAccountId}`, e.g. `booking_extranet:36`, `vrbo:12`, `airbnb:1234567`, `hostaway:27434` — the `provider` and `externalAccountId` of a connection on `GET /v1/connect`, or the account of an `account.*` webhook.
|
|
181
|
+
# @param [Hash] opts the optional parameters
|
|
182
|
+
# @option opts [Integer] :limit How many runs to return, newest first. (default to 20)
|
|
183
|
+
# @option opts [String] :session_id The Connect session ID (capability token).
|
|
184
|
+
# @return [Array<(ListConnectionImports200Response, Integer, Hash)>] ListConnectionImports200Response data, response status code and response headers
|
|
185
|
+
def list_connection_imports_with_http_info(id, opts = {})
|
|
186
|
+
if @api_client.config.debugging
|
|
187
|
+
@api_client.config.logger.debug 'Calling API: ConnectionsApi.list_connection_imports ...'
|
|
188
|
+
end
|
|
189
|
+
# verify the required parameter 'id' is set
|
|
190
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
191
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ConnectionsApi.list_connection_imports"
|
|
192
|
+
end
|
|
193
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
194
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ConnectionsApi.list_connection_imports, must be smaller than or equal to 100.'
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
198
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ConnectionsApi.list_connection_imports, must be greater than or equal to 1.'
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# resource path
|
|
202
|
+
local_var_path = '/v1/connections/{id}/imports'.sub('{id}', CGI.escape(id.to_s))
|
|
203
|
+
|
|
204
|
+
# query parameters
|
|
205
|
+
query_params = opts[:query_params] || {}
|
|
206
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
207
|
+
query_params[:'sessionId'] = opts[:'session_id'] if !opts[:'session_id'].nil?
|
|
208
|
+
|
|
209
|
+
# header parameters
|
|
210
|
+
header_params = opts[:header_params] || {}
|
|
211
|
+
# HTTP header 'Accept' (if needed)
|
|
212
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
213
|
+
|
|
214
|
+
# form parameters
|
|
215
|
+
form_params = opts[:form_params] || {}
|
|
216
|
+
|
|
217
|
+
# http body (model)
|
|
218
|
+
post_body = opts[:debug_body]
|
|
219
|
+
|
|
220
|
+
# return_type
|
|
221
|
+
return_type = opts[:debug_return_type] || 'ListConnectionImports200Response'
|
|
222
|
+
|
|
223
|
+
# auth_names
|
|
224
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
225
|
+
|
|
226
|
+
new_options = opts.merge(
|
|
227
|
+
:operation => :"ConnectionsApi.list_connection_imports",
|
|
228
|
+
:header_params => header_params,
|
|
229
|
+
:query_params => query_params,
|
|
230
|
+
:form_params => form_params,
|
|
231
|
+
:body => post_body,
|
|
232
|
+
:auth_names => auth_names,
|
|
233
|
+
:return_type => return_type
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
237
|
+
if @api_client.config.debugging
|
|
238
|
+
@api_client.config.logger.debug "API called: ConnectionsApi#list_connection_imports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
239
|
+
end
|
|
240
|
+
return data, status_code, headers
|
|
241
|
+
end
|
|
242
|
+
|
|
166
243
|
# List a connection's mappable units
|
|
167
244
|
# The units of a connected account with their current listing, a safe suggestion, and the workspace's listing options. `status: ready` with no units means the account has no properties. Auth: a Repull API key, or a Connect session token (`sessionId`) while the hosted flow is mapping. `listing_options` carries only the listings the units already point at (mapped or suggested); `listing_options_total` says how many the workspace has. Search the rest with `GET /v1/connections/{id}/listing-options?q=`.
|
|
168
245
|
# @param id [String] Connection handle `{channel}:{externalAccountId}`, e.g. `vrbo:12` or `booking_extranet:36`.
|