get_around_owner 1.0.0 → 1.0.3
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 +4 -4
- data/Owner API v1.json +2938 -0
- data/README.md +338 -181
- data/Rakefile +0 -2
- data/docs/Car.md +12 -0
- data/docs/CarId.md +6 -0
- data/docs/CarIdUnavailabilitiesJsonBody.md +9 -0
- data/docs/CarsApi.md +38 -79
- data/docs/CarsIndex.md +6 -0
- data/docs/Checkin.md +10 -0
- data/docs/CheckinsApi.md +76 -33
- data/docs/CheckinsIndex.md +6 -0
- data/docs/Checkout.md +11 -0
- data/docs/CheckoutsApi.md +76 -33
- data/docs/CheckoutsIndex.md +6 -0
- data/docs/EndsAt.md +6 -0
- data/docs/Invoice.md +15 -0
- data/docs/InvoicesApi.md +62 -124
- data/docs/InvoicesIndex.md +6 -0
- data/docs/Message.md +11 -0
- data/docs/MessagesApi.md +122 -31
- data/docs/MessagesSent.md +6 -0
- data/docs/Payout.md +12 -0
- data/docs/PayoutsApi.md +42 -83
- data/docs/PayoutsIndex.md +6 -0
- data/docs/Rental.md +14 -0
- data/docs/RentalIdMessagesJsonBody.md +7 -0
- data/docs/RentalInvoicesIndex.md +6 -0
- data/docs/RentalMessagesIndex.md +6 -0
- data/docs/RentalsApi.md +54 -203
- data/docs/RentalsBooked.md +6 -0
- data/docs/RentalsCanceled.md +6 -0
- data/docs/RentalsCarCheckedIn.md +6 -0
- data/docs/RentalsCarCheckedOut.md +6 -0
- data/docs/RentalsCarSwitched.md +6 -0
- data/docs/RentalsIndex.md +6 -0
- data/docs/RentalsTimesChanged.md +6 -0
- data/docs/StartsAt.md +6 -0
- data/docs/UnavailabilitiesApi.md +100 -68
- data/docs/UnavailabilitiesCreated.md +6 -0
- data/docs/UnavailabilitiesDeleted.md +6 -0
- data/docs/UnavailabilitiesIndex.md +6 -0
- data/docs/Unavailability.md +10 -0
- data/docs/User.md +19 -0
- data/docs/UsersApi.md +27 -41
- data/docs/UsersUpdated.md +6 -0
- data/docs/Webhook.md +9 -0
- data/get_around_owner-1.0.0.gem +0 -0
- data/get_around_owner-1.0.1.gem +0 -0
- data/get_around_owner.gemspec +16 -3
- data/getaround-api.gemspec +38 -0
- data/git_push.sh +9 -11
- data/lib/{get_around_owner → getaround-api}/api/cars_api.rb +25 -41
- data/lib/getaround-api/api/checkins_api.rb +146 -0
- data/lib/getaround-api/api/checkouts_api.rb +146 -0
- data/lib/{get_around_owner → getaround-api}/api/invoices_api.rb +43 -66
- data/lib/getaround-api/api/messages_api.rb +198 -0
- data/lib/{get_around_owner → getaround-api}/api/payouts_api.rb +29 -45
- data/lib/getaround-api/api/rentals_api.rb +146 -0
- data/lib/getaround-api/api/unavailabilities_api.rb +208 -0
- data/lib/{get_around_owner/api/messages_api.rb → getaround-api/api/users_api.rb} +31 -37
- data/lib/{get_around_owner → getaround-api}/api_client.rb +71 -77
- data/lib/{get_around_owner → getaround-api}/api_error.rb +5 -6
- data/lib/{get_around_owner → getaround-api}/configuration.rb +13 -106
- data/lib/{get_around_owner/models/getaround_car.rb → getaround-api/models/car.rb} +36 -56
- data/lib/{get_around_owner/models/getaround_users_updated_all_of_data.rb → getaround-api/models/car_id.rb} +33 -50
- data/lib/{get_around_owner/models/getaround_destroy_unavailability_request.rb → getaround-api/models/car_id_unavailabilities_json_body.rb} +45 -47
- data/lib/{get_around_owner/models/getaround_rentals_booked_all_of_data.rb → getaround-api/models/cars_index.rb} +33 -50
- data/lib/{get_around_owner/models/getaround_checkin.rb → getaround-api/models/checkin.rb} +34 -65
- data/lib/{get_around_owner/models/getaround_rentals_index_inner.rb → getaround-api/models/checkins_index.rb} +32 -58
- data/lib/{get_around_owner/models/getaround_checkout.rb → getaround-api/models/checkout.rb} +35 -70
- data/lib/getaround-api/models/checkouts_index.rb +197 -0
- data/lib/getaround-api/models/ends_at.rb +198 -0
- data/lib/{get_around_owner/models/getaround_invoice.rb → getaround-api/models/invoice.rb} +45 -113
- data/lib/getaround-api/models/invoices_index.rb +198 -0
- data/lib/{get_around_owner/models/getaround_message.rb → getaround-api/models/message.rb} +35 -53
- data/lib/getaround-api/models/messages_sent.rb +197 -0
- data/lib/{get_around_owner/models/getaround_payout.rb → getaround-api/models/payout.rb} +37 -101
- data/lib/getaround-api/models/payouts_index.rb +198 -0
- data/lib/{get_around_owner/models/getaround_rental.rb → getaround-api/models/rental.rb} +38 -100
- data/lib/{get_around_owner/models/getaround_create_messages_request.rb → getaround-api/models/rental_id_messages_json_body.rb} +31 -41
- data/lib/getaround-api/models/rental_invoices_index.rb +198 -0
- data/lib/getaround-api/models/rental_messages_index.rb +198 -0
- data/lib/getaround-api/models/rentals_booked.rb +197 -0
- data/lib/getaround-api/models/rentals_canceled.rb +197 -0
- data/lib/getaround-api/models/rentals_car_checked_in.rb +197 -0
- data/lib/getaround-api/models/rentals_car_checked_out.rb +197 -0
- data/lib/getaround-api/models/rentals_car_switched.rb +197 -0
- data/lib/getaround-api/models/rentals_index.rb +198 -0
- data/lib/getaround-api/models/rentals_times_changed.rb +197 -0
- data/lib/getaround-api/models/starts_at.rb +198 -0
- data/lib/{get_around_owner/models/getaround_cars_index_inner.rb → getaround-api/models/unavailabilities_created.rb} +32 -58
- data/lib/getaround-api/models/unavailabilities_deleted.rb +197 -0
- data/lib/getaround-api/models/unavailabilities_index.rb +198 -0
- data/lib/{get_around_owner/models/getaround_unavailabilities_created_all_of_data.rb → getaround-api/models/unavailability.rb} +51 -65
- data/lib/{get_around_owner/models/getaround_user.rb → getaround-api/models/user.rb} +43 -75
- data/lib/getaround-api/models/users_updated.rb +197 -0
- data/lib/{get_around_owner/models/getaround_webhook.rb → getaround-api/models/webhook.rb} +38 -47
- data/lib/{get_around_owner → getaround-api}/version.rb +5 -6
- data/lib/getaround-api.rb +81 -0
- data/openapi.yml +2298 -0
- data/spec/api/cars_api_spec.rb +13 -14
- data/spec/api/checkins_api_spec.rb +13 -14
- data/spec/api/checkouts_api_spec.rb +13 -14
- data/spec/api/invoices_api_spec.rb +19 -20
- data/spec/api/messages_api_spec.rb +14 -15
- data/spec/api/payouts_api_spec.rb +13 -14
- data/spec/api/rentals_api_spec.rb +13 -14
- data/spec/api/unavailabilities_api_spec.rb +14 -16
- data/spec/api/users_api_spec.rb +9 -10
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/{models/getaround_checkins_index_inner_spec.rb → configuration_spec.rb} +26 -21
- data/spec/models/{getaround_reason_spec.rb → car_id_spec.rb} +18 -14
- data/spec/models/{getaround_unavailabilities_deleted_all_of_data_spec.rb → car_id_unavailabilities_json_body_spec.rb} +24 -20
- data/spec/models/{getaround_car_spec.rb → car_spec.rb} +24 -20
- data/spec/models/cars_index_spec.rb +34 -0
- data/spec/models/{getaround_checkin_spec.rb → checkin_spec.rb} +22 -18
- data/spec/models/checkins_index_spec.rb +34 -0
- data/spec/models/{getaround_checkout_spec.rb → checkout_spec.rb} +23 -19
- data/spec/models/checkouts_index_spec.rb +34 -0
- data/spec/models/ends_at_spec.rb +34 -0
- data/spec/models/{getaround_invoice_spec.rb → invoice_spec.rb} +27 -31
- data/spec/models/invoices_index_spec.rb +34 -0
- data/spec/models/{getaround_message_spec.rb → message_spec.rb} +23 -19
- data/spec/models/messages_sent_spec.rb +34 -0
- data/spec/models/{getaround_payout_spec.rb → payout_spec.rb} +24 -24
- data/spec/models/payouts_index_spec.rb +34 -0
- data/spec/models/{getaround_create_messages_request_spec.rb → rental_id_messages_json_body_spec.rb} +19 -15
- data/spec/models/{getaround_rentals_index_inner_spec.rb → rental_invoices_index_spec.rb} +16 -18
- data/spec/models/rental_messages_index_spec.rb +34 -0
- data/spec/models/{getaround_rental_spec.rb → rental_spec.rb} +26 -22
- data/spec/models/rentals_booked_spec.rb +34 -0
- data/spec/models/rentals_canceled_spec.rb +34 -0
- data/spec/models/rentals_car_checked_in_spec.rb +34 -0
- data/spec/models/rentals_car_checked_out_spec.rb +34 -0
- data/spec/models/rentals_car_switched_spec.rb +34 -0
- data/spec/models/rentals_index_spec.rb +34 -0
- data/spec/models/rentals_times_changed_spec.rb +34 -0
- data/spec/models/starts_at_spec.rb +34 -0
- data/spec/models/{getaround_cars_index_inner_spec.rb → unavailabilities_created_spec.rb} +16 -18
- data/spec/models/{getaround_payouts_index_inner_spec.rb → unavailabilities_deleted_spec.rb} +16 -18
- data/spec/models/unavailabilities_index_spec.rb +34 -0
- data/spec/models/{getaround_unavailabilities_created_all_of_data_spec.rb → unavailability_spec.rb} +22 -18
- data/spec/models/{getaround_user_spec.rb → user_spec.rb} +31 -27
- data/spec/models/users_updated_spec.rb +34 -0
- data/spec/models/{getaround_webhook_spec.rb → webhook_spec.rb} +21 -17
- data/spec/spec_helper.rb +5 -6
- metadata +237 -132
- data/lib/get_around_owner/api/checkins_api.rb +0 -82
- data/lib/get_around_owner/api/checkouts_api.rb +0 -82
- data/lib/get_around_owner/api/rentals_api.rb +0 -262
- data/lib/get_around_owner/api/unavailabilities_api.rb +0 -142
- data/lib/get_around_owner/api/users_api.rb +0 -82
- data/lib/get_around_owner/models/getaround_checkins_index_inner.rb +0 -222
- data/lib/get_around_owner/models/getaround_create_unavailabilities_request.rb +0 -283
- data/lib/get_around_owner/models/getaround_invoice_charges_inner.rb +0 -225
- data/lib/get_around_owner/models/getaround_invoices_index_inner.rb +0 -223
- data/lib/get_around_owner/models/getaround_messages_sent.rb +0 -257
- data/lib/get_around_owner/models/getaround_messages_sent_all_of_data.rb +0 -225
- data/lib/get_around_owner/models/getaround_payout_invoices_inner.rb +0 -223
- data/lib/get_around_owner/models/getaround_payouts_index_inner.rb +0 -223
- data/lib/get_around_owner/models/getaround_reason.rb +0 -45
- data/lib/get_around_owner/models/getaround_rental_invoices_index_inner.rb +0 -223
- data/lib/get_around_owner/models/getaround_rental_messages_index_inner.rb +0 -223
- data/lib/get_around_owner/models/getaround_rentals_booked.rb +0 -257
- data/lib/get_around_owner/models/getaround_rentals_canceled.rb +0 -257
- data/lib/get_around_owner/models/getaround_rentals_car_checked_in.rb +0 -257
- data/lib/get_around_owner/models/getaround_rentals_car_checked_out.rb +0 -257
- data/lib/get_around_owner/models/getaround_rentals_car_switched.rb +0 -257
- data/lib/get_around_owner/models/getaround_rentals_times_changed.rb +0 -257
- data/lib/get_around_owner/models/getaround_unavailabilities_created.rb +0 -257
- data/lib/get_around_owner/models/getaround_unavailabilities_deleted.rb +0 -257
- data/lib/get_around_owner/models/getaround_unavailabilities_deleted_all_of_data.rb +0 -235
- data/lib/get_around_owner/models/getaround_unavailability.rb +0 -302
- data/lib/get_around_owner/models/getaround_users_updated.rb +0 -257
- data/lib/get_around_owner.rb +0 -86
- data/spec/models/getaround_create_unavailabilities_request_spec.rb +0 -52
- data/spec/models/getaround_destroy_unavailability_request_spec.rb +0 -42
- data/spec/models/getaround_invoice_charges_inner_spec.rb +0 -42
- data/spec/models/getaround_invoices_index_inner_spec.rb +0 -36
- data/spec/models/getaround_messages_sent_all_of_data_spec.rb +0 -42
- data/spec/models/getaround_messages_sent_spec.rb +0 -48
- data/spec/models/getaround_payout_invoices_inner_spec.rb +0 -36
- data/spec/models/getaround_rental_invoices_index_inner_spec.rb +0 -36
- data/spec/models/getaround_rental_messages_index_inner_spec.rb +0 -36
- data/spec/models/getaround_rentals_booked_all_of_data_spec.rb +0 -36
- data/spec/models/getaround_rentals_booked_spec.rb +0 -48
- data/spec/models/getaround_rentals_canceled_spec.rb +0 -48
- data/spec/models/getaround_rentals_car_checked_in_spec.rb +0 -48
- data/spec/models/getaround_rentals_car_checked_out_spec.rb +0 -48
- data/spec/models/getaround_rentals_car_switched_spec.rb +0 -48
- data/spec/models/getaround_rentals_times_changed_spec.rb +0 -48
- data/spec/models/getaround_unavailabilities_created_spec.rb +0 -48
- data/spec/models/getaround_unavailabilities_deleted_spec.rb +0 -48
- data/spec/models/getaround_unavailability_spec.rb +0 -58
- data/spec/models/getaround_users_updated_all_of_data_spec.rb +0 -36
- data/spec/models/getaround_users_updated_spec.rb +0 -48
data/docs/CarId.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# GetAroundOwner::CarIdUnavailabilitiesJsonBody
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**starts_at** | [****](.md) | Start date and time of the unavailability in [ISO8601 format](https://www.iso.org/iso-8601-date-and-time-format.html) with a 30 min granularity. |
|
7
|
+
**ends_at** | [****](.md) | End date and time of the unavailability in [ISO8601 format](https://www.iso.org/iso-8601-date-and-time-format.html) with a 30 min granularity. |
|
8
|
+
**reason** | [****](.md) | Reason of the unavailability | [optional]
|
9
|
+
|
data/docs/CarsApi.md
CHANGED
@@ -2,70 +2,48 @@
|
|
2
2
|
|
3
3
|
All URIs are relative to *https://api-eu.getaround.com/owner/v1*
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
> <GetaroundCar> get_car_by_id(id)
|
10
|
+
# **get_car_by_id**
|
11
|
+
> Car get_car_by_id(id)
|
14
12
|
|
15
13
|
Find a car by ID
|
16
14
|
|
17
15
|
Find a car by ID
|
18
16
|
|
19
|
-
###
|
20
|
-
|
17
|
+
### Example
|
21
18
|
```ruby
|
22
|
-
|
23
|
-
require '
|
19
|
+
# load the gem
|
20
|
+
require 'getaround-api'
|
24
21
|
# setup authorization
|
25
22
|
GetAroundOwner.configure do |config|
|
26
|
-
# Configure Bearer authorization: bearerAuth
|
27
|
-
config.access_token = 'YOUR_BEARER_TOKEN'
|
28
23
|
end
|
29
24
|
|
30
25
|
api_instance = GetAroundOwner::CarsApi.new
|
31
|
-
id =
|
26
|
+
id = GetAroundOwner::null.new # | ID of car to return
|
27
|
+
|
32
28
|
|
33
29
|
begin
|
34
|
-
#
|
30
|
+
#Find a car by ID
|
35
31
|
result = api_instance.get_car_by_id(id)
|
36
32
|
p result
|
37
33
|
rescue GetAroundOwner::ApiError => e
|
38
|
-
puts "
|
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}"
|
34
|
+
puts "Exception when calling CarsApi->get_car_by_id: #{e}"
|
57
35
|
end
|
58
36
|
```
|
59
37
|
|
60
38
|
### Parameters
|
61
39
|
|
62
|
-
|
63
|
-
|
64
|
-
|
40
|
+
Name | Type | Description | Notes
|
41
|
+
------------- | ------------- | ------------- | -------------
|
42
|
+
**id** | [****](.md)| ID of car to return |
|
65
43
|
|
66
44
|
### Return type
|
67
45
|
|
68
|
-
[**
|
46
|
+
[**Car**](Car.md)
|
69
47
|
|
70
48
|
### Authorization
|
71
49
|
|
@@ -73,72 +51,51 @@ end
|
|
73
51
|
|
74
52
|
### HTTP request headers
|
75
53
|
|
76
|
-
- **Content-Type**: Not defined
|
77
|
-
- **Accept**: application/json
|
54
|
+
- **Content-Type**: Not defined
|
55
|
+
- **Accept**: application/json
|
78
56
|
|
79
57
|
|
80
|
-
## get_cars
|
81
58
|
|
82
|
-
|
59
|
+
# **get_cars**
|
60
|
+
> CarsIndex get_cars(opts)
|
83
61
|
|
84
62
|
Find all cars
|
85
63
|
|
86
64
|
Find all cars
|
87
65
|
|
88
|
-
###
|
89
|
-
|
66
|
+
### Example
|
90
67
|
```ruby
|
91
|
-
|
92
|
-
require '
|
68
|
+
# load the gem
|
69
|
+
require 'getaround-api'
|
93
70
|
# setup authorization
|
94
71
|
GetAroundOwner.configure do |config|
|
95
|
-
# Configure Bearer authorization: bearerAuth
|
96
|
-
config.access_token = 'YOUR_BEARER_TOKEN'
|
97
72
|
end
|
98
73
|
|
99
74
|
api_instance = GetAroundOwner::CarsApi.new
|
100
|
-
opts = {
|
101
|
-
page:
|
102
|
-
per_page:
|
75
|
+
opts = {
|
76
|
+
page: GetAroundOwner::null.new, # | Page number
|
77
|
+
per_page: GetAroundOwner::null.new # | Page size
|
103
78
|
}
|
104
79
|
|
105
80
|
begin
|
106
|
-
#
|
81
|
+
#Find all cars
|
107
82
|
result = api_instance.get_cars(opts)
|
108
83
|
p result
|
109
84
|
rescue GetAroundOwner::ApiError => e
|
110
|
-
puts "
|
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}"
|
85
|
+
puts "Exception when calling CarsApi->get_cars: #{e}"
|
129
86
|
end
|
130
87
|
```
|
131
88
|
|
132
89
|
### Parameters
|
133
90
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
91
|
+
Name | Type | Description | Notes
|
92
|
+
------------- | ------------- | ------------- | -------------
|
93
|
+
**page** | [****](.md)| Page number | [optional]
|
94
|
+
**per_page** | [****](.md)| Page size | [optional] [default to 30]
|
138
95
|
|
139
96
|
### Return type
|
140
97
|
|
141
|
-
[**
|
98
|
+
[**CarsIndex**](CarsIndex.md)
|
142
99
|
|
143
100
|
### Authorization
|
144
101
|
|
@@ -146,6 +103,8 @@ end
|
|
146
103
|
|
147
104
|
### HTTP request headers
|
148
105
|
|
149
|
-
- **Content-Type**: Not defined
|
150
|
-
- **Accept**: application/json
|
106
|
+
- **Content-Type**: Not defined
|
107
|
+
- **Accept**: application/json
|
108
|
+
|
109
|
+
|
151
110
|
|
data/docs/CarsIndex.md
ADDED
data/docs/Checkin.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# GetAroundOwner::Checkin
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**rental_id** | [****](.md) | Rental's ID linked to this checkin |
|
7
|
+
**mileage** | [****](.md) | The vehicle’s mileage at checkin (in local units, eg: FR: km, GB: miles, ...) | [optional]
|
8
|
+
**fuel_level** | [****](.md) | The vehicle’s fuel level at checkin (in percentage) | [optional]
|
9
|
+
**occurred_at** | [****](.md) | Checkin's time in ISO8601 format |
|
10
|
+
|
data/docs/CheckinsApi.md
CHANGED
@@ -2,70 +2,113 @@
|
|
2
2
|
|
3
3
|
All URIs are relative to *https://api-eu.getaround.com/owner/v1*
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_checkin_by_rental_id**](CheckinsApi.md#get_checkin_by_rental_id) | **GET** /rentals/{rental_id}/checkin.json | Find a checkin by rental ID
|
8
|
+
[**get_checkins**](CheckinsApi.md#get_checkins) | **GET** /checkins.json | List of checkins that occurred between two dates
|
8
9
|
|
10
|
+
# **get_checkin_by_rental_id**
|
11
|
+
> Checkin get_checkin_by_rental_id(rental_id)
|
9
12
|
|
10
|
-
|
13
|
+
Find a checkin by rental ID
|
11
14
|
|
12
|
-
|
13
|
-
|
14
|
-
Rental started for one of your cars
|
15
|
-
|
16
|
-
### Examples
|
15
|
+
Find a checkin by rental ID
|
17
16
|
|
17
|
+
### Example
|
18
18
|
```ruby
|
19
|
-
|
20
|
-
require '
|
19
|
+
# load the gem
|
20
|
+
require 'getaround-api'
|
21
|
+
# setup authorization
|
22
|
+
GetAroundOwner.configure do |config|
|
23
|
+
end
|
21
24
|
|
22
25
|
api_instance = GetAroundOwner::CheckinsApi.new
|
23
|
-
|
24
|
-
|
25
|
-
}
|
26
|
+
rental_id = GetAroundOwner::null.new # | ID of the rental related to the checkin to return
|
27
|
+
|
26
28
|
|
27
29
|
begin
|
28
|
-
#
|
29
|
-
api_instance.
|
30
|
+
#Find a checkin by rental ID
|
31
|
+
result = api_instance.get_checkin_by_rental_id(rental_id)
|
32
|
+
p result
|
30
33
|
rescue GetAroundOwner::ApiError => e
|
31
|
-
puts "
|
34
|
+
puts "Exception when calling CheckinsApi->get_checkin_by_rental_id: #{e}"
|
32
35
|
end
|
33
36
|
```
|
34
37
|
|
35
|
-
|
38
|
+
### Parameters
|
39
|
+
|
40
|
+
Name | Type | Description | Notes
|
41
|
+
------------- | ------------- | ------------- | -------------
|
42
|
+
**rental_id** | [****](.md)| ID of the rental related to the checkin to return |
|
43
|
+
|
44
|
+
### Return type
|
45
|
+
|
46
|
+
[**Checkin**](Checkin.md)
|
47
|
+
|
48
|
+
### Authorization
|
49
|
+
|
50
|
+
[bearerAuth](../README.md#bearerAuth)
|
51
|
+
|
52
|
+
### HTTP request headers
|
53
|
+
|
54
|
+
- **Content-Type**: Not defined
|
55
|
+
- **Accept**: application/json
|
56
|
+
|
36
57
|
|
37
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
38
58
|
|
39
|
-
|
59
|
+
# **get_checkins**
|
60
|
+
> CheckinsIndex get_checkins(start_date, end_date, opts)
|
40
61
|
|
62
|
+
List of checkins that occurred between two dates
|
63
|
+
|
64
|
+
List of checkins that occurred between two dates
|
65
|
+
|
66
|
+
### Example
|
41
67
|
```ruby
|
68
|
+
# load the gem
|
69
|
+
require 'getaround-api'
|
70
|
+
# setup authorization
|
71
|
+
GetAroundOwner.configure do |config|
|
72
|
+
end
|
73
|
+
|
74
|
+
api_instance = GetAroundOwner::CheckinsApi.new
|
75
|
+
start_date = GetAroundOwner::null.new # | Start date and time in [ISO8601 format](https://www.iso.org/iso-8601-date-and-time-format.html)
|
76
|
+
end_date = GetAroundOwner::null.new # | End date and time in [ISO8601 format](https://www.iso.org/iso-8601-date-and-time-format.html)
|
77
|
+
opts = {
|
78
|
+
page: GetAroundOwner::null.new, # | Page number
|
79
|
+
per_page: GetAroundOwner::null.new # | Page size
|
80
|
+
}
|
81
|
+
|
42
82
|
begin
|
43
|
-
#
|
44
|
-
|
45
|
-
p
|
46
|
-
p headers # => { ... }
|
47
|
-
p data # => nil
|
83
|
+
#List of checkins that occurred between two dates
|
84
|
+
result = api_instance.get_checkins(start_date, end_date, opts)
|
85
|
+
p result
|
48
86
|
rescue GetAroundOwner::ApiError => e
|
49
|
-
puts "
|
87
|
+
puts "Exception when calling CheckinsApi->get_checkins: #{e}"
|
50
88
|
end
|
51
89
|
```
|
52
90
|
|
53
91
|
### Parameters
|
54
92
|
|
55
|
-
|
56
|
-
|
57
|
-
|
93
|
+
Name | Type | Description | Notes
|
94
|
+
------------- | ------------- | ------------- | -------------
|
95
|
+
**start_date** | [****](.md)| Start date and time in [ISO8601 format](https://www.iso.org/iso-8601-date-and-time-format.html) |
|
96
|
+
**end_date** | [****](.md)| End date and time in [ISO8601 format](https://www.iso.org/iso-8601-date-and-time-format.html) |
|
97
|
+
**page** | [****](.md)| Page number | [optional]
|
98
|
+
**per_page** | [****](.md)| Page size | [optional] [default to 30]
|
58
99
|
|
59
100
|
### Return type
|
60
101
|
|
61
|
-
|
102
|
+
[**CheckinsIndex**](CheckinsIndex.md)
|
62
103
|
|
63
104
|
### Authorization
|
64
105
|
|
65
|
-
|
106
|
+
[bearerAuth](../README.md#bearerAuth)
|
66
107
|
|
67
108
|
### HTTP request headers
|
68
109
|
|
69
|
-
- **Content-Type**:
|
70
|
-
- **Accept**:
|
110
|
+
- **Content-Type**: Not defined
|
111
|
+
- **Accept**: application/json
|
112
|
+
|
113
|
+
|
71
114
|
|
data/docs/Checkout.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# GetAroundOwner::Checkout
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**rental_id** | [****](.md) | Rental's ID linked to this checkout |
|
7
|
+
**mileage** | [****](.md) | The vehicle’s mileage at checkout (in local units, eg: FR: km, GB: miles, ...) | [optional]
|
8
|
+
**fuel_level** | [****](.md) | The vehicle’s fuel level at checkout (in percentage) | [optional]
|
9
|
+
**distance_driven** | [****](.md) | The number of kilometers driven during this rental |
|
10
|
+
**occurred_at** | [****](.md) | Checkout's time in ISO8601 format |
|
11
|
+
|
data/docs/CheckoutsApi.md
CHANGED
@@ -2,70 +2,113 @@
|
|
2
2
|
|
3
3
|
All URIs are relative to *https://api-eu.getaround.com/owner/v1*
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_checkout_by_rental_id**](CheckoutsApi.md#get_checkout_by_rental_id) | **GET** /rentals/{rental_id}/checkout.json | Find a checkout by rental ID
|
8
|
+
[**get_checkouts**](CheckoutsApi.md#get_checkouts) | **GET** /checkouts.json | List of checkouts that occurred between two dates
|
8
9
|
|
10
|
+
# **get_checkout_by_rental_id**
|
11
|
+
> Checkout get_checkout_by_rental_id(rental_id)
|
9
12
|
|
10
|
-
|
13
|
+
Find a checkout by rental ID
|
11
14
|
|
12
|
-
|
13
|
-
|
14
|
-
Rental ended for one of your cars
|
15
|
-
|
16
|
-
### Examples
|
15
|
+
Find a checkout by rental ID
|
17
16
|
|
17
|
+
### Example
|
18
18
|
```ruby
|
19
|
-
|
20
|
-
require '
|
19
|
+
# load the gem
|
20
|
+
require 'getaround-api'
|
21
|
+
# setup authorization
|
22
|
+
GetAroundOwner.configure do |config|
|
23
|
+
end
|
21
24
|
|
22
25
|
api_instance = GetAroundOwner::CheckoutsApi.new
|
23
|
-
|
24
|
-
|
25
|
-
}
|
26
|
+
rental_id = GetAroundOwner::null.new # | ID of the rental related to the checkout to return
|
27
|
+
|
26
28
|
|
27
29
|
begin
|
28
|
-
#
|
29
|
-
api_instance.
|
30
|
+
#Find a checkout by rental ID
|
31
|
+
result = api_instance.get_checkout_by_rental_id(rental_id)
|
32
|
+
p result
|
30
33
|
rescue GetAroundOwner::ApiError => e
|
31
|
-
puts "
|
34
|
+
puts "Exception when calling CheckoutsApi->get_checkout_by_rental_id: #{e}"
|
32
35
|
end
|
33
36
|
```
|
34
37
|
|
35
|
-
|
38
|
+
### Parameters
|
39
|
+
|
40
|
+
Name | Type | Description | Notes
|
41
|
+
------------- | ------------- | ------------- | -------------
|
42
|
+
**rental_id** | [****](.md)| ID of the rental related to the checkout to return |
|
43
|
+
|
44
|
+
### Return type
|
45
|
+
|
46
|
+
[**Checkout**](Checkout.md)
|
47
|
+
|
48
|
+
### Authorization
|
49
|
+
|
50
|
+
[bearerAuth](../README.md#bearerAuth)
|
51
|
+
|
52
|
+
### HTTP request headers
|
53
|
+
|
54
|
+
- **Content-Type**: Not defined
|
55
|
+
- **Accept**: application/json
|
56
|
+
|
36
57
|
|
37
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
38
58
|
|
39
|
-
|
59
|
+
# **get_checkouts**
|
60
|
+
> CheckoutsIndex get_checkouts(start_date, end_date, opts)
|
40
61
|
|
62
|
+
List of checkouts that occurred between two dates
|
63
|
+
|
64
|
+
List of checkouts that occurred between two dates
|
65
|
+
|
66
|
+
### Example
|
41
67
|
```ruby
|
68
|
+
# load the gem
|
69
|
+
require 'getaround-api'
|
70
|
+
# setup authorization
|
71
|
+
GetAroundOwner.configure do |config|
|
72
|
+
end
|
73
|
+
|
74
|
+
api_instance = GetAroundOwner::CheckoutsApi.new
|
75
|
+
start_date = GetAroundOwner::null.new # | Start date and time in [ISO8601 format](https://www.iso.org/iso-8601-date-and-time-format.html)
|
76
|
+
end_date = GetAroundOwner::null.new # | End date and time in [ISO8601 format](https://www.iso.org/iso-8601-date-and-time-format.html)
|
77
|
+
opts = {
|
78
|
+
page: GetAroundOwner::null.new, # | Page number
|
79
|
+
per_page: GetAroundOwner::null.new # | Page size
|
80
|
+
}
|
81
|
+
|
42
82
|
begin
|
43
|
-
#
|
44
|
-
|
45
|
-
p
|
46
|
-
p headers # => { ... }
|
47
|
-
p data # => nil
|
83
|
+
#List of checkouts that occurred between two dates
|
84
|
+
result = api_instance.get_checkouts(start_date, end_date, opts)
|
85
|
+
p result
|
48
86
|
rescue GetAroundOwner::ApiError => e
|
49
|
-
puts "
|
87
|
+
puts "Exception when calling CheckoutsApi->get_checkouts: #{e}"
|
50
88
|
end
|
51
89
|
```
|
52
90
|
|
53
91
|
### Parameters
|
54
92
|
|
55
|
-
|
56
|
-
|
57
|
-
|
93
|
+
Name | Type | Description | Notes
|
94
|
+
------------- | ------------- | ------------- | -------------
|
95
|
+
**start_date** | [****](.md)| Start date and time in [ISO8601 format](https://www.iso.org/iso-8601-date-and-time-format.html) |
|
96
|
+
**end_date** | [****](.md)| End date and time in [ISO8601 format](https://www.iso.org/iso-8601-date-and-time-format.html) |
|
97
|
+
**page** | [****](.md)| Page number | [optional]
|
98
|
+
**per_page** | [****](.md)| Page size | [optional] [default to 30]
|
58
99
|
|
59
100
|
### Return type
|
60
101
|
|
61
|
-
|
102
|
+
[**CheckoutsIndex**](CheckoutsIndex.md)
|
62
103
|
|
63
104
|
### Authorization
|
64
105
|
|
65
|
-
|
106
|
+
[bearerAuth](../README.md#bearerAuth)
|
66
107
|
|
67
108
|
### HTTP request headers
|
68
109
|
|
69
|
-
- **Content-Type**:
|
70
|
-
- **Accept**:
|
110
|
+
- **Content-Type**: Not defined
|
111
|
+
- **Accept**: application/json
|
112
|
+
|
113
|
+
|
71
114
|
|
data/docs/EndsAt.md
ADDED
data/docs/Invoice.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# GetAroundOwner::Invoice
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | [****](.md) | The invoice ID |
|
7
|
+
**pdf_url** | [****](.md) | The temporary url (lifetime: 20min) to download the pdf of the tax invoice is generated each to time you call the endpoint. Also, the 'links' variable will not be present if there is no uploaded invoice yet. This could happen if the job to generate & upload the invoice is not done yet. |
|
8
|
+
**product_type** | [****](.md) | The type of product the invoice is related to |
|
9
|
+
**product_id** | [****](.md) | The id of the product the invoice is related to |
|
10
|
+
**emitted_at** | [****](.md) | The date at which the invoice was emitted |
|
11
|
+
**total_price** | [****](.md) | The invoice amount, which is what you will receive (or which will be debited from your account if it is negative) |
|
12
|
+
**currency** | [****](.md) | The currency of the invoice amount (ISO 4217 alphabetic code) |
|
13
|
+
**entity_type** | [****](.md) | The type of entity the invoice is related to |
|
14
|
+
**charges** | [****](.md) | Array of charges | [optional]
|
15
|
+
|