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,19 +14,22 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class CreateStudioProjectGeneration201ResponseData < ApiModelBase
18
- attr_accessor :generation_id
17
+ class GetUsageSummary200ResponseStatusDistribution < ApiModelBase
18
+ attr_accessor :_2xx
19
19
 
20
- attr_accessor :response
20
+ attr_accessor :_3xx
21
21
 
22
- attr_accessor :tokens_out
22
+ attr_accessor :_4xx
23
+
24
+ attr_accessor :_5xx
23
25
 
24
26
  # Attribute mapping from ruby-style variable name to JSON key.
25
27
  def self.attribute_map
26
28
  {
27
- :'generation_id' => :'generation_id',
28
- :'response' => :'response',
29
- :'tokens_out' => :'tokens_out'
29
+ :'_2xx' => :'2xx',
30
+ :'_3xx' => :'3xx',
31
+ :'_4xx' => :'4xx',
32
+ :'_5xx' => :'5xx'
30
33
  }
31
34
  end
32
35
 
@@ -43,9 +46,10 @@ module Repull
43
46
  # Attribute type mapping.
44
47
  def self.openapi_types
45
48
  {
46
- :'generation_id' => :'String',
47
- :'response' => :'String',
48
- :'tokens_out' => :'Integer'
49
+ :'_2xx' => :'Integer',
50
+ :'_3xx' => :'Integer',
51
+ :'_4xx' => :'Integer',
52
+ :'_5xx' => :'Integer'
49
53
  }
50
54
  end
51
55
 
@@ -59,28 +63,32 @@ module Repull
59
63
  # @param [Hash] attributes Model attributes in the form of hash
60
64
  def initialize(attributes = {})
61
65
  if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::CreateStudioProjectGeneration201ResponseData` initialize method"
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageSummary200ResponseStatusDistribution` initialize method"
63
67
  end
64
68
 
65
69
  # check to see if the attribute exists and convert string to symbol for hash key
66
70
  acceptable_attribute_map = self.class.acceptable_attribute_map
67
71
  attributes = attributes.each_with_object({}) { |(k, v), h|
68
72
  if (!acceptable_attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::CreateStudioProjectGeneration201ResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetUsageSummary200ResponseStatusDistribution`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
74
  end
71
75
  h[k.to_sym] = v
72
76
  }
73
77
 
74
- if attributes.key?(:'generation_id')
75
- self.generation_id = attributes[:'generation_id']
78
+ if attributes.key?(:'_2xx')
79
+ self._2xx = attributes[:'_2xx']
80
+ end
81
+
82
+ if attributes.key?(:'_3xx')
83
+ self._3xx = attributes[:'_3xx']
76
84
  end
77
85
 
78
- if attributes.key?(:'response')
79
- self.response = attributes[:'response']
86
+ if attributes.key?(:'_4xx')
87
+ self._4xx = attributes[:'_4xx']
80
88
  end
81
89
 
82
- if attributes.key?(:'tokens_out')
83
- self.tokens_out = attributes[:'tokens_out']
90
+ if attributes.key?(:'_5xx')
91
+ self._5xx = attributes[:'_5xx']
84
92
  end
85
93
  end
86
94
 
@@ -104,9 +112,10 @@ module Repull
104
112
  def ==(o)
105
113
  return true if self.equal?(o)
106
114
  self.class == o.class &&
107
- generation_id == o.generation_id &&
108
- response == o.response &&
109
- tokens_out == o.tokens_out
115
+ _2xx == o._2xx &&
116
+ _3xx == o._3xx &&
117
+ _4xx == o._4xx &&
118
+ _5xx == o._5xx
110
119
  end
111
120
 
112
121
  # @see the `==` method
@@ -118,7 +127,7 @@ module Repull
118
127
  # Calculates hash code according to all attributes.
119
128
  # @return [Integer] Hash code
120
129
  def hash
121
- [generation_id, response, tokens_out].hash
130
+ [_2xx, _3xx, _4xx, _5xx].hash
122
131
  end
123
132
 
124
133
  # Builds the object from hash
@@ -14,14 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class UpsertStudioProjectFileRequest < ApiModelBase
18
- # Full UTF-8 file contents — partial updates are not supported.
19
- attr_accessor :content
17
+ class GetUsageSummary200ResponseTimelineInner < ApiModelBase
18
+ attr_accessor :day
19
+
20
+ attr_accessor :request_count
21
+
22
+ attr_accessor :error_count
20
23
 
21
24
  # Attribute mapping from ruby-style variable name to JSON key.
22
25
  def self.attribute_map
23
26
  {
24
- :'content' => :'content'
27
+ :'day' => :'day',
28
+ :'request_count' => :'requestCount',
29
+ :'error_count' => :'errorCount'
25
30
  }
26
31
  end
27
32
 
@@ -38,7 +43,9 @@ module Repull
38
43
  # Attribute type mapping.
39
44
  def self.openapi_types
40
45
  {
41
- :'content' => :'String'
46
+ :'day' => :'String',
47
+ :'request_count' => :'Integer',
48
+ :'error_count' => :'Integer'
42
49
  }
43
50
  end
44
51
 
@@ -52,22 +59,28 @@ module Repull
52
59
  # @param [Hash] attributes Model attributes in the form of hash
53
60
  def initialize(attributes = {})
54
61
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::UpsertStudioProjectFileRequest` initialize method"
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageSummary200ResponseTimelineInner` initialize method"
56
63
  end
57
64
 
58
65
  # check to see if the attribute exists and convert string to symbol for hash key
59
66
  acceptable_attribute_map = self.class.acceptable_attribute_map
60
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
68
  if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::UpsertStudioProjectFileRequest`. 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::GetUsageSummary200ResponseTimelineInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
70
  end
64
71
  h[k.to_sym] = v
65
72
  }
66
73
 
67
- if attributes.key?(:'content')
68
- self.content = attributes[:'content']
69
- else
70
- self.content = nil
74
+ if attributes.key?(:'day')
75
+ self.day = attributes[:'day']
76
+ end
77
+
78
+ if attributes.key?(:'request_count')
79
+ self.request_count = attributes[:'request_count']
80
+ end
81
+
82
+ if attributes.key?(:'error_count')
83
+ self.error_count = attributes[:'error_count']
71
84
  end
72
85
  end
73
86
 
@@ -76,10 +89,6 @@ module Repull
76
89
  def list_invalid_properties
77
90
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
91
  invalid_properties = Array.new
79
- if @content.nil?
80
- invalid_properties.push('invalid value for "content", content cannot be nil.')
81
- end
82
-
83
92
  invalid_properties
84
93
  end
85
94
 
@@ -87,26 +96,17 @@ module Repull
87
96
  # @return true if the model is valid
88
97
  def valid?
89
98
  warn '[DEPRECATED] the `valid?` method is obsolete'
90
- return false if @content.nil?
91
99
  true
92
100
  end
93
101
 
94
- # Custom attribute writer method with validation
95
- # @param [Object] content Value to be assigned
96
- def content=(content)
97
- if content.nil?
98
- fail ArgumentError, 'content cannot be nil'
99
- end
100
-
101
- @content = content
102
- end
103
-
104
102
  # Checks equality by comparing each attribute.
105
103
  # @param [Object] Object to be compared
106
104
  def ==(o)
107
105
  return true if self.equal?(o)
108
106
  self.class == o.class &&
109
- content == o.content
107
+ day == o.day &&
108
+ request_count == o.request_count &&
109
+ error_count == o.error_count
110
110
  end
111
111
 
112
112
  # @see the `==` method
@@ -118,7 +118,7 @@ module Repull
118
118
  # Calculates hash code according to all attributes.
119
119
  # @return [Integer] Hash code
120
120
  def hash
121
- [content].hash
121
+ [day, request_count, error_count].hash
122
122
  end
123
123
 
124
124
  # Builds the object from hash
@@ -14,14 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class CreateStudioProjectGenerationRequest < ApiModelBase
18
- # Prompt to send to Repull AI.
19
- attr_accessor :prompt
17
+ class GetUsageSummary200ResponseTotals < ApiModelBase
18
+ attr_accessor :requests
19
+
20
+ attr_accessor :errors
21
+
22
+ attr_accessor :avg_latency_ms
20
23
 
21
24
  # Attribute mapping from ruby-style variable name to JSON key.
22
25
  def self.attribute_map
23
26
  {
24
- :'prompt' => :'prompt'
27
+ :'requests' => :'requests',
28
+ :'errors' => :'errors',
29
+ :'avg_latency_ms' => :'avgLatencyMs'
25
30
  }
26
31
  end
27
32
 
@@ -38,7 +43,9 @@ module Repull
38
43
  # Attribute type mapping.
39
44
  def self.openapi_types
40
45
  {
41
- :'prompt' => :'String'
46
+ :'requests' => :'Integer',
47
+ :'errors' => :'Integer',
48
+ :'avg_latency_ms' => :'Integer'
42
49
  }
43
50
  end
44
51
 
@@ -52,22 +59,28 @@ module Repull
52
59
  # @param [Hash] attributes Model attributes in the form of hash
53
60
  def initialize(attributes = {})
54
61
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::CreateStudioProjectGenerationRequest` initialize method"
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageSummary200ResponseTotals` initialize method"
56
63
  end
57
64
 
58
65
  # check to see if the attribute exists and convert string to symbol for hash key
59
66
  acceptable_attribute_map = self.class.acceptable_attribute_map
60
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
68
  if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::CreateStudioProjectGenerationRequest`. 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::GetUsageSummary200ResponseTotals`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
70
  end
64
71
  h[k.to_sym] = v
65
72
  }
66
73
 
67
- if attributes.key?(:'prompt')
68
- self.prompt = attributes[:'prompt']
69
- else
70
- self.prompt = nil
74
+ if attributes.key?(:'requests')
75
+ self.requests = attributes[:'requests']
76
+ end
77
+
78
+ if attributes.key?(:'errors')
79
+ self.errors = attributes[:'errors']
80
+ end
81
+
82
+ if attributes.key?(:'avg_latency_ms')
83
+ self.avg_latency_ms = attributes[:'avg_latency_ms']
71
84
  end
72
85
  end
73
86
 
@@ -76,10 +89,6 @@ module Repull
76
89
  def list_invalid_properties
77
90
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
91
  invalid_properties = Array.new
79
- if @prompt.nil?
80
- invalid_properties.push('invalid value for "prompt", prompt cannot be nil.')
81
- end
82
-
83
92
  invalid_properties
84
93
  end
85
94
 
@@ -87,26 +96,17 @@ module Repull
87
96
  # @return true if the model is valid
88
97
  def valid?
89
98
  warn '[DEPRECATED] the `valid?` method is obsolete'
90
- return false if @prompt.nil?
91
99
  true
92
100
  end
93
101
 
94
- # Custom attribute writer method with validation
95
- # @param [Object] prompt Value to be assigned
96
- def prompt=(prompt)
97
- if prompt.nil?
98
- fail ArgumentError, 'prompt cannot be nil'
99
- end
100
-
101
- @prompt = prompt
102
- end
103
-
104
102
  # Checks equality by comparing each attribute.
105
103
  # @param [Object] Object to be compared
106
104
  def ==(o)
107
105
  return true if self.equal?(o)
108
106
  self.class == o.class &&
109
- prompt == o.prompt
107
+ requests == o.requests &&
108
+ errors == o.errors &&
109
+ avg_latency_ms == o.avg_latency_ms
110
110
  end
111
111
 
112
112
  # @see the `==` method
@@ -118,7 +118,7 @@ module Repull
118
118
  # Calculates hash code according to all attributes.
119
119
  # @return [Integer] Hash code
120
120
  def hash
121
- [prompt].hash
121
+ [requests, errors, avg_latency_ms].hash
122
122
  end
123
123
 
124
124
  # Builds the object from hash
@@ -14,13 +14,16 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class CreateStudioProject201Response < ApiModelBase
18
- attr_accessor :data
17
+ class GetUsageSummary200ResponseUsed < ApiModelBase
18
+ attr_accessor :monthly
19
+
20
+ attr_accessor :daily_ai
19
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
+ :'monthly' => :'monthly',
26
+ :'daily_ai' => :'daily_ai'
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' => :'CreateStudioProject201ResponseData'
43
+ :'monthly' => :'Integer',
44
+ :'daily_ai' => :'Integer'
41
45
  }
42
46
  end
43
47
 
@@ -51,20 +55,24 @@ 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::CreateStudioProject201Response` initialize method"
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetUsageSummary200ResponseUsed` 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::CreateStudioProject201Response`. 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::GetUsageSummary200ResponseUsed`. 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
- if attributes.key?(:'data')
67
- self.data = attributes[:'data']
70
+ if attributes.key?(:'monthly')
71
+ self.monthly = attributes[:'monthly']
72
+ end
73
+
74
+ if attributes.key?(:'daily_ai')
75
+ self.daily_ai = attributes[:'daily_ai']
68
76
  end
69
77
  end
70
78
 
@@ -88,7 +96,8 @@ module Repull
88
96
  def ==(o)
89
97
  return true if self.equal?(o)
90
98
  self.class == o.class &&
91
- data == o.data
99
+ monthly == o.monthly &&
100
+ daily_ai == o.daily_ai
92
101
  end
93
102
 
94
103
  # @see the `==` method
@@ -100,7 +109,7 @@ module Repull
100
109
  # Calculates hash code according to all attributes.
101
110
  # @return [Integer] Hash code
102
111
  def hash
103
- [data].hash
112
+ [monthly, daily_ai].hash
104
113
  end
105
114
 
106
115
  # Builds the object from hash
@@ -0,0 +1,183 @@
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 GetUsageTier200Response < ApiModelBase
18
+ attr_accessor :tier
19
+
20
+ attr_accessor :limits
21
+
22
+ attr_accessor :used
23
+
24
+ attr_accessor :remaining
25
+
26
+ attr_accessor :resets_at
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'tier' => :'tier',
32
+ :'limits' => :'limits',
33
+ :'used' => :'used',
34
+ :'remaining' => :'remaining',
35
+ :'resets_at' => :'resets_at'
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
+ :'tier' => :'String',
53
+ :'limits' => :'GetUsageTier200ResponseLimits',
54
+ :'used' => :'GetUsageTier200ResponseUsed',
55
+ :'remaining' => :'GetUsageTier200ResponseRemaining',
56
+ :'resets_at' => :'Time'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
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::GetUsageTier200Response` 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::GetUsageTier200Response`. 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?(:'tier')
83
+ self.tier = attributes[:'tier']
84
+ end
85
+
86
+ if attributes.key?(:'limits')
87
+ self.limits = attributes[:'limits']
88
+ end
89
+
90
+ if attributes.key?(:'used')
91
+ self.used = attributes[:'used']
92
+ end
93
+
94
+ if attributes.key?(:'remaining')
95
+ self.remaining = attributes[:'remaining']
96
+ end
97
+
98
+ if attributes.key?(:'resets_at')
99
+ self.resets_at = attributes[:'resets_at']
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ tier == o.tier &&
124
+ limits == o.limits &&
125
+ used == o.used &&
126
+ remaining == o.remaining &&
127
+ resets_at == o.resets_at
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [tier, limits, used, remaining, resets_at].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ transformed_hash = {}
149
+ openapi_types.each_pair do |key, type|
150
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = nil
152
+ elsif type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[attribute_map[key]].is_a?(Array)
156
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
+ end
158
+ elsif !attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
160
+ end
161
+ end
162
+ new(transformed_hash)
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ if value.nil?
172
+ is_nullable = self.class.openapi_nullable.include?(attr)
173
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
174
+ end
175
+
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ end
182
+
183
+ end