purecloud 0.40.1 → 0.41.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/AdditionalInfo.html.md +12 -0
- data/doc_out/{Entity.html.md → AuthzPerm.html.md} +3 -5
- data/doc_out/AuthzPermissionContext.html.md +1 -1
- data/doc_out/CallableTimeSet.html.md +1 -1
- data/doc_out/Callback.html.md +1 -0
- data/doc_out/CallbackIdentifier.html.md +14 -0
- data/doc_out/CallbackMediaParticipant.html.md +1 -0
- data/doc_out/ContentManagementApi.html.md +51 -0
- data/doc_out/ConversationsApi.html.md +120 -0
- data/doc_out/CreateCallbackCommand.html.md +2 -0
- data/doc_out/CreateCallbackResponse.html.md +14 -0
- data/doc_out/Dependency.html.md +1 -0
- data/doc_out/DependencyObject.html.md +1 -0
- data/doc_out/DomainEdgeSoftwareVersionDto.html.md +1 -1
- data/doc_out/GroupSearchCriteria.html.md +20 -0
- data/doc_out/GroupSearchRequest.html.md +19 -0
- data/doc_out/GroupsApi.html.md +2 -2
- data/doc_out/GroupsSearchResponse.html.md +1 -0
- data/doc_out/Integration.html.md +20 -0
- data/doc_out/IntegrationConfiguration.html.md +20 -0
- data/doc_out/{DeletedResourceConsumerEntityListing.html.md → IntegrationEntityListing.html.md} +3 -3
- data/doc_out/IntegrationStatusInfo.html.md +16 -0
- data/doc_out/IntegrationType.html.md +5 -3
- data/doc_out/JsonNode.html.md +1 -1
- data/doc_out/JsonNodeSearchResponse.html.md +1 -0
- data/doc_out/LocationSearchCriteria.html.md +20 -0
- data/doc_out/LocationSearchRequest.html.md +19 -0
- data/doc_out/LocationsApi.html.md +6 -6
- data/doc_out/LocationsSearchResponse.html.md +22 -0
- data/doc_out/NumberOrder.html.md +27 -0
- data/doc_out/PortBillingAddress.html.md +17 -0
- data/doc_out/PortContact.html.md +14 -0
- data/doc_out/PresenceApi.html.md +1 -1
- data/doc_out/QualityAudit.html.md +1 -1
- data/doc_out/RecordingApi.html.md +4 -2
- data/doc_out/ResponseSet.html.md +1 -1
- data/doc_out/RoutingData.html.md +17 -0
- data/doc_out/RuleSet.html.md +1 -1
- data/doc_out/SearchAggregation.html.md +3 -0
- data/doc_out/SearchApi.html.md +12 -12
- data/doc_out/SearchCriteria.html.md +1 -1
- data/doc_out/SearchRequest.html.md +3 -3
- data/doc_out/SuggestApi.html.md +2 -2
- data/doc_out/SuggestSearchCriteria.html.md +19 -0
- data/doc_out/SuggestSearchRequest.html.md +14 -0
- data/doc_out/Usage.html.md +13 -0
- data/doc_out/UsageItem.html.md +15 -0
- data/doc_out/UserSearchCriteria.html.md +20 -0
- data/doc_out/UserSearchRequest.html.md +19 -0
- data/doc_out/UsersApi.html.md +2 -120
- data/doc_out/UsersSearchResponse.html.md +1 -0
- data/doc_out/VoicemailMessageEntityListing.html.md +0 -7
- data/doc_out/Workspace.html.md +1 -0
- data/doc_out/WorkspaceCreate.html.md +1 -0
- data/doc_out/WorkspaceSummary.html.md +1 -0
- data/doc_out/index.html.md +3 -3
- data/lib/purecloud/api/content_management_api.rb +55 -0
- data/lib/purecloud/api/conversations_api.rb +121 -0
- data/lib/purecloud/api/groups_api.rb +6 -6
- data/lib/purecloud/api/languages_api.rb +2 -2
- data/lib/purecloud/api/locations_api.rb +8 -8
- data/lib/purecloud/api/presence_api.rb +2 -2
- data/lib/purecloud/api/recording_api.rb +5 -2
- data/lib/purecloud/api/routing_api.rb +2 -2
- data/lib/purecloud/api/search_api.rb +14 -14
- data/lib/purecloud/api/suggest_api.rb +2 -2
- data/lib/purecloud/api/users_api.rb +6 -128
- data/lib/purecloud/api_client.rb +1 -1
- data/lib/purecloud/models/additional_info.rb +155 -0
- data/lib/purecloud/models/authz_perm.rb +177 -0
- data/lib/purecloud/models/authz_permission_context.rb +7 -7
- data/lib/purecloud/models/callback.rb +15 -4
- data/lib/purecloud/models/{entity.rb → callback_identifier.rb} +15 -24
- data/lib/purecloud/models/callback_media_participant.rb +15 -4
- data/lib/purecloud/models/contact.rb +1 -1
- data/lib/purecloud/models/create_callback_command.rb +24 -4
- data/lib/purecloud/models/create_callback_response.rb +179 -0
- data/lib/purecloud/models/dependency.rb +13 -1
- data/lib/purecloud/models/dependency_object.rb +13 -1
- data/lib/purecloud/models/domain_edge_software_version_dto.rb +13 -13
- data/lib/purecloud/models/group_search_criteria.rb +260 -0
- data/lib/purecloud/models/group_search_request.rb +240 -0
- data/lib/purecloud/models/groups_search_response.rb +16 -4
- data/lib/purecloud/models/integration.rb +252 -0
- data/lib/purecloud/models/integration_configuration.rb +243 -0
- data/lib/purecloud/models/{deleted_resource_consumer_entity_listing.rb → integration_entity_listing.rb} +2 -2
- data/lib/purecloud/models/integration_status_info.rb +209 -0
- data/lib/purecloud/models/integration_type.rb +27 -1
- data/lib/purecloud/models/json_node.rb +13 -13
- data/lib/purecloud/models/json_node_search_response.rb +14 -4
- data/lib/purecloud/models/location_search_criteria.rb +260 -0
- data/lib/purecloud/models/location_search_request.rb +240 -0
- data/lib/purecloud/models/locations_search_response.rb +261 -0
- data/lib/purecloud/models/number_order.rb +339 -0
- data/lib/purecloud/models/number_order_request.rb +1 -1
- data/lib/purecloud/models/port_billing_address.rb +205 -0
- data/lib/purecloud/models/port_contact.rb +175 -0
- data/lib/purecloud/models/quality_audit.rb +1 -1
- data/lib/purecloud/models/reservation.rb +1 -1
- data/lib/purecloud/models/routing_data.rb +209 -0
- data/lib/purecloud/models/search_aggregation.rb +37 -5
- data/lib/purecloud/models/search_criteria.rb +22 -22
- data/lib/purecloud/models/search_request.rb +40 -39
- data/lib/purecloud/models/suggest_search_criteria.rb +240 -0
- data/lib/purecloud/models/suggest_search_request.rb +180 -0
- data/lib/purecloud/models/usage.rb +167 -0
- data/lib/purecloud/models/usage_item.rb +194 -0
- data/lib/purecloud/models/user_search_criteria.rb +260 -0
- data/lib/purecloud/models/user_search_request.rb +240 -0
- data/lib/purecloud/models/users_search_response.rb +16 -4
- data/lib/purecloud/models/voicemail_message_entity_listing.rb +4 -74
- data/lib/purecloud/models/workspace.rb +11 -1
- data/lib/purecloud/models/workspace_create.rb +14 -4
- data/lib/purecloud/models/workspace_summary.rb +14 -4
- data/lib/purecloud/version.rb +1 -1
- data/lib/purecloud.rb +23 -2
- data/newVersion.md +1 -1
- data/swagger.json +1 -1
- data/version.json +1 -1
- metadata +48 -6
@@ -693,66 +693,6 @@ module PureCloud
|
|
693
693
|
return data, status_code, headers
|
694
694
|
end
|
695
695
|
|
696
|
-
# List profile skills for a user
|
697
|
-
#
|
698
|
-
# @param user_id User ID
|
699
|
-
# @param [Hash] opts the optional parameters
|
700
|
-
# @return [Array<String>]
|
701
|
-
def get_user_id_profileskills(user_id, opts = {})
|
702
|
-
data, status_code, headers = get_user_id_profileskills_with_http_info(user_id, opts)
|
703
|
-
return data
|
704
|
-
end
|
705
|
-
|
706
|
-
# List profile skills for a user
|
707
|
-
#
|
708
|
-
# @param user_id User ID
|
709
|
-
# @param [Hash] opts the optional parameters
|
710
|
-
# @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers
|
711
|
-
def get_user_id_profileskills_with_http_info(user_id, opts = {})
|
712
|
-
if @api_client.config.debugging
|
713
|
-
@api_client.config.logger.debug "Calling API: UsersApi#get_user_id_profileskills ..."
|
714
|
-
end
|
715
|
-
|
716
|
-
# verify the required parameter 'user_id' is set
|
717
|
-
fail "Missing the required parameter 'user_id' when calling get_user_id_profileskills" if user_id.nil?
|
718
|
-
|
719
|
-
# resource path
|
720
|
-
local_var_path = "/api/v2/users/{userId}/profileskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
721
|
-
|
722
|
-
# query parameters
|
723
|
-
query_params = {}
|
724
|
-
|
725
|
-
# header parameters
|
726
|
-
header_params = {}
|
727
|
-
|
728
|
-
# HTTP header 'Accept' (if needed)
|
729
|
-
_header_accept = ['application/json']
|
730
|
-
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
731
|
-
|
732
|
-
# HTTP header 'Content-Type'
|
733
|
-
_header_content_type = ['application/json']
|
734
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
735
|
-
|
736
|
-
# form parameters
|
737
|
-
form_params = {}
|
738
|
-
|
739
|
-
# http body (model)
|
740
|
-
post_body = nil
|
741
|
-
|
742
|
-
auth_names = ['PureCloud Auth']
|
743
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
744
|
-
:header_params => header_params,
|
745
|
-
:query_params => query_params,
|
746
|
-
:form_params => form_params,
|
747
|
-
:body => post_body,
|
748
|
-
:auth_names => auth_names,
|
749
|
-
:return_type => 'Array<String>')
|
750
|
-
if @api_client.config.debugging
|
751
|
-
@api_client.config.logger.debug "API called: UsersApi#get_user_id_profileskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
752
|
-
end
|
753
|
-
return data, status_code, headers
|
754
|
-
end
|
755
|
-
|
756
696
|
# Get queues for user
|
757
697
|
#
|
758
698
|
# @param user_id User ID
|
@@ -908,8 +848,8 @@ module PureCloud
|
|
908
848
|
# verify the required parameter 'user_id' is set
|
909
849
|
fail "Missing the required parameter 'user_id' when calling get_user_id_routingskills" if user_id.nil?
|
910
850
|
|
911
|
-
if opts[:'sort_order'] && !['
|
912
|
-
fail 'invalid value for "sort_order", must be one of
|
851
|
+
if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order'])
|
852
|
+
fail 'invalid value for "sort_order", must be one of ascending, descending'
|
913
853
|
end
|
914
854
|
|
915
855
|
# resource path
|
@@ -1100,8 +1040,8 @@ module PureCloud
|
|
1100
1040
|
@api_client.config.logger.debug "Calling API: UsersApi#get_users ..."
|
1101
1041
|
end
|
1102
1042
|
|
1103
|
-
if opts[:'sort_order'] && !['
|
1104
|
-
fail 'invalid value for "sort_order", must be one of
|
1043
|
+
if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order'])
|
1044
|
+
fail 'invalid value for "sort_order", must be one of ascending, descending'
|
1105
1045
|
end
|
1106
1046
|
|
1107
1047
|
# resource path
|
@@ -1469,7 +1409,7 @@ module PureCloud
|
|
1469
1409
|
# Search
|
1470
1410
|
#
|
1471
1411
|
# @param [Hash] opts the optional parameters
|
1472
|
-
# @option opts [
|
1412
|
+
# @option opts [UserSearchRequest] :body Search request options
|
1473
1413
|
# @return [UsersSearchResponse]
|
1474
1414
|
def post_search(opts = {})
|
1475
1415
|
data, status_code, headers = post_search_with_http_info(opts)
|
@@ -1479,7 +1419,7 @@ module PureCloud
|
|
1479
1419
|
# Search
|
1480
1420
|
#
|
1481
1421
|
# @param [Hash] opts the optional parameters
|
1482
|
-
# @option opts [
|
1422
|
+
# @option opts [UserSearchRequest] :body Search request options
|
1483
1423
|
# @return [Array<(UsersSearchResponse, Fixnum, Hash)>] UsersSearchResponse data, response status code and response headers
|
1484
1424
|
def post_search_with_http_info(opts = {})
|
1485
1425
|
if @api_client.config.debugging
|
@@ -1883,68 +1823,6 @@ module PureCloud
|
|
1883
1823
|
return data, status_code, headers
|
1884
1824
|
end
|
1885
1825
|
|
1886
|
-
# Update profile skills for a user
|
1887
|
-
#
|
1888
|
-
# @param user_id User ID
|
1889
|
-
# @param [Hash] opts the optional parameters
|
1890
|
-
# @option opts [Array<String>] :body Skills
|
1891
|
-
# @return [Array<String>]
|
1892
|
-
def put_user_id_profileskills(user_id, opts = {})
|
1893
|
-
data, status_code, headers = put_user_id_profileskills_with_http_info(user_id, opts)
|
1894
|
-
return data
|
1895
|
-
end
|
1896
|
-
|
1897
|
-
# Update profile skills for a user
|
1898
|
-
#
|
1899
|
-
# @param user_id User ID
|
1900
|
-
# @param [Hash] opts the optional parameters
|
1901
|
-
# @option opts [Array<String>] :body Skills
|
1902
|
-
# @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers
|
1903
|
-
def put_user_id_profileskills_with_http_info(user_id, opts = {})
|
1904
|
-
if @api_client.config.debugging
|
1905
|
-
@api_client.config.logger.debug "Calling API: UsersApi#put_user_id_profileskills ..."
|
1906
|
-
end
|
1907
|
-
|
1908
|
-
# verify the required parameter 'user_id' is set
|
1909
|
-
fail "Missing the required parameter 'user_id' when calling put_user_id_profileskills" if user_id.nil?
|
1910
|
-
|
1911
|
-
# resource path
|
1912
|
-
local_var_path = "/api/v2/users/{userId}/profileskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
1913
|
-
|
1914
|
-
# query parameters
|
1915
|
-
query_params = {}
|
1916
|
-
|
1917
|
-
# header parameters
|
1918
|
-
header_params = {}
|
1919
|
-
|
1920
|
-
# HTTP header 'Accept' (if needed)
|
1921
|
-
_header_accept = ['application/json']
|
1922
|
-
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
1923
|
-
|
1924
|
-
# HTTP header 'Content-Type'
|
1925
|
-
_header_content_type = ['application/json']
|
1926
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
1927
|
-
|
1928
|
-
# form parameters
|
1929
|
-
form_params = {}
|
1930
|
-
|
1931
|
-
# http body (model)
|
1932
|
-
post_body = @api_client.object_to_http_body(opts[:'body'])
|
1933
|
-
|
1934
|
-
auth_names = ['PureCloud Auth']
|
1935
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1936
|
-
:header_params => header_params,
|
1937
|
-
:query_params => query_params,
|
1938
|
-
:form_params => form_params,
|
1939
|
-
:body => post_body,
|
1940
|
-
:auth_names => auth_names,
|
1941
|
-
:return_type => 'Array<String>')
|
1942
|
-
if @api_client.config.debugging
|
1943
|
-
@api_client.config.logger.debug "API called: UsersApi#put_user_id_profileskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1944
|
-
end
|
1945
|
-
return data, status_code, headers
|
1946
|
-
end
|
1947
|
-
|
1948
1826
|
# Sets the user's roles
|
1949
1827
|
#
|
1950
1828
|
# @param user_id User ID
|
data/lib/purecloud/api_client.rb
CHANGED
@@ -33,7 +33,7 @@ module PureCloud
|
|
33
33
|
|
34
34
|
def initialize(config = Configuration.default)
|
35
35
|
@config = config
|
36
|
-
@user_agent = "PureCloud SDK/Ruby 0.
|
36
|
+
@user_agent = "PureCloud SDK/Ruby 0.41.1"
|
37
37
|
@default_headers = {
|
38
38
|
'Content-Type' => "application/json",
|
39
39
|
'User-Agent' => @user_agent
|
@@ -0,0 +1,155 @@
|
|
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 AdditionalInfo
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.swagger_types
|
30
|
+
{
|
31
|
+
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return unless attributes.is_a?(Hash)
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
40
|
+
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
# Check equality by comparing each attribute.
|
45
|
+
def ==(o)
|
46
|
+
return true if self.equal?(o)
|
47
|
+
self.class == o.class
|
48
|
+
end
|
49
|
+
|
50
|
+
# @see the `==` method
|
51
|
+
def eql?(o)
|
52
|
+
self == o
|
53
|
+
end
|
54
|
+
|
55
|
+
# Calculate hash code according to all attributes.
|
56
|
+
def hash
|
57
|
+
[].hash
|
58
|
+
end
|
59
|
+
|
60
|
+
# build the object from hash
|
61
|
+
def build_from_hash(attributes)
|
62
|
+
return nil unless attributes.is_a?(Hash)
|
63
|
+
self.class.swagger_types.each_pair do |key, type|
|
64
|
+
if type =~ /^Array<(.*)>/i
|
65
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
66
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
67
|
+
else
|
68
|
+
#TODO show warning in debug mode
|
69
|
+
end
|
70
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
71
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
72
|
+
else
|
73
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
self
|
78
|
+
end
|
79
|
+
|
80
|
+
def _deserialize(type, value)
|
81
|
+
case type.to_sym
|
82
|
+
when :DateTime
|
83
|
+
DateTime.parse(value)
|
84
|
+
when :Date
|
85
|
+
Date.parse(value)
|
86
|
+
when :String
|
87
|
+
value.to_s
|
88
|
+
when :Integer
|
89
|
+
value.to_i
|
90
|
+
when :Float
|
91
|
+
value.to_f
|
92
|
+
when :BOOLEAN
|
93
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
94
|
+
true
|
95
|
+
else
|
96
|
+
false
|
97
|
+
end
|
98
|
+
when :Object
|
99
|
+
# generic object (usually a Hash), return directly
|
100
|
+
value
|
101
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
102
|
+
inner_type = Regexp.last_match[:inner_type]
|
103
|
+
value.map { |v| _deserialize(inner_type, v) }
|
104
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
105
|
+
k_type = Regexp.last_match[:k_type]
|
106
|
+
v_type = Regexp.last_match[:v_type]
|
107
|
+
{}.tap do |hash|
|
108
|
+
value.each do |k, v|
|
109
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
else # model
|
113
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
114
|
+
_model.build_from_hash(value)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def to_s
|
119
|
+
to_hash.to_s
|
120
|
+
end
|
121
|
+
|
122
|
+
# to_body is an alias to to_body (backward compatibility))
|
123
|
+
def to_body
|
124
|
+
to_hash
|
125
|
+
end
|
126
|
+
|
127
|
+
# return the object in the form of hash
|
128
|
+
def to_hash
|
129
|
+
hash = {}
|
130
|
+
self.class.attribute_map.each_pair do |attr, param|
|
131
|
+
value = self.send(attr)
|
132
|
+
next if value.nil?
|
133
|
+
hash[param] = _to_hash(value)
|
134
|
+
end
|
135
|
+
hash
|
136
|
+
end
|
137
|
+
|
138
|
+
# Method to output non-array value in the form of hash
|
139
|
+
# For object, use to_hash. Otherwise, just return the value
|
140
|
+
def _to_hash(value)
|
141
|
+
if value.is_a?(Array)
|
142
|
+
value.compact.map{ |v| _to_hash(v) }
|
143
|
+
elsif value.is_a?(Hash)
|
144
|
+
{}.tap do |hash|
|
145
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
146
|
+
end
|
147
|
+
elsif value.respond_to? :to_hash
|
148
|
+
value.to_hash
|
149
|
+
else
|
150
|
+
value
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
end
|
155
|
+
end
|
@@ -0,0 +1,177 @@
|
|
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 AuthzPerm
|
21
|
+
attr_accessor :name
|
22
|
+
|
23
|
+
attr_accessor :permitted
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
|
29
|
+
:'name' => :'name',
|
30
|
+
|
31
|
+
:'permitted' => :'permitted'
|
32
|
+
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.swagger_types
|
38
|
+
{
|
39
|
+
:'name' => :'String',
|
40
|
+
:'permitted' => :'BOOLEAN'
|
41
|
+
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
def initialize(attributes = {})
|
46
|
+
return unless attributes.is_a?(Hash)
|
47
|
+
|
48
|
+
# convert string to symbol for hash key
|
49
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
50
|
+
|
51
|
+
|
52
|
+
if attributes[:'name']
|
53
|
+
self.name = attributes[:'name']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes[:'permitted']
|
57
|
+
self.permitted = attributes[:'permitted']
|
58
|
+
else
|
59
|
+
self.permitted = false
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check equality by comparing each attribute.
|
65
|
+
def ==(o)
|
66
|
+
return true if self.equal?(o)
|
67
|
+
self.class == o.class &&
|
68
|
+
name == o.name &&
|
69
|
+
permitted == o.permitted
|
70
|
+
end
|
71
|
+
|
72
|
+
# @see the `==` method
|
73
|
+
def eql?(o)
|
74
|
+
self == o
|
75
|
+
end
|
76
|
+
|
77
|
+
# Calculate hash code according to all attributes.
|
78
|
+
def hash
|
79
|
+
[name, permitted].hash
|
80
|
+
end
|
81
|
+
|
82
|
+
# build the object from hash
|
83
|
+
def build_from_hash(attributes)
|
84
|
+
return nil unless attributes.is_a?(Hash)
|
85
|
+
self.class.swagger_types.each_pair do |key, type|
|
86
|
+
if type =~ /^Array<(.*)>/i
|
87
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
88
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
89
|
+
else
|
90
|
+
#TODO show warning in debug mode
|
91
|
+
end
|
92
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
93
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
94
|
+
else
|
95
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
self
|
100
|
+
end
|
101
|
+
|
102
|
+
def _deserialize(type, value)
|
103
|
+
case type.to_sym
|
104
|
+
when :DateTime
|
105
|
+
DateTime.parse(value)
|
106
|
+
when :Date
|
107
|
+
Date.parse(value)
|
108
|
+
when :String
|
109
|
+
value.to_s
|
110
|
+
when :Integer
|
111
|
+
value.to_i
|
112
|
+
when :Float
|
113
|
+
value.to_f
|
114
|
+
when :BOOLEAN
|
115
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
116
|
+
true
|
117
|
+
else
|
118
|
+
false
|
119
|
+
end
|
120
|
+
when :Object
|
121
|
+
# generic object (usually a Hash), return directly
|
122
|
+
value
|
123
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
124
|
+
inner_type = Regexp.last_match[:inner_type]
|
125
|
+
value.map { |v| _deserialize(inner_type, v) }
|
126
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
127
|
+
k_type = Regexp.last_match[:k_type]
|
128
|
+
v_type = Regexp.last_match[:v_type]
|
129
|
+
{}.tap do |hash|
|
130
|
+
value.each do |k, v|
|
131
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
else # model
|
135
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
136
|
+
_model.build_from_hash(value)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
def to_s
|
141
|
+
to_hash.to_s
|
142
|
+
end
|
143
|
+
|
144
|
+
# to_body is an alias to to_body (backward compatibility))
|
145
|
+
def to_body
|
146
|
+
to_hash
|
147
|
+
end
|
148
|
+
|
149
|
+
# return the object in the form of hash
|
150
|
+
def to_hash
|
151
|
+
hash = {}
|
152
|
+
self.class.attribute_map.each_pair do |attr, param|
|
153
|
+
value = self.send(attr)
|
154
|
+
next if value.nil?
|
155
|
+
hash[param] = _to_hash(value)
|
156
|
+
end
|
157
|
+
hash
|
158
|
+
end
|
159
|
+
|
160
|
+
# Method to output non-array value in the form of hash
|
161
|
+
# For object, use to_hash. Otherwise, just return the value
|
162
|
+
def _to_hash(value)
|
163
|
+
if value.is_a?(Array)
|
164
|
+
value.compact.map{ |v| _to_hash(v) }
|
165
|
+
elsif value.is_a?(Hash)
|
166
|
+
{}.tap do |hash|
|
167
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
168
|
+
end
|
169
|
+
elsif value.respond_to? :to_hash
|
170
|
+
value.to_hash
|
171
|
+
else
|
172
|
+
value
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
end
|
177
|
+
end
|
@@ -18,7 +18,7 @@ require 'date'
|
|
18
18
|
|
19
19
|
module PureCloud
|
20
20
|
class AuthzPermissionContext
|
21
|
-
attr_accessor :
|
21
|
+
attr_accessor :id
|
22
22
|
|
23
23
|
attr_accessor :type
|
24
24
|
|
@@ -26,7 +26,7 @@ module PureCloud
|
|
26
26
|
def self.attribute_map
|
27
27
|
{
|
28
28
|
|
29
|
-
:'
|
29
|
+
:'id' => :'id',
|
30
30
|
|
31
31
|
:'type' => :'type'
|
32
32
|
|
@@ -36,7 +36,7 @@ module PureCloud
|
|
36
36
|
# Attribute type mapping.
|
37
37
|
def self.swagger_types
|
38
38
|
{
|
39
|
-
:'
|
39
|
+
:'id' => :'String',
|
40
40
|
:'type' => :'String'
|
41
41
|
|
42
42
|
}
|
@@ -49,8 +49,8 @@ module PureCloud
|
|
49
49
|
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
50
50
|
|
51
51
|
|
52
|
-
if attributes[:'
|
53
|
-
self.
|
52
|
+
if attributes[:'id']
|
53
|
+
self.id = attributes[:'id']
|
54
54
|
end
|
55
55
|
|
56
56
|
if attributes[:'type']
|
@@ -63,7 +63,7 @@ module PureCloud
|
|
63
63
|
def ==(o)
|
64
64
|
return true if self.equal?(o)
|
65
65
|
self.class == o.class &&
|
66
|
-
|
66
|
+
id == o.id &&
|
67
67
|
type == o.type
|
68
68
|
end
|
69
69
|
|
@@ -74,7 +74,7 @@ module PureCloud
|
|
74
74
|
|
75
75
|
# Calculate hash code according to all attributes.
|
76
76
|
def hash
|
77
|
-
[
|
77
|
+
[id, type].hash
|
78
78
|
end
|
79
79
|
|
80
80
|
# build the object from hash
|
@@ -51,6 +51,9 @@ module PureCloud
|
|
51
51
|
# Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
52
52
|
attr_accessor :disconnected_time
|
53
53
|
|
54
|
+
# Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
55
|
+
attr_accessor :callback_scheduled_time
|
56
|
+
|
54
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
55
58
|
def self.attribute_map
|
56
59
|
{
|
@@ -83,7 +86,9 @@ module PureCloud
|
|
83
86
|
|
84
87
|
:'connected_time' => :'connectedTime',
|
85
88
|
|
86
|
-
:'disconnected_time' => :'disconnectedTime'
|
89
|
+
:'disconnected_time' => :'disconnectedTime',
|
90
|
+
|
91
|
+
:'callback_scheduled_time' => :'callbackScheduledTime'
|
87
92
|
|
88
93
|
}
|
89
94
|
end
|
@@ -105,7 +110,8 @@ module PureCloud
|
|
105
110
|
:'skip_enabled' => :'BOOLEAN',
|
106
111
|
:'timeout_seconds' => :'Integer',
|
107
112
|
:'connected_time' => :'DateTime',
|
108
|
-
:'disconnected_time' => :'DateTime'
|
113
|
+
:'disconnected_time' => :'DateTime',
|
114
|
+
:'callback_scheduled_time' => :'DateTime'
|
109
115
|
|
110
116
|
}
|
111
117
|
end
|
@@ -185,6 +191,10 @@ module PureCloud
|
|
185
191
|
self.disconnected_time = attributes[:'disconnectedTime']
|
186
192
|
end
|
187
193
|
|
194
|
+
if attributes[:'callbackScheduledTime']
|
195
|
+
self.callback_scheduled_time = attributes[:'callbackScheduledTime']
|
196
|
+
end
|
197
|
+
|
188
198
|
end
|
189
199
|
|
190
200
|
# Custom attribute writer method checking allowed values (enum).
|
@@ -232,7 +242,8 @@ module PureCloud
|
|
232
242
|
skip_enabled == o.skip_enabled &&
|
233
243
|
timeout_seconds == o.timeout_seconds &&
|
234
244
|
connected_time == o.connected_time &&
|
235
|
-
disconnected_time == o.disconnected_time
|
245
|
+
disconnected_time == o.disconnected_time &&
|
246
|
+
callback_scheduled_time == o.callback_scheduled_time
|
236
247
|
end
|
237
248
|
|
238
249
|
# @see the `==` method
|
@@ -242,7 +253,7 @@ module PureCloud
|
|
242
253
|
|
243
254
|
# Calculate hash code according to all attributes.
|
244
255
|
def hash
|
245
|
-
[state, id, segments, direction, held, disconnect_type, start_hold_time, dialer_preview, callback_numbers, callback_user_name, script_id, skip_enabled, timeout_seconds, connected_time, disconnected_time].hash
|
256
|
+
[state, id, segments, direction, held, disconnect_type, start_hold_time, dialer_preview, callback_numbers, callback_user_name, script_id, skip_enabled, timeout_seconds, connected_time, disconnected_time, callback_scheduled_time].hash
|
246
257
|
end
|
247
258
|
|
248
259
|
# build the object from hash
|