purecloud 0.18.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/Gemfile.lock +2 -2
  4. data/README.md +1 -7
  5. data/config-ruby.json +1 -1
  6. data/extensions/auth.rb +2 -2
  7. data/lib/purecloud.rb +110 -75
  8. data/lib/purecloud/api/architect_api.rb +3127 -74
  9. data/lib/purecloud/api/attributes_api.rb +33 -33
  10. data/lib/purecloud/api/authorization_api.rb +83 -83
  11. data/lib/purecloud/api/compliance_api.rb +5 -5
  12. data/lib/purecloud/api/configuration_api.rb +594 -397
  13. data/lib/purecloud/api/content_management_api.rb +183 -183
  14. data/lib/purecloud/api/conversations_api.rb +289 -159
  15. data/lib/purecloud/api/downloads_api.rb +6 -6
  16. data/lib/purecloud/api/external_contacts_api.rb +1693 -0
  17. data/lib/purecloud/api/fax_api.rb +24 -24
  18. data/lib/purecloud/api/geolocation_api.rb +14 -14
  19. data/lib/purecloud/api/greetings_api.rb +68 -68
  20. data/lib/purecloud/api/groups_api.rb +31 -20
  21. data/lib/purecloud/api/languages_api.rb +18 -11
  22. data/lib/purecloud/api/licensing_api.rb +5 -5
  23. data/lib/purecloud/api/locations_api.rb +11 -11
  24. data/lib/purecloud/api/notifications_api.rb +41 -41
  25. data/lib/purecloud/api/o_auth_api.rb +69 -69
  26. data/lib/purecloud/api/outbound_api.rb +505 -325
  27. data/lib/purecloud/api/presence_api.rb +65 -65
  28. data/lib/purecloud/api/quality_api.rb +66 -639
  29. data/lib/purecloud/api/recording_api.rb +1343 -0
  30. data/lib/purecloud/api/response_management_api.rb +687 -0
  31. data/lib/purecloud/api/routing_api.rb +224 -170
  32. data/lib/purecloud/api/scripts_api.rb +52 -52
  33. data/lib/purecloud/api/search_api.rb +5 -5
  34. data/lib/purecloud/api/stations_api.rb +8 -8
  35. data/lib/purecloud/api/telephony_providers_edge_api.rb +138 -138
  36. data/lib/purecloud/api/user_recordings_api.rb +29 -29
  37. data/lib/purecloud/api/users_api.rb +123 -123
  38. data/lib/purecloud/api/utilities_api.rb +71 -15
  39. data/lib/purecloud/api/voicemail_api.rb +42 -42
  40. data/lib/purecloud/api_client.rb +1 -1
  41. data/lib/purecloud/models/address.rb +49 -51
  42. data/lib/purecloud/models/attribute_filter_item.rb +177 -0
  43. data/lib/purecloud/models/automate_queue_member_entity_listing.rb +238 -0
  44. data/lib/purecloud/models/available_additional_service.rb +40 -1
  45. data/lib/purecloud/models/{topic_entity_listing.rb → available_topic_entity_listing.rb} +1 -1
  46. data/lib/purecloud/models/call.rb +36 -5
  47. data/lib/purecloud/models/{line_properties.rb → call_command.rb} +13 -3
  48. data/lib/purecloud/models/callback.rb +15 -4
  49. data/lib/purecloud/models/campaign.rb +219 -17
  50. data/lib/purecloud/models/campaign_progress.rb +186 -0
  51. data/lib/purecloud/models/channel_topic_entity_listing.rb +238 -0
  52. data/lib/purecloud/models/charge.rb +14 -4
  53. data/lib/purecloud/models/{attribute_value.rb → client_text_table_transform.rb} +52 -82
  54. data/lib/purecloud/models/contact.rb +1 -1
  55. data/lib/purecloud/models/contact_list.rb +111 -1
  56. data/lib/purecloud/models/contact_listing.rb +238 -0
  57. data/lib/purecloud/models/content_attribute_filter_item.rb +177 -0
  58. data/lib/purecloud/models/content_facet_filter_item.rb +1 -1
  59. data/lib/purecloud/models/content_query_request.rb +16 -4
  60. data/lib/purecloud/models/control.rb +221 -0
  61. data/lib/purecloud/models/{flow_activate_request.rb → control_options.rb} +18 -12
  62. data/lib/purecloud/models/create_callback_command.rb +200 -0
  63. data/lib/purecloud/models/discount.rb +220 -0
  64. data/lib/purecloud/models/document.rb +13 -1
  65. data/lib/purecloud/models/document_attribute.rb +158 -0
  66. data/lib/purecloud/models/document_update.rb +28 -16
  67. data/lib/purecloud/models/document_upload.rb +4 -16
  68. data/lib/purecloud/models/domain_voice_rate_extended_response_item_entity_listing.rb +238 -0
  69. data/lib/purecloud/models/domain_voice_rate_international_response_item_entity_listing.rb +238 -0
  70. data/lib/purecloud/models/domain_voice_rate_response_item_entity_listing.rb +1 -1
  71. data/lib/purecloud/models/edge_line.rb +1 -1
  72. data/lib/purecloud/models/edge_logs_job.rb +181 -0
  73. data/lib/purecloud/models/edge_logs_job_file.rb +243 -0
  74. data/lib/purecloud/models/edge_logs_job_request.rb +168 -0
  75. data/lib/purecloud/models/{backend_work_item_data_element.rb → edge_logs_job_response.rb} +16 -24
  76. data/lib/purecloud/models/{flow_lock_request.rb → edge_logs_job_upload_request.rb} +10 -12
  77. data/lib/purecloud/models/email.rb +15 -4
  78. data/lib/purecloud/models/endpoint.rb +1 -1
  79. data/lib/purecloud/models/{flow_associate_workspaces_request.rb → estimated_wait_time_predictions.rb} +10 -11
  80. data/lib/purecloud/models/external_contact.rb +320 -0
  81. data/lib/purecloud/models/external_organization.rb +306 -0
  82. data/lib/purecloud/models/external_organization_listing.rb +238 -0
  83. data/lib/purecloud/models/facet_filter_item.rb +1 -1
  84. data/lib/purecloud/models/flow_body.rb +1 -1
  85. data/lib/purecloud/models/flow_body_format.rb +10 -20
  86. data/lib/purecloud/models/flow_terminate_request.rb +3 -16
  87. data/lib/purecloud/models/form.rb +148 -0
  88. data/lib/purecloud/models/group.rb +11 -1
  89. data/lib/purecloud/models/health_check_info.rb +268 -0
  90. data/lib/purecloud/models/{body_2.rb → inline_response_200.rb} +1 -1
  91. data/lib/purecloud/models/integration_type.rb +209 -0
  92. data/lib/purecloud/models/integration_type_entity_listing.rb +238 -0
  93. data/lib/purecloud/models/key_rotation_schedule.rb +1 -0
  94. data/lib/purecloud/models/language.rb +41 -1
  95. data/lib/purecloud/models/line.rb +1 -1
  96. data/lib/purecloud/models/line_base.rb +1 -1
  97. data/lib/purecloud/models/media_policies.rb +169 -0
  98. data/lib/purecloud/models/media_policy.rb +171 -0
  99. data/lib/purecloud/models/note.rb +200 -0
  100. data/lib/purecloud/models/{user_station_resource.rb → note_listing.rb} +68 -58
  101. data/lib/purecloud/models/o_auth_client.rb +1 -1
  102. data/lib/purecloud/models/page.rb +2 -2
  103. data/lib/purecloud/models/{byte_buffer.rb → payment_method.rb} +48 -61
  104. data/lib/purecloud/models/payment_method_listing.rb +238 -0
  105. data/lib/purecloud/models/payment_token_provider.rb +180 -0
  106. data/lib/purecloud/models/phone.rb +1 -1
  107. data/lib/purecloud/models/phone_base.rb +1 -1
  108. data/lib/purecloud/models/phone_number.rb +198 -0
  109. data/lib/purecloud/models/phones_reboot.rb +14 -4
  110. data/lib/purecloud/models/policy.rb +14 -1
  111. data/lib/purecloud/models/prediction_results.rb +167 -0
  112. data/lib/purecloud/models/query_request.rb +16 -4
  113. data/lib/purecloud/models/queue_member_entity_listing.rb +1 -1
  114. data/lib/purecloud/models/quote.rb +13 -1
  115. data/lib/purecloud/models/recording_settings.rb +146 -0
  116. data/lib/purecloud/models/relationship.rb +201 -0
  117. data/lib/purecloud/models/relationship_listing.rb +238 -0
  118. data/lib/purecloud/models/report_schedule.rb +3 -2
  119. data/lib/purecloud/models/service_type.rb +12 -1
  120. data/lib/purecloud/models/social_expression.rb +25 -4
  121. data/lib/purecloud/models/spreadsheet_transform_entity_listing.rb +1 -1
  122. data/lib/purecloud/models/template.rb +1 -1
  123. data/lib/purecloud/models/text_table_transform_entity_listing.rb +1 -1
  124. data/lib/purecloud/models/ticker.rb +158 -0
  125. data/lib/purecloud/models/time_slot.rb +1 -0
  126. data/lib/purecloud/models/trunk_base.rb +1 -1
  127. data/lib/purecloud/models/vendor_connection_request.rb +166 -0
  128. data/lib/purecloud/models/video.rb +15 -4
  129. data/lib/purecloud/models/work_item_definition.rb +8 -10
  130. data/lib/purecloud/version.rb +1 -1
  131. data/ossindex.json +17 -0
  132. data/purecloud.gemspec +4 -3
  133. data/rakefile +3 -15
  134. data/spec/test.rb +6 -3
  135. data/swagger.json +1 -1
  136. data/swagger_template/api_client.mustache +304 -0
  137. data/swagger_template/base_object.mustache +90 -0
  138. data/{PureCloud.gemspec → swagger_template/gemspec.mustache} +12 -11
  139. data/version.json +1 -1
  140. metadata +76 -25
  141. data/lib/purecloud/api/analytics_api.rb +0 -1554
  142. data/lib/purecloud/api/orphaned_recordings_api.rb +0 -205
  143. data/newVersion.md +0 -1
@@ -1,50 +1,42 @@
1
1
  require 'date'
2
2
 
3
3
  module PureCloud
4
- class AttributeValue
5
- attr_accessor :s
4
+ class ClientTextTableTransform
5
+ attr_accessor :id
6
6
 
7
- attr_accessor :n
7
+ attr_accessor :endpoint_id
8
8
 
9
- attr_accessor :b
9
+ attr_accessor :filename_replaces
10
10
 
11
- attr_accessor :m
11
+ attr_accessor :tags
12
12
 
13
- attr_accessor :l
13
+ attr_accessor :name
14
14
 
15
- attr_accessor :ss
15
+ attr_accessor :comments
16
16
 
17
- attr_accessor :ns
17
+ attr_accessor :delimiter
18
18
 
19
- attr_accessor :bs
20
-
21
- attr_accessor :null
22
-
23
- attr_accessor :bool
19
+ attr_accessor :table
24
20
 
25
21
  # Attribute mapping from ruby-style variable name to JSON key.
26
22
  def self.attribute_map
27
23
  {
28
24
 
29
- :'s' => :'s',
30
-
31
- :'n' => :'n',
32
-
33
- :'b' => :'b',
25
+ :'id' => :'id',
34
26
 
35
- :'m' => :'m',
27
+ :'endpoint_id' => :'endpointId',
36
28
 
37
- :'l' => :'l',
29
+ :'filename_replaces' => :'filenameReplaces',
38
30
 
39
- :'ss' => :'ss',
31
+ :'tags' => :'tags',
40
32
 
41
- :'ns' => :'ns',
33
+ :'name' => :'name',
42
34
 
43
- :'bs' => :'bs',
35
+ :'comments' => :'comments',
44
36
 
45
- :'null' => :'null',
37
+ :'delimiter' => :'delimiter',
46
38
 
47
- :'bool' => :'bool'
39
+ :'table' => :'table'
48
40
 
49
41
  }
50
42
  end
@@ -52,16 +44,14 @@ module PureCloud
52
44
  # Attribute type mapping.
53
45
  def self.swagger_types
54
46
  {
55
- :'s' => :'String',
56
- :'n' => :'String',
57
- :'b' => :'ByteBuffer',
58
- :'m' => :'Hash<String, AttributeValue>',
59
- :'l' => :'Array<AttributeValue>',
60
- :'ss' => :'Array<String>',
61
- :'ns' => :'Array<String>',
62
- :'bs' => :'Array<ByteBuffer>',
63
- :'null' => :'BOOLEAN',
64
- :'bool' => :'BOOLEAN'
47
+ :'id' => :'String',
48
+ :'endpoint_id' => :'String',
49
+ :'filename_replaces' => :'Array<BasicTransform>',
50
+ :'tags' => :'Array<TagModel>',
51
+ :'name' => :'String',
52
+ :'comments' => :'String',
53
+ :'delimiter' => :'String',
54
+ :'table' => :'TableTransform'
65
55
 
66
56
  }
67
57
  end
@@ -73,58 +63,40 @@ module PureCloud
73
63
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
74
64
 
75
65
 
76
- if attributes[:'s']
77
- self.s = attributes[:'s']
66
+ if attributes[:'id']
67
+ self.id = attributes[:'id']
78
68
  end
79
69
 
80
- if attributes[:'n']
81
- self.n = attributes[:'n']
70
+ if attributes[:'endpointId']
71
+ self.endpoint_id = attributes[:'endpointId']
82
72
  end
83
73
 
84
- if attributes[:'b']
85
- self.b = attributes[:'b']
86
- end
87
-
88
- if attributes[:'m']
89
- if (value = attributes[:'m']).is_a?(Array)
90
- self.m = value
74
+ if attributes[:'filenameReplaces']
75
+ if (value = attributes[:'filenameReplaces']).is_a?(Array)
76
+ self.filename_replaces = value
91
77
  end
92
78
  end
93
79
 
94
- if attributes[:'l']
95
- if (value = attributes[:'l']).is_a?(Array)
96
- self.l = value
80
+ if attributes[:'tags']
81
+ if (value = attributes[:'tags']).is_a?(Array)
82
+ self.tags = value
97
83
  end
98
84
  end
99
85
 
100
- if attributes[:'ss']
101
- if (value = attributes[:'ss']).is_a?(Array)
102
- self.ss = value
103
- end
86
+ if attributes[:'name']
87
+ self.name = attributes[:'name']
104
88
  end
105
89
 
106
- if attributes[:'ns']
107
- if (value = attributes[:'ns']).is_a?(Array)
108
- self.ns = value
109
- end
110
- end
111
-
112
- if attributes[:'bs']
113
- if (value = attributes[:'bs']).is_a?(Array)
114
- self.bs = value
115
- end
90
+ if attributes[:'comments']
91
+ self.comments = attributes[:'comments']
116
92
  end
117
93
 
118
- if attributes[:'null']
119
- self.null = attributes[:'null']
120
- else
121
- self.null = false
94
+ if attributes[:'delimiter']
95
+ self.delimiter = attributes[:'delimiter']
122
96
  end
123
97
 
124
- if attributes[:'bool']
125
- self.bool = attributes[:'bool']
126
- else
127
- self.bool = false
98
+ if attributes[:'table']
99
+ self.table = attributes[:'table']
128
100
  end
129
101
 
130
102
  end
@@ -133,16 +105,14 @@ module PureCloud
133
105
  def ==(o)
134
106
  return true if self.equal?(o)
135
107
  self.class == o.class &&
136
- s == o.s &&
137
- n == o.n &&
138
- b == o.b &&
139
- m == o.m &&
140
- l == o.l &&
141
- ss == o.ss &&
142
- ns == o.ns &&
143
- bs == o.bs &&
144
- null == o.null &&
145
- bool == o.bool
108
+ id == o.id &&
109
+ endpoint_id == o.endpoint_id &&
110
+ filename_replaces == o.filename_replaces &&
111
+ tags == o.tags &&
112
+ name == o.name &&
113
+ comments == o.comments &&
114
+ delimiter == o.delimiter &&
115
+ table == o.table
146
116
  end
147
117
 
148
118
  # @see the `==` method
@@ -152,7 +122,7 @@ module PureCloud
152
122
 
153
123
  # Calculate hash code according to all attributes.
154
124
  def hash
155
- [s, n, b, m, l, ss, ns, bs, null, bool].hash
125
+ [id, endpoint_id, filename_replaces, tags, name, comments, delimiter, table].hash
156
126
  end
157
127
 
158
128
  # build the object from hash
@@ -49,7 +49,7 @@ module PureCloud
49
49
  :'id' => :'String',
50
50
  :'name' => :'String',
51
51
  :'contact_list_id' => :'String',
52
- :'data' => :'Hash<String, Line_properties>',
52
+ :'data' => :'Hash<String, inline_response_200>',
53
53
  :'call_records' => :'Hash<String, CallRecord>',
54
54
  :'callable' => :'BOOLEAN',
55
55
  :'phone_number_status' => :'Hash<String, PhoneNumberStatus>',
@@ -2,8 +2,32 @@ require 'date'
2
2
 
3
3
  module PureCloud
4
4
  class ContactList
5
+ # The globally unique identifier for the object.
5
6
  attr_accessor :id
6
7
 
8
+ attr_accessor :name
9
+
10
+ # Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
11
+ attr_accessor :date_created
12
+
13
+ # Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
14
+ attr_accessor :date_modified
15
+
16
+ attr_accessor :version
17
+
18
+ attr_accessor :column_names
19
+
20
+ attr_accessor :phone_columns
21
+
22
+ attr_accessor :import_status
23
+
24
+ attr_accessor :preview_mode_column_name
25
+
26
+ attr_accessor :preview_mode_accepted_values
27
+
28
+ attr_accessor :size
29
+
30
+ # The URI for this object
7
31
  attr_accessor :self_uri
8
32
 
9
33
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -12,6 +36,26 @@ module PureCloud
12
36
 
13
37
  :'id' => :'id',
14
38
 
39
+ :'name' => :'name',
40
+
41
+ :'date_created' => :'dateCreated',
42
+
43
+ :'date_modified' => :'dateModified',
44
+
45
+ :'version' => :'version',
46
+
47
+ :'column_names' => :'columnNames',
48
+
49
+ :'phone_columns' => :'phoneColumns',
50
+
51
+ :'import_status' => :'importStatus',
52
+
53
+ :'preview_mode_column_name' => :'previewModeColumnName',
54
+
55
+ :'preview_mode_accepted_values' => :'previewModeAcceptedValues',
56
+
57
+ :'size' => :'size',
58
+
15
59
  :'self_uri' => :'selfUri'
16
60
 
17
61
  }
@@ -21,6 +65,16 @@ module PureCloud
21
65
  def self.swagger_types
22
66
  {
23
67
  :'id' => :'String',
68
+ :'name' => :'String',
69
+ :'date_created' => :'DateTime',
70
+ :'date_modified' => :'DateTime',
71
+ :'version' => :'Integer',
72
+ :'column_names' => :'Array<String>',
73
+ :'phone_columns' => :'Array<PhoneNumberColumn>',
74
+ :'import_status' => :'ImportStatus',
75
+ :'preview_mode_column_name' => :'String',
76
+ :'preview_mode_accepted_values' => :'Array<String>',
77
+ :'size' => :'Integer',
24
78
  :'self_uri' => :'String'
25
79
 
26
80
  }
@@ -37,6 +91,52 @@ module PureCloud
37
91
  self.id = attributes[:'id']
38
92
  end
39
93
 
94
+ if attributes[:'name']
95
+ self.name = attributes[:'name']
96
+ end
97
+
98
+ if attributes[:'dateCreated']
99
+ self.date_created = attributes[:'dateCreated']
100
+ end
101
+
102
+ if attributes[:'dateModified']
103
+ self.date_modified = attributes[:'dateModified']
104
+ end
105
+
106
+ if attributes[:'version']
107
+ self.version = attributes[:'version']
108
+ end
109
+
110
+ if attributes[:'columnNames']
111
+ if (value = attributes[:'columnNames']).is_a?(Array)
112
+ self.column_names = value
113
+ end
114
+ end
115
+
116
+ if attributes[:'phoneColumns']
117
+ if (value = attributes[:'phoneColumns']).is_a?(Array)
118
+ self.phone_columns = value
119
+ end
120
+ end
121
+
122
+ if attributes[:'importStatus']
123
+ self.import_status = attributes[:'importStatus']
124
+ end
125
+
126
+ if attributes[:'previewModeColumnName']
127
+ self.preview_mode_column_name = attributes[:'previewModeColumnName']
128
+ end
129
+
130
+ if attributes[:'previewModeAcceptedValues']
131
+ if (value = attributes[:'previewModeAcceptedValues']).is_a?(Array)
132
+ self.preview_mode_accepted_values = value
133
+ end
134
+ end
135
+
136
+ if attributes[:'size']
137
+ self.size = attributes[:'size']
138
+ end
139
+
40
140
  if attributes[:'selfUri']
41
141
  self.self_uri = attributes[:'selfUri']
42
142
  end
@@ -48,6 +148,16 @@ module PureCloud
48
148
  return true if self.equal?(o)
49
149
  self.class == o.class &&
50
150
  id == o.id &&
151
+ name == o.name &&
152
+ date_created == o.date_created &&
153
+ date_modified == o.date_modified &&
154
+ version == o.version &&
155
+ column_names == o.column_names &&
156
+ phone_columns == o.phone_columns &&
157
+ import_status == o.import_status &&
158
+ preview_mode_column_name == o.preview_mode_column_name &&
159
+ preview_mode_accepted_values == o.preview_mode_accepted_values &&
160
+ size == o.size &&
51
161
  self_uri == o.self_uri
52
162
  end
53
163
 
@@ -58,7 +168,7 @@ module PureCloud
58
168
 
59
169
  # Calculate hash code according to all attributes.
60
170
  def hash
61
- [id, self_uri].hash
171
+ [id, name, date_created, date_modified, version, column_names, phone_columns, import_status, preview_mode_column_name, preview_mode_accepted_values, size, self_uri].hash
62
172
  end
63
173
 
64
174
  # build the object from hash
@@ -0,0 +1,238 @@
1
+ require 'date'
2
+
3
+ module PureCloud
4
+ class ContactListing
5
+ attr_accessor :page_size
6
+
7
+ attr_accessor :page_number
8
+
9
+ attr_accessor :total
10
+
11
+ attr_accessor :entities
12
+
13
+ attr_accessor :self_uri
14
+
15
+ attr_accessor :first_uri
16
+
17
+ attr_accessor :previous_uri
18
+
19
+ attr_accessor :next_uri
20
+
21
+ attr_accessor :last_uri
22
+
23
+ attr_accessor :page_count
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+
29
+ :'page_size' => :'pageSize',
30
+
31
+ :'page_number' => :'pageNumber',
32
+
33
+ :'total' => :'total',
34
+
35
+ :'entities' => :'entities',
36
+
37
+ :'self_uri' => :'selfUri',
38
+
39
+ :'first_uri' => :'firstUri',
40
+
41
+ :'previous_uri' => :'previousUri',
42
+
43
+ :'next_uri' => :'nextUri',
44
+
45
+ :'last_uri' => :'lastUri',
46
+
47
+ :'page_count' => :'pageCount'
48
+
49
+ }
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.swagger_types
54
+ {
55
+ :'page_size' => :'Integer',
56
+ :'page_number' => :'Integer',
57
+ :'total' => :'Integer',
58
+ :'entities' => :'Array<ExternalContact>',
59
+ :'self_uri' => :'String',
60
+ :'first_uri' => :'String',
61
+ :'previous_uri' => :'String',
62
+ :'next_uri' => :'String',
63
+ :'last_uri' => :'String',
64
+ :'page_count' => :'Integer'
65
+
66
+ }
67
+ end
68
+
69
+ def initialize(attributes = {})
70
+ return unless attributes.is_a?(Hash)
71
+
72
+ # convert string to symbol for hash key
73
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
74
+
75
+
76
+ if attributes[:'pageSize']
77
+ self.page_size = attributes[:'pageSize']
78
+ end
79
+
80
+ if attributes[:'pageNumber']
81
+ self.page_number = attributes[:'pageNumber']
82
+ end
83
+
84
+ if attributes[:'total']
85
+ self.total = attributes[:'total']
86
+ end
87
+
88
+ if attributes[:'entities']
89
+ if (value = attributes[:'entities']).is_a?(Array)
90
+ self.entities = value
91
+ end
92
+ end
93
+
94
+ if attributes[:'selfUri']
95
+ self.self_uri = attributes[:'selfUri']
96
+ end
97
+
98
+ if attributes[:'firstUri']
99
+ self.first_uri = attributes[:'firstUri']
100
+ end
101
+
102
+ if attributes[:'previousUri']
103
+ self.previous_uri = attributes[:'previousUri']
104
+ end
105
+
106
+ if attributes[:'nextUri']
107
+ self.next_uri = attributes[:'nextUri']
108
+ end
109
+
110
+ if attributes[:'lastUri']
111
+ self.last_uri = attributes[:'lastUri']
112
+ end
113
+
114
+ if attributes[:'pageCount']
115
+ self.page_count = attributes[:'pageCount']
116
+ end
117
+
118
+ end
119
+
120
+ # Check equality by comparing each attribute.
121
+ def ==(o)
122
+ return true if self.equal?(o)
123
+ self.class == o.class &&
124
+ page_size == o.page_size &&
125
+ page_number == o.page_number &&
126
+ total == o.total &&
127
+ entities == o.entities &&
128
+ self_uri == o.self_uri &&
129
+ first_uri == o.first_uri &&
130
+ previous_uri == o.previous_uri &&
131
+ next_uri == o.next_uri &&
132
+ last_uri == o.last_uri &&
133
+ page_count == o.page_count
134
+ end
135
+
136
+ # @see the `==` method
137
+ def eql?(o)
138
+ self == o
139
+ end
140
+
141
+ # Calculate hash code according to all attributes.
142
+ def hash
143
+ [page_size, page_number, total, entities, self_uri, first_uri, previous_uri, next_uri, last_uri, page_count].hash
144
+ end
145
+
146
+ # build the object from hash
147
+ def build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ self.class.swagger_types.each_pair do |key, type|
150
+ if type =~ /^Array<(.*)>/i
151
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
152
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
153
+ else
154
+ #TODO show warning in debug mode
155
+ end
156
+ elsif !attributes[self.class.attribute_map[key]].nil?
157
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
+ else
159
+ # data not found in attributes(hash), not an issue as the data can be optional
160
+ end
161
+ end
162
+
163
+ self
164
+ end
165
+
166
+ def _deserialize(type, value)
167
+ case type.to_sym
168
+ when :DateTime
169
+ DateTime.parse(value)
170
+ when :Date
171
+ Date.parse(value)
172
+ when :String
173
+ value.to_s
174
+ when :Integer
175
+ value.to_i
176
+ when :Float
177
+ value.to_f
178
+ when :BOOLEAN
179
+ if value =~ /^(true|t|yes|y|1)$/i
180
+ true
181
+ else
182
+ false
183
+ end
184
+ when /\AArray<(?<inner_type>.+)>\z/
185
+ inner_type = Regexp.last_match[:inner_type]
186
+ value.map { |v| _deserialize(inner_type, v) }
187
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
188
+ k_type = Regexp.last_match[:k_type]
189
+ v_type = Regexp.last_match[:v_type]
190
+ {}.tap do |hash|
191
+ value.each do |k, v|
192
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
+ end
194
+ end
195
+ else # model
196
+ _model = Object.const_get("PureCloud").const_get(type).new
197
+ _model.build_from_hash(value)
198
+ end
199
+ end
200
+
201
+ def to_s
202
+ to_hash.to_s
203
+ end
204
+
205
+ # to_body is an alias to to_body (backward compatibility))
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # return the object in the form of hash
211
+ def to_hash
212
+ hash = {}
213
+ self.class.attribute_map.each_pair do |attr, param|
214
+ value = self.send(attr)
215
+ next if value.nil?
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Method to output non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map{ |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+
237
+ end
238
+ end