phrase 2.0.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +41 -3
  3. data/docs/Account.md +3 -1
  4. data/docs/AccountDetails.md +5 -1
  5. data/docs/AccountDetails1.md +3 -1
  6. data/docs/AccountSearchResult.md +29 -0
  7. data/docs/Branch.md +5 -1
  8. data/docs/Comment.md +3 -1
  9. data/docs/JobCreateParameters.md +2 -0
  10. data/docs/JobDetails.md +2 -0
  11. data/docs/JobDetails1.md +2 -0
  12. data/docs/JobTemplate.md +29 -0
  13. data/docs/JobTemplateCreateParameters.md +21 -0
  14. data/docs/JobTemplateLocale.md +23 -0
  15. data/docs/JobTemplateLocaleUpdateParameters.md +23 -0
  16. data/docs/JobTemplateLocalesApi.md +347 -0
  17. data/docs/JobTemplateLocalesCreateParameters.md +23 -0
  18. data/docs/JobTemplatePreview.md +19 -0
  19. data/docs/JobTemplateUpdateParameters.md +21 -0
  20. data/docs/JobTemplateUserPreview.md +23 -0
  21. data/docs/JobTemplatesApi.md +337 -0
  22. data/docs/KeysApi.md +132 -4
  23. data/docs/KeysExcludeParameters.md +23 -0
  24. data/docs/KeysIncludeParameters.md +23 -0
  25. data/docs/KeysSearchParameters.md +1 -1
  26. data/docs/KeysTagParameters.md +1 -1
  27. data/docs/KeysUntagParameters.md +1 -1
  28. data/docs/LocalePreview1.md +23 -0
  29. data/docs/LocalesApi.md +73 -3
  30. data/docs/MemberSpaces.md +2 -2
  31. data/docs/MemberUpdateParameters.md +4 -2
  32. data/docs/Notification.md +41 -0
  33. data/docs/NotificationGroup.md +23 -0
  34. data/docs/NotificationGroupDetail.md +27 -0
  35. data/docs/NotificationGroupsApi.md +194 -0
  36. data/docs/NotificationsApi.md +194 -0
  37. data/docs/OrderCreateParameters.md +2 -0
  38. data/docs/Project.md +2 -0
  39. data/docs/ProjectCreateParameters.md +35 -1
  40. data/docs/ProjectDetails.md +2 -0
  41. data/docs/ProjectsApi.md +7 -1
  42. data/docs/SearchApi.md +72 -0
  43. data/docs/SearchInAccountParameters.md +23 -0
  44. data/docs/Space1.md +25 -0
  45. data/docs/Subscription.md +19 -0
  46. data/docs/TranslationOrder.md +2 -0
  47. data/docs/TranslationsVerifyParameters.md +3 -5
  48. data/docs/User.md +0 -2
  49. data/lib/phrase/api/job_template_locales_api.rb +417 -0
  50. data/lib/phrase/api/job_templates_api.rb +387 -0
  51. data/lib/phrase/api/keys_api.rb +152 -4
  52. data/lib/phrase/api/locales_api.rb +80 -2
  53. data/lib/phrase/api/notification_groups_api.rb +202 -0
  54. data/lib/phrase/api/notifications_api.rb +202 -0
  55. data/lib/phrase/api/projects_api.rb +9 -0
  56. data/lib/phrase/api/search_api.rb +84 -0
  57. data/lib/phrase/models/account.rb +13 -4
  58. data/lib/phrase/models/account_details.rb +22 -4
  59. data/lib/phrase/models/account_details1.rb +10 -1
  60. data/lib/phrase/models/account_search_result.rb +250 -0
  61. data/lib/phrase/models/branch.rb +19 -1
  62. data/lib/phrase/models/comment.rb +15 -4
  63. data/lib/phrase/models/job_create_parameters.rb +11 -1
  64. data/lib/phrase/models/job_details.rb +10 -1
  65. data/lib/phrase/models/job_details1.rb +10 -1
  66. data/lib/phrase/models/job_template.rb +248 -0
  67. data/lib/phrase/models/job_template_create_parameters.rb +220 -0
  68. data/lib/phrase/models/job_template_locale.rb +223 -0
  69. data/lib/phrase/models/job_template_locale_update_parameters.rb +234 -0
  70. data/lib/phrase/models/job_template_locales_create_parameters.rb +234 -0
  71. data/lib/phrase/models/job_template_preview.rb +203 -0
  72. data/lib/phrase/models/job_template_update_parameters.rb +220 -0
  73. data/lib/phrase/models/job_template_user_preview.rb +221 -0
  74. data/lib/phrase/models/keys_exclude_parameters.rb +225 -0
  75. data/lib/phrase/models/keys_include_parameters.rb +225 -0
  76. data/lib/phrase/models/keys_search_parameters.rb +1 -1
  77. data/lib/phrase/models/keys_tag_parameters.rb +1 -1
  78. data/lib/phrase/models/keys_untag_parameters.rb +1 -1
  79. data/lib/phrase/models/locale_preview1.rb +221 -0
  80. data/lib/phrase/models/member_spaces.rb +2 -2
  81. data/lib/phrase/models/member_update_parameters.rb +12 -2
  82. data/lib/phrase/models/notification.rb +302 -0
  83. data/lib/phrase/models/notification_group.rb +221 -0
  84. data/lib/phrase/models/notification_group_detail.rb +239 -0
  85. data/lib/phrase/models/order_create_parameters.rb +11 -1
  86. data/lib/phrase/models/project.rb +10 -1
  87. data/lib/phrase/models/project_create_parameters.rb +174 -4
  88. data/lib/phrase/models/project_details.rb +10 -1
  89. data/lib/phrase/models/search_in_account_parameters.rb +225 -0
  90. data/lib/phrase/models/space1.rb +230 -0
  91. data/lib/phrase/models/subscription.rb +203 -0
  92. data/lib/phrase/models/translation_order.rb +10 -1
  93. data/lib/phrase/models/translations_verify_parameters.rb +14 -24
  94. data/lib/phrase/models/user.rb +1 -10
  95. data/lib/phrase/version.rb +1 -1
  96. data/lib/phrase.rb +23 -0
  97. data/spec/api/job_template_locales_api_spec.rb +103 -0
  98. data/spec/api/job_templates_api_spec.rb +98 -0
  99. data/spec/api/keys_api_spec.rb +30 -2
  100. data/spec/api/locales_api_spec.rb +18 -1
  101. data/spec/api/notification_groups_api_spec.rb +62 -0
  102. data/spec/api/notifications_api_spec.rb +62 -0
  103. data/spec/api/projects_api_spec.rb +3 -0
  104. data/spec/api/search_api_spec.rb +37 -0
  105. data/spec/models/account_details1_spec.rb +6 -0
  106. data/spec/models/account_details_spec.rb +12 -0
  107. data/spec/models/account_search_result_spec.rb +65 -0
  108. data/spec/models/account_spec.rb +6 -0
  109. data/spec/models/branch_spec.rb +12 -0
  110. data/spec/models/comment_spec.rb +6 -0
  111. data/spec/models/job_create_parameters_spec.rb +6 -0
  112. data/spec/models/job_details1_spec.rb +6 -0
  113. data/spec/models/job_details_spec.rb +6 -0
  114. data/spec/models/job_template_create_parameters_spec.rb +41 -0
  115. data/spec/models/job_template_locale_spec.rb +47 -0
  116. data/spec/models/job_template_locale_update_parameters_spec.rb +47 -0
  117. data/spec/models/job_template_locales_create_parameters_spec.rb +47 -0
  118. data/spec/models/job_template_preview_spec.rb +35 -0
  119. data/spec/models/job_template_spec.rb +65 -0
  120. data/spec/models/job_template_update_parameters_spec.rb +41 -0
  121. data/spec/models/job_template_user_preview_spec.rb +47 -0
  122. data/spec/models/keys_exclude_parameters_spec.rb +47 -0
  123. data/spec/models/keys_include_parameters_spec.rb +47 -0
  124. data/spec/models/locale_preview1_spec.rb +47 -0
  125. data/spec/models/member_update_parameters_spec.rb +6 -0
  126. data/spec/models/notification_group_detail_spec.rb +59 -0
  127. data/spec/models/notification_group_spec.rb +47 -0
  128. data/spec/models/notification_spec.rb +101 -0
  129. data/spec/models/order_create_parameters_spec.rb +6 -0
  130. data/spec/models/project_create_parameters_spec.rb +102 -0
  131. data/spec/models/project_details_spec.rb +6 -0
  132. data/spec/models/project_spec.rb +6 -0
  133. data/spec/models/search_in_account_parameters_spec.rb +47 -0
  134. data/spec/models/space1_spec.rb +53 -0
  135. data/spec/models/subscription_spec.rb +35 -0
  136. data/spec/models/translation_order_spec.rb +6 -0
  137. data/spec/models/translations_verify_parameters_spec.rb +2 -8
  138. data/spec/models/user_spec.rb +0 -6
  139. metadata +262 -170
@@ -0,0 +1,230 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class Space1
5
+ attr_accessor :id
6
+
7
+ attr_accessor :name
8
+
9
+ attr_accessor :created_at
10
+
11
+ attr_accessor :updated_at
12
+
13
+ attr_accessor :projects_count
14
+
15
+ # Attribute mapping from ruby-style variable name to JSON key.
16
+ def self.attribute_map
17
+ {
18
+ :'id' => :'id',
19
+ :'name' => :'name',
20
+ :'created_at' => :'created_at',
21
+ :'updated_at' => :'updated_at',
22
+ :'projects_count' => :'projects_count'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'id' => :'String',
30
+ :'name' => :'String',
31
+ :'created_at' => :'DateTime',
32
+ :'updated_at' => :'DateTime',
33
+ :'projects_count' => :'Integer'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::Space1` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::Space1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'id')
59
+ self.id = attributes[:'id']
60
+ end
61
+
62
+ if attributes.key?(:'name')
63
+ self.name = attributes[:'name']
64
+ end
65
+
66
+ if attributes.key?(:'created_at')
67
+ self.created_at = attributes[:'created_at']
68
+ end
69
+
70
+ if attributes.key?(:'updated_at')
71
+ self.updated_at = attributes[:'updated_at']
72
+ end
73
+
74
+ if attributes.key?(:'projects_count')
75
+ self.projects_count = attributes[:'projects_count']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ id == o.id &&
98
+ name == o.name &&
99
+ created_at == o.created_at &&
100
+ updated_at == o.updated_at &&
101
+ projects_count == o.projects_count
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [id, name, created_at, updated_at, projects_count].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ self.class.openapi_types.each_pair do |key, type|
129
+ if type =~ /\AArray<(.*)>/i
130
+ # check to ensure the input is an array given that the attribute
131
+ # is documented as an array but the input is not
132
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
133
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
134
+ end
135
+ elsif !attributes[self.class.attribute_map[key]].nil?
136
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
137
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
138
+ end
139
+
140
+ self
141
+ end
142
+
143
+ # Deserializes the data based on type
144
+ # @param string type Data type
145
+ # @param string value Value to be deserialized
146
+ # @return [Object] Deserialized data
147
+ def _deserialize(type, value)
148
+ case type.to_sym
149
+ when :DateTime
150
+ DateTime.parse(value)
151
+ when :Date
152
+ Date.parse(value)
153
+ when :String
154
+ value.to_s
155
+ when :Integer
156
+ value.to_i
157
+ when :Float
158
+ value.to_f
159
+ when :Boolean
160
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
161
+ true
162
+ else
163
+ false
164
+ end
165
+ when :Object
166
+ # generic object (usually a Hash), return directly
167
+ value
168
+ when /\AArray<(?<inner_type>.+)>\z/
169
+ inner_type = Regexp.last_match[:inner_type]
170
+ value.map { |v| _deserialize(inner_type, v) }
171
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
172
+ k_type = Regexp.last_match[:k_type]
173
+ v_type = Regexp.last_match[:v_type]
174
+ {}.tap do |hash|
175
+ value.each do |k, v|
176
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
177
+ end
178
+ end
179
+ else # model
180
+ Phrase.const_get(type).build_from_hash(value)
181
+ end
182
+ end
183
+
184
+ # Returns the string representation of the object
185
+ # @return [String] String presentation of the object
186
+ def to_s
187
+ to_hash.to_s
188
+ end
189
+
190
+ # to_body is an alias to to_hash (backward compatibility)
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_body
193
+ to_hash
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ # Outputs non-array value in the form of hash
213
+ # For object, use to_hash. Otherwise, just return the value
214
+ # @param [Object] value Any valid value
215
+ # @return [Hash] Returns the value in the form of hash
216
+ def _to_hash(value)
217
+ if value.is_a?(Array)
218
+ value.compact.map { |v| _to_hash(v) }
219
+ elsif value.is_a?(Hash)
220
+ {}.tap do |hash|
221
+ value.each { |k, v| hash[k] = _to_hash(v) }
222
+ end
223
+ elsif value.respond_to? :to_hash
224
+ value.to_hash
225
+ else
226
+ value
227
+ end
228
+ end
229
+ end
230
+ end
@@ -0,0 +1,203 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class Subscription
5
+ attr_accessor :is_current
6
+
7
+ attr_accessor :trial_expired
8
+
9
+ # Attribute mapping from ruby-style variable name to JSON key.
10
+ def self.attribute_map
11
+ {
12
+ :'is_current' => :'is_current',
13
+ :'trial_expired' => :'trial_expired'
14
+ }
15
+ end
16
+
17
+ # Attribute type mapping.
18
+ def self.openapi_types
19
+ {
20
+ :'is_current' => :'Boolean',
21
+ :'trial_expired' => :'Boolean'
22
+ }
23
+ end
24
+
25
+ # List of attributes with nullable: true
26
+ def self.openapi_nullable
27
+ Set.new([
28
+ ])
29
+ end
30
+
31
+ # Initializes the object
32
+ # @param [Hash] attributes Model attributes in the form of hash
33
+ def initialize(attributes = {})
34
+ if (!attributes.is_a?(Hash))
35
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::Subscription` initialize method"
36
+ end
37
+
38
+ # check to see if the attribute exists and convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h|
40
+ if (!self.class.attribute_map.key?(k.to_sym))
41
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::Subscription`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
42
+ end
43
+ h[k.to_sym] = v
44
+ }
45
+
46
+ if attributes.key?(:'is_current')
47
+ self.is_current = attributes[:'is_current']
48
+ end
49
+
50
+ if attributes.key?(:'trial_expired')
51
+ self.trial_expired = attributes[:'trial_expired']
52
+ end
53
+ end
54
+
55
+ # Show invalid properties with the reasons. Usually used together with valid?
56
+ # @return Array for valid properties with the reasons
57
+ def list_invalid_properties
58
+ invalid_properties = Array.new
59
+ invalid_properties
60
+ end
61
+
62
+ # Check to see if the all the properties in the model are valid
63
+ # @return true if the model is valid
64
+ def valid?
65
+ true
66
+ end
67
+
68
+ # Checks equality by comparing each attribute.
69
+ # @param [Object] Object to be compared
70
+ def ==(o)
71
+ return true if self.equal?(o)
72
+ self.class == o.class &&
73
+ is_current == o.is_current &&
74
+ trial_expired == o.trial_expired
75
+ end
76
+
77
+ # @see the `==` method
78
+ # @param [Object] Object to be compared
79
+ def eql?(o)
80
+ self == o
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ def hash
86
+ [is_current, trial_expired].hash
87
+ end
88
+
89
+ # Builds the object from hash
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ # @return [Object] Returns the model itself
92
+ def self.build_from_hash(attributes)
93
+ new.build_from_hash(attributes)
94
+ end
95
+
96
+ # Builds the object from hash
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ # @return [Object] Returns the model itself
99
+ def build_from_hash(attributes)
100
+ return nil unless attributes.is_a?(Hash)
101
+ self.class.openapi_types.each_pair do |key, type|
102
+ if type =~ /\AArray<(.*)>/i
103
+ # check to ensure the input is an array given that the attribute
104
+ # is documented as an array but the input is not
105
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
106
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
107
+ end
108
+ elsif !attributes[self.class.attribute_map[key]].nil?
109
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
110
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
111
+ end
112
+
113
+ self
114
+ end
115
+
116
+ # Deserializes the data based on type
117
+ # @param string type Data type
118
+ # @param string value Value to be deserialized
119
+ # @return [Object] Deserialized data
120
+ def _deserialize(type, value)
121
+ case type.to_sym
122
+ when :DateTime
123
+ DateTime.parse(value)
124
+ when :Date
125
+ Date.parse(value)
126
+ when :String
127
+ value.to_s
128
+ when :Integer
129
+ value.to_i
130
+ when :Float
131
+ value.to_f
132
+ when :Boolean
133
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
134
+ true
135
+ else
136
+ false
137
+ end
138
+ when :Object
139
+ # generic object (usually a Hash), return directly
140
+ value
141
+ when /\AArray<(?<inner_type>.+)>\z/
142
+ inner_type = Regexp.last_match[:inner_type]
143
+ value.map { |v| _deserialize(inner_type, v) }
144
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
145
+ k_type = Regexp.last_match[:k_type]
146
+ v_type = Regexp.last_match[:v_type]
147
+ {}.tap do |hash|
148
+ value.each do |k, v|
149
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
150
+ end
151
+ end
152
+ else # model
153
+ Phrase.const_get(type).build_from_hash(value)
154
+ end
155
+ end
156
+
157
+ # Returns the string representation of the object
158
+ # @return [String] String presentation of the object
159
+ def to_s
160
+ to_hash.to_s
161
+ end
162
+
163
+ # to_body is an alias to to_hash (backward compatibility)
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_body
166
+ to_hash
167
+ end
168
+
169
+ # Returns the object in the form of hash
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_hash
172
+ hash = {}
173
+ self.class.attribute_map.each_pair do |attr, param|
174
+ value = self.send(attr)
175
+ if value.nil?
176
+ is_nullable = self.class.openapi_nullable.include?(attr)
177
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
178
+ end
179
+
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ # Outputs non-array value in the form of hash
186
+ # For object, use to_hash. Otherwise, just return the value
187
+ # @param [Object] value Any valid value
188
+ # @return [Hash] Returns the value in the form of hash
189
+ def _to_hash(value)
190
+ if value.is_a?(Array)
191
+ value.compact.map { |v| _to_hash(v) }
192
+ elsif value.is_a?(Hash)
193
+ {}.tap do |hash|
194
+ value.each { |k, v| hash[k] = _to_hash(v) }
195
+ end
196
+ elsif value.respond_to? :to_hash
197
+ value.to_hash
198
+ else
199
+ value
200
+ end
201
+ end
202
+ end
203
+ end
@@ -4,6 +4,8 @@ module Phrase
4
4
  class TranslationOrder
5
5
  attr_accessor :id
6
6
 
7
+ attr_accessor :name
8
+
7
9
  attr_accessor :lsp
8
10
 
9
11
  attr_accessor :amount_in_cents
@@ -40,6 +42,7 @@ module Phrase
40
42
  def self.attribute_map
41
43
  {
42
44
  :'id' => :'id',
45
+ :'name' => :'name',
43
46
  :'lsp' => :'lsp',
44
47
  :'amount_in_cents' => :'amount_in_cents',
45
48
  :'currency' => :'currency',
@@ -63,6 +66,7 @@ module Phrase
63
66
  def self.openapi_types
64
67
  {
65
68
  :'id' => :'String',
69
+ :'name' => :'String',
66
70
  :'lsp' => :'String',
67
71
  :'amount_in_cents' => :'Integer',
68
72
  :'currency' => :'String',
@@ -107,6 +111,10 @@ module Phrase
107
111
  self.id = attributes[:'id']
108
112
  end
109
113
 
114
+ if attributes.key?(:'name')
115
+ self.name = attributes[:'name']
116
+ end
117
+
110
118
  if attributes.key?(:'lsp')
111
119
  self.lsp = attributes[:'lsp']
112
120
  end
@@ -193,6 +201,7 @@ module Phrase
193
201
  return true if self.equal?(o)
194
202
  self.class == o.class &&
195
203
  id == o.id &&
204
+ name == o.name &&
196
205
  lsp == o.lsp &&
197
206
  amount_in_cents == o.amount_in_cents &&
198
207
  currency == o.currency &&
@@ -220,7 +229,7 @@ module Phrase
220
229
  # Calculates hash code according to all attributes.
221
230
  # @return [Integer] Hash code
222
231
  def hash
223
- [id, lsp, amount_in_cents, currency, message, state, translation_type, progress_percent, source_locale, target_locales, tag, styleguide, unverify_translations_upon_delivery, quality, priority, created_at, updated_at].hash
232
+ [id, name, lsp, amount_in_cents, currency, message, state, translation_type, progress_percent, source_locale, target_locales, tag, styleguide, unverify_translations_upon_delivery, quality, priority, created_at, updated_at].hash
224
233
  end
225
234
 
226
235
  # Builds the object from hash