Method: TransferZero::DebitRequestWrapper#valid?

Defined in:
lib/transferzero-sdk/models/debit_request_wrapper.rb

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/transferzero-sdk/models/debit_request_wrapper.rb', line 72

def valid?
  _one_of_found = false
  openapi_one_of.each do |_class|
    _one_of = TransferZero.const_get(_class).build_from_hash(self.to_hash)
    if _one_of.valid?
      if _one_of_found?
        return false
      else
        _one_of_found = true
      end
    end
  end

  if !_one_of_found?
    return false
  end

  true
end