purecloud 0.18.0 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Gemfile.lock +2 -2
- data/README.md +1 -7
- data/config-ruby.json +1 -1
- data/extensions/auth.rb +2 -2
- data/lib/purecloud.rb +110 -75
- data/lib/purecloud/api/architect_api.rb +3127 -74
- data/lib/purecloud/api/attributes_api.rb +33 -33
- data/lib/purecloud/api/authorization_api.rb +83 -83
- data/lib/purecloud/api/compliance_api.rb +5 -5
- data/lib/purecloud/api/configuration_api.rb +594 -397
- data/lib/purecloud/api/content_management_api.rb +183 -183
- data/lib/purecloud/api/conversations_api.rb +289 -159
- data/lib/purecloud/api/downloads_api.rb +6 -6
- data/lib/purecloud/api/external_contacts_api.rb +1693 -0
- data/lib/purecloud/api/fax_api.rb +24 -24
- data/lib/purecloud/api/geolocation_api.rb +14 -14
- data/lib/purecloud/api/greetings_api.rb +68 -68
- data/lib/purecloud/api/groups_api.rb +31 -20
- data/lib/purecloud/api/languages_api.rb +18 -11
- data/lib/purecloud/api/licensing_api.rb +5 -5
- data/lib/purecloud/api/locations_api.rb +11 -11
- data/lib/purecloud/api/notifications_api.rb +41 -41
- data/lib/purecloud/api/o_auth_api.rb +69 -69
- data/lib/purecloud/api/outbound_api.rb +505 -325
- data/lib/purecloud/api/presence_api.rb +65 -65
- data/lib/purecloud/api/quality_api.rb +66 -639
- data/lib/purecloud/api/recording_api.rb +1343 -0
- data/lib/purecloud/api/response_management_api.rb +687 -0
- data/lib/purecloud/api/routing_api.rb +224 -170
- data/lib/purecloud/api/scripts_api.rb +52 -52
- data/lib/purecloud/api/search_api.rb +5 -5
- data/lib/purecloud/api/stations_api.rb +8 -8
- data/lib/purecloud/api/telephony_providers_edge_api.rb +138 -138
- data/lib/purecloud/api/user_recordings_api.rb +29 -29
- data/lib/purecloud/api/users_api.rb +123 -123
- data/lib/purecloud/api/utilities_api.rb +71 -15
- data/lib/purecloud/api/voicemail_api.rb +42 -42
- data/lib/purecloud/api_client.rb +1 -1
- data/lib/purecloud/models/address.rb +49 -51
- data/lib/purecloud/models/attribute_filter_item.rb +177 -0
- data/lib/purecloud/models/automate_queue_member_entity_listing.rb +238 -0
- data/lib/purecloud/models/available_additional_service.rb +40 -1
- data/lib/purecloud/models/{topic_entity_listing.rb → available_topic_entity_listing.rb} +1 -1
- data/lib/purecloud/models/call.rb +36 -5
- data/lib/purecloud/models/{line_properties.rb → call_command.rb} +13 -3
- data/lib/purecloud/models/callback.rb +15 -4
- data/lib/purecloud/models/campaign.rb +219 -17
- data/lib/purecloud/models/campaign_progress.rb +186 -0
- data/lib/purecloud/models/channel_topic_entity_listing.rb +238 -0
- data/lib/purecloud/models/charge.rb +14 -4
- data/lib/purecloud/models/{attribute_value.rb → client_text_table_transform.rb} +52 -82
- data/lib/purecloud/models/contact.rb +1 -1
- data/lib/purecloud/models/contact_list.rb +111 -1
- data/lib/purecloud/models/contact_listing.rb +238 -0
- data/lib/purecloud/models/content_attribute_filter_item.rb +177 -0
- data/lib/purecloud/models/content_facet_filter_item.rb +1 -1
- data/lib/purecloud/models/content_query_request.rb +16 -4
- data/lib/purecloud/models/control.rb +221 -0
- data/lib/purecloud/models/{flow_activate_request.rb → control_options.rb} +18 -12
- data/lib/purecloud/models/create_callback_command.rb +200 -0
- data/lib/purecloud/models/discount.rb +220 -0
- data/lib/purecloud/models/document.rb +13 -1
- data/lib/purecloud/models/document_attribute.rb +158 -0
- data/lib/purecloud/models/document_update.rb +28 -16
- data/lib/purecloud/models/document_upload.rb +4 -16
- data/lib/purecloud/models/domain_voice_rate_extended_response_item_entity_listing.rb +238 -0
- data/lib/purecloud/models/domain_voice_rate_international_response_item_entity_listing.rb +238 -0
- data/lib/purecloud/models/domain_voice_rate_response_item_entity_listing.rb +1 -1
- data/lib/purecloud/models/edge_line.rb +1 -1
- data/lib/purecloud/models/edge_logs_job.rb +181 -0
- data/lib/purecloud/models/edge_logs_job_file.rb +243 -0
- data/lib/purecloud/models/edge_logs_job_request.rb +168 -0
- data/lib/purecloud/models/{backend_work_item_data_element.rb → edge_logs_job_response.rb} +16 -24
- data/lib/purecloud/models/{flow_lock_request.rb → edge_logs_job_upload_request.rb} +10 -12
- data/lib/purecloud/models/email.rb +15 -4
- data/lib/purecloud/models/endpoint.rb +1 -1
- data/lib/purecloud/models/{flow_associate_workspaces_request.rb → estimated_wait_time_predictions.rb} +10 -11
- data/lib/purecloud/models/external_contact.rb +320 -0
- data/lib/purecloud/models/external_organization.rb +306 -0
- data/lib/purecloud/models/external_organization_listing.rb +238 -0
- data/lib/purecloud/models/facet_filter_item.rb +1 -1
- data/lib/purecloud/models/flow_body.rb +1 -1
- data/lib/purecloud/models/flow_body_format.rb +10 -20
- data/lib/purecloud/models/flow_terminate_request.rb +3 -16
- data/lib/purecloud/models/form.rb +148 -0
- data/lib/purecloud/models/group.rb +11 -1
- data/lib/purecloud/models/health_check_info.rb +268 -0
- data/lib/purecloud/models/{body_2.rb → inline_response_200.rb} +1 -1
- data/lib/purecloud/models/integration_type.rb +209 -0
- data/lib/purecloud/models/integration_type_entity_listing.rb +238 -0
- data/lib/purecloud/models/key_rotation_schedule.rb +1 -0
- data/lib/purecloud/models/language.rb +41 -1
- data/lib/purecloud/models/line.rb +1 -1
- data/lib/purecloud/models/line_base.rb +1 -1
- data/lib/purecloud/models/media_policies.rb +169 -0
- data/lib/purecloud/models/media_policy.rb +171 -0
- data/lib/purecloud/models/note.rb +200 -0
- data/lib/purecloud/models/{user_station_resource.rb → note_listing.rb} +68 -58
- data/lib/purecloud/models/o_auth_client.rb +1 -1
- data/lib/purecloud/models/page.rb +2 -2
- data/lib/purecloud/models/{byte_buffer.rb → payment_method.rb} +48 -61
- data/lib/purecloud/models/payment_method_listing.rb +238 -0
- data/lib/purecloud/models/payment_token_provider.rb +180 -0
- data/lib/purecloud/models/phone.rb +1 -1
- data/lib/purecloud/models/phone_base.rb +1 -1
- data/lib/purecloud/models/phone_number.rb +198 -0
- data/lib/purecloud/models/phones_reboot.rb +14 -4
- data/lib/purecloud/models/policy.rb +14 -1
- data/lib/purecloud/models/prediction_results.rb +167 -0
- data/lib/purecloud/models/query_request.rb +16 -4
- data/lib/purecloud/models/queue_member_entity_listing.rb +1 -1
- data/lib/purecloud/models/quote.rb +13 -1
- data/lib/purecloud/models/recording_settings.rb +146 -0
- data/lib/purecloud/models/relationship.rb +201 -0
- data/lib/purecloud/models/relationship_listing.rb +238 -0
- data/lib/purecloud/models/report_schedule.rb +3 -2
- data/lib/purecloud/models/service_type.rb +12 -1
- data/lib/purecloud/models/social_expression.rb +25 -4
- data/lib/purecloud/models/spreadsheet_transform_entity_listing.rb +1 -1
- data/lib/purecloud/models/template.rb +1 -1
- data/lib/purecloud/models/text_table_transform_entity_listing.rb +1 -1
- data/lib/purecloud/models/ticker.rb +158 -0
- data/lib/purecloud/models/time_slot.rb +1 -0
- data/lib/purecloud/models/trunk_base.rb +1 -1
- data/lib/purecloud/models/vendor_connection_request.rb +166 -0
- data/lib/purecloud/models/video.rb +15 -4
- data/lib/purecloud/models/work_item_definition.rb +8 -10
- data/lib/purecloud/version.rb +1 -1
- data/ossindex.json +17 -0
- data/purecloud.gemspec +4 -3
- data/rakefile +3 -15
- data/spec/test.rb +6 -3
- data/swagger.json +1 -1
- data/swagger_template/api_client.mustache +304 -0
- data/swagger_template/base_object.mustache +90 -0
- data/{PureCloud.gemspec → swagger_template/gemspec.mustache} +12 -11
- data/version.json +1 -1
- metadata +76 -25
- data/lib/purecloud/api/analytics_api.rb +0 -1554
- data/lib/purecloud/api/orphaned_recordings_api.rb +0 -205
- data/newVersion.md +0 -1
@@ -4,11 +4,15 @@ module PureCloud
|
|
4
4
|
class PhonesReboot
|
5
5
|
attr_accessor :phone_ids
|
6
6
|
|
7
|
+
attr_accessor :site_id
|
8
|
+
|
7
9
|
# Attribute mapping from ruby-style variable name to JSON key.
|
8
10
|
def self.attribute_map
|
9
11
|
{
|
10
12
|
|
11
|
-
:'phone_ids' => :'phoneIds'
|
13
|
+
:'phone_ids' => :'phoneIds',
|
14
|
+
|
15
|
+
:'site_id' => :'siteId'
|
12
16
|
|
13
17
|
}
|
14
18
|
end
|
@@ -16,7 +20,8 @@ module PureCloud
|
|
16
20
|
# Attribute type mapping.
|
17
21
|
def self.swagger_types
|
18
22
|
{
|
19
|
-
:'phone_ids' => :'Array<String>'
|
23
|
+
:'phone_ids' => :'Array<String>',
|
24
|
+
:'site_id' => :'String'
|
20
25
|
|
21
26
|
}
|
22
27
|
end
|
@@ -34,13 +39,18 @@ module PureCloud
|
|
34
39
|
end
|
35
40
|
end
|
36
41
|
|
42
|
+
if attributes[:'siteId']
|
43
|
+
self.site_id = attributes[:'siteId']
|
44
|
+
end
|
45
|
+
|
37
46
|
end
|
38
47
|
|
39
48
|
# Check equality by comparing each attribute.
|
40
49
|
def ==(o)
|
41
50
|
return true if self.equal?(o)
|
42
51
|
self.class == o.class &&
|
43
|
-
phone_ids == o.phone_ids
|
52
|
+
phone_ids == o.phone_ids &&
|
53
|
+
site_id == o.site_id
|
44
54
|
end
|
45
55
|
|
46
56
|
# @see the `==` method
|
@@ -50,7 +60,7 @@ module PureCloud
|
|
50
60
|
|
51
61
|
# Calculate hash code according to all attributes.
|
52
62
|
def hash
|
53
|
-
[phone_ids].hash
|
63
|
+
[phone_ids, site_id].hash
|
54
64
|
end
|
55
65
|
|
56
66
|
# build the object from hash
|
@@ -19,8 +19,13 @@ module PureCloud
|
|
19
19
|
|
20
20
|
attr_accessor :enabled
|
21
21
|
|
22
|
+
# Conditions and actions per media type
|
23
|
+
attr_accessor :media_policies
|
24
|
+
|
25
|
+
# Conditions
|
22
26
|
attr_accessor :conditions
|
23
27
|
|
28
|
+
# Actions
|
24
29
|
attr_accessor :actions
|
25
30
|
|
26
31
|
attr_accessor :policy_errors
|
@@ -46,6 +51,8 @@ module PureCloud
|
|
46
51
|
|
47
52
|
:'enabled' => :'enabled',
|
48
53
|
|
54
|
+
:'media_policies' => :'mediaPolicies',
|
55
|
+
|
49
56
|
:'conditions' => :'conditions',
|
50
57
|
|
51
58
|
:'actions' => :'actions',
|
@@ -67,6 +74,7 @@ module PureCloud
|
|
67
74
|
:'order' => :'Integer',
|
68
75
|
:'description' => :'String',
|
69
76
|
:'enabled' => :'BOOLEAN',
|
77
|
+
:'media_policies' => :'MediaPolicies',
|
70
78
|
:'conditions' => :'PolicyConditions',
|
71
79
|
:'actions' => :'PolicyActions',
|
72
80
|
:'policy_errors' => :'PolicyErrors',
|
@@ -112,6 +120,10 @@ module PureCloud
|
|
112
120
|
self.enabled = false
|
113
121
|
end
|
114
122
|
|
123
|
+
if attributes[:'mediaPolicies']
|
124
|
+
self.media_policies = attributes[:'mediaPolicies']
|
125
|
+
end
|
126
|
+
|
115
127
|
if attributes[:'conditions']
|
116
128
|
self.conditions = attributes[:'conditions']
|
117
129
|
end
|
@@ -141,6 +153,7 @@ module PureCloud
|
|
141
153
|
order == o.order &&
|
142
154
|
description == o.description &&
|
143
155
|
enabled == o.enabled &&
|
156
|
+
media_policies == o.media_policies &&
|
144
157
|
conditions == o.conditions &&
|
145
158
|
actions == o.actions &&
|
146
159
|
policy_errors == o.policy_errors &&
|
@@ -154,7 +167,7 @@ module PureCloud
|
|
154
167
|
|
155
168
|
# Calculate hash code according to all attributes.
|
156
169
|
def hash
|
157
|
-
[id, name, modified_date, created_date, order, description, enabled, conditions, actions, policy_errors, self_uri].hash
|
170
|
+
[id, name, modified_date, created_date, order, description, enabled, media_policies, conditions, actions, policy_errors, self_uri].hash
|
158
171
|
end
|
159
172
|
|
160
173
|
# build the object from hash
|
@@ -0,0 +1,167 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module PureCloud
|
4
|
+
class PredictionResults
|
5
|
+
# Indicates the estimated wait time Formula
|
6
|
+
attr_accessor :formula
|
7
|
+
|
8
|
+
# Estimated wait time in seconds
|
9
|
+
attr_accessor :estimated_wait_time_seconds
|
10
|
+
|
11
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
12
|
+
def self.attribute_map
|
13
|
+
{
|
14
|
+
|
15
|
+
:'formula' => :'formula',
|
16
|
+
|
17
|
+
:'estimated_wait_time_seconds' => :'estimatedWaitTimeSeconds'
|
18
|
+
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# Attribute type mapping.
|
23
|
+
def self.swagger_types
|
24
|
+
{
|
25
|
+
:'formula' => :'String',
|
26
|
+
:'estimated_wait_time_seconds' => :'Integer'
|
27
|
+
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def initialize(attributes = {})
|
32
|
+
return unless attributes.is_a?(Hash)
|
33
|
+
|
34
|
+
# convert string to symbol for hash key
|
35
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
36
|
+
|
37
|
+
|
38
|
+
if attributes[:'formula']
|
39
|
+
self.formula = attributes[:'formula']
|
40
|
+
end
|
41
|
+
|
42
|
+
if attributes[:'estimatedWaitTimeSeconds']
|
43
|
+
self.estimated_wait_time_seconds = attributes[:'estimatedWaitTimeSeconds']
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
# Custom attribute writer method checking allowed values (enum).
|
49
|
+
def formula=(formula)
|
50
|
+
allowed_values = ["BEST", "SIMPLE", "ABANDON", "PATIENCEABANDON"]
|
51
|
+
if formula && !allowed_values.include?(formula)
|
52
|
+
fail "invalid value for 'formula', must be one of #{allowed_values}"
|
53
|
+
end
|
54
|
+
@formula = formula
|
55
|
+
end
|
56
|
+
|
57
|
+
# Check equality by comparing each attribute.
|
58
|
+
def ==(o)
|
59
|
+
return true if self.equal?(o)
|
60
|
+
self.class == o.class &&
|
61
|
+
formula == o.formula &&
|
62
|
+
estimated_wait_time_seconds == o.estimated_wait_time_seconds
|
63
|
+
end
|
64
|
+
|
65
|
+
# @see the `==` method
|
66
|
+
def eql?(o)
|
67
|
+
self == o
|
68
|
+
end
|
69
|
+
|
70
|
+
# Calculate hash code according to all attributes.
|
71
|
+
def hash
|
72
|
+
[formula, estimated_wait_time_seconds].hash
|
73
|
+
end
|
74
|
+
|
75
|
+
# build the object from hash
|
76
|
+
def build_from_hash(attributes)
|
77
|
+
return nil unless attributes.is_a?(Hash)
|
78
|
+
self.class.swagger_types.each_pair do |key, type|
|
79
|
+
if type =~ /^Array<(.*)>/i
|
80
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
81
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
82
|
+
else
|
83
|
+
#TODO show warning in debug mode
|
84
|
+
end
|
85
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
86
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
87
|
+
else
|
88
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
self
|
93
|
+
end
|
94
|
+
|
95
|
+
def _deserialize(type, value)
|
96
|
+
case type.to_sym
|
97
|
+
when :DateTime
|
98
|
+
DateTime.parse(value)
|
99
|
+
when :Date
|
100
|
+
Date.parse(value)
|
101
|
+
when :String
|
102
|
+
value.to_s
|
103
|
+
when :Integer
|
104
|
+
value.to_i
|
105
|
+
when :Float
|
106
|
+
value.to_f
|
107
|
+
when :BOOLEAN
|
108
|
+
if value =~ /^(true|t|yes|y|1)$/i
|
109
|
+
true
|
110
|
+
else
|
111
|
+
false
|
112
|
+
end
|
113
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
114
|
+
inner_type = Regexp.last_match[:inner_type]
|
115
|
+
value.map { |v| _deserialize(inner_type, v) }
|
116
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
117
|
+
k_type = Regexp.last_match[:k_type]
|
118
|
+
v_type = Regexp.last_match[:v_type]
|
119
|
+
{}.tap do |hash|
|
120
|
+
value.each do |k, v|
|
121
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
else # model
|
125
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
126
|
+
_model.build_from_hash(value)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
def to_s
|
131
|
+
to_hash.to_s
|
132
|
+
end
|
133
|
+
|
134
|
+
# to_body is an alias to to_body (backward compatibility))
|
135
|
+
def to_body
|
136
|
+
to_hash
|
137
|
+
end
|
138
|
+
|
139
|
+
# return the object in the form of hash
|
140
|
+
def to_hash
|
141
|
+
hash = {}
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
143
|
+
value = self.send(attr)
|
144
|
+
next if value.nil?
|
145
|
+
hash[param] = _to_hash(value)
|
146
|
+
end
|
147
|
+
hash
|
148
|
+
end
|
149
|
+
|
150
|
+
# Method to output non-array value in the form of hash
|
151
|
+
# For object, use to_hash. Otherwise, just return the value
|
152
|
+
def _to_hash(value)
|
153
|
+
if value.is_a?(Array)
|
154
|
+
value.compact.map{ |v| _to_hash(v) }
|
155
|
+
elsif value.is_a?(Hash)
|
156
|
+
{}.tap do |hash|
|
157
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
158
|
+
end
|
159
|
+
elsif value.respond_to? :to_hash
|
160
|
+
value.to_hash
|
161
|
+
else
|
162
|
+
value
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
end
|
167
|
+
end
|
@@ -14,6 +14,8 @@ module PureCloud
|
|
14
14
|
|
15
15
|
attr_accessor :filters
|
16
16
|
|
17
|
+
attr_accessor :attribute_filters
|
18
|
+
|
17
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
18
20
|
def self.attribute_map
|
19
21
|
{
|
@@ -28,7 +30,9 @@ module PureCloud
|
|
28
30
|
|
29
31
|
:'sort' => :'sort',
|
30
32
|
|
31
|
-
:'filters' => :'filters'
|
33
|
+
:'filters' => :'filters',
|
34
|
+
|
35
|
+
:'attribute_filters' => :'attributeFilters'
|
32
36
|
|
33
37
|
}
|
34
38
|
end
|
@@ -41,7 +45,8 @@ module PureCloud
|
|
41
45
|
:'page_size' => :'Integer',
|
42
46
|
:'facet_name_requests' => :'Array<String>',
|
43
47
|
:'sort' => :'Array<SortItem>',
|
44
|
-
:'filters' => :'Array<FacetFilterItem>'
|
48
|
+
:'filters' => :'Array<FacetFilterItem>',
|
49
|
+
:'attribute_filters' => :'Array<AttributeFilterItem>'
|
45
50
|
|
46
51
|
}
|
47
52
|
end
|
@@ -83,6 +88,12 @@ module PureCloud
|
|
83
88
|
end
|
84
89
|
end
|
85
90
|
|
91
|
+
if attributes[:'attributeFilters']
|
92
|
+
if (value = attributes[:'attributeFilters']).is_a?(Array)
|
93
|
+
self.attribute_filters = value
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
86
97
|
end
|
87
98
|
|
88
99
|
# Check equality by comparing each attribute.
|
@@ -94,7 +105,8 @@ module PureCloud
|
|
94
105
|
page_size == o.page_size &&
|
95
106
|
facet_name_requests == o.facet_name_requests &&
|
96
107
|
sort == o.sort &&
|
97
|
-
filters == o.filters
|
108
|
+
filters == o.filters &&
|
109
|
+
attribute_filters == o.attribute_filters
|
98
110
|
end
|
99
111
|
|
100
112
|
# @see the `==` method
|
@@ -104,7 +116,7 @@ module PureCloud
|
|
104
116
|
|
105
117
|
# Calculate hash code according to all attributes.
|
106
118
|
def hash
|
107
|
-
[query_phrase, page_number, page_size, facet_name_requests, sort, filters].hash
|
119
|
+
[query_phrase, page_number, page_size, facet_name_requests, sort, filters, attribute_filters].hash
|
108
120
|
end
|
109
121
|
|
110
122
|
# build the object from hash
|
@@ -55,7 +55,7 @@ module PureCloud
|
|
55
55
|
:'page_size' => :'Integer',
|
56
56
|
:'page_number' => :'Integer',
|
57
57
|
:'total' => :'Integer',
|
58
|
-
:'entities' => :'Array<
|
58
|
+
:'entities' => :'Array<QueueMember>',
|
59
59
|
:'self_uri' => :'String',
|
60
60
|
:'first_uri' => :'String',
|
61
61
|
:'previous_uri' => :'String',
|
@@ -47,6 +47,8 @@ module PureCloud
|
|
47
47
|
|
48
48
|
attr_accessor :sales_partner_code
|
49
49
|
|
50
|
+
attr_accessor :is_annual_prepay
|
51
|
+
|
50
52
|
# The URI for this object
|
51
53
|
attr_accessor :self_uri
|
52
54
|
|
@@ -96,6 +98,8 @@ module PureCloud
|
|
96
98
|
|
97
99
|
:'sales_partner_code' => :'salesPartnerCode',
|
98
100
|
|
101
|
+
:'is_annual_prepay' => :'isAnnualPrepay',
|
102
|
+
|
99
103
|
:'self_uri' => :'selfUri'
|
100
104
|
|
101
105
|
}
|
@@ -125,6 +129,7 @@ module PureCloud
|
|
125
129
|
:'referral_codes' => :'Array<String>',
|
126
130
|
:'discount_codes' => :'Array<String>',
|
127
131
|
:'sales_partner_code' => :'String',
|
132
|
+
:'is_annual_prepay' => :'BOOLEAN',
|
128
133
|
:'self_uri' => :'String'
|
129
134
|
|
130
135
|
}
|
@@ -235,6 +240,12 @@ module PureCloud
|
|
235
240
|
self.sales_partner_code = attributes[:'salesPartnerCode']
|
236
241
|
end
|
237
242
|
|
243
|
+
if attributes[:'isAnnualPrepay']
|
244
|
+
self.is_annual_prepay = attributes[:'isAnnualPrepay']
|
245
|
+
else
|
246
|
+
self.is_annual_prepay = false
|
247
|
+
end
|
248
|
+
|
238
249
|
if attributes[:'selfUri']
|
239
250
|
self.self_uri = attributes[:'selfUri']
|
240
251
|
end
|
@@ -284,6 +295,7 @@ module PureCloud
|
|
284
295
|
referral_codes == o.referral_codes &&
|
285
296
|
discount_codes == o.discount_codes &&
|
286
297
|
sales_partner_code == o.sales_partner_code &&
|
298
|
+
is_annual_prepay == o.is_annual_prepay &&
|
287
299
|
self_uri == o.self_uri
|
288
300
|
end
|
289
301
|
|
@@ -294,7 +306,7 @@ module PureCloud
|
|
294
306
|
|
295
307
|
# Calculate hash code according to all attributes.
|
296
308
|
def hash
|
297
|
-
[id, name, purchase_order, type, status, is_submitted, is_pending, is_frozen, currency, created_date, last_updated_date, billing_contact_email, billing_contact_first_name, billing_contact_last_name, billing_contact_phone, include_voice_charges, charges, edge_control_model, referral_codes, discount_codes, sales_partner_code, self_uri].hash
|
309
|
+
[id, name, purchase_order, type, status, is_submitted, is_pending, is_frozen, currency, created_date, last_updated_date, billing_contact_email, billing_contact_first_name, billing_contact_last_name, billing_contact_phone, include_voice_charges, charges, edge_control_model, referral_codes, discount_codes, sales_partner_code, is_annual_prepay, self_uri].hash
|
298
310
|
end
|
299
311
|
|
300
312
|
# build the object from hash
|
@@ -0,0 +1,146 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module PureCloud
|
4
|
+
class RecordingSettings
|
5
|
+
attr_accessor :max_simultaneous_streams
|
6
|
+
|
7
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
8
|
+
def self.attribute_map
|
9
|
+
{
|
10
|
+
|
11
|
+
:'max_simultaneous_streams' => :'maxSimultaneousStreams'
|
12
|
+
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
# Attribute type mapping.
|
17
|
+
def self.swagger_types
|
18
|
+
{
|
19
|
+
:'max_simultaneous_streams' => :'Integer'
|
20
|
+
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(attributes = {})
|
25
|
+
return unless attributes.is_a?(Hash)
|
26
|
+
|
27
|
+
# convert string to symbol for hash key
|
28
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
29
|
+
|
30
|
+
|
31
|
+
if attributes[:'maxSimultaneousStreams']
|
32
|
+
self.max_simultaneous_streams = attributes[:'maxSimultaneousStreams']
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
# Check equality by comparing each attribute.
|
38
|
+
def ==(o)
|
39
|
+
return true if self.equal?(o)
|
40
|
+
self.class == o.class &&
|
41
|
+
max_simultaneous_streams == o.max_simultaneous_streams
|
42
|
+
end
|
43
|
+
|
44
|
+
# @see the `==` method
|
45
|
+
def eql?(o)
|
46
|
+
self == o
|
47
|
+
end
|
48
|
+
|
49
|
+
# Calculate hash code according to all attributes.
|
50
|
+
def hash
|
51
|
+
[max_simultaneous_streams].hash
|
52
|
+
end
|
53
|
+
|
54
|
+
# build the object from hash
|
55
|
+
def build_from_hash(attributes)
|
56
|
+
return nil unless attributes.is_a?(Hash)
|
57
|
+
self.class.swagger_types.each_pair do |key, type|
|
58
|
+
if type =~ /^Array<(.*)>/i
|
59
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
60
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
61
|
+
else
|
62
|
+
#TODO show warning in debug mode
|
63
|
+
end
|
64
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
65
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
66
|
+
else
|
67
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
self
|
72
|
+
end
|
73
|
+
|
74
|
+
def _deserialize(type, value)
|
75
|
+
case type.to_sym
|
76
|
+
when :DateTime
|
77
|
+
DateTime.parse(value)
|
78
|
+
when :Date
|
79
|
+
Date.parse(value)
|
80
|
+
when :String
|
81
|
+
value.to_s
|
82
|
+
when :Integer
|
83
|
+
value.to_i
|
84
|
+
when :Float
|
85
|
+
value.to_f
|
86
|
+
when :BOOLEAN
|
87
|
+
if value =~ /^(true|t|yes|y|1)$/i
|
88
|
+
true
|
89
|
+
else
|
90
|
+
false
|
91
|
+
end
|
92
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
93
|
+
inner_type = Regexp.last_match[:inner_type]
|
94
|
+
value.map { |v| _deserialize(inner_type, v) }
|
95
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
96
|
+
k_type = Regexp.last_match[:k_type]
|
97
|
+
v_type = Regexp.last_match[:v_type]
|
98
|
+
{}.tap do |hash|
|
99
|
+
value.each do |k, v|
|
100
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
else # model
|
104
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
105
|
+
_model.build_from_hash(value)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def to_s
|
110
|
+
to_hash.to_s
|
111
|
+
end
|
112
|
+
|
113
|
+
# to_body is an alias to to_body (backward compatibility))
|
114
|
+
def to_body
|
115
|
+
to_hash
|
116
|
+
end
|
117
|
+
|
118
|
+
# return the object in the form of hash
|
119
|
+
def to_hash
|
120
|
+
hash = {}
|
121
|
+
self.class.attribute_map.each_pair do |attr, param|
|
122
|
+
value = self.send(attr)
|
123
|
+
next if value.nil?
|
124
|
+
hash[param] = _to_hash(value)
|
125
|
+
end
|
126
|
+
hash
|
127
|
+
end
|
128
|
+
|
129
|
+
# Method to output non-array value in the form of hash
|
130
|
+
# For object, use to_hash. Otherwise, just return the value
|
131
|
+
def _to_hash(value)
|
132
|
+
if value.is_a?(Array)
|
133
|
+
value.compact.map{ |v| _to_hash(v) }
|
134
|
+
elsif value.is_a?(Hash)
|
135
|
+
{}.tap do |hash|
|
136
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
137
|
+
end
|
138
|
+
elsif value.respond_to? :to_hash
|
139
|
+
value.to_hash
|
140
|
+
else
|
141
|
+
value
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
end
|
146
|
+
end
|