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,220 @@
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 ListVrboTransactions200ResponseDataFreshness < ApiModelBase
18
+ attr_accessor :last_synced_at
19
+
20
+ attr_accessor :stale
21
+
22
+ attr_accessor :reason
23
+
24
+ attr_accessor :fix_url
25
+
26
+ attr_accessor :accounts
27
+
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'last_synced_at' => :'lastSyncedAt',
54
+ :'stale' => :'stale',
55
+ :'reason' => :'reason',
56
+ :'fix_url' => :'fixUrl',
57
+ :'accounts' => :'accounts'
58
+ }
59
+ end
60
+
61
+ # Returns attribute mapping this model knows about
62
+ def self.acceptable_attribute_map
63
+ attribute_map
64
+ end
65
+
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ acceptable_attribute_map.values
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.openapi_types
73
+ {
74
+ :'last_synced_at' => :'String',
75
+ :'stale' => :'Boolean',
76
+ :'reason' => :'String',
77
+ :'fix_url' => :'String',
78
+ :'accounts' => :'Array<GetVrboListing200ResponseDataFreshnessAccountsInner>'
79
+ }
80
+ end
81
+
82
+ # List of attributes with nullable: true
83
+ def self.openapi_nullable
84
+ Set.new([
85
+ :'last_synced_at',
86
+ ])
87
+ end
88
+
89
+ # Initializes the object
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ def initialize(attributes = {})
92
+ if (!attributes.is_a?(Hash))
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListVrboTransactions200ResponseDataFreshness` initialize method"
94
+ end
95
+
96
+ # check to see if the attribute exists and convert string to symbol for hash key
97
+ acceptable_attribute_map = self.class.acceptable_attribute_map
98
+ attributes = attributes.each_with_object({}) { |(k, v), h|
99
+ if (!acceptable_attribute_map.key?(k.to_sym))
100
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListVrboTransactions200ResponseDataFreshness`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
101
+ end
102
+ h[k.to_sym] = v
103
+ }
104
+
105
+ if attributes.key?(:'last_synced_at')
106
+ self.last_synced_at = attributes[:'last_synced_at']
107
+ end
108
+
109
+ if attributes.key?(:'stale')
110
+ self.stale = attributes[:'stale']
111
+ end
112
+
113
+ if attributes.key?(:'reason')
114
+ self.reason = attributes[:'reason']
115
+ end
116
+
117
+ if attributes.key?(:'fix_url')
118
+ self.fix_url = attributes[:'fix_url']
119
+ end
120
+
121
+ if attributes.key?(:'accounts')
122
+ if (value = attributes[:'accounts']).is_a?(Array)
123
+ self.accounts = value
124
+ end
125
+ end
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properties with the reasons
130
+ def list_invalid_properties
131
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
132
+ invalid_properties = Array.new
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ warn '[DEPRECATED] the `valid?` method is obsolete'
140
+ reason_validator = EnumAttributeValidator.new('String', ["ok", "refreshing", "never_synced", "reconnect_required"])
141
+ return false unless reason_validator.valid?(@reason)
142
+ true
143
+ end
144
+
145
+ # Custom attribute writer method checking allowed values (enum).
146
+ # @param [Object] reason Object to be assigned
147
+ def reason=(reason)
148
+ validator = EnumAttributeValidator.new('String', ["ok", "refreshing", "never_synced", "reconnect_required"])
149
+ unless validator.valid?(reason)
150
+ fail ArgumentError, "invalid value for \"reason\", must be one of #{validator.allowable_values}."
151
+ end
152
+ @reason = reason
153
+ end
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] Object to be compared
157
+ def ==(o)
158
+ return true if self.equal?(o)
159
+ self.class == o.class &&
160
+ last_synced_at == o.last_synced_at &&
161
+ stale == o.stale &&
162
+ reason == o.reason &&
163
+ fix_url == o.fix_url &&
164
+ accounts == o.accounts
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [last_synced_at, stale, reason, fix_url, accounts].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ attributes = attributes.transform_keys(&:to_sym)
185
+ transformed_hash = {}
186
+ openapi_types.each_pair do |key, type|
187
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = nil
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[attribute_map[key]].is_a?(Array)
193
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
+ end
195
+ elsif !attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
+ end
198
+ end
199
+ new(transformed_hash)
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -0,0 +1,362 @@
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 ListVrboTransactions200ResponseDataInner < ApiModelBase
18
+ # Stable: the deposit's reference number on a Payout row; `<reference>:<confirmationCode>:<n>` on a line; `upcoming:<confirmationCode>:<n>` on a scheduled payout.
19
+ attr_accessor :transaction_id
20
+
21
+ attr_accessor :account_id
22
+
23
+ attr_accessor :account_name
24
+
25
+ attr_accessor :status
26
+
27
+ # `Payout` (the bank deposit), `Reservation` (a booking it paid), `Adjustment` (money taken back from it).
28
+ attr_accessor :type
29
+
30
+ attr_accessor :is_payout
31
+
32
+ attr_accessor :date
33
+
34
+ attr_accessor :currency
35
+
36
+ # Signed: what this line adds to its deposit. On a Payout row, the amount deposited.
37
+ attr_accessor :amount
38
+
39
+ attr_accessor :payout
40
+
41
+ attr_accessor :confirmation_code
42
+
43
+ # The Repull reservation, when the booking is in the workspace.
44
+ attr_accessor :reservation_id
45
+
46
+ attr_accessor :listing_id
47
+
48
+ attr_accessor :vrbo_listing_number
49
+
50
+ attr_accessor :on_inactive_listing
51
+
52
+ attr_accessor :guest_name
53
+
54
+ # On an UPCOMING line: Vrbo's status for the payout (`Scheduled`, `Blocked`, …).
55
+ attr_accessor :upcoming_status
56
+
57
+ attr_accessor :unavailable_fields
58
+
59
+ attr_accessor :synced_at
60
+
61
+ class EnumAttributeValidator
62
+ attr_reader :datatype
63
+ attr_reader :allowable_values
64
+
65
+ def initialize(datatype, allowable_values)
66
+ @allowable_values = allowable_values.map do |value|
67
+ case datatype.to_s
68
+ when /Integer/i
69
+ value.to_i
70
+ when /Float/i
71
+ value.to_f
72
+ else
73
+ value
74
+ end
75
+ end
76
+ end
77
+
78
+ def valid?(value)
79
+ !value || allowable_values.include?(value)
80
+ end
81
+ end
82
+
83
+ # Attribute mapping from ruby-style variable name to JSON key.
84
+ def self.attribute_map
85
+ {
86
+ :'transaction_id' => :'transactionId',
87
+ :'account_id' => :'accountId',
88
+ :'account_name' => :'accountName',
89
+ :'status' => :'status',
90
+ :'type' => :'type',
91
+ :'is_payout' => :'isPayout',
92
+ :'date' => :'date',
93
+ :'currency' => :'currency',
94
+ :'amount' => :'amount',
95
+ :'payout' => :'payout',
96
+ :'confirmation_code' => :'confirmationCode',
97
+ :'reservation_id' => :'reservationId',
98
+ :'listing_id' => :'listingId',
99
+ :'vrbo_listing_number' => :'vrboListingNumber',
100
+ :'on_inactive_listing' => :'onInactiveListing',
101
+ :'guest_name' => :'guestName',
102
+ :'upcoming_status' => :'upcomingStatus',
103
+ :'unavailable_fields' => :'unavailableFields',
104
+ :'synced_at' => :'syncedAt'
105
+ }
106
+ end
107
+
108
+ # Returns attribute mapping this model knows about
109
+ def self.acceptable_attribute_map
110
+ attribute_map
111
+ end
112
+
113
+ # Returns all the JSON keys this model knows about
114
+ def self.acceptable_attributes
115
+ acceptable_attribute_map.values
116
+ end
117
+
118
+ # Attribute type mapping.
119
+ def self.openapi_types
120
+ {
121
+ :'transaction_id' => :'String',
122
+ :'account_id' => :'String',
123
+ :'account_name' => :'String',
124
+ :'status' => :'String',
125
+ :'type' => :'String',
126
+ :'is_payout' => :'Boolean',
127
+ :'date' => :'Date',
128
+ :'currency' => :'String',
129
+ :'amount' => :'Float',
130
+ :'payout' => :'ListVrboTransactions200ResponseDataInnerPayout',
131
+ :'confirmation_code' => :'String',
132
+ :'reservation_id' => :'Integer',
133
+ :'listing_id' => :'Integer',
134
+ :'vrbo_listing_number' => :'String',
135
+ :'on_inactive_listing' => :'Boolean',
136
+ :'guest_name' => :'String',
137
+ :'upcoming_status' => :'String',
138
+ :'unavailable_fields' => :'Array<String>',
139
+ :'synced_at' => :'String'
140
+ }
141
+ end
142
+
143
+ # List of attributes with nullable: true
144
+ def self.openapi_nullable
145
+ Set.new([
146
+ :'account_id',
147
+ :'account_name',
148
+ :'date',
149
+ :'currency',
150
+ :'amount',
151
+ :'confirmation_code',
152
+ :'reservation_id',
153
+ :'listing_id',
154
+ :'vrbo_listing_number',
155
+ :'guest_name',
156
+ :'upcoming_status',
157
+ :'synced_at'
158
+ ])
159
+ end
160
+
161
+ # Initializes the object
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ def initialize(attributes = {})
164
+ if (!attributes.is_a?(Hash))
165
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListVrboTransactions200ResponseDataInner` initialize method"
166
+ end
167
+
168
+ # check to see if the attribute exists and convert string to symbol for hash key
169
+ acceptable_attribute_map = self.class.acceptable_attribute_map
170
+ attributes = attributes.each_with_object({}) { |(k, v), h|
171
+ if (!acceptable_attribute_map.key?(k.to_sym))
172
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListVrboTransactions200ResponseDataInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
173
+ end
174
+ h[k.to_sym] = v
175
+ }
176
+
177
+ if attributes.key?(:'transaction_id')
178
+ self.transaction_id = attributes[:'transaction_id']
179
+ end
180
+
181
+ if attributes.key?(:'account_id')
182
+ self.account_id = attributes[:'account_id']
183
+ end
184
+
185
+ if attributes.key?(:'account_name')
186
+ self.account_name = attributes[:'account_name']
187
+ end
188
+
189
+ if attributes.key?(:'status')
190
+ self.status = attributes[:'status']
191
+ end
192
+
193
+ if attributes.key?(:'type')
194
+ self.type = attributes[:'type']
195
+ end
196
+
197
+ if attributes.key?(:'is_payout')
198
+ self.is_payout = attributes[:'is_payout']
199
+ end
200
+
201
+ if attributes.key?(:'date')
202
+ self.date = attributes[:'date']
203
+ end
204
+
205
+ if attributes.key?(:'currency')
206
+ self.currency = attributes[:'currency']
207
+ end
208
+
209
+ if attributes.key?(:'amount')
210
+ self.amount = attributes[:'amount']
211
+ end
212
+
213
+ if attributes.key?(:'payout')
214
+ self.payout = attributes[:'payout']
215
+ end
216
+
217
+ if attributes.key?(:'confirmation_code')
218
+ self.confirmation_code = attributes[:'confirmation_code']
219
+ end
220
+
221
+ if attributes.key?(:'reservation_id')
222
+ self.reservation_id = attributes[:'reservation_id']
223
+ end
224
+
225
+ if attributes.key?(:'listing_id')
226
+ self.listing_id = attributes[:'listing_id']
227
+ end
228
+
229
+ if attributes.key?(:'vrbo_listing_number')
230
+ self.vrbo_listing_number = attributes[:'vrbo_listing_number']
231
+ end
232
+
233
+ if attributes.key?(:'on_inactive_listing')
234
+ self.on_inactive_listing = attributes[:'on_inactive_listing']
235
+ end
236
+
237
+ if attributes.key?(:'guest_name')
238
+ self.guest_name = attributes[:'guest_name']
239
+ end
240
+
241
+ if attributes.key?(:'upcoming_status')
242
+ self.upcoming_status = attributes[:'upcoming_status']
243
+ end
244
+
245
+ if attributes.key?(:'unavailable_fields')
246
+ if (value = attributes[:'unavailable_fields']).is_a?(Array)
247
+ self.unavailable_fields = value
248
+ end
249
+ end
250
+
251
+ if attributes.key?(:'synced_at')
252
+ self.synced_at = attributes[:'synced_at']
253
+ end
254
+ end
255
+
256
+ # Show invalid properties with the reasons. Usually used together with valid?
257
+ # @return Array for valid properties with the reasons
258
+ def list_invalid_properties
259
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
260
+ invalid_properties = Array.new
261
+ invalid_properties
262
+ end
263
+
264
+ # Check to see if the all the properties in the model are valid
265
+ # @return true if the model is valid
266
+ def valid?
267
+ warn '[DEPRECATED] the `valid?` method is obsolete'
268
+ status_validator = EnumAttributeValidator.new('String', ["COMPLETED", "UPCOMING"])
269
+ return false unless status_validator.valid?(@status)
270
+ true
271
+ end
272
+
273
+ # Custom attribute writer method checking allowed values (enum).
274
+ # @param [Object] status Object to be assigned
275
+ def status=(status)
276
+ validator = EnumAttributeValidator.new('String', ["COMPLETED", "UPCOMING"])
277
+ unless validator.valid?(status)
278
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
279
+ end
280
+ @status = status
281
+ end
282
+
283
+ # Checks equality by comparing each attribute.
284
+ # @param [Object] Object to be compared
285
+ def ==(o)
286
+ return true if self.equal?(o)
287
+ self.class == o.class &&
288
+ transaction_id == o.transaction_id &&
289
+ account_id == o.account_id &&
290
+ account_name == o.account_name &&
291
+ status == o.status &&
292
+ type == o.type &&
293
+ is_payout == o.is_payout &&
294
+ date == o.date &&
295
+ currency == o.currency &&
296
+ amount == o.amount &&
297
+ payout == o.payout &&
298
+ confirmation_code == o.confirmation_code &&
299
+ reservation_id == o.reservation_id &&
300
+ listing_id == o.listing_id &&
301
+ vrbo_listing_number == o.vrbo_listing_number &&
302
+ on_inactive_listing == o.on_inactive_listing &&
303
+ guest_name == o.guest_name &&
304
+ upcoming_status == o.upcoming_status &&
305
+ unavailable_fields == o.unavailable_fields &&
306
+ synced_at == o.synced_at
307
+ end
308
+
309
+ # @see the `==` method
310
+ # @param [Object] Object to be compared
311
+ def eql?(o)
312
+ self == o
313
+ end
314
+
315
+ # Calculates hash code according to all attributes.
316
+ # @return [Integer] Hash code
317
+ def hash
318
+ [transaction_id, account_id, account_name, status, type, is_payout, date, currency, amount, payout, confirmation_code, reservation_id, listing_id, vrbo_listing_number, on_inactive_listing, guest_name, upcoming_status, unavailable_fields, synced_at].hash
319
+ end
320
+
321
+ # Builds the object from hash
322
+ # @param [Hash] attributes Model attributes in the form of hash
323
+ # @return [Object] Returns the model itself
324
+ def self.build_from_hash(attributes)
325
+ return nil unless attributes.is_a?(Hash)
326
+ attributes = attributes.transform_keys(&:to_sym)
327
+ transformed_hash = {}
328
+ openapi_types.each_pair do |key, type|
329
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
330
+ transformed_hash["#{key}"] = nil
331
+ elsif type =~ /\AArray<(.*)>/i
332
+ # check to ensure the input is an array given that the attribute
333
+ # is documented as an array but the input is not
334
+ if attributes[attribute_map[key]].is_a?(Array)
335
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
336
+ end
337
+ elsif !attributes[attribute_map[key]].nil?
338
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
339
+ end
340
+ end
341
+ new(transformed_hash)
342
+ end
343
+
344
+ # Returns the object in the form of hash
345
+ # @return [Hash] Returns the object in the form of hash
346
+ def to_hash
347
+ hash = {}
348
+ self.class.attribute_map.each_pair do |attr, param|
349
+ value = self.send(attr)
350
+ if value.nil?
351
+ is_nullable = self.class.openapi_nullable.include?(attr)
352
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
353
+ end
354
+
355
+ hash[param] = _to_hash(value)
356
+ end
357
+ hash
358
+ end
359
+
360
+ end
361
+
362
+ end