lib/messente_api/models/sms.rb in messente_api-1.2.0 vs lib/messente_api/models/sms.rb in messente_api-1.2.1

- old
+ new

@@ -4,11 +4,11 @@ #[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. The version of the OpenAPI document: 1.2.0 Contact: messente@messente.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 4.0.3 +OpenAPI Generator version: 4.3.0 =end require 'date' @@ -77,10 +77,16 @@ :'udh' => :'String', :'channel' => :'String' } end + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `MessenteApi::SMS` initialize method" @@ -272,10 +278,14 @@ # @return [Hash] Returns the object in the form of hash def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) - next if value.nil? + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + hash[param] = _to_hash(value) end hash end