get_around_owner 1.0.0

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 (154) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +303 -0
  4. data/Rakefile +10 -0
  5. data/docs/CarsApi.md +151 -0
  6. data/docs/CheckinsApi.md +71 -0
  7. data/docs/CheckoutsApi.md +71 -0
  8. data/docs/GetaroundCar.md +28 -0
  9. data/docs/GetaroundCarsIndexInner.md +18 -0
  10. data/docs/GetaroundCheckin.md +24 -0
  11. data/docs/GetaroundCheckinsIndexInner.md +18 -0
  12. data/docs/GetaroundCheckout.md +26 -0
  13. data/docs/GetaroundCreateMessagesRequest.md +18 -0
  14. data/docs/GetaroundCreateUnavailabilitiesRequest.md +22 -0
  15. data/docs/GetaroundDestroyUnavailabilityRequest.md +20 -0
  16. data/docs/GetaroundInvoice.md +34 -0
  17. data/docs/GetaroundInvoiceChargesInner.md +20 -0
  18. data/docs/GetaroundInvoicesIndexInner.md +18 -0
  19. data/docs/GetaroundMessage.md +26 -0
  20. data/docs/GetaroundMessagesSent.md +22 -0
  21. data/docs/GetaroundMessagesSentAllOfData.md +20 -0
  22. data/docs/GetaroundPayout.md +28 -0
  23. data/docs/GetaroundPayoutInvoicesInner.md +18 -0
  24. data/docs/GetaroundPayoutsIndexInner.md +18 -0
  25. data/docs/GetaroundReason.md +15 -0
  26. data/docs/GetaroundRental.md +32 -0
  27. data/docs/GetaroundRentalInvoicesIndexInner.md +18 -0
  28. data/docs/GetaroundRentalMessagesIndexInner.md +18 -0
  29. data/docs/GetaroundRentalsBooked.md +22 -0
  30. data/docs/GetaroundRentalsBookedAllOfData.md +18 -0
  31. data/docs/GetaroundRentalsCanceled.md +22 -0
  32. data/docs/GetaroundRentalsCarCheckedIn.md +22 -0
  33. data/docs/GetaroundRentalsCarCheckedOut.md +22 -0
  34. data/docs/GetaroundRentalsCarSwitched.md +22 -0
  35. data/docs/GetaroundRentalsIndexInner.md +18 -0
  36. data/docs/GetaroundRentalsTimesChanged.md +22 -0
  37. data/docs/GetaroundUnavailabilitiesCreated.md +22 -0
  38. data/docs/GetaroundUnavailabilitiesCreatedAllOfData.md +24 -0
  39. data/docs/GetaroundUnavailabilitiesDeleted.md +22 -0
  40. data/docs/GetaroundUnavailabilitiesDeletedAllOfData.md +22 -0
  41. data/docs/GetaroundUnavailability.md +24 -0
  42. data/docs/GetaroundUser.md +42 -0
  43. data/docs/GetaroundUsersUpdated.md +22 -0
  44. data/docs/GetaroundUsersUpdatedAllOfData.md +18 -0
  45. data/docs/GetaroundWebhook.md +22 -0
  46. data/docs/InvoicesApi.md +231 -0
  47. data/docs/MessagesApi.md +71 -0
  48. data/docs/PayoutsApi.md +155 -0
  49. data/docs/RentalsApi.md +263 -0
  50. data/docs/UnavailabilitiesApi.md +135 -0
  51. data/docs/UsersApi.md +71 -0
  52. data/get_around_owner.gemspec +26 -0
  53. data/git_push.sh +57 -0
  54. data/lib/get_around_owner/api/cars_api.rb +148 -0
  55. data/lib/get_around_owner/api/checkins_api.rb +82 -0
  56. data/lib/get_around_owner/api/checkouts_api.rb +82 -0
  57. data/lib/get_around_owner/api/invoices_api.rb +223 -0
  58. data/lib/get_around_owner/api/messages_api.rb +82 -0
  59. data/lib/get_around_owner/api/payouts_api.rb +162 -0
  60. data/lib/get_around_owner/api/rentals_api.rb +262 -0
  61. data/lib/get_around_owner/api/unavailabilities_api.rb +142 -0
  62. data/lib/get_around_owner/api/users_api.rb +82 -0
  63. data/lib/get_around_owner/api_client.rb +394 -0
  64. data/lib/get_around_owner/api_error.rb +58 -0
  65. data/lib/get_around_owner/configuration.rb +298 -0
  66. data/lib/get_around_owner/models/getaround_car.rb +308 -0
  67. data/lib/get_around_owner/models/getaround_cars_index_inner.rb +223 -0
  68. data/lib/get_around_owner/models/getaround_checkin.rb +279 -0
  69. data/lib/get_around_owner/models/getaround_checkins_index_inner.rb +222 -0
  70. data/lib/get_around_owner/models/getaround_checkout.rb +298 -0
  71. data/lib/get_around_owner/models/getaround_create_messages_request.rb +222 -0
  72. data/lib/get_around_owner/models/getaround_create_unavailabilities_request.rb +283 -0
  73. data/lib/get_around_owner/models/getaround_destroy_unavailability_request.rb +239 -0
  74. data/lib/get_around_owner/models/getaround_invoice.rb +396 -0
  75. data/lib/get_around_owner/models/getaround_invoice_charges_inner.rb +225 -0
  76. data/lib/get_around_owner/models/getaround_invoices_index_inner.rb +223 -0
  77. data/lib/get_around_owner/models/getaround_message.rb +291 -0
  78. data/lib/get_around_owner/models/getaround_messages_sent.rb +257 -0
  79. data/lib/get_around_owner/models/getaround_messages_sent_all_of_data.rb +225 -0
  80. data/lib/get_around_owner/models/getaround_payout.rb +347 -0
  81. data/lib/get_around_owner/models/getaround_payout_invoices_inner.rb +223 -0
  82. data/lib/get_around_owner/models/getaround_payouts_index_inner.rb +223 -0
  83. data/lib/get_around_owner/models/getaround_reason.rb +45 -0
  84. data/lib/get_around_owner/models/getaround_rental.rb +380 -0
  85. data/lib/get_around_owner/models/getaround_rental_invoices_index_inner.rb +223 -0
  86. data/lib/get_around_owner/models/getaround_rental_messages_index_inner.rb +223 -0
  87. data/lib/get_around_owner/models/getaround_rentals_booked.rb +257 -0
  88. data/lib/get_around_owner/models/getaround_rentals_booked_all_of_data.rb +215 -0
  89. data/lib/get_around_owner/models/getaround_rentals_canceled.rb +257 -0
  90. data/lib/get_around_owner/models/getaround_rentals_car_checked_in.rb +257 -0
  91. data/lib/get_around_owner/models/getaround_rentals_car_checked_out.rb +257 -0
  92. data/lib/get_around_owner/models/getaround_rentals_car_switched.rb +257 -0
  93. data/lib/get_around_owner/models/getaround_rentals_index_inner.rb +223 -0
  94. data/lib/get_around_owner/models/getaround_rentals_times_changed.rb +257 -0
  95. data/lib/get_around_owner/models/getaround_unavailabilities_created.rb +257 -0
  96. data/lib/get_around_owner/models/getaround_unavailabilities_created_all_of_data.rb +267 -0
  97. data/lib/get_around_owner/models/getaround_unavailabilities_deleted.rb +257 -0
  98. data/lib/get_around_owner/models/getaround_unavailabilities_deleted_all_of_data.rb +235 -0
  99. data/lib/get_around_owner/models/getaround_unavailability.rb +302 -0
  100. data/lib/get_around_owner/models/getaround_user.rb +420 -0
  101. data/lib/get_around_owner/models/getaround_users_updated.rb +257 -0
  102. data/lib/get_around_owner/models/getaround_users_updated_all_of_data.rb +215 -0
  103. data/lib/get_around_owner/models/getaround_webhook.rb +252 -0
  104. data/lib/get_around_owner/version.rb +15 -0
  105. data/lib/get_around_owner.rb +86 -0
  106. data/spec/api/cars_api_spec.rb +60 -0
  107. data/spec/api/checkins_api_spec.rb +62 -0
  108. data/spec/api/checkouts_api_spec.rb +62 -0
  109. data/spec/api/invoices_api_spec.rb +76 -0
  110. data/spec/api/messages_api_spec.rb +73 -0
  111. data/spec/api/payouts_api_spec.rb +62 -0
  112. data/spec/api/rentals_api_spec.rb +62 -0
  113. data/spec/api/unavailabilities_api_spec.rb +77 -0
  114. data/spec/api/users_api_spec.rb +47 -0
  115. data/spec/models/getaround_car_spec.rb +66 -0
  116. data/spec/models/getaround_cars_index_inner_spec.rb +36 -0
  117. data/spec/models/getaround_checkin_spec.rb +54 -0
  118. data/spec/models/getaround_checkins_index_inner_spec.rb +36 -0
  119. data/spec/models/getaround_checkout_spec.rb +60 -0
  120. data/spec/models/getaround_create_messages_request_spec.rb +36 -0
  121. data/spec/models/getaround_create_unavailabilities_request_spec.rb +52 -0
  122. data/spec/models/getaround_destroy_unavailability_request_spec.rb +42 -0
  123. data/spec/models/getaround_invoice_charges_inner_spec.rb +42 -0
  124. data/spec/models/getaround_invoice_spec.rb +92 -0
  125. data/spec/models/getaround_invoices_index_inner_spec.rb +36 -0
  126. data/spec/models/getaround_message_spec.rb +60 -0
  127. data/spec/models/getaround_messages_sent_all_of_data_spec.rb +42 -0
  128. data/spec/models/getaround_messages_sent_spec.rb +48 -0
  129. data/spec/models/getaround_payout_invoices_inner_spec.rb +36 -0
  130. data/spec/models/getaround_payout_spec.rb +70 -0
  131. data/spec/models/getaround_payouts_index_inner_spec.rb +36 -0
  132. data/spec/models/getaround_reason_spec.rb +30 -0
  133. data/spec/models/getaround_rental_invoices_index_inner_spec.rb +36 -0
  134. data/spec/models/getaround_rental_messages_index_inner_spec.rb +36 -0
  135. data/spec/models/getaround_rental_spec.rb +78 -0
  136. data/spec/models/getaround_rentals_booked_all_of_data_spec.rb +36 -0
  137. data/spec/models/getaround_rentals_booked_spec.rb +48 -0
  138. data/spec/models/getaround_rentals_canceled_spec.rb +48 -0
  139. data/spec/models/getaround_rentals_car_checked_in_spec.rb +48 -0
  140. data/spec/models/getaround_rentals_car_checked_out_spec.rb +48 -0
  141. data/spec/models/getaround_rentals_car_switched_spec.rb +48 -0
  142. data/spec/models/getaround_rentals_index_inner_spec.rb +36 -0
  143. data/spec/models/getaround_rentals_times_changed_spec.rb +48 -0
  144. data/spec/models/getaround_unavailabilities_created_all_of_data_spec.rb +54 -0
  145. data/spec/models/getaround_unavailabilities_created_spec.rb +48 -0
  146. data/spec/models/getaround_unavailabilities_deleted_all_of_data_spec.rb +48 -0
  147. data/spec/models/getaround_unavailabilities_deleted_spec.rb +48 -0
  148. data/spec/models/getaround_unavailability_spec.rb +58 -0
  149. data/spec/models/getaround_user_spec.rb +108 -0
  150. data/spec/models/getaround_users_updated_all_of_data_spec.rb +36 -0
  151. data/spec/models/getaround_users_updated_spec.rb +48 -0
  152. data/spec/models/getaround_webhook_spec.rb +48 -0
  153. data/spec/spec_helper.rb +111 -0
  154. metadata +283 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1096f34dfe06c8e6bf136ee1f8e46e95978131b8af5966c5f1b49486549b073d
4
+ data.tar.gz: 1b1a7aa029ed73bedae2aa5375194b17d35d0c81005f740d5a41bf239bdd2e3c
5
+ SHA512:
6
+ metadata.gz: 7e92988849182ff4a55057668382f331e72c4fbb1dca424c256ec9c7ce59141334ebe1e233d919c3f1c9f7a3b915ea3d462ae3402d30d8705f5530d121c2e5ba
7
+ data.tar.gz: e28337a9a938b5599390101f168542371e4567064b3fe3c5c48494263327741896297de685f21d3d334262654dd55d1e5f00fa6e08bafca70e2b25e3f040d88e
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/README.md ADDED
@@ -0,0 +1,303 @@
1
+ # get_around_owner
2
+
3
+ GetAroundOwner - the Ruby gem for the Getaround Owner API
4
+
5
+ # Quick Start
6
+
7
+ The Owner API uses the JSON format, and must be accessed over a [secure connection](https://en.wikipedia.org/wiki/HTTPS).
8
+
9
+ Let’s assume that the access token provided by your account manager is “TOKEN”.
10
+
11
+ Here’s how to get the list of ids of all your invoices from the first week of August with a shell script:
12
+
13
+ ```bash
14
+ query=\"end_date=2018-08-08T00%3A00%3A00%2B00%3A00&start_date=2018-08-01T00%3A00%3A00%2B00%3A00\"
15
+
16
+ curl -i \"https://api-eu.getaround.com/owner/v1/invoices?${query}\" \\
17
+ -H \"Authorization: Bearer TOKEN\" \\
18
+ -H \"Accept:application/json\" \\
19
+ -H \"Content-Type:application/json\"
20
+ ```
21
+
22
+ And here’s how to get the invoice with the id 12345:
23
+
24
+ ```bash
25
+ curl -i \"https://api-eu.getaround.com/owner/v1/invoices/12345\" \\
26
+ -H \"Authorization: Bearer TOKEN\" \\
27
+ -H \"Accept: application/json\" \\
28
+ -H \"Content-Type: application/json\"\"
29
+ ```
30
+
31
+ See the [endpoints section](#tag/Invoices) of this guide for details about the response format.
32
+
33
+ Dates in request params should follow the ISO 8601 standard.
34
+
35
+
36
+ # Authentication
37
+
38
+ All requests must be authenticated with a [bearer token header](https://tools.ietf.org/html/rfc6750#section-2.1). You token will be sent to you by your account manager.
39
+
40
+ Unauthenticated requests will return a 401 status.
41
+
42
+
43
+ # Pagination
44
+
45
+ The page number and the number of items per page can be set with the “page” and “per_page” params.
46
+
47
+ For example, this request will return the second page of invoices, and 50 invoices per page:
48
+
49
+ `https://api-eu.getaround.com/owner/v1/invoices?page=2&per_page=50`
50
+
51
+ Both of these params are optional. The default page size is 30 items.
52
+
53
+ The Getaround Owner API follows the [RFC 8288 convention](https://datatracker.ietf.org/doc/html/rfc8288) of using the `Link` header to provide the `next` page URL. Please don't build the pagination URLs yourself.
54
+ The `next` page will be missing when you are requesting the last available page.
55
+
56
+ Here's an example response header from requesting the second page of invoices `https://api-eu.getaround.com/owner/v1/invoices?page=2&per_page=50`
57
+ ```
58
+ Link: <https://api-eu.getaround.com/owner/v1/invoices?page=3&per_page=50>; rel=\"next\"
59
+ ```
60
+
61
+
62
+ # Throttling policy and Date range limitation
63
+
64
+ We have throttling policy that prevents you to perform more than 100 requests per min from the same IP.
65
+
66
+ Also, there is a limitation on the size of the range of dates given in params in some requests.
67
+
68
+ All requests that need start_date and end_date, do not accept a range bigger than 30 days.
69
+
70
+
71
+ # Webhooks
72
+
73
+ Getaround can send webhook events that notify your application when certain events happen on your account. This is especially useful to follow the lifecycle of rentals, tracking for example bookings or cancellations.
74
+
75
+ ### Setup
76
+
77
+ To set up an endpoint, you need to define a route on your server for receiving events, and then <a href=\"mailto:owner-api@getaround.com\">ask Getaround</a> to add this URL to your account.
78
+
79
+ To acknowledge receipt of a event, your endpoint must:
80
+
81
+ - Return a `2xx` HTTP status code.
82
+ - Be a secure `https` endpoint with a valid SSL certificate.
83
+
84
+ ### Testing
85
+
86
+ Once Getaround has set up the endpoint, and it is properly configured as described above, a test `ping` event can be sent by clicking the button below:
87
+
88
+ <form action=\"/docs/api/owner/fire_ping_webhook\" method=\"post\"><input type=\"submit\" value=\"Send Ping Event\"></form>
89
+
90
+ You should receive the following JSON payload:
91
+
92
+ ```json
93
+ {
94
+ \"data\": {
95
+ \"ping\": \"pong\"
96
+ },
97
+ \"type\": \"ping\",
98
+ \"occurred_at\": \"2019-04-18T08:30:05Z\"
99
+ }
100
+ ```
101
+
102
+ ### Retries
103
+
104
+ Webhook deliveries will be attempted for up to three days with an exponential back off. After that point the delivery will be abandoned.
105
+
106
+ ### Verifying Signatures
107
+
108
+ Getaround will also provide you with a secret token, which is used to create a hash signature with each payload.
109
+
110
+ This hash signature is passed along with each request in the headers as `X-Drivy-Signature`. Suppose you have a basic server listening to webhooks that looks like this:
111
+
112
+ ```ruby
113
+ require 'sinatra'
114
+ require 'json'
115
+
116
+ post '/payload' do
117
+ push = JSON.parse(params[:payload])
118
+ \"I got some JSON: \#{push.inspect}\"
119
+ end
120
+ ```
121
+
122
+ The goal is to compute a hash using your secret token, and ensure that the hash from Getaround matches. Getaround uses an HMAC hexdigest to compute the hash, so you could change your server to look a little like this:
123
+
124
+ ```ruby
125
+ post '/payload' do
126
+ request.body.rewind
127
+ payload_body = request.body.read
128
+ verify_signature(payload_body)
129
+ push = JSON.parse(params[:payload])
130
+ \"I got some JSON: \#{push.inspect}\"
131
+ end
132
+
133
+ def verify_signature(payload_body)
134
+ signature = 'sha1=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), ENV['SECRET_TOKEN'], payload_body)
135
+ return halt 500, \"Signatures didn't match!\" unless Rack::Utils.secure_compare(signature, request.env['HTTP_X_DRIVY_SIGNATURE'])
136
+ end
137
+ ```
138
+
139
+ Obviously, your language and server implementations may differ from this code. There are a couple of important things to point out, however:
140
+
141
+ No matter which implementation you use, the hash signature starts with `sha1=`, using the key of your secret token and your payload body.
142
+
143
+ Using a plain `==` operator is not advised. A method like secure_compare performs a \"constant time\" string comparison, which renders it safe from certain timing attacks against regular equality operators.
144
+
145
+ ### Best Practices
146
+
147
+ - **Acknowledge events immediately**. If your webhook script performs complex logic, or makes network calls, it’s possible that the script would time out before Getaround sees its complete execution. Ideally, your webhook handler code (acknowledging receipt of an event by returning a `2xx` status code) is separate of any other logic you do for that event.
148
+ - **Handle duplicate events**. Webhook endpoints might occasionally receive the same event more than once. We advise you to guard against duplicated event receipts by making your event processing idempotent. One way of doing this is logging the events you’ve processed, and then not processing already-logged events.
149
+ - **Do not expect events in order**. Getaround does not guarantee delivery of events in the order in which they are generated. Your endpoint should therefore handle this accordingly. We do provide an `occurred_at` timestamp for each event, though, to help reconcile ordering.
150
+
151
+
152
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
153
+
154
+ - API version: 1.0.0
155
+ - Package version: 1.0.0
156
+ - Generator version: 7.6.0
157
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
158
+
159
+ ## Installation
160
+
161
+ ### Build a gem
162
+
163
+ To build the Ruby code into a gem:
164
+
165
+ ```shell
166
+ gem build get_around_owner.gemspec
167
+ ```
168
+
169
+ Then either install the gem locally:
170
+
171
+ ```shell
172
+ gem install ./get_around_owner-1.0.0.gem
173
+ ```
174
+
175
+ (for development, run `gem install --dev ./get_around_owner-1.0.0.gem` to install the development dependencies)
176
+
177
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
178
+
179
+ Finally add this to the Gemfile:
180
+
181
+ gem 'get_around_owner', '~> 1.0.0'
182
+
183
+ ### Install from Git
184
+
185
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
186
+
187
+ gem 'get_around_owner', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
188
+
189
+ ### Include the Ruby code directly
190
+
191
+ Include the Ruby code directly using `-I` as follows:
192
+
193
+ ```shell
194
+ ruby -Ilib script.rb
195
+ ```
196
+
197
+ ## Getting Started
198
+
199
+ Please follow the [installation](#installation) procedure and then run the following code:
200
+
201
+ ```ruby
202
+ # Load the gem
203
+ require 'get_around_owner'
204
+
205
+ # Setup authorization
206
+ GetAroundOwner.configure do |config|
207
+ # Configure Bearer authorization: bearerAuth
208
+ config.access_token = 'YOUR_BEARER_TOKEN'
209
+ # Configure a proc to get access tokens in lieu of the static access_token configuration
210
+ config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
211
+ end
212
+
213
+ api_instance = GetAroundOwner::CarsApi.new
214
+ id = '1' # String | ID of car to return
215
+
216
+ begin
217
+ #Find a car by ID
218
+ result = api_instance.get_car_by_id(id)
219
+ p result
220
+ rescue GetAroundOwner::ApiError => e
221
+ puts "Exception when calling CarsApi->get_car_by_id: #{e}"
222
+ end
223
+
224
+ ```
225
+
226
+ ## Documentation for API Endpoints
227
+
228
+ All URIs are relative to *https://api-eu.getaround.com/owner/v1*
229
+
230
+ Class | Method | HTTP request | Description
231
+ ------------ | ------------- | ------------- | -------------
232
+ *GetAroundOwner::CarsApi* | [**get_car_by_id**](docs/CarsApi.md#get_car_by_id) | **GET** /cars/{id}.json | Find a car by ID
233
+ *GetAroundOwner::CarsApi* | [**get_cars**](docs/CarsApi.md#get_cars) | **GET** /cars.json | Find all cars
234
+ *GetAroundOwner::CheckinsApi* | [**get_checkin_by_rental_id**](docs/CheckinsApi.md#get_checkin_by_rental_id) | **GET** /rentals/{rental_id}/checkin.json | Find a checkin by rental ID
235
+ *GetAroundOwner::CheckinsApi* | [**get_checkins**](docs/CheckinsApi.md#get_checkins) | **GET** /checkins.json | List of checkins that occurred between two dates
236
+ *GetAroundOwner::CheckoutsApi* | [**get_checkout_by_rental_id**](docs/CheckoutsApi.md#get_checkout_by_rental_id) | **GET** /rentals/{rental_id}/checkout.json | Find a checkout by rental ID
237
+ *GetAroundOwner::CheckoutsApi* | [**get_checkouts**](docs/CheckoutsApi.md#get_checkouts) | **GET** /checkouts.json | List of checkouts that occurred between two dates
238
+ *GetAroundOwner::InvoicesApi* | [**get_invoice_by_id**](docs/InvoicesApi.md#get_invoice_by_id) | **GET** /invoices/{id}.json | Find an invoice by ID
239
+ *GetAroundOwner::InvoicesApi* | [**get_invoices**](docs/InvoicesApi.md#get_invoices) | **GET** /invoices.json | Find invoices emitted between dates
240
+ *GetAroundOwner::InvoicesApi* | [**get_invoices_for_rental**](docs/InvoicesApi.md#get_invoices_for_rental) | **GET** /rentals/{rental_id}/invoices.json | Find invoices associated to a rental
241
+ *GetAroundOwner::MessagesApi* | [**create_messages**](docs/MessagesApi.md#create_messages) | **POST** /rentals/{rental_id}/messages.json | Create Message associated to a rental
242
+ *GetAroundOwner::MessagesApi* | [**get_message_by_id**](docs/MessagesApi.md#get_message_by_id) | **GET** /rentals/{rental_id}/messages/{id}.json | Find a message by ID associated to a rental
243
+ *GetAroundOwner::MessagesApi* | [**get_messages_for_rental**](docs/MessagesApi.md#get_messages_for_rental) | **GET** /rentals/{rental_id}/messages.json | Find messages associated to a rental
244
+ *GetAroundOwner::PayoutsApi* | [**get_payout_by_id**](docs/PayoutsApi.md#get_payout_by_id) | **GET** /payouts/{id}.json | Find a payout by ID
245
+ *GetAroundOwner::PayoutsApi* | [**get_payouts**](docs/PayoutsApi.md#get_payouts) | **GET** /payouts.json | Find payouts paid between dates
246
+ *GetAroundOwner::RentalsApi* | [**get_rental_by_id**](docs/RentalsApi.md#get_rental_by_id) | **GET** /rentals/{id}.json | Find a rental by ID
247
+ *GetAroundOwner::RentalsApi* | [**get_rentals**](docs/RentalsApi.md#get_rentals) | **GET** /rentals.json | Find rentals booked between dates
248
+ *GetAroundOwner::UnavailabilitiesApi* | [**create_unavailabilities**](docs/UnavailabilitiesApi.md#create_unavailabilities) | **POST** /cars/{car_id}/unavailabilities.json | Create Unavailability related to a car between dates
249
+ *GetAroundOwner::UnavailabilitiesApi* | [**destroy_unavailability**](docs/UnavailabilitiesApi.md#destroy_unavailability) | **DELETE** /cars/{car_id}/unavailabilities.json | Destroy Unavailability related to a car between dates
250
+ *GetAroundOwner::UnavailabilitiesApi* | [**get_unavailabilities_for_car**](docs/UnavailabilitiesApi.md#get_unavailabilities_for_car) | **GET** /cars/{car_id}/unavailabilities.json | Find Unavailabilities related to a car between dates
251
+ *GetAroundOwner::UsersApi* | [**get_user_by_id**](docs/UsersApi.md#get_user_by_id) | **GET** /users/{id}.json | Find a user by ID (Users are customers who rent one of your cars)
252
+
253
+
254
+ ## Documentation for Models
255
+
256
+ - [GetAroundOwner::GetaroundCar](docs/GetaroundCar.md)
257
+ - [GetAroundOwner::GetaroundCarsIndexInner](docs/GetaroundCarsIndexInner.md)
258
+ - [GetAroundOwner::GetaroundCheckin](docs/GetaroundCheckin.md)
259
+ - [GetAroundOwner::GetaroundCheckinsIndexInner](docs/GetaroundCheckinsIndexInner.md)
260
+ - [GetAroundOwner::GetaroundCheckout](docs/GetaroundCheckout.md)
261
+ - [GetAroundOwner::GetaroundCreateMessagesRequest](docs/GetaroundCreateMessagesRequest.md)
262
+ - [GetAroundOwner::GetaroundCreateUnavailabilitiesRequest](docs/GetaroundCreateUnavailabilitiesRequest.md)
263
+ - [GetAroundOwner::GetaroundDestroyUnavailabilityRequest](docs/GetaroundDestroyUnavailabilityRequest.md)
264
+ - [GetAroundOwner::GetaroundInvoice](docs/GetaroundInvoice.md)
265
+ - [GetAroundOwner::GetaroundInvoiceChargesInner](docs/GetaroundInvoiceChargesInner.md)
266
+ - [GetAroundOwner::GetaroundInvoicesIndexInner](docs/GetaroundInvoicesIndexInner.md)
267
+ - [GetAroundOwner::GetaroundMessage](docs/GetaroundMessage.md)
268
+ - [GetAroundOwner::GetaroundMessagesSent](docs/GetaroundMessagesSent.md)
269
+ - [GetAroundOwner::GetaroundMessagesSentAllOfData](docs/GetaroundMessagesSentAllOfData.md)
270
+ - [GetAroundOwner::GetaroundPayout](docs/GetaroundPayout.md)
271
+ - [GetAroundOwner::GetaroundPayoutInvoicesInner](docs/GetaroundPayoutInvoicesInner.md)
272
+ - [GetAroundOwner::GetaroundPayoutsIndexInner](docs/GetaroundPayoutsIndexInner.md)
273
+ - [GetAroundOwner::GetaroundReason](docs/GetaroundReason.md)
274
+ - [GetAroundOwner::GetaroundRental](docs/GetaroundRental.md)
275
+ - [GetAroundOwner::GetaroundRentalInvoicesIndexInner](docs/GetaroundRentalInvoicesIndexInner.md)
276
+ - [GetAroundOwner::GetaroundRentalMessagesIndexInner](docs/GetaroundRentalMessagesIndexInner.md)
277
+ - [GetAroundOwner::GetaroundRentalsBooked](docs/GetaroundRentalsBooked.md)
278
+ - [GetAroundOwner::GetaroundRentalsBookedAllOfData](docs/GetaroundRentalsBookedAllOfData.md)
279
+ - [GetAroundOwner::GetaroundRentalsCanceled](docs/GetaroundRentalsCanceled.md)
280
+ - [GetAroundOwner::GetaroundRentalsCarCheckedIn](docs/GetaroundRentalsCarCheckedIn.md)
281
+ - [GetAroundOwner::GetaroundRentalsCarCheckedOut](docs/GetaroundRentalsCarCheckedOut.md)
282
+ - [GetAroundOwner::GetaroundRentalsCarSwitched](docs/GetaroundRentalsCarSwitched.md)
283
+ - [GetAroundOwner::GetaroundRentalsIndexInner](docs/GetaroundRentalsIndexInner.md)
284
+ - [GetAroundOwner::GetaroundRentalsTimesChanged](docs/GetaroundRentalsTimesChanged.md)
285
+ - [GetAroundOwner::GetaroundUnavailabilitiesCreated](docs/GetaroundUnavailabilitiesCreated.md)
286
+ - [GetAroundOwner::GetaroundUnavailabilitiesCreatedAllOfData](docs/GetaroundUnavailabilitiesCreatedAllOfData.md)
287
+ - [GetAroundOwner::GetaroundUnavailabilitiesDeleted](docs/GetaroundUnavailabilitiesDeleted.md)
288
+ - [GetAroundOwner::GetaroundUnavailabilitiesDeletedAllOfData](docs/GetaroundUnavailabilitiesDeletedAllOfData.md)
289
+ - [GetAroundOwner::GetaroundUnavailability](docs/GetaroundUnavailability.md)
290
+ - [GetAroundOwner::GetaroundUser](docs/GetaroundUser.md)
291
+ - [GetAroundOwner::GetaroundUsersUpdated](docs/GetaroundUsersUpdated.md)
292
+ - [GetAroundOwner::GetaroundUsersUpdatedAllOfData](docs/GetaroundUsersUpdatedAllOfData.md)
293
+ - [GetAroundOwner::GetaroundWebhook](docs/GetaroundWebhook.md)
294
+
295
+
296
+ ## Documentation for Authorization
297
+
298
+
299
+ Authentication schemes defined for the API:
300
+ ### bearerAuth
301
+
302
+ - **Type**: Bearer authentication
303
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
data/docs/CarsApi.md ADDED
@@ -0,0 +1,151 @@
1
+ # GetAroundOwner::CarsApi
2
+
3
+ All URIs are relative to *https://api-eu.getaround.com/owner/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_car_by_id**](CarsApi.md#get_car_by_id) | **GET** /cars/{id}.json | Find a car by ID |
8
+ | [**get_cars**](CarsApi.md#get_cars) | **GET** /cars.json | Find all cars |
9
+
10
+
11
+ ## get_car_by_id
12
+
13
+ > <GetaroundCar> get_car_by_id(id)
14
+
15
+ Find a car by ID
16
+
17
+ Find a car by ID
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'get_around_owner'
24
+ # setup authorization
25
+ GetAroundOwner.configure do |config|
26
+ # Configure Bearer authorization: bearerAuth
27
+ config.access_token = 'YOUR_BEARER_TOKEN'
28
+ end
29
+
30
+ api_instance = GetAroundOwner::CarsApi.new
31
+ id = '1' # String | ID of car to return
32
+
33
+ begin
34
+ # Find a car by ID
35
+ result = api_instance.get_car_by_id(id)
36
+ p result
37
+ rescue GetAroundOwner::ApiError => e
38
+ puts "Error when calling CarsApi->get_car_by_id: #{e}"
39
+ end
40
+ ```
41
+
42
+ #### Using the get_car_by_id_with_http_info variant
43
+
44
+ This returns an Array which contains the response data, status code and headers.
45
+
46
+ > <Array(<GetaroundCar>, Integer, Hash)> get_car_by_id_with_http_info(id)
47
+
48
+ ```ruby
49
+ begin
50
+ # Find a car by ID
51
+ data, status_code, headers = api_instance.get_car_by_id_with_http_info(id)
52
+ p status_code # => 2xx
53
+ p headers # => { ... }
54
+ p data # => <GetaroundCar>
55
+ rescue GetAroundOwner::ApiError => e
56
+ puts "Error when calling CarsApi->get_car_by_id_with_http_info: #{e}"
57
+ end
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+ | Name | Type | Description | Notes |
63
+ | ---- | ---- | ----------- | ----- |
64
+ | **id** | **String** | ID of car to return | |
65
+
66
+ ### Return type
67
+
68
+ [**GetaroundCar**](GetaroundCar.md)
69
+
70
+ ### Authorization
71
+
72
+ [bearerAuth](../README.md#bearerAuth)
73
+
74
+ ### HTTP request headers
75
+
76
+ - **Content-Type**: Not defined
77
+ - **Accept**: application/json
78
+
79
+
80
+ ## get_cars
81
+
82
+ > <Array<GetaroundCarsIndexInner>> get_cars(opts)
83
+
84
+ Find all cars
85
+
86
+ Find all cars
87
+
88
+ ### Examples
89
+
90
+ ```ruby
91
+ require 'time'
92
+ require 'get_around_owner'
93
+ # setup authorization
94
+ GetAroundOwner.configure do |config|
95
+ # Configure Bearer authorization: bearerAuth
96
+ config.access_token = 'YOUR_BEARER_TOKEN'
97
+ end
98
+
99
+ api_instance = GetAroundOwner::CarsApi.new
100
+ opts = {
101
+ page: 'page_example', # String | Page number
102
+ per_page: 'per_page_example' # String | Page size
103
+ }
104
+
105
+ begin
106
+ # Find all cars
107
+ result = api_instance.get_cars(opts)
108
+ p result
109
+ rescue GetAroundOwner::ApiError => e
110
+ puts "Error when calling CarsApi->get_cars: #{e}"
111
+ end
112
+ ```
113
+
114
+ #### Using the get_cars_with_http_info variant
115
+
116
+ This returns an Array which contains the response data, status code and headers.
117
+
118
+ > <Array(<Array<GetaroundCarsIndexInner>>, Integer, Hash)> get_cars_with_http_info(opts)
119
+
120
+ ```ruby
121
+ begin
122
+ # Find all cars
123
+ data, status_code, headers = api_instance.get_cars_with_http_info(opts)
124
+ p status_code # => 2xx
125
+ p headers # => { ... }
126
+ p data # => <Array<GetaroundCarsIndexInner>>
127
+ rescue GetAroundOwner::ApiError => e
128
+ puts "Error when calling CarsApi->get_cars_with_http_info: #{e}"
129
+ end
130
+ ```
131
+
132
+ ### Parameters
133
+
134
+ | Name | Type | Description | Notes |
135
+ | ---- | ---- | ----------- | ----- |
136
+ | **page** | **String** | Page number | [optional] |
137
+ | **per_page** | **String** | Page size | [optional][default to &#39;30&#39;] |
138
+
139
+ ### Return type
140
+
141
+ [**Array&lt;GetaroundCarsIndexInner&gt;**](GetaroundCarsIndexInner.md)
142
+
143
+ ### Authorization
144
+
145
+ [bearerAuth](../README.md#bearerAuth)
146
+
147
+ ### HTTP request headers
148
+
149
+ - **Content-Type**: Not defined
150
+ - **Accept**: application/json
151
+
@@ -0,0 +1,71 @@
1
+ # GetAroundOwner::CheckinsApi
2
+
3
+ All URIs are relative to *https://api-eu.getaround.com/owner/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**car_checked_in_rental_post**](CheckinsApi.md#car_checked_in_rental_post) | **POST** /carCheckedInRental | Rental started for one of your cars |
8
+
9
+
10
+ ## car_checked_in_rental_post
11
+
12
+ > car_checked_in_rental_post(opts)
13
+
14
+ Rental started for one of your cars
15
+
16
+ ### Examples
17
+
18
+ ```ruby
19
+ require 'time'
20
+ require 'get_around_owner'
21
+
22
+ api_instance = GetAroundOwner::CheckinsApi.new
23
+ opts = {
24
+ getaround_rentals_car_checked_in: # GetaroundRentalsCarCheckedIn | This event is triggered when a rental starts and the car has been unlocked
25
+ }
26
+
27
+ begin
28
+ # Rental started for one of your cars
29
+ api_instance.car_checked_in_rental_post(opts)
30
+ rescue GetAroundOwner::ApiError => e
31
+ puts "Error when calling CheckinsApi->car_checked_in_rental_post: #{e}"
32
+ end
33
+ ```
34
+
35
+ #### Using the car_checked_in_rental_post_with_http_info variant
36
+
37
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
38
+
39
+ > <Array(nil, Integer, Hash)> car_checked_in_rental_post_with_http_info(opts)
40
+
41
+ ```ruby
42
+ begin
43
+ # Rental started for one of your cars
44
+ data, status_code, headers = api_instance.car_checked_in_rental_post_with_http_info(opts)
45
+ p status_code # => 2xx
46
+ p headers # => { ... }
47
+ p data # => nil
48
+ rescue GetAroundOwner::ApiError => e
49
+ puts "Error when calling CheckinsApi->car_checked_in_rental_post_with_http_info: #{e}"
50
+ end
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+ | Name | Type | Description | Notes |
56
+ | ---- | ---- | ----------- | ----- |
57
+ | **getaround_rentals_car_checked_in** | [**GetaroundRentalsCarCheckedIn**](GetaroundRentalsCarCheckedIn.md) | This event is triggered when a rental starts and the car has been unlocked | [optional] |
58
+
59
+ ### Return type
60
+
61
+ nil (empty response body)
62
+
63
+ ### Authorization
64
+
65
+ No authorization required
66
+
67
+ ### HTTP request headers
68
+
69
+ - **Content-Type**: application/json
70
+ - **Accept**: Not defined
71
+
@@ -0,0 +1,71 @@
1
+ # GetAroundOwner::CheckoutsApi
2
+
3
+ All URIs are relative to *https://api-eu.getaround.com/owner/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**car_checked_out_rental_post**](CheckoutsApi.md#car_checked_out_rental_post) | **POST** /carCheckedOutRental | Rental ended for one of your cars |
8
+
9
+
10
+ ## car_checked_out_rental_post
11
+
12
+ > car_checked_out_rental_post(opts)
13
+
14
+ Rental ended for one of your cars
15
+
16
+ ### Examples
17
+
18
+ ```ruby
19
+ require 'time'
20
+ require 'get_around_owner'
21
+
22
+ api_instance = GetAroundOwner::CheckoutsApi.new
23
+ opts = {
24
+ getaround_rentals_car_checked_out: # GetaroundRentalsCarCheckedOut | This event is triggered when a rental ends and the car has been locked
25
+ }
26
+
27
+ begin
28
+ # Rental ended for one of your cars
29
+ api_instance.car_checked_out_rental_post(opts)
30
+ rescue GetAroundOwner::ApiError => e
31
+ puts "Error when calling CheckoutsApi->car_checked_out_rental_post: #{e}"
32
+ end
33
+ ```
34
+
35
+ #### Using the car_checked_out_rental_post_with_http_info variant
36
+
37
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
38
+
39
+ > <Array(nil, Integer, Hash)> car_checked_out_rental_post_with_http_info(opts)
40
+
41
+ ```ruby
42
+ begin
43
+ # Rental ended for one of your cars
44
+ data, status_code, headers = api_instance.car_checked_out_rental_post_with_http_info(opts)
45
+ p status_code # => 2xx
46
+ p headers # => { ... }
47
+ p data # => nil
48
+ rescue GetAroundOwner::ApiError => e
49
+ puts "Error when calling CheckoutsApi->car_checked_out_rental_post_with_http_info: #{e}"
50
+ end
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+ | Name | Type | Description | Notes |
56
+ | ---- | ---- | ----------- | ----- |
57
+ | **getaround_rentals_car_checked_out** | [**GetaroundRentalsCarCheckedOut**](GetaroundRentalsCarCheckedOut.md) | This event is triggered when a rental ends and the car has been locked | [optional] |
58
+
59
+ ### Return type
60
+
61
+ nil (empty response body)
62
+
63
+ ### Authorization
64
+
65
+ No authorization required
66
+
67
+ ### HTTP request headers
68
+
69
+ - **Content-Type**: application/json
70
+ - **Accept**: Not defined
71
+
@@ -0,0 +1,28 @@
1
+ # GetAroundOwner::GetaroundCar
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | The car ID | |
8
+ | **state** | **String** | State of the vehicle can be a) active (only state where the vehicle can be booked by a user) b) inactive (temporary state when a vehicle is unavailable for rental) c) pending_approval (temporary state when a vehicle is under review for quality or other checks) and d) deleted (when a vehicle is permanently unavailable for rental) | |
9
+ | **plate_number** | **String** | Vehicle&#39;s plate number | |
10
+ | **brand** | **String** | Vehicle&#39;s brand (ex: Volkswagen) | |
11
+ | **model** | **String** | Vehicle&#39;s model (ex: Polo) | |
12
+ | **display_address** | **String** | Location where the vehicle is parked | |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'get_around_owner'
18
+
19
+ instance = GetAroundOwner::GetaroundCar.new(
20
+ id: null,
21
+ state: null,
22
+ plate_number: null,
23
+ brand: null,
24
+ model: null,
25
+ display_address: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,18 @@
1
+ # GetAroundOwner::GetaroundCarsIndexInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | The car ID | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'get_around_owner'
13
+
14
+ instance = GetAroundOwner::GetaroundCarsIndexInner.new(
15
+ id: null
16
+ )
17
+ ```
18
+