DealMakerAPI 0.83.0 → 0.83.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/lib/DealMakerAPI/models/add506c_document_request.rb +14 -17
  4. data/lib/DealMakerAPI/models/add_document_request.rb +14 -17
  5. data/lib/DealMakerAPI/models/create_bulk_upload_detail_request.rb +16 -17
  6. data/lib/DealMakerAPI/models/create_bulk_upload_request.rb +16 -17
  7. data/lib/DealMakerAPI/models/create_company_request.rb +24 -17
  8. data/lib/DealMakerAPI/models/create_corporation_profile_request.rb +14 -17
  9. data/lib/DealMakerAPI/models/create_deal_setup_request.rb +18 -17
  10. data/lib/DealMakerAPI/models/create_individual_profile_request.rb +14 -17
  11. data/lib/DealMakerAPI/models/create_investor_request.rb +14 -17
  12. data/lib/DealMakerAPI/models/create_joint_profile_request.rb +14 -17
  13. data/lib/DealMakerAPI/models/create_trust_profile_request.rb +14 -17
  14. data/lib/DealMakerAPI/models/edit_investor_tags_request.rb +14 -17
  15. data/lib/DealMakerAPI/models/generate_url_request.rb +14 -17
  16. data/lib/DealMakerAPI/models/patch_corporation_profile_request.rb +12 -17
  17. data/lib/DealMakerAPI/models/patch_individual_profile_request.rb +12 -17
  18. data/lib/DealMakerAPI/models/patch_investor_request.rb +14 -17
  19. data/lib/DealMakerAPI/models/patch_joint_profile_request.rb +12 -17
  20. data/lib/DealMakerAPI/models/patch_trust_profile_request.rb +12 -17
  21. data/lib/DealMakerAPI/models/post_webhooks_request.rb +18 -17
  22. data/lib/DealMakerAPI/models/put_webhooks_id_request.rb +12 -17
  23. data/lib/DealMakerAPI/models/update_investor_request.rb +12 -17
  24. data/lib/DealMakerAPI/models/v1_entities_address.rb +12 -17
  25. data/lib/DealMakerAPI/models/v1_entities_addresses.rb +12 -17
  26. data/lib/DealMakerAPI/models/v1_entities_attachment.rb +12 -17
  27. data/lib/DealMakerAPI/models/v1_entities_background_check_search.rb +12 -17
  28. data/lib/DealMakerAPI/models/v1_entities_bulk_upload.rb +12 -17
  29. data/lib/DealMakerAPI/models/v1_entities_bulk_upload_detail.rb +12 -17
  30. data/lib/DealMakerAPI/models/v1_entities_company.rb +12 -17
  31. data/lib/DealMakerAPI/models/v1_entities_company_deal.rb +12 -17
  32. data/lib/DealMakerAPI/models/v1_entities_company_deals.rb +12 -17
  33. data/lib/DealMakerAPI/models/v1_entities_deal.rb +12 -17
  34. data/lib/DealMakerAPI/models/v1_entities_deal_enterprise.rb +12 -17
  35. data/lib/DealMakerAPI/models/v1_entities_deal_funding_metrics.rb +12 -17
  36. data/lib/DealMakerAPI/models/v1_entities_deal_investor_metrics.rb +12 -17
  37. data/lib/DealMakerAPI/models/v1_entities_deal_issuer.rb +12 -17
  38. data/lib/DealMakerAPI/models/v1_entities_deal_setup.rb +12 -17
  39. data/lib/DealMakerAPI/models/v1_entities_deal_setup_user.rb +12 -17
  40. data/lib/DealMakerAPI/models/v1_entities_deals.rb +12 -17
  41. data/lib/DealMakerAPI/models/v1_entities_express_wire_instruction.rb +12 -17
  42. data/lib/DealMakerAPI/models/v1_entities_express_wire_instructions.rb +12 -17
  43. data/lib/DealMakerAPI/models/v1_entities_investor.rb +12 -17
  44. data/lib/DealMakerAPI/models/v1_entities_investor_otp_access_link.rb +12 -17
  45. data/lib/DealMakerAPI/models/v1_entities_investor_profile_address.rb +12 -17
  46. data/lib/DealMakerAPI/models/v1_entities_investor_profile_corporation.rb +12 -17
  47. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_account_holder.rb +12 -17
  48. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_corporation.rb +12 -17
  49. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_primary_holder.rb +12 -17
  50. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_trust.rb +12 -17
  51. data/lib/DealMakerAPI/models/v1_entities_investor_profile_individual.rb +12 -17
  52. data/lib/DealMakerAPI/models/v1_entities_investor_profile_item.rb +12 -17
  53. data/lib/DealMakerAPI/models/v1_entities_investor_profile_joint.rb +12 -17
  54. data/lib/DealMakerAPI/models/v1_entities_investor_profile_owner.rb +12 -17
  55. data/lib/DealMakerAPI/models/v1_entities_investor_profile_trust.rb +12 -17
  56. data/lib/DealMakerAPI/models/v1_entities_investor_profiles.rb +12 -17
  57. data/lib/DealMakerAPI/models/v1_entities_investor_user.rb +12 -17
  58. data/lib/DealMakerAPI/models/v1_entities_investors.rb +12 -17
  59. data/lib/DealMakerAPI/models/v1_entities_presigned_url_result.rb +12 -17
  60. data/lib/DealMakerAPI/models/v1_entities_shareholder.rb +12 -17
  61. data/lib/DealMakerAPI/models/v1_entities_shareholders.rb +12 -17
  62. data/lib/DealMakerAPI/models/v1_entities_shareholders_tags.rb +12 -17
  63. data/lib/DealMakerAPI/models/v1_entities_subscription_agreement.rb +12 -17
  64. data/lib/DealMakerAPI/models/v1_entities_webhooks_deal.rb +12 -17
  65. data/lib/DealMakerAPI/models/v1_entities_webhooks_security_token.rb +12 -17
  66. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription.rb +12 -17
  67. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription_deal.rb +12 -17
  68. data/lib/DealMakerAPI/models/v1_entities_webhooks_subscription_deals.rb +12 -17
  69. data/lib/DealMakerAPI/version.rb +1 -1
  70. metadata +2 -2
@@ -66,6 +66,7 @@ module DealMakerAPI
66
66
  # Show invalid properties with the reasons. Usually used together with valid?
67
67
  # @return Array for valid properties with the reasons
68
68
  def list_invalid_properties
69
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
70
  invalid_properties = Array.new
70
71
  invalid_properties
71
72
  end
@@ -73,6 +74,7 @@ module DealMakerAPI
73
74
  # Check to see if the all the properties in the model are valid
74
75
  # @return true if the model is valid
75
76
  def valid?
77
+ warn '[DEPRECATED] the `valid?` method is obsolete'
76
78
  true
77
79
  end
78
80
 
@@ -100,37 +102,30 @@ module DealMakerAPI
100
102
  # @param [Hash] attributes Model attributes in the form of hash
101
103
  # @return [Object] Returns the model itself
102
104
  def self.build_from_hash(attributes)
103
- new.build_from_hash(attributes)
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
105
  return nil unless attributes.is_a?(Hash)
111
106
  attributes = attributes.transform_keys(&:to_sym)
112
- self.class.openapi_types.each_pair do |key, type|
113
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
- self.send("#{key}=", nil)
107
+ transformed_hash = {}
108
+ openapi_types.each_pair do |key, type|
109
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
110
+ transformed_hash["#{key}"] = nil
115
111
  elsif type =~ /\AArray<(.*)>/i
116
112
  # check to ensure the input is an array given that the attribute
117
113
  # is documented as an array but the input is not
118
- if attributes[self.class.attribute_map[key]].is_a?(Array)
119
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
+ if attributes[attribute_map[key]].is_a?(Array)
115
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
120
116
  end
121
- elsif !attributes[self.class.attribute_map[key]].nil?
122
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
+ elsif !attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
123
119
  end
124
120
  end
125
-
126
- self
121
+ new(transformed_hash)
127
122
  end
128
123
 
129
124
  # Deserializes the data based on type
130
125
  # @param string type Data type
131
126
  # @param string value Value to be deserialized
132
127
  # @return [Object] Deserialized data
133
- def _deserialize(type, value)
128
+ def self._deserialize(type, value)
134
129
  case type.to_sym
135
130
  when :Time
136
131
  Time.parse(value)
@@ -76,6 +76,7 @@ module DealMakerAPI
76
76
  # Show invalid properties with the reasons. Usually used together with valid?
77
77
  # @return Array for valid properties with the reasons
78
78
  def list_invalid_properties
79
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
80
  invalid_properties = Array.new
80
81
  invalid_properties
81
82
  end
@@ -83,6 +84,7 @@ module DealMakerAPI
83
84
  # Check to see if the all the properties in the model are valid
84
85
  # @return true if the model is valid
85
86
  def valid?
87
+ warn '[DEPRECATED] the `valid?` method is obsolete'
86
88
  true
87
89
  end
88
90
 
@@ -111,37 +113,30 @@ module DealMakerAPI
111
113
  # @param [Hash] attributes Model attributes in the form of hash
112
114
  # @return [Object] Returns the model itself
113
115
  def self.build_from_hash(attributes)
114
- new.build_from_hash(attributes)
115
- end
116
-
117
- # Builds the object from hash
118
- # @param [Hash] attributes Model attributes in the form of hash
119
- # @return [Object] Returns the model itself
120
- def build_from_hash(attributes)
121
116
  return nil unless attributes.is_a?(Hash)
122
117
  attributes = attributes.transform_keys(&:to_sym)
123
- self.class.openapi_types.each_pair do |key, type|
124
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
125
- self.send("#{key}=", nil)
118
+ transformed_hash = {}
119
+ openapi_types.each_pair do |key, type|
120
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
121
+ transformed_hash["#{key}"] = nil
126
122
  elsif type =~ /\AArray<(.*)>/i
127
123
  # check to ensure the input is an array given that the attribute
128
124
  # is documented as an array but the input is not
129
- if attributes[self.class.attribute_map[key]].is_a?(Array)
130
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ if attributes[attribute_map[key]].is_a?(Array)
126
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
131
127
  end
132
- elsif !attributes[self.class.attribute_map[key]].nil?
133
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ elsif !attributes[attribute_map[key]].nil?
129
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
134
130
  end
135
131
  end
136
-
137
- self
132
+ new(transformed_hash)
138
133
  end
139
134
 
140
135
  # Deserializes the data based on type
141
136
  # @param string type Data type
142
137
  # @param string value Value to be deserialized
143
138
  # @return [Object] Deserialized data
144
- def _deserialize(type, value)
139
+ def self._deserialize(type, value)
145
140
  case type.to_sym
146
141
  when :Time
147
142
  Time.parse(value)
@@ -84,6 +84,7 @@ module DealMakerAPI
84
84
  # Show invalid properties with the reasons. Usually used together with valid?
85
85
  # @return Array for valid properties with the reasons
86
86
  def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
88
  invalid_properties = Array.new
88
89
  invalid_properties
89
90
  end
@@ -91,6 +92,7 @@ module DealMakerAPI
91
92
  # Check to see if the all the properties in the model are valid
92
93
  # @return true if the model is valid
93
94
  def valid?
95
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
96
  true
95
97
  end
96
98
 
@@ -120,37 +122,30 @@ module DealMakerAPI
120
122
  # @param [Hash] attributes Model attributes in the form of hash
121
123
  # @return [Object] Returns the model itself
122
124
  def self.build_from_hash(attributes)
123
- new.build_from_hash(attributes)
124
- end
125
-
126
- # Builds the object from hash
127
- # @param [Hash] attributes Model attributes in the form of hash
128
- # @return [Object] Returns the model itself
129
- def build_from_hash(attributes)
130
125
  return nil unless attributes.is_a?(Hash)
131
126
  attributes = attributes.transform_keys(&:to_sym)
132
- self.class.openapi_types.each_pair do |key, type|
133
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
- self.send("#{key}=", nil)
127
+ transformed_hash = {}
128
+ openapi_types.each_pair do |key, type|
129
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
130
+ transformed_hash["#{key}"] = nil
135
131
  elsif type =~ /\AArray<(.*)>/i
136
132
  # check to ensure the input is an array given that the attribute
137
133
  # is documented as an array but the input is not
138
- if attributes[self.class.attribute_map[key]].is_a?(Array)
139
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
134
+ if attributes[attribute_map[key]].is_a?(Array)
135
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
136
  end
141
- elsif !attributes[self.class.attribute_map[key]].nil?
142
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
137
+ elsif !attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
139
  end
144
140
  end
145
-
146
- self
141
+ new(transformed_hash)
147
142
  end
148
143
 
149
144
  # Deserializes the data based on type
150
145
  # @param string type Data type
151
146
  # @param string value Value to be deserialized
152
147
  # @return [Object] Deserialized data
153
- def _deserialize(type, value)
148
+ def self._deserialize(type, value)
154
149
  case type.to_sym
155
150
  when :Time
156
151
  Time.parse(value)
@@ -66,6 +66,7 @@ module DealMakerAPI
66
66
  # Show invalid properties with the reasons. Usually used together with valid?
67
67
  # @return Array for valid properties with the reasons
68
68
  def list_invalid_properties
69
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
70
  invalid_properties = Array.new
70
71
  invalid_properties
71
72
  end
@@ -73,6 +74,7 @@ module DealMakerAPI
73
74
  # Check to see if the all the properties in the model are valid
74
75
  # @return true if the model is valid
75
76
  def valid?
77
+ warn '[DEPRECATED] the `valid?` method is obsolete'
76
78
  true
77
79
  end
78
80
 
@@ -100,37 +102,30 @@ module DealMakerAPI
100
102
  # @param [Hash] attributes Model attributes in the form of hash
101
103
  # @return [Object] Returns the model itself
102
104
  def self.build_from_hash(attributes)
103
- new.build_from_hash(attributes)
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
105
  return nil unless attributes.is_a?(Hash)
111
106
  attributes = attributes.transform_keys(&:to_sym)
112
- self.class.openapi_types.each_pair do |key, type|
113
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
- self.send("#{key}=", nil)
107
+ transformed_hash = {}
108
+ openapi_types.each_pair do |key, type|
109
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
110
+ transformed_hash["#{key}"] = nil
115
111
  elsif type =~ /\AArray<(.*)>/i
116
112
  # check to ensure the input is an array given that the attribute
117
113
  # is documented as an array but the input is not
118
- if attributes[self.class.attribute_map[key]].is_a?(Array)
119
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
+ if attributes[attribute_map[key]].is_a?(Array)
115
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
120
116
  end
121
- elsif !attributes[self.class.attribute_map[key]].nil?
122
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
+ elsif !attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
123
119
  end
124
120
  end
125
-
126
- self
121
+ new(transformed_hash)
127
122
  end
128
123
 
129
124
  # Deserializes the data based on type
130
125
  # @param string type Data type
131
126
  # @param string value Value to be deserialized
132
127
  # @return [Object] Deserialized data
133
- def _deserialize(type, value)
128
+ def self._deserialize(type, value)
134
129
  case type.to_sym
135
130
  when :Time
136
131
  Time.parse(value)
@@ -74,6 +74,7 @@ module DealMakerAPI
74
74
  # Show invalid properties with the reasons. Usually used together with valid?
75
75
  # @return Array for valid properties with the reasons
76
76
  def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
78
  invalid_properties = Array.new
78
79
  invalid_properties
79
80
  end
@@ -81,6 +82,7 @@ module DealMakerAPI
81
82
  # Check to see if the all the properties in the model are valid
82
83
  # @return true if the model is valid
83
84
  def valid?
85
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
86
  true
85
87
  end
86
88
 
@@ -109,37 +111,30 @@ module DealMakerAPI
109
111
  # @param [Hash] attributes Model attributes in the form of hash
110
112
  # @return [Object] Returns the model itself
111
113
  def self.build_from_hash(attributes)
112
- new.build_from_hash(attributes)
113
- end
114
-
115
- # Builds the object from hash
116
- # @param [Hash] attributes Model attributes in the form of hash
117
- # @return [Object] Returns the model itself
118
- def build_from_hash(attributes)
119
114
  return nil unless attributes.is_a?(Hash)
120
115
  attributes = attributes.transform_keys(&:to_sym)
121
- self.class.openapi_types.each_pair do |key, type|
122
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
123
- self.send("#{key}=", nil)
116
+ transformed_hash = {}
117
+ openapi_types.each_pair do |key, type|
118
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
119
+ transformed_hash["#{key}"] = nil
124
120
  elsif type =~ /\AArray<(.*)>/i
125
121
  # check to ensure the input is an array given that the attribute
126
122
  # is documented as an array but the input is not
127
- if attributes[self.class.attribute_map[key]].is_a?(Array)
128
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
123
+ if attributes[attribute_map[key]].is_a?(Array)
124
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
129
125
  end
130
- elsif !attributes[self.class.attribute_map[key]].nil?
131
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
126
+ elsif !attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
132
128
  end
133
129
  end
134
-
135
- self
130
+ new(transformed_hash)
136
131
  end
137
132
 
138
133
  # Deserializes the data based on type
139
134
  # @param string type Data type
140
135
  # @param string value Value to be deserialized
141
136
  # @return [Object] Deserialized data
142
- def _deserialize(type, value)
137
+ def self._deserialize(type, value)
143
138
  case type.to_sym
144
139
  when :Time
145
140
  Time.parse(value)
@@ -75,6 +75,7 @@ module DealMakerAPI
75
75
  # Show invalid properties with the reasons. Usually used together with valid?
76
76
  # @return Array for valid properties with the reasons
77
77
  def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
79
  invalid_properties = Array.new
79
80
  invalid_properties
80
81
  end
@@ -82,6 +83,7 @@ module DealMakerAPI
82
83
  # Check to see if the all the properties in the model are valid
83
84
  # @return true if the model is valid
84
85
  def valid?
86
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
87
  true
86
88
  end
87
89
 
@@ -110,37 +112,30 @@ module DealMakerAPI
110
112
  # @param [Hash] attributes Model attributes in the form of hash
111
113
  # @return [Object] Returns the model itself
112
114
  def self.build_from_hash(attributes)
113
- new.build_from_hash(attributes)
114
- end
115
-
116
- # Builds the object from hash
117
- # @param [Hash] attributes Model attributes in the form of hash
118
- # @return [Object] Returns the model itself
119
- def build_from_hash(attributes)
120
115
  return nil unless attributes.is_a?(Hash)
121
116
  attributes = attributes.transform_keys(&:to_sym)
122
- self.class.openapi_types.each_pair do |key, type|
123
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
- self.send("#{key}=", nil)
117
+ transformed_hash = {}
118
+ openapi_types.each_pair do |key, type|
119
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = nil
125
121
  elsif type =~ /\AArray<(.*)>/i
126
122
  # check to ensure the input is an array given that the attribute
127
123
  # is documented as an array but the input is not
128
- if attributes[self.class.attribute_map[key]].is_a?(Array)
129
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
+ if attributes[attribute_map[key]].is_a?(Array)
125
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
126
  end
131
- elsif !attributes[self.class.attribute_map[key]].nil?
132
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ elsif !attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
129
  end
134
130
  end
135
-
136
- self
131
+ new(transformed_hash)
137
132
  end
138
133
 
139
134
  # Deserializes the data based on type
140
135
  # @param string type Data type
141
136
  # @param string value Value to be deserialized
142
137
  # @return [Object] Deserialized data
143
- def _deserialize(type, value)
138
+ def self._deserialize(type, value)
144
139
  case type.to_sym
145
140
  when :Time
146
141
  Time.parse(value)
@@ -85,6 +85,7 @@ module DealMakerAPI
85
85
  # Show invalid properties with the reasons. Usually used together with valid?
86
86
  # @return Array for valid properties with the reasons
87
87
  def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
89
  invalid_properties = Array.new
89
90
  invalid_properties
90
91
  end
@@ -92,6 +93,7 @@ module DealMakerAPI
92
93
  # Check to see if the all the properties in the model are valid
93
94
  # @return true if the model is valid
94
95
  def valid?
96
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
97
  true
96
98
  end
97
99
 
@@ -121,37 +123,30 @@ module DealMakerAPI
121
123
  # @param [Hash] attributes Model attributes in the form of hash
122
124
  # @return [Object] Returns the model itself
123
125
  def self.build_from_hash(attributes)
124
- new.build_from_hash(attributes)
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def build_from_hash(attributes)
131
126
  return nil unless attributes.is_a?(Hash)
132
127
  attributes = attributes.transform_keys(&:to_sym)
133
- self.class.openapi_types.each_pair do |key, type|
134
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
135
- self.send("#{key}=", nil)
128
+ transformed_hash = {}
129
+ openapi_types.each_pair do |key, type|
130
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
131
+ transformed_hash["#{key}"] = nil
136
132
  elsif type =~ /\AArray<(.*)>/i
137
133
  # check to ensure the input is an array given that the attribute
138
134
  # is documented as an array but the input is not
139
- if attributes[self.class.attribute_map[key]].is_a?(Array)
140
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
135
+ if attributes[attribute_map[key]].is_a?(Array)
136
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
137
  end
142
- elsif !attributes[self.class.attribute_map[key]].nil?
143
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
138
+ elsif !attributes[attribute_map[key]].nil?
139
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
140
  end
145
141
  end
146
-
147
- self
142
+ new(transformed_hash)
148
143
  end
149
144
 
150
145
  # Deserializes the data based on type
151
146
  # @param string type Data type
152
147
  # @param string value Value to be deserialized
153
148
  # @return [Object] Deserialized data
154
- def _deserialize(type, value)
149
+ def self._deserialize(type, value)
155
150
  case type.to_sym
156
151
  when :Time
157
152
  Time.parse(value)
@@ -67,6 +67,7 @@ module DealMakerAPI
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 DealMakerAPI
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 DealMakerAPI
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)
@@ -111,6 +111,7 @@ module DealMakerAPI
111
111
  # Show invalid properties with the reasons. Usually used together with valid?
112
112
  # @return Array for valid properties with the reasons
113
113
  def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
115
  invalid_properties = Array.new
115
116
  invalid_properties
116
117
  end
@@ -118,6 +119,7 @@ module DealMakerAPI
118
119
  # Check to see if the all the properties in the model are valid
119
120
  # @return true if the model is valid
120
121
  def valid?
122
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
123
  true
122
124
  end
123
125
 
@@ -150,37 +152,30 @@ module DealMakerAPI
150
152
  # @param [Hash] attributes Model attributes in the form of hash
151
153
  # @return [Object] Returns the model itself
152
154
  def self.build_from_hash(attributes)
153
- new.build_from_hash(attributes)
154
- end
155
-
156
- # Builds the object from hash
157
- # @param [Hash] attributes Model attributes in the form of hash
158
- # @return [Object] Returns the model itself
159
- def build_from_hash(attributes)
160
155
  return nil unless attributes.is_a?(Hash)
161
156
  attributes = attributes.transform_keys(&:to_sym)
162
- self.class.openapi_types.each_pair do |key, type|
163
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
164
- self.send("#{key}=", nil)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
165
161
  elsif type =~ /\AArray<(.*)>/i
166
162
  # check to ensure the input is an array given that the attribute
167
163
  # is documented as an array but the input is not
168
- if attributes[self.class.attribute_map[key]].is_a?(Array)
169
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
170
166
  end
171
- elsif !attributes[self.class.attribute_map[key]].nil?
172
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
173
169
  end
174
170
  end
175
-
176
- self
171
+ new(transformed_hash)
177
172
  end
178
173
 
179
174
  # Deserializes the data based on type
180
175
  # @param string type Data type
181
176
  # @param string value Value to be deserialized
182
177
  # @return [Object] Deserialized data
183
- def _deserialize(type, value)
178
+ def self._deserialize(type, value)
184
179
  case type.to_sym
185
180
  when :Time
186
181
  Time.parse(value)
@@ -93,6 +93,7 @@ module DealMakerAPI
93
93
  # Show invalid properties with the reasons. Usually used together with valid?
94
94
  # @return Array for valid properties with the reasons
95
95
  def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
96
97
  invalid_properties = Array.new
97
98
  invalid_properties
98
99
  end
@@ -100,6 +101,7 @@ module DealMakerAPI
100
101
  # Check to see if the all the properties in the model are valid
101
102
  # @return true if the model is valid
102
103
  def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
105
  true
104
106
  end
105
107
 
@@ -130,37 +132,30 @@ module DealMakerAPI
130
132
  # @param [Hash] attributes Model attributes in the form of hash
131
133
  # @return [Object] Returns the model itself
132
134
  def self.build_from_hash(attributes)
133
- new.build_from_hash(attributes)
134
- end
135
-
136
- # Builds the object from hash
137
- # @param [Hash] attributes Model attributes in the form of hash
138
- # @return [Object] Returns the model itself
139
- def build_from_hash(attributes)
140
135
  return nil unless attributes.is_a?(Hash)
141
136
  attributes = attributes.transform_keys(&:to_sym)
142
- self.class.openapi_types.each_pair do |key, type|
143
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
144
- self.send("#{key}=", nil)
137
+ transformed_hash = {}
138
+ openapi_types.each_pair do |key, type|
139
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = nil
145
141
  elsif type =~ /\AArray<(.*)>/i
146
142
  # check to ensure the input is an array given that the attribute
147
143
  # is documented as an array but the input is not
148
- if attributes[self.class.attribute_map[key]].is_a?(Array)
149
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
+ if attributes[attribute_map[key]].is_a?(Array)
145
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
146
  end
151
- elsif !attributes[self.class.attribute_map[key]].nil?
152
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
147
+ elsif !attributes[attribute_map[key]].nil?
148
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
149
  end
154
150
  end
155
-
156
- self
151
+ new(transformed_hash)
157
152
  end
158
153
 
159
154
  # Deserializes the data based on type
160
155
  # @param string type Data type
161
156
  # @param string value Value to be deserialized
162
157
  # @return [Object] Deserialized data
163
- def _deserialize(type, value)
158
+ def self._deserialize(type, value)
164
159
  case type.to_sym
165
160
  when :Time
166
161
  Time.parse(value)