late-sdk 0.0.78 → 0.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -1
  3. data/docs/BulkCreateContacts200Response.md +26 -0
  4. data/docs/CommentAutomationsApi.md +28 -24
  5. data/docs/ContactsApi.md +42 -36
  6. data/docs/CreateCommentAutomation200Response.md +20 -0
  7. data/docs/CreateCommentAutomation200ResponseAutomation.md +38 -0
  8. data/docs/CreateCommentAutomation200ResponseAutomationStats.md +22 -0
  9. data/docs/CreateContact200Response.md +24 -0
  10. data/docs/CreateContact200ResponseChannel.md +24 -0
  11. data/docs/CreateContact200ResponseContact.md +36 -0
  12. data/docs/CreateCustomField200Response.md +20 -0
  13. data/docs/CustomFieldsApi.md +21 -18
  14. data/docs/GetBroadcast200ResponseBroadcast.md +1 -1
  15. data/docs/GetCommentAutomation200Response.md +22 -0
  16. data/docs/GetCommentAutomation200ResponseAutomation.md +46 -0
  17. data/docs/GetCommentAutomation200ResponseLogsInner.md +32 -0
  18. data/docs/GetContact200Response.md +22 -0
  19. data/docs/GetContact200ResponseChannelsInner.md +32 -0
  20. data/docs/GetContact200ResponseContact.md +42 -0
  21. data/docs/GetContactChannels200Response.md +20 -0
  22. data/docs/GetContactChannels200ResponseChannelsInner.md +34 -0
  23. data/docs/ListCommentAutomationLogs200Response.md +22 -0
  24. data/docs/ListContacts200Response.md +24 -0
  25. data/docs/ListContacts200ResponseContactsInner.md +52 -0
  26. data/docs/{GetBroadcast200ResponseBroadcastSegmentFilters.md → ListContacts200ResponseFilters.md} +2 -2
  27. data/docs/ListCustomFields200Response.md +20 -0
  28. data/docs/ListCustomFields200ResponseFieldsInner.md +28 -0
  29. data/docs/UpdateCommentAutomation200Response.md +20 -0
  30. data/docs/UpdateCommentAutomation200ResponseAutomation.md +32 -0
  31. data/docs/UpdateContact200Response.md +20 -0
  32. data/docs/UpdateContact200ResponseContact.md +36 -0
  33. data/docs/UpdateCustomField200Response.md +20 -0
  34. data/docs/UpdateCustomField200ResponseField.md +26 -0
  35. data/lib/late-sdk/api/comment_automations_api.rb +20 -20
  36. data/lib/late-sdk/api/contacts_api.rb +30 -30
  37. data/lib/late-sdk/api/custom_fields_api.rb +15 -15
  38. data/lib/late-sdk/models/bulk_create_contacts200_response.rb +185 -0
  39. data/lib/late-sdk/models/create_comment_automation200_response.rb +156 -0
  40. data/lib/late-sdk/models/create_comment_automation200_response_automation.rb +273 -0
  41. data/lib/late-sdk/models/create_comment_automation200_response_automation_stats.rb +165 -0
  42. data/lib/late-sdk/models/create_contact200_response.rb +174 -0
  43. data/lib/late-sdk/models/create_contact200_response_channel.rb +175 -0
  44. data/lib/late-sdk/models/create_contact200_response_contact.rb +230 -0
  45. data/lib/late-sdk/models/create_custom_field200_response.rb +156 -0
  46. data/lib/late-sdk/models/get_broadcast200_response_broadcast.rb +1 -1
  47. data/lib/late-sdk/models/get_comment_automation200_response.rb +167 -0
  48. data/lib/late-sdk/models/get_comment_automation200_response_automation.rb +309 -0
  49. data/lib/late-sdk/models/get_comment_automation200_response_logs_inner.rb +244 -0
  50. data/lib/late-sdk/models/get_contact200_response.rb +167 -0
  51. data/lib/late-sdk/models/get_contact200_response_channels_inner.rb +210 -0
  52. data/lib/late-sdk/models/get_contact200_response_contact.rb +259 -0
  53. data/lib/late-sdk/models/get_contact_channels200_response.rb +158 -0
  54. data/lib/late-sdk/models/get_contact_channels200_response_channels_inner.rb +219 -0
  55. data/lib/late-sdk/models/list_comment_automation_logs200_response.rb +167 -0
  56. data/lib/late-sdk/models/list_contacts200_response.rb +176 -0
  57. data/lib/late-sdk/models/list_contacts200_response_contacts_inner.rb +302 -0
  58. data/lib/late-sdk/models/{get_broadcast200_response_broadcast_segment_filters.rb → list_contacts200_response_filters.rb} +3 -3
  59. data/lib/late-sdk/models/list_custom_fields200_response.rb +158 -0
  60. data/lib/late-sdk/models/list_custom_fields200_response_fields_inner.rb +228 -0
  61. data/lib/late-sdk/models/update_comment_automation200_response.rb +156 -0
  62. data/lib/late-sdk/models/update_comment_automation200_response_automation.rb +246 -0
  63. data/lib/late-sdk/models/update_contact200_response.rb +156 -0
  64. data/lib/late-sdk/models/update_contact200_response_contact.rb +230 -0
  65. data/lib/late-sdk/models/update_custom_field200_response.rb +156 -0
  66. data/lib/late-sdk/models/update_custom_field200_response_field.rb +185 -0
  67. data/lib/late-sdk/version.rb +1 -1
  68. data/lib/late-sdk.rb +28 -1
  69. data/openapi.yaml +324 -13
  70. data/spec/api/comment_automations_api_spec.rb +4 -4
  71. data/spec/api/contacts_api_spec.rb +6 -6
  72. data/spec/api/custom_fields_api_spec.rb +3 -3
  73. data/spec/models/bulk_create_contacts200_response_spec.rb +60 -0
  74. data/spec/models/create_comment_automation200_response_automation_spec.rb +100 -0
  75. data/spec/models/create_comment_automation200_response_automation_stats_spec.rb +48 -0
  76. data/spec/models/create_comment_automation200_response_spec.rb +42 -0
  77. data/spec/models/create_contact200_response_channel_spec.rb +54 -0
  78. data/spec/models/create_contact200_response_contact_spec.rb +90 -0
  79. data/spec/models/create_contact200_response_spec.rb +54 -0
  80. data/spec/models/create_custom_field200_response_spec.rb +42 -0
  81. data/spec/models/get_comment_automation200_response_automation_spec.rb +124 -0
  82. data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +82 -0
  83. data/spec/models/get_comment_automation200_response_spec.rb +48 -0
  84. data/spec/models/get_contact200_response_channels_inner_spec.rb +78 -0
  85. data/spec/models/get_contact200_response_contact_spec.rb +108 -0
  86. data/spec/models/get_contact200_response_spec.rb +48 -0
  87. data/spec/models/get_contact_channels200_response_channels_inner_spec.rb +84 -0
  88. data/spec/models/get_contact_channels200_response_spec.rb +42 -0
  89. data/spec/models/list_comment_automation_logs200_response_spec.rb +48 -0
  90. data/spec/models/list_contacts200_response_contacts_inner_spec.rb +138 -0
  91. data/spec/models/{get_broadcast200_response_broadcast_segment_filters_spec.rb → list_contacts200_response_filters_spec.rb} +6 -6
  92. data/spec/models/list_contacts200_response_spec.rb +54 -0
  93. data/spec/models/list_custom_fields200_response_fields_inner_spec.rb +70 -0
  94. data/spec/models/list_custom_fields200_response_spec.rb +42 -0
  95. data/spec/models/update_comment_automation200_response_automation_spec.rb +82 -0
  96. data/spec/models/update_comment_automation200_response_spec.rb +42 -0
  97. data/spec/models/update_contact200_response_contact_spec.rb +90 -0
  98. data/spec/models/update_contact200_response_spec.rb +42 -0
  99. data/spec/models/update_custom_field200_response_field_spec.rb +60 -0
  100. data/spec/models/update_custom_field200_response_spec.rb +42 -0
  101. data/zernio-sdk-0.0.79.gem +0 -0
  102. metadata +114 -6
  103. data/zernio-sdk-0.0.78.gem +0 -0
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class CreateCommentAutomation200ResponseAutomationStats < ApiModelBase
18
+ attr_accessor :total_triggered
19
+
20
+ attr_accessor :total_sent
21
+
22
+ attr_accessor :total_failed
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'total_triggered' => :'totalTriggered',
28
+ :'total_sent' => :'totalSent',
29
+ :'total_failed' => :'totalFailed'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'total_triggered' => :'Integer',
47
+ :'total_sent' => :'Integer',
48
+ :'total_failed' => :'Integer'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CreateCommentAutomation200ResponseAutomationStats` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CreateCommentAutomation200ResponseAutomationStats`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'total_triggered')
75
+ self.total_triggered = attributes[:'total_triggered']
76
+ end
77
+
78
+ if attributes.key?(:'total_sent')
79
+ self.total_sent = attributes[:'total_sent']
80
+ end
81
+
82
+ if attributes.key?(:'total_failed')
83
+ self.total_failed = attributes[:'total_failed']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ total_triggered == o.total_triggered &&
108
+ total_sent == o.total_sent &&
109
+ total_failed == o.total_failed
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [total_triggered, total_sent, total_failed].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -0,0 +1,174 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class CreateContact200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :contact
21
+
22
+ attr_accessor :channel
23
+
24
+ attr_accessor :warning
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'success' => :'success',
30
+ :'contact' => :'contact',
31
+ :'channel' => :'channel',
32
+ :'warning' => :'warning'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'success' => :'Boolean',
50
+ :'contact' => :'CreateContact200ResponseContact',
51
+ :'channel' => :'CreateContact200ResponseChannel',
52
+ :'warning' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CreateContact200Response` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CreateContact200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'success')
79
+ self.success = attributes[:'success']
80
+ end
81
+
82
+ if attributes.key?(:'contact')
83
+ self.contact = attributes[:'contact']
84
+ end
85
+
86
+ if attributes.key?(:'channel')
87
+ self.channel = attributes[:'channel']
88
+ end
89
+
90
+ if attributes.key?(:'warning')
91
+ self.warning = attributes[:'warning']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ success == o.success &&
116
+ contact == o.contact &&
117
+ channel == o.channel &&
118
+ warning == o.warning
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [success, contact, channel, warning].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ end
173
+
174
+ end
@@ -0,0 +1,175 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ # Created when accountId, platform, and platformIdentifier are provided
18
+ class CreateContact200ResponseChannel < ApiModelBase
19
+ attr_accessor :id
20
+
21
+ attr_accessor :platform
22
+
23
+ attr_accessor :platform_identifier
24
+
25
+ attr_accessor :display_identifier
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'id' => :'id',
31
+ :'platform' => :'platform',
32
+ :'platform_identifier' => :'platformIdentifier',
33
+ :'display_identifier' => :'displayIdentifier'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'id' => :'String',
51
+ :'platform' => :'String',
52
+ :'platform_identifier' => :'String',
53
+ :'display_identifier' => :'String'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CreateContact200ResponseChannel` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ acceptable_attribute_map = self.class.acceptable_attribute_map
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!acceptable_attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CreateContact200ResponseChannel`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'id')
80
+ self.id = attributes[:'id']
81
+ end
82
+
83
+ if attributes.key?(:'platform')
84
+ self.platform = attributes[:'platform']
85
+ end
86
+
87
+ if attributes.key?(:'platform_identifier')
88
+ self.platform_identifier = attributes[:'platform_identifier']
89
+ end
90
+
91
+ if attributes.key?(:'display_identifier')
92
+ self.display_identifier = attributes[:'display_identifier']
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
+ true
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ id == o.id &&
117
+ platform == o.platform &&
118
+ platform_identifier == o.platform_identifier &&
119
+ display_identifier == o.display_identifier
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [id, platform, platform_identifier, display_identifier].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ attributes = attributes.transform_keys(&:to_sym)
140
+ transformed_hash = {}
141
+ openapi_types.each_pair do |key, type|
142
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = nil
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[attribute_map[key]].is_a?(Array)
148
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
+ end
150
+ elsif !attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
+ end
153
+ end
154
+ new(transformed_hash)
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ if value.nil?
164
+ is_nullable = self.class.openapi_nullable.include?(attr)
165
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
166
+ end
167
+
168
+ hash[param] = _to_hash(value)
169
+ end
170
+ hash
171
+ end
172
+
173
+ end
174
+
175
+ end