doorflow 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +222 -316
  4. data/bin/post-generate +3 -1
  5. data/doorflow.gemspec +1 -1
  6. data/lib/doorflow/client/credentials_proxy.rb +6 -9
  7. data/lib/doorflow/client/element_sessions_proxy.rb +91 -0
  8. data/lib/doorflow/client.rb +13 -0
  9. data/lib/doorflow/errors/doorflow_error.rb +1 -1
  10. data/lib/doorflow/resources/credential.rb +4 -3
  11. data/lib/doorflow/resources/element_session.rb +28 -0
  12. data/lib/doorflow/webhooks/handler.rb +6 -6
  13. data/lib/doorflow/webhooks/signature_verifier.rb +8 -5
  14. data/lib/doorflow-api/api/accounts_api.rb +1 -1
  15. data/lib/doorflow-api/api/admission_requests_api.rb +2 -2
  16. data/lib/doorflow-api/api/card_designs_api.rb +347 -0
  17. data/lib/doorflow-api/api/card_template_types_api.rb +350 -0
  18. data/lib/doorflow-api/api/card_templates_api.rb +811 -0
  19. data/lib/doorflow-api/api/channels_api.rb +11 -11
  20. data/lib/doorflow-api/api/credential_types_api.rb +1 -1
  21. data/lib/doorflow-api/api/credentials_api.rb +6 -6
  22. data/lib/doorflow-api/api/element_sessions_api.rb +90 -0
  23. data/lib/doorflow-api/api/events_api.rb +2 -2
  24. data/lib/doorflow-api/api/group_reservations_api.rb +68 -5
  25. data/lib/doorflow-api/api/groups_api.rb +1 -1
  26. data/lib/doorflow-api/api/notification_rules_api.rb +7 -7
  27. data/lib/doorflow-api/api/oauth_api.rb +1 -1
  28. data/lib/doorflow-api/api/people_api.rb +7 -7
  29. data/lib/doorflow-api/api/reservations_api.rb +5 -5
  30. data/lib/doorflow-api/api/roles_api.rb +1 -1
  31. data/lib/doorflow-api/api/sites_api.rb +1 -1
  32. data/lib/doorflow-api/api/sync_api.rb +4 -4
  33. data/lib/doorflow-api/api_client.rb +8 -4
  34. data/lib/doorflow-api/api_error.rb +9 -14
  35. data/lib/doorflow-api/api_model_base.rb +1 -1
  36. data/lib/doorflow-api/configuration.rb +1 -1
  37. data/lib/doorflow-api/models/account.rb +1 -1
  38. data/lib/doorflow-api/models/account_passport.rb +1 -1
  39. data/lib/doorflow-api/models/account_reseller.rb +1 -1
  40. data/lib/doorflow-api/models/account_sync.rb +1 -1
  41. data/lib/doorflow-api/models/account_user.rb +1 -1
  42. data/lib/doorflow-api/models/admission_request.rb +1 -1
  43. data/lib/doorflow-api/models/admission_request_door_controller.rb +1 -1
  44. data/lib/doorflow-api/models/admission_request_person.rb +1 -1
  45. data/lib/doorflow-api/models/admit_channel202_response.rb +1 -1
  46. data/lib/doorflow-api/models/admit_person202_response.rb +1 -1
  47. data/lib/doorflow-api/models/admit_person403_response.rb +1 -1
  48. data/lib/doorflow-api/models/admit_person_request.rb +1 -1
  49. data/lib/doorflow-api/models/auto_unlock_channel400_response.rb +1 -1
  50. data/lib/doorflow-api/models/auto_unlock_channel_request.rb +1 -1
  51. data/lib/doorflow-api/models/card_design.rb +243 -0
  52. data/lib/doorflow-api/models/card_design_image_back.rb +179 -0
  53. data/lib/doorflow-api/models/card_design_image_front.rb +179 -0
  54. data/lib/doorflow-api/models/card_design_input.rb +181 -0
  55. data/lib/doorflow-api/models/card_template.rb +475 -0
  56. data/lib/doorflow-api/models/card_template_input.rb +147 -0
  57. data/lib/doorflow-api/models/card_template_input_card_template.rb +347 -0
  58. data/lib/doorflow-api/models/card_template_type.rb +321 -0
  59. data/lib/doorflow-api/models/card_template_type_input.rb +147 -0
  60. data/lib/doorflow-api/models/card_template_type_input_card_template_type.rb +251 -0
  61. data/lib/doorflow-api/models/card_template_type_input_card_template_type_non_printable_zones_inner.rb +183 -0
  62. data/lib/doorflow-api/models/card_template_type_non_printable_zones_inner.rb +188 -0
  63. data/lib/doorflow-api/models/channel.rb +1 -1
  64. data/lib/doorflow-api/models/channel_auto_unlock.rb +1 -1
  65. data/lib/doorflow-api/models/channel_lockdown.rb +1 -1
  66. data/lib/doorflow-api/models/channel_lockdown_aux_lockdown.rb +1 -1
  67. data/lib/doorflow-api/models/channel_lockdown_card_lockdown.rb +1 -1
  68. data/lib/doorflow-api/models/channel_lockdown_rex_lockdown.rb +1 -1
  69. data/lib/doorflow-api/models/channel_mode.rb +1 -1
  70. data/lib/doorflow-api/models/channel_sync.rb +5 -2
  71. data/lib/doorflow-api/models/{create_credential422_response.rb → create_card_design422_response.rb} +5 -5
  72. data/lib/doorflow-api/models/{create_credential422_response_errors.rb → create_card_design422_response_errors.rb} +4 -4
  73. data/lib/doorflow-api/models/credential.rb +4 -4
  74. data/lib/doorflow-api/models/credential_input.rb +1 -1
  75. data/lib/doorflow-api/models/credential_input_person_credential.rb +1 -1
  76. data/lib/doorflow-api/models/credential_type.rb +1 -1
  77. data/lib/doorflow-api/models/credential_update_input.rb +1 -1
  78. data/lib/doorflow-api/models/credential_update_input_person_credential.rb +1 -1
  79. data/lib/doorflow-api/models/{delete_group_reservation200_response.rb → delete_card_design200_response.rb} +4 -4
  80. data/lib/doorflow-api/models/delete_card_template_type409_response.rb +147 -0
  81. data/lib/doorflow-api/models/element_session.rb +192 -0
  82. data/lib/doorflow-api/models/element_session_config.rb +265 -0
  83. data/lib/doorflow-api/models/element_session_error.rb +199 -0
  84. data/lib/doorflow-api/models/element_session_input.rb +271 -0
  85. data/lib/doorflow-api/models/element_session_member.rb +186 -0
  86. data/lib/doorflow-api/models/error.rb +1 -1
  87. data/lib/doorflow-api/models/event.rb +1 -1
  88. data/lib/doorflow-api/models/get_access_token200_response.rb +1 -1
  89. data/lib/doorflow-api/models/get_access_token400_response.rb +1 -1
  90. data/lib/doorflow-api/models/get_access_token401_response.rb +1 -1
  91. data/lib/doorflow-api/models/get_admission_request401_response.rb +1 -1
  92. data/lib/doorflow-api/models/get_admission_request403_response.rb +1 -1
  93. data/lib/doorflow-api/models/get_admission_request404_response.rb +1 -1
  94. data/lib/doorflow-api/models/get_admission_request500_response.rb +1 -1
  95. data/lib/doorflow-api/models/get_token_info200_response.rb +1 -1
  96. data/lib/doorflow-api/models/get_token_info200_response_application.rb +1 -1
  97. data/lib/doorflow-api/models/get_token_info401_response.rb +1 -1
  98. data/lib/doorflow-api/models/group.rb +1 -1
  99. data/lib/doorflow-api/models/group_reservation.rb +1 -1
  100. data/lib/doorflow-api/models/group_reservation_input.rb +1 -1
  101. data/lib/doorflow-api/models/group_reservation_input_group_reservation.rb +1 -1
  102. data/lib/doorflow-api/models/initiate_sync429_response.rb +1 -1
  103. data/lib/doorflow-api/models/linked_file.rb +217 -0
  104. data/lib/doorflow-api/models/list_events400_response.rb +1 -1
  105. data/lib/doorflow-api/models/lockdown_channel_request.rb +1 -1
  106. data/lib/doorflow-api/models/notification_rule.rb +1 -1
  107. data/lib/doorflow-api/models/notification_rule_actions_inner.rb +1 -1
  108. data/lib/doorflow-api/models/notification_rule_conditions_inner.rb +1 -1
  109. data/lib/doorflow-api/models/notification_rule_events_inner.rb +1 -1
  110. data/lib/doorflow-api/models/notification_rule_input.rb +1 -1
  111. data/lib/doorflow-api/models/person.rb +30 -8
  112. data/lib/doorflow-api/models/person_input.rb +1 -1
  113. data/lib/doorflow-api/models/reservation.rb +1 -1
  114. data/lib/doorflow-api/models/reservation_input.rb +1 -1
  115. data/lib/doorflow-api/models/revoke_token403_response.rb +1 -1
  116. data/lib/doorflow-api/models/role.rb +1 -1
  117. data/lib/doorflow-api/models/site.rb +1 -1
  118. data/lib/doorflow-api/models/site_site_ips_inner.rb +1 -1
  119. data/lib/doorflow-api/models/unlock_channel_request.rb +1 -1
  120. data/lib/doorflow-api/version.rb +2 -2
  121. data/lib/doorflow-api.rb +28 -9
  122. data/lib/doorflow.rb +8 -2
  123. metadata +45 -154
  124. data/spec/api/admission_requests_api_spec.rb +0 -47
  125. data/spec/api/channels_api_spec.rb +0 -174
  126. data/spec/api/credential_types_api_spec.rb +0 -49
  127. data/spec/api/group_reservations_api_spec.rb +0 -75
  128. data/spec/api/oauth_api_spec.rb +0 -97
  129. data/spec/doorflow/client_spec.rb +0 -109
  130. data/spec/doorflow_spec.rb +0 -22
  131. data/spec/fixtures/vcr_cassettes/channel/list.yml +0 -70
  132. data/spec/fixtures/vcr_cassettes/channel/retrieve.yml +0 -131
  133. data/spec/fixtures/vcr_cassettes/person/auto_pagination.yml +0 -87
  134. data/spec/fixtures/vcr_cassettes/person/create.yml +0 -64
  135. data/spec/fixtures/vcr_cassettes/person/delete.yml +0 -125
  136. data/spec/fixtures/vcr_cassettes/person/list.yml +0 -90
  137. data/spec/fixtures/vcr_cassettes/person/not_found.yml +0 -62
  138. data/spec/fixtures/vcr_cassettes/person/retrieve.yml +0 -136
  139. data/spec/fixtures/vcr_cassettes/person/update.yml +0 -260
  140. data/spec/fixtures/vcr_cassettes/person/validation_error.yml +0 -62
  141. data/spec/integration/channel_spec.rb +0 -88
  142. data/spec/integration/person_spec.rb +0 -99
  143. data/spec/models/account_passport_spec.rb +0 -42
  144. data/spec/models/account_reseller_spec.rb +0 -60
  145. data/spec/models/account_sync_spec.rb +0 -52
  146. data/spec/models/account_user_spec.rb +0 -54
  147. data/spec/models/admission_request_door_controller_spec.rb +0 -42
  148. data/spec/models/admission_request_person_spec.rb +0 -42
  149. data/spec/models/admission_request_spec.rb +0 -82
  150. data/spec/models/admit_channel202_response_spec.rb +0 -46
  151. data/spec/models/admit_person202_response_spec.rb +0 -46
  152. data/spec/models/admit_person403_response_spec.rb +0 -42
  153. data/spec/models/admit_person_request_spec.rb +0 -36
  154. data/spec/models/auto_unlock_channel400_response_spec.rb +0 -42
  155. data/spec/models/auto_unlock_channel_request_spec.rb +0 -36
  156. data/spec/models/channel_auto_unlock_spec.rb +0 -42
  157. data/spec/models/channel_lockdown_aux_lockdown_spec.rb +0 -36
  158. data/spec/models/channel_lockdown_card_lockdown_spec.rb +0 -36
  159. data/spec/models/channel_lockdown_rex_lockdown_spec.rb +0 -36
  160. data/spec/models/channel_lockdown_spec.rb +0 -54
  161. data/spec/models/channel_mode_spec.rb +0 -52
  162. data/spec/models/channel_sync_spec.rb +0 -46
  163. data/spec/models/create_credential422_response_errors_spec.rb +0 -48
  164. data/spec/models/create_credential422_response_spec.rb +0 -42
  165. data/spec/models/credential_input_person_credential_spec.rb +0 -48
  166. data/spec/models/credential_input_spec.rb +0 -36
  167. data/spec/models/credential_spec.rb +0 -86
  168. data/spec/models/credential_update_input_person_credential_spec.rb +0 -36
  169. data/spec/models/credential_update_input_spec.rb +0 -36
  170. data/spec/models/delete_group_reservation200_response_spec.rb +0 -36
  171. data/spec/models/error_spec.rb +0 -42
  172. data/spec/models/get_access_token200_response_spec.rb +0 -66
  173. data/spec/models/get_access_token400_response_spec.rb +0 -46
  174. data/spec/models/get_access_token401_response_spec.rb +0 -42
  175. data/spec/models/get_admission_request401_response_spec.rb +0 -42
  176. data/spec/models/get_admission_request403_response_spec.rb +0 -42
  177. data/spec/models/get_admission_request404_response_spec.rb +0 -42
  178. data/spec/models/get_admission_request500_response_spec.rb +0 -42
  179. data/spec/models/get_token_info200_response_application_spec.rb +0 -36
  180. data/spec/models/get_token_info200_response_spec.rb +0 -66
  181. data/spec/models/get_token_info401_response_spec.rb +0 -42
  182. data/spec/models/group_reservation_input_group_reservation_spec.rb +0 -54
  183. data/spec/models/group_reservation_input_spec.rb +0 -36
  184. data/spec/models/group_reservation_spec.rb +0 -82
  185. data/spec/models/initiate_sync429_response_spec.rb +0 -52
  186. data/spec/models/list_events400_response_spec.rb +0 -42
  187. data/spec/models/lockdown_channel_request_spec.rb +0 -48
  188. data/spec/models/notification_rule_actions_inner_spec.rb +0 -48
  189. data/spec/models/notification_rule_conditions_inner_spec.rb +0 -48
  190. data/spec/models/notification_rule_events_inner_spec.rb +0 -42
  191. data/spec/models/notification_rule_input_spec.rb +0 -60
  192. data/spec/models/person_input_spec.rb +0 -180
  193. data/spec/models/reservation_input_spec.rb +0 -60
  194. data/spec/models/revoke_token403_response_spec.rb +0 -42
  195. data/spec/models/site_site_ips_inner_spec.rb +0 -36
  196. data/spec/models/unlock_channel_request_spec.rb +0 -36
  197. data/spec/spec_helper.rb +0 -160
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -43,7 +43,7 @@ module DoorFlow
43
43
  fail ArgumentError, "Missing the required parameter 'id' when calling ChannelsApi.admit_channel"
44
44
  end
45
45
  # resource path
46
- local_var_path = '/api/3/channels/{id}/admit'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
46
+ local_var_path = '/api/3/channels/{id}/admit'.sub('{id}', CGI.escape(id.to_s))
47
47
 
48
48
  # query parameters
49
49
  query_params = opts[:query_params] || {}
@@ -112,7 +112,7 @@ module DoorFlow
112
112
  fail ArgumentError, "Missing the required parameter 'admit_person_request' when calling ChannelsApi.admit_person"
113
113
  end
114
114
  # resource path
115
- local_var_path = '/api/3/channels/{id}/admit_person'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
115
+ local_var_path = '/api/3/channels/{id}/admit_person'.sub('{id}', CGI.escape(id.to_s))
116
116
 
117
117
  # query parameters
118
118
  query_params = opts[:query_params] || {}
@@ -182,7 +182,7 @@ module DoorFlow
182
182
  fail ArgumentError, "Missing the required parameter 'id' when calling ChannelsApi.auto_unlock_channel"
183
183
  end
184
184
  # resource path
185
- local_var_path = '/api/3/channels/{id}/auto_unlock'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
185
+ local_var_path = '/api/3/channels/{id}/auto_unlock'.sub('{id}', CGI.escape(id.to_s))
186
186
 
187
187
  # query parameters
188
188
  query_params = opts[:query_params] || {}
@@ -250,7 +250,7 @@ module DoorFlow
250
250
  fail ArgumentError, "Missing the required parameter 'id' when calling ChannelsApi.get_channel"
251
251
  end
252
252
  # resource path
253
- local_var_path = '/api/3/channels/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
253
+ local_var_path = '/api/3/channels/{id}'.sub('{id}', CGI.escape(id.to_s))
254
254
 
255
255
  # query parameters
256
256
  query_params = opts[:query_params] || {}
@@ -388,7 +388,7 @@ module DoorFlow
388
388
  fail ArgumentError, "Missing the required parameter 'id' when calling ChannelsApi.lockdown_channel"
389
389
  end
390
390
  # resource path
391
- local_var_path = '/api/3/channels/{id}/lockdown'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
391
+ local_var_path = '/api/3/channels/{id}/lockdown'.sub('{id}', CGI.escape(id.to_s))
392
392
 
393
393
  # query parameters
394
394
  query_params = opts[:query_params] || {}
@@ -456,7 +456,7 @@ module DoorFlow
456
456
  fail ArgumentError, "Missing the required parameter 'id' when calling ChannelsApi.normal_channel"
457
457
  end
458
458
  # resource path
459
- local_var_path = '/api/3/channels/{id}/normal'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
459
+ local_var_path = '/api/3/channels/{id}/normal'.sub('{id}', CGI.escape(id.to_s))
460
460
 
461
461
  # query parameters
462
462
  query_params = opts[:query_params] || {}
@@ -519,7 +519,7 @@ module DoorFlow
519
519
  fail ArgumentError, "Missing the required parameter 'id' when calling ChannelsApi.regenerate_encryption_key"
520
520
  end
521
521
  # resource path
522
- local_var_path = '/api/3/channels/{id}/regenerate_encryption_key'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
522
+ local_var_path = '/api/3/channels/{id}/regenerate_encryption_key'.sub('{id}', CGI.escape(id.to_s))
523
523
 
524
524
  # query parameters
525
525
  query_params = opts[:query_params] || {}
@@ -582,7 +582,7 @@ module DoorFlow
582
582
  fail ArgumentError, "Missing the required parameter 'id' when calling ChannelsApi.remove_encryption_key"
583
583
  end
584
584
  # resource path
585
- local_var_path = '/api/3/channels/{id}/remove_encryption_key'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
585
+ local_var_path = '/api/3/channels/{id}/remove_encryption_key'.sub('{id}', CGI.escape(id.to_s))
586
586
 
587
587
  # query parameters
588
588
  query_params = opts[:query_params] || {}
@@ -647,7 +647,7 @@ module DoorFlow
647
647
  fail ArgumentError, "Missing the required parameter 'id' when calling ChannelsApi.unlock_channel"
648
648
  end
649
649
  # resource path
650
- local_var_path = '/api/3/channels/{id}/unlock'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
650
+ local_var_path = '/api/3/channels/{id}/unlock'.sub('{id}', CGI.escape(id.to_s))
651
651
 
652
652
  # query parameters
653
653
  query_params = opts[:query_params] || {}
@@ -715,7 +715,7 @@ module DoorFlow
715
715
  fail ArgumentError, "Missing the required parameter 'id' when calling ChannelsApi.unlockdown_channel"
716
716
  end
717
717
  # resource path
718
- local_var_path = '/api/3/channels/{id}/unlockdown'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
718
+ local_var_path = '/api/3/channels/{id}/unlockdown'.sub('{id}', CGI.escape(id.to_s))
719
719
 
720
720
  # query parameters
721
721
  query_params = opts[:query_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -49,7 +49,7 @@ module DoorFlow
49
49
  fail ArgumentError, "Missing the required parameter 'credential_input' when calling CredentialsApi.create_credential"
50
50
  end
51
51
  # resource path
52
- local_var_path = '/api/3/people/{person_id}/credentials'.sub('{' + 'person_id' + '}', CGI.escape(person_id.to_s))
52
+ local_var_path = '/api/3/people/{person_id}/credentials'.sub('{person_id}', CGI.escape(person_id.to_s))
53
53
 
54
54
  # query parameters
55
55
  query_params = opts[:query_params] || {}
@@ -123,7 +123,7 @@ module DoorFlow
123
123
  fail ArgumentError, "Missing the required parameter 'id' when calling CredentialsApi.delete_credential"
124
124
  end
125
125
  # resource path
126
- local_var_path = '/api/3/people/{person_id}/credentials/{id}'.sub('{' + 'person_id' + '}', CGI.escape(person_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
126
+ local_var_path = '/api/3/people/{person_id}/credentials/{id}'.sub('{person_id}', CGI.escape(person_id.to_s)).sub('{id}', CGI.escape(id.to_s))
127
127
 
128
128
  # query parameters
129
129
  query_params = opts[:query_params] || {}
@@ -196,7 +196,7 @@ module DoorFlow
196
196
  fail ArgumentError, "Missing the required parameter 'id' when calling CredentialsApi.get_credential"
197
197
  end
198
198
  # resource path
199
- local_var_path = '/api/3/people/{person_id}/credentials/{id}'.sub('{' + 'person_id' + '}', CGI.escape(person_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
199
+ local_var_path = '/api/3/people/{person_id}/credentials/{id}'.sub('{person_id}', CGI.escape(person_id.to_s)).sub('{id}', CGI.escape(id.to_s))
200
200
 
201
201
  # query parameters
202
202
  query_params = opts[:query_params] || {}
@@ -333,7 +333,7 @@ module DoorFlow
333
333
  fail ArgumentError, "Missing the required parameter 'person_id' when calling CredentialsApi.list_person_credentials"
334
334
  end
335
335
  # resource path
336
- local_var_path = '/api/3/people/{person_id}/credentials'.sub('{' + 'person_id' + '}', CGI.escape(person_id.to_s))
336
+ local_var_path = '/api/3/people/{person_id}/credentials'.sub('{person_id}', CGI.escape(person_id.to_s))
337
337
 
338
338
  # query parameters
339
339
  query_params = opts[:query_params] || {}
@@ -411,7 +411,7 @@ module DoorFlow
411
411
  fail ArgumentError, "Missing the required parameter 'credential_update_input' when calling CredentialsApi.update_credential"
412
412
  end
413
413
  # resource path
414
- local_var_path = '/api/3/people/{person_id}/credentials/{id}'.sub('{' + 'person_id' + '}', CGI.escape(person_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
414
+ local_var_path = '/api/3/people/{person_id}/credentials/{id}'.sub('{person_id}', CGI.escape(person_id.to_s)).sub('{id}', CGI.escape(id.to_s))
415
415
 
416
416
  # query parameters
417
417
  query_params = opts[:query_params] || {}
@@ -0,0 +1,90 @@
1
+ =begin
2
+ #DoorFlow API
3
+
4
+ #Access control and door management API for DoorFlow
5
+
6
+ The version of the OpenAPI document: 3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module DoorFlow
16
+ class ElementSessionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create an Elements widget session
23
+ # Mints a short-lived JWT session token authorising one Elements widget instance for one identified subject. The token is delivered to the widget shell via the host page or app, then forwarded to DoorFlow. Tokens expire after 15 minutes; long-lived widgets refresh by calling this endpoint again from the host backend. The `member` block is the integrator's CRM-side identity for the person; DoorFlow find-or-creates a `Person` against `external_id` on the authenticated account.
24
+ # @param element_session_input [ElementSessionInput]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [ElementSession]
27
+ def create_element_session(element_session_input, opts = {})
28
+ data, _status_code, _headers = create_element_session_with_http_info(element_session_input, opts)
29
+ data
30
+ end
31
+
32
+ # Create an Elements widget session
33
+ # Mints a short-lived JWT session token authorising one Elements widget instance for one identified subject. The token is delivered to the widget shell via the host page or app, then forwarded to DoorFlow. Tokens expire after 15 minutes; long-lived widgets refresh by calling this endpoint again from the host backend. The `member` block is the integrator's CRM-side identity for the person; DoorFlow find-or-creates a `Person` against `external_id` on the authenticated account.
34
+ # @param element_session_input [ElementSessionInput]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(ElementSession, Integer, Hash)>] ElementSession data, response status code and response headers
37
+ def create_element_session_with_http_info(element_session_input, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ElementSessionsApi.create_element_session ...'
40
+ end
41
+ # verify the required parameter 'element_session_input' is set
42
+ if @api_client.config.client_side_validation && element_session_input.nil?
43
+ fail ArgumentError, "Missing the required parameter 'element_session_input' when calling ElementSessionsApi.create_element_session"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/3/element_sessions'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(element_session_input)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'ElementSession'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"ElementSessionsApi.create_element_session",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: ElementSessionsApi#create_element_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+ end
90
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -47,7 +47,7 @@ module DoorFlow
47
47
  fail ArgumentError, "Missing the required parameter 'id' when calling EventsApi.get_event"
48
48
  end
49
49
  # resource path
50
- local_var_path = '/api/3/events/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
50
+ local_var_path = '/api/3/events/{id}'.sub('{id}', CGI.escape(id.to_s))
51
51
 
52
52
  # query parameters
53
53
  query_params = opts[:query_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -91,7 +91,7 @@ module DoorFlow
91
91
  # Deletes or deactivates a group reservation. If the reservation is pending (not yet started), it will be permanently deleted. If it's already active, it will be deactivated and the person will be removed from the assigned groups.
92
92
  # @param id [Integer] Group reservation ID
93
93
  # @param [Hash] opts the optional parameters
94
- # @return [DeleteGroupReservation200Response]
94
+ # @return [DeleteCardDesign200Response]
95
95
  def delete_group_reservation(id, opts = {})
96
96
  data, _status_code, _headers = delete_group_reservation_with_http_info(id, opts)
97
97
  data
@@ -101,7 +101,7 @@ module DoorFlow
101
101
  # Deletes or deactivates a group reservation. If the reservation is pending (not yet started), it will be permanently deleted. If it&#39;s already active, it will be deactivated and the person will be removed from the assigned groups.
102
102
  # @param id [Integer] Group reservation ID
103
103
  # @param [Hash] opts the optional parameters
104
- # @return [Array<(DeleteGroupReservation200Response, Integer, Hash)>] DeleteGroupReservation200Response data, response status code and response headers
104
+ # @return [Array<(DeleteCardDesign200Response, Integer, Hash)>] DeleteCardDesign200Response data, response status code and response headers
105
105
  def delete_group_reservation_with_http_info(id, opts = {})
106
106
  if @api_client.config.debugging
107
107
  @api_client.config.logger.debug 'Calling API: GroupReservationsApi.delete_group_reservation ...'
@@ -111,7 +111,7 @@ module DoorFlow
111
111
  fail ArgumentError, "Missing the required parameter 'id' when calling GroupReservationsApi.delete_group_reservation"
112
112
  end
113
113
  # resource path
114
- local_var_path = '/api/3/group_reservations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
114
+ local_var_path = '/api/3/group_reservations/{id}'.sub('{id}', CGI.escape(id.to_s))
115
115
 
116
116
  # query parameters
117
117
  query_params = opts[:query_params] || {}
@@ -128,7 +128,7 @@ module DoorFlow
128
128
  post_body = opts[:debug_body]
129
129
 
130
130
  # return_type
131
- return_type = opts[:debug_return_type] || 'DeleteGroupReservation200Response'
131
+ return_type = opts[:debug_return_type] || 'DeleteCardDesign200Response'
132
132
 
133
133
  # auth_names
134
134
  auth_names = opts[:debug_auth_names] || ['OAuth2']
@@ -150,6 +150,69 @@ module DoorFlow
150
150
  return data, status_code, headers
151
151
  end
152
152
 
153
+ # Get group reservation
154
+ # Returns a single group reservation by ID.
155
+ # @param id [Integer] Group reservation ID
156
+ # @param [Hash] opts the optional parameters
157
+ # @return [GroupReservation]
158
+ def get_group_reservation(id, opts = {})
159
+ data, _status_code, _headers = get_group_reservation_with_http_info(id, opts)
160
+ data
161
+ end
162
+
163
+ # Get group reservation
164
+ # Returns a single group reservation by ID.
165
+ # @param id [Integer] Group reservation ID
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [Array<(GroupReservation, Integer, Hash)>] GroupReservation data, response status code and response headers
168
+ def get_group_reservation_with_http_info(id, opts = {})
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug 'Calling API: GroupReservationsApi.get_group_reservation ...'
171
+ end
172
+ # verify the required parameter 'id' is set
173
+ if @api_client.config.client_side_validation && id.nil?
174
+ fail ArgumentError, "Missing the required parameter 'id' when calling GroupReservationsApi.get_group_reservation"
175
+ end
176
+ # resource path
177
+ local_var_path = '/api/3/group_reservations/{id}'.sub('{id}', CGI.escape(id.to_s))
178
+
179
+ # query parameters
180
+ query_params = opts[:query_params] || {}
181
+
182
+ # header parameters
183
+ header_params = opts[:header_params] || {}
184
+ # HTTP header 'Accept' (if needed)
185
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
186
+
187
+ # form parameters
188
+ form_params = opts[:form_params] || {}
189
+
190
+ # http body (model)
191
+ post_body = opts[:debug_body]
192
+
193
+ # return_type
194
+ return_type = opts[:debug_return_type] || 'GroupReservation'
195
+
196
+ # auth_names
197
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
198
+
199
+ new_options = opts.merge(
200
+ :operation => :"GroupReservationsApi.get_group_reservation",
201
+ :header_params => header_params,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body,
205
+ :auth_names => auth_names,
206
+ :return_type => return_type
207
+ )
208
+
209
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug "API called: GroupReservationsApi#get_group_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
212
+ end
213
+ return data, status_code, headers
214
+ end
215
+
153
216
  # List group reservations
154
217
  # Returns a paginated list of present and future group reservations. Group reservations temporarily assign people to groups for a specified time period. Supports incremental sync via `since` or `since_utc` parameters.
155
218
  # @param [Hash] opts the optional parameters
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -91,7 +91,7 @@ module DoorFlow
91
91
  # Deletes a notification rule
92
92
  # @param id [Integer] Notification rule ID
93
93
  # @param [Hash] opts the optional parameters
94
- # @return [DeleteGroupReservation200Response]
94
+ # @return [DeleteCardDesign200Response]
95
95
  def delete_notification_rule(id, opts = {})
96
96
  data, _status_code, _headers = delete_notification_rule_with_http_info(id, opts)
97
97
  data
@@ -101,7 +101,7 @@ module DoorFlow
101
101
  # Deletes a notification rule
102
102
  # @param id [Integer] Notification rule ID
103
103
  # @param [Hash] opts the optional parameters
104
- # @return [Array<(DeleteGroupReservation200Response, Integer, Hash)>] DeleteGroupReservation200Response data, response status code and response headers
104
+ # @return [Array<(DeleteCardDesign200Response, Integer, Hash)>] DeleteCardDesign200Response data, response status code and response headers
105
105
  def delete_notification_rule_with_http_info(id, opts = {})
106
106
  if @api_client.config.debugging
107
107
  @api_client.config.logger.debug 'Calling API: NotificationRulesApi.delete_notification_rule ...'
@@ -111,7 +111,7 @@ module DoorFlow
111
111
  fail ArgumentError, "Missing the required parameter 'id' when calling NotificationRulesApi.delete_notification_rule"
112
112
  end
113
113
  # resource path
114
- local_var_path = '/api/3/notification_rules/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
114
+ local_var_path = '/api/3/notification_rules/{id}'.sub('{id}', CGI.escape(id.to_s))
115
115
 
116
116
  # query parameters
117
117
  query_params = opts[:query_params] || {}
@@ -128,7 +128,7 @@ module DoorFlow
128
128
  post_body = opts[:debug_body]
129
129
 
130
130
  # return_type
131
- return_type = opts[:debug_return_type] || 'DeleteGroupReservation200Response'
131
+ return_type = opts[:debug_return_type] || 'DeleteCardDesign200Response'
132
132
 
133
133
  # auth_names
134
134
  auth_names = opts[:debug_auth_names] || ['OAuth2']
@@ -174,7 +174,7 @@ module DoorFlow
174
174
  fail ArgumentError, "Missing the required parameter 'id' when calling NotificationRulesApi.get_notification_rule"
175
175
  end
176
176
  # resource path
177
- local_var_path = '/api/3/notification_rules/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
177
+ local_var_path = '/api/3/notification_rules/{id}'.sub('{id}', CGI.escape(id.to_s))
178
178
 
179
179
  # query parameters
180
180
  query_params = opts[:query_params] || {}
@@ -300,7 +300,7 @@ module DoorFlow
300
300
  fail ArgumentError, "Missing the required parameter 'notification_rule_input' when calling NotificationRulesApi.update_notification_rule"
301
301
  end
302
302
  # resource path
303
- local_var_path = '/api/3/notification_rules/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
303
+ local_var_path = '/api/3/notification_rules/{id}'.sub('{id}', CGI.escape(id.to_s))
304
304
 
305
305
  # query parameters
306
306
  query_params = opts[:query_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -91,7 +91,7 @@ module DoorFlow
91
91
  # Soft-deletes a person record. This removes them from the system but retains audit trail.
92
92
  # @param id [Integer] Person ID
93
93
  # @param [Hash] opts the optional parameters
94
- # @return [DeleteGroupReservation200Response]
94
+ # @return [DeleteCardDesign200Response]
95
95
  def delete_person(id, opts = {})
96
96
  data, _status_code, _headers = delete_person_with_http_info(id, opts)
97
97
  data
@@ -101,7 +101,7 @@ module DoorFlow
101
101
  # Soft-deletes a person record. This removes them from the system but retains audit trail.
102
102
  # @param id [Integer] Person ID
103
103
  # @param [Hash] opts the optional parameters
104
- # @return [Array<(DeleteGroupReservation200Response, Integer, Hash)>] DeleteGroupReservation200Response data, response status code and response headers
104
+ # @return [Array<(DeleteCardDesign200Response, Integer, Hash)>] DeleteCardDesign200Response data, response status code and response headers
105
105
  def delete_person_with_http_info(id, opts = {})
106
106
  if @api_client.config.debugging
107
107
  @api_client.config.logger.debug 'Calling API: PeopleApi.delete_person ...'
@@ -111,7 +111,7 @@ module DoorFlow
111
111
  fail ArgumentError, "Missing the required parameter 'id' when calling PeopleApi.delete_person"
112
112
  end
113
113
  # resource path
114
- local_var_path = '/api/3/people/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
114
+ local_var_path = '/api/3/people/{id}'.sub('{id}', CGI.escape(id.to_s))
115
115
 
116
116
  # query parameters
117
117
  query_params = opts[:query_params] || {}
@@ -128,7 +128,7 @@ module DoorFlow
128
128
  post_body = opts[:debug_body]
129
129
 
130
130
  # return_type
131
- return_type = opts[:debug_return_type] || 'DeleteGroupReservation200Response'
131
+ return_type = opts[:debug_return_type] || 'DeleteCardDesign200Response'
132
132
 
133
133
  # auth_names
134
134
  auth_names = opts[:debug_auth_names] || ['OAuth2']
@@ -174,7 +174,7 @@ module DoorFlow
174
174
  fail ArgumentError, "Missing the required parameter 'id' when calling PeopleApi.get_person"
175
175
  end
176
176
  # resource path
177
- local_var_path = '/api/3/people/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
177
+ local_var_path = '/api/3/people/{id}'.sub('{id}', CGI.escape(id.to_s))
178
178
 
179
179
  # query parameters
180
180
  query_params = opts[:query_params] || {}
@@ -325,7 +325,7 @@ module DoorFlow
325
325
  fail ArgumentError, "Missing the required parameter 'person_input' when calling PeopleApi.update_person"
326
326
  end
327
327
  # resource path
328
- local_var_path = '/api/3/people/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
328
+ local_var_path = '/api/3/people/{id}'.sub('{id}', CGI.escape(id.to_s))
329
329
 
330
330
  # query parameters
331
331
  query_params = opts[:query_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -91,7 +91,7 @@ module DoorFlow
91
91
  # Deletes a reservation, removing the temporary access grant. This will also delete the associated role and shift.
92
92
  # @param id [Integer] Reservation ID
93
93
  # @param [Hash] opts the optional parameters
94
- # @return [DeleteGroupReservation200Response]
94
+ # @return [DeleteCardDesign200Response]
95
95
  def delete_reservation(id, opts = {})
96
96
  data, _status_code, _headers = delete_reservation_with_http_info(id, opts)
97
97
  data
@@ -101,7 +101,7 @@ module DoorFlow
101
101
  # Deletes a reservation, removing the temporary access grant. This will also delete the associated role and shift.
102
102
  # @param id [Integer] Reservation ID
103
103
  # @param [Hash] opts the optional parameters
104
- # @return [Array<(DeleteGroupReservation200Response, Integer, Hash)>] DeleteGroupReservation200Response data, response status code and response headers
104
+ # @return [Array<(DeleteCardDesign200Response, Integer, Hash)>] DeleteCardDesign200Response data, response status code and response headers
105
105
  def delete_reservation_with_http_info(id, opts = {})
106
106
  if @api_client.config.debugging
107
107
  @api_client.config.logger.debug 'Calling API: ReservationsApi.delete_reservation ...'
@@ -111,7 +111,7 @@ module DoorFlow
111
111
  fail ArgumentError, "Missing the required parameter 'id' when calling ReservationsApi.delete_reservation"
112
112
  end
113
113
  # resource path
114
- local_var_path = '/api/3/reservations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
114
+ local_var_path = '/api/3/reservations/{id}'.sub('{id}', CGI.escape(id.to_s))
115
115
 
116
116
  # query parameters
117
117
  query_params = opts[:query_params] || {}
@@ -128,7 +128,7 @@ module DoorFlow
128
128
  post_body = opts[:debug_body]
129
129
 
130
130
  # return_type
131
- return_type = opts[:debug_return_type] || 'DeleteGroupReservation200Response'
131
+ return_type = opts[:debug_return_type] || 'DeleteCardDesign200Response'
132
132
 
133
133
  # auth_names
134
134
  auth_names = opts[:debug_auth_names] || ['OAuth2']
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -22,7 +22,7 @@ module DoorFlow
22
22
  # Initiate sync
23
23
  # Triggers a synchronization process to push pending changes to all door controllers. This endpoint initiates the sync if there are unsynced changes in the account. The sync process is rate-limited to prevent excessive sync requests.
24
24
  # @param [Hash] opts the optional parameters
25
- # @return [DeleteGroupReservation200Response]
25
+ # @return [DeleteCardDesign200Response]
26
26
  def initiate_sync(opts = {})
27
27
  data, _status_code, _headers = initiate_sync_with_http_info(opts)
28
28
  data
@@ -31,7 +31,7 @@ module DoorFlow
31
31
  # Initiate sync
32
32
  # Triggers a synchronization process to push pending changes to all door controllers. This endpoint initiates the sync if there are unsynced changes in the account. The sync process is rate-limited to prevent excessive sync requests.
33
33
  # @param [Hash] opts the optional parameters
34
- # @return [Array<(DeleteGroupReservation200Response, Integer, Hash)>] DeleteGroupReservation200Response data, response status code and response headers
34
+ # @return [Array<(DeleteCardDesign200Response, Integer, Hash)>] DeleteCardDesign200Response data, response status code and response headers
35
35
  def initiate_sync_with_http_info(opts = {})
36
36
  if @api_client.config.debugging
37
37
  @api_client.config.logger.debug 'Calling API: SyncApi.initiate_sync ...'
@@ -54,7 +54,7 @@ module DoorFlow
54
54
  post_body = opts[:debug_body]
55
55
 
56
56
  # return_type
57
- return_type = opts[:debug_return_type] || 'DeleteGroupReservation200Response'
57
+ return_type = opts[:debug_return_type] || 'DeleteCardDesign200Response'
58
58
 
59
59
  # auth_names
60
60
  auth_names = opts[:debug_auth_names] || ['OAuth2']
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
@@ -34,7 +34,7 @@ module DoorFlow
34
34
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
35
35
  def initialize(config = Configuration.default)
36
36
  @config = config
37
- @user_agent = "doorflow-ruby/#{VERSION}"
37
+ @user_agent = "OpenAPI-Generator/#{VERSION}/ruby"
38
38
  @default_headers = {
39
39
  'Content-Type' => 'application/json',
40
40
  'User-Agent' => @user_agent
@@ -322,9 +322,13 @@ module DoorFlow
322
322
  data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
323
323
  end
324
324
  else
325
- # models (e.g. Pet) or oneOf
325
+ # models (e.g. Pet) or oneOf/anyOf
326
326
  klass = DoorFlow.const_get(return_type)
327
- klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
327
+ if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of)
328
+ klass.build(data)
329
+ else
330
+ klass.build_from_hash(data)
331
+ end
328
332
  end
329
333
  end
330
334