class Rev::Comment

Order comment, containing author, creation timestamp and text

Attributes

by[R]
text[R]
timestamp[R]

Public Class Methods

new(fields) click to toggle source

@param fields [Hash] hash of comment fields parsed from JSON API response

Calls superclass method Rev::ApiSerializable::new
# File lib/rev-api/models/order.rb, line 45
def initialize(fields)
  super fields
  @timestamp = Date.iso8601(fields['timestamp'])
  @text = fields['text'] ? fields['text'] : String.new # right now API gives no 'text' field if text is empty
end