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/PayoutsApi.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_payout_by_id**](PayoutsApi.md#get_payout_by_id) | **GET** /payouts/{id}.json | Find a payout by ID
|
8
|
+
[**get_payouts**](PayoutsApi.md#get_payouts) | **GET** /payouts.json | Find payouts paid between dates
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
> <GetaroundPayout> get_payout_by_id(id)
|
10
|
+
# **get_payout_by_id**
|
11
|
+
> Payout get_payout_by_id(id)
|
14
12
|
|
15
13
|
Find a payout by ID
|
16
14
|
|
17
15
|
Find a payout 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::PayoutsApi.new
|
31
|
-
id =
|
26
|
+
id = GetAroundOwner::null.new # | ID of payout to return
|
27
|
+
|
32
28
|
|
33
29
|
begin
|
34
|
-
#
|
30
|
+
#Find a payout by ID
|
35
31
|
result = api_instance.get_payout_by_id(id)
|
36
32
|
p result
|
37
33
|
rescue GetAroundOwner::ApiError => e
|
38
|
-
puts "
|
39
|
-
end
|
40
|
-
```
|
41
|
-
|
42
|
-
#### Using the get_payout_by_id_with_http_info variant
|
43
|
-
|
44
|
-
This returns an Array which contains the response data, status code and headers.
|
45
|
-
|
46
|
-
> <Array(<GetaroundPayout>, Integer, Hash)> get_payout_by_id_with_http_info(id)
|
47
|
-
|
48
|
-
```ruby
|
49
|
-
begin
|
50
|
-
# Find a payout by ID
|
51
|
-
data, status_code, headers = api_instance.get_payout_by_id_with_http_info(id)
|
52
|
-
p status_code # => 2xx
|
53
|
-
p headers # => { ... }
|
54
|
-
p data # => <GetaroundPayout>
|
55
|
-
rescue GetAroundOwner::ApiError => e
|
56
|
-
puts "Error when calling PayoutsApi->get_payout_by_id_with_http_info: #{e}"
|
34
|
+
puts "Exception when calling PayoutsApi->get_payout_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 payout to return |
|
65
43
|
|
66
44
|
### Return type
|
67
45
|
|
68
|
-
[**
|
46
|
+
[**Payout**](Payout.md)
|
69
47
|
|
70
48
|
### Authorization
|
71
49
|
|
@@ -73,76 +51,55 @@ 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_payouts
|
81
58
|
|
82
|
-
|
59
|
+
# **get_payouts**
|
60
|
+
> PayoutsIndex get_payouts(start_date, end_date, opts)
|
83
61
|
|
84
62
|
Find payouts paid between dates
|
85
63
|
|
86
64
|
Find payouts paid between dates
|
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::PayoutsApi.new
|
100
|
-
start_date =
|
101
|
-
end_date =
|
102
|
-
opts = {
|
103
|
-
page:
|
104
|
-
per_page:
|
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
|
105
80
|
}
|
106
81
|
|
107
82
|
begin
|
108
|
-
#
|
83
|
+
#Find payouts paid between dates
|
109
84
|
result = api_instance.get_payouts(start_date, end_date, opts)
|
110
85
|
p result
|
111
86
|
rescue GetAroundOwner::ApiError => e
|
112
|
-
puts "
|
113
|
-
end
|
114
|
-
```
|
115
|
-
|
116
|
-
#### Using the get_payouts_with_http_info variant
|
117
|
-
|
118
|
-
This returns an Array which contains the response data, status code and headers.
|
119
|
-
|
120
|
-
> <Array(<Array<GetaroundPayoutsIndexInner>>, Integer, Hash)> get_payouts_with_http_info(start_date, end_date, opts)
|
121
|
-
|
122
|
-
```ruby
|
123
|
-
begin
|
124
|
-
# Find payouts paid between dates
|
125
|
-
data, status_code, headers = api_instance.get_payouts_with_http_info(start_date, end_date, opts)
|
126
|
-
p status_code # => 2xx
|
127
|
-
p headers # => { ... }
|
128
|
-
p data # => <Array<GetaroundPayoutsIndexInner>>
|
129
|
-
rescue GetAroundOwner::ApiError => e
|
130
|
-
puts "Error when calling PayoutsApi->get_payouts_with_http_info: #{e}"
|
87
|
+
puts "Exception when calling PayoutsApi->get_payouts: #{e}"
|
131
88
|
end
|
132
89
|
```
|
133
90
|
|
134
91
|
### Parameters
|
135
92
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
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]
|
142
99
|
|
143
100
|
### Return type
|
144
101
|
|
145
|
-
[**
|
102
|
+
[**PayoutsIndex**](PayoutsIndex.md)
|
146
103
|
|
147
104
|
### Authorization
|
148
105
|
|
@@ -150,6 +107,8 @@ end
|
|
150
107
|
|
151
108
|
### HTTP request headers
|
152
109
|
|
153
|
-
- **Content-Type**: Not defined
|
154
|
-
- **Accept**: application/json
|
110
|
+
- **Content-Type**: Not defined
|
111
|
+
- **Accept**: application/json
|
112
|
+
|
113
|
+
|
155
114
|
|
data/docs/Rental.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# GetAroundOwner::Rental
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | [****](.md) | Rental's id |
|
7
|
+
**car_id** | [****](.md) | Vehicle's id |
|
8
|
+
**user_id** | [****](.md) | User id of the rental's driver |
|
9
|
+
**starts_at** | [****](.md) | Rental's started time in ISO8601 format |
|
10
|
+
**ends_at** | [****](.md) | Rental's ended time in ISO8601 format |
|
11
|
+
**booked_at** | [****](.md) | Rental's booked time in ISO8601 format |
|
12
|
+
**price** | [****](.md) | Price set by the owner (in cents 0.01€) |
|
13
|
+
**insurance_fee** | [****](.md) | Insurance amount collected (in cents 0.01€) |
|
14
|
+
|
data/docs/RentalsApi.md
CHANGED
@@ -2,262 +2,113 @@
|
|
2
2
|
|
3
3
|
All URIs are relative to *https://api-eu.getaround.com/owner/v1*
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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 |
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_rental_by_id**](RentalsApi.md#get_rental_by_id) | **GET** /rentals/{id}.json | Find a rental by ID
|
8
|
+
[**get_rentals**](RentalsApi.md#get_rentals) | **GET** /rentals.json | Find rentals booked between dates
|
11
9
|
|
10
|
+
# **get_rental_by_id**
|
11
|
+
> Rental get_rental_by_id(id)
|
12
12
|
|
13
|
-
|
13
|
+
Find a rental by ID
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
New rental booked for one of your cars
|
18
|
-
|
19
|
-
### Examples
|
15
|
+
Find a rental by ID
|
20
16
|
|
17
|
+
### Example
|
21
18
|
```ruby
|
22
|
-
|
23
|
-
require '
|
24
|
-
|
25
|
-
|
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}"
|
19
|
+
# load the gem
|
20
|
+
require 'getaround-api'
|
21
|
+
# setup authorization
|
22
|
+
GetAroundOwner.configure do |config|
|
35
23
|
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
24
|
|
88
25
|
api_instance = GetAroundOwner::RentalsApi.new
|
89
|
-
|
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.
|
26
|
+
id = GetAroundOwner::null.new # | ID of rental to return
|
104
27
|
|
105
|
-
> <Array(nil, Integer, Hash)> canceled_rental_post_with_http_info(opts)
|
106
28
|
|
107
|
-
```ruby
|
108
29
|
begin
|
109
|
-
#
|
110
|
-
|
111
|
-
p
|
112
|
-
p headers # => { ... }
|
113
|
-
p data # => nil
|
30
|
+
#Find a rental by ID
|
31
|
+
result = api_instance.get_rental_by_id(id)
|
32
|
+
p result
|
114
33
|
rescue GetAroundOwner::ApiError => e
|
115
|
-
puts "
|
34
|
+
puts "Exception when calling RentalsApi->get_rental_by_id: #{e}"
|
116
35
|
end
|
117
36
|
```
|
118
37
|
|
119
38
|
### Parameters
|
120
39
|
|
121
|
-
|
122
|
-
|
123
|
-
|
40
|
+
Name | Type | Description | Notes
|
41
|
+
------------- | ------------- | ------------- | -------------
|
42
|
+
**id** | [****](.md)| ID of rental to return |
|
124
43
|
|
125
44
|
### Return type
|
126
45
|
|
127
|
-
|
46
|
+
[**Rental**](Rental.md)
|
128
47
|
|
129
48
|
### Authorization
|
130
49
|
|
131
|
-
|
50
|
+
[bearerAuth](../README.md#bearerAuth)
|
132
51
|
|
133
52
|
### HTTP request headers
|
134
53
|
|
135
|
-
- **Content-Type**:
|
136
|
-
- **Accept**:
|
54
|
+
- **Content-Type**: Not defined
|
55
|
+
- **Accept**: application/json
|
137
56
|
|
138
57
|
|
139
|
-
## car_switched_rental_post
|
140
58
|
|
141
|
-
|
59
|
+
# **get_rentals**
|
60
|
+
> RentalsIndex get_rentals(start_date, end_date, opts)
|
142
61
|
|
143
|
-
|
62
|
+
Find rentals booked between dates
|
144
63
|
|
145
|
-
|
64
|
+
Find rentals booked between dates
|
146
65
|
|
66
|
+
### Example
|
147
67
|
```ruby
|
148
|
-
|
149
|
-
require '
|
68
|
+
# load the gem
|
69
|
+
require 'getaround-api'
|
70
|
+
# setup authorization
|
71
|
+
GetAroundOwner.configure do |config|
|
72
|
+
end
|
150
73
|
|
151
74
|
api_instance = GetAroundOwner::RentalsApi.new
|
152
|
-
|
153
|
-
|
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
|
154
80
|
}
|
155
81
|
|
156
82
|
begin
|
157
|
-
#
|
158
|
-
api_instance.
|
159
|
-
|
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
|
83
|
+
#Find rentals booked between dates
|
84
|
+
result = api_instance.get_rentals(start_date, end_date, opts)
|
85
|
+
p result
|
177
86
|
rescue GetAroundOwner::ApiError => e
|
178
|
-
puts "
|
87
|
+
puts "Exception when calling RentalsApi->get_rentals: #{e}"
|
179
88
|
end
|
180
89
|
```
|
181
90
|
|
182
91
|
### Parameters
|
183
92
|
|
184
|
-
|
185
|
-
|
186
|
-
|
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]
|
187
99
|
|
188
100
|
### Return type
|
189
101
|
|
190
|
-
|
102
|
+
[**RentalsIndex**](RentalsIndex.md)
|
191
103
|
|
192
104
|
### Authorization
|
193
105
|
|
194
|
-
|
106
|
+
[bearerAuth](../README.md#bearerAuth)
|
195
107
|
|
196
108
|
### HTTP request headers
|
197
109
|
|
198
|
-
- **Content-Type**:
|
199
|
-
- **Accept**:
|
200
|
-
|
110
|
+
- **Content-Type**: Not defined
|
111
|
+
- **Accept**: application/json
|
201
112
|
|
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
113
|
|
261
|
-
- **Content-Type**: application/json
|
262
|
-
- **Accept**: Not defined
|
263
114
|
|