sendpost_ruby_sdk 1.0.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +109 -0
  3. data/config-ruby.json +1 -1
  4. data/docs/EventMetadata.md +4 -0
  5. data/generate-libs.bash +1 -1
  6. data/git_push.sh +2 -2
  7. data/lib/sendpost_ruby_sdk/api/email_api.rb +1 -1
  8. data/lib/sendpost_ruby_sdk/api/suppression_api.rb +1 -1
  9. data/lib/sendpost_ruby_sdk/api_client.rb +1 -1
  10. data/lib/sendpost_ruby_sdk/api_error.rb +1 -1
  11. data/lib/sendpost_ruby_sdk/configuration.rb +12 -10
  12. data/lib/sendpost_ruby_sdk/models/attachment.rb +13 -18
  13. data/lib/sendpost_ruby_sdk/models/city.rb +13 -18
  14. data/lib/sendpost_ruby_sdk/models/copy_to.rb +13 -18
  15. data/lib/sendpost_ruby_sdk/models/count_stat.rb +13 -18
  16. data/lib/sendpost_ruby_sdk/models/delete_response.rb +13 -18
  17. data/lib/sendpost_ruby_sdk/models/device.rb +13 -18
  18. data/lib/sendpost_ruby_sdk/models/email_message.rb +13 -18
  19. data/lib/sendpost_ruby_sdk/models/email_response.rb +13 -18
  20. data/lib/sendpost_ruby_sdk/models/event_metadata.rb +32 -19
  21. data/lib/sendpost_ruby_sdk/models/from.rb +13 -18
  22. data/lib/sendpost_ruby_sdk/models/os.rb +13 -18
  23. data/lib/sendpost_ruby_sdk/models/q_email_message.rb +13 -18
  24. data/lib/sendpost_ruby_sdk/models/q_event.rb +13 -18
  25. data/lib/sendpost_ruby_sdk/models/r_suppression.rb +13 -18
  26. data/lib/sendpost_ruby_sdk/models/rd_suppression.rb +13 -18
  27. data/lib/sendpost_ruby_sdk/models/reply_to.rb +13 -18
  28. data/lib/sendpost_ruby_sdk/models/suppression.rb +13 -18
  29. data/lib/sendpost_ruby_sdk/models/suppression_email.rb +13 -18
  30. data/lib/sendpost_ruby_sdk/models/to.rb +13 -18
  31. data/lib/sendpost_ruby_sdk/models/user_agent.rb +13 -18
  32. data/lib/sendpost_ruby_sdk/models/webhook_event.rb +13 -18
  33. data/lib/sendpost_ruby_sdk/version.rb +2 -2
  34. data/lib/sendpost_ruby_sdk.rb +1 -1
  35. data/sendpost.yaml +4 -0
  36. data/sendpost_ruby_sdk.gemspec +1 -1
  37. data/spec/api_client_spec.rb +1 -1
  38. data/spec/configuration_spec.rb +1 -1
  39. data/spec/spec_helper.rb +1 -1
  40. metadata +10 -10
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -97,6 +97,7 @@ module Sendpost
97
97
  # Show invalid properties with the reasons. Usually used together with valid?
98
98
  # @return Array for valid properties with the reasons
99
99
  def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
101
  invalid_properties = Array.new
101
102
  invalid_properties
102
103
  end
@@ -104,6 +105,7 @@ module Sendpost
104
105
  # Check to see if the all the properties in the model are valid
105
106
  # @return true if the model is valid
106
107
  def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
109
  true
108
110
  end
109
111
 
@@ -134,37 +136,30 @@ module Sendpost
134
136
  # @param [Hash] attributes Model attributes in the form of hash
135
137
  # @return [Object] Returns the model itself
136
138
  def self.build_from_hash(attributes)
137
- new.build_from_hash(attributes)
138
- end
139
-
140
- # Builds the object from hash
141
- # @param [Hash] attributes Model attributes in the form of hash
142
- # @return [Object] Returns the model itself
143
- def build_from_hash(attributes)
144
139
  return nil unless attributes.is_a?(Hash)
145
140
  attributes = attributes.transform_keys(&:to_sym)
146
- self.class.openapi_types.each_pair do |key, type|
147
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
148
- self.send("#{key}=", nil)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
149
145
  elsif type =~ /\AArray<(.*)>/i
150
146
  # check to ensure the input is an array given that the attribute
151
147
  # is documented as an array but the input is not
152
- if attributes[self.class.attribute_map[key]].is_a?(Array)
153
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
154
150
  end
155
- elsif !attributes[self.class.attribute_map[key]].nil?
156
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
157
153
  end
158
154
  end
159
-
160
- self
155
+ new(transformed_hash)
161
156
  end
162
157
 
163
158
  # Deserializes the data based on type
164
159
  # @param string type Data type
165
160
  # @param string value Value to be deserialized
166
161
  # @return [Object] Deserialized data
167
- def _deserialize(type, value)
162
+ def self._deserialize(type, value)
168
163
  case type.to_sym
169
164
  when :Time
170
165
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -67,6 +67,7 @@ module Sendpost
67
67
  # Show invalid properties with the reasons. Usually used together with valid?
68
68
  # @return Array for valid properties with the reasons
69
69
  def list_invalid_properties
70
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
70
71
  invalid_properties = Array.new
71
72
  invalid_properties
72
73
  end
@@ -74,6 +75,7 @@ module Sendpost
74
75
  # Check to see if the all the properties in the model are valid
75
76
  # @return true if the model is valid
76
77
  def valid?
78
+ warn '[DEPRECATED] the `valid?` method is obsolete'
77
79
  true
78
80
  end
79
81
 
@@ -101,37 +103,30 @@ module Sendpost
101
103
  # @param [Hash] attributes Model attributes in the form of hash
102
104
  # @return [Object] Returns the model itself
103
105
  def self.build_from_hash(attributes)
104
- new.build_from_hash(attributes)
105
- end
106
-
107
- # Builds the object from hash
108
- # @param [Hash] attributes Model attributes in the form of hash
109
- # @return [Object] Returns the model itself
110
- def build_from_hash(attributes)
111
106
  return nil unless attributes.is_a?(Hash)
112
107
  attributes = attributes.transform_keys(&:to_sym)
113
- self.class.openapi_types.each_pair do |key, type|
114
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
115
- self.send("#{key}=", nil)
108
+ transformed_hash = {}
109
+ openapi_types.each_pair do |key, type|
110
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
111
+ transformed_hash["#{key}"] = nil
116
112
  elsif type =~ /\AArray<(.*)>/i
117
113
  # check to ensure the input is an array given that the attribute
118
114
  # is documented as an array but the input is not
119
- if attributes[self.class.attribute_map[key]].is_a?(Array)
120
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115
+ if attributes[attribute_map[key]].is_a?(Array)
116
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
117
  end
122
- elsif !attributes[self.class.attribute_map[key]].nil?
123
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ elsif !attributes[attribute_map[key]].nil?
119
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
120
  end
125
121
  end
126
-
127
- self
122
+ new(transformed_hash)
128
123
  end
129
124
 
130
125
  # Deserializes the data based on type
131
126
  # @param string type Data type
132
127
  # @param string value Value to be deserialized
133
128
  # @return [Object] Deserialized data
134
- def _deserialize(type, value)
129
+ def self._deserialize(type, value)
135
130
  case type.to_sym
136
131
  when :Time
137
132
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -73,6 +73,7 @@ module Sendpost
73
73
  # Show invalid properties with the reasons. Usually used together with valid?
74
74
  # @return Array for valid properties with the reasons
75
75
  def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
77
  invalid_properties = Array.new
77
78
  invalid_properties
78
79
  end
@@ -80,6 +81,7 @@ module Sendpost
80
81
  # Check to see if the all the properties in the model are valid
81
82
  # @return true if the model is valid
82
83
  def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
85
  true
84
86
  end
85
87
 
@@ -108,37 +110,30 @@ module Sendpost
108
110
  # @param [Hash] attributes Model attributes in the form of hash
109
111
  # @return [Object] Returns the model itself
110
112
  def self.build_from_hash(attributes)
111
- new.build_from_hash(attributes)
112
- end
113
-
114
- # Builds the object from hash
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- # @return [Object] Returns the model itself
117
- def build_from_hash(attributes)
118
113
  return nil unless attributes.is_a?(Hash)
119
114
  attributes = attributes.transform_keys(&:to_sym)
120
- self.class.openapi_types.each_pair do |key, type|
121
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
- self.send("#{key}=", nil)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
123
119
  elsif type =~ /\AArray<(.*)>/i
124
120
  # check to ensure the input is an array given that the attribute
125
121
  # is documented as an array but the input is not
126
- if attributes[self.class.attribute_map[key]].is_a?(Array)
127
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
128
124
  end
129
- elsif !attributes[self.class.attribute_map[key]].nil?
130
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
131
127
  end
132
128
  end
133
-
134
- self
129
+ new(transformed_hash)
135
130
  end
136
131
 
137
132
  # Deserializes the data based on type
138
133
  # @param string type Data type
139
134
  # @param string value Value to be deserialized
140
135
  # @return [Object] Deserialized data
141
- def _deserialize(type, value)
136
+ def self._deserialize(type, value)
142
137
  case type.to_sym
143
138
  when :Time
144
139
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -97,6 +97,7 @@ module Sendpost
97
97
  # Show invalid properties with the reasons. Usually used together with valid?
98
98
  # @return Array for valid properties with the reasons
99
99
  def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
101
  invalid_properties = Array.new
101
102
  invalid_properties
102
103
  end
@@ -104,6 +105,7 @@ module Sendpost
104
105
  # Check to see if the all the properties in the model are valid
105
106
  # @return true if the model is valid
106
107
  def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
109
  true
108
110
  end
109
111
 
@@ -135,37 +137,30 @@ module Sendpost
135
137
  # @param [Hash] attributes Model attributes in the form of hash
136
138
  # @return [Object] Returns the model itself
137
139
  def self.build_from_hash(attributes)
138
- new.build_from_hash(attributes)
139
- end
140
-
141
- # Builds the object from hash
142
- # @param [Hash] attributes Model attributes in the form of hash
143
- # @return [Object] Returns the model itself
144
- def build_from_hash(attributes)
145
140
  return nil unless attributes.is_a?(Hash)
146
141
  attributes = attributes.transform_keys(&:to_sym)
147
- self.class.openapi_types.each_pair do |key, type|
148
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
- self.send("#{key}=", nil)
142
+ transformed_hash = {}
143
+ openapi_types.each_pair do |key, type|
144
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = nil
150
146
  elsif type =~ /\AArray<(.*)>/i
151
147
  # check to ensure the input is an array given that the attribute
152
148
  # is documented as an array but the input is not
153
- if attributes[self.class.attribute_map[key]].is_a?(Array)
154
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
149
+ if attributes[attribute_map[key]].is_a?(Array)
150
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
155
151
  end
156
- elsif !attributes[self.class.attribute_map[key]].nil?
157
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
152
+ elsif !attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
158
154
  end
159
155
  end
160
-
161
- self
156
+ new(transformed_hash)
162
157
  end
163
158
 
164
159
  # Deserializes the data based on type
165
160
  # @param string type Data type
166
161
  # @param string value Value to be deserialized
167
162
  # @return [Object] Deserialized data
168
- def _deserialize(type, value)
163
+ def self._deserialize(type, value)
169
164
  case type.to_sym
170
165
  when :Time
171
166
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -65,6 +65,7 @@ module Sendpost
65
65
  # Show invalid properties with the reasons. Usually used together with valid?
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
68
69
  invalid_properties = Array.new
69
70
  invalid_properties
70
71
  end
@@ -72,6 +73,7 @@ module Sendpost
72
73
  # Check to see if the all the properties in the model are valid
73
74
  # @return true if the model is valid
74
75
  def valid?
76
+ warn '[DEPRECATED] the `valid?` method is obsolete'
75
77
  true
76
78
  end
77
79
 
@@ -99,37 +101,30 @@ module Sendpost
99
101
  # @param [Hash] attributes Model attributes in the form of hash
100
102
  # @return [Object] Returns the model itself
101
103
  def self.build_from_hash(attributes)
102
- new.build_from_hash(attributes)
103
- end
104
-
105
- # Builds the object from hash
106
- # @param [Hash] attributes Model attributes in the form of hash
107
- # @return [Object] Returns the model itself
108
- def build_from_hash(attributes)
109
104
  return nil unless attributes.is_a?(Hash)
110
105
  attributes = attributes.transform_keys(&:to_sym)
111
- self.class.openapi_types.each_pair do |key, type|
112
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
- self.send("#{key}=", nil)
106
+ transformed_hash = {}
107
+ openapi_types.each_pair do |key, type|
108
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
109
+ transformed_hash["#{key}"] = nil
114
110
  elsif type =~ /\AArray<(.*)>/i
115
111
  # check to ensure the input is an array given that the attribute
116
112
  # is documented as an array but the input is not
117
- if attributes[self.class.attribute_map[key]].is_a?(Array)
118
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
119
115
  end
120
- elsif !attributes[self.class.attribute_map[key]].nil?
121
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ elsif !attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
122
118
  end
123
119
  end
124
-
125
- self
120
+ new(transformed_hash)
126
121
  end
127
122
 
128
123
  # Deserializes the data based on type
129
124
  # @param string type Data type
130
125
  # @param string value Value to be deserialized
131
126
  # @return [Object] Deserialized data
132
- def _deserialize(type, value)
127
+ def self._deserialize(type, value)
133
128
  case type.to_sym
134
129
  when :Time
135
130
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -101,6 +101,7 @@ module Sendpost
101
101
  # Show invalid properties with the reasons. Usually used together with valid?
102
102
  # @return Array for valid properties with the reasons
103
103
  def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
105
  invalid_properties = Array.new
105
106
  invalid_properties
106
107
  end
@@ -108,6 +109,7 @@ module Sendpost
108
109
  # Check to see if the all the properties in the model are valid
109
110
  # @return true if the model is valid
110
111
  def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
113
  true
112
114
  end
113
115
 
@@ -139,37 +141,30 @@ module Sendpost
139
141
  # @param [Hash] attributes Model attributes in the form of hash
140
142
  # @return [Object] Returns the model itself
141
143
  def self.build_from_hash(attributes)
142
- new.build_from_hash(attributes)
143
- end
144
-
145
- # Builds the object from hash
146
- # @param [Hash] attributes Model attributes in the form of hash
147
- # @return [Object] Returns the model itself
148
- def build_from_hash(attributes)
149
144
  return nil unless attributes.is_a?(Hash)
150
145
  attributes = attributes.transform_keys(&:to_sym)
151
- self.class.openapi_types.each_pair do |key, type|
152
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
153
- self.send("#{key}=", nil)
146
+ transformed_hash = {}
147
+ openapi_types.each_pair do |key, type|
148
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = nil
154
150
  elsif type =~ /\AArray<(.*)>/i
155
151
  # check to ensure the input is an array given that the attribute
156
152
  # is documented as an array but the input is not
157
- if attributes[self.class.attribute_map[key]].is_a?(Array)
158
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
153
+ if attributes[attribute_map[key]].is_a?(Array)
154
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
159
155
  end
160
- elsif !attributes[self.class.attribute_map[key]].nil?
161
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
156
+ elsif !attributes[attribute_map[key]].nil?
157
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
162
158
  end
163
159
  end
164
-
165
- self
160
+ new(transformed_hash)
166
161
  end
167
162
 
168
163
  # Deserializes the data based on type
169
164
  # @param string type Data type
170
165
  # @param string value Value to be deserialized
171
166
  # @return [Object] Deserialized data
172
- def _deserialize(type, value)
167
+ def self._deserialize(type, value)
173
168
  case type.to_sym
174
169
  when :Time
175
170
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -89,6 +89,7 @@ module Sendpost
89
89
  # Show invalid properties with the reasons. Usually used together with valid?
90
90
  # @return Array for valid properties with the reasons
91
91
  def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
92
93
  invalid_properties = Array.new
93
94
  invalid_properties
94
95
  end
@@ -96,6 +97,7 @@ module Sendpost
96
97
  # Check to see if the all the properties in the model are valid
97
98
  # @return true if the model is valid
98
99
  def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
101
  true
100
102
  end
101
103
 
@@ -126,37 +128,30 @@ module Sendpost
126
128
  # @param [Hash] attributes Model attributes in the form of hash
127
129
  # @return [Object] Returns the model itself
128
130
  def self.build_from_hash(attributes)
129
- new.build_from_hash(attributes)
130
- end
131
-
132
- # Builds the object from hash
133
- # @param [Hash] attributes Model attributes in the form of hash
134
- # @return [Object] Returns the model itself
135
- def build_from_hash(attributes)
136
131
  return nil unless attributes.is_a?(Hash)
137
132
  attributes = attributes.transform_keys(&:to_sym)
138
- self.class.openapi_types.each_pair do |key, type|
139
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
140
- self.send("#{key}=", nil)
133
+ transformed_hash = {}
134
+ openapi_types.each_pair do |key, type|
135
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
141
137
  elsif type =~ /\AArray<(.*)>/i
142
138
  # check to ensure the input is an array given that the attribute
143
139
  # is documented as an array but the input is not
144
- if attributes[self.class.attribute_map[key]].is_a?(Array)
145
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
146
142
  end
147
- elsif !attributes[self.class.attribute_map[key]].nil?
148
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ elsif !attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
149
145
  end
150
146
  end
151
-
152
- self
147
+ new(transformed_hash)
153
148
  end
154
149
 
155
150
  # Deserializes the data based on type
156
151
  # @param string type Data type
157
152
  # @param string value Value to be deserialized
158
153
  # @return [Object] Deserialized data
159
- def _deserialize(type, value)
154
+ def self._deserialize(type, value)
160
155
  case type.to_sym
161
156
  when :Time
162
157
  Time.parse(value)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -73,6 +73,7 @@ module Sendpost
73
73
  # Show invalid properties with the reasons. Usually used together with valid?
74
74
  # @return Array for valid properties with the reasons
75
75
  def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
77
  invalid_properties = Array.new
77
78
  invalid_properties
78
79
  end
@@ -80,6 +81,7 @@ module Sendpost
80
81
  # Check to see if the all the properties in the model are valid
81
82
  # @return true if the model is valid
82
83
  def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
85
  true
84
86
  end
85
87
 
@@ -108,37 +110,30 @@ module Sendpost
108
110
  # @param [Hash] attributes Model attributes in the form of hash
109
111
  # @return [Object] Returns the model itself
110
112
  def self.build_from_hash(attributes)
111
- new.build_from_hash(attributes)
112
- end
113
-
114
- # Builds the object from hash
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- # @return [Object] Returns the model itself
117
- def build_from_hash(attributes)
118
113
  return nil unless attributes.is_a?(Hash)
119
114
  attributes = attributes.transform_keys(&:to_sym)
120
- self.class.openapi_types.each_pair do |key, type|
121
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
- self.send("#{key}=", nil)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
123
119
  elsif type =~ /\AArray<(.*)>/i
124
120
  # check to ensure the input is an array given that the attribute
125
121
  # is documented as an array but the input is not
126
- if attributes[self.class.attribute_map[key]].is_a?(Array)
127
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
128
124
  end
129
- elsif !attributes[self.class.attribute_map[key]].nil?
130
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
131
127
  end
132
128
  end
133
-
134
- self
129
+ new(transformed_hash)
135
130
  end
136
131
 
137
132
  # Deserializes the data based on type
138
133
  # @param string type Data type
139
134
  # @param string value Value to be deserialized
140
135
  # @return [Object] Deserialized data
141
- def _deserialize(type, value)
136
+ def self._deserialize(type, value)
142
137
  case type.to_sym
143
138
  when :Time
144
139
  Time.parse(value)
@@ -6,10 +6,10 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
13
13
  module Sendpost
14
- VERSION = '1.0.1'
14
+ VERSION = '1.2.2'
15
15
  end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
data/sendpost.yaml CHANGED
@@ -511,6 +511,10 @@ components:
511
511
  properties:
512
512
  clickedURL:
513
513
  type: string
514
+ trackedIP:
515
+ type: string
516
+ rawUserAgent:
517
+ type: string
514
518
  device:
515
519
  $ref: '#/components/schemas/Device'
516
520
  geo:
@@ -8,7 +8,7 @@
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Contact: hello@sendpost.io
10
10
  Generated by: https://openapi-generator.tech
11
- OpenAPI Generator version: 6.6.0
11
+ OpenAPI Generator version: 7.0.1
12
12
 
13
13
  =end
14
14
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12
 
data/spec/spec_helper.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12