lib/phrase/models/distribution.rb in phrase-2.3.1 vs lib/phrase/models/distribution.rb in phrase-2.4.0
- old
+ new
@@ -8,10 +8,12 @@
attr_accessor :project
attr_accessor :platforms
+ attr_accessor :locales
+
attr_accessor :releases
attr_accessor :created_at
attr_accessor :deleted_at
@@ -21,10 +23,11 @@
{
:'id' => :'id',
:'name' => :'name',
:'project' => :'project',
:'platforms' => :'platforms',
+ :'locales' => :'locales',
:'releases' => :'releases',
:'created_at' => :'created_at',
:'deleted_at' => :'deleted_at'
}
end
@@ -34,10 +37,11 @@
{
:'id' => :'String',
:'name' => :'String',
:'project' => :'ProjectShort',
:'platforms' => :'Array<String>',
+ :'locales' => :'Array<LocalePreview>',
:'releases' => :'Array<ReleasePreview>',
:'created_at' => :'DateTime',
:'deleted_at' => :'DateTime'
}
end
@@ -79,10 +83,16 @@
if (value = attributes[:'platforms']).is_a?(Array)
self.platforms = value
end
end
+ if attributes.key?(:'locales')
+ if (value = attributes[:'locales']).is_a?(Array)
+ self.locales = value
+ end
+ end
+
if attributes.key?(:'releases')
if (value = attributes[:'releases']).is_a?(Array)
self.releases = value
end
end
@@ -116,10 +126,11 @@
self.class == o.class &&
id == o.id &&
name == o.name &&
project == o.project &&
platforms == o.platforms &&
+ locales == o.locales &&
releases == o.releases &&
created_at == o.created_at &&
deleted_at == o.deleted_at
end
@@ -130,10 +141,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [id, name, project, platforms, releases, created_at, deleted_at].hash
+ [id, name, project, platforms, locales, releases, created_at, deleted_at].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself