purecloud 0.18.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/Gemfile.lock +2 -2
  4. data/README.md +1 -7
  5. data/config-ruby.json +1 -1
  6. data/extensions/auth.rb +2 -2
  7. data/lib/purecloud.rb +110 -75
  8. data/lib/purecloud/api/architect_api.rb +3127 -74
  9. data/lib/purecloud/api/attributes_api.rb +33 -33
  10. data/lib/purecloud/api/authorization_api.rb +83 -83
  11. data/lib/purecloud/api/compliance_api.rb +5 -5
  12. data/lib/purecloud/api/configuration_api.rb +594 -397
  13. data/lib/purecloud/api/content_management_api.rb +183 -183
  14. data/lib/purecloud/api/conversations_api.rb +289 -159
  15. data/lib/purecloud/api/downloads_api.rb +6 -6
  16. data/lib/purecloud/api/external_contacts_api.rb +1693 -0
  17. data/lib/purecloud/api/fax_api.rb +24 -24
  18. data/lib/purecloud/api/geolocation_api.rb +14 -14
  19. data/lib/purecloud/api/greetings_api.rb +68 -68
  20. data/lib/purecloud/api/groups_api.rb +31 -20
  21. data/lib/purecloud/api/languages_api.rb +18 -11
  22. data/lib/purecloud/api/licensing_api.rb +5 -5
  23. data/lib/purecloud/api/locations_api.rb +11 -11
  24. data/lib/purecloud/api/notifications_api.rb +41 -41
  25. data/lib/purecloud/api/o_auth_api.rb +69 -69
  26. data/lib/purecloud/api/outbound_api.rb +505 -325
  27. data/lib/purecloud/api/presence_api.rb +65 -65
  28. data/lib/purecloud/api/quality_api.rb +66 -639
  29. data/lib/purecloud/api/recording_api.rb +1343 -0
  30. data/lib/purecloud/api/response_management_api.rb +687 -0
  31. data/lib/purecloud/api/routing_api.rb +224 -170
  32. data/lib/purecloud/api/scripts_api.rb +52 -52
  33. data/lib/purecloud/api/search_api.rb +5 -5
  34. data/lib/purecloud/api/stations_api.rb +8 -8
  35. data/lib/purecloud/api/telephony_providers_edge_api.rb +138 -138
  36. data/lib/purecloud/api/user_recordings_api.rb +29 -29
  37. data/lib/purecloud/api/users_api.rb +123 -123
  38. data/lib/purecloud/api/utilities_api.rb +71 -15
  39. data/lib/purecloud/api/voicemail_api.rb +42 -42
  40. data/lib/purecloud/api_client.rb +1 -1
  41. data/lib/purecloud/models/address.rb +49 -51
  42. data/lib/purecloud/models/attribute_filter_item.rb +177 -0
  43. data/lib/purecloud/models/automate_queue_member_entity_listing.rb +238 -0
  44. data/lib/purecloud/models/available_additional_service.rb +40 -1
  45. data/lib/purecloud/models/{topic_entity_listing.rb → available_topic_entity_listing.rb} +1 -1
  46. data/lib/purecloud/models/call.rb +36 -5
  47. data/lib/purecloud/models/{line_properties.rb → call_command.rb} +13 -3
  48. data/lib/purecloud/models/callback.rb +15 -4
  49. data/lib/purecloud/models/campaign.rb +219 -17
  50. data/lib/purecloud/models/campaign_progress.rb +186 -0
  51. data/lib/purecloud/models/channel_topic_entity_listing.rb +238 -0
  52. data/lib/purecloud/models/charge.rb +14 -4
  53. data/lib/purecloud/models/{attribute_value.rb → client_text_table_transform.rb} +52 -82
  54. data/lib/purecloud/models/contact.rb +1 -1
  55. data/lib/purecloud/models/contact_list.rb +111 -1
  56. data/lib/purecloud/models/contact_listing.rb +238 -0
  57. data/lib/purecloud/models/content_attribute_filter_item.rb +177 -0
  58. data/lib/purecloud/models/content_facet_filter_item.rb +1 -1
  59. data/lib/purecloud/models/content_query_request.rb +16 -4
  60. data/lib/purecloud/models/control.rb +221 -0
  61. data/lib/purecloud/models/{flow_activate_request.rb → control_options.rb} +18 -12
  62. data/lib/purecloud/models/create_callback_command.rb +200 -0
  63. data/lib/purecloud/models/discount.rb +220 -0
  64. data/lib/purecloud/models/document.rb +13 -1
  65. data/lib/purecloud/models/document_attribute.rb +158 -0
  66. data/lib/purecloud/models/document_update.rb +28 -16
  67. data/lib/purecloud/models/document_upload.rb +4 -16
  68. data/lib/purecloud/models/domain_voice_rate_extended_response_item_entity_listing.rb +238 -0
  69. data/lib/purecloud/models/domain_voice_rate_international_response_item_entity_listing.rb +238 -0
  70. data/lib/purecloud/models/domain_voice_rate_response_item_entity_listing.rb +1 -1
  71. data/lib/purecloud/models/edge_line.rb +1 -1
  72. data/lib/purecloud/models/edge_logs_job.rb +181 -0
  73. data/lib/purecloud/models/edge_logs_job_file.rb +243 -0
  74. data/lib/purecloud/models/edge_logs_job_request.rb +168 -0
  75. data/lib/purecloud/models/{backend_work_item_data_element.rb → edge_logs_job_response.rb} +16 -24
  76. data/lib/purecloud/models/{flow_lock_request.rb → edge_logs_job_upload_request.rb} +10 -12
  77. data/lib/purecloud/models/email.rb +15 -4
  78. data/lib/purecloud/models/endpoint.rb +1 -1
  79. data/lib/purecloud/models/{flow_associate_workspaces_request.rb → estimated_wait_time_predictions.rb} +10 -11
  80. data/lib/purecloud/models/external_contact.rb +320 -0
  81. data/lib/purecloud/models/external_organization.rb +306 -0
  82. data/lib/purecloud/models/external_organization_listing.rb +238 -0
  83. data/lib/purecloud/models/facet_filter_item.rb +1 -1
  84. data/lib/purecloud/models/flow_body.rb +1 -1
  85. data/lib/purecloud/models/flow_body_format.rb +10 -20
  86. data/lib/purecloud/models/flow_terminate_request.rb +3 -16
  87. data/lib/purecloud/models/form.rb +148 -0
  88. data/lib/purecloud/models/group.rb +11 -1
  89. data/lib/purecloud/models/health_check_info.rb +268 -0
  90. data/lib/purecloud/models/{body_2.rb → inline_response_200.rb} +1 -1
  91. data/lib/purecloud/models/integration_type.rb +209 -0
  92. data/lib/purecloud/models/integration_type_entity_listing.rb +238 -0
  93. data/lib/purecloud/models/key_rotation_schedule.rb +1 -0
  94. data/lib/purecloud/models/language.rb +41 -1
  95. data/lib/purecloud/models/line.rb +1 -1
  96. data/lib/purecloud/models/line_base.rb +1 -1
  97. data/lib/purecloud/models/media_policies.rb +169 -0
  98. data/lib/purecloud/models/media_policy.rb +171 -0
  99. data/lib/purecloud/models/note.rb +200 -0
  100. data/lib/purecloud/models/{user_station_resource.rb → note_listing.rb} +68 -58
  101. data/lib/purecloud/models/o_auth_client.rb +1 -1
  102. data/lib/purecloud/models/page.rb +2 -2
  103. data/lib/purecloud/models/{byte_buffer.rb → payment_method.rb} +48 -61
  104. data/lib/purecloud/models/payment_method_listing.rb +238 -0
  105. data/lib/purecloud/models/payment_token_provider.rb +180 -0
  106. data/lib/purecloud/models/phone.rb +1 -1
  107. data/lib/purecloud/models/phone_base.rb +1 -1
  108. data/lib/purecloud/models/phone_number.rb +198 -0
  109. data/lib/purecloud/models/phones_reboot.rb +14 -4
  110. data/lib/purecloud/models/policy.rb +14 -1
  111. data/lib/purecloud/models/prediction_results.rb +167 -0
  112. data/lib/purecloud/models/query_request.rb +16 -4
  113. data/lib/purecloud/models/queue_member_entity_listing.rb +1 -1
  114. data/lib/purecloud/models/quote.rb +13 -1
  115. data/lib/purecloud/models/recording_settings.rb +146 -0
  116. data/lib/purecloud/models/relationship.rb +201 -0
  117. data/lib/purecloud/models/relationship_listing.rb +238 -0
  118. data/lib/purecloud/models/report_schedule.rb +3 -2
  119. data/lib/purecloud/models/service_type.rb +12 -1
  120. data/lib/purecloud/models/social_expression.rb +25 -4
  121. data/lib/purecloud/models/spreadsheet_transform_entity_listing.rb +1 -1
  122. data/lib/purecloud/models/template.rb +1 -1
  123. data/lib/purecloud/models/text_table_transform_entity_listing.rb +1 -1
  124. data/lib/purecloud/models/ticker.rb +158 -0
  125. data/lib/purecloud/models/time_slot.rb +1 -0
  126. data/lib/purecloud/models/trunk_base.rb +1 -1
  127. data/lib/purecloud/models/vendor_connection_request.rb +166 -0
  128. data/lib/purecloud/models/video.rb +15 -4
  129. data/lib/purecloud/models/work_item_definition.rb +8 -10
  130. data/lib/purecloud/version.rb +1 -1
  131. data/ossindex.json +17 -0
  132. data/purecloud.gemspec +4 -3
  133. data/rakefile +3 -15
  134. data/spec/test.rb +6 -3
  135. data/swagger.json +1 -1
  136. data/swagger_template/api_client.mustache +304 -0
  137. data/swagger_template/base_object.mustache +90 -0
  138. data/{PureCloud.gemspec → swagger_template/gemspec.mustache} +12 -11
  139. data/version.json +1 -1
  140. metadata +76 -25
  141. data/lib/purecloud/api/analytics_api.rb +0 -1554
  142. data/lib/purecloud/api/orphaned_recordings_api.rb +0 -205
  143. data/newVersion.md +0 -1
@@ -0,0 +1,200 @@
1
+ require 'date'
2
+
3
+ module PureCloud
4
+ class Note
5
+ # The globally unique identifier for the object.
6
+ attr_accessor :id
7
+
8
+ attr_accessor :name
9
+
10
+ attr_accessor :note_text
11
+
12
+ # Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
13
+ attr_accessor :modify_date
14
+
15
+ # Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
16
+ attr_accessor :create_date
17
+
18
+ # The URI for this object
19
+ attr_accessor :self_uri
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+
25
+ :'id' => :'id',
26
+
27
+ :'name' => :'name',
28
+
29
+ :'note_text' => :'noteText',
30
+
31
+ :'modify_date' => :'modifyDate',
32
+
33
+ :'create_date' => :'createDate',
34
+
35
+ :'self_uri' => :'selfUri'
36
+
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'id' => :'String',
44
+ :'name' => :'String',
45
+ :'note_text' => :'String',
46
+ :'modify_date' => :'DateTime',
47
+ :'create_date' => :'DateTime',
48
+ :'self_uri' => :'String'
49
+
50
+ }
51
+ end
52
+
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
58
+
59
+
60
+ if attributes[:'id']
61
+ self.id = attributes[:'id']
62
+ end
63
+
64
+ if attributes[:'name']
65
+ self.name = attributes[:'name']
66
+ end
67
+
68
+ if attributes[:'noteText']
69
+ self.note_text = attributes[:'noteText']
70
+ end
71
+
72
+ if attributes[:'modifyDate']
73
+ self.modify_date = attributes[:'modifyDate']
74
+ end
75
+
76
+ if attributes[:'createDate']
77
+ self.create_date = attributes[:'createDate']
78
+ end
79
+
80
+ if attributes[:'selfUri']
81
+ self.self_uri = attributes[:'selfUri']
82
+ end
83
+
84
+ end
85
+
86
+ # Check equality by comparing each attribute.
87
+ def ==(o)
88
+ return true if self.equal?(o)
89
+ self.class == o.class &&
90
+ id == o.id &&
91
+ name == o.name &&
92
+ note_text == o.note_text &&
93
+ modify_date == o.modify_date &&
94
+ create_date == o.create_date &&
95
+ self_uri == o.self_uri
96
+ end
97
+
98
+ # @see the `==` method
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculate hash code according to all attributes.
104
+ def hash
105
+ [id, name, note_text, modify_date, create_date, self_uri].hash
106
+ end
107
+
108
+ # build the object from hash
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.swagger_types.each_pair do |key, type|
112
+ if type =~ /^Array<(.*)>/i
113
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
114
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
115
+ else
116
+ #TODO show warning in debug mode
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ else
121
+ # data not found in attributes(hash), not an issue as the data can be optional
122
+ end
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :BOOLEAN
141
+ if value =~ /^(true|t|yes|y|1)$/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ _model = Object.const_get("PureCloud").const_get(type).new
159
+ _model.build_from_hash(value)
160
+ end
161
+ end
162
+
163
+ def to_s
164
+ to_hash.to_s
165
+ end
166
+
167
+ # to_body is an alias to to_body (backward compatibility))
168
+ def to_body
169
+ to_hash
170
+ end
171
+
172
+ # return the object in the form of hash
173
+ def to_hash
174
+ hash = {}
175
+ self.class.attribute_map.each_pair do |attr, param|
176
+ value = self.send(attr)
177
+ next if value.nil?
178
+ hash[param] = _to_hash(value)
179
+ end
180
+ hash
181
+ end
182
+
183
+ # Method to output non-array value in the form of hash
184
+ # For object, use to_hash. Otherwise, just return the value
185
+ def _to_hash(value)
186
+ if value.is_a?(Array)
187
+ value.compact.map{ |v| _to_hash(v) }
188
+ elsif value.is_a?(Hash)
189
+ {}.tap do |hash|
190
+ value.each { |k, v| hash[k] = _to_hash(v) }
191
+ end
192
+ elsif value.respond_to? :to_hash
193
+ value.to_hash
194
+ else
195
+ value
196
+ end
197
+ end
198
+
199
+ end
200
+ end
@@ -1,46 +1,50 @@
1
1
  require 'date'
2
2
 
3
3
  module PureCloud
4
- class UserStationResource
5
- attr_accessor :user_id
4
+ class NoteListing
5
+ attr_accessor :page_size
6
6
 
7
- attr_accessor :station_id
7
+ attr_accessor :page_number
8
8
 
9
- attr_accessor :station_name
9
+ attr_accessor :total
10
10
 
11
- attr_accessor :location_id
11
+ attr_accessor :entities
12
12
 
13
- attr_accessor :provider
13
+ attr_accessor :self_uri
14
14
 
15
- attr_accessor :address_group
15
+ attr_accessor :first_uri
16
16
 
17
- attr_accessor :user_uri
17
+ attr_accessor :previous_uri
18
18
 
19
- attr_accessor :station_uri
19
+ attr_accessor :next_uri
20
20
 
21
- attr_accessor :default_station
21
+ attr_accessor :last_uri
22
+
23
+ attr_accessor :page_count
22
24
 
23
25
  # Attribute mapping from ruby-style variable name to JSON key.
24
26
  def self.attribute_map
25
27
  {
26
28
 
27
- :'user_id' => :'userId',
29
+ :'page_size' => :'pageSize',
30
+
31
+ :'page_number' => :'pageNumber',
28
32
 
29
- :'station_id' => :'stationId',
33
+ :'total' => :'total',
30
34
 
31
- :'station_name' => :'stationName',
35
+ :'entities' => :'entities',
32
36
 
33
- :'location_id' => :'locationId',
37
+ :'self_uri' => :'selfUri',
34
38
 
35
- :'provider' => :'provider',
39
+ :'first_uri' => :'firstUri',
36
40
 
37
- :'address_group' => :'addressGroup',
41
+ :'previous_uri' => :'previousUri',
38
42
 
39
- :'user_uri' => :'userUri',
43
+ :'next_uri' => :'nextUri',
40
44
 
41
- :'station_uri' => :'stationUri',
45
+ :'last_uri' => :'lastUri',
42
46
 
43
- :'default_station' => :'defaultStation'
47
+ :'page_count' => :'pageCount'
44
48
 
45
49
  }
46
50
  end
@@ -48,15 +52,16 @@ module PureCloud
48
52
  # Attribute type mapping.
49
53
  def self.swagger_types
50
54
  {
51
- :'user_id' => :'String',
52
- :'station_id' => :'String',
53
- :'station_name' => :'String',
54
- :'location_id' => :'String',
55
- :'provider' => :'String',
56
- :'address_group' => :'String',
57
- :'user_uri' => :'String',
58
- :'station_uri' => :'String',
59
- :'default_station' => :'BOOLEAN'
55
+ :'page_size' => :'Integer',
56
+ :'page_number' => :'Integer',
57
+ :'total' => :'Integer',
58
+ :'entities' => :'Array<Note>',
59
+ :'self_uri' => :'String',
60
+ :'first_uri' => :'String',
61
+ :'previous_uri' => :'String',
62
+ :'next_uri' => :'String',
63
+ :'last_uri' => :'String',
64
+ :'page_count' => :'Integer'
60
65
 
61
66
  }
62
67
  end
@@ -68,42 +73,46 @@ module PureCloud
68
73
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
69
74
 
70
75
 
71
- if attributes[:'userId']
72
- self.user_id = attributes[:'userId']
76
+ if attributes[:'pageSize']
77
+ self.page_size = attributes[:'pageSize']
78
+ end
79
+
80
+ if attributes[:'pageNumber']
81
+ self.page_number = attributes[:'pageNumber']
73
82
  end
74
83
 
75
- if attributes[:'stationId']
76
- self.station_id = attributes[:'stationId']
84
+ if attributes[:'total']
85
+ self.total = attributes[:'total']
77
86
  end
78
87
 
79
- if attributes[:'stationName']
80
- self.station_name = attributes[:'stationName']
88
+ if attributes[:'entities']
89
+ if (value = attributes[:'entities']).is_a?(Array)
90
+ self.entities = value
91
+ end
81
92
  end
82
93
 
83
- if attributes[:'locationId']
84
- self.location_id = attributes[:'locationId']
94
+ if attributes[:'selfUri']
95
+ self.self_uri = attributes[:'selfUri']
85
96
  end
86
97
 
87
- if attributes[:'provider']
88
- self.provider = attributes[:'provider']
98
+ if attributes[:'firstUri']
99
+ self.first_uri = attributes[:'firstUri']
89
100
  end
90
101
 
91
- if attributes[:'addressGroup']
92
- self.address_group = attributes[:'addressGroup']
102
+ if attributes[:'previousUri']
103
+ self.previous_uri = attributes[:'previousUri']
93
104
  end
94
105
 
95
- if attributes[:'userUri']
96
- self.user_uri = attributes[:'userUri']
106
+ if attributes[:'nextUri']
107
+ self.next_uri = attributes[:'nextUri']
97
108
  end
98
109
 
99
- if attributes[:'stationUri']
100
- self.station_uri = attributes[:'stationUri']
110
+ if attributes[:'lastUri']
111
+ self.last_uri = attributes[:'lastUri']
101
112
  end
102
113
 
103
- if attributes[:'defaultStation']
104
- self.default_station = attributes[:'defaultStation']
105
- else
106
- self.default_station = false
114
+ if attributes[:'pageCount']
115
+ self.page_count = attributes[:'pageCount']
107
116
  end
108
117
 
109
118
  end
@@ -112,15 +121,16 @@ module PureCloud
112
121
  def ==(o)
113
122
  return true if self.equal?(o)
114
123
  self.class == o.class &&
115
- user_id == o.user_id &&
116
- station_id == o.station_id &&
117
- station_name == o.station_name &&
118
- location_id == o.location_id &&
119
- provider == o.provider &&
120
- address_group == o.address_group &&
121
- user_uri == o.user_uri &&
122
- station_uri == o.station_uri &&
123
- default_station == o.default_station
124
+ page_size == o.page_size &&
125
+ page_number == o.page_number &&
126
+ total == o.total &&
127
+ entities == o.entities &&
128
+ self_uri == o.self_uri &&
129
+ first_uri == o.first_uri &&
130
+ previous_uri == o.previous_uri &&
131
+ next_uri == o.next_uri &&
132
+ last_uri == o.last_uri &&
133
+ page_count == o.page_count
124
134
  end
125
135
 
126
136
  # @see the `==` method
@@ -130,7 +140,7 @@ module PureCloud
130
140
 
131
141
  # Calculate hash code according to all attributes.
132
142
  def hash
133
- [user_id, station_id, station_name, location_id, provider, address_group, user_uri, station_uri, default_station].hash
143
+ [page_size, page_number, total, entities, self_uri, first_uri, previous_uri, next_uri, last_uri, page_count].hash
134
144
  end
135
145
 
136
146
  # build the object from hash
@@ -11,7 +11,7 @@ module PureCloud
11
11
  # The number of seconds, between 5mins and 48hrs, until tokens created with this client expire. If this field is omitted, a default of 24 hours will be applied.
12
12
  attr_accessor :access_token_validity_seconds
13
13
 
14
- # One or more OAuth Grant/Client types supported by this client.
14
+ # The OAuth Grant/Client type supported by this client.
15
15
  attr_accessor :authorized_grant_types
16
16
 
17
17
  attr_accessor :description
@@ -53,8 +53,8 @@ module PureCloud
53
53
  :'version_id' => :'String',
54
54
  :'created_date' => :'DateTime',
55
55
  :'modified_date' => :'DateTime',
56
- :'root_container' => :'Hash<String, Line_properties>',
57
- :'properties' => :'Hash<String, Line_properties>',
56
+ :'root_container' => :'Hash<String, inline_response_200>',
57
+ :'properties' => :'Hash<String, inline_response_200>',
58
58
  :'self_uri' => :'String'
59
59
 
60
60
  }
@@ -1,42 +1,36 @@
1
1
  require 'date'
2
2
 
3
3
  module PureCloud
4
- class ByteBuffer
5
- attr_accessor :short
4
+ class PaymentMethod
5
+ # The globally unique identifier for the object.
6
+ attr_accessor :id
6
7
 
7
- attr_accessor :char
8
+ attr_accessor :name
8
9
 
9
- attr_accessor :int
10
+ attr_accessor :type
10
11
 
11
- attr_accessor :long
12
+ attr_accessor :provider_name
12
13
 
13
- attr_accessor :float
14
+ attr_accessor :token
14
15
 
15
- attr_accessor :double
16
-
17
- attr_accessor :direct
18
-
19
- attr_accessor :read_only
16
+ # The URI for this object
17
+ attr_accessor :self_uri
20
18
 
21
19
  # Attribute mapping from ruby-style variable name to JSON key.
22
20
  def self.attribute_map
23
21
  {
24
22
 
25
- :'short' => :'short',
26
-
27
- :'char' => :'char',
23
+ :'id' => :'id',
28
24
 
29
- :'int' => :'int',
25
+ :'name' => :'name',
30
26
 
31
- :'long' => :'long',
27
+ :'type' => :'type',
32
28
 
33
- :'float' => :'float',
29
+ :'provider_name' => :'providerName',
34
30
 
35
- :'double' => :'double',
31
+ :'token' => :'token',
36
32
 
37
- :'direct' => :'direct',
38
-
39
- :'read_only' => :'readOnly'
33
+ :'self_uri' => :'selfUri'
40
34
 
41
35
  }
42
36
  end
@@ -44,14 +38,12 @@ module PureCloud
44
38
  # Attribute type mapping.
45
39
  def self.swagger_types
46
40
  {
47
- :'short' => :'Integer',
48
- :'char' => :'String',
49
- :'int' => :'Integer',
50
- :'long' => :'Integer',
51
- :'float' => :'Float',
52
- :'double' => :'Float',
53
- :'direct' => :'BOOLEAN',
54
- :'read_only' => :'BOOLEAN'
41
+ :'id' => :'String',
42
+ :'name' => :'String',
43
+ :'type' => :'String',
44
+ :'provider_name' => :'String',
45
+ :'token' => :'String',
46
+ :'self_uri' => :'String'
55
47
 
56
48
  }
57
49
  end
@@ -63,56 +55,51 @@ module PureCloud
63
55
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
64
56
 
65
57
 
66
- if attributes[:'short']
67
- self.short = attributes[:'short']
58
+ if attributes[:'id']
59
+ self.id = attributes[:'id']
68
60
  end
69
61
 
70
- if attributes[:'char']
71
- self.char = attributes[:'char']
62
+ if attributes[:'name']
63
+ self.name = attributes[:'name']
72
64
  end
73
65
 
74
- if attributes[:'int']
75
- self.int = attributes[:'int']
66
+ if attributes[:'type']
67
+ self.type = attributes[:'type']
76
68
  end
77
69
 
78
- if attributes[:'long']
79
- self.long = attributes[:'long']
70
+ if attributes[:'providerName']
71
+ self.provider_name = attributes[:'providerName']
80
72
  end
81
73
 
82
- if attributes[:'float']
83
- self.float = attributes[:'float']
74
+ if attributes[:'token']
75
+ self.token = attributes[:'token']
84
76
  end
85
77
 
86
- if attributes[:'double']
87
- self.double = attributes[:'double']
78
+ if attributes[:'selfUri']
79
+ self.self_uri = attributes[:'selfUri']
88
80
  end
89
81
 
90
- if attributes[:'direct']
91
- self.direct = attributes[:'direct']
92
- else
93
- self.direct = false
94
- end
95
-
96
- if attributes[:'readOnly']
97
- self.read_only = attributes[:'readOnly']
98
- else
99
- self.read_only = false
82
+ end
83
+
84
+ # Custom attribute writer method checking allowed values (enum).
85
+ def type=(type)
86
+ allowed_values = ["CARD_TOKEN"]
87
+ if type && !allowed_values.include?(type)
88
+ fail "invalid value for 'type', must be one of #{allowed_values}"
100
89
  end
101
-
90
+ @type = type
102
91
  end
103
92
 
104
93
  # Check equality by comparing each attribute.
105
94
  def ==(o)
106
95
  return true if self.equal?(o)
107
96
  self.class == o.class &&
108
- short == o.short &&
109
- char == o.char &&
110
- int == o.int &&
111
- long == o.long &&
112
- float == o.float &&
113
- double == o.double &&
114
- direct == o.direct &&
115
- read_only == o.read_only
97
+ id == o.id &&
98
+ name == o.name &&
99
+ type == o.type &&
100
+ provider_name == o.provider_name &&
101
+ token == o.token &&
102
+ self_uri == o.self_uri
116
103
  end
117
104
 
118
105
  # @see the `==` method
@@ -122,7 +109,7 @@ module PureCloud
122
109
 
123
110
  # Calculate hash code according to all attributes.
124
111
  def hash
125
- [short, char, int, long, float, double, direct, read_only].hash
112
+ [id, name, type, provider_name, token, self_uri].hash
126
113
  end
127
114
 
128
115
  # build the object from hash