purecloudplatformclientv2 9.0.0 → 10.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (258) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/AgentActivityEntityListing.md +1 -1
  4. data/docs/AttemptLimitsEntityListing.md +1 -1
  5. data/docs/AttributeEntityListing.md +1 -1
  6. data/docs/CalibrationEntityListing.md +1 -1
  7. data/docs/CallConversationEntityListing.md +1 -1
  8. data/docs/CallableTimeSetEntityListing.md +1 -1
  9. data/docs/CallbackConversationEntityListing.md +1 -1
  10. data/docs/CampaignEntityListing.md +1 -1
  11. data/docs/CampaignRuleEntityListing.md +1 -1
  12. data/docs/CampaignSequenceEntityListing.md +1 -1
  13. data/docs/CertificateAuthorityEntityListing.md +1 -1
  14. data/docs/ChatConversationEntityListing.md +1 -1
  15. data/docs/CobrowseConversationEntityListing.md +1 -1
  16. data/docs/CommandStatusEntityListing.md +1 -1
  17. data/docs/ConsumedResourcesEntityListing.md +1 -1
  18. data/docs/ConsumingResourcesEntityListing.md +1 -1
  19. data/docs/ContactListEntityListing.md +1 -1
  20. data/docs/ContactListFilterEntityListing.md +1 -1
  21. data/docs/ContactListing.md +1 -1
  22. data/docs/ConversationEntityListing.md +1 -1
  23. data/docs/DIDEntityListing.md +1 -1
  24. data/docs/DIDPoolEntityListing.md +1 -1
  25. data/docs/DependencyObjectEntityListing.md +1 -1
  26. data/docs/DependencyTypeEntityListing.md +1 -1
  27. data/docs/DialerEventEntityListing.md +1 -1
  28. data/docs/DncListEntityListing.md +1 -1
  29. data/docs/DocumentAuditEntityListing.md +1 -1
  30. data/docs/DocumentEntityListing.md +1 -1
  31. data/docs/DomainEdgeSoftwareVersionDto.md +1 -1
  32. data/docs/DomainEdgeSoftwareVersionDtoEntityListing.md +1 -1
  33. data/docs/DomainEntityListing.md +1 -1
  34. data/docs/DomainEntityListingEvaluationForm.md +1 -1
  35. data/docs/DomainEntityListingQueryResult.md +1 -1
  36. data/docs/EdgeEntityListing.md +1 -1
  37. data/docs/EdgeGroupEntityListing.md +1 -1
  38. data/docs/EdgeLineEntityListing.md +1 -1
  39. data/docs/EmailConversationEntityListing.md +1 -1
  40. data/docs/EmailMessageListing.md +1 -1
  41. data/docs/EncryptionKeyEntityListing.md +1 -1
  42. data/docs/EndpointEntityListing.md +1 -1
  43. data/docs/EvaluationEntityListing.md +1 -1
  44. data/docs/EvaluationFormEntityListing.md +1 -1
  45. data/docs/EvaluatorActivityEntityListing.md +1 -1
  46. data/docs/ExtensionEntityListing.md +1 -1
  47. data/docs/ExtensionPoolEntityListing.md +1 -1
  48. data/docs/ExternalContactsApi.md +130 -4
  49. data/docs/ExternalOrganization.md +1 -0
  50. data/docs/ExternalOrganizationListing.md +1 -1
  51. data/docs/FaxDocumentEntityListing.md +1 -1
  52. data/docs/FlowEntityListing.md +1 -1
  53. data/docs/FlowVersionEntityListing.md +1 -1
  54. data/docs/GreetingListing.md +1 -1
  55. data/docs/GroupEntityListing.md +1 -1
  56. data/docs/HeartBeatAlertContainer.md +1 -1
  57. data/docs/HeartBeatRuleContainer.md +1 -1
  58. data/docs/InboundDomainEntityListing.md +1 -1
  59. data/docs/InboundRouteEntityListing.md +1 -1
  60. data/docs/InteractionStatsAlertContainer.md +1 -1
  61. data/docs/InteractionStatsRuleContainer.md +1 -1
  62. data/docs/JsonNode.md +3 -3
  63. data/docs/KeywordSetEntityListing.md +1 -1
  64. data/docs/LanguageEntityListing.md +1 -1
  65. data/docs/LibraryEntityListing.md +1 -1
  66. data/docs/LicenseApi.md +4 -4
  67. data/docs/LineBaseEntityListing.md +1 -1
  68. data/docs/LineEntityListing.md +1 -1
  69. data/docs/LocationEntityListing.md +1 -1
  70. data/docs/LogicalInterfaceEntityListing.md +1 -1
  71. data/docs/NoteListing.md +1 -1
  72. data/docs/OAuthClientEntityListing.md +1 -1
  73. data/docs/OAuthProviderEntityListing.md +1 -1
  74. data/docs/OrgUser.md +36 -0
  75. data/docs/OrganizationPresenceEntityListing.md +1 -1
  76. data/docs/OrganizationRoleEntityListing.md +1 -1
  77. data/docs/OrphanRecordingListing.md +1 -1
  78. data/docs/OutboundRouteBaseEntityListing.md +1 -1
  79. data/docs/OutboundRouteEntityListing.md +1 -1
  80. data/docs/PermissionCollectionEntityListing.md +1 -1
  81. data/docs/PhoneBaseEntityListing.md +1 -1
  82. data/docs/PhoneEntityListing.md +1 -1
  83. data/docs/PhoneMetaBaseEntityListing.md +1 -1
  84. data/docs/PhysicalInterfaceEntityListing.md +1 -1
  85. data/docs/PolicyEntityListing.md +1 -1
  86. data/docs/PromptAssetEntityListing.md +1 -1
  87. data/docs/PromptEntityListing.md +1 -1
  88. data/docs/QualityAuditPage.md +1 -1
  89. data/docs/QueueEntityListing.md +1 -1
  90. data/docs/QueueMemberEntityListing.md +1 -1
  91. data/docs/RelationshipListing.md +1 -1
  92. data/docs/ReportMetaDataEntityListing.md +1 -1
  93. data/docs/ReportRunEntryEntityDomainListing.md +1 -1
  94. data/docs/ReportScheduleEntityListing.md +1 -1
  95. data/docs/ResponseEntityList.md +1 -1
  96. data/docs/ResponseEntityListing.md +1 -1
  97. data/docs/ResponseSetEntityListing.md +1 -1
  98. data/docs/RoutingStatusAlertContainer.md +1 -1
  99. data/docs/RoutingStatusRuleContainer.md +1 -1
  100. data/docs/RuleSetEntityListing.md +1 -1
  101. data/docs/SchemaCategoryEntityListing.md +1 -1
  102. data/docs/SchemaReferenceEntityListing.md +1 -1
  103. data/docs/ScreenRecordingSessionListing.md +1 -1
  104. data/docs/ScriptEntityListing.md +1 -1
  105. data/docs/SecurityProfileEntityListing.md +1 -1
  106. data/docs/ShareEntityListing.md +1 -1
  107. data/docs/SiteEntityListing.md +1 -1
  108. data/docs/SkillEntityListing.md +1 -1
  109. data/docs/StationEntityListing.md +1 -1
  110. data/docs/SystemPromptAssetEntityListing.md +1 -1
  111. data/docs/SystemPromptEntityListing.md +1 -1
  112. data/docs/TagValueEntityListing.md +1 -1
  113. data/docs/TimeZoneEntityListing.md +1 -1
  114. data/docs/TrunkBaseEntityListing.md +1 -1
  115. data/docs/TrunkEntityListing.md +1 -1
  116. data/docs/TrunkMetabaseEntityListing.md +1 -1
  117. data/docs/Trustor.md +18 -0
  118. data/docs/UserEntityListing.md +1 -1
  119. data/docs/UserPresenceAlertContainer.md +1 -1
  120. data/docs/UserPresenceRuleContainer.md +1 -1
  121. data/docs/UserQueueEntityListing.md +1 -1
  122. data/docs/UserRecordingEntityListing.md +1 -1
  123. data/docs/UserSkillEntityListing.md +1 -1
  124. data/docs/VoicemailMessageEntityListing.md +1 -1
  125. data/docs/WorkspaceEntityListing.md +1 -1
  126. data/docs/WorkspaceMemberEntityListing.md +1 -1
  127. data/docs/WrapupCodeEntityListing.md +1 -1
  128. data/lib/purecloudplatformclientv2.rb +2 -2
  129. data/lib/purecloudplatformclientv2/api/external_contacts_api.rb +166 -9
  130. data/lib/purecloudplatformclientv2/api/license_api.rb +6 -6
  131. data/lib/purecloudplatformclientv2/models/agent_activity_entity_listing.rb +12 -12
  132. data/lib/purecloudplatformclientv2/models/attempt_limits_entity_listing.rb +12 -12
  133. data/lib/purecloudplatformclientv2/models/attribute_entity_listing.rb +12 -12
  134. data/lib/purecloudplatformclientv2/models/calibration_entity_listing.rb +12 -12
  135. data/lib/purecloudplatformclientv2/models/call_conversation_entity_listing.rb +12 -12
  136. data/lib/purecloudplatformclientv2/models/callable_time_set_entity_listing.rb +12 -12
  137. data/lib/purecloudplatformclientv2/models/callback_conversation_entity_listing.rb +12 -12
  138. data/lib/purecloudplatformclientv2/models/campaign_entity_listing.rb +12 -12
  139. data/lib/purecloudplatformclientv2/models/campaign_rule_entity_listing.rb +12 -12
  140. data/lib/purecloudplatformclientv2/models/campaign_sequence_entity_listing.rb +12 -12
  141. data/lib/purecloudplatformclientv2/models/certificate_authority_entity_listing.rb +12 -12
  142. data/lib/purecloudplatformclientv2/models/chat_conversation_entity_listing.rb +12 -12
  143. data/lib/purecloudplatformclientv2/models/cobrowse_conversation_entity_listing.rb +12 -12
  144. data/lib/purecloudplatformclientv2/models/command_status_entity_listing.rb +12 -12
  145. data/lib/purecloudplatformclientv2/models/consumed_resources_entity_listing.rb +12 -12
  146. data/lib/purecloudplatformclientv2/models/consuming_resources_entity_listing.rb +12 -12
  147. data/lib/purecloudplatformclientv2/models/contact_list_entity_listing.rb +12 -12
  148. data/lib/purecloudplatformclientv2/models/contact_list_filter_entity_listing.rb +12 -12
  149. data/lib/purecloudplatformclientv2/models/contact_listing.rb +12 -12
  150. data/lib/purecloudplatformclientv2/models/conversation_entity_listing.rb +12 -12
  151. data/lib/purecloudplatformclientv2/models/dependency_object_entity_listing.rb +12 -12
  152. data/lib/purecloudplatformclientv2/models/dependency_type_entity_listing.rb +12 -12
  153. data/lib/purecloudplatformclientv2/models/dialer_event_entity_listing.rb +12 -12
  154. data/lib/purecloudplatformclientv2/models/did_entity_listing.rb +12 -12
  155. data/lib/purecloudplatformclientv2/models/did_pool_entity_listing.rb +12 -12
  156. data/lib/purecloudplatformclientv2/models/dnc_list_entity_listing.rb +12 -12
  157. data/lib/purecloudplatformclientv2/models/document_audit_entity_listing.rb +12 -12
  158. data/lib/purecloudplatformclientv2/models/document_entity_listing.rb +12 -12
  159. data/lib/purecloudplatformclientv2/models/domain_edge_software_version_dto.rb +12 -12
  160. data/lib/purecloudplatformclientv2/models/domain_edge_software_version_dto_entity_listing.rb +12 -12
  161. data/lib/purecloudplatformclientv2/models/domain_entity_listing.rb +12 -12
  162. data/lib/purecloudplatformclientv2/models/domain_entity_listing_evaluation_form.rb +12 -12
  163. data/lib/purecloudplatformclientv2/models/domain_entity_listing_query_result.rb +12 -12
  164. data/lib/purecloudplatformclientv2/models/edge_entity_listing.rb +12 -12
  165. data/lib/purecloudplatformclientv2/models/edge_group_entity_listing.rb +12 -12
  166. data/lib/purecloudplatformclientv2/models/edge_line_entity_listing.rb +12 -12
  167. data/lib/purecloudplatformclientv2/models/email_conversation_entity_listing.rb +12 -12
  168. data/lib/purecloudplatformclientv2/models/email_message_listing.rb +12 -12
  169. data/lib/purecloudplatformclientv2/models/encryption_key_entity_listing.rb +12 -12
  170. data/lib/purecloudplatformclientv2/models/endpoint_entity_listing.rb +12 -12
  171. data/lib/purecloudplatformclientv2/models/evaluation_entity_listing.rb +12 -12
  172. data/lib/purecloudplatformclientv2/models/evaluation_form_entity_listing.rb +12 -12
  173. data/lib/purecloudplatformclientv2/models/evaluator_activity_entity_listing.rb +12 -12
  174. data/lib/purecloudplatformclientv2/models/extension_entity_listing.rb +12 -12
  175. data/lib/purecloudplatformclientv2/models/extension_pool_entity_listing.rb +12 -12
  176. data/lib/purecloudplatformclientv2/models/external_organization.rb +26 -1
  177. data/lib/purecloudplatformclientv2/models/external_organization_listing.rb +12 -12
  178. data/lib/purecloudplatformclientv2/models/fax_document_entity_listing.rb +12 -12
  179. data/lib/purecloudplatformclientv2/models/flow_entity_listing.rb +12 -12
  180. data/lib/purecloudplatformclientv2/models/flow_version_entity_listing.rb +12 -12
  181. data/lib/purecloudplatformclientv2/models/greeting_listing.rb +12 -12
  182. data/lib/purecloudplatformclientv2/models/group_entity_listing.rb +12 -12
  183. data/lib/purecloudplatformclientv2/models/heart_beat_alert_container.rb +12 -12
  184. data/lib/purecloudplatformclientv2/models/heart_beat_rule_container.rb +12 -12
  185. data/lib/purecloudplatformclientv2/models/inbound_domain_entity_listing.rb +12 -12
  186. data/lib/purecloudplatformclientv2/models/inbound_route_entity_listing.rb +12 -12
  187. data/lib/purecloudplatformclientv2/models/interaction_stats_alert_container.rb +12 -12
  188. data/lib/purecloudplatformclientv2/models/interaction_stats_rule_container.rb +12 -12
  189. data/lib/purecloudplatformclientv2/models/json_node.rb +29 -29
  190. data/lib/purecloudplatformclientv2/models/keyword_set_entity_listing.rb +12 -12
  191. data/lib/purecloudplatformclientv2/models/language_entity_listing.rb +12 -12
  192. data/lib/purecloudplatformclientv2/models/library_entity_listing.rb +12 -12
  193. data/lib/purecloudplatformclientv2/models/line_base_entity_listing.rb +12 -12
  194. data/lib/purecloudplatformclientv2/models/line_entity_listing.rb +12 -12
  195. data/lib/purecloudplatformclientv2/models/location_entity_listing.rb +12 -12
  196. data/lib/purecloudplatformclientv2/models/logical_interface_entity_listing.rb +12 -12
  197. data/lib/purecloudplatformclientv2/models/note_listing.rb +12 -12
  198. data/lib/purecloudplatformclientv2/models/o_auth_client_entity_listing.rb +12 -12
  199. data/lib/purecloudplatformclientv2/models/o_auth_provider_entity_listing.rb +12 -12
  200. data/lib/purecloudplatformclientv2/models/org_user.rb +822 -0
  201. data/lib/purecloudplatformclientv2/models/organization_presence_entity_listing.rb +12 -12
  202. data/lib/purecloudplatformclientv2/models/organization_role_entity_listing.rb +12 -12
  203. data/lib/purecloudplatformclientv2/models/orphan_recording_listing.rb +12 -12
  204. data/lib/purecloudplatformclientv2/models/outbound_route_base_entity_listing.rb +12 -12
  205. data/lib/purecloudplatformclientv2/models/outbound_route_entity_listing.rb +12 -12
  206. data/lib/purecloudplatformclientv2/models/permission_collection_entity_listing.rb +12 -12
  207. data/lib/purecloudplatformclientv2/models/phone_base_entity_listing.rb +12 -12
  208. data/lib/purecloudplatformclientv2/models/phone_entity_listing.rb +12 -12
  209. data/lib/purecloudplatformclientv2/models/phone_meta_base_entity_listing.rb +12 -12
  210. data/lib/purecloudplatformclientv2/models/physical_interface_entity_listing.rb +12 -12
  211. data/lib/purecloudplatformclientv2/models/policy_entity_listing.rb +12 -12
  212. data/lib/purecloudplatformclientv2/models/prompt_asset_entity_listing.rb +12 -12
  213. data/lib/purecloudplatformclientv2/models/prompt_entity_listing.rb +12 -12
  214. data/lib/purecloudplatformclientv2/models/quality_audit_page.rb +12 -12
  215. data/lib/purecloudplatformclientv2/models/queue_entity_listing.rb +12 -12
  216. data/lib/purecloudplatformclientv2/models/queue_member_entity_listing.rb +12 -12
  217. data/lib/purecloudplatformclientv2/models/relationship_listing.rb +12 -12
  218. data/lib/purecloudplatformclientv2/models/report_meta_data_entity_listing.rb +12 -12
  219. data/lib/purecloudplatformclientv2/models/report_run_entry_entity_domain_listing.rb +12 -12
  220. data/lib/purecloudplatformclientv2/models/report_schedule_entity_listing.rb +12 -12
  221. data/lib/purecloudplatformclientv2/models/response_entity_list.rb +12 -12
  222. data/lib/purecloudplatformclientv2/models/response_entity_listing.rb +12 -12
  223. data/lib/purecloudplatformclientv2/models/response_set_entity_listing.rb +12 -12
  224. data/lib/purecloudplatformclientv2/models/routing_status_alert_container.rb +12 -12
  225. data/lib/purecloudplatformclientv2/models/routing_status_rule_container.rb +12 -12
  226. data/lib/purecloudplatformclientv2/models/rule_set_entity_listing.rb +12 -12
  227. data/lib/purecloudplatformclientv2/models/schema_category_entity_listing.rb +12 -12
  228. data/lib/purecloudplatformclientv2/models/schema_reference_entity_listing.rb +12 -12
  229. data/lib/purecloudplatformclientv2/models/screen_recording_session_listing.rb +12 -12
  230. data/lib/purecloudplatformclientv2/models/script_entity_listing.rb +12 -12
  231. data/lib/purecloudplatformclientv2/models/security_profile_entity_listing.rb +12 -12
  232. data/lib/purecloudplatformclientv2/models/share_entity_listing.rb +12 -12
  233. data/lib/purecloudplatformclientv2/models/site_entity_listing.rb +12 -12
  234. data/lib/purecloudplatformclientv2/models/skill_entity_listing.rb +12 -12
  235. data/lib/purecloudplatformclientv2/models/station_entity_listing.rb +12 -12
  236. data/lib/purecloudplatformclientv2/models/system_prompt_asset_entity_listing.rb +12 -12
  237. data/lib/purecloudplatformclientv2/models/system_prompt_entity_listing.rb +12 -12
  238. data/lib/purecloudplatformclientv2/models/tag_value_entity_listing.rb +12 -12
  239. data/lib/purecloudplatformclientv2/models/time_zone_entity_listing.rb +12 -12
  240. data/lib/purecloudplatformclientv2/models/trunk_base_entity_listing.rb +12 -12
  241. data/lib/purecloudplatformclientv2/models/trunk_entity_listing.rb +12 -12
  242. data/lib/purecloudplatformclientv2/models/trunk_metabase_entity_listing.rb +12 -12
  243. data/lib/purecloudplatformclientv2/models/{license_definition_listing.rb → trustor.rb} +48 -139
  244. data/lib/purecloudplatformclientv2/models/user_entity_listing.rb +12 -12
  245. data/lib/purecloudplatformclientv2/models/user_presence_alert_container.rb +12 -12
  246. data/lib/purecloudplatformclientv2/models/user_presence_rule_container.rb +12 -12
  247. data/lib/purecloudplatformclientv2/models/user_queue_entity_listing.rb +12 -12
  248. data/lib/purecloudplatformclientv2/models/user_recording_entity_listing.rb +12 -12
  249. data/lib/purecloudplatformclientv2/models/user_skill_entity_listing.rb +12 -12
  250. data/lib/purecloudplatformclientv2/models/voicemail_message_entity_listing.rb +12 -12
  251. data/lib/purecloudplatformclientv2/models/workspace_entity_listing.rb +12 -12
  252. data/lib/purecloudplatformclientv2/models/workspace_member_entity_listing.rb +12 -12
  253. data/lib/purecloudplatformclientv2/models/wrapup_code_entity_listing.rb +12 -12
  254. data/lib/purecloudplatformclientv2/version.rb +1 -1
  255. metadata +6 -6
  256. data/docs/LicenseDefinitionListing.md +0 -22
  257. data/docs/LicenseUpdateResponse.md +0 -13
  258. data/lib/purecloudplatformclientv2/models/license_update_response.rb +0 -203
@@ -32,10 +32,10 @@ module PureCloud
32
32
 
33
33
  attr_accessor :next_uri
34
34
 
35
- attr_accessor :last_uri
36
-
37
35
  attr_accessor :previous_uri
38
36
 
37
+ attr_accessor :last_uri
38
+
39
39
  attr_accessor :page_count
40
40
 
41
41
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -56,10 +56,10 @@ module PureCloud
56
56
 
57
57
  :'next_uri' => :'nextUri',
58
58
 
59
- :'last_uri' => :'lastUri',
60
-
61
59
  :'previous_uri' => :'previousUri',
62
60
 
61
+ :'last_uri' => :'lastUri',
62
+
63
63
  :'page_count' => :'pageCount'
64
64
 
65
65
  }
@@ -83,10 +83,10 @@ module PureCloud
83
83
 
84
84
  :'next_uri' => :'String',
85
85
 
86
- :'last_uri' => :'String',
87
-
88
86
  :'previous_uri' => :'String',
89
87
 
88
+ :'last_uri' => :'String',
89
+
90
90
  :'page_count' => :'Integer'
91
91
 
92
92
  }
@@ -166,19 +166,19 @@ module PureCloud
166
166
  end
167
167
 
168
168
 
169
- if attributes.has_key?(:'lastUri')
169
+ if attributes.has_key?(:'previousUri')
170
170
 
171
171
 
172
- self.last_uri = attributes[:'lastUri']
172
+ self.previous_uri = attributes[:'previousUri']
173
173
 
174
174
 
175
175
  end
176
176
 
177
177
 
178
- if attributes.has_key?(:'previousUri')
178
+ if attributes.has_key?(:'lastUri')
179
179
 
180
180
 
181
- self.previous_uri = attributes[:'previousUri']
181
+ self.last_uri = attributes[:'lastUri']
182
182
 
183
183
 
184
184
  end
@@ -313,8 +313,8 @@ module PureCloud
313
313
  self_uri == o.self_uri &&
314
314
  first_uri == o.first_uri &&
315
315
  next_uri == o.next_uri &&
316
- last_uri == o.last_uri &&
317
316
  previous_uri == o.previous_uri &&
317
+ last_uri == o.last_uri &&
318
318
  page_count == o.page_count
319
319
  end
320
320
 
@@ -327,7 +327,7 @@ module PureCloud
327
327
  # Calculates hash code according to all attributes.
328
328
  # @return [Fixnum] Hash code
329
329
  def hash
330
- [entities, page_size, page_number, total, self_uri, first_uri, next_uri, last_uri, previous_uri, page_count].hash
330
+ [entities, page_size, page_number, total, self_uri, first_uri, next_uri, previous_uri, last_uri, page_count].hash
331
331
  end
332
332
 
333
333
  # build the object from hash
@@ -32,10 +32,10 @@ module PureCloud
32
32
 
33
33
  attr_accessor :next_uri
34
34
 
35
- attr_accessor :last_uri
36
-
37
35
  attr_accessor :previous_uri
38
36
 
37
+ attr_accessor :last_uri
38
+
39
39
  attr_accessor :page_count
40
40
 
41
41
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -56,10 +56,10 @@ module PureCloud
56
56
 
57
57
  :'next_uri' => :'nextUri',
58
58
 
59
- :'last_uri' => :'lastUri',
60
-
61
59
  :'previous_uri' => :'previousUri',
62
60
 
61
+ :'last_uri' => :'lastUri',
62
+
63
63
  :'page_count' => :'pageCount'
64
64
 
65
65
  }
@@ -83,10 +83,10 @@ module PureCloud
83
83
 
84
84
  :'next_uri' => :'String',
85
85
 
86
- :'last_uri' => :'String',
87
-
88
86
  :'previous_uri' => :'String',
89
87
 
88
+ :'last_uri' => :'String',
89
+
90
90
  :'page_count' => :'Integer'
91
91
 
92
92
  }
@@ -166,19 +166,19 @@ module PureCloud
166
166
  end
167
167
 
168
168
 
169
- if attributes.has_key?(:'lastUri')
169
+ if attributes.has_key?(:'previousUri')
170
170
 
171
171
 
172
- self.last_uri = attributes[:'lastUri']
172
+ self.previous_uri = attributes[:'previousUri']
173
173
 
174
174
 
175
175
  end
176
176
 
177
177
 
178
- if attributes.has_key?(:'previousUri')
178
+ if attributes.has_key?(:'lastUri')
179
179
 
180
180
 
181
- self.previous_uri = attributes[:'previousUri']
181
+ self.last_uri = attributes[:'lastUri']
182
182
 
183
183
 
184
184
  end
@@ -313,8 +313,8 @@ module PureCloud
313
313
  self_uri == o.self_uri &&
314
314
  first_uri == o.first_uri &&
315
315
  next_uri == o.next_uri &&
316
- last_uri == o.last_uri &&
317
316
  previous_uri == o.previous_uri &&
317
+ last_uri == o.last_uri &&
318
318
  page_count == o.page_count
319
319
  end
320
320
 
@@ -327,7 +327,7 @@ module PureCloud
327
327
  # Calculates hash code according to all attributes.
328
328
  # @return [Fixnum] Hash code
329
329
  def hash
330
- [entities, page_size, page_number, total, self_uri, first_uri, next_uri, last_uri, previous_uri, page_count].hash
330
+ [entities, page_size, page_number, total, self_uri, first_uri, next_uri, previous_uri, last_uri, page_count].hash
331
331
  end
332
332
 
333
333
  # build the object from hash
@@ -32,10 +32,10 @@ module PureCloud
32
32
 
33
33
  attr_accessor :next_uri
34
34
 
35
- attr_accessor :last_uri
36
-
37
35
  attr_accessor :previous_uri
38
36
 
37
+ attr_accessor :last_uri
38
+
39
39
  attr_accessor :page_count
40
40
 
41
41
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -56,10 +56,10 @@ module PureCloud
56
56
 
57
57
  :'next_uri' => :'nextUri',
58
58
 
59
- :'last_uri' => :'lastUri',
60
-
61
59
  :'previous_uri' => :'previousUri',
62
60
 
61
+ :'last_uri' => :'lastUri',
62
+
63
63
  :'page_count' => :'pageCount'
64
64
 
65
65
  }
@@ -83,10 +83,10 @@ module PureCloud
83
83
 
84
84
  :'next_uri' => :'String',
85
85
 
86
- :'last_uri' => :'String',
87
-
88
86
  :'previous_uri' => :'String',
89
87
 
88
+ :'last_uri' => :'String',
89
+
90
90
  :'page_count' => :'Integer'
91
91
 
92
92
  }
@@ -166,19 +166,19 @@ module PureCloud
166
166
  end
167
167
 
168
168
 
169
- if attributes.has_key?(:'lastUri')
169
+ if attributes.has_key?(:'previousUri')
170
170
 
171
171
 
172
- self.last_uri = attributes[:'lastUri']
172
+ self.previous_uri = attributes[:'previousUri']
173
173
 
174
174
 
175
175
  end
176
176
 
177
177
 
178
- if attributes.has_key?(:'previousUri')
178
+ if attributes.has_key?(:'lastUri')
179
179
 
180
180
 
181
- self.previous_uri = attributes[:'previousUri']
181
+ self.last_uri = attributes[:'lastUri']
182
182
 
183
183
 
184
184
  end
@@ -313,8 +313,8 @@ module PureCloud
313
313
  self_uri == o.self_uri &&
314
314
  first_uri == o.first_uri &&
315
315
  next_uri == o.next_uri &&
316
- last_uri == o.last_uri &&
317
316
  previous_uri == o.previous_uri &&
317
+ last_uri == o.last_uri &&
318
318
  page_count == o.page_count
319
319
  end
320
320
 
@@ -327,7 +327,7 @@ module PureCloud
327
327
  # Calculates hash code according to all attributes.
328
328
  # @return [Fixnum] Hash code
329
329
  def hash
330
- [entities, page_size, page_number, total, self_uri, first_uri, next_uri, last_uri, previous_uri, page_count].hash
330
+ [entities, page_size, page_number, total, self_uri, first_uri, next_uri, previous_uri, last_uri, page_count].hash
331
331
  end
332
332
 
333
333
  # build the object from hash
@@ -32,10 +32,10 @@ module PureCloud
32
32
 
33
33
  attr_accessor :next_uri
34
34
 
35
- attr_accessor :last_uri
36
-
37
35
  attr_accessor :previous_uri
38
36
 
37
+ attr_accessor :last_uri
38
+
39
39
  attr_accessor :page_count
40
40
 
41
41
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -56,10 +56,10 @@ module PureCloud
56
56
 
57
57
  :'next_uri' => :'nextUri',
58
58
 
59
- :'last_uri' => :'lastUri',
60
-
61
59
  :'previous_uri' => :'previousUri',
62
60
 
61
+ :'last_uri' => :'lastUri',
62
+
63
63
  :'page_count' => :'pageCount'
64
64
 
65
65
  }
@@ -83,10 +83,10 @@ module PureCloud
83
83
 
84
84
  :'next_uri' => :'String',
85
85
 
86
- :'last_uri' => :'String',
87
-
88
86
  :'previous_uri' => :'String',
89
87
 
88
+ :'last_uri' => :'String',
89
+
90
90
  :'page_count' => :'Integer'
91
91
 
92
92
  }
@@ -166,19 +166,19 @@ module PureCloud
166
166
  end
167
167
 
168
168
 
169
- if attributes.has_key?(:'lastUri')
169
+ if attributes.has_key?(:'previousUri')
170
170
 
171
171
 
172
- self.last_uri = attributes[:'lastUri']
172
+ self.previous_uri = attributes[:'previousUri']
173
173
 
174
174
 
175
175
  end
176
176
 
177
177
 
178
- if attributes.has_key?(:'previousUri')
178
+ if attributes.has_key?(:'lastUri')
179
179
 
180
180
 
181
- self.previous_uri = attributes[:'previousUri']
181
+ self.last_uri = attributes[:'lastUri']
182
182
 
183
183
 
184
184
  end
@@ -313,8 +313,8 @@ module PureCloud
313
313
  self_uri == o.self_uri &&
314
314
  first_uri == o.first_uri &&
315
315
  next_uri == o.next_uri &&
316
- last_uri == o.last_uri &&
317
316
  previous_uri == o.previous_uri &&
317
+ last_uri == o.last_uri &&
318
318
  page_count == o.page_count
319
319
  end
320
320
 
@@ -327,7 +327,7 @@ module PureCloud
327
327
  # Calculates hash code according to all attributes.
328
328
  # @return [Fixnum] Hash code
329
329
  def hash
330
- [entities, page_size, page_number, total, self_uri, first_uri, next_uri, last_uri, previous_uri, page_count].hash
330
+ [entities, page_size, page_number, total, self_uri, first_uri, next_uri, previous_uri, last_uri, page_count].hash
331
331
  end
332
332
 
333
333
  # build the object from hash
@@ -0,0 +1,822 @@
1
+ =begin
2
+ PureCloud Platform API
3
+
4
+ With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: DeveloperEvangelists@genesys.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ License: ININ
11
+ http://www.inin.com
12
+
13
+ Terms of Service: https://developer.mypurecloud.com/tos
14
+
15
+ =end
16
+
17
+ require 'date'
18
+
19
+ module PureCloud
20
+ class OrgUser
21
+ # The globally unique identifier for the object.
22
+ attr_accessor :id
23
+
24
+ attr_accessor :name
25
+
26
+ attr_accessor :chat
27
+
28
+ attr_accessor :department
29
+
30
+ attr_accessor :email
31
+
32
+ # Auto populated from addresses.
33
+ attr_accessor :primary_contact_info
34
+
35
+ # Email addresses and phone numbers for this user
36
+ attr_accessor :addresses
37
+
38
+ # The current state for this user.
39
+ attr_accessor :state
40
+
41
+ attr_accessor :title
42
+
43
+ attr_accessor :username
44
+
45
+ attr_accessor :manager
46
+
47
+ attr_accessor :images
48
+
49
+ # Required when updating a user, this value should be the current version of the user. The current version can be obtained with a GET on the user before doing a PATCH.
50
+ attr_accessor :version
51
+
52
+ # ACD routing status
53
+ attr_accessor :routing_status
54
+
55
+ # Active presence
56
+ attr_accessor :presence
57
+
58
+ # Summary of conversion statistics for conversation types.
59
+ attr_accessor :conversation_summary
60
+
61
+ # Determine if out of office is enabled
62
+ attr_accessor :out_of_office
63
+
64
+ # Current geolocation position
65
+ attr_accessor :geolocation
66
+
67
+ # Effective, default, and last station information
68
+ attr_accessor :station
69
+
70
+ # Roles and permissions assigned to the user
71
+ attr_accessor :authorization
72
+
73
+ # Skills possessed by the user
74
+ attr_accessor :profile_skills
75
+
76
+ # The user placement at each site location.
77
+ attr_accessor :locations
78
+
79
+ # The groups the user is a member of
80
+ attr_accessor :groups
81
+
82
+ attr_accessor :organization
83
+
84
+ # Attribute mapping from ruby-style variable name to JSON key.
85
+ def self.attribute_map
86
+ {
87
+
88
+ :'id' => :'id',
89
+
90
+ :'name' => :'name',
91
+
92
+ :'chat' => :'chat',
93
+
94
+ :'department' => :'department',
95
+
96
+ :'email' => :'email',
97
+
98
+ :'primary_contact_info' => :'primaryContactInfo',
99
+
100
+ :'addresses' => :'addresses',
101
+
102
+ :'state' => :'state',
103
+
104
+ :'title' => :'title',
105
+
106
+ :'username' => :'username',
107
+
108
+ :'manager' => :'manager',
109
+
110
+ :'images' => :'images',
111
+
112
+ :'version' => :'version',
113
+
114
+ :'routing_status' => :'routingStatus',
115
+
116
+ :'presence' => :'presence',
117
+
118
+ :'conversation_summary' => :'conversationSummary',
119
+
120
+ :'out_of_office' => :'outOfOffice',
121
+
122
+ :'geolocation' => :'geolocation',
123
+
124
+ :'station' => :'station',
125
+
126
+ :'authorization' => :'authorization',
127
+
128
+ :'profile_skills' => :'profileSkills',
129
+
130
+ :'locations' => :'locations',
131
+
132
+ :'groups' => :'groups',
133
+
134
+ :'organization' => :'organization'
135
+
136
+ }
137
+ end
138
+
139
+ # Attribute type mapping.
140
+ def self.swagger_types
141
+ {
142
+
143
+ :'id' => :'String',
144
+
145
+ :'name' => :'String',
146
+
147
+ :'chat' => :'Chat',
148
+
149
+ :'department' => :'String',
150
+
151
+ :'email' => :'String',
152
+
153
+ :'primary_contact_info' => :'Array<Contact>',
154
+
155
+ :'addresses' => :'Array<Contact>',
156
+
157
+ :'state' => :'String',
158
+
159
+ :'title' => :'String',
160
+
161
+ :'username' => :'String',
162
+
163
+ :'manager' => :'User',
164
+
165
+ :'images' => :'Array<UserImage>',
166
+
167
+ :'version' => :'Integer',
168
+
169
+ :'routing_status' => :'RoutingStatus',
170
+
171
+ :'presence' => :'UserPresence',
172
+
173
+ :'conversation_summary' => :'UserConversationSummary',
174
+
175
+ :'out_of_office' => :'OutOfOffice',
176
+
177
+ :'geolocation' => :'Geolocation',
178
+
179
+ :'station' => :'UserStations',
180
+
181
+ :'authorization' => :'UserAuthorization',
182
+
183
+ :'profile_skills' => :'Array<String>',
184
+
185
+ :'locations' => :'Array<Location>',
186
+
187
+ :'groups' => :'Array<Group>',
188
+
189
+ :'organization' => :'Organization'
190
+
191
+ }
192
+ end
193
+
194
+ # Initializes the object
195
+ # @param [Hash] attributes Model attributes in the form of hash
196
+ def initialize(attributes = {})
197
+ return unless attributes.is_a?(Hash)
198
+
199
+ # convert string to symbol for hash key
200
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
201
+
202
+
203
+ if attributes.has_key?(:'id')
204
+
205
+
206
+ self.id = attributes[:'id']
207
+
208
+
209
+ end
210
+
211
+
212
+ if attributes.has_key?(:'name')
213
+
214
+
215
+ self.name = attributes[:'name']
216
+
217
+
218
+ end
219
+
220
+
221
+ if attributes.has_key?(:'chat')
222
+
223
+
224
+ self.chat = attributes[:'chat']
225
+
226
+
227
+ end
228
+
229
+
230
+ if attributes.has_key?(:'department')
231
+
232
+
233
+ self.department = attributes[:'department']
234
+
235
+
236
+ end
237
+
238
+
239
+ if attributes.has_key?(:'email')
240
+
241
+
242
+ self.email = attributes[:'email']
243
+
244
+
245
+ end
246
+
247
+
248
+ if attributes.has_key?(:'primaryContactInfo')
249
+
250
+ if (value = attributes[:'primaryContactInfo']).is_a?(Array)
251
+ self.primary_contact_info = value
252
+ end
253
+
254
+
255
+
256
+ end
257
+
258
+
259
+ if attributes.has_key?(:'addresses')
260
+
261
+ if (value = attributes[:'addresses']).is_a?(Array)
262
+ self.addresses = value
263
+ end
264
+
265
+
266
+
267
+ end
268
+
269
+
270
+ if attributes.has_key?(:'state')
271
+
272
+
273
+ self.state = attributes[:'state']
274
+
275
+
276
+ end
277
+
278
+
279
+ if attributes.has_key?(:'title')
280
+
281
+
282
+ self.title = attributes[:'title']
283
+
284
+
285
+ end
286
+
287
+
288
+ if attributes.has_key?(:'username')
289
+
290
+
291
+ self.username = attributes[:'username']
292
+
293
+
294
+ end
295
+
296
+
297
+ if attributes.has_key?(:'manager')
298
+
299
+
300
+ self.manager = attributes[:'manager']
301
+
302
+
303
+ end
304
+
305
+
306
+ if attributes.has_key?(:'images')
307
+
308
+ if (value = attributes[:'images']).is_a?(Array)
309
+ self.images = value
310
+ end
311
+
312
+
313
+
314
+ end
315
+
316
+
317
+ if attributes.has_key?(:'version')
318
+
319
+
320
+ self.version = attributes[:'version']
321
+
322
+
323
+ end
324
+
325
+
326
+ if attributes.has_key?(:'routingStatus')
327
+
328
+
329
+ self.routing_status = attributes[:'routingStatus']
330
+
331
+
332
+ end
333
+
334
+
335
+ if attributes.has_key?(:'presence')
336
+
337
+
338
+ self.presence = attributes[:'presence']
339
+
340
+
341
+ end
342
+
343
+
344
+ if attributes.has_key?(:'conversationSummary')
345
+
346
+
347
+ self.conversation_summary = attributes[:'conversationSummary']
348
+
349
+
350
+ end
351
+
352
+
353
+ if attributes.has_key?(:'outOfOffice')
354
+
355
+
356
+ self.out_of_office = attributes[:'outOfOffice']
357
+
358
+
359
+ end
360
+
361
+
362
+ if attributes.has_key?(:'geolocation')
363
+
364
+
365
+ self.geolocation = attributes[:'geolocation']
366
+
367
+
368
+ end
369
+
370
+
371
+ if attributes.has_key?(:'station')
372
+
373
+
374
+ self.station = attributes[:'station']
375
+
376
+
377
+ end
378
+
379
+
380
+ if attributes.has_key?(:'authorization')
381
+
382
+
383
+ self.authorization = attributes[:'authorization']
384
+
385
+
386
+ end
387
+
388
+
389
+ if attributes.has_key?(:'profileSkills')
390
+
391
+ if (value = attributes[:'profileSkills']).is_a?(Array)
392
+ self.profile_skills = value
393
+ end
394
+
395
+
396
+
397
+ end
398
+
399
+
400
+ if attributes.has_key?(:'locations')
401
+
402
+ if (value = attributes[:'locations']).is_a?(Array)
403
+ self.locations = value
404
+ end
405
+
406
+
407
+
408
+ end
409
+
410
+
411
+ if attributes.has_key?(:'groups')
412
+
413
+ if (value = attributes[:'groups']).is_a?(Array)
414
+ self.groups = value
415
+ end
416
+
417
+
418
+
419
+ end
420
+
421
+
422
+ if attributes.has_key?(:'organization')
423
+
424
+
425
+ self.organization = attributes[:'organization']
426
+
427
+
428
+ end
429
+
430
+
431
+ end
432
+
433
+ # Show invalid properties with the reasons. Usually used together with valid?
434
+ # @return Array for valid properies with the reasons
435
+ def list_invalid_properties
436
+ invalid_properties = Array.new
437
+
438
+
439
+ return invalid_properties
440
+ end
441
+
442
+ # Check to see if the all the properties in the model are valid
443
+ # @return true if the model is valid
444
+ def valid?
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+ allowed_values = ["active", "inactive", "deleted"]
477
+ if @state && !allowed_values.include?(@state)
478
+ return false
479
+ end
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+
500
+ if @version.nil?
501
+ return false
502
+ end
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+ end
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+
568
+
569
+
570
+
571
+
572
+
573
+
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+ # Custom attribute writer method checking allowed values (enum).
592
+ # @param [Object] state Object to be assigned
593
+ def state=(state)
594
+ allowed_values = ["active", "inactive", "deleted"]
595
+ if state && !allowed_values.include?(state)
596
+ fail ArgumentError, "invalid value for 'state', must be one of #{allowed_values}."
597
+ end
598
+ @state = state
599
+ end
600
+
601
+
602
+
603
+
604
+
605
+
606
+
607
+
608
+
609
+
610
+
611
+
612
+
613
+
614
+
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+ # Checks equality by comparing each attribute.
685
+ # @param [Object] Object to be compared
686
+ def ==(o)
687
+ return true if self.equal?(o)
688
+ self.class == o.class &&
689
+ id == o.id &&
690
+ name == o.name &&
691
+ chat == o.chat &&
692
+ department == o.department &&
693
+ email == o.email &&
694
+ primary_contact_info == o.primary_contact_info &&
695
+ addresses == o.addresses &&
696
+ state == o.state &&
697
+ title == o.title &&
698
+ username == o.username &&
699
+ manager == o.manager &&
700
+ images == o.images &&
701
+ version == o.version &&
702
+ routing_status == o.routing_status &&
703
+ presence == o.presence &&
704
+ conversation_summary == o.conversation_summary &&
705
+ out_of_office == o.out_of_office &&
706
+ geolocation == o.geolocation &&
707
+ station == o.station &&
708
+ authorization == o.authorization &&
709
+ profile_skills == o.profile_skills &&
710
+ locations == o.locations &&
711
+ groups == o.groups &&
712
+ organization == o.organization
713
+ end
714
+
715
+ # @see the `==` method
716
+ # @param [Object] Object to be compared
717
+ def eql?(o)
718
+ self == o
719
+ end
720
+
721
+ # Calculates hash code according to all attributes.
722
+ # @return [Fixnum] Hash code
723
+ def hash
724
+ [id, name, chat, department, email, primary_contact_info, addresses, state, title, username, manager, images, version, routing_status, presence, conversation_summary, out_of_office, geolocation, station, authorization, profile_skills, locations, groups, organization].hash
725
+ end
726
+
727
+ # build the object from hash
728
+ def build_from_hash(attributes)
729
+ return nil unless attributes.is_a?(Hash)
730
+ self.class.swagger_types.each_pair do |key, type|
731
+ if type =~ /^Array<(.*)>/i
732
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
733
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
734
+ else
735
+ #TODO show warning in debug mode
736
+ end
737
+ elsif !attributes[self.class.attribute_map[key]].nil?
738
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
739
+ else
740
+ # data not found in attributes(hash), not an issue as the data can be optional
741
+ end
742
+ end
743
+
744
+ self
745
+ end
746
+
747
+ def _deserialize(type, value)
748
+ case type.to_sym
749
+ when :DateTime
750
+ DateTime.parse(value)
751
+ when :Date
752
+ Date.parse(value)
753
+ when :String
754
+ value.to_s
755
+ when :Integer
756
+ value.to_i
757
+ when :Float
758
+ value.to_f
759
+ when :BOOLEAN
760
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
761
+ true
762
+ else
763
+ false
764
+ end
765
+ when :Object
766
+ # generic object (usually a Hash), return directly
767
+ value
768
+ when /\AArray<(?<inner_type>.+)>\z/
769
+ inner_type = Regexp.last_match[:inner_type]
770
+ value.map { |v| _deserialize(inner_type, v) }
771
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
772
+ k_type = Regexp.last_match[:k_type]
773
+ v_type = Regexp.last_match[:v_type]
774
+ {}.tap do |hash|
775
+ value.each do |k, v|
776
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
777
+ end
778
+ end
779
+ else # model
780
+ _model = Object.const_get("PureCloud").const_get(type).new
781
+ _model.build_from_hash(value)
782
+ end
783
+ end
784
+
785
+ def to_s
786
+ to_hash.to_s
787
+ end
788
+
789
+ # to_body is an alias to to_body (backward compatibility))
790
+ def to_body
791
+ to_hash
792
+ end
793
+
794
+ # return the object in the form of hash
795
+ def to_hash
796
+ hash = {}
797
+ self.class.attribute_map.each_pair do |attr, param|
798
+ value = self.send(attr)
799
+ next if value.nil?
800
+ hash[param] = _to_hash(value)
801
+ end
802
+ hash
803
+ end
804
+
805
+ # Method to output non-array value in the form of hash
806
+ # For object, use to_hash. Otherwise, just return the value
807
+ def _to_hash(value)
808
+ if value.is_a?(Array)
809
+ value.compact.map{ |v| _to_hash(v) }
810
+ elsif value.is_a?(Hash)
811
+ {}.tap do |hash|
812
+ value.each { |k, v| hash[k] = _to_hash(v) }
813
+ end
814
+ elsif value.respond_to? :to_hash
815
+ value.to_hash
816
+ else
817
+ value
818
+ end
819
+ end
820
+
821
+ end
822
+ end