repull 0.2.8 → 0.2.10

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 (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +1443 -182
  3. data/lib/repull/api/availability_api.rb +24 -92
  4. data/lib/repull/api/billing_api.rb +186 -15
  5. data/lib/repull/api/booking_com_api.rb +532 -41
  6. data/lib/repull/api/listings_api.rb +74 -0
  7. data/lib/repull/api/plumguide_api.rb +245 -0
  8. data/lib/repull/api/reservations_api.rb +0 -197
  9. data/lib/repull/api/sandbox_api.rb +136 -0
  10. data/lib/repull/api/vrbo_api.rb +0 -126
  11. data/lib/repull/models/acknowledge_booking_reservations_request.rb +176 -0
  12. data/lib/repull/models/{create_studio_project201_response_data.rb → airbnb_alteration.rb} +44 -52
  13. data/lib/repull/models/airbnb_amenity.rb +171 -0
  14. data/lib/repull/models/{get_studio_deployment200_response.rb → airbnb_availability_write_request.rb} +52 -10
  15. data/lib/repull/models/airbnb_calendar_operation.rb +250 -0
  16. data/lib/repull/models/airbnb_listing_action_request.rb +198 -0
  17. data/lib/repull/models/{update_availability_request.rb → airbnb_pricing_write_request.rb} +100 -11
  18. data/lib/repull/models/booking_availability_update.rb +276 -0
  19. data/lib/repull/models/booking_availability_update_request.rb +230 -0
  20. data/lib/repull/models/{generate_studio_completion_request_project_id.rb → booking_availability_update_request_property_id.rb} +2 -2
  21. data/lib/repull/models/booking_availability_update_request_updates_inner.rb +104 -0
  22. data/lib/repull/models/booking_pricing_rate_update.rb +1 -0
  23. data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +65 -6
  24. data/lib/repull/models/booking_setup_request.rb +220 -0
  25. data/lib/repull/models/create_airbnb_alteration_request.rb +195 -0
  26. data/lib/repull/models/{create_studio_deployment201_response_data.rb → create_airbnb_offer_request.rb} +42 -30
  27. data/lib/repull/models/{create_studio_project_request.rb → create_booking_webhook_request.rb} +36 -47
  28. data/lib/repull/models/{generate_studio_completion200_response.rb → delete_airbnb_listing_photo200_response.rb} +10 -10
  29. data/lib/repull/models/{delete_studio_project200_response.rb → get_airbnb_alteration200_response.rb} +50 -7
  30. data/lib/repull/models/{delete_studio_project_file200_response.rb → get_airbnb_listing_quality200_response.rb} +37 -7
  31. data/lib/repull/models/{create_studio_project_generation201_response.rb → get_airbnb_listing_settings200_response.rb} +37 -7
  32. data/lib/repull/models/{delete_studio_deployment200_response.rb → get_airbnb_thread200_response.rb} +50 -7
  33. data/lib/repull/models/{list_studio_deployments200_response.rb → get_usage_logs200_response.rb} +17 -8
  34. data/lib/repull/models/get_usage_logs200_response_data_inner.rb +264 -0
  35. data/lib/repull/models/{create_studio_deployment201_response.rb → get_usage_logs200_response_pagination.rb} +29 -10
  36. data/lib/repull/models/get_usage_summary200_response.rb +232 -0
  37. data/lib/repull/models/get_usage_summary200_response_breakdown_inner.rb +183 -0
  38. data/lib/repull/models/{delete_studio_deployment200_response_data.rb → get_usage_summary200_response_limits.rb} +18 -16
  39. data/lib/repull/models/{delete_studio_project200_response_data.rb → get_usage_summary200_response_remaining.rb} +18 -16
  40. data/lib/repull/models/{create_studio_project_generation201_response_data.rb → get_usage_summary200_response_status_distribution.rb} +31 -22
  41. data/lib/repull/models/{upsert_studio_project_file_request.rb → get_usage_summary200_response_timeline_inner.rb} +28 -28
  42. data/lib/repull/models/{create_studio_project_generation_request.rb → get_usage_summary200_response_totals.rb} +28 -28
  43. data/lib/repull/models/{create_studio_project201_response.rb → get_usage_summary200_response_used.rb} +19 -10
  44. data/lib/repull/models/get_usage_tier200_response.rb +183 -0
  45. data/lib/repull/models/{list_studio_projects200_response.rb → get_usage_tier200_response_limits.rb} +31 -12
  46. data/lib/repull/models/{update_reservation_request.rb → get_usage_tier200_response_remaining.rb} +25 -31
  47. data/lib/repull/models/{get_studio_project200_response.rb → get_usage_tier200_response_used.rb} +28 -10
  48. data/lib/repull/models/list_airbnb_alterations200_response.rb +192 -0
  49. data/lib/repull/models/list_airbnb_listing_amenities200_response.rb +190 -0
  50. data/lib/repull/models/{create_studio_deployment_request.rb → list_airbnb_listing_amenities200_response_data.rb} +23 -28
  51. data/lib/repull/models/{list_studio_project_files200_response.rb → list_airbnb_transactions200_response.rb} +50 -7
  52. data/lib/repull/models/listing_content_update_request.rb +243 -0
  53. data/lib/repull/models/{upsert_studio_project_file200_response.rb → listing_content_update_request_address.rb} +53 -10
  54. data/lib/repull/models/listing_content_update_request_amenities.rb +105 -0
  55. data/lib/repull/models/listing_content_update_request_amenities_one_of_inner.rb +196 -0
  56. data/lib/repull/models/listing_content_update_request_occupancy.rb +179 -0
  57. data/lib/repull/{api/ai_api.rb → models/listing_content_update_request_photos_inner.rb} +77 -59
  58. data/lib/repull/models/{generate_studio_completion200_response_data.rb → listing_content_update_request_photos_inner_one_of.rb} +81 -66
  59. data/lib/repull/models/listing_content_update_request_policies.rb +253 -0
  60. data/lib/repull/models/{create_ai_operation200_response.rb → listing_content_update_response.rb} +32 -16
  61. data/lib/repull/models/map_airbnb_listing_request.rb +215 -0
  62. data/lib/repull/models/{create_reservation_request.rb → map_airbnb_listing_response.rb} +137 -116
  63. data/lib/repull/models/property.rb +42 -69
  64. data/lib/repull/models/property_availability.rb +222 -0
  65. data/lib/repull/models/property_availability_day.rb +247 -0
  66. data/lib/repull/models/reservation.rb +28 -1
  67. data/lib/repull/models/sandbox_fixture_ref.rb +193 -0
  68. data/lib/repull/models/{delete_studio_project_file200_response_data.rb → sandbox_reset_result.rb} +72 -11
  69. data/lib/repull/models/sandbox_reset_result_deleted.rb +216 -0
  70. data/lib/repull/models/sandbox_seed_result.rb +278 -0
  71. data/lib/repull/models/{update_studio_project_request.rb → update_airbnb_message_request.rb} +43 -24
  72. data/lib/repull/models/update_booking_charges_request.rb +194 -0
  73. data/lib/repull/version.rb +1 -1
  74. data/lib/repull.rb +59 -34
  75. data/openapi/v1.json +3956 -2522
  76. metadata +61 -36
  77. data/lib/repull/api/studio_api.rb +0 -1094
  78. data/lib/repull/models/generate_studio_completion_request.rb +0 -305
  79. data/lib/repull/models/upsert_studio_project_file200_response_data.rb +0 -147
@@ -14,13 +14,16 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class DeleteStudioDeployment200Response < ApiModelBase
17
+ class GetAirbnbThread200Response < ApiModelBase
18
18
  attr_accessor :data
19
19
 
20
+ attr_accessor :data_freshness
21
+
20
22
  # Attribute mapping from ruby-style variable name to JSON key.
21
23
  def self.attribute_map
22
24
  {
23
- :'data' => :'data'
25
+ :'data' => :'data',
26
+ :'data_freshness' => :'data_freshness'
24
27
  }
25
28
  end
26
29
 
@@ -37,7 +40,8 @@ module Repull
37
40
  # Attribute type mapping.
38
41
  def self.openapi_types
39
42
  {
40
- :'data' => :'DeleteStudioDeployment200ResponseData'
43
+ :'data' => :'AirbnbThread',
44
+ :'data_freshness' => :'AirbnbDataFreshness'
41
45
  }
42
46
  end
43
47
 
@@ -51,20 +55,28 @@ module Repull
51
55
  # @param [Hash] attributes Model attributes in the form of hash
52
56
  def initialize(attributes = {})
53
57
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::DeleteStudioDeployment200Response` initialize method"
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetAirbnbThread200Response` initialize method"
55
59
  end
56
60
 
57
61
  # check to see if the attribute exists and convert string to symbol for hash key
58
62
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
63
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
64
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::DeleteStudioDeployment200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetAirbnbThread200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
66
  end
63
67
  h[k.to_sym] = v
64
68
  }
65
69
 
66
70
  if attributes.key?(:'data')
67
71
  self.data = attributes[:'data']
72
+ else
73
+ self.data = nil
74
+ end
75
+
76
+ if attributes.key?(:'data_freshness')
77
+ self.data_freshness = attributes[:'data_freshness']
78
+ else
79
+ self.data_freshness = nil
68
80
  end
69
81
  end
70
82
 
@@ -73,6 +85,14 @@ module Repull
73
85
  def list_invalid_properties
74
86
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
87
  invalid_properties = Array.new
88
+ if @data.nil?
89
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
90
+ end
91
+
92
+ if @data_freshness.nil?
93
+ invalid_properties.push('invalid value for "data_freshness", data_freshness cannot be nil.')
94
+ end
95
+
76
96
  invalid_properties
77
97
  end
78
98
 
@@ -80,15 +100,38 @@ module Repull
80
100
  # @return true if the model is valid
81
101
  def valid?
82
102
  warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ return false if @data.nil?
104
+ return false if @data_freshness.nil?
83
105
  true
84
106
  end
85
107
 
108
+ # Custom attribute writer method with validation
109
+ # @param [Object] data Value to be assigned
110
+ def data=(data)
111
+ if data.nil?
112
+ fail ArgumentError, 'data cannot be nil'
113
+ end
114
+
115
+ @data = data
116
+ end
117
+
118
+ # Custom attribute writer method with validation
119
+ # @param [Object] data_freshness Value to be assigned
120
+ def data_freshness=(data_freshness)
121
+ if data_freshness.nil?
122
+ fail ArgumentError, 'data_freshness cannot be nil'
123
+ end
124
+
125
+ @data_freshness = data_freshness
126
+ end
127
+
86
128
  # Checks equality by comparing each attribute.
87
129
  # @param [Object] Object to be compared
88
130
  def ==(o)
89
131
  return true if self.equal?(o)
90
132
  self.class == o.class &&
91
- data == o.data
133
+ data == o.data &&
134
+ data_freshness == o.data_freshness
92
135
  end
93
136
 
94
137
  # @see the `==` method
@@ -100,7 +143,7 @@ module Repull
100
143
  # Calculates hash code according to all attributes.
101
144
  # @return [Integer] Hash code
102
145
  def hash
103
- [data].hash
146
+ [data, data_freshness].hash
104
147
  end
105
148
 
106
149
  # Builds the object from hash
@@ -14,16 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class ListStudioDeployments200Response < ApiModelBase
17
+ class GetUsageLogs200Response < ApiModelBase
18
18
  attr_accessor :data
19
19
 
20
20
  attr_accessor :pagination
21
21
 
22
+ attr_accessor :range
23
+
22
24
  # Attribute mapping from ruby-style variable name to JSON key.
23
25
  def self.attribute_map
24
26
  {
25
27
  :'data' => :'data',
26
- :'pagination' => :'pagination'
28
+ :'pagination' => :'pagination',
29
+ :'range' => :'range'
27
30
  }
28
31
  end
29
32
 
@@ -40,8 +43,9 @@ module Repull
40
43
  # Attribute type mapping.
41
44
  def self.openapi_types
42
45
  {
43
- :'data' => :'Array<StudioDeployment>',
44
- :'pagination' => :'Pagination'
46
+ :'data' => :'Array<GetUsageLogs200ResponseDataInner>',
47
+ :'pagination' => :'GetUsageLogs200ResponsePagination',
48
+ :'range' => :'String'
45
49
  }
46
50
  end
47
51
 
@@ -55,14 +59,14 @@ module Repull
55
59
  # @param [Hash] attributes Model attributes in the form of hash
56
60
  def initialize(attributes = {})
57
61
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListStudioDeployments200Response` initialize method"
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageLogs200Response` initialize method"
59
63
  end
60
64
 
61
65
  # check to see if the attribute exists and convert string to symbol for hash key
62
66
  acceptable_attribute_map = self.class.acceptable_attribute_map
63
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
64
68
  if (!acceptable_attribute_map.key?(k.to_sym))
65
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListStudioDeployments200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetUsageLogs200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
70
  end
67
71
  h[k.to_sym] = v
68
72
  }
@@ -76,6 +80,10 @@ module Repull
76
80
  if attributes.key?(:'pagination')
77
81
  self.pagination = attributes[:'pagination']
78
82
  end
83
+
84
+ if attributes.key?(:'range')
85
+ self.range = attributes[:'range']
86
+ end
79
87
  end
80
88
 
81
89
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -99,7 +107,8 @@ module Repull
99
107
  return true if self.equal?(o)
100
108
  self.class == o.class &&
101
109
  data == o.data &&
102
- pagination == o.pagination
110
+ pagination == o.pagination &&
111
+ range == o.range
103
112
  end
104
113
 
105
114
  # @see the `==` method
@@ -111,7 +120,7 @@ module Repull
111
120
  # Calculates hash code according to all attributes.
112
121
  # @return [Integer] Hash code
113
122
  def hash
114
- [data, pagination].hash
123
+ [data, pagination, range].hash
115
124
  end
116
125
 
117
126
  # Builds the object from hash
@@ -0,0 +1,264 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: ivan@vanio.ai
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 GetUsageLogs200ResponseDataInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :request_id
21
+
22
+ attr_accessor :method
23
+
24
+ attr_accessor :path
25
+
26
+ attr_accessor :operation_id
27
+
28
+ attr_accessor :status_code
29
+
30
+ attr_accessor :latency_ms
31
+
32
+ attr_accessor :request_bytes
33
+
34
+ attr_accessor :response_bytes
35
+
36
+ attr_accessor :ip_address
37
+
38
+ attr_accessor :user_agent
39
+
40
+ attr_accessor :error_code
41
+
42
+ attr_accessor :created_at
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'id' => :'id',
48
+ :'request_id' => :'requestId',
49
+ :'method' => :'method',
50
+ :'path' => :'path',
51
+ :'operation_id' => :'operationId',
52
+ :'status_code' => :'statusCode',
53
+ :'latency_ms' => :'latencyMs',
54
+ :'request_bytes' => :'requestBytes',
55
+ :'response_bytes' => :'responseBytes',
56
+ :'ip_address' => :'ipAddress',
57
+ :'user_agent' => :'userAgent',
58
+ :'error_code' => :'errorCode',
59
+ :'created_at' => :'createdAt'
60
+ }
61
+ end
62
+
63
+ # Returns attribute mapping this model knows about
64
+ def self.acceptable_attribute_map
65
+ attribute_map
66
+ end
67
+
68
+ # Returns all the JSON keys this model knows about
69
+ def self.acceptable_attributes
70
+ acceptable_attribute_map.values
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'id' => :'String',
77
+ :'request_id' => :'String',
78
+ :'method' => :'String',
79
+ :'path' => :'String',
80
+ :'operation_id' => :'String',
81
+ :'status_code' => :'Integer',
82
+ :'latency_ms' => :'Integer',
83
+ :'request_bytes' => :'Integer',
84
+ :'response_bytes' => :'Integer',
85
+ :'ip_address' => :'String',
86
+ :'user_agent' => :'String',
87
+ :'error_code' => :'String',
88
+ :'created_at' => :'Time'
89
+ }
90
+ end
91
+
92
+ # List of attributes with nullable: true
93
+ def self.openapi_nullable
94
+ Set.new([
95
+ :'request_id',
96
+ :'operation_id',
97
+ :'status_code',
98
+ :'latency_ms',
99
+ :'request_bytes',
100
+ :'response_bytes',
101
+ :'ip_address',
102
+ :'user_agent',
103
+ :'error_code',
104
+ ])
105
+ end
106
+
107
+ # Initializes the object
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ def initialize(attributes = {})
110
+ if (!attributes.is_a?(Hash))
111
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageLogs200ResponseDataInner` initialize method"
112
+ end
113
+
114
+ # check to see if the attribute exists and convert string to symbol for hash key
115
+ acceptable_attribute_map = self.class.acceptable_attribute_map
116
+ attributes = attributes.each_with_object({}) { |(k, v), h|
117
+ if (!acceptable_attribute_map.key?(k.to_sym))
118
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetUsageLogs200ResponseDataInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
119
+ end
120
+ h[k.to_sym] = v
121
+ }
122
+
123
+ if attributes.key?(:'id')
124
+ self.id = attributes[:'id']
125
+ end
126
+
127
+ if attributes.key?(:'request_id')
128
+ self.request_id = attributes[:'request_id']
129
+ end
130
+
131
+ if attributes.key?(:'method')
132
+ self.method = attributes[:'method']
133
+ end
134
+
135
+ if attributes.key?(:'path')
136
+ self.path = attributes[:'path']
137
+ end
138
+
139
+ if attributes.key?(:'operation_id')
140
+ self.operation_id = attributes[:'operation_id']
141
+ end
142
+
143
+ if attributes.key?(:'status_code')
144
+ self.status_code = attributes[:'status_code']
145
+ end
146
+
147
+ if attributes.key?(:'latency_ms')
148
+ self.latency_ms = attributes[:'latency_ms']
149
+ end
150
+
151
+ if attributes.key?(:'request_bytes')
152
+ self.request_bytes = attributes[:'request_bytes']
153
+ end
154
+
155
+ if attributes.key?(:'response_bytes')
156
+ self.response_bytes = attributes[:'response_bytes']
157
+ end
158
+
159
+ if attributes.key?(:'ip_address')
160
+ self.ip_address = attributes[:'ip_address']
161
+ end
162
+
163
+ if attributes.key?(:'user_agent')
164
+ self.user_agent = attributes[:'user_agent']
165
+ end
166
+
167
+ if attributes.key?(:'error_code')
168
+ self.error_code = attributes[:'error_code']
169
+ end
170
+
171
+ if attributes.key?(:'created_at')
172
+ self.created_at = attributes[:'created_at']
173
+ end
174
+ end
175
+
176
+ # Show invalid properties with the reasons. Usually used together with valid?
177
+ # @return Array for valid properties with the reasons
178
+ def list_invalid_properties
179
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
180
+ invalid_properties = Array.new
181
+ invalid_properties
182
+ end
183
+
184
+ # Check to see if the all the properties in the model are valid
185
+ # @return true if the model is valid
186
+ def valid?
187
+ warn '[DEPRECATED] the `valid?` method is obsolete'
188
+ true
189
+ end
190
+
191
+ # Checks equality by comparing each attribute.
192
+ # @param [Object] Object to be compared
193
+ def ==(o)
194
+ return true if self.equal?(o)
195
+ self.class == o.class &&
196
+ id == o.id &&
197
+ request_id == o.request_id &&
198
+ method == o.method &&
199
+ path == o.path &&
200
+ operation_id == o.operation_id &&
201
+ status_code == o.status_code &&
202
+ latency_ms == o.latency_ms &&
203
+ request_bytes == o.request_bytes &&
204
+ response_bytes == o.response_bytes &&
205
+ ip_address == o.ip_address &&
206
+ user_agent == o.user_agent &&
207
+ error_code == o.error_code &&
208
+ created_at == o.created_at
209
+ end
210
+
211
+ # @see the `==` method
212
+ # @param [Object] Object to be compared
213
+ def eql?(o)
214
+ self == o
215
+ end
216
+
217
+ # Calculates hash code according to all attributes.
218
+ # @return [Integer] Hash code
219
+ def hash
220
+ [id, request_id, method, path, operation_id, status_code, latency_ms, request_bytes, response_bytes, ip_address, user_agent, error_code, created_at].hash
221
+ end
222
+
223
+ # Builds the object from hash
224
+ # @param [Hash] attributes Model attributes in the form of hash
225
+ # @return [Object] Returns the model itself
226
+ def self.build_from_hash(attributes)
227
+ return nil unless attributes.is_a?(Hash)
228
+ attributes = attributes.transform_keys(&:to_sym)
229
+ transformed_hash = {}
230
+ openapi_types.each_pair do |key, type|
231
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
232
+ transformed_hash["#{key}"] = nil
233
+ elsif type =~ /\AArray<(.*)>/i
234
+ # check to ensure the input is an array given that the attribute
235
+ # is documented as an array but the input is not
236
+ if attributes[attribute_map[key]].is_a?(Array)
237
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
238
+ end
239
+ elsif !attributes[attribute_map[key]].nil?
240
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
241
+ end
242
+ end
243
+ new(transformed_hash)
244
+ end
245
+
246
+ # Returns the object in the form of hash
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_hash
249
+ hash = {}
250
+ self.class.attribute_map.each_pair do |attr, param|
251
+ value = self.send(attr)
252
+ if value.nil?
253
+ is_nullable = self.class.openapi_nullable.include?(attr)
254
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
255
+ end
256
+
257
+ hash[param] = _to_hash(value)
258
+ end
259
+ hash
260
+ end
261
+
262
+ end
263
+
264
+ end
@@ -14,13 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class CreateStudioDeployment201Response < ApiModelBase
18
- attr_accessor :data
17
+ class GetUsageLogs200ResponsePagination < ApiModelBase
18
+ attr_accessor :next_cursor
19
+
20
+ attr_accessor :has_more
21
+
22
+ attr_accessor :total
19
23
 
20
24
  # Attribute mapping from ruby-style variable name to JSON key.
21
25
  def self.attribute_map
22
26
  {
23
- :'data' => :'data'
27
+ :'next_cursor' => :'next_cursor',
28
+ :'has_more' => :'has_more',
29
+ :'total' => :'total'
24
30
  }
25
31
  end
26
32
 
@@ -37,13 +43,16 @@ module Repull
37
43
  # Attribute type mapping.
38
44
  def self.openapi_types
39
45
  {
40
- :'data' => :'CreateStudioDeployment201ResponseData'
46
+ :'next_cursor' => :'String',
47
+ :'has_more' => :'Boolean',
48
+ :'total' => :'Integer'
41
49
  }
42
50
  end
43
51
 
44
52
  # List of attributes with nullable: true
45
53
  def self.openapi_nullable
46
54
  Set.new([
55
+ :'next_cursor',
47
56
  ])
48
57
  end
49
58
 
@@ -51,20 +60,28 @@ module Repull
51
60
  # @param [Hash] attributes Model attributes in the form of hash
52
61
  def initialize(attributes = {})
53
62
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::CreateStudioDeployment201Response` initialize method"
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageLogs200ResponsePagination` initialize method"
55
64
  end
56
65
 
57
66
  # check to see if the attribute exists and convert string to symbol for hash key
58
67
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
68
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
69
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::CreateStudioDeployment201Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetUsageLogs200ResponsePagination`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
71
  end
63
72
  h[k.to_sym] = v
64
73
  }
65
74
 
66
- if attributes.key?(:'data')
67
- self.data = attributes[:'data']
75
+ if attributes.key?(:'next_cursor')
76
+ self.next_cursor = attributes[:'next_cursor']
77
+ end
78
+
79
+ if attributes.key?(:'has_more')
80
+ self.has_more = attributes[:'has_more']
81
+ end
82
+
83
+ if attributes.key?(:'total')
84
+ self.total = attributes[:'total']
68
85
  end
69
86
  end
70
87
 
@@ -88,7 +105,9 @@ module Repull
88
105
  def ==(o)
89
106
  return true if self.equal?(o)
90
107
  self.class == o.class &&
91
- data == o.data
108
+ next_cursor == o.next_cursor &&
109
+ has_more == o.has_more &&
110
+ total == o.total
92
111
  end
93
112
 
94
113
  # @see the `==` method
@@ -100,7 +119,7 @@ module Repull
100
119
  # Calculates hash code according to all attributes.
101
120
  # @return [Integer] Hash code
102
121
  def hash
103
- [data].hash
122
+ [next_cursor, has_more, total].hash
104
123
  end
105
124
 
106
125
  # Builds the object from hash