Method: Propertyware::SaveAccount#initialize
- Defined in:
- lib/propertyware/models/save_account.rb
#initialize(attributes = {}) ⇒ SaveAccount
Initializes the object
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/propertyware/models/save_account.rb', line 123 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Propertyware::SaveAccount` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Propertyware::SaveAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'account_number') self.account_number = attributes[:'account_number'] end if attributes.key?(:'account_type') self.account_type = attributes[:'account_type'] end if attributes.key?(:'auto_apply_prepayment') self.auto_apply_prepayment = attributes[:'auto_apply_prepayment'] end if attributes.key?(:'bank') self.bank = attributes[:'bank'] end if attributes.key?(:'code') self.code = attributes[:'code'] end if attributes.key?(:'credit_card') self.credit_card = attributes[:'credit_card'] end if attributes.key?(:'current_asset') self.current_asset = attributes[:'current_asset'] end if attributes.key?(:'current_liability') self.current_liability = attributes[:'current_liability'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'equity') self.equity = attributes[:'equity'] end if attributes.key?(:'expense') self.expense = attributes[:'expense'] end if attributes.key?(:'income') self.income = attributes[:'income'] end if attributes.key?(:'non_current_asset') self.non_current_asset = attributes[:'non_current_asset'] end if attributes.key?(:'non_current_liability') self.non_current_liability = attributes[:'non_current_liability'] end if attributes.key?(:'non_operating_expense') self. = attributes[:'non_operating_expense'] end if attributes.key?(:'non_operating_inome') self. = attributes[:'non_operating_inome'] end if attributes.key?(:'parent_gl_account_id') self.parent_gl_account_id = attributes[:'parent_gl_account_id'] end if attributes.key?(:'taxable') self.taxable = attributes[:'taxable'] end end |