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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +303 -0
- data/Rakefile +10 -0
- data/docs/CarsApi.md +151 -0
- data/docs/CheckinsApi.md +71 -0
- data/docs/CheckoutsApi.md +71 -0
- data/docs/GetaroundCar.md +28 -0
- data/docs/GetaroundCarsIndexInner.md +18 -0
- data/docs/GetaroundCheckin.md +24 -0
- data/docs/GetaroundCheckinsIndexInner.md +18 -0
- data/docs/GetaroundCheckout.md +26 -0
- data/docs/GetaroundCreateMessagesRequest.md +18 -0
- data/docs/GetaroundCreateUnavailabilitiesRequest.md +22 -0
- data/docs/GetaroundDestroyUnavailabilityRequest.md +20 -0
- data/docs/GetaroundInvoice.md +34 -0
- data/docs/GetaroundInvoiceChargesInner.md +20 -0
- data/docs/GetaroundInvoicesIndexInner.md +18 -0
- data/docs/GetaroundMessage.md +26 -0
- data/docs/GetaroundMessagesSent.md +22 -0
- data/docs/GetaroundMessagesSentAllOfData.md +20 -0
- data/docs/GetaroundPayout.md +28 -0
- data/docs/GetaroundPayoutInvoicesInner.md +18 -0
- data/docs/GetaroundPayoutsIndexInner.md +18 -0
- data/docs/GetaroundReason.md +15 -0
- data/docs/GetaroundRental.md +32 -0
- data/docs/GetaroundRentalInvoicesIndexInner.md +18 -0
- data/docs/GetaroundRentalMessagesIndexInner.md +18 -0
- data/docs/GetaroundRentalsBooked.md +22 -0
- data/docs/GetaroundRentalsBookedAllOfData.md +18 -0
- data/docs/GetaroundRentalsCanceled.md +22 -0
- data/docs/GetaroundRentalsCarCheckedIn.md +22 -0
- data/docs/GetaroundRentalsCarCheckedOut.md +22 -0
- data/docs/GetaroundRentalsCarSwitched.md +22 -0
- data/docs/GetaroundRentalsIndexInner.md +18 -0
- data/docs/GetaroundRentalsTimesChanged.md +22 -0
- data/docs/GetaroundUnavailabilitiesCreated.md +22 -0
- data/docs/GetaroundUnavailabilitiesCreatedAllOfData.md +24 -0
- data/docs/GetaroundUnavailabilitiesDeleted.md +22 -0
- data/docs/GetaroundUnavailabilitiesDeletedAllOfData.md +22 -0
- data/docs/GetaroundUnavailability.md +24 -0
- data/docs/GetaroundUser.md +42 -0
- data/docs/GetaroundUsersUpdated.md +22 -0
- data/docs/GetaroundUsersUpdatedAllOfData.md +18 -0
- data/docs/GetaroundWebhook.md +22 -0
- data/docs/InvoicesApi.md +231 -0
- data/docs/MessagesApi.md +71 -0
- data/docs/PayoutsApi.md +155 -0
- data/docs/RentalsApi.md +263 -0
- data/docs/UnavailabilitiesApi.md +135 -0
- data/docs/UsersApi.md +71 -0
- data/get_around_owner.gemspec +26 -0
- data/git_push.sh +57 -0
- data/lib/get_around_owner/api/cars_api.rb +148 -0
- data/lib/get_around_owner/api/checkins_api.rb +82 -0
- data/lib/get_around_owner/api/checkouts_api.rb +82 -0
- data/lib/get_around_owner/api/invoices_api.rb +223 -0
- data/lib/get_around_owner/api/messages_api.rb +82 -0
- data/lib/get_around_owner/api/payouts_api.rb +162 -0
- data/lib/get_around_owner/api/rentals_api.rb +262 -0
- data/lib/get_around_owner/api/unavailabilities_api.rb +142 -0
- data/lib/get_around_owner/api/users_api.rb +82 -0
- data/lib/get_around_owner/api_client.rb +394 -0
- data/lib/get_around_owner/api_error.rb +58 -0
- data/lib/get_around_owner/configuration.rb +298 -0
- data/lib/get_around_owner/models/getaround_car.rb +308 -0
- data/lib/get_around_owner/models/getaround_cars_index_inner.rb +223 -0
- data/lib/get_around_owner/models/getaround_checkin.rb +279 -0
- data/lib/get_around_owner/models/getaround_checkins_index_inner.rb +222 -0
- data/lib/get_around_owner/models/getaround_checkout.rb +298 -0
- data/lib/get_around_owner/models/getaround_create_messages_request.rb +222 -0
- data/lib/get_around_owner/models/getaround_create_unavailabilities_request.rb +283 -0
- data/lib/get_around_owner/models/getaround_destroy_unavailability_request.rb +239 -0
- data/lib/get_around_owner/models/getaround_invoice.rb +396 -0
- data/lib/get_around_owner/models/getaround_invoice_charges_inner.rb +225 -0
- data/lib/get_around_owner/models/getaround_invoices_index_inner.rb +223 -0
- data/lib/get_around_owner/models/getaround_message.rb +291 -0
- data/lib/get_around_owner/models/getaround_messages_sent.rb +257 -0
- data/lib/get_around_owner/models/getaround_messages_sent_all_of_data.rb +225 -0
- data/lib/get_around_owner/models/getaround_payout.rb +347 -0
- data/lib/get_around_owner/models/getaround_payout_invoices_inner.rb +223 -0
- data/lib/get_around_owner/models/getaround_payouts_index_inner.rb +223 -0
- data/lib/get_around_owner/models/getaround_reason.rb +45 -0
- data/lib/get_around_owner/models/getaround_rental.rb +380 -0
- data/lib/get_around_owner/models/getaround_rental_invoices_index_inner.rb +223 -0
- data/lib/get_around_owner/models/getaround_rental_messages_index_inner.rb +223 -0
- data/lib/get_around_owner/models/getaround_rentals_booked.rb +257 -0
- data/lib/get_around_owner/models/getaround_rentals_booked_all_of_data.rb +215 -0
- data/lib/get_around_owner/models/getaround_rentals_canceled.rb +257 -0
- data/lib/get_around_owner/models/getaround_rentals_car_checked_in.rb +257 -0
- data/lib/get_around_owner/models/getaround_rentals_car_checked_out.rb +257 -0
- data/lib/get_around_owner/models/getaround_rentals_car_switched.rb +257 -0
- data/lib/get_around_owner/models/getaround_rentals_index_inner.rb +223 -0
- data/lib/get_around_owner/models/getaround_rentals_times_changed.rb +257 -0
- data/lib/get_around_owner/models/getaround_unavailabilities_created.rb +257 -0
- data/lib/get_around_owner/models/getaround_unavailabilities_created_all_of_data.rb +267 -0
- data/lib/get_around_owner/models/getaround_unavailabilities_deleted.rb +257 -0
- data/lib/get_around_owner/models/getaround_unavailabilities_deleted_all_of_data.rb +235 -0
- data/lib/get_around_owner/models/getaround_unavailability.rb +302 -0
- data/lib/get_around_owner/models/getaround_user.rb +420 -0
- data/lib/get_around_owner/models/getaround_users_updated.rb +257 -0
- data/lib/get_around_owner/models/getaround_users_updated_all_of_data.rb +215 -0
- data/lib/get_around_owner/models/getaround_webhook.rb +252 -0
- data/lib/get_around_owner/version.rb +15 -0
- data/lib/get_around_owner.rb +86 -0
- data/spec/api/cars_api_spec.rb +60 -0
- data/spec/api/checkins_api_spec.rb +62 -0
- data/spec/api/checkouts_api_spec.rb +62 -0
- data/spec/api/invoices_api_spec.rb +76 -0
- data/spec/api/messages_api_spec.rb +73 -0
- data/spec/api/payouts_api_spec.rb +62 -0
- data/spec/api/rentals_api_spec.rb +62 -0
- data/spec/api/unavailabilities_api_spec.rb +77 -0
- data/spec/api/users_api_spec.rb +47 -0
- data/spec/models/getaround_car_spec.rb +66 -0
- data/spec/models/getaround_cars_index_inner_spec.rb +36 -0
- data/spec/models/getaround_checkin_spec.rb +54 -0
- data/spec/models/getaround_checkins_index_inner_spec.rb +36 -0
- data/spec/models/getaround_checkout_spec.rb +60 -0
- data/spec/models/getaround_create_messages_request_spec.rb +36 -0
- data/spec/models/getaround_create_unavailabilities_request_spec.rb +52 -0
- data/spec/models/getaround_destroy_unavailability_request_spec.rb +42 -0
- data/spec/models/getaround_invoice_charges_inner_spec.rb +42 -0
- data/spec/models/getaround_invoice_spec.rb +92 -0
- data/spec/models/getaround_invoices_index_inner_spec.rb +36 -0
- data/spec/models/getaround_message_spec.rb +60 -0
- data/spec/models/getaround_messages_sent_all_of_data_spec.rb +42 -0
- data/spec/models/getaround_messages_sent_spec.rb +48 -0
- data/spec/models/getaround_payout_invoices_inner_spec.rb +36 -0
- data/spec/models/getaround_payout_spec.rb +70 -0
- data/spec/models/getaround_payouts_index_inner_spec.rb +36 -0
- data/spec/models/getaround_reason_spec.rb +30 -0
- data/spec/models/getaround_rental_invoices_index_inner_spec.rb +36 -0
- data/spec/models/getaround_rental_messages_index_inner_spec.rb +36 -0
- data/spec/models/getaround_rental_spec.rb +78 -0
- data/spec/models/getaround_rentals_booked_all_of_data_spec.rb +36 -0
- data/spec/models/getaround_rentals_booked_spec.rb +48 -0
- data/spec/models/getaround_rentals_canceled_spec.rb +48 -0
- data/spec/models/getaround_rentals_car_checked_in_spec.rb +48 -0
- data/spec/models/getaround_rentals_car_checked_out_spec.rb +48 -0
- data/spec/models/getaround_rentals_car_switched_spec.rb +48 -0
- data/spec/models/getaround_rentals_index_inner_spec.rb +36 -0
- data/spec/models/getaround_rentals_times_changed_spec.rb +48 -0
- data/spec/models/getaround_unavailabilities_created_all_of_data_spec.rb +54 -0
- data/spec/models/getaround_unavailabilities_created_spec.rb +48 -0
- data/spec/models/getaround_unavailabilities_deleted_all_of_data_spec.rb +48 -0
- data/spec/models/getaround_unavailabilities_deleted_spec.rb +48 -0
- data/spec/models/getaround_unavailability_spec.rb +58 -0
- data/spec/models/getaround_user_spec.rb +108 -0
- data/spec/models/getaround_users_updated_all_of_data_spec.rb +36 -0
- data/spec/models/getaround_users_updated_spec.rb +48 -0
- data/spec/models/getaround_webhook_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +283 -0
data/docs/RentalsApi.md
ADDED
@@ -0,0 +1,263 @@
|
|
1
|
+
# GetAroundOwner::RentalsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api-eu.getaround.com/owner/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**booked_rental_post**](RentalsApi.md#booked_rental_post) | **POST** /bookedRental | New rental booked for one of your cars |
|
8
|
+
| [**canceled_rental_post**](RentalsApi.md#canceled_rental_post) | **POST** /canceledRental | Canceled rental for one of your cars |
|
9
|
+
| [**car_switched_rental_post**](RentalsApi.md#car_switched_rental_post) | **POST** /carSwitchedRental | There was a switch car on one of your rental |
|
10
|
+
| [**times_changed_rental_post**](RentalsApi.md#times_changed_rental_post) | **POST** /timesChangedRental | Rental time change for one of your car |
|
11
|
+
|
12
|
+
|
13
|
+
## booked_rental_post
|
14
|
+
|
15
|
+
> booked_rental_post(opts)
|
16
|
+
|
17
|
+
New rental booked for one of your cars
|
18
|
+
|
19
|
+
### Examples
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'time'
|
23
|
+
require 'get_around_owner'
|
24
|
+
|
25
|
+
api_instance = GetAroundOwner::RentalsApi.new
|
26
|
+
opts = {
|
27
|
+
getaround_rentals_booked: # GetaroundRentalsBooked | This event is triggered when a new rental booking has been created for one of your cars
|
28
|
+
}
|
29
|
+
|
30
|
+
begin
|
31
|
+
# New rental booked for one of your cars
|
32
|
+
api_instance.booked_rental_post(opts)
|
33
|
+
rescue GetAroundOwner::ApiError => e
|
34
|
+
puts "Error when calling RentalsApi->booked_rental_post: #{e}"
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
#### Using the booked_rental_post_with_http_info variant
|
39
|
+
|
40
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
41
|
+
|
42
|
+
> <Array(nil, Integer, Hash)> booked_rental_post_with_http_info(opts)
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
begin
|
46
|
+
# New rental booked for one of your cars
|
47
|
+
data, status_code, headers = api_instance.booked_rental_post_with_http_info(opts)
|
48
|
+
p status_code # => 2xx
|
49
|
+
p headers # => { ... }
|
50
|
+
p data # => nil
|
51
|
+
rescue GetAroundOwner::ApiError => e
|
52
|
+
puts "Error when calling RentalsApi->booked_rental_post_with_http_info: #{e}"
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
56
|
+
### Parameters
|
57
|
+
|
58
|
+
| Name | Type | Description | Notes |
|
59
|
+
| ---- | ---- | ----------- | ----- |
|
60
|
+
| **getaround_rentals_booked** | [**GetaroundRentalsBooked**](GetaroundRentalsBooked.md) | This event is triggered when a new rental booking has been created for one of your cars | [optional] |
|
61
|
+
|
62
|
+
### Return type
|
63
|
+
|
64
|
+
nil (empty response body)
|
65
|
+
|
66
|
+
### Authorization
|
67
|
+
|
68
|
+
No authorization required
|
69
|
+
|
70
|
+
### HTTP request headers
|
71
|
+
|
72
|
+
- **Content-Type**: application/json
|
73
|
+
- **Accept**: Not defined
|
74
|
+
|
75
|
+
|
76
|
+
## canceled_rental_post
|
77
|
+
|
78
|
+
> canceled_rental_post(opts)
|
79
|
+
|
80
|
+
Canceled rental for one of your cars
|
81
|
+
|
82
|
+
### Examples
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
require 'time'
|
86
|
+
require 'get_around_owner'
|
87
|
+
|
88
|
+
api_instance = GetAroundOwner::RentalsApi.new
|
89
|
+
opts = {
|
90
|
+
getaround_rentals_canceled: # GetaroundRentalsCanceled | This event is triggered when a rental has been canceled for one of your cars
|
91
|
+
}
|
92
|
+
|
93
|
+
begin
|
94
|
+
# Canceled rental for one of your cars
|
95
|
+
api_instance.canceled_rental_post(opts)
|
96
|
+
rescue GetAroundOwner::ApiError => e
|
97
|
+
puts "Error when calling RentalsApi->canceled_rental_post: #{e}"
|
98
|
+
end
|
99
|
+
```
|
100
|
+
|
101
|
+
#### Using the canceled_rental_post_with_http_info variant
|
102
|
+
|
103
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
104
|
+
|
105
|
+
> <Array(nil, Integer, Hash)> canceled_rental_post_with_http_info(opts)
|
106
|
+
|
107
|
+
```ruby
|
108
|
+
begin
|
109
|
+
# Canceled rental for one of your cars
|
110
|
+
data, status_code, headers = api_instance.canceled_rental_post_with_http_info(opts)
|
111
|
+
p status_code # => 2xx
|
112
|
+
p headers # => { ... }
|
113
|
+
p data # => nil
|
114
|
+
rescue GetAroundOwner::ApiError => e
|
115
|
+
puts "Error when calling RentalsApi->canceled_rental_post_with_http_info: #{e}"
|
116
|
+
end
|
117
|
+
```
|
118
|
+
|
119
|
+
### Parameters
|
120
|
+
|
121
|
+
| Name | Type | Description | Notes |
|
122
|
+
| ---- | ---- | ----------- | ----- |
|
123
|
+
| **getaround_rentals_canceled** | [**GetaroundRentalsCanceled**](GetaroundRentalsCanceled.md) | This event is triggered when a rental has been canceled for one of your cars | [optional] |
|
124
|
+
|
125
|
+
### Return type
|
126
|
+
|
127
|
+
nil (empty response body)
|
128
|
+
|
129
|
+
### Authorization
|
130
|
+
|
131
|
+
No authorization required
|
132
|
+
|
133
|
+
### HTTP request headers
|
134
|
+
|
135
|
+
- **Content-Type**: application/json
|
136
|
+
- **Accept**: Not defined
|
137
|
+
|
138
|
+
|
139
|
+
## car_switched_rental_post
|
140
|
+
|
141
|
+
> car_switched_rental_post(opts)
|
142
|
+
|
143
|
+
There was a switch car on one of your rental
|
144
|
+
|
145
|
+
### Examples
|
146
|
+
|
147
|
+
```ruby
|
148
|
+
require 'time'
|
149
|
+
require 'get_around_owner'
|
150
|
+
|
151
|
+
api_instance = GetAroundOwner::RentalsApi.new
|
152
|
+
opts = {
|
153
|
+
getaround_rentals_car_switched: # GetaroundRentalsCarSwitched | This event is triggered when an owner or customer service team member switches the car used to perform a given rental
|
154
|
+
}
|
155
|
+
|
156
|
+
begin
|
157
|
+
# There was a switch car on one of your rental
|
158
|
+
api_instance.car_switched_rental_post(opts)
|
159
|
+
rescue GetAroundOwner::ApiError => e
|
160
|
+
puts "Error when calling RentalsApi->car_switched_rental_post: #{e}"
|
161
|
+
end
|
162
|
+
```
|
163
|
+
|
164
|
+
#### Using the car_switched_rental_post_with_http_info variant
|
165
|
+
|
166
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
167
|
+
|
168
|
+
> <Array(nil, Integer, Hash)> car_switched_rental_post_with_http_info(opts)
|
169
|
+
|
170
|
+
```ruby
|
171
|
+
begin
|
172
|
+
# There was a switch car on one of your rental
|
173
|
+
data, status_code, headers = api_instance.car_switched_rental_post_with_http_info(opts)
|
174
|
+
p status_code # => 2xx
|
175
|
+
p headers # => { ... }
|
176
|
+
p data # => nil
|
177
|
+
rescue GetAroundOwner::ApiError => e
|
178
|
+
puts "Error when calling RentalsApi->car_switched_rental_post_with_http_info: #{e}"
|
179
|
+
end
|
180
|
+
```
|
181
|
+
|
182
|
+
### Parameters
|
183
|
+
|
184
|
+
| Name | Type | Description | Notes |
|
185
|
+
| ---- | ---- | ----------- | ----- |
|
186
|
+
| **getaround_rentals_car_switched** | [**GetaroundRentalsCarSwitched**](GetaroundRentalsCarSwitched.md) | This event is triggered when an owner or customer service team member switches the car used to perform a given rental | [optional] |
|
187
|
+
|
188
|
+
### Return type
|
189
|
+
|
190
|
+
nil (empty response body)
|
191
|
+
|
192
|
+
### Authorization
|
193
|
+
|
194
|
+
No authorization required
|
195
|
+
|
196
|
+
### HTTP request headers
|
197
|
+
|
198
|
+
- **Content-Type**: application/json
|
199
|
+
- **Accept**: Not defined
|
200
|
+
|
201
|
+
|
202
|
+
## times_changed_rental_post
|
203
|
+
|
204
|
+
> times_changed_rental_post(opts)
|
205
|
+
|
206
|
+
Rental time change for one of your car
|
207
|
+
|
208
|
+
### Examples
|
209
|
+
|
210
|
+
```ruby
|
211
|
+
require 'time'
|
212
|
+
require 'get_around_owner'
|
213
|
+
|
214
|
+
api_instance = GetAroundOwner::RentalsApi.new
|
215
|
+
opts = {
|
216
|
+
getaround_rentals_times_changed: # GetaroundRentalsTimesChanged | This event is triggered when the start or end time of a rental has been changed for one of your cars
|
217
|
+
}
|
218
|
+
|
219
|
+
begin
|
220
|
+
# Rental time change for one of your car
|
221
|
+
api_instance.times_changed_rental_post(opts)
|
222
|
+
rescue GetAroundOwner::ApiError => e
|
223
|
+
puts "Error when calling RentalsApi->times_changed_rental_post: #{e}"
|
224
|
+
end
|
225
|
+
```
|
226
|
+
|
227
|
+
#### Using the times_changed_rental_post_with_http_info variant
|
228
|
+
|
229
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
230
|
+
|
231
|
+
> <Array(nil, Integer, Hash)> times_changed_rental_post_with_http_info(opts)
|
232
|
+
|
233
|
+
```ruby
|
234
|
+
begin
|
235
|
+
# Rental time change for one of your car
|
236
|
+
data, status_code, headers = api_instance.times_changed_rental_post_with_http_info(opts)
|
237
|
+
p status_code # => 2xx
|
238
|
+
p headers # => { ... }
|
239
|
+
p data # => nil
|
240
|
+
rescue GetAroundOwner::ApiError => e
|
241
|
+
puts "Error when calling RentalsApi->times_changed_rental_post_with_http_info: #{e}"
|
242
|
+
end
|
243
|
+
```
|
244
|
+
|
245
|
+
### Parameters
|
246
|
+
|
247
|
+
| Name | Type | Description | Notes |
|
248
|
+
| ---- | ---- | ----------- | ----- |
|
249
|
+
| **getaround_rentals_times_changed** | [**GetaroundRentalsTimesChanged**](GetaroundRentalsTimesChanged.md) | This event is triggered when the start or end time of a rental has been changed for one of your cars | [optional] |
|
250
|
+
|
251
|
+
### Return type
|
252
|
+
|
253
|
+
nil (empty response body)
|
254
|
+
|
255
|
+
### Authorization
|
256
|
+
|
257
|
+
No authorization required
|
258
|
+
|
259
|
+
### HTTP request headers
|
260
|
+
|
261
|
+
- **Content-Type**: application/json
|
262
|
+
- **Accept**: Not defined
|
263
|
+
|
@@ -0,0 +1,135 @@
|
|
1
|
+
# GetAroundOwner::UnavailabilitiesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api-eu.getaround.com/owner/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**created_unavailability_post**](UnavailabilitiesApi.md#created_unavailability_post) | **POST** /createdUnavailability | Unavailability created on one of your cars |
|
8
|
+
| [**deleted_unavailability_post**](UnavailabilitiesApi.md#deleted_unavailability_post) | **POST** /deletedUnavailability | Unavailabilities deleted on one of your cars |
|
9
|
+
|
10
|
+
|
11
|
+
## created_unavailability_post
|
12
|
+
|
13
|
+
> created_unavailability_post(opts)
|
14
|
+
|
15
|
+
Unavailability created on one of your cars
|
16
|
+
|
17
|
+
### Examples
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'time'
|
21
|
+
require 'get_around_owner'
|
22
|
+
|
23
|
+
api_instance = GetAroundOwner::UnavailabilitiesApi.new
|
24
|
+
opts = {
|
25
|
+
getaround_unavailabilities_created: # GetaroundUnavailabilitiesCreated | This event is triggered whenever an unavailability is created (through the API or directly in the app/website). It shows the unavailability that has just been created, with the same timestamps as those entered by the user. It does not show the changes of other potential overlapping unavailabilities. For example: if an unavailability was already set between June 10 and June 20, and if the user creates a new one between June 18 and June 22, this webhook will only send information about the newly created June 18 - June 22 unavailability. It will not show that, under the hood, the unavailability from June 10 to June 20 has be deleted, and that a new unavailability from June 10 to June 22 has been created.
|
26
|
+
}
|
27
|
+
|
28
|
+
begin
|
29
|
+
# Unavailability created on one of your cars
|
30
|
+
api_instance.created_unavailability_post(opts)
|
31
|
+
rescue GetAroundOwner::ApiError => e
|
32
|
+
puts "Error when calling UnavailabilitiesApi->created_unavailability_post: #{e}"
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
#### Using the created_unavailability_post_with_http_info variant
|
37
|
+
|
38
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
39
|
+
|
40
|
+
> <Array(nil, Integer, Hash)> created_unavailability_post_with_http_info(opts)
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
begin
|
44
|
+
# Unavailability created on one of your cars
|
45
|
+
data, status_code, headers = api_instance.created_unavailability_post_with_http_info(opts)
|
46
|
+
p status_code # => 2xx
|
47
|
+
p headers # => { ... }
|
48
|
+
p data # => nil
|
49
|
+
rescue GetAroundOwner::ApiError => e
|
50
|
+
puts "Error when calling UnavailabilitiesApi->created_unavailability_post_with_http_info: #{e}"
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
### Parameters
|
55
|
+
|
56
|
+
| Name | Type | Description | Notes |
|
57
|
+
| ---- | ---- | ----------- | ----- |
|
58
|
+
| **getaround_unavailabilities_created** | [**GetaroundUnavailabilitiesCreated**](GetaroundUnavailabilitiesCreated.md) | This event is triggered whenever an unavailability is created (through the API or directly in the app/website). It shows the unavailability that has just been created, with the same timestamps as those entered by the user. It does not show the changes of other potential overlapping unavailabilities. For example: if an unavailability was already set between June 10 and June 20, and if the user creates a new one between June 18 and June 22, this webhook will only send information about the newly created June 18 - June 22 unavailability. It will not show that, under the hood, the unavailability from June 10 to June 20 has be deleted, and that a new unavailability from June 10 to June 22 has been created. | [optional] |
|
59
|
+
|
60
|
+
### Return type
|
61
|
+
|
62
|
+
nil (empty response body)
|
63
|
+
|
64
|
+
### Authorization
|
65
|
+
|
66
|
+
No authorization required
|
67
|
+
|
68
|
+
### HTTP request headers
|
69
|
+
|
70
|
+
- **Content-Type**: application/json
|
71
|
+
- **Accept**: Not defined
|
72
|
+
|
73
|
+
|
74
|
+
## deleted_unavailability_post
|
75
|
+
|
76
|
+
> deleted_unavailability_post(opts)
|
77
|
+
|
78
|
+
Unavailabilities deleted on one of your cars
|
79
|
+
|
80
|
+
### Examples
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
require 'time'
|
84
|
+
require 'get_around_owner'
|
85
|
+
|
86
|
+
api_instance = GetAroundOwner::UnavailabilitiesApi.new
|
87
|
+
opts = {
|
88
|
+
getaround_unavailabilities_deleted: # GetaroundUnavailabilitiesDeleted | This event is triggered whenever an unavailability is deleted (through the API or directly in the app/website). It shows the unavailability that has just been deleted, with the same timestamps as those entered by the user. It does not show the changes of other potential overlapping unavailabilities. For example: if an unavailability was already set between June 10 and June 20, and if the user deletes an unavailability between June 18 and June 22 (to set their car as available between this dates), this webhook will only send information about the newly deleted June 18 - June 22 unavailability. It will not show that, under the hood, the unavailability from June 10 to June 20 has be deleted, and that a new unavailability from June 10 to June 18 has been created.
|
89
|
+
}
|
90
|
+
|
91
|
+
begin
|
92
|
+
# Unavailabilities deleted on one of your cars
|
93
|
+
api_instance.deleted_unavailability_post(opts)
|
94
|
+
rescue GetAroundOwner::ApiError => e
|
95
|
+
puts "Error when calling UnavailabilitiesApi->deleted_unavailability_post: #{e}"
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
#### Using the deleted_unavailability_post_with_http_info variant
|
100
|
+
|
101
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
102
|
+
|
103
|
+
> <Array(nil, Integer, Hash)> deleted_unavailability_post_with_http_info(opts)
|
104
|
+
|
105
|
+
```ruby
|
106
|
+
begin
|
107
|
+
# Unavailabilities deleted on one of your cars
|
108
|
+
data, status_code, headers = api_instance.deleted_unavailability_post_with_http_info(opts)
|
109
|
+
p status_code # => 2xx
|
110
|
+
p headers # => { ... }
|
111
|
+
p data # => nil
|
112
|
+
rescue GetAroundOwner::ApiError => e
|
113
|
+
puts "Error when calling UnavailabilitiesApi->deleted_unavailability_post_with_http_info: #{e}"
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
### Parameters
|
118
|
+
|
119
|
+
| Name | Type | Description | Notes |
|
120
|
+
| ---- | ---- | ----------- | ----- |
|
121
|
+
| **getaround_unavailabilities_deleted** | [**GetaroundUnavailabilitiesDeleted**](GetaroundUnavailabilitiesDeleted.md) | This event is triggered whenever an unavailability is deleted (through the API or directly in the app/website). It shows the unavailability that has just been deleted, with the same timestamps as those entered by the user. It does not show the changes of other potential overlapping unavailabilities. For example: if an unavailability was already set between June 10 and June 20, and if the user deletes an unavailability between June 18 and June 22 (to set their car as available between this dates), this webhook will only send information about the newly deleted June 18 - June 22 unavailability. It will not show that, under the hood, the unavailability from June 10 to June 20 has be deleted, and that a new unavailability from June 10 to June 18 has been created. | [optional] |
|
122
|
+
|
123
|
+
### Return type
|
124
|
+
|
125
|
+
nil (empty response body)
|
126
|
+
|
127
|
+
### Authorization
|
128
|
+
|
129
|
+
No authorization required
|
130
|
+
|
131
|
+
### HTTP request headers
|
132
|
+
|
133
|
+
- **Content-Type**: application/json
|
134
|
+
- **Accept**: Not defined
|
135
|
+
|
data/docs/UsersApi.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# GetAroundOwner::UsersApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api-eu.getaround.com/owner/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**updated_user_post**](UsersApi.md#updated_user_post) | **POST** /updatedUser | User updated his profile information |
|
8
|
+
|
9
|
+
|
10
|
+
## updated_user_post
|
11
|
+
|
12
|
+
> updated_user_post(opts)
|
13
|
+
|
14
|
+
User updated his profile information
|
15
|
+
|
16
|
+
### Examples
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'time'
|
20
|
+
require 'get_around_owner'
|
21
|
+
|
22
|
+
api_instance = GetAroundOwner::UsersApi.new
|
23
|
+
opts = {
|
24
|
+
getaround_users_updated: # GetaroundUsersUpdated | This event is triggered when a user updates his profile information (You will only receive this event on users with a booked rental or a started rental).
|
25
|
+
}
|
26
|
+
|
27
|
+
begin
|
28
|
+
# User updated his profile information
|
29
|
+
api_instance.updated_user_post(opts)
|
30
|
+
rescue GetAroundOwner::ApiError => e
|
31
|
+
puts "Error when calling UsersApi->updated_user_post: #{e}"
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
#### Using the updated_user_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)> updated_user_post_with_http_info(opts)
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
begin
|
43
|
+
# User updated his profile information
|
44
|
+
data, status_code, headers = api_instance.updated_user_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 UsersApi->updated_user_post_with_http_info: #{e}"
|
50
|
+
end
|
51
|
+
```
|
52
|
+
|
53
|
+
### Parameters
|
54
|
+
|
55
|
+
| Name | Type | Description | Notes |
|
56
|
+
| ---- | ---- | ----------- | ----- |
|
57
|
+
| **getaround_users_updated** | [**GetaroundUsersUpdated**](GetaroundUsersUpdated.md) | This event is triggered when a user updates his profile information (You will only receive this event on users with a booked rental or a started rental). | [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,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
$:.push File.expand_path("../lib", __FILE__)
|
4
|
+
require "get_around_owner/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "get_around_owner"
|
8
|
+
s.version = GetAroundOwner::VERSION
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
s.authors = ["OpenAPI-Generator", "yann120"]
|
11
|
+
s.homepage = "https://openapi-generator.tech"
|
12
|
+
s.summary = "Getaround Owner API Ruby Gem"
|
13
|
+
s.description = "Getaround Owner API Wrapper"
|
14
|
+
s.license = "Unlicense"
|
15
|
+
s.required_ruby_version = ">= 2.7"
|
16
|
+
s.metadata = {}
|
17
|
+
|
18
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
19
|
+
|
20
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
21
|
+
|
22
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
23
|
+
s.test_files = `find spec/*`.split("\n")
|
24
|
+
s.executables = []
|
25
|
+
s.require_paths = ["lib"]
|
26
|
+
end
|
data/git_push.sh
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
|
+
#
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
5
|
+
|
6
|
+
git_user_id=$1
|
7
|
+
git_repo_id=$2
|
8
|
+
release_note=$3
|
9
|
+
git_host=$4
|
10
|
+
|
11
|
+
if [ "$git_host" = "" ]; then
|
12
|
+
git_host="github.com"
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
17
|
+
git_user_id="GIT_USER_ID"
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
|
+
fi
|
25
|
+
|
26
|
+
if [ "$release_note" = "" ]; then
|
27
|
+
release_note="Minor update"
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
29
|
+
fi
|
30
|
+
|
31
|
+
# Initialize the local directory as a Git repository
|
32
|
+
git init
|
33
|
+
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
35
|
+
git add .
|
36
|
+
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
38
|
+
git commit -m "$release_note"
|
39
|
+
|
40
|
+
# Sets the new remote
|
41
|
+
git_remote=$(git remote)
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
|
+
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
|
+
else
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
|
+
fi
|
50
|
+
|
51
|
+
fi
|
52
|
+
|
53
|
+
git pull origin master
|
54
|
+
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|