purecloud 0.37.1 → 0.38.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/config-ruby.json +1 -1
- data/doc_out/AuthorizationApi.html.md +57 -0
- data/doc_out/AuthzGrant.html.md +15 -0
- data/doc_out/AuthzGrantPolicy.html.md +16 -0
- data/doc_out/AuthzGrantRole.html.md +17 -0
- data/doc_out/AuthzObject.html.md +17 -0
- data/doc_out/AuthzPermissionContext.html.md +14 -0
- data/doc_out/AuthzSubject.html.md +16 -0
- data/doc_out/CreateUser.html.md +0 -1
- data/doc_out/ExportUri.html.md +14 -0
- data/doc_out/FaxSendRequest.html.md +5 -5
- data/doc_out/GroupsApi.html.md +119 -0
- data/doc_out/JsonNode.html.md +2 -2
- data/doc_out/Location.html.md +20 -0
- data/doc_out/LocationAddress.html.md +19 -0
- data/doc_out/LocationEmergencyNumber.html.md +15 -0
- data/doc_out/LocationsApi.html.md +249 -0
- data/doc_out/ObjectsApi.html.md +69 -0
- data/doc_out/OrganizationCreate.html.md +5 -5
- data/doc_out/OutboundApi.html.md +122 -0
- data/doc_out/SearchApi.html.md +254 -12
- data/doc_out/SuggestApi.html.md +254 -0
- data/doc_out/User.html.md +1 -1
- data/doc_out/UserMe.html.md +1 -1
- data/doc_out/UserPresence.html.md +1 -0
- data/doc_out/index.html.md +3 -3
- data/lib/purecloud.rb +13 -1
- data/lib/purecloud/api/authorization_api.rb +60 -0
- data/lib/purecloud/api/groups_api.rb +126 -0
- data/lib/purecloud/api/locations_api.rb +273 -0
- data/lib/purecloud/api/objects_api.rb +87 -0
- data/lib/purecloud/api/outbound_api.rb +126 -0
- data/lib/purecloud/api/search_api.rb +259 -14
- data/lib/purecloud/api/suggest_api.rb +272 -0
- data/lib/purecloud/api_client.rb +1 -1
- data/lib/purecloud/models/authz_grant.rb +186 -0
- data/lib/purecloud/models/authz_grant_policy.rb +197 -0
- data/lib/purecloud/models/authz_grant_role.rb +209 -0
- data/lib/purecloud/models/authz_object.rb +210 -0
- data/lib/purecloud/models/authz_permission_context.rb +175 -0
- data/lib/purecloud/models/authz_subject.rb +199 -0
- data/lib/purecloud/models/callback.rb +1 -1
- data/lib/purecloud/models/create_user.rb +4 -15
- data/lib/purecloud/models/export_uri.rb +176 -0
- data/lib/purecloud/models/fax_send_request.rb +21 -7
- data/lib/purecloud/models/group.rb +1 -1
- data/lib/purecloud/models/json_node.rb +25 -25
- data/lib/purecloud/models/location.rb +249 -0
- data/lib/purecloud/models/location_address.rb +225 -0
- data/lib/purecloud/models/location_emergency_number.rb +195 -0
- data/lib/purecloud/models/organization_create.rb +5 -5
- data/lib/purecloud/models/search_criteria.rb +1 -1
- data/lib/purecloud/models/user.rb +1 -1
- data/lib/purecloud/models/user_me.rb +1 -1
- data/lib/purecloud/models/user_presence.rb +12 -1
- data/lib/purecloud/version.rb +1 -1
- data/newVersion.md +1 -1
- data/swagger.json +1 -1
- data/version.json +1 -1
- metadata +28 -4
- data/doc_out/ExternalContactsApi.html.md +0 -1594
- data/lib/purecloud/api/external_contacts_api.rb +0 -1679
@@ -0,0 +1,225 @@
|
|
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 LocationAddress
|
21
|
+
attr_accessor :city
|
22
|
+
|
23
|
+
attr_accessor :country
|
24
|
+
|
25
|
+
attr_accessor :country_name
|
26
|
+
|
27
|
+
attr_accessor :state
|
28
|
+
|
29
|
+
attr_accessor :street1
|
30
|
+
|
31
|
+
attr_accessor :street2
|
32
|
+
|
33
|
+
attr_accessor :zipcode
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
|
39
|
+
:'city' => :'city',
|
40
|
+
|
41
|
+
:'country' => :'country',
|
42
|
+
|
43
|
+
:'country_name' => :'countryName',
|
44
|
+
|
45
|
+
:'state' => :'state',
|
46
|
+
|
47
|
+
:'street1' => :'street1',
|
48
|
+
|
49
|
+
:'street2' => :'street2',
|
50
|
+
|
51
|
+
:'zipcode' => :'zipcode'
|
52
|
+
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute type mapping.
|
57
|
+
def self.swagger_types
|
58
|
+
{
|
59
|
+
:'city' => :'String',
|
60
|
+
:'country' => :'String',
|
61
|
+
:'country_name' => :'String',
|
62
|
+
:'state' => :'String',
|
63
|
+
:'street1' => :'String',
|
64
|
+
:'street2' => :'String',
|
65
|
+
:'zipcode' => :'String'
|
66
|
+
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
def initialize(attributes = {})
|
71
|
+
return unless attributes.is_a?(Hash)
|
72
|
+
|
73
|
+
# convert string to symbol for hash key
|
74
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
75
|
+
|
76
|
+
|
77
|
+
if attributes[:'city']
|
78
|
+
self.city = attributes[:'city']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes[:'country']
|
82
|
+
self.country = attributes[:'country']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes[:'countryName']
|
86
|
+
self.country_name = attributes[:'countryName']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes[:'state']
|
90
|
+
self.state = attributes[:'state']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes[:'street1']
|
94
|
+
self.street1 = attributes[:'street1']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes[:'street2']
|
98
|
+
self.street2 = attributes[:'street2']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes[:'zipcode']
|
102
|
+
self.zipcode = attributes[:'zipcode']
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
# Check equality by comparing each attribute.
|
108
|
+
def ==(o)
|
109
|
+
return true if self.equal?(o)
|
110
|
+
self.class == o.class &&
|
111
|
+
city == o.city &&
|
112
|
+
country == o.country &&
|
113
|
+
country_name == o.country_name &&
|
114
|
+
state == o.state &&
|
115
|
+
street1 == o.street1 &&
|
116
|
+
street2 == o.street2 &&
|
117
|
+
zipcode == o.zipcode
|
118
|
+
end
|
119
|
+
|
120
|
+
# @see the `==` method
|
121
|
+
def eql?(o)
|
122
|
+
self == o
|
123
|
+
end
|
124
|
+
|
125
|
+
# Calculate hash code according to all attributes.
|
126
|
+
def hash
|
127
|
+
[city, country, country_name, state, street1, street2, zipcode].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# build the object from hash
|
131
|
+
def build_from_hash(attributes)
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
133
|
+
self.class.swagger_types.each_pair do |key, type|
|
134
|
+
if type =~ /^Array<(.*)>/i
|
135
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
137
|
+
else
|
138
|
+
#TODO show warning in debug mode
|
139
|
+
end
|
140
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
141
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
142
|
+
else
|
143
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
self
|
148
|
+
end
|
149
|
+
|
150
|
+
def _deserialize(type, value)
|
151
|
+
case type.to_sym
|
152
|
+
when :DateTime
|
153
|
+
DateTime.parse(value)
|
154
|
+
when :Date
|
155
|
+
Date.parse(value)
|
156
|
+
when :String
|
157
|
+
value.to_s
|
158
|
+
when :Integer
|
159
|
+
value.to_i
|
160
|
+
when :Float
|
161
|
+
value.to_f
|
162
|
+
when :BOOLEAN
|
163
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
164
|
+
true
|
165
|
+
else
|
166
|
+
false
|
167
|
+
end
|
168
|
+
when :Object
|
169
|
+
# generic object (usually a Hash), return directly
|
170
|
+
value
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
174
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
177
|
+
{}.tap do |hash|
|
178
|
+
value.each do |k, v|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
else # model
|
183
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
184
|
+
_model.build_from_hash(value)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
def to_s
|
189
|
+
to_hash.to_s
|
190
|
+
end
|
191
|
+
|
192
|
+
# to_body is an alias to to_body (backward compatibility))
|
193
|
+
def to_body
|
194
|
+
to_hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# return the object in the form of hash
|
198
|
+
def to_hash
|
199
|
+
hash = {}
|
200
|
+
self.class.attribute_map.each_pair do |attr, param|
|
201
|
+
value = self.send(attr)
|
202
|
+
next if value.nil?
|
203
|
+
hash[param] = _to_hash(value)
|
204
|
+
end
|
205
|
+
hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Method to output non-array value in the form of hash
|
209
|
+
# For object, use to_hash. Otherwise, just return the value
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map{ |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
end
|
@@ -0,0 +1,195 @@
|
|
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 LocationEmergencyNumber
|
21
|
+
attr_accessor :e164
|
22
|
+
|
23
|
+
attr_accessor :number
|
24
|
+
|
25
|
+
# The type of emergency number.
|
26
|
+
attr_accessor :type
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
|
32
|
+
:'e164' => :'e164',
|
33
|
+
|
34
|
+
:'number' => :'number',
|
35
|
+
|
36
|
+
:'type' => :'type'
|
37
|
+
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.swagger_types
|
43
|
+
{
|
44
|
+
:'e164' => :'String',
|
45
|
+
:'number' => :'String',
|
46
|
+
:'type' => :'String'
|
47
|
+
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
56
|
+
|
57
|
+
|
58
|
+
if attributes[:'e164']
|
59
|
+
self.e164 = attributes[:'e164']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes[:'number']
|
63
|
+
self.number = attributes[:'number']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes[:'type']
|
67
|
+
self.type = attributes[:'type']
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
# Custom attribute writer method checking allowed values (enum).
|
73
|
+
def type=(type)
|
74
|
+
allowed_values = ["default", "elin"]
|
75
|
+
if type && !allowed_values.include?(type)
|
76
|
+
fail "invalid value for 'type', must be one of #{allowed_values}"
|
77
|
+
end
|
78
|
+
@type = type
|
79
|
+
end
|
80
|
+
|
81
|
+
# Check equality by comparing each attribute.
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
e164 == o.e164 &&
|
86
|
+
number == o.number &&
|
87
|
+
type == o.type
|
88
|
+
end
|
89
|
+
|
90
|
+
# @see the `==` method
|
91
|
+
def eql?(o)
|
92
|
+
self == o
|
93
|
+
end
|
94
|
+
|
95
|
+
# Calculate hash code according to all attributes.
|
96
|
+
def hash
|
97
|
+
[e164, number, type].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# build the object from hash
|
101
|
+
def build_from_hash(attributes)
|
102
|
+
return nil unless attributes.is_a?(Hash)
|
103
|
+
self.class.swagger_types.each_pair do |key, type|
|
104
|
+
if type =~ /^Array<(.*)>/i
|
105
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
106
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
107
|
+
else
|
108
|
+
#TODO show warning in debug mode
|
109
|
+
end
|
110
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
111
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
112
|
+
else
|
113
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
def _deserialize(type, value)
|
121
|
+
case type.to_sym
|
122
|
+
when :DateTime
|
123
|
+
DateTime.parse(value)
|
124
|
+
when :Date
|
125
|
+
Date.parse(value)
|
126
|
+
when :String
|
127
|
+
value.to_s
|
128
|
+
when :Integer
|
129
|
+
value.to_i
|
130
|
+
when :Float
|
131
|
+
value.to_f
|
132
|
+
when :BOOLEAN
|
133
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
134
|
+
true
|
135
|
+
else
|
136
|
+
false
|
137
|
+
end
|
138
|
+
when :Object
|
139
|
+
# generic object (usually a Hash), return directly
|
140
|
+
value
|
141
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
142
|
+
inner_type = Regexp.last_match[:inner_type]
|
143
|
+
value.map { |v| _deserialize(inner_type, v) }
|
144
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
145
|
+
k_type = Regexp.last_match[:k_type]
|
146
|
+
v_type = Regexp.last_match[:v_type]
|
147
|
+
{}.tap do |hash|
|
148
|
+
value.each do |k, v|
|
149
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
else # model
|
153
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
154
|
+
_model.build_from_hash(value)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
def to_s
|
159
|
+
to_hash.to_s
|
160
|
+
end
|
161
|
+
|
162
|
+
# to_body is an alias to to_body (backward compatibility))
|
163
|
+
def to_body
|
164
|
+
to_hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# return the object in the form of hash
|
168
|
+
def to_hash
|
169
|
+
hash = {}
|
170
|
+
self.class.attribute_map.each_pair do |attr, param|
|
171
|
+
value = self.send(attr)
|
172
|
+
next if value.nil?
|
173
|
+
hash[param] = _to_hash(value)
|
174
|
+
end
|
175
|
+
hash
|
176
|
+
end
|
177
|
+
|
178
|
+
# Method to output non-array value in the form of hash
|
179
|
+
# For object, use to_hash. Otherwise, just return the value
|
180
|
+
def _to_hash(value)
|
181
|
+
if value.is_a?(Array)
|
182
|
+
value.compact.map{ |v| _to_hash(v) }
|
183
|
+
elsif value.is_a?(Hash)
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
186
|
+
end
|
187
|
+
elsif value.respond_to? :to_hash
|
188
|
+
value.to_hash
|
189
|
+
else
|
190
|
+
value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
end
|
195
|
+
end
|
@@ -19,22 +19,22 @@ require 'date'
|
|
19
19
|
module PureCloud
|
20
20
|
# Creating an Organization
|
21
21
|
class OrganizationCreate
|
22
|
-
# Display
|
22
|
+
# Display name for this organization.
|
23
23
|
attr_accessor :name
|
24
24
|
|
25
|
-
# Administrator username for this organization
|
25
|
+
# Administrator username for this organization in the form of an email address.
|
26
26
|
attr_accessor :admin_username
|
27
27
|
|
28
|
-
# Administrator password for this organization
|
28
|
+
# Administrator password for this organization.
|
29
29
|
attr_accessor :admin_password
|
30
30
|
|
31
31
|
# Fully qualified domain name for this organization (Ex. example.com).
|
32
32
|
attr_accessor :domain
|
33
33
|
|
34
|
-
# Organization
|
34
|
+
# Organization name which does not contain special characters like spaces.
|
35
35
|
attr_accessor :third_party_org_name
|
36
36
|
|
37
|
-
# Deletable
|
37
|
+
# Deletable property for this organization.
|
38
38
|
attr_accessor :deletable
|
39
39
|
|
40
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -121,7 +121,7 @@ module PureCloud
|
|
121
121
|
|
122
122
|
# Custom attribute writer method checking allowed values (enum).
|
123
123
|
def type=(type)
|
124
|
-
allowed_values = ["EXACT", "CONTAINS", "STARTS_WITH", "REQUIRED_FIELDS", "RANGE", "DATE_RANGE", "LESS_THAN", "LESS_THAN_EQUAL_TO", "GREATER_THAN", "GREATER_THAN_EQUAL_TO", "
|
124
|
+
allowed_values = ["EXACT", "CONTAINS", "STARTS_WITH", "REQUIRED_FIELDS", "RANGE", "DATE_RANGE", "LESS_THAN", "LESS_THAN_EQUAL_TO", "GREATER_THAN", "GREATER_THAN_EQUAL_TO", "SIMPLE", "TERM", "TERMS", "QUERY_STRING"]
|
125
125
|
if type && !allowed_values.include?(type)
|
126
126
|
fail "invalid value for 'type', must be one of #{allowed_values}"
|
127
127
|
end
|