purecloudplatformclientv2 48.2.0 → 49.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/AnalyticsFlow.md +2 -0
  4. data/docs/AnalyticsSession.md +7 -0
  5. data/docs/AuthorizationApi.md +1 -2
  6. data/docs/ExternalContact.md +1 -0
  7. data/docs/LocationDefinition.md +1 -1
  8. data/docs/LocationUpdateDefinition.md +19 -0
  9. data/docs/LocationsApi.md +202 -0
  10. data/docs/OAuthClient.md +1 -0
  11. data/docs/OAuthClientListing.md +1 -0
  12. data/docs/ObjectsApi.md +1 -2
  13. data/docs/OrgOAuthClient.md +1 -0
  14. data/docs/RoleDivision.md +14 -0
  15. data/docs/ViewFilter.md +9 -0
  16. data/docs/WebChatDeployment.md +1 -0
  17. data/docs/WhatsAppId.md +14 -0
  18. data/lib/purecloudplatformclientv2.rb +3 -3
  19. data/lib/purecloudplatformclientv2/api/locations_api.rb +213 -0
  20. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  21. data/lib/purecloudplatformclientv2/models/analytics_flow.rb +67 -1
  22. data/lib/purecloudplatformclientv2/models/analytics_query_predicate.rb +2 -2
  23. data/lib/purecloudplatformclientv2/models/analytics_session.rb +186 -4
  24. data/lib/purecloudplatformclientv2/models/external_contact.rb +26 -1
  25. data/lib/purecloudplatformclientv2/models/location_definition.rb +6 -0
  26. data/lib/purecloudplatformclientv2/models/{attribute_entity_listing.rb → location_update_definition.rb} +62 -121
  27. data/lib/purecloudplatformclientv2/models/o_auth_client.rb +29 -1
  28. data/lib/purecloudplatformclientv2/models/o_auth_client_listing.rb +29 -1
  29. data/lib/purecloudplatformclientv2/models/org_o_auth_client.rb +29 -1
  30. data/lib/purecloudplatformclientv2/models/reporting_export_job_request.rb +2 -2
  31. data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +2 -2
  32. data/lib/purecloudplatformclientv2/models/{attribute_query_request.rb → role_division.rb} +24 -41
  33. data/lib/purecloudplatformclientv2/models/subject_division_grants.rb +2 -2
  34. data/lib/purecloudplatformclientv2/models/view_filter.rb +256 -4
  35. data/lib/purecloudplatformclientv2/models/web_chat_deployment.rb +28 -1
  36. data/lib/purecloudplatformclientv2/models/whats_app_id.rb +229 -0
  37. data/lib/purecloudplatformclientv2/version.rb +1 -1
  38. metadata +8 -8
  39. data/docs/AttributeEntityListing.md +0 -22
  40. data/docs/AttributeQueryRequest.md +0 -15
  41. data/docs/AttributesApi.md +0 -407
  42. data/lib/purecloudplatformclientv2/api/attributes_api.rb +0 -434
@@ -34,6 +34,8 @@ module PureCloud
34
34
 
35
35
  attr_accessor :web_chat_config
36
36
 
37
+ attr_accessor :allowed_domains
38
+
37
39
  # The URI for this object
38
40
  attr_accessor :self_uri
39
41
 
@@ -55,6 +57,8 @@ module PureCloud
55
57
 
56
58
  :'web_chat_config' => :'webChatConfig',
57
59
 
60
+ :'allowed_domains' => :'allowedDomains',
61
+
58
62
  :'self_uri' => :'selfUri'
59
63
 
60
64
  }
@@ -78,6 +82,8 @@ module PureCloud
78
82
 
79
83
  :'web_chat_config' => :'WebChatConfig',
80
84
 
85
+ :'allowed_domains' => :'Array<String>',
86
+
81
87
  :'self_uri' => :'String'
82
88
 
83
89
  }
@@ -155,6 +161,17 @@ module PureCloud
155
161
  end
156
162
 
157
163
 
164
+ if attributes.has_key?(:'allowedDomains')
165
+
166
+ if (value = attributes[:'allowedDomains']).is_a?(Array)
167
+ self.allowed_domains = value
168
+ end
169
+
170
+
171
+
172
+ end
173
+
174
+
158
175
  if attributes.has_key?(:'selfUri')
159
176
 
160
177
 
@@ -206,6 +223,10 @@ module PureCloud
206
223
 
207
224
 
208
225
 
226
+
227
+
228
+
229
+
209
230
 
210
231
 
211
232
 
@@ -248,6 +269,11 @@ module PureCloud
248
269
 
249
270
 
250
271
 
272
+
273
+
274
+
275
+
276
+
251
277
 
252
278
 
253
279
 
@@ -266,6 +292,7 @@ module PureCloud
266
292
  authentication_url == o.authentication_url &&
267
293
  disabled == o.disabled &&
268
294
  web_chat_config == o.web_chat_config &&
295
+ allowed_domains == o.allowed_domains &&
269
296
  self_uri == o.self_uri
270
297
  end
271
298
 
@@ -278,7 +305,7 @@ module PureCloud
278
305
  # Calculates hash code according to all attributes.
279
306
  # @return [Fixnum] Hash code
280
307
  def hash
281
- [id, name, description, authentication_required, authentication_url, disabled, web_chat_config, self_uri].hash
308
+ [id, name, description, authentication_required, authentication_url, disabled, web_chat_config, allowed_domains, self_uri].hash
282
309
  end
283
310
 
284
311
  # build the object from hash
@@ -0,0 +1,229 @@
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
+ # User information for a WhatsApp account
21
+ class WhatsAppId
22
+ # The phone number associated with this WhatsApp account
23
+ attr_accessor :phone_number
24
+
25
+ # The displayName of this person's account in WhatsApp
26
+ attr_accessor :display_name
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+
32
+ :'phone_number' => :'phoneNumber',
33
+
34
+ :'display_name' => :'displayName'
35
+
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+
43
+ :'phone_number' => :'PhoneNumber',
44
+
45
+ :'display_name' => :'String'
46
+
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
57
+
58
+
59
+ if attributes.has_key?(:'phoneNumber')
60
+
61
+
62
+ self.phone_number = attributes[:'phoneNumber']
63
+
64
+
65
+ end
66
+
67
+
68
+ if attributes.has_key?(:'displayName')
69
+
70
+
71
+ self.display_name = attributes[:'displayName']
72
+
73
+
74
+ end
75
+
76
+
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properies with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+
84
+
85
+ return invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ end
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ phone_number == o.phone_number &&
119
+ display_name == o.display_name
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Fixnum] Hash code
130
+ def hash
131
+ [phone_number, display_name].hash
132
+ end
133
+
134
+ # build the object from hash
135
+ def build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ self.class.swagger_types.each_pair do |key, type|
138
+ if type =~ /^Array<(.*)>/i
139
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
141
+ else
142
+ #TODO show warning in debug mode
143
+ end
144
+ elsif !attributes[self.class.attribute_map[key]].nil?
145
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
+ else
147
+ # data not found in attributes(hash), not an issue as the data can be optional
148
+ end
149
+ end
150
+
151
+ self
152
+ end
153
+
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :DateTime
157
+ DateTime.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :BOOLEAN
167
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ _model = Object.const_get("PureCloud").const_get(type).new
188
+ _model.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_body (backward compatibility))
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # return the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ next if value.nil?
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ # Method to output non-array value in the form of hash
213
+ # For object, use to_hash. Otherwise, just return the value
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map{ |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+ end
@@ -15,5 +15,5 @@ Terms of Service: https://developer.mypurecloud.com/tos
15
15
  =end
16
16
 
17
17
  module PureCloud
18
- VERSION = "48.2.0"
18
+ VERSION = "49.0.0"
19
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: purecloudplatformclientv2
3
3
  version: !ruby/object:Gem::Version
4
- version: 48.2.0
4
+ version: 49.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genesys Developer Evangelists
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-20 00:00:00.000000000 Z
11
+ date: 2019-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -319,10 +319,7 @@ files:
319
319
  - docs/AttemptLimits.md
320
320
  - docs/AttemptLimitsEntityListing.md
321
321
  - docs/Attribute.md
322
- - docs/AttributeEntityListing.md
323
322
  - docs/AttributeFilterItem.md
324
- - docs/AttributeQueryRequest.md
325
- - docs/AttributesApi.md
326
323
  - docs/AuditChange.md
327
324
  - docs/AuditEntity.md
328
325
  - docs/AuditEntityReference.md
@@ -995,6 +992,7 @@ files:
995
992
  - docs/LocationEntityListing.md
996
993
  - docs/LocationSearchCriteria.md
997
994
  - docs/LocationSearchRequest.md
995
+ - docs/LocationUpdateDefinition.md
998
996
  - docs/LocationsApi.md
999
997
  - docs/LocationsSearchResponse.md
1000
998
  - docs/LockInfo.md
@@ -1318,6 +1316,7 @@ files:
1318
1316
  - docs/RetentionDuration.md
1319
1317
  - docs/ReverseWhitepagesLookupResult.md
1320
1318
  - docs/Ring.md
1319
+ - docs/RoleDivision.md
1321
1320
  - docs/RouteGroup.md
1322
1321
  - docs/RouteGroupAttributes.md
1323
1322
  - docs/RouteGroupList.md
@@ -1639,6 +1638,7 @@ files:
1639
1638
  - docs/WfmUserScheduleAdherenceUpdatedTopicUserReference.md
1640
1639
  - docs/WfmUserScheduleAdherenceUpdatedTopicUserScheduleAdherenceUpdate.md
1641
1640
  - docs/WfmVersionedEntityMetadata.md
1641
+ - docs/WhatsAppId.md
1642
1642
  - docs/WorkPlan.md
1643
1643
  - docs/WorkPlanActivity.md
1644
1644
  - docs/WorkPlanListItemResponse.md
@@ -1665,7 +1665,6 @@ files:
1665
1665
  - lib/purecloudplatformclientv2/api/alerting_api.rb
1666
1666
  - lib/purecloudplatformclientv2/api/analytics_api.rb
1667
1667
  - lib/purecloudplatformclientv2/api/architect_api.rb
1668
- - lib/purecloudplatformclientv2/api/attributes_api.rb
1669
1668
  - lib/purecloudplatformclientv2/api/authorization_api.rb
1670
1669
  - lib/purecloudplatformclientv2/api/billing_api.rb
1671
1670
  - lib/purecloudplatformclientv2/api/content_management_api.rb
@@ -1808,9 +1807,7 @@ files:
1808
1807
  - lib/purecloudplatformclientv2/models/attempt_limits.rb
1809
1808
  - lib/purecloudplatformclientv2/models/attempt_limits_entity_listing.rb
1810
1809
  - lib/purecloudplatformclientv2/models/attribute.rb
1811
- - lib/purecloudplatformclientv2/models/attribute_entity_listing.rb
1812
1810
  - lib/purecloudplatformclientv2/models/attribute_filter_item.rb
1813
- - lib/purecloudplatformclientv2/models/attribute_query_request.rb
1814
1811
  - lib/purecloudplatformclientv2/models/audit_change.rb
1815
1812
  - lib/purecloudplatformclientv2/models/audit_entity.rb
1816
1813
  - lib/purecloudplatformclientv2/models/audit_entity_reference.rb
@@ -2468,6 +2465,7 @@ files:
2468
2465
  - lib/purecloudplatformclientv2/models/location_entity_listing.rb
2469
2466
  - lib/purecloudplatformclientv2/models/location_search_criteria.rb
2470
2467
  - lib/purecloudplatformclientv2/models/location_search_request.rb
2468
+ - lib/purecloudplatformclientv2/models/location_update_definition.rb
2471
2469
  - lib/purecloudplatformclientv2/models/locations_search_response.rb
2472
2470
  - lib/purecloudplatformclientv2/models/lock_info.rb
2473
2471
  - lib/purecloudplatformclientv2/models/logical_interface_entity_listing.rb
@@ -2778,6 +2776,7 @@ files:
2778
2776
  - lib/purecloudplatformclientv2/models/retention_duration.rb
2779
2777
  - lib/purecloudplatformclientv2/models/reverse_whitepages_lookup_result.rb
2780
2778
  - lib/purecloudplatformclientv2/models/ring.rb
2779
+ - lib/purecloudplatformclientv2/models/role_division.rb
2781
2780
  - lib/purecloudplatformclientv2/models/route_group.rb
2782
2781
  - lib/purecloudplatformclientv2/models/route_group_attributes.rb
2783
2782
  - lib/purecloudplatformclientv2/models/route_group_list.rb
@@ -3087,6 +3086,7 @@ files:
3087
3086
  - lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_topic_user_reference.rb
3088
3087
  - lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_topic_user_schedule_adherence_update.rb
3089
3088
  - lib/purecloudplatformclientv2/models/wfm_versioned_entity_metadata.rb
3089
+ - lib/purecloudplatformclientv2/models/whats_app_id.rb
3090
3090
  - lib/purecloudplatformclientv2/models/work_plan.rb
3091
3091
  - lib/purecloudplatformclientv2/models/work_plan_activity.rb
3092
3092
  - lib/purecloudplatformclientv2/models/work_plan_list_item_response.rb
@@ -1,22 +0,0 @@
1
- ---
2
- title: AttributeEntityListing
3
- ---
4
- ## PureCloud::AttributeEntityListing
5
-
6
- ## Properties
7
-
8
- |Name | Type | Description | Notes|
9
- |------------ | ------------- | ------------- | -------------|
10
- | **entities** | [**Array&lt;Attribute&gt;**](Attribute.html) | | [optional] |
11
- | **page_size** | **Integer** | | [optional] |
12
- | **page_number** | **Integer** | | [optional] |
13
- | **total** | **Integer** | | [optional] |
14
- | **first_uri** | **String** | | [optional] |
15
- | **self_uri** | **String** | | [optional] |
16
- | **previous_uri** | **String** | | [optional] |
17
- | **next_uri** | **String** | | [optional] |
18
- | **last_uri** | **String** | | [optional] |
19
- | **page_count** | **Integer** | | [optional] |
20
- {: class="table table-striped"}
21
-
22
-
@@ -1,15 +0,0 @@
1
- ---
2
- title: AttributeQueryRequest
3
- ---
4
- ## PureCloud::AttributeQueryRequest
5
-
6
- ## Properties
7
-
8
- |Name | Type | Description | Notes|
9
- |------------ | ------------- | ------------- | -------------|
10
- | **query** | **String** | Query phrase to search attribute by name. If not set will match all. | [optional] |
11
- | **page_size** | **Integer** | The maximum number of hits to return. Default: 25, Maximum: 500. | [optional] |
12
- | **page_number** | **Integer** | The page number to start at. The first page is number 1. | [optional] |
13
- {: class="table table-striped"}
14
-
15
-
@@ -1,407 +0,0 @@
1
- ---
2
- title: AttributesApi
3
- ---
4
-
5
- ## PureCloud::AttributesApi
6
-
7
- All URIs are relative to *https://api.mypurecloud.com*
8
-
9
- Method | Description
10
- ------------- | ------------- | -------------
11
- [**delete_attribute**](AttributesApi.html#delete_attribute) | Delete an existing Attribute.
12
- [**get_attribute**](AttributesApi.html#get_attribute) | Get details about an existing attribute.
13
- [**get_attributes**](AttributesApi.html#get_attributes) | Gets a list of existing attributes.
14
- [**post_attributes**](AttributesApi.html#post_attributes) | Create an attribute.
15
- [**post_attributes_query**](AttributesApi.html#post_attributes_query) | Query attributes
16
- [**put_attribute**](AttributesApi.html#put_attribute) | Update an existing attribute.
17
- {: class="table table-striped"}
18
-
19
- <a name="delete_attribute"></a>
20
-
21
- ## - delete_attribute(attribute_id)
22
-
23
-
24
-
25
- Delete an existing Attribute.
26
-
27
- This will remove attribute.
28
-
29
- Wraps DELETE /api/v2/attributes/{attributeId}
30
-
31
- Requires NO permissions:
32
-
33
-
34
-
35
- ### Example
36
- ~~~ruby
37
- # load the gem
38
- require 'purecloudplatformclientv2'
39
- # setup authorization
40
- @secret = ENV['PURECLOUD_SECRET']
41
- @id = ENV['PURECLOUD_CLIENT_ID']
42
- environment = "mypurecloud.com"
43
-
44
- @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
45
-
46
- PureCloud.configure do |config|
47
- config.access_token = @authToken
48
- end
49
-
50
- api_instance = PureCloud::AttributesApi.new
51
-
52
- attribute_id = "attribute_id_example" # String | Attribute ID
53
-
54
-
55
- begin
56
- #Delete an existing Attribute.
57
- api_instance.delete_attribute(attribute_id)
58
- rescue PureCloud::ApiError => e
59
- puts "Exception when calling AttributesApi->delete_attribute: #{e}"
60
- end
61
- ~~~
62
-
63
- ### Parameters
64
-
65
- Name | Type | Description | Notes
66
- ------------- | ------------- | ------------- | -------------
67
- **attribute_id** | **String**| Attribute ID | |
68
- {: class="table table-striped"}
69
-
70
-
71
- ### Return type
72
-
73
- nil (empty response body)
74
-
75
- ### HTTP request headers
76
-
77
- - **Content-Type**: application/json
78
- - **Accept**: application/json
79
-
80
-
81
-
82
- <a name="get_attribute"></a>
83
-
84
- ## -[**Attribute**](Attribute.html) get_attribute(attribute_id)
85
-
86
-
87
-
88
- Get details about an existing attribute.
89
-
90
-
91
-
92
- Wraps GET /api/v2/attributes/{attributeId}
93
-
94
- Requires NO permissions:
95
-
96
-
97
-
98
- ### Example
99
- ~~~ruby
100
- # load the gem
101
- require 'purecloudplatformclientv2'
102
- # setup authorization
103
- @secret = ENV['PURECLOUD_SECRET']
104
- @id = ENV['PURECLOUD_CLIENT_ID']
105
- environment = "mypurecloud.com"
106
-
107
- @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
108
-
109
- PureCloud.configure do |config|
110
- config.access_token = @authToken
111
- end
112
-
113
- api_instance = PureCloud::AttributesApi.new
114
-
115
- attribute_id = "attribute_id_example" # String | Attribute ID
116
-
117
-
118
- begin
119
- #Get details about an existing attribute.
120
- result = api_instance.get_attribute(attribute_id)
121
- p result
122
- rescue PureCloud::ApiError => e
123
- puts "Exception when calling AttributesApi->get_attribute: #{e}"
124
- end
125
- ~~~
126
-
127
- ### Parameters
128
-
129
- Name | Type | Description | Notes
130
- ------------- | ------------- | ------------- | -------------
131
- **attribute_id** | **String**| Attribute ID | |
132
- {: class="table table-striped"}
133
-
134
-
135
- ### Return type
136
-
137
- [**Attribute**](Attribute.html)
138
-
139
- ### HTTP request headers
140
-
141
- - **Content-Type**: application/json
142
- - **Accept**: application/json
143
-
144
-
145
-
146
- <a name="get_attributes"></a>
147
-
148
- ## -[**AttributeEntityListing**](AttributeEntityListing.html) get_attributes(opts)
149
-
150
-
151
-
152
- Gets a list of existing attributes.
153
-
154
-
155
-
156
- Wraps GET /api/v2/attributes
157
-
158
- Requires NO permissions:
159
-
160
-
161
-
162
- ### Example
163
- ~~~ruby
164
- # load the gem
165
- require 'purecloudplatformclientv2'
166
- # setup authorization
167
- @secret = ENV['PURECLOUD_SECRET']
168
- @id = ENV['PURECLOUD_CLIENT_ID']
169
- environment = "mypurecloud.com"
170
-
171
- @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
172
-
173
- PureCloud.configure do |config|
174
- config.access_token = @authToken
175
- end
176
-
177
- api_instance = PureCloud::AttributesApi.new
178
-
179
- opts = {
180
- page_number: 1, # Integer | Page number
181
- page_size: 25 # Integer | Page size
182
- }
183
-
184
- begin
185
- #Gets a list of existing attributes.
186
- result = api_instance.get_attributes(opts)
187
- p result
188
- rescue PureCloud::ApiError => e
189
- puts "Exception when calling AttributesApi->get_attributes: #{e}"
190
- end
191
- ~~~
192
-
193
- ### Parameters
194
-
195
- Name | Type | Description | Notes
196
- ------------- | ------------- | ------------- | -------------
197
- **page_number** | **Integer**| Page number | [optional] [default to 1] |
198
- **page_size** | **Integer**| Page size | [optional] [default to 25] |
199
- {: class="table table-striped"}
200
-
201
-
202
- ### Return type
203
-
204
- [**AttributeEntityListing**](AttributeEntityListing.html)
205
-
206
- ### HTTP request headers
207
-
208
- - **Content-Type**: application/json
209
- - **Accept**: application/json
210
-
211
-
212
-
213
- <a name="post_attributes"></a>
214
-
215
- ## -[**Attribute**](Attribute.html) post_attributes(body)
216
-
217
-
218
-
219
- Create an attribute.
220
-
221
-
222
-
223
- Wraps POST /api/v2/attributes
224
-
225
- Requires NO permissions:
226
-
227
-
228
-
229
- ### Example
230
- ~~~ruby
231
- # load the gem
232
- require 'purecloudplatformclientv2'
233
- # setup authorization
234
- @secret = ENV['PURECLOUD_SECRET']
235
- @id = ENV['PURECLOUD_CLIENT_ID']
236
- environment = "mypurecloud.com"
237
-
238
- @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
239
-
240
- PureCloud.configure do |config|
241
- config.access_token = @authToken
242
- end
243
-
244
- api_instance = PureCloud::AttributesApi.new
245
-
246
- body = PureCloud::Attribute.new # Attribute | Attribute
247
-
248
-
249
- begin
250
- #Create an attribute.
251
- result = api_instance.post_attributes(body)
252
- p result
253
- rescue PureCloud::ApiError => e
254
- puts "Exception when calling AttributesApi->post_attributes: #{e}"
255
- end
256
- ~~~
257
-
258
- ### Parameters
259
-
260
- Name | Type | Description | Notes
261
- ------------- | ------------- | ------------- | -------------
262
- **body** | [**Attribute**](Attribute.html)| Attribute | |
263
- {: class="table table-striped"}
264
-
265
-
266
- ### Return type
267
-
268
- [**Attribute**](Attribute.html)
269
-
270
- ### HTTP request headers
271
-
272
- - **Content-Type**: application/json
273
- - **Accept**: application/json
274
-
275
-
276
-
277
- <a name="post_attributes_query"></a>
278
-
279
- ## -[**AttributeEntityListing**](AttributeEntityListing.html) post_attributes_query(body)
280
-
281
-
282
-
283
- Query attributes
284
-
285
-
286
-
287
- Wraps POST /api/v2/attributes/query
288
-
289
- Requires NO permissions:
290
-
291
-
292
-
293
- ### Example
294
- ~~~ruby
295
- # load the gem
296
- require 'purecloudplatformclientv2'
297
- # setup authorization
298
- @secret = ENV['PURECLOUD_SECRET']
299
- @id = ENV['PURECLOUD_CLIENT_ID']
300
- environment = "mypurecloud.com"
301
-
302
- @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
303
-
304
- PureCloud.configure do |config|
305
- config.access_token = @authToken
306
- end
307
-
308
- api_instance = PureCloud::AttributesApi.new
309
-
310
- body = PureCloud::AttributeQueryRequest.new # AttributeQueryRequest | query
311
-
312
-
313
- begin
314
- #Query attributes
315
- result = api_instance.post_attributes_query(body)
316
- p result
317
- rescue PureCloud::ApiError => e
318
- puts "Exception when calling AttributesApi->post_attributes_query: #{e}"
319
- end
320
- ~~~
321
-
322
- ### Parameters
323
-
324
- Name | Type | Description | Notes
325
- ------------- | ------------- | ------------- | -------------
326
- **body** | [**AttributeQueryRequest**](AttributeQueryRequest.html)| query | |
327
- {: class="table table-striped"}
328
-
329
-
330
- ### Return type
331
-
332
- [**AttributeEntityListing**](AttributeEntityListing.html)
333
-
334
- ### HTTP request headers
335
-
336
- - **Content-Type**: application/json
337
- - **Accept**: application/json
338
-
339
-
340
-
341
- <a name="put_attribute"></a>
342
-
343
- ## -[**Attribute**](Attribute.html) put_attribute(attribute_id, body)
344
-
345
-
346
-
347
- Update an existing attribute.
348
-
349
- Fields that can be updated: name, description. The most recent version is required for updates.
350
-
351
- Wraps PUT /api/v2/attributes/{attributeId}
352
-
353
- Requires NO permissions:
354
-
355
-
356
-
357
- ### Example
358
- ~~~ruby
359
- # load the gem
360
- require 'purecloudplatformclientv2'
361
- # setup authorization
362
- @secret = ENV['PURECLOUD_SECRET']
363
- @id = ENV['PURECLOUD_CLIENT_ID']
364
- environment = "mypurecloud.com"
365
-
366
- @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
367
-
368
- PureCloud.configure do |config|
369
- config.access_token = @authToken
370
- end
371
-
372
- api_instance = PureCloud::AttributesApi.new
373
-
374
- attribute_id = "attribute_id_example" # String | Attribute ID
375
-
376
- body = PureCloud::Attribute.new # Attribute | Attribute
377
-
378
-
379
- begin
380
- #Update an existing attribute.
381
- result = api_instance.put_attribute(attribute_id, body)
382
- p result
383
- rescue PureCloud::ApiError => e
384
- puts "Exception when calling AttributesApi->put_attribute: #{e}"
385
- end
386
- ~~~
387
-
388
- ### Parameters
389
-
390
- Name | Type | Description | Notes
391
- ------------- | ------------- | ------------- | -------------
392
- **attribute_id** | **String**| Attribute ID | |
393
- **body** | [**Attribute**](Attribute.html)| Attribute | |
394
- {: class="table table-striped"}
395
-
396
-
397
- ### Return type
398
-
399
- [**Attribute**](Attribute.html)
400
-
401
- ### HTTP request headers
402
-
403
- - **Content-Type**: application/json
404
- - **Accept**: application/json
405
-
406
-
407
-