Sha256: 6a3e3b5e2a1a464af39be1b582274e7dab6b3c1e02fa60cb79677feb63098b7c

Contents?: true

Size: 517 Bytes

Versions: 5

Compression:

Stored size: 517 Bytes

Contents

module FlexmlsApi
  module Models
    class Message < Base
      self.element_name="messages"
      
      def save(arguments={})
        begin
          return save!(arguments)
        rescue NotFound, BadResourceRequest => e
          FlexmlsApi.logger.error("Failed to save resource #{self}: #{e.message}")
        end
        false
      end
      def save!(arguments={})
        results = connection.post self.class.path, {"Messages" => [ attributes ]}, arguments
        true
      end
      
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
spark_api-1.0.2 lib/spark_api/models/message.rb~
spark_api-1.0.1 lib/spark_api/models/message.rb~
spark_api-1.0.0 lib/spark_api/models/message.rb~
flexmls_api-0.7.3 lib/flexmls_api/models/message.rb
flexmls_api-0.7.5 lib/flexmls_api/models/message.rb