repull 0.2.61 → 0.2.62

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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/connect_api.rb +200 -0
  3. data/lib/repull/api/listings_api.rb +70 -0
  4. data/lib/repull/api/properties_api.rb +3 -3
  5. data/lib/repull/api/tiket_api.rb +885 -0
  6. data/lib/repull/models/listing_publish_tiket_response.rb +165 -0
  7. data/lib/repull/models/listing_publish_tiket_response_result.rb +182 -0
  8. data/lib/repull/models/map_tiket_connect_rooms_request.rb +201 -0
  9. data/lib/repull/models/map_tiket_connect_rooms_request_mappings_inner.rb +184 -0
  10. data/lib/repull/models/publish_listing_tiket_request.rb +148 -0
  11. data/lib/repull/models/reservation.rb +1 -1
  12. data/lib/repull/models/sync_tiket_request.rb +160 -0
  13. data/lib/repull/models/tiket_ari_day.rb +347 -0
  14. data/lib/repull/models/tiket_ari_mismatch.rb +198 -0
  15. data/lib/repull/models/tiket_ari_update.rb +468 -0
  16. data/lib/repull/models/tiket_ari_write_response.rb +357 -0
  17. data/lib/repull/models/tiket_availability_response.rb +269 -0
  18. data/lib/repull/models/tiket_availability_update_request.rb +241 -0
  19. data/lib/repull/models/tiket_child_price.rb +217 -0
  20. data/lib/repull/models/tiket_connect_claim_response.rb +216 -0
  21. data/lib/repull/models/tiket_connect_map_rooms_response.rb +204 -0
  22. data/lib/repull/models/tiket_connect_rooms_response.rb +295 -0
  23. data/lib/repull/models/tiket_connect_rooms_response_rooms_inner.rb +199 -0
  24. data/lib/repull/models/tiket_content_response.rb +202 -0
  25. data/lib/repull/models/tiket_content_response_objects_inner.rb +237 -0
  26. data/lib/repull/models/tiket_listing_pricing_response.rb +321 -0
  27. data/lib/repull/models/tiket_listing_pricing_update_request.rb +209 -0
  28. data/lib/repull/models/tiket_map_listings_request.rb +202 -0
  29. data/lib/repull/models/tiket_map_listings_request_mappings_inner.rb +186 -0
  30. data/lib/repull/models/tiket_map_listings_response.rb +169 -0
  31. data/lib/repull/models/tiket_map_listings_response_results_inner.rb +176 -0
  32. data/lib/repull/models/tiket_occupancy_price.rb +201 -0
  33. data/lib/repull/models/tiket_property.rb +278 -0
  34. data/lib/repull/models/tiket_property_list_response.rb +166 -0
  35. data/lib/repull/models/tiket_property_listings_inner.rb +175 -0
  36. data/lib/repull/models/tiket_property_rooms_response.rb +192 -0
  37. data/lib/repull/models/tiket_rate_plan.rb +178 -0
  38. data/lib/repull/models/tiket_reservation.rb +421 -0
  39. data/lib/repull/models/tiket_reservation_list_response.rb +192 -0
  40. data/lib/repull/models/tiket_reservation_list_response_pagination.rb +165 -0
  41. data/lib/repull/models/tiket_room.rb +232 -0
  42. data/lib/repull/models/tiket_setup_request.rb +469 -0
  43. data/lib/repull/models/tiket_setup_request_contacts_inner.rb +192 -0
  44. data/lib/repull/models/tiket_setup_request_properties_inner.rb +174 -0
  45. data/lib/repull/models/tiket_setup_response.rb +159 -0
  46. data/lib/repull/models/tiket_sync_response.rb +167 -0
  47. data/lib/repull/models/tiket_sync_response_results_inner.rb +239 -0
  48. data/lib/repull/models/verify_tiket_claim_request.rb +212 -0
  49. data/lib/repull/version.rb +1 -1
  50. data/lib/repull.rb +43 -0
  51. data/openapi/v1.json +8050 -5448
  52. data/spec/api/tiket_api_spec.rb +56 -0
  53. metadata +47 -2
@@ -0,0 +1,202 @@
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
+ # Returned by `GET /v1/channels/tiket/content`.
18
+ class TiketContentResponse < ApiModelBase
19
+ attr_accessor :property_id
20
+
21
+ attr_accessor :partner_hotel_code
22
+
23
+ attr_accessor :chain_code
24
+
25
+ attr_accessor :content_mapped
26
+
27
+ # Same as on `GET /v1/channels/tiket/properties`.
28
+ attr_accessor :activation_status
29
+
30
+ # One entry per content object Repull sent: the property, each room type, each rate plan.
31
+ attr_accessor :objects
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'property_id' => :'propertyId',
37
+ :'partner_hotel_code' => :'partnerHotelCode',
38
+ :'chain_code' => :'chainCode',
39
+ :'content_mapped' => :'contentMapped',
40
+ :'activation_status' => :'activationStatus',
41
+ :'objects' => :'objects'
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
+ :'property_id' => :'String',
59
+ :'partner_hotel_code' => :'String',
60
+ :'chain_code' => :'String',
61
+ :'content_mapped' => :'Boolean',
62
+ :'activation_status' => :'String',
63
+ :'objects' => :'Array<TiketContentResponseObjectsInner>'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ :'property_id',
71
+ :'partner_hotel_code',
72
+ :'chain_code',
73
+ :'content_mapped',
74
+ :'activation_status',
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::TiketContentResponse` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::TiketContentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'property_id')
95
+ self.property_id = attributes[:'property_id']
96
+ end
97
+
98
+ if attributes.key?(:'partner_hotel_code')
99
+ self.partner_hotel_code = attributes[:'partner_hotel_code']
100
+ end
101
+
102
+ if attributes.key?(:'chain_code')
103
+ self.chain_code = attributes[:'chain_code']
104
+ end
105
+
106
+ if attributes.key?(:'content_mapped')
107
+ self.content_mapped = attributes[:'content_mapped']
108
+ end
109
+
110
+ if attributes.key?(:'activation_status')
111
+ self.activation_status = attributes[:'activation_status']
112
+ end
113
+
114
+ if attributes.key?(:'objects')
115
+ if (value = attributes[:'objects']).is_a?(Array)
116
+ self.objects = value
117
+ end
118
+ end
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
125
+ invalid_properties = Array.new
126
+ invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ warn '[DEPRECATED] the `valid?` method is obsolete'
133
+ true
134
+ end
135
+
136
+ # Checks equality by comparing each attribute.
137
+ # @param [Object] Object to be compared
138
+ def ==(o)
139
+ return true if self.equal?(o)
140
+ self.class == o.class &&
141
+ property_id == o.property_id &&
142
+ partner_hotel_code == o.partner_hotel_code &&
143
+ chain_code == o.chain_code &&
144
+ content_mapped == o.content_mapped &&
145
+ activation_status == o.activation_status &&
146
+ objects == o.objects
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [property_id, partner_hotel_code, chain_code, content_mapped, activation_status, objects].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ attributes = attributes.transform_keys(&:to_sym)
167
+ transformed_hash = {}
168
+ openapi_types.each_pair do |key, type|
169
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = nil
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[attribute_map[key]].is_a?(Array)
175
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
+ end
177
+ elsif !attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
+ end
180
+ end
181
+ new(transformed_hash)
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ end
201
+
202
+ end
@@ -0,0 +1,237 @@
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 TiketContentResponseObjectsInner < ApiModelBase
18
+ # What the object is.
19
+ attr_accessor :kind
20
+
21
+ # Repull's code for the object on tiket.com.
22
+ attr_accessor :partner_code
23
+
24
+ attr_accessor :listing_id
25
+
26
+ attr_accessor :pushed_at
27
+
28
+ # tiket.com's reference for the push. Quote it to tiket.com support.
29
+ attr_accessor :echo_token
30
+
31
+ # The content that was sent.
32
+ attr_accessor :content
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'kind' => :'kind',
60
+ :'partner_code' => :'partnerCode',
61
+ :'listing_id' => :'listingId',
62
+ :'pushed_at' => :'pushedAt',
63
+ :'echo_token' => :'echoToken',
64
+ :'content' => :'content'
65
+ }
66
+ end
67
+
68
+ # Returns attribute mapping this model knows about
69
+ def self.acceptable_attribute_map
70
+ attribute_map
71
+ end
72
+
73
+ # Returns all the JSON keys this model knows about
74
+ def self.acceptable_attributes
75
+ acceptable_attribute_map.values
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.openapi_types
80
+ {
81
+ :'kind' => :'String',
82
+ :'partner_code' => :'String',
83
+ :'listing_id' => :'String',
84
+ :'pushed_at' => :'Time',
85
+ :'echo_token' => :'String',
86
+ :'content' => :'Hash<String, Object>'
87
+ }
88
+ end
89
+
90
+ # List of attributes with nullable: true
91
+ def self.openapi_nullable
92
+ Set.new([
93
+ :'partner_code',
94
+ :'listing_id',
95
+ :'pushed_at',
96
+ :'echo_token',
97
+ :'content'
98
+ ])
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::TiketContentResponseObjectsInner` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ acceptable_attribute_map = self.class.acceptable_attribute_map
110
+ attributes = attributes.each_with_object({}) { |(k, v), h|
111
+ if (!acceptable_attribute_map.key?(k.to_sym))
112
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::TiketContentResponseObjectsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
113
+ end
114
+ h[k.to_sym] = v
115
+ }
116
+
117
+ if attributes.key?(:'kind')
118
+ self.kind = attributes[:'kind']
119
+ end
120
+
121
+ if attributes.key?(:'partner_code')
122
+ self.partner_code = attributes[:'partner_code']
123
+ end
124
+
125
+ if attributes.key?(:'listing_id')
126
+ self.listing_id = attributes[:'listing_id']
127
+ end
128
+
129
+ if attributes.key?(:'pushed_at')
130
+ self.pushed_at = attributes[:'pushed_at']
131
+ end
132
+
133
+ if attributes.key?(:'echo_token')
134
+ self.echo_token = attributes[:'echo_token']
135
+ end
136
+
137
+ if attributes.key?(:'content')
138
+ if (value = attributes[:'content']).is_a?(Hash)
139
+ self.content = value
140
+ end
141
+ end
142
+ end
143
+
144
+ # Show invalid properties with the reasons. Usually used together with valid?
145
+ # @return Array for valid properties with the reasons
146
+ def list_invalid_properties
147
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
148
+ invalid_properties = Array.new
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ warn '[DEPRECATED] the `valid?` method is obsolete'
156
+ kind_validator = EnumAttributeValidator.new('String', ["property", "room", "rateplan"])
157
+ return false unless kind_validator.valid?(@kind)
158
+ true
159
+ end
160
+
161
+ # Custom attribute writer method checking allowed values (enum).
162
+ # @param [Object] kind Object to be assigned
163
+ def kind=(kind)
164
+ validator = EnumAttributeValidator.new('String', ["property", "room", "rateplan"])
165
+ unless validator.valid?(kind)
166
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
167
+ end
168
+ @kind = kind
169
+ end
170
+
171
+ # Checks equality by comparing each attribute.
172
+ # @param [Object] Object to be compared
173
+ def ==(o)
174
+ return true if self.equal?(o)
175
+ self.class == o.class &&
176
+ kind == o.kind &&
177
+ partner_code == o.partner_code &&
178
+ listing_id == o.listing_id &&
179
+ pushed_at == o.pushed_at &&
180
+ echo_token == o.echo_token &&
181
+ content == o.content
182
+ end
183
+
184
+ # @see the `==` method
185
+ # @param [Object] Object to be compared
186
+ def eql?(o)
187
+ self == o
188
+ end
189
+
190
+ # Calculates hash code according to all attributes.
191
+ # @return [Integer] Hash code
192
+ def hash
193
+ [kind, partner_code, listing_id, pushed_at, echo_token, content].hash
194
+ end
195
+
196
+ # Builds the object from hash
197
+ # @param [Hash] attributes Model attributes in the form of hash
198
+ # @return [Object] Returns the model itself
199
+ def self.build_from_hash(attributes)
200
+ return nil unless attributes.is_a?(Hash)
201
+ attributes = attributes.transform_keys(&:to_sym)
202
+ transformed_hash = {}
203
+ openapi_types.each_pair do |key, type|
204
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
205
+ transformed_hash["#{key}"] = nil
206
+ elsif type =~ /\AArray<(.*)>/i
207
+ # check to ensure the input is an array given that the attribute
208
+ # is documented as an array but the input is not
209
+ if attributes[attribute_map[key]].is_a?(Array)
210
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
211
+ end
212
+ elsif !attributes[attribute_map[key]].nil?
213
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
214
+ end
215
+ end
216
+ new(transformed_hash)
217
+ end
218
+
219
+ # Returns the object in the form of hash
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_hash
222
+ hash = {}
223
+ self.class.attribute_map.each_pair do |attr, param|
224
+ value = self.send(attr)
225
+ if value.nil?
226
+ is_nullable = self.class.openapi_nullable.include?(attr)
227
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
+ end
229
+
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ end
236
+
237
+ end