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,178 @@
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 TiketRatePlan < ApiModelBase
18
+ # Repull id of the rate plan (used by `set-push-rate-plans`).
19
+ attr_accessor :rate_plan_id
20
+
21
+ # tiket.com rate plan id.
22
+ attr_accessor :rate_plan_code
23
+
24
+ attr_accessor :name
25
+
26
+ # Prices and restrictions from the mapped listing's calendar are sent to this rate plan.
27
+ attr_accessor :push_target
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'rate_plan_id' => :'ratePlanId',
33
+ :'rate_plan_code' => :'ratePlanCode',
34
+ :'name' => :'name',
35
+ :'push_target' => :'pushTarget'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'rate_plan_id' => :'String',
53
+ :'rate_plan_code' => :'String',
54
+ :'name' => :'String',
55
+ :'push_target' => :'Boolean'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ :'name',
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::TiketRatePlan` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::TiketRatePlan`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'rate_plan_id')
83
+ self.rate_plan_id = attributes[:'rate_plan_id']
84
+ end
85
+
86
+ if attributes.key?(:'rate_plan_code')
87
+ self.rate_plan_code = attributes[:'rate_plan_code']
88
+ end
89
+
90
+ if attributes.key?(:'name')
91
+ self.name = attributes[:'name']
92
+ end
93
+
94
+ if attributes.key?(:'push_target')
95
+ self.push_target = attributes[:'push_target']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
+ invalid_properties = Array.new
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ rate_plan_id == o.rate_plan_id &&
120
+ rate_plan_code == o.rate_plan_code &&
121
+ name == o.name &&
122
+ push_target == o.push_target
123
+ end
124
+
125
+ # @see the `==` method
126
+ # @param [Object] Object to be compared
127
+ def eql?(o)
128
+ self == o
129
+ end
130
+
131
+ # Calculates hash code according to all attributes.
132
+ # @return [Integer] Hash code
133
+ def hash
134
+ [rate_plan_id, rate_plan_code, name, push_target].hash
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def self.build_from_hash(attributes)
141
+ return nil unless attributes.is_a?(Hash)
142
+ attributes = attributes.transform_keys(&:to_sym)
143
+ transformed_hash = {}
144
+ openapi_types.each_pair do |key, type|
145
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
146
+ transformed_hash["#{key}"] = nil
147
+ elsif type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[attribute_map[key]].is_a?(Array)
151
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
152
+ end
153
+ elsif !attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
155
+ end
156
+ end
157
+ new(transformed_hash)
158
+ end
159
+
160
+ # Returns the object in the form of hash
161
+ # @return [Hash] Returns the object in the form of hash
162
+ def to_hash
163
+ hash = {}
164
+ self.class.attribute_map.each_pair do |attr, param|
165
+ value = self.send(attr)
166
+ if value.nil?
167
+ is_nullable = self.class.openapi_nullable.include?(attr)
168
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
169
+ end
170
+
171
+ hash[param] = _to_hash(value)
172
+ end
173
+ hash
174
+ end
175
+
176
+ end
177
+
178
+ end
@@ -0,0 +1,421 @@
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
+ # One booked room of a tiket.com reservation, as tiket.com delivered it.
18
+ class TiketReservation < ApiModelBase
19
+ # The Repull reservation this room became (`GET /v1/reservations/{id}`). `null` while the room type is not mapped to a listing; mapping it records the booking.
20
+ attr_accessor :reservation_id
21
+
22
+ # `<tiketReservationId>` for the first room, `<tiketReservationId>-2`, `-3`, … for the others.
23
+ attr_accessor :confirmation_code
24
+
25
+ # tiket.com's id of the whole booking.
26
+ attr_accessor :tiket_reservation_id
27
+
28
+ # Set when this booking replaced an earlier one. tiket.com sends a date change as a cancellation plus a new booking; Repull applies it as a change to the original reservation.
29
+ attr_accessor :previous_tiket_reservation_id
30
+
31
+ # 1 for the first room of the booking.
32
+ attr_accessor :room_index
33
+
34
+ # tiket.com Hotel ID.
35
+ attr_accessor :property_id
36
+
37
+ attr_accessor :room_type_code
38
+
39
+ attr_accessor :rate_plan_code
40
+
41
+ attr_accessor :rate_plan_name
42
+
43
+ attr_accessor :check_in
44
+
45
+ attr_accessor :check_out
46
+
47
+ attr_accessor :adults
48
+
49
+ attr_accessor :children
50
+
51
+ attr_accessor :infants
52
+
53
+ attr_accessor :guest_name
54
+
55
+ attr_accessor :guest_country
56
+
57
+ # What the guest paid for this room.
58
+ attr_accessor :total_amount
59
+
60
+ # What tiket.com pays the property for this room.
61
+ attr_accessor :net_amount
62
+
63
+ attr_accessor :currency
64
+
65
+ # Payment type as tiket.com sent it.
66
+ attr_accessor :payment_type
67
+
68
+ # How tiket.com pays the property: `Virtual Credit Card` or `Bank Transfer`. Card details are never returned by the API.
69
+ attr_accessor :payment_method
70
+
71
+ attr_accessor :meal_plan_code
72
+
73
+ attr_accessor :non_refundable
74
+
75
+ # Cancellation policy text as tiket.com sent it.
76
+ attr_accessor :cancellation_policy
77
+
78
+ attr_accessor :special_requests
79
+
80
+ attr_accessor :status
81
+
82
+ attr_accessor :created_at
83
+
84
+ attr_accessor :updated_at
85
+
86
+ # Attribute mapping from ruby-style variable name to JSON key.
87
+ def self.attribute_map
88
+ {
89
+ :'reservation_id' => :'reservationId',
90
+ :'confirmation_code' => :'confirmationCode',
91
+ :'tiket_reservation_id' => :'tiketReservationId',
92
+ :'previous_tiket_reservation_id' => :'previousTiketReservationId',
93
+ :'room_index' => :'roomIndex',
94
+ :'property_id' => :'propertyId',
95
+ :'room_type_code' => :'roomTypeCode',
96
+ :'rate_plan_code' => :'ratePlanCode',
97
+ :'rate_plan_name' => :'ratePlanName',
98
+ :'check_in' => :'checkIn',
99
+ :'check_out' => :'checkOut',
100
+ :'adults' => :'adults',
101
+ :'children' => :'children',
102
+ :'infants' => :'infants',
103
+ :'guest_name' => :'guestName',
104
+ :'guest_country' => :'guestCountry',
105
+ :'total_amount' => :'totalAmount',
106
+ :'net_amount' => :'netAmount',
107
+ :'currency' => :'currency',
108
+ :'payment_type' => :'paymentType',
109
+ :'payment_method' => :'paymentMethod',
110
+ :'meal_plan_code' => :'mealPlanCode',
111
+ :'non_refundable' => :'nonRefundable',
112
+ :'cancellation_policy' => :'cancellationPolicy',
113
+ :'special_requests' => :'specialRequests',
114
+ :'status' => :'status',
115
+ :'created_at' => :'createdAt',
116
+ :'updated_at' => :'updatedAt'
117
+ }
118
+ end
119
+
120
+ # Returns attribute mapping this model knows about
121
+ def self.acceptable_attribute_map
122
+ attribute_map
123
+ end
124
+
125
+ # Returns all the JSON keys this model knows about
126
+ def self.acceptable_attributes
127
+ acceptable_attribute_map.values
128
+ end
129
+
130
+ # Attribute type mapping.
131
+ def self.openapi_types
132
+ {
133
+ :'reservation_id' => :'String',
134
+ :'confirmation_code' => :'String',
135
+ :'tiket_reservation_id' => :'String',
136
+ :'previous_tiket_reservation_id' => :'String',
137
+ :'room_index' => :'Integer',
138
+ :'property_id' => :'String',
139
+ :'room_type_code' => :'String',
140
+ :'rate_plan_code' => :'String',
141
+ :'rate_plan_name' => :'String',
142
+ :'check_in' => :'Date',
143
+ :'check_out' => :'Date',
144
+ :'adults' => :'Integer',
145
+ :'children' => :'Integer',
146
+ :'infants' => :'Integer',
147
+ :'guest_name' => :'String',
148
+ :'guest_country' => :'String',
149
+ :'total_amount' => :'Float',
150
+ :'net_amount' => :'Float',
151
+ :'currency' => :'String',
152
+ :'payment_type' => :'String',
153
+ :'payment_method' => :'String',
154
+ :'meal_plan_code' => :'String',
155
+ :'non_refundable' => :'Boolean',
156
+ :'cancellation_policy' => :'String',
157
+ :'special_requests' => :'String',
158
+ :'status' => :'String',
159
+ :'created_at' => :'Time',
160
+ :'updated_at' => :'Time'
161
+ }
162
+ end
163
+
164
+ # List of attributes with nullable: true
165
+ def self.openapi_nullable
166
+ Set.new([
167
+ :'reservation_id',
168
+ :'previous_tiket_reservation_id',
169
+ :'property_id',
170
+ :'room_type_code',
171
+ :'rate_plan_code',
172
+ :'rate_plan_name',
173
+ :'check_in',
174
+ :'check_out',
175
+ :'guest_name',
176
+ :'guest_country',
177
+ :'total_amount',
178
+ :'net_amount',
179
+ :'currency',
180
+ :'payment_type',
181
+ :'payment_method',
182
+ :'meal_plan_code',
183
+ :'non_refundable',
184
+ :'cancellation_policy',
185
+ :'special_requests',
186
+ ])
187
+ end
188
+
189
+ # Initializes the object
190
+ # @param [Hash] attributes Model attributes in the form of hash
191
+ def initialize(attributes = {})
192
+ if (!attributes.is_a?(Hash))
193
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::TiketReservation` initialize method"
194
+ end
195
+
196
+ # check to see if the attribute exists and convert string to symbol for hash key
197
+ acceptable_attribute_map = self.class.acceptable_attribute_map
198
+ attributes = attributes.each_with_object({}) { |(k, v), h|
199
+ if (!acceptable_attribute_map.key?(k.to_sym))
200
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::TiketReservation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
201
+ end
202
+ h[k.to_sym] = v
203
+ }
204
+
205
+ if attributes.key?(:'reservation_id')
206
+ self.reservation_id = attributes[:'reservation_id']
207
+ end
208
+
209
+ if attributes.key?(:'confirmation_code')
210
+ self.confirmation_code = attributes[:'confirmation_code']
211
+ end
212
+
213
+ if attributes.key?(:'tiket_reservation_id')
214
+ self.tiket_reservation_id = attributes[:'tiket_reservation_id']
215
+ end
216
+
217
+ if attributes.key?(:'previous_tiket_reservation_id')
218
+ self.previous_tiket_reservation_id = attributes[:'previous_tiket_reservation_id']
219
+ end
220
+
221
+ if attributes.key?(:'room_index')
222
+ self.room_index = attributes[:'room_index']
223
+ end
224
+
225
+ if attributes.key?(:'property_id')
226
+ self.property_id = attributes[:'property_id']
227
+ end
228
+
229
+ if attributes.key?(:'room_type_code')
230
+ self.room_type_code = attributes[:'room_type_code']
231
+ end
232
+
233
+ if attributes.key?(:'rate_plan_code')
234
+ self.rate_plan_code = attributes[:'rate_plan_code']
235
+ end
236
+
237
+ if attributes.key?(:'rate_plan_name')
238
+ self.rate_plan_name = attributes[:'rate_plan_name']
239
+ end
240
+
241
+ if attributes.key?(:'check_in')
242
+ self.check_in = attributes[:'check_in']
243
+ end
244
+
245
+ if attributes.key?(:'check_out')
246
+ self.check_out = attributes[:'check_out']
247
+ end
248
+
249
+ if attributes.key?(:'adults')
250
+ self.adults = attributes[:'adults']
251
+ end
252
+
253
+ if attributes.key?(:'children')
254
+ self.children = attributes[:'children']
255
+ end
256
+
257
+ if attributes.key?(:'infants')
258
+ self.infants = attributes[:'infants']
259
+ end
260
+
261
+ if attributes.key?(:'guest_name')
262
+ self.guest_name = attributes[:'guest_name']
263
+ end
264
+
265
+ if attributes.key?(:'guest_country')
266
+ self.guest_country = attributes[:'guest_country']
267
+ end
268
+
269
+ if attributes.key?(:'total_amount')
270
+ self.total_amount = attributes[:'total_amount']
271
+ end
272
+
273
+ if attributes.key?(:'net_amount')
274
+ self.net_amount = attributes[:'net_amount']
275
+ end
276
+
277
+ if attributes.key?(:'currency')
278
+ self.currency = attributes[:'currency']
279
+ end
280
+
281
+ if attributes.key?(:'payment_type')
282
+ self.payment_type = attributes[:'payment_type']
283
+ end
284
+
285
+ if attributes.key?(:'payment_method')
286
+ self.payment_method = attributes[:'payment_method']
287
+ end
288
+
289
+ if attributes.key?(:'meal_plan_code')
290
+ self.meal_plan_code = attributes[:'meal_plan_code']
291
+ end
292
+
293
+ if attributes.key?(:'non_refundable')
294
+ self.non_refundable = attributes[:'non_refundable']
295
+ end
296
+
297
+ if attributes.key?(:'cancellation_policy')
298
+ self.cancellation_policy = attributes[:'cancellation_policy']
299
+ end
300
+
301
+ if attributes.key?(:'special_requests')
302
+ self.special_requests = attributes[:'special_requests']
303
+ end
304
+
305
+ if attributes.key?(:'status')
306
+ self.status = attributes[:'status']
307
+ end
308
+
309
+ if attributes.key?(:'created_at')
310
+ self.created_at = attributes[:'created_at']
311
+ end
312
+
313
+ if attributes.key?(:'updated_at')
314
+ self.updated_at = attributes[:'updated_at']
315
+ end
316
+ end
317
+
318
+ # Show invalid properties with the reasons. Usually used together with valid?
319
+ # @return Array for valid properties with the reasons
320
+ def list_invalid_properties
321
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
322
+ invalid_properties = Array.new
323
+ invalid_properties
324
+ end
325
+
326
+ # Check to see if the all the properties in the model are valid
327
+ # @return true if the model is valid
328
+ def valid?
329
+ warn '[DEPRECATED] the `valid?` method is obsolete'
330
+ true
331
+ end
332
+
333
+ # Checks equality by comparing each attribute.
334
+ # @param [Object] Object to be compared
335
+ def ==(o)
336
+ return true if self.equal?(o)
337
+ self.class == o.class &&
338
+ reservation_id == o.reservation_id &&
339
+ confirmation_code == o.confirmation_code &&
340
+ tiket_reservation_id == o.tiket_reservation_id &&
341
+ previous_tiket_reservation_id == o.previous_tiket_reservation_id &&
342
+ room_index == o.room_index &&
343
+ property_id == o.property_id &&
344
+ room_type_code == o.room_type_code &&
345
+ rate_plan_code == o.rate_plan_code &&
346
+ rate_plan_name == o.rate_plan_name &&
347
+ check_in == o.check_in &&
348
+ check_out == o.check_out &&
349
+ adults == o.adults &&
350
+ children == o.children &&
351
+ infants == o.infants &&
352
+ guest_name == o.guest_name &&
353
+ guest_country == o.guest_country &&
354
+ total_amount == o.total_amount &&
355
+ net_amount == o.net_amount &&
356
+ currency == o.currency &&
357
+ payment_type == o.payment_type &&
358
+ payment_method == o.payment_method &&
359
+ meal_plan_code == o.meal_plan_code &&
360
+ non_refundable == o.non_refundable &&
361
+ cancellation_policy == o.cancellation_policy &&
362
+ special_requests == o.special_requests &&
363
+ status == o.status &&
364
+ created_at == o.created_at &&
365
+ updated_at == o.updated_at
366
+ end
367
+
368
+ # @see the `==` method
369
+ # @param [Object] Object to be compared
370
+ def eql?(o)
371
+ self == o
372
+ end
373
+
374
+ # Calculates hash code according to all attributes.
375
+ # @return [Integer] Hash code
376
+ def hash
377
+ [reservation_id, confirmation_code, tiket_reservation_id, previous_tiket_reservation_id, room_index, property_id, room_type_code, rate_plan_code, rate_plan_name, check_in, check_out, adults, children, infants, guest_name, guest_country, total_amount, net_amount, currency, payment_type, payment_method, meal_plan_code, non_refundable, cancellation_policy, special_requests, status, created_at, updated_at].hash
378
+ end
379
+
380
+ # Builds the object from hash
381
+ # @param [Hash] attributes Model attributes in the form of hash
382
+ # @return [Object] Returns the model itself
383
+ def self.build_from_hash(attributes)
384
+ return nil unless attributes.is_a?(Hash)
385
+ attributes = attributes.transform_keys(&:to_sym)
386
+ transformed_hash = {}
387
+ openapi_types.each_pair do |key, type|
388
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
389
+ transformed_hash["#{key}"] = nil
390
+ elsif type =~ /\AArray<(.*)>/i
391
+ # check to ensure the input is an array given that the attribute
392
+ # is documented as an array but the input is not
393
+ if attributes[attribute_map[key]].is_a?(Array)
394
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
395
+ end
396
+ elsif !attributes[attribute_map[key]].nil?
397
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
398
+ end
399
+ end
400
+ new(transformed_hash)
401
+ end
402
+
403
+ # Returns the object in the form of hash
404
+ # @return [Hash] Returns the object in the form of hash
405
+ def to_hash
406
+ hash = {}
407
+ self.class.attribute_map.each_pair do |attr, param|
408
+ value = self.send(attr)
409
+ if value.nil?
410
+ is_nullable = self.class.openapi_nullable.include?(attr)
411
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
412
+ end
413
+
414
+ hash[param] = _to_hash(value)
415
+ end
416
+ hash
417
+ end
418
+
419
+ end
420
+
421
+ end