repull 0.2.31 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3b71b0b3f2a6425621fe610515407d396ea3466f3ec39d30a77d7a2305b527d
4
- data.tar.gz: f063363af9332fcee42f4458299b78aac800d8f1f85ed7c6556d9120e7ba8260
3
+ metadata.gz: 700f5c5ed895ae0bb1bef4af35df6ca97d74d1888b249984add4ef8863579971
4
+ data.tar.gz: 5baf2b7387025b2faed14ba269fdf8e3bef8b5401c1bfb1cbdfd1d3559f750ae
5
5
  SHA512:
6
- metadata.gz: 683a5cbcc182f873900c356f74db640f0c3bf913822e553d9804f7773eff32dea96837e73bc186f3cce0992b16852df97b5d54d31c36b59184c8835422b61498
7
- data.tar.gz: f6b207c5ed832883d56624f4189bd9ba1e8836e0f2d370c34a56cf5161f575134cfb36797ed7401e7f3b79c4effd441b3297257468a0c37f98b4e45745386837
6
+ metadata.gz: f128c2eec35de3dea3a83e0f1be7ff74e3a1f2bbcb7322398f16e5ab58a4e3c60f6c112708fae1856ff4357094c68e5da184073117fd7d4526d30bb05be1edce
7
+ data.tar.gz: babee7d003f88c79204f1242a373b3c87082ac9339fb8fb8b55e2a46a0cfcc057f126d22571a3e719db1c697eef2d139a3f318ce103498344dda21d30ecccdf5
@@ -1047,6 +1047,86 @@ module Repull
1047
1047
  return data, status_code, headers
1048
1048
  end
1049
1049
 
1050
+ # List Booking.com transactions (settlement ledger)
1051
+ # The Booking.com settlement ledger for this workspace: every payout (Payments by Booking.com → bank transfer) and reservation charge, with the gross the guest paid, Booking's commission and payments service fee, and the net paid out, each tied to its reservation. Official Connectivity-API and extranet-connected accounts are returned together as one Booking.com — there is no `booking_extranet` distinction and nothing extra to request. Cursor-paginated, newest first. (For all channels at once, use `/v1/transactions`.)
1052
+ # @param [Hash] opts the optional parameters
1053
+ # @option opts [String] :type Filter by transaction type, e.g. `Payout`, `Reservation`, `Refund`.
1054
+ # @option opts [String] :status Filter by raw status.
1055
+ # @option opts [Boolean] :is_payout When `true`, only payout rows (money that reached the host).
1056
+ # @option opts [Integer] :limit Page size (default 100, max 500).
1057
+ # @option opts [String] :cursor Opaque pagination cursor from a previous `pagination.nextCursor`.
1058
+ # @return [ListBookingTransactions200Response]
1059
+ def list_booking_transactions(opts = {})
1060
+ data, _status_code, _headers = list_booking_transactions_with_http_info(opts)
1061
+ data
1062
+ end
1063
+
1064
+ # List Booking.com transactions (settlement ledger)
1065
+ # The Booking.com settlement ledger for this workspace: every payout (Payments by Booking.com → bank transfer) and reservation charge, with the gross the guest paid, Booking's commission and payments service fee, and the net paid out, each tied to its reservation. Official Connectivity-API and extranet-connected accounts are returned together as one Booking.com — there is no `booking_extranet` distinction and nothing extra to request. Cursor-paginated, newest first. (For all channels at once, use `/v1/transactions`.)
1066
+ # @param [Hash] opts the optional parameters
1067
+ # @option opts [String] :type Filter by transaction type, e.g. `Payout`, `Reservation`, `Refund`.
1068
+ # @option opts [String] :status Filter by raw status.
1069
+ # @option opts [Boolean] :is_payout When `true`, only payout rows (money that reached the host).
1070
+ # @option opts [Integer] :limit Page size (default 100, max 500).
1071
+ # @option opts [String] :cursor Opaque pagination cursor from a previous `pagination.nextCursor`.
1072
+ # @return [Array<(ListBookingTransactions200Response, Integer, Hash)>] ListBookingTransactions200Response data, response status code and response headers
1073
+ def list_booking_transactions_with_http_info(opts = {})
1074
+ if @api_client.config.debugging
1075
+ @api_client.config.logger.debug 'Calling API: BookingComApi.list_booking_transactions ...'
1076
+ end
1077
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
1078
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BookingComApi.list_booking_transactions, must be smaller than or equal to 500.'
1079
+ end
1080
+
1081
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1082
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BookingComApi.list_booking_transactions, must be greater than or equal to 1.'
1083
+ end
1084
+
1085
+ # resource path
1086
+ local_var_path = '/v1/channels/booking/transactions'
1087
+
1088
+ # query parameters
1089
+ query_params = opts[:query_params] || {}
1090
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
1091
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
1092
+ query_params[:'is_payout'] = opts[:'is_payout'] if !opts[:'is_payout'].nil?
1093
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1094
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1095
+
1096
+ # header parameters
1097
+ header_params = opts[:header_params] || {}
1098
+ # HTTP header 'Accept' (if needed)
1099
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1100
+
1101
+ # form parameters
1102
+ form_params = opts[:form_params] || {}
1103
+
1104
+ # http body (model)
1105
+ post_body = opts[:debug_body]
1106
+
1107
+ # return_type
1108
+ return_type = opts[:debug_return_type] || 'ListBookingTransactions200Response'
1109
+
1110
+ # auth_names
1111
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1112
+
1113
+ new_options = opts.merge(
1114
+ :operation => :"BookingComApi.list_booking_transactions",
1115
+ :header_params => header_params,
1116
+ :query_params => query_params,
1117
+ :form_params => form_params,
1118
+ :body => post_body,
1119
+ :auth_names => auth_names,
1120
+ :return_type => return_type
1121
+ )
1122
+
1123
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1124
+ if @api_client.config.debugging
1125
+ @api_client.config.logger.debug "API called: BookingComApi#list_booking_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1126
+ end
1127
+ return data, status_code, headers
1128
+ end
1129
+
1050
1130
  # List Booking.com webhook subscriptions
1051
1131
  # **Not available through the API — always returns `403 forbidden`.** Booking.com notification subscriptions belong to the Repull platform account that every workspace shares: they are per notification type, not per property, so reading or changing them would affect every workspace. Booking.com events for your own properties are delivered through Repull webhooks — subscribe with `POST /v1/webhooks`.
1052
1132
  # @param [Hash] opts the optional parameters
@@ -0,0 +1,109 @@
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 'cgi'
14
+
15
+ module Repull
16
+ class TransactionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List transactions & payments (unified ledger)
23
+ # Every channel's money in one ledger: payouts that reached the host, reservation charges, refunds and adjustments, across Airbnb, Booking.com and Vrbo. Each row carries a normalized `platform` — `booking` always means Booking.com however the account was connected (official API or extranet); there is no `booking_extranet`, and `?platform=booking` matches all of them. A payout row's `amount` is the net the host received; `grossAmount` is what the guest paid and `fees` the deductions (commission, payments service fee, processing fee). Cursor-paginated, newest first.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :platform Filter to one channel: &#x60;airbnb&#x60;, &#x60;booking&#x60; (Booking.com, however connected), or &#x60;vrbo&#x60;. Omit for all channels.
26
+ # @option opts [String] :type Filter by transaction type, e.g. &#x60;Payout&#x60;, &#x60;Reservation&#x60;, &#x60;Refund&#x60;.
27
+ # @option opts [String] :status Filter by raw status.
28
+ # @option opts [Boolean] :is_payout When &#x60;true&#x60;, only payout rows (money that reached the host).
29
+ # @option opts [Integer] :limit Page size (default 100, max 500).
30
+ # @option opts [String] :cursor Opaque pagination cursor from a previous &#x60;pagination.nextCursor&#x60;.
31
+ # @return [ListBookingTransactions200Response]
32
+ def list_transactions(opts = {})
33
+ data, _status_code, _headers = list_transactions_with_http_info(opts)
34
+ data
35
+ end
36
+
37
+ # List transactions &amp; payments (unified ledger)
38
+ # Every channel&#39;s money in one ledger: payouts that reached the host, reservation charges, refunds and adjustments, across Airbnb, Booking.com and Vrbo. Each row carries a normalized &#x60;platform&#x60; — &#x60;booking&#x60; always means Booking.com however the account was connected (official API or extranet); there is no &#x60;booking_extranet&#x60;, and &#x60;?platform&#x3D;booking&#x60; matches all of them. A payout row&#39;s &#x60;amount&#x60; is the net the host received; &#x60;grossAmount&#x60; is what the guest paid and &#x60;fees&#x60; the deductions (commission, payments service fee, processing fee). Cursor-paginated, newest first.
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [String] :platform Filter to one channel: &#x60;airbnb&#x60;, &#x60;booking&#x60; (Booking.com, however connected), or &#x60;vrbo&#x60;. Omit for all channels.
41
+ # @option opts [String] :type Filter by transaction type, e.g. &#x60;Payout&#x60;, &#x60;Reservation&#x60;, &#x60;Refund&#x60;.
42
+ # @option opts [String] :status Filter by raw status.
43
+ # @option opts [Boolean] :is_payout When &#x60;true&#x60;, only payout rows (money that reached the host).
44
+ # @option opts [Integer] :limit Page size (default 100, max 500).
45
+ # @option opts [String] :cursor Opaque pagination cursor from a previous &#x60;pagination.nextCursor&#x60;.
46
+ # @return [Array<(ListBookingTransactions200Response, Integer, Hash)>] ListBookingTransactions200Response data, response status code and response headers
47
+ def list_transactions_with_http_info(opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug 'Calling API: TransactionsApi.list_transactions ...'
50
+ end
51
+ allowable_values = ["airbnb", "booking", "vrbo"]
52
+ if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
53
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
54
+ end
55
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
56
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionsApi.list_transactions, must be smaller than or equal to 500.'
57
+ end
58
+
59
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
60
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionsApi.list_transactions, must be greater than or equal to 1.'
61
+ end
62
+
63
+ # resource path
64
+ local_var_path = '/v1/transactions'
65
+
66
+ # query parameters
67
+ query_params = opts[:query_params] || {}
68
+ query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
69
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
70
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
71
+ query_params[:'is_payout'] = opts[:'is_payout'] if !opts[:'is_payout'].nil?
72
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
73
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
74
+
75
+ # header parameters
76
+ header_params = opts[:header_params] || {}
77
+ # HTTP header 'Accept' (if needed)
78
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
79
+
80
+ # form parameters
81
+ form_params = opts[:form_params] || {}
82
+
83
+ # http body (model)
84
+ post_body = opts[:debug_body]
85
+
86
+ # return_type
87
+ return_type = opts[:debug_return_type] || 'ListBookingTransactions200Response'
88
+
89
+ # auth_names
90
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
91
+
92
+ new_options = opts.merge(
93
+ :operation => :"TransactionsApi.list_transactions",
94
+ :header_params => header_params,
95
+ :query_params => query_params,
96
+ :form_params => form_params,
97
+ :body => post_body,
98
+ :auth_names => auth_names,
99
+ :return_type => return_type
100
+ )
101
+
102
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug "API called: TransactionsApi#list_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
105
+ end
106
+ return data, status_code, headers
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,158 @@
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 ListBookingTransactions200Response < ApiModelBase
18
+ attr_accessor :data
19
+
20
+ attr_accessor :pagination
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'data' => :'data',
26
+ :'pagination' => :'pagination'
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
+ :'data' => :'Array<Transaction>',
44
+ :'pagination' => :'Pagination'
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::ListBookingTransactions200Response` 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::ListBookingTransactions200Response`. 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?(:'data')
71
+ if (value = attributes[:'data']).is_a?(Array)
72
+ self.data = value
73
+ end
74
+ end
75
+
76
+ if attributes.key?(:'pagination')
77
+ self.pagination = attributes[:'pagination']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ data == o.data &&
102
+ pagination == o.pagination
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [data, pagination].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -38,6 +38,18 @@ module Repull
38
38
  # Local check-out time for this stay, `HH:MM` on a 24-hour clock in the property's own timezone. Pair with `checkOut` to schedule the turnover clean. `null` when unknown. This is the same field `PATCH /v1/reservations/{id}` writes.
39
39
  attr_accessor :check_out_time
40
40
 
41
+ # What the guest wrote with the booking, as the channel sent it. Booking.com puts the estimated arrival time and special requests here. Free text, never parsed. `null` when the guest left none.
42
+ attr_accessor :guest_notes
43
+
44
+ # The conversation with this guest — pass it to `GET /v1/conversations/{id}` and `/v1/conversations/{id}/messages`. It is the same conversation from inquiry through pre-approval to the confirmed booking, and the same id the message webhooks carry, so a booking links straight to the messages that led to it. `null` when the channel has no conversation for this booking.
45
+ attr_accessor :conversation_id
46
+
47
+ # The channel's own id for that conversation (Airbnb thread id, Booking.com conversation id, …). `null` when there is none.
48
+ attr_accessor :external_thread_id
49
+
50
+ # The inquiry this booking came from (`GET /v1/inquiries`), when the guest asked before booking. When an inquiry turns into a booking, `inquiry.updated` fires with `status: \"booked\"` and this reservation's id. `null` for bookings with no inquiry.
51
+ attr_accessor :inquiry_id
52
+
41
53
  # Lifecycle status. The API normalises a multi-decade internal taxonomy down to these four buckets, so the value you receive is always one of the enum constants. `completed` is derived from `checkOut < today`. A `pending` booking request the channel already let lapse — Airbnb expires an unanswered request 24 hours after the guest asks, and no request can be answered once its check-in has passed — is reported as `cancelled` with `statusDetail: \"request_expired\"`, even when the channel never told us. Every `cancelled` reservation says how it ended in `statusDetail` when the channel tells us.
42
54
  attr_accessor :status
43
55
 
@@ -102,6 +114,10 @@ module Repull
102
114
  :'check_out' => :'checkOut',
103
115
  :'check_in_time' => :'checkInTime',
104
116
  :'check_out_time' => :'checkOutTime',
117
+ :'guest_notes' => :'guestNotes',
118
+ :'conversation_id' => :'conversationId',
119
+ :'external_thread_id' => :'externalThreadId',
120
+ :'inquiry_id' => :'inquiryId',
105
121
  :'status' => :'status',
106
122
  :'status_detail' => :'statusDetail',
107
123
  :'pending_reason' => :'pendingReason',
@@ -144,6 +160,10 @@ module Repull
144
160
  :'check_out' => :'Date',
145
161
  :'check_in_time' => :'String',
146
162
  :'check_out_time' => :'String',
163
+ :'guest_notes' => :'String',
164
+ :'conversation_id' => :'String',
165
+ :'external_thread_id' => :'String',
166
+ :'inquiry_id' => :'String',
147
167
  :'status' => :'String',
148
168
  :'status_detail' => :'String',
149
169
  :'pending_reason' => :'String',
@@ -171,6 +191,10 @@ module Repull
171
191
  :'account',
172
192
  :'check_in_time',
173
193
  :'check_out_time',
194
+ :'guest_notes',
195
+ :'conversation_id',
196
+ :'external_thread_id',
197
+ :'inquiry_id',
174
198
  :'source',
175
199
  :'platform',
176
200
  :'unit',
@@ -235,6 +259,22 @@ module Repull
235
259
  self.check_out_time = attributes[:'check_out_time']
236
260
  end
237
261
 
262
+ if attributes.key?(:'guest_notes')
263
+ self.guest_notes = attributes[:'guest_notes']
264
+ end
265
+
266
+ if attributes.key?(:'conversation_id')
267
+ self.conversation_id = attributes[:'conversation_id']
268
+ end
269
+
270
+ if attributes.key?(:'external_thread_id')
271
+ self.external_thread_id = attributes[:'external_thread_id']
272
+ end
273
+
274
+ if attributes.key?(:'inquiry_id')
275
+ self.inquiry_id = attributes[:'inquiry_id']
276
+ end
277
+
238
278
  if attributes.key?(:'status')
239
279
  self.status = attributes[:'status']
240
280
  else
@@ -466,6 +506,10 @@ module Repull
466
506
  check_out == o.check_out &&
467
507
  check_in_time == o.check_in_time &&
468
508
  check_out_time == o.check_out_time &&
509
+ guest_notes == o.guest_notes &&
510
+ conversation_id == o.conversation_id &&
511
+ external_thread_id == o.external_thread_id &&
512
+ inquiry_id == o.inquiry_id &&
469
513
  status == o.status &&
470
514
  status_detail == o.status_detail &&
471
515
  pending_reason == o.pending_reason &&
@@ -495,7 +539,7 @@ module Repull
495
539
  # Calculates hash code according to all attributes.
496
540
  # @return [Integer] Hash code
497
541
  def hash
498
- [account, id, listing_id, guest_id, check_in, check_out, check_in_time, check_out_time, status, status_detail, pending_reason, respond_by, source, platform, confirmation_code, unit, primary_guest, occupancy, financials, total_price, currency, guest_details, created_at, updated_at, booked_at, guest_name].hash
542
+ [account, id, listing_id, guest_id, check_in, check_out, check_in_time, check_out_time, guest_notes, conversation_id, external_thread_id, inquiry_id, status, status_detail, pending_reason, respond_by, source, platform, confirmation_code, unit, primary_guest, occupancy, financials, total_price, currency, guest_details, created_at, updated_at, booked_at, guest_name].hash
499
543
  end
500
544
 
501
545
  # Builds the object from hash
@@ -49,6 +49,18 @@ module Repull
49
49
  # Local check-out time, `HH:MM` on a 24-hour clock in the property's own timezone. Pair it with `checkoutDate` to schedule the turnover. `null` when unknown.
50
50
  attr_accessor :check_out_time
51
51
 
52
+ # What the guest wrote with the booking — on Booking.com, the estimated arrival time and special requests. Free text. `null` when there were none.
53
+ attr_accessor :guest_notes
54
+
55
+ # The conversation with this guest — pass it to `GET /v1/conversations/{id}` and `/v1/conversations/{id}/messages`. It is the same conversation from inquiry through pre-approval to the confirmed booking, and the same id the message webhooks carry, so a booking links straight to the messages that led to it. `null` when the channel has no conversation for this booking.
56
+ attr_accessor :conversation_id
57
+
58
+ # The channel's own id for that conversation (Airbnb thread id, Booking.com conversation id, …). `null` when there is none.
59
+ attr_accessor :external_thread_id
60
+
61
+ # The inquiry this booking came from (`GET /v1/inquiries`), when the guest asked before booking. When an inquiry turns into a booking, `inquiry.updated` fires with `status: \"booked\"` and this reservation's id. `null` for bookings with no inquiry.
62
+ attr_accessor :inquiry_id
63
+
52
64
  # Attribute mapping from ruby-style variable name to JSON key.
53
65
  def self.attribute_map
54
66
  {
@@ -62,7 +74,11 @@ module Repull
62
74
  :'status' => :'status',
63
75
  :'cancellation_policy' => :'cancellationPolicy',
64
76
  :'check_in_time' => :'checkInTime',
65
- :'check_out_time' => :'checkOutTime'
77
+ :'check_out_time' => :'checkOutTime',
78
+ :'guest_notes' => :'guestNotes',
79
+ :'conversation_id' => :'conversationId',
80
+ :'external_thread_id' => :'externalThreadId',
81
+ :'inquiry_id' => :'inquiryId'
66
82
  }
67
83
  end
68
84
 
@@ -89,7 +105,11 @@ module Repull
89
105
  :'status' => :'String',
90
106
  :'cancellation_policy' => :'String',
91
107
  :'check_in_time' => :'String',
92
- :'check_out_time' => :'String'
108
+ :'check_out_time' => :'String',
109
+ :'guest_notes' => :'String',
110
+ :'conversation_id' => :'String',
111
+ :'external_thread_id' => :'String',
112
+ :'inquiry_id' => :'String'
93
113
  }
94
114
  end
95
115
 
@@ -98,7 +118,11 @@ module Repull
98
118
  Set.new([
99
119
  :'cancellation_policy',
100
120
  :'check_in_time',
101
- :'check_out_time'
121
+ :'check_out_time',
122
+ :'guest_notes',
123
+ :'conversation_id',
124
+ :'external_thread_id',
125
+ :'inquiry_id'
102
126
  ])
103
127
  end
104
128
 
@@ -177,6 +201,22 @@ module Repull
177
201
  if attributes.key?(:'check_out_time')
178
202
  self.check_out_time = attributes[:'check_out_time']
179
203
  end
204
+
205
+ if attributes.key?(:'guest_notes')
206
+ self.guest_notes = attributes[:'guest_notes']
207
+ end
208
+
209
+ if attributes.key?(:'conversation_id')
210
+ self.conversation_id = attributes[:'conversation_id']
211
+ end
212
+
213
+ if attributes.key?(:'external_thread_id')
214
+ self.external_thread_id = attributes[:'external_thread_id']
215
+ end
216
+
217
+ if attributes.key?(:'inquiry_id')
218
+ self.inquiry_id = attributes[:'inquiry_id']
219
+ end
180
220
  end
181
221
 
182
222
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -329,7 +369,11 @@ module Repull
329
369
  status == o.status &&
330
370
  cancellation_policy == o.cancellation_policy &&
331
371
  check_in_time == o.check_in_time &&
332
- check_out_time == o.check_out_time
372
+ check_out_time == o.check_out_time &&
373
+ guest_notes == o.guest_notes &&
374
+ conversation_id == o.conversation_id &&
375
+ external_thread_id == o.external_thread_id &&
376
+ inquiry_id == o.inquiry_id
333
377
  end
334
378
 
335
379
  # @see the `==` method
@@ -341,7 +385,7 @@ module Repull
341
385
  # Calculates hash code according to all attributes.
342
386
  # @return [Integer] Hash code
343
387
  def hash
344
- [id, uid, channel, listing_id, customer_id, checkin_date, checkout_date, status, cancellation_policy, check_in_time, check_out_time].hash
388
+ [id, uid, channel, listing_id, customer_id, checkin_date, checkout_date, status, cancellation_policy, check_in_time, check_out_time, guest_notes, conversation_id, external_thread_id, inquiry_id].hash
345
389
  end
346
390
 
347
391
  # Builds the object from hash