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.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/Owner API v1.json +2938 -0
  3. data/README.md +338 -181
  4. data/Rakefile +0 -2
  5. data/docs/Car.md +12 -0
  6. data/docs/CarId.md +6 -0
  7. data/docs/CarIdUnavailabilitiesJsonBody.md +9 -0
  8. data/docs/CarsApi.md +38 -79
  9. data/docs/CarsIndex.md +6 -0
  10. data/docs/Checkin.md +10 -0
  11. data/docs/CheckinsApi.md +76 -33
  12. data/docs/CheckinsIndex.md +6 -0
  13. data/docs/Checkout.md +11 -0
  14. data/docs/CheckoutsApi.md +76 -33
  15. data/docs/CheckoutsIndex.md +6 -0
  16. data/docs/EndsAt.md +6 -0
  17. data/docs/Invoice.md +15 -0
  18. data/docs/InvoicesApi.md +62 -124
  19. data/docs/InvoicesIndex.md +6 -0
  20. data/docs/Message.md +11 -0
  21. data/docs/MessagesApi.md +122 -31
  22. data/docs/MessagesSent.md +6 -0
  23. data/docs/Payout.md +12 -0
  24. data/docs/PayoutsApi.md +42 -83
  25. data/docs/PayoutsIndex.md +6 -0
  26. data/docs/Rental.md +14 -0
  27. data/docs/RentalIdMessagesJsonBody.md +7 -0
  28. data/docs/RentalInvoicesIndex.md +6 -0
  29. data/docs/RentalMessagesIndex.md +6 -0
  30. data/docs/RentalsApi.md +54 -203
  31. data/docs/RentalsBooked.md +6 -0
  32. data/docs/RentalsCanceled.md +6 -0
  33. data/docs/RentalsCarCheckedIn.md +6 -0
  34. data/docs/RentalsCarCheckedOut.md +6 -0
  35. data/docs/RentalsCarSwitched.md +6 -0
  36. data/docs/RentalsIndex.md +6 -0
  37. data/docs/RentalsTimesChanged.md +6 -0
  38. data/docs/StartsAt.md +6 -0
  39. data/docs/UnavailabilitiesApi.md +100 -68
  40. data/docs/UnavailabilitiesCreated.md +6 -0
  41. data/docs/UnavailabilitiesDeleted.md +6 -0
  42. data/docs/UnavailabilitiesIndex.md +6 -0
  43. data/docs/Unavailability.md +10 -0
  44. data/docs/User.md +19 -0
  45. data/docs/UsersApi.md +27 -41
  46. data/docs/UsersUpdated.md +6 -0
  47. data/docs/Webhook.md +9 -0
  48. data/get_around_owner-1.0.0.gem +0 -0
  49. data/get_around_owner-1.0.1.gem +0 -0
  50. data/get_around_owner.gemspec +16 -3
  51. data/getaround-api.gemspec +38 -0
  52. data/git_push.sh +9 -11
  53. data/lib/{get_around_owner → getaround-api}/api/cars_api.rb +25 -41
  54. data/lib/getaround-api/api/checkins_api.rb +146 -0
  55. data/lib/getaround-api/api/checkouts_api.rb +146 -0
  56. data/lib/{get_around_owner → getaround-api}/api/invoices_api.rb +43 -66
  57. data/lib/getaround-api/api/messages_api.rb +198 -0
  58. data/lib/{get_around_owner → getaround-api}/api/payouts_api.rb +29 -45
  59. data/lib/getaround-api/api/rentals_api.rb +146 -0
  60. data/lib/getaround-api/api/unavailabilities_api.rb +208 -0
  61. data/lib/{get_around_owner/api/messages_api.rb → getaround-api/api/users_api.rb} +31 -37
  62. data/lib/{get_around_owner → getaround-api}/api_client.rb +71 -77
  63. data/lib/{get_around_owner → getaround-api}/api_error.rb +5 -6
  64. data/lib/{get_around_owner → getaround-api}/configuration.rb +13 -106
  65. data/lib/{get_around_owner/models/getaround_car.rb → getaround-api/models/car.rb} +36 -56
  66. data/lib/{get_around_owner/models/getaround_users_updated_all_of_data.rb → getaround-api/models/car_id.rb} +33 -50
  67. data/lib/{get_around_owner/models/getaround_destroy_unavailability_request.rb → getaround-api/models/car_id_unavailabilities_json_body.rb} +45 -47
  68. data/lib/{get_around_owner/models/getaround_rentals_booked_all_of_data.rb → getaround-api/models/cars_index.rb} +33 -50
  69. data/lib/{get_around_owner/models/getaround_checkin.rb → getaround-api/models/checkin.rb} +34 -65
  70. data/lib/{get_around_owner/models/getaround_rentals_index_inner.rb → getaround-api/models/checkins_index.rb} +32 -58
  71. data/lib/{get_around_owner/models/getaround_checkout.rb → getaround-api/models/checkout.rb} +35 -70
  72. data/lib/getaround-api/models/checkouts_index.rb +197 -0
  73. data/lib/getaround-api/models/ends_at.rb +198 -0
  74. data/lib/{get_around_owner/models/getaround_invoice.rb → getaround-api/models/invoice.rb} +45 -113
  75. data/lib/getaround-api/models/invoices_index.rb +198 -0
  76. data/lib/{get_around_owner/models/getaround_message.rb → getaround-api/models/message.rb} +35 -53
  77. data/lib/getaround-api/models/messages_sent.rb +197 -0
  78. data/lib/{get_around_owner/models/getaround_payout.rb → getaround-api/models/payout.rb} +37 -101
  79. data/lib/getaround-api/models/payouts_index.rb +198 -0
  80. data/lib/{get_around_owner/models/getaround_rental.rb → getaround-api/models/rental.rb} +38 -100
  81. data/lib/{get_around_owner/models/getaround_create_messages_request.rb → getaround-api/models/rental_id_messages_json_body.rb} +31 -41
  82. data/lib/getaround-api/models/rental_invoices_index.rb +198 -0
  83. data/lib/getaround-api/models/rental_messages_index.rb +198 -0
  84. data/lib/getaround-api/models/rentals_booked.rb +197 -0
  85. data/lib/getaround-api/models/rentals_canceled.rb +197 -0
  86. data/lib/getaround-api/models/rentals_car_checked_in.rb +197 -0
  87. data/lib/getaround-api/models/rentals_car_checked_out.rb +197 -0
  88. data/lib/getaround-api/models/rentals_car_switched.rb +197 -0
  89. data/lib/getaround-api/models/rentals_index.rb +198 -0
  90. data/lib/getaround-api/models/rentals_times_changed.rb +197 -0
  91. data/lib/getaround-api/models/starts_at.rb +198 -0
  92. data/lib/{get_around_owner/models/getaround_cars_index_inner.rb → getaround-api/models/unavailabilities_created.rb} +32 -58
  93. data/lib/getaround-api/models/unavailabilities_deleted.rb +197 -0
  94. data/lib/getaround-api/models/unavailabilities_index.rb +198 -0
  95. data/lib/{get_around_owner/models/getaround_unavailabilities_created_all_of_data.rb → getaround-api/models/unavailability.rb} +51 -65
  96. data/lib/{get_around_owner/models/getaround_user.rb → getaround-api/models/user.rb} +43 -75
  97. data/lib/getaround-api/models/users_updated.rb +197 -0
  98. data/lib/{get_around_owner/models/getaround_webhook.rb → getaround-api/models/webhook.rb} +38 -47
  99. data/lib/{get_around_owner → getaround-api}/version.rb +5 -6
  100. data/lib/getaround-api.rb +81 -0
  101. data/openapi.yml +2298 -0
  102. data/spec/api/cars_api_spec.rb +13 -14
  103. data/spec/api/checkins_api_spec.rb +13 -14
  104. data/spec/api/checkouts_api_spec.rb +13 -14
  105. data/spec/api/invoices_api_spec.rb +19 -20
  106. data/spec/api/messages_api_spec.rb +14 -15
  107. data/spec/api/payouts_api_spec.rb +13 -14
  108. data/spec/api/rentals_api_spec.rb +13 -14
  109. data/spec/api/unavailabilities_api_spec.rb +14 -16
  110. data/spec/api/users_api_spec.rb +9 -10
  111. data/spec/api_client_spec.rb +225 -0
  112. data/spec/base_object_spec.rb +109 -0
  113. data/spec/{models/getaround_checkins_index_inner_spec.rb → configuration_spec.rb} +26 -21
  114. data/spec/models/{getaround_reason_spec.rb → car_id_spec.rb} +18 -14
  115. data/spec/models/{getaround_unavailabilities_deleted_all_of_data_spec.rb → car_id_unavailabilities_json_body_spec.rb} +24 -20
  116. data/spec/models/{getaround_car_spec.rb → car_spec.rb} +24 -20
  117. data/spec/models/cars_index_spec.rb +34 -0
  118. data/spec/models/{getaround_checkin_spec.rb → checkin_spec.rb} +22 -18
  119. data/spec/models/checkins_index_spec.rb +34 -0
  120. data/spec/models/{getaround_checkout_spec.rb → checkout_spec.rb} +23 -19
  121. data/spec/models/checkouts_index_spec.rb +34 -0
  122. data/spec/models/ends_at_spec.rb +34 -0
  123. data/spec/models/{getaround_invoice_spec.rb → invoice_spec.rb} +27 -31
  124. data/spec/models/invoices_index_spec.rb +34 -0
  125. data/spec/models/{getaround_message_spec.rb → message_spec.rb} +23 -19
  126. data/spec/models/messages_sent_spec.rb +34 -0
  127. data/spec/models/{getaround_payout_spec.rb → payout_spec.rb} +24 -24
  128. data/spec/models/payouts_index_spec.rb +34 -0
  129. data/spec/models/{getaround_create_messages_request_spec.rb → rental_id_messages_json_body_spec.rb} +19 -15
  130. data/spec/models/{getaround_rentals_index_inner_spec.rb → rental_invoices_index_spec.rb} +16 -18
  131. data/spec/models/rental_messages_index_spec.rb +34 -0
  132. data/spec/models/{getaround_rental_spec.rb → rental_spec.rb} +26 -22
  133. data/spec/models/rentals_booked_spec.rb +34 -0
  134. data/spec/models/rentals_canceled_spec.rb +34 -0
  135. data/spec/models/rentals_car_checked_in_spec.rb +34 -0
  136. data/spec/models/rentals_car_checked_out_spec.rb +34 -0
  137. data/spec/models/rentals_car_switched_spec.rb +34 -0
  138. data/spec/models/rentals_index_spec.rb +34 -0
  139. data/spec/models/rentals_times_changed_spec.rb +34 -0
  140. data/spec/models/starts_at_spec.rb +34 -0
  141. data/spec/models/{getaround_cars_index_inner_spec.rb → unavailabilities_created_spec.rb} +16 -18
  142. data/spec/models/{getaround_payouts_index_inner_spec.rb → unavailabilities_deleted_spec.rb} +16 -18
  143. data/spec/models/unavailabilities_index_spec.rb +34 -0
  144. data/spec/models/{getaround_unavailabilities_created_all_of_data_spec.rb → unavailability_spec.rb} +22 -18
  145. data/spec/models/{getaround_user_spec.rb → user_spec.rb} +31 -27
  146. data/spec/models/users_updated_spec.rb +34 -0
  147. data/spec/models/{getaround_webhook_spec.rb → webhook_spec.rb} +21 -17
  148. data/spec/spec_helper.rb +5 -6
  149. metadata +237 -132
  150. data/lib/get_around_owner/api/checkins_api.rb +0 -82
  151. data/lib/get_around_owner/api/checkouts_api.rb +0 -82
  152. data/lib/get_around_owner/api/rentals_api.rb +0 -262
  153. data/lib/get_around_owner/api/unavailabilities_api.rb +0 -142
  154. data/lib/get_around_owner/api/users_api.rb +0 -82
  155. data/lib/get_around_owner/models/getaround_checkins_index_inner.rb +0 -222
  156. data/lib/get_around_owner/models/getaround_create_unavailabilities_request.rb +0 -283
  157. data/lib/get_around_owner/models/getaround_invoice_charges_inner.rb +0 -225
  158. data/lib/get_around_owner/models/getaround_invoices_index_inner.rb +0 -223
  159. data/lib/get_around_owner/models/getaround_messages_sent.rb +0 -257
  160. data/lib/get_around_owner/models/getaround_messages_sent_all_of_data.rb +0 -225
  161. data/lib/get_around_owner/models/getaround_payout_invoices_inner.rb +0 -223
  162. data/lib/get_around_owner/models/getaround_payouts_index_inner.rb +0 -223
  163. data/lib/get_around_owner/models/getaround_reason.rb +0 -45
  164. data/lib/get_around_owner/models/getaround_rental_invoices_index_inner.rb +0 -223
  165. data/lib/get_around_owner/models/getaround_rental_messages_index_inner.rb +0 -223
  166. data/lib/get_around_owner/models/getaround_rentals_booked.rb +0 -257
  167. data/lib/get_around_owner/models/getaround_rentals_canceled.rb +0 -257
  168. data/lib/get_around_owner/models/getaround_rentals_car_checked_in.rb +0 -257
  169. data/lib/get_around_owner/models/getaround_rentals_car_checked_out.rb +0 -257
  170. data/lib/get_around_owner/models/getaround_rentals_car_switched.rb +0 -257
  171. data/lib/get_around_owner/models/getaround_rentals_times_changed.rb +0 -257
  172. data/lib/get_around_owner/models/getaround_unavailabilities_created.rb +0 -257
  173. data/lib/get_around_owner/models/getaround_unavailabilities_deleted.rb +0 -257
  174. data/lib/get_around_owner/models/getaround_unavailabilities_deleted_all_of_data.rb +0 -235
  175. data/lib/get_around_owner/models/getaround_unavailability.rb +0 -302
  176. data/lib/get_around_owner/models/getaround_users_updated.rb +0 -257
  177. data/lib/get_around_owner.rb +0 -86
  178. data/spec/models/getaround_create_unavailabilities_request_spec.rb +0 -52
  179. data/spec/models/getaround_destroy_unavailability_request_spec.rb +0 -42
  180. data/spec/models/getaround_invoice_charges_inner_spec.rb +0 -42
  181. data/spec/models/getaround_invoices_index_inner_spec.rb +0 -36
  182. data/spec/models/getaround_messages_sent_all_of_data_spec.rb +0 -42
  183. data/spec/models/getaround_messages_sent_spec.rb +0 -48
  184. data/spec/models/getaround_payout_invoices_inner_spec.rb +0 -36
  185. data/spec/models/getaround_rental_invoices_index_inner_spec.rb +0 -36
  186. data/spec/models/getaround_rental_messages_index_inner_spec.rb +0 -36
  187. data/spec/models/getaround_rentals_booked_all_of_data_spec.rb +0 -36
  188. data/spec/models/getaround_rentals_booked_spec.rb +0 -48
  189. data/spec/models/getaround_rentals_canceled_spec.rb +0 -48
  190. data/spec/models/getaround_rentals_car_checked_in_spec.rb +0 -48
  191. data/spec/models/getaround_rentals_car_checked_out_spec.rb +0 -48
  192. data/spec/models/getaround_rentals_car_switched_spec.rb +0 -48
  193. data/spec/models/getaround_rentals_times_changed_spec.rb +0 -48
  194. data/spec/models/getaround_unavailabilities_created_spec.rb +0 -48
  195. data/spec/models/getaround_unavailabilities_deleted_spec.rb +0 -48
  196. data/spec/models/getaround_unavailability_spec.rb +0 -58
  197. data/spec/models/getaround_users_updated_all_of_data_spec.rb +0 -36
  198. data/spec/models/getaround_users_updated_spec.rb +0 -48
data/docs/CarId.md ADDED
@@ -0,0 +1,6 @@
1
+ # GetAroundOwner::CarId
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
@@ -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
- | 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 |
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
- ## get_car_by_id
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
- ### Examples
20
-
17
+ ### Example
21
18
  ```ruby
22
- require 'time'
23
- require 'get_around_owner'
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 = '1' # String | ID of car to return
26
+ id = GetAroundOwner::null.new # | ID of car to return
27
+
32
28
 
33
29
  begin
34
- # Find a car by ID
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 "Error when calling CarsApi->get_car_by_id: #{e}"
39
- end
40
- ```
41
-
42
- #### Using the get_car_by_id_with_http_info variant
43
-
44
- This returns an Array which contains the response data, status code and headers.
45
-
46
- > <Array(<GetaroundCar>, Integer, Hash)> get_car_by_id_with_http_info(id)
47
-
48
- ```ruby
49
- begin
50
- # Find a car by ID
51
- data, status_code, headers = api_instance.get_car_by_id_with_http_info(id)
52
- p status_code # => 2xx
53
- p headers # => { ... }
54
- p data # => <GetaroundCar>
55
- rescue GetAroundOwner::ApiError => e
56
- puts "Error when calling CarsApi->get_car_by_id_with_http_info: #{e}"
34
+ puts "Exception when calling CarsApi->get_car_by_id: #{e}"
57
35
  end
58
36
  ```
59
37
 
60
38
  ### Parameters
61
39
 
62
- | Name | Type | Description | Notes |
63
- | ---- | ---- | ----------- | ----- |
64
- | **id** | **String** | ID of car to return | |
40
+ Name | Type | Description | Notes
41
+ ------------- | ------------- | ------------- | -------------
42
+ **id** | [****](.md)| ID of car to return |
65
43
 
66
44
  ### Return type
67
45
 
68
- [**GetaroundCar**](GetaroundCar.md)
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
- > <Array<GetaroundCarsIndexInner>> get_cars(opts)
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
- ### Examples
89
-
66
+ ### Example
90
67
  ```ruby
91
- require 'time'
92
- require 'get_around_owner'
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: 'page_example', # String | Page number
102
- per_page: 'per_page_example' # String | Page size
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
- # Find all cars
81
+ #Find all cars
107
82
  result = api_instance.get_cars(opts)
108
83
  p result
109
84
  rescue GetAroundOwner::ApiError => e
110
- puts "Error when calling CarsApi->get_cars: #{e}"
111
- end
112
- ```
113
-
114
- #### Using the get_cars_with_http_info variant
115
-
116
- This returns an Array which contains the response data, status code and headers.
117
-
118
- > <Array(<Array<GetaroundCarsIndexInner>>, Integer, Hash)> get_cars_with_http_info(opts)
119
-
120
- ```ruby
121
- begin
122
- # Find all cars
123
- data, status_code, headers = api_instance.get_cars_with_http_info(opts)
124
- p status_code # => 2xx
125
- p headers # => { ... }
126
- p data # => <Array<GetaroundCarsIndexInner>>
127
- rescue GetAroundOwner::ApiError => e
128
- puts "Error when calling CarsApi->get_cars_with_http_info: #{e}"
85
+ puts "Exception when calling CarsApi->get_cars: #{e}"
129
86
  end
130
87
  ```
131
88
 
132
89
  ### Parameters
133
90
 
134
- | Name | Type | Description | Notes |
135
- | ---- | ---- | ----------- | ----- |
136
- | **page** | **String** | Page number | [optional] |
137
- | **per_page** | **String** | Page size | [optional][default to &#39;30&#39;] |
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
- [**Array&lt;GetaroundCarsIndexInner&gt;**](GetaroundCarsIndexInner.md)
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
@@ -0,0 +1,6 @@
1
+ # GetAroundOwner::CarsIndex
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
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&#x27;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&#x27;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
- | Method | HTTP request | Description |
6
- | ------ | ------------ | ----------- |
7
- | [**car_checked_in_rental_post**](CheckinsApi.md#car_checked_in_rental_post) | **POST** /carCheckedInRental | Rental started for one of your cars |
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
- ## car_checked_in_rental_post
13
+ Find a checkin by rental ID
11
14
 
12
- > car_checked_in_rental_post(opts)
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
- require 'time'
20
- require 'get_around_owner'
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
- opts = {
24
- getaround_rentals_car_checked_in: # GetaroundRentalsCarCheckedIn | This event is triggered when a rental starts and the car has been unlocked
25
- }
26
+ rental_id = GetAroundOwner::null.new # | ID of the rental related to the checkin to return
27
+
26
28
 
27
29
  begin
28
- # Rental started for one of your cars
29
- api_instance.car_checked_in_rental_post(opts)
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 "Error when calling CheckinsApi->car_checked_in_rental_post: #{e}"
34
+ puts "Exception when calling CheckinsApi->get_checkin_by_rental_id: #{e}"
32
35
  end
33
36
  ```
34
37
 
35
- #### Using the car_checked_in_rental_post_with_http_info variant
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
- > <Array(nil, Integer, Hash)> car_checked_in_rental_post_with_http_info(opts)
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
- # Rental started for one of your cars
44
- data, status_code, headers = api_instance.car_checked_in_rental_post_with_http_info(opts)
45
- p status_code # => 2xx
46
- p headers # => { ... }
47
- p data # => nil
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 "Error when calling CheckinsApi->car_checked_in_rental_post_with_http_info: #{e}"
87
+ puts "Exception when calling CheckinsApi->get_checkins: #{e}"
50
88
  end
51
89
  ```
52
90
 
53
91
  ### Parameters
54
92
 
55
- | Name | Type | Description | Notes |
56
- | ---- | ---- | ----------- | ----- |
57
- | **getaround_rentals_car_checked_in** | [**GetaroundRentalsCarCheckedIn**](GetaroundRentalsCarCheckedIn.md) | This event is triggered when a rental starts and the car has been unlocked | [optional] |
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
- nil (empty response body)
102
+ [**CheckinsIndex**](CheckinsIndex.md)
62
103
 
63
104
  ### Authorization
64
105
 
65
- No authorization required
106
+ [bearerAuth](../README.md#bearerAuth)
66
107
 
67
108
  ### HTTP request headers
68
109
 
69
- - **Content-Type**: application/json
70
- - **Accept**: Not defined
110
+ - **Content-Type**: Not defined
111
+ - **Accept**: application/json
112
+
113
+
71
114
 
@@ -0,0 +1,6 @@
1
+ # GetAroundOwner::CheckinsIndex
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
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&#x27;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&#x27;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
- | Method | HTTP request | Description |
6
- | ------ | ------------ | ----------- |
7
- | [**car_checked_out_rental_post**](CheckoutsApi.md#car_checked_out_rental_post) | **POST** /carCheckedOutRental | Rental ended for one of your cars |
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
- ## car_checked_out_rental_post
13
+ Find a checkout by rental ID
11
14
 
12
- > car_checked_out_rental_post(opts)
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
- require 'time'
20
- require 'get_around_owner'
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
- opts = {
24
- getaround_rentals_car_checked_out: # GetaroundRentalsCarCheckedOut | This event is triggered when a rental ends and the car has been locked
25
- }
26
+ rental_id = GetAroundOwner::null.new # | ID of the rental related to the checkout to return
27
+
26
28
 
27
29
  begin
28
- # Rental ended for one of your cars
29
- api_instance.car_checked_out_rental_post(opts)
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 "Error when calling CheckoutsApi->car_checked_out_rental_post: #{e}"
34
+ puts "Exception when calling CheckoutsApi->get_checkout_by_rental_id: #{e}"
32
35
  end
33
36
  ```
34
37
 
35
- #### Using the car_checked_out_rental_post_with_http_info variant
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
- > <Array(nil, Integer, Hash)> car_checked_out_rental_post_with_http_info(opts)
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
- # Rental ended for one of your cars
44
- data, status_code, headers = api_instance.car_checked_out_rental_post_with_http_info(opts)
45
- p status_code # => 2xx
46
- p headers # => { ... }
47
- p data # => nil
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 "Error when calling CheckoutsApi->car_checked_out_rental_post_with_http_info: #{e}"
87
+ puts "Exception when calling CheckoutsApi->get_checkouts: #{e}"
50
88
  end
51
89
  ```
52
90
 
53
91
  ### Parameters
54
92
 
55
- | Name | Type | Description | Notes |
56
- | ---- | ---- | ----------- | ----- |
57
- | **getaround_rentals_car_checked_out** | [**GetaroundRentalsCarCheckedOut**](GetaroundRentalsCarCheckedOut.md) | This event is triggered when a rental ends and the car has been locked | [optional] |
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
- nil (empty response body)
102
+ [**CheckoutsIndex**](CheckoutsIndex.md)
62
103
 
63
104
  ### Authorization
64
105
 
65
- No authorization required
106
+ [bearerAuth](../README.md#bearerAuth)
66
107
 
67
108
  ### HTTP request headers
68
109
 
69
- - **Content-Type**: application/json
70
- - **Accept**: Not defined
110
+ - **Content-Type**: Not defined
111
+ - **Accept**: application/json
112
+
113
+
71
114
 
@@ -0,0 +1,6 @@
1
+ # GetAroundOwner::CheckoutsIndex
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
data/docs/EndsAt.md ADDED
@@ -0,0 +1,6 @@
1
+ # GetAroundOwner::EndsAt
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
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 &#x27;links&#x27; variable will not be present if there is no uploaded invoice yet. This could happen if the job to generate &amp; 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
+