purecloud 0.40.1 → 0.41.1

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 (123) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/config-ruby.json +1 -1
  4. data/doc_out/AdditionalInfo.html.md +12 -0
  5. data/doc_out/{Entity.html.md → AuthzPerm.html.md} +3 -5
  6. data/doc_out/AuthzPermissionContext.html.md +1 -1
  7. data/doc_out/CallableTimeSet.html.md +1 -1
  8. data/doc_out/Callback.html.md +1 -0
  9. data/doc_out/CallbackIdentifier.html.md +14 -0
  10. data/doc_out/CallbackMediaParticipant.html.md +1 -0
  11. data/doc_out/ContentManagementApi.html.md +51 -0
  12. data/doc_out/ConversationsApi.html.md +120 -0
  13. data/doc_out/CreateCallbackCommand.html.md +2 -0
  14. data/doc_out/CreateCallbackResponse.html.md +14 -0
  15. data/doc_out/Dependency.html.md +1 -0
  16. data/doc_out/DependencyObject.html.md +1 -0
  17. data/doc_out/DomainEdgeSoftwareVersionDto.html.md +1 -1
  18. data/doc_out/GroupSearchCriteria.html.md +20 -0
  19. data/doc_out/GroupSearchRequest.html.md +19 -0
  20. data/doc_out/GroupsApi.html.md +2 -2
  21. data/doc_out/GroupsSearchResponse.html.md +1 -0
  22. data/doc_out/Integration.html.md +20 -0
  23. data/doc_out/IntegrationConfiguration.html.md +20 -0
  24. data/doc_out/{DeletedResourceConsumerEntityListing.html.md → IntegrationEntityListing.html.md} +3 -3
  25. data/doc_out/IntegrationStatusInfo.html.md +16 -0
  26. data/doc_out/IntegrationType.html.md +5 -3
  27. data/doc_out/JsonNode.html.md +1 -1
  28. data/doc_out/JsonNodeSearchResponse.html.md +1 -0
  29. data/doc_out/LocationSearchCriteria.html.md +20 -0
  30. data/doc_out/LocationSearchRequest.html.md +19 -0
  31. data/doc_out/LocationsApi.html.md +6 -6
  32. data/doc_out/LocationsSearchResponse.html.md +22 -0
  33. data/doc_out/NumberOrder.html.md +27 -0
  34. data/doc_out/PortBillingAddress.html.md +17 -0
  35. data/doc_out/PortContact.html.md +14 -0
  36. data/doc_out/PresenceApi.html.md +1 -1
  37. data/doc_out/QualityAudit.html.md +1 -1
  38. data/doc_out/RecordingApi.html.md +4 -2
  39. data/doc_out/ResponseSet.html.md +1 -1
  40. data/doc_out/RoutingData.html.md +17 -0
  41. data/doc_out/RuleSet.html.md +1 -1
  42. data/doc_out/SearchAggregation.html.md +3 -0
  43. data/doc_out/SearchApi.html.md +12 -12
  44. data/doc_out/SearchCriteria.html.md +1 -1
  45. data/doc_out/SearchRequest.html.md +3 -3
  46. data/doc_out/SuggestApi.html.md +2 -2
  47. data/doc_out/SuggestSearchCriteria.html.md +19 -0
  48. data/doc_out/SuggestSearchRequest.html.md +14 -0
  49. data/doc_out/Usage.html.md +13 -0
  50. data/doc_out/UsageItem.html.md +15 -0
  51. data/doc_out/UserSearchCriteria.html.md +20 -0
  52. data/doc_out/UserSearchRequest.html.md +19 -0
  53. data/doc_out/UsersApi.html.md +2 -120
  54. data/doc_out/UsersSearchResponse.html.md +1 -0
  55. data/doc_out/VoicemailMessageEntityListing.html.md +0 -7
  56. data/doc_out/Workspace.html.md +1 -0
  57. data/doc_out/WorkspaceCreate.html.md +1 -0
  58. data/doc_out/WorkspaceSummary.html.md +1 -0
  59. data/doc_out/index.html.md +3 -3
  60. data/lib/purecloud/api/content_management_api.rb +55 -0
  61. data/lib/purecloud/api/conversations_api.rb +121 -0
  62. data/lib/purecloud/api/groups_api.rb +6 -6
  63. data/lib/purecloud/api/languages_api.rb +2 -2
  64. data/lib/purecloud/api/locations_api.rb +8 -8
  65. data/lib/purecloud/api/presence_api.rb +2 -2
  66. data/lib/purecloud/api/recording_api.rb +5 -2
  67. data/lib/purecloud/api/routing_api.rb +2 -2
  68. data/lib/purecloud/api/search_api.rb +14 -14
  69. data/lib/purecloud/api/suggest_api.rb +2 -2
  70. data/lib/purecloud/api/users_api.rb +6 -128
  71. data/lib/purecloud/api_client.rb +1 -1
  72. data/lib/purecloud/models/additional_info.rb +155 -0
  73. data/lib/purecloud/models/authz_perm.rb +177 -0
  74. data/lib/purecloud/models/authz_permission_context.rb +7 -7
  75. data/lib/purecloud/models/callback.rb +15 -4
  76. data/lib/purecloud/models/{entity.rb → callback_identifier.rb} +15 -24
  77. data/lib/purecloud/models/callback_media_participant.rb +15 -4
  78. data/lib/purecloud/models/contact.rb +1 -1
  79. data/lib/purecloud/models/create_callback_command.rb +24 -4
  80. data/lib/purecloud/models/create_callback_response.rb +179 -0
  81. data/lib/purecloud/models/dependency.rb +13 -1
  82. data/lib/purecloud/models/dependency_object.rb +13 -1
  83. data/lib/purecloud/models/domain_edge_software_version_dto.rb +13 -13
  84. data/lib/purecloud/models/group_search_criteria.rb +260 -0
  85. data/lib/purecloud/models/group_search_request.rb +240 -0
  86. data/lib/purecloud/models/groups_search_response.rb +16 -4
  87. data/lib/purecloud/models/integration.rb +252 -0
  88. data/lib/purecloud/models/integration_configuration.rb +243 -0
  89. data/lib/purecloud/models/{deleted_resource_consumer_entity_listing.rb → integration_entity_listing.rb} +2 -2
  90. data/lib/purecloud/models/integration_status_info.rb +209 -0
  91. data/lib/purecloud/models/integration_type.rb +27 -1
  92. data/lib/purecloud/models/json_node.rb +13 -13
  93. data/lib/purecloud/models/json_node_search_response.rb +14 -4
  94. data/lib/purecloud/models/location_search_criteria.rb +260 -0
  95. data/lib/purecloud/models/location_search_request.rb +240 -0
  96. data/lib/purecloud/models/locations_search_response.rb +261 -0
  97. data/lib/purecloud/models/number_order.rb +339 -0
  98. data/lib/purecloud/models/number_order_request.rb +1 -1
  99. data/lib/purecloud/models/port_billing_address.rb +205 -0
  100. data/lib/purecloud/models/port_contact.rb +175 -0
  101. data/lib/purecloud/models/quality_audit.rb +1 -1
  102. data/lib/purecloud/models/reservation.rb +1 -1
  103. data/lib/purecloud/models/routing_data.rb +209 -0
  104. data/lib/purecloud/models/search_aggregation.rb +37 -5
  105. data/lib/purecloud/models/search_criteria.rb +22 -22
  106. data/lib/purecloud/models/search_request.rb +40 -39
  107. data/lib/purecloud/models/suggest_search_criteria.rb +240 -0
  108. data/lib/purecloud/models/suggest_search_request.rb +180 -0
  109. data/lib/purecloud/models/usage.rb +167 -0
  110. data/lib/purecloud/models/usage_item.rb +194 -0
  111. data/lib/purecloud/models/user_search_criteria.rb +260 -0
  112. data/lib/purecloud/models/user_search_request.rb +240 -0
  113. data/lib/purecloud/models/users_search_response.rb +16 -4
  114. data/lib/purecloud/models/voicemail_message_entity_listing.rb +4 -74
  115. data/lib/purecloud/models/workspace.rb +11 -1
  116. data/lib/purecloud/models/workspace_create.rb +14 -4
  117. data/lib/purecloud/models/workspace_summary.rb +14 -4
  118. data/lib/purecloud/version.rb +1 -1
  119. data/lib/purecloud.rb +23 -2
  120. data/newVersion.md +1 -1
  121. data/swagger.json +1 -1
  122. data/version.json +1 -1
  123. metadata +48 -6
@@ -0,0 +1,339 @@
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@inin.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 NumberOrder
21
+ # The globally unique identifier for the object.
22
+ attr_accessor :id
23
+
24
+ attr_accessor :name
25
+
26
+ # DID purchased
27
+ attr_accessor :did
28
+
29
+ # Effective date of service for this order. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
30
+ attr_accessor :effective_start_date
31
+
32
+ # Effective disconnection date for this order. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
33
+ attr_accessor :effective_end_date
34
+
35
+ # Date of last update. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
36
+ attr_accessor :last_updated
37
+
38
+ # UserId authorizing purchase
39
+ attr_accessor :start_auth_user_id
40
+
41
+ # UserId authorizing disconnection
42
+ attr_accessor :end_auth_user_id
43
+
44
+ # Current status of this DID order
45
+ attr_accessor :status
46
+
47
+ # Class of DID being purchased (eg. us-domestic, toll-free, etc)
48
+ attr_accessor :phone_number_type
49
+
50
+ # Whether or not the number was ported
51
+ attr_accessor :porting
52
+
53
+ # Billing address used for a number port
54
+ attr_accessor :billing_address
55
+
56
+ # Company contact for a number port
57
+ attr_accessor :responsible_contact
58
+
59
+ # Company name for a number port
60
+ attr_accessor :company_name
61
+
62
+ # The URI for this object
63
+ attr_accessor :self_uri
64
+
65
+ # Attribute mapping from ruby-style variable name to JSON key.
66
+ def self.attribute_map
67
+ {
68
+
69
+ :'id' => :'id',
70
+
71
+ :'name' => :'name',
72
+
73
+ :'did' => :'did',
74
+
75
+ :'effective_start_date' => :'effectiveStartDate',
76
+
77
+ :'effective_end_date' => :'effectiveEndDate',
78
+
79
+ :'last_updated' => :'lastUpdated',
80
+
81
+ :'start_auth_user_id' => :'startAuthUserId',
82
+
83
+ :'end_auth_user_id' => :'endAuthUserId',
84
+
85
+ :'status' => :'status',
86
+
87
+ :'phone_number_type' => :'phoneNumberType',
88
+
89
+ :'porting' => :'porting',
90
+
91
+ :'billing_address' => :'billingAddress',
92
+
93
+ :'responsible_contact' => :'responsibleContact',
94
+
95
+ :'company_name' => :'companyName',
96
+
97
+ :'self_uri' => :'selfUri'
98
+
99
+ }
100
+ end
101
+
102
+ # Attribute type mapping.
103
+ def self.swagger_types
104
+ {
105
+ :'id' => :'String',
106
+ :'name' => :'String',
107
+ :'did' => :'String',
108
+ :'effective_start_date' => :'DateTime',
109
+ :'effective_end_date' => :'DateTime',
110
+ :'last_updated' => :'DateTime',
111
+ :'start_auth_user_id' => :'String',
112
+ :'end_auth_user_id' => :'String',
113
+ :'status' => :'String',
114
+ :'phone_number_type' => :'String',
115
+ :'porting' => :'BOOLEAN',
116
+ :'billing_address' => :'PortBillingAddress',
117
+ :'responsible_contact' => :'PortContact',
118
+ :'company_name' => :'String',
119
+ :'self_uri' => :'String'
120
+
121
+ }
122
+ end
123
+
124
+ def initialize(attributes = {})
125
+ return unless attributes.is_a?(Hash)
126
+
127
+ # convert string to symbol for hash key
128
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
129
+
130
+
131
+ if attributes[:'id']
132
+ self.id = attributes[:'id']
133
+ end
134
+
135
+ if attributes[:'name']
136
+ self.name = attributes[:'name']
137
+ end
138
+
139
+ if attributes[:'did']
140
+ self.did = attributes[:'did']
141
+ end
142
+
143
+ if attributes[:'effectiveStartDate']
144
+ self.effective_start_date = attributes[:'effectiveStartDate']
145
+ end
146
+
147
+ if attributes[:'effectiveEndDate']
148
+ self.effective_end_date = attributes[:'effectiveEndDate']
149
+ end
150
+
151
+ if attributes[:'lastUpdated']
152
+ self.last_updated = attributes[:'lastUpdated']
153
+ end
154
+
155
+ if attributes[:'startAuthUserId']
156
+ self.start_auth_user_id = attributes[:'startAuthUserId']
157
+ end
158
+
159
+ if attributes[:'endAuthUserId']
160
+ self.end_auth_user_id = attributes[:'endAuthUserId']
161
+ end
162
+
163
+ if attributes[:'status']
164
+ self.status = attributes[:'status']
165
+ end
166
+
167
+ if attributes[:'phoneNumberType']
168
+ self.phone_number_type = attributes[:'phoneNumberType']
169
+ end
170
+
171
+ if attributes[:'porting']
172
+ self.porting = attributes[:'porting']
173
+ else
174
+ self.porting = false
175
+ end
176
+
177
+ if attributes[:'billingAddress']
178
+ self.billing_address = attributes[:'billingAddress']
179
+ end
180
+
181
+ if attributes[:'responsibleContact']
182
+ self.responsible_contact = attributes[:'responsibleContact']
183
+ end
184
+
185
+ if attributes[:'companyName']
186
+ self.company_name = attributes[:'companyName']
187
+ end
188
+
189
+ if attributes[:'selfUri']
190
+ self.self_uri = attributes[:'selfUri']
191
+ end
192
+
193
+ end
194
+
195
+ # Custom attribute writer method checking allowed values (enum).
196
+ def status=(status)
197
+ allowed_values = ["COMPLETE", "CONNECTING", "FAILED", "BACKORDERED", "PENDING", "ACTIVATING", "ACTIVATION_ERROR", "ERROR", "DISCONNECTED", "DISCONNECT_PENDING", "DEACTIVATING", "DEACTIVATION_ERROR", "DISCONNECT_FAILED", "SUBMITTED", "REJECTED", "SUPP", "PORT_PENDING", "FOC"]
198
+ if status && !allowed_values.include?(status)
199
+ fail "invalid value for 'status', must be one of #{allowed_values}"
200
+ end
201
+ @status = status
202
+ end
203
+
204
+ # Custom attribute writer method checking allowed values (enum).
205
+ def phone_number_type=(phone_number_type)
206
+ allowed_values = ["TOLL_FREE", "CN_DOMESTIC", "US_DOMESTIC", "US_TOLLFREE", "XA_TOLLFREE", "XB_TOLLFREE", "XC_TOLLFREE", "AG_DID", "AI_DID", "BB_DID", "BM_DID", "BS_DID", "CA_DID", "DM_DID", "DO_DID", "GD_DID", "JM_DID", "KN_DID", "KY_DID", "KZ_DID", "LC_DID", "MP_DID", "MS_DID", "RU_DID", "TC_DID", "TT_DID", "US_DID", "VC_DID", "VG_DID", "AF_DID", "AR_DID", "AT_DID", "AU_DID", "BE_DID", "BR_DID", "CH_DID", "CL_DID", "CN_DID", "CO_DID", "CU_DID", "DE_DID", "DK_DID", "EG_DID", "ES_DID", "FR_DID", "GB_DID", "GR_DID", "HU_DID", "ID_DID", "IN_DID", "IR_DID", "IT_DID", "JP_DID", "KR_DID", "LK_DID", "MM_DID", "MX_DID", "MY_DID", "NL_DID", "NO_DID", "NZ_DID", "PE_DID", "PH_DID", "PK_DID", "PL_DID", "RO_DID", "SE_DID", "SG_DID", "TH_DID", "TR_DID", "VE_DID", "VN_DID", "ZA_DID", "AD_DID", "AE_DID", "AL_DID", "AM_DID", "AO_DID", "AQ_DID", "AW_DID", "AZ_DID", "BA_DID", "BD_DID", "BF_DID", "BG_DID", "BH_DID", "BI_DID", "BJ_DID", "BL_DID", "BN_DID", "BO_DID", "BQ_DID", "BT_DID", "BW_DID", "BY_DID", "BZ_DID", "CD_DID", "CF_DID", "CG_DID", "CI_DID", "CK_DID", "CM_DID", "CR_DID", "CV_DID", "CY_DID", "CZ_DID", "DJ_DID", "DZ_DID", "EC_DID", "EE_DID", "EH_DID", "ER_DID", "ET_DID", "FI_DID", "FJ_DID", "FK_DID", "FM_DID", "FO_DID", "GA_DID", "GE_DID", "GF_DID", "GH_DID", "GI_DID", "GL_DID", "GM_DID", "GN_DID", "GP_DID", "GQ_DID", "GT_DID", "GW_DID", "GY_DID", "HK_DID", "HN_DID", "HR_DID", "HT_DID", "IE_DID", "IL_DID", "IO_DID", "IQ_DID", "IS_DID", "JO_DID", "KE_DID", "KG_DID", "KH_DID", "KI_DID", "KM_DID", "KP_DID", "KW_DID", "LA_DID", "LB_DID", "LI_DID", "LR_DID", "LS_DID", "LT_DID", "LU_DID", "LV_DID", "LY_DID", "MA_DID", "MC_DID", "MD_DID", "ME_DID", "MF_DID", "MG_DID", "MH_DID", "MK_DID", "ML_DID", "MN_DID", "MO_DID", "MQ_DID", "MR_DID", "MT_DID", "MU_DID", "MV_DID", "MW_DID", "MZ_DID", "NA_DID", "NC_DID", "NE_DID", "NF_DID", "NG_DID", "NI_DID", "NP_DID", "NR_DID", "NU_DID", "OM_DID", "PA_DID", "PF_DID", "PG_DID", "PM_DID", "PS_DID", "PT_DID", "PW_DID", "PY_DID", "QA_DID", "RE_DID", "RS_DID", "RW_DID", "SA_DID", "SB_DID", "SC_DID", "SD_DID", "SH_247_DID", "SH_290_DID", "SI_DID", "SK_DID", "SL_DID", "SM_DID", "SN_DID", "SO_DID", "SR_DID", "SS_DID", "ST_DID", "SV_DID", "SY_DID", "SZ_DID", "TD_DID", "TG_DID", "TJ_DID", "TK_DID", "TL_DID", "TM_DID", "TN_DID", "TO_DID", "TV_DID", "TW_DID", "TZ_DID", "UA_DID", "UG_DID", "UY_DID", "UZ_DID", "VU_DID", "WF_DID", "WS_DID", "XG_DID", "XN_DID", "XV_882_DID", "XV_883_DID", "YE_DID", "YT_DID", "ZM_DID", "ZW_DID", "SX_DID"]
207
+ if phone_number_type && !allowed_values.include?(phone_number_type)
208
+ fail "invalid value for 'phone_number_type', must be one of #{allowed_values}"
209
+ end
210
+ @phone_number_type = phone_number_type
211
+ end
212
+
213
+ # Check equality by comparing each attribute.
214
+ def ==(o)
215
+ return true if self.equal?(o)
216
+ self.class == o.class &&
217
+ id == o.id &&
218
+ name == o.name &&
219
+ did == o.did &&
220
+ effective_start_date == o.effective_start_date &&
221
+ effective_end_date == o.effective_end_date &&
222
+ last_updated == o.last_updated &&
223
+ start_auth_user_id == o.start_auth_user_id &&
224
+ end_auth_user_id == o.end_auth_user_id &&
225
+ status == o.status &&
226
+ phone_number_type == o.phone_number_type &&
227
+ porting == o.porting &&
228
+ billing_address == o.billing_address &&
229
+ responsible_contact == o.responsible_contact &&
230
+ company_name == o.company_name &&
231
+ self_uri == o.self_uri
232
+ end
233
+
234
+ # @see the `==` method
235
+ def eql?(o)
236
+ self == o
237
+ end
238
+
239
+ # Calculate hash code according to all attributes.
240
+ def hash
241
+ [id, name, did, effective_start_date, effective_end_date, last_updated, start_auth_user_id, end_auth_user_id, status, phone_number_type, porting, billing_address, responsible_contact, company_name, self_uri].hash
242
+ end
243
+
244
+ # build the object from hash
245
+ def build_from_hash(attributes)
246
+ return nil unless attributes.is_a?(Hash)
247
+ self.class.swagger_types.each_pair do |key, type|
248
+ if type =~ /^Array<(.*)>/i
249
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
250
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
251
+ else
252
+ #TODO show warning in debug mode
253
+ end
254
+ elsif !attributes[self.class.attribute_map[key]].nil?
255
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
256
+ else
257
+ # data not found in attributes(hash), not an issue as the data can be optional
258
+ end
259
+ end
260
+
261
+ self
262
+ end
263
+
264
+ def _deserialize(type, value)
265
+ case type.to_sym
266
+ when :DateTime
267
+ DateTime.parse(value)
268
+ when :Date
269
+ Date.parse(value)
270
+ when :String
271
+ value.to_s
272
+ when :Integer
273
+ value.to_i
274
+ when :Float
275
+ value.to_f
276
+ when :BOOLEAN
277
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
278
+ true
279
+ else
280
+ false
281
+ end
282
+ when :Object
283
+ # generic object (usually a Hash), return directly
284
+ value
285
+ when /\AArray<(?<inner_type>.+)>\z/
286
+ inner_type = Regexp.last_match[:inner_type]
287
+ value.map { |v| _deserialize(inner_type, v) }
288
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
289
+ k_type = Regexp.last_match[:k_type]
290
+ v_type = Regexp.last_match[:v_type]
291
+ {}.tap do |hash|
292
+ value.each do |k, v|
293
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
294
+ end
295
+ end
296
+ else # model
297
+ _model = Object.const_get("PureCloud").const_get(type).new
298
+ _model.build_from_hash(value)
299
+ end
300
+ end
301
+
302
+ def to_s
303
+ to_hash.to_s
304
+ end
305
+
306
+ # to_body is an alias to to_body (backward compatibility))
307
+ def to_body
308
+ to_hash
309
+ end
310
+
311
+ # return the object in the form of hash
312
+ def to_hash
313
+ hash = {}
314
+ self.class.attribute_map.each_pair do |attr, param|
315
+ value = self.send(attr)
316
+ next if value.nil?
317
+ hash[param] = _to_hash(value)
318
+ end
319
+ hash
320
+ end
321
+
322
+ # Method to output non-array value in the form of hash
323
+ # For object, use to_hash. Otherwise, just return the value
324
+ def _to_hash(value)
325
+ if value.is_a?(Array)
326
+ value.compact.map{ |v| _to_hash(v) }
327
+ elsif value.is_a?(Hash)
328
+ {}.tap do |hash|
329
+ value.each { |k, v| hash[k] = _to_hash(v) }
330
+ end
331
+ elsif value.respond_to? :to_hash
332
+ value.to_hash
333
+ else
334
+ value
335
+ end
336
+ end
337
+
338
+ end
339
+ end
@@ -94,7 +94,7 @@ module PureCloud
94
94
 
95
95
  # Custom attribute writer method checking allowed values (enum).
96
96
  def phone_number_type=(phone_number_type)
97
- allowed_values = ["TOLL_FREE", "CN_DOMESTIC", "US_DOMESTIC"]
97
+ allowed_values = ["TOLL_FREE", "CN_DOMESTIC", "US_DOMESTIC", "US_TOLLFREE", "XA_TOLLFREE", "XB_TOLLFREE", "XC_TOLLFREE", "AG_DID", "AI_DID", "BB_DID", "BM_DID", "BS_DID", "CA_DID", "DM_DID", "DO_DID", "GD_DID", "JM_DID", "KN_DID", "KY_DID", "KZ_DID", "LC_DID", "MP_DID", "MS_DID", "RU_DID", "TC_DID", "TT_DID", "US_DID", "VC_DID", "VG_DID", "AF_DID", "AR_DID", "AT_DID", "AU_DID", "BE_DID", "BR_DID", "CH_DID", "CL_DID", "CN_DID", "CO_DID", "CU_DID", "DE_DID", "DK_DID", "EG_DID", "ES_DID", "FR_DID", "GB_DID", "GR_DID", "HU_DID", "ID_DID", "IN_DID", "IR_DID", "IT_DID", "JP_DID", "KR_DID", "LK_DID", "MM_DID", "MX_DID", "MY_DID", "NL_DID", "NO_DID", "NZ_DID", "PE_DID", "PH_DID", "PK_DID", "PL_DID", "RO_DID", "SE_DID", "SG_DID", "TH_DID", "TR_DID", "VE_DID", "VN_DID", "ZA_DID", "AD_DID", "AE_DID", "AL_DID", "AM_DID", "AO_DID", "AQ_DID", "AW_DID", "AZ_DID", "BA_DID", "BD_DID", "BF_DID", "BG_DID", "BH_DID", "BI_DID", "BJ_DID", "BL_DID", "BN_DID", "BO_DID", "BQ_DID", "BT_DID", "BW_DID", "BY_DID", "BZ_DID", "CD_DID", "CF_DID", "CG_DID", "CI_DID", "CK_DID", "CM_DID", "CR_DID", "CV_DID", "CY_DID", "CZ_DID", "DJ_DID", "DZ_DID", "EC_DID", "EE_DID", "EH_DID", "ER_DID", "ET_DID", "FI_DID", "FJ_DID", "FK_DID", "FM_DID", "FO_DID", "GA_DID", "GE_DID", "GF_DID", "GH_DID", "GI_DID", "GL_DID", "GM_DID", "GN_DID", "GP_DID", "GQ_DID", "GT_DID", "GW_DID", "GY_DID", "HK_DID", "HN_DID", "HR_DID", "HT_DID", "IE_DID", "IL_DID", "IO_DID", "IQ_DID", "IS_DID", "JO_DID", "KE_DID", "KG_DID", "KH_DID", "KI_DID", "KM_DID", "KP_DID", "KW_DID", "LA_DID", "LB_DID", "LI_DID", "LR_DID", "LS_DID", "LT_DID", "LU_DID", "LV_DID", "LY_DID", "MA_DID", "MC_DID", "MD_DID", "ME_DID", "MF_DID", "MG_DID", "MH_DID", "MK_DID", "ML_DID", "MN_DID", "MO_DID", "MQ_DID", "MR_DID", "MT_DID", "MU_DID", "MV_DID", "MW_DID", "MZ_DID", "NA_DID", "NC_DID", "NE_DID", "NF_DID", "NG_DID", "NI_DID", "NP_DID", "NR_DID", "NU_DID", "OM_DID", "PA_DID", "PF_DID", "PG_DID", "PM_DID", "PS_DID", "PT_DID", "PW_DID", "PY_DID", "QA_DID", "RE_DID", "RS_DID", "RW_DID", "SA_DID", "SB_DID", "SC_DID", "SD_DID", "SH_247_DID", "SH_290_DID", "SI_DID", "SK_DID", "SL_DID", "SM_DID", "SN_DID", "SO_DID", "SR_DID", "SS_DID", "ST_DID", "SV_DID", "SY_DID", "SZ_DID", "TD_DID", "TG_DID", "TJ_DID", "TK_DID", "TL_DID", "TM_DID", "TN_DID", "TO_DID", "TV_DID", "TW_DID", "TZ_DID", "UA_DID", "UG_DID", "UY_DID", "UZ_DID", "VU_DID", "WF_DID", "WS_DID", "XG_DID", "XN_DID", "XV_882_DID", "XV_883_DID", "YE_DID", "YT_DID", "ZM_DID", "ZW_DID", "SX_DID"]
98
98
  if phone_number_type && !allowed_values.include?(phone_number_type)
99
99
  fail "invalid value for 'phone_number_type', must be one of #{allowed_values}"
100
100
  end
@@ -0,0 +1,205 @@
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@inin.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 PortBillingAddress
21
+ attr_accessor :street_address
22
+
23
+ attr_accessor :city_province
24
+
25
+ attr_accessor :state
26
+
27
+ attr_accessor :zip_postal
28
+
29
+ attr_accessor :country
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+
35
+ :'street_address' => :'streetAddress',
36
+
37
+ :'city_province' => :'cityProvince',
38
+
39
+ :'state' => :'state',
40
+
41
+ :'zip_postal' => :'zipPostal',
42
+
43
+ :'country' => :'country'
44
+
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+ :'street_address' => :'String',
52
+ :'city_province' => :'String',
53
+ :'state' => :'String',
54
+ :'zip_postal' => :'String',
55
+ :'country' => :'String'
56
+
57
+ }
58
+ end
59
+
60
+ def initialize(attributes = {})
61
+ return unless attributes.is_a?(Hash)
62
+
63
+ # convert string to symbol for hash key
64
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
65
+
66
+
67
+ if attributes[:'streetAddress']
68
+ self.street_address = attributes[:'streetAddress']
69
+ end
70
+
71
+ if attributes[:'cityProvince']
72
+ self.city_province = attributes[:'cityProvince']
73
+ end
74
+
75
+ if attributes[:'state']
76
+ self.state = attributes[:'state']
77
+ end
78
+
79
+ if attributes[:'zipPostal']
80
+ self.zip_postal = attributes[:'zipPostal']
81
+ end
82
+
83
+ if attributes[:'country']
84
+ self.country = attributes[:'country']
85
+ end
86
+
87
+ end
88
+
89
+ # Check equality by comparing each attribute.
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ street_address == o.street_address &&
94
+ city_province == o.city_province &&
95
+ state == o.state &&
96
+ zip_postal == o.zip_postal &&
97
+ country == o.country
98
+ end
99
+
100
+ # @see the `==` method
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculate hash code according to all attributes.
106
+ def hash
107
+ [street_address, city_province, state, zip_postal, country].hash
108
+ end
109
+
110
+ # build the object from hash
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ self.class.swagger_types.each_pair do |key, type|
114
+ if type =~ /^Array<(.*)>/i
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
117
+ else
118
+ #TODO show warning in debug mode
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ else
123
+ # data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+ end
126
+
127
+ self
128
+ end
129
+
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :DateTime
133
+ DateTime.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :BOOLEAN
143
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ _model = Object.const_get("PureCloud").const_get(type).new
164
+ _model.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_body (backward compatibility))
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # return the object in the form of hash
178
+ def to_hash
179
+ hash = {}
180
+ self.class.attribute_map.each_pair do |attr, param|
181
+ value = self.send(attr)
182
+ next if value.nil?
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ # Method to output non-array value in the form of hash
189
+ # For object, use to_hash. Otherwise, just return the value
190
+ def _to_hash(value)
191
+ if value.is_a?(Array)
192
+ value.compact.map{ |v| _to_hash(v) }
193
+ elsif value.is_a?(Hash)
194
+ {}.tap do |hash|
195
+ value.each { |k, v| hash[k] = _to_hash(v) }
196
+ end
197
+ elsif value.respond_to? :to_hash
198
+ value.to_hash
199
+ else
200
+ value
201
+ end
202
+ end
203
+
204
+ end
205
+ end