lib/phrase/models/upload.rb in phrase-2.20.0 vs lib/phrase/models/upload.rb in phrase-2.21.0
- old
+ new
@@ -10,10 +10,13 @@
attr_accessor :state
attr_accessor :tag
+ # The URL to the upload in Phrase Strings app.
+ attr_accessor :url
+
attr_accessor :summary
attr_accessor :created_at
attr_accessor :updated_at
@@ -24,10 +27,11 @@
:'id' => :'id',
:'filename' => :'filename',
:'format' => :'format',
:'state' => :'state',
:'tag' => :'tag',
+ :'url' => :'url',
:'summary' => :'summary',
:'created_at' => :'created_at',
:'updated_at' => :'updated_at'
}
end
@@ -38,10 +42,11 @@
:'id' => :'String',
:'filename' => :'String',
:'format' => :'String',
:'state' => :'String',
:'tag' => :'String',
+ :'url' => :'String',
:'summary' => :'UploadSummary',
:'created_at' => :'DateTime',
:'updated_at' => :'DateTime'
}
end
@@ -85,10 +90,14 @@
if attributes.key?(:'tag')
self.tag = attributes[:'tag']
end
+ if attributes.key?(:'url')
+ self.url = attributes[:'url']
+ end
+
if attributes.key?(:'summary')
self.summary = attributes[:'summary']
end
if attributes.key?(:'created_at')
@@ -121,10 +130,11 @@
id == o.id &&
filename == o.filename &&
format == o.format &&
state == o.state &&
tag == o.tag &&
+ url == o.url &&
summary == o.summary &&
created_at == o.created_at &&
updated_at == o.updated_at
end
@@ -135,10 +145,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [id, filename, format, state, tag, summary, created_at, updated_at].hash
+ [id, filename, format, state, tag, url, summary, created_at, updated_at].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself