phrase 4.24.0 → 4.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +19 -4
  4. data/docs/AutomationEvent.md +33 -0
  5. data/docs/AutomationEventProject.md +19 -0
  6. data/docs/AutomationEventsApi.md +168 -0
  7. data/docs/AutomationsCreateParameters.md +1 -1
  8. data/docs/AutomationsCreateParameters1.md +1 -1
  9. data/docs/BranchComparison.md +23 -0
  10. data/docs/BranchComparisonChange.md +19 -0
  11. data/docs/BranchComparisonDiff.md +21 -0
  12. data/docs/BranchComparisonDiffConflictsValue.md +19 -0
  13. data/docs/BranchesApi.md +5 -4
  14. data/docs/DocumentsApi.md +4 -4
  15. data/docs/Format.md +20 -20
  16. data/docs/FormatsApi.md +1 -1
  17. data/docs/ICUApi.md +1 -1
  18. data/docs/IcuSkeletonError.md +17 -0
  19. data/docs/IcuSkeletonParameters.md +11 -11
  20. data/docs/Job.md +3 -1
  21. data/docs/JobDetails.md +2 -0
  22. data/docs/JobsApi.md +2 -2
  23. data/docs/KeyCreateParameters.md +1 -1
  24. data/docs/KeyFormatAnnotationsApi.md +74 -0
  25. data/docs/KeyFormatAnnotationsList200ResponseInner.md +19 -0
  26. data/docs/KeyLinksBatchDestroyParameters.md +6 -4
  27. data/docs/KeyLinksCreateParameters.md +2 -2
  28. data/docs/KeyUpdateParameters.md +1 -1
  29. data/docs/LinkedKeysApi.md +14 -13
  30. data/docs/Locale.md +2 -0
  31. data/docs/LocaleCreateParameters.md +3 -1
  32. data/docs/LocaleDetails.md +2 -0
  33. data/docs/LocaleDownloadCreateParameters.md +4 -0
  34. data/docs/LocaleUpdateParameters.md +3 -1
  35. data/docs/LocalesApi.md +2 -2
  36. data/docs/PreTranslation.md +29 -0
  37. data/docs/PreTranslationCreateParameters.md +19 -0
  38. data/docs/PreTranslationsApi.md +210 -0
  39. data/docs/ProjectCreateParameters.md +1 -1
  40. data/docs/ProjectUpdateParameters.md +1 -1
  41. data/docs/RepoSync.md +2 -0
  42. data/docs/RepoSyncCreateParameters.md +2 -0
  43. data/docs/ScreenshotUpdateParameters.md +1 -1
  44. data/docs/ScreenshotsApi.md +11 -11
  45. data/lib/phrase/api/automation_events_api.rb +215 -0
  46. data/lib/phrase/api/branches_api.rb +5 -3
  47. data/lib/phrase/api/documents_api.rb +6 -6
  48. data/lib/phrase/api/formats_api.rb +2 -2
  49. data/lib/phrase/api/icu_api.rb +2 -6
  50. data/lib/phrase/api/key_format_annotations_api.rb +85 -0
  51. data/lib/phrase/api/linked_keys_api.rb +19 -23
  52. data/lib/phrase/api/locales_api.rb +2 -2
  53. data/lib/phrase/api/pre_translations_api.rb +240 -0
  54. data/lib/phrase/api/screenshots_api.rb +20 -16
  55. data/lib/phrase/models/automation_event.rb +325 -0
  56. data/lib/phrase/models/automation_event_project.rb +208 -0
  57. data/lib/phrase/models/automations_create_parameters.rb +1 -1
  58. data/lib/phrase/models/automations_create_parameters1.rb +1 -1
  59. data/lib/phrase/models/branch_comparison.rb +224 -0
  60. data/lib/phrase/models/branch_comparison_change.rb +212 -0
  61. data/lib/phrase/models/branch_comparison_diff.rb +223 -0
  62. data/lib/phrase/models/branch_comparison_diff_conflicts_value.rb +209 -0
  63. data/lib/phrase/models/format.rb +60 -0
  64. data/lib/phrase/models/{key_links_index400_response.rb → icu_skeleton_error.rb} +11 -10
  65. data/lib/phrase/models/icu_skeleton_parameters.rb +6 -6
  66. data/lib/phrase/models/job.rb +16 -5
  67. data/lib/phrase/models/job_details.rb +12 -1
  68. data/lib/phrase/models/key_format_annotations_list200_response_inner.rb +207 -0
  69. data/lib/phrase/models/key_links_batch_destroy_parameters.rb +52 -6
  70. data/lib/phrase/models/key_links_create_parameters.rb +1 -1
  71. data/lib/phrase/models/locale.rb +10 -1
  72. data/lib/phrase/models/locale_create_parameters.rb +14 -4
  73. data/lib/phrase/models/locale_details.rb +10 -1
  74. data/lib/phrase/models/locale_download_create_parameters.rb +21 -1
  75. data/lib/phrase/models/locale_update_parameters.rb +14 -4
  76. data/lib/phrase/models/pre_translation.rb +301 -0
  77. data/lib/phrase/models/pre_translation_create_parameters.rb +241 -0
  78. data/lib/phrase/models/repo_sync.rb +29 -1
  79. data/lib/phrase/models/repo_sync_create_parameters.rb +27 -1
  80. data/lib/phrase/response.rb +2 -2
  81. data/lib/phrase/version.rb +1 -1
  82. data/lib/phrase.rb +13 -1
  83. data/phrase.gemspec +1 -1
  84. data/spec/api/automation_events_api_spec.rb +67 -0
  85. data/spec/api/branches_api_spec.rb +1 -1
  86. data/spec/api/documents_api_spec.rb +3 -3
  87. data/spec/api/formats_api_spec.rb +1 -1
  88. data/spec/api/icu_api_spec.rb +1 -1
  89. data/spec/api/key_format_annotations_api_spec.rb +38 -0
  90. data/spec/api/linked_keys_api_spec.rb +7 -7
  91. data/spec/api/pre_translations_api_spec.rb +70 -0
  92. data/spec/api/screenshots_api_spec.rb +6 -6
  93. data/spec/models/automation_event_project_spec.rb +35 -0
  94. data/spec/models/automation_event_spec.rb +85 -0
  95. data/spec/models/branch_comparison_change_spec.rb +35 -0
  96. data/spec/models/branch_comparison_diff_conflicts_value_spec.rb +35 -0
  97. data/spec/models/branch_comparison_diff_spec.rb +41 -0
  98. data/spec/models/branch_comparison_spec.rb +47 -0
  99. data/spec/models/{key_links_index400_response_spec.rb → icu_skeleton_error_spec.rb} +7 -7
  100. data/spec/models/job_details_spec.rb +6 -0
  101. data/spec/models/job_spec.rb +6 -0
  102. data/spec/models/key_format_annotations_list200_response_inner_spec.rb +35 -0
  103. data/spec/models/key_links_batch_destroy_parameters_spec.rb +10 -0
  104. data/spec/models/locale_create_parameters_spec.rb +6 -0
  105. data/spec/models/locale_details_spec.rb +6 -0
  106. data/spec/models/locale_download_create_parameters_spec.rb +12 -0
  107. data/spec/models/locale_spec.rb +6 -0
  108. data/spec/models/locale_update_parameters_spec.rb +6 -0
  109. data/spec/models/pre_translation_create_parameters_spec.rb +39 -0
  110. data/spec/models/pre_translation_spec.rb +73 -0
  111. data/spec/models/repo_sync_create_parameters_spec.rb +6 -0
  112. data/spec/models/repo_sync_spec.rb +6 -0
  113. data/spec/response_spec.rb +53 -0
  114. metadata +304 -254
  115. data/docs/KeyLinksIndex400Response.md +0 -17
@@ -0,0 +1,209 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class BranchComparisonDiffConflictsValue
5
+ attr_accessor :base
6
+
7
+ attr_accessor :head
8
+
9
+ # Attribute mapping from ruby-style variable name to JSON key.
10
+ def self.attribute_map
11
+ {
12
+ :'base' => :'base',
13
+ :'head' => :'head'
14
+ }
15
+ end
16
+
17
+ # Attribute type mapping.
18
+ def self.openapi_types
19
+ {
20
+ :'base' => :'Array<Hash<String, Object>>',
21
+ :'head' => :'Array<Hash<String, Object>>'
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::BranchComparisonDiffConflictsValue` 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::BranchComparisonDiffConflictsValue`. 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?(:'base')
47
+ if (value = attributes[:'base']).is_a?(Array)
48
+ self.base = value
49
+ end
50
+ end
51
+
52
+ if attributes.key?(:'head')
53
+ if (value = attributes[:'head']).is_a?(Array)
54
+ self.head = value
55
+ end
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ base == o.base &&
78
+ head == o.head
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Integer] Hash code
89
+ def hash
90
+ [base, head].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def self.build_from_hash(attributes)
97
+ new.build_from_hash(attributes)
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.openapi_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :Time
131
+ Time.parse(value)
132
+ when :String
133
+ value.to_s
134
+ when :Integer
135
+ value.to_i
136
+ when :Float
137
+ value.to_f
138
+ when :Boolean
139
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
140
+ true
141
+ else
142
+ false
143
+ end
144
+ when :Object
145
+ # generic object (usually a Hash), return directly
146
+ value
147
+ when /\AArray<(?<inner_type>.+)>\z/
148
+ inner_type = Regexp.last_match[:inner_type]
149
+ value.map { |v| _deserialize(inner_type, v) }
150
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
151
+ k_type = Regexp.last_match[:k_type]
152
+ v_type = Regexp.last_match[:v_type]
153
+ {}.tap do |hash|
154
+ value.each do |k, v|
155
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
156
+ end
157
+ end
158
+ else # model
159
+ Phrase.const_get(type).build_from_hash(value)
160
+ end
161
+ end
162
+
163
+ # Returns the string representation of the object
164
+ # @return [String] String presentation of the object
165
+ def to_s
166
+ to_hash.to_s
167
+ end
168
+
169
+ # to_body is an alias to to_hash (backward compatibility)
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_body
172
+ to_hash
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ if value.nil?
182
+ is_nullable = self.class.openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ # Outputs non-array value in the form of hash
192
+ # For object, use to_hash. Otherwise, just return the value
193
+ # @param [Object] value Any valid value
194
+ # @return [Hash] Returns the value in the form of hash
195
+ def _to_hash(value)
196
+ if value.is_a?(Array)
197
+ value.compact.map { |v| _to_hash(v) }
198
+ elsif value.is_a?(Hash)
199
+ {}.tap do |hash|
200
+ value.each { |k, v| hash[k] = _to_hash(v) }
201
+ end
202
+ elsif value.respond_to? :to_hash
203
+ value.to_hash
204
+ else
205
+ value
206
+ end
207
+ end
208
+ end
209
+ end
@@ -2,24 +2,34 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class Format
5
+ # Human-readable display name of the format.
5
6
  attr_accessor :name
6
7
 
8
+ # Identifier used to reference this format in API requests, such as the file_format parameter on the uploads and downloads endpoints.
7
9
  attr_accessor :api_name
8
10
 
11
+ # Human-readable summary of the format and its typical use case.
9
12
  attr_accessor :description
10
13
 
14
+ # Default file extension associated with this format.
11
15
  attr_accessor :extension
12
16
 
17
+ # Default character encoding used when reading or writing files in this format.
13
18
  attr_accessor :default_encoding
14
19
 
20
+ # Whether locale files can be imported using this format.
15
21
  attr_accessor :importable
16
22
 
23
+ # Whether locale files can be exported using this format.
17
24
  attr_accessor :exportable
18
25
 
26
+ # Conventional file path pattern for this format. Contains locale_name as a placeholder for the locale identifier.
19
27
  attr_accessor :default_file
20
28
 
29
+ # When true, exported files contain the default locale's content for any key that has no translation in the target locale.
21
30
  attr_accessor :renders_default_locale
22
31
 
32
+ # When true, files in this format embed locale information so Phrase can detect the locale automatically on import.
23
33
  attr_accessor :includes_locale_information
24
34
 
25
35
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -120,12 +130,62 @@ module Phrase
120
130
  # @return Array for valid properties with the reasons
121
131
  def list_invalid_properties
122
132
  invalid_properties = Array.new
133
+ if @name.nil?
134
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
135
+ end
136
+
137
+ if @api_name.nil?
138
+ invalid_properties.push('invalid value for "api_name", api_name cannot be nil.')
139
+ end
140
+
141
+ if @description.nil?
142
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
143
+ end
144
+
145
+ if @extension.nil?
146
+ invalid_properties.push('invalid value for "extension", extension cannot be nil.')
147
+ end
148
+
149
+ if @default_encoding.nil?
150
+ invalid_properties.push('invalid value for "default_encoding", default_encoding cannot be nil.')
151
+ end
152
+
153
+ if @importable.nil?
154
+ invalid_properties.push('invalid value for "importable", importable cannot be nil.')
155
+ end
156
+
157
+ if @exportable.nil?
158
+ invalid_properties.push('invalid value for "exportable", exportable cannot be nil.')
159
+ end
160
+
161
+ if @default_file.nil?
162
+ invalid_properties.push('invalid value for "default_file", default_file cannot be nil.')
163
+ end
164
+
165
+ if @renders_default_locale.nil?
166
+ invalid_properties.push('invalid value for "renders_default_locale", renders_default_locale cannot be nil.')
167
+ end
168
+
169
+ if @includes_locale_information.nil?
170
+ invalid_properties.push('invalid value for "includes_locale_information", includes_locale_information cannot be nil.')
171
+ end
172
+
123
173
  invalid_properties
124
174
  end
125
175
 
126
176
  # Check to see if the all the properties in the model are valid
127
177
  # @return true if the model is valid
128
178
  def valid?
179
+ return false if @name.nil?
180
+ return false if @api_name.nil?
181
+ return false if @description.nil?
182
+ return false if @extension.nil?
183
+ return false if @default_encoding.nil?
184
+ return false if @importable.nil?
185
+ return false if @exportable.nil?
186
+ return false if @default_file.nil?
187
+ return false if @renders_default_locale.nil?
188
+ return false if @includes_locale_information.nil?
129
189
  true
130
190
  end
131
191
 
@@ -1,20 +1,21 @@
1
1
  require 'date'
2
2
 
3
3
  module Phrase
4
- class KeyLinksIndex400Response
5
- attr_accessor :message
4
+ class IcuSkeletonError
5
+ # Human-readable description of the ICU message format parse failure.
6
+ attr_accessor :error
6
7
 
7
8
  # Attribute mapping from ruby-style variable name to JSON key.
8
9
  def self.attribute_map
9
10
  {
10
- :'message' => :'message'
11
+ :'error' => :'error'
11
12
  }
12
13
  end
13
14
 
14
15
  # Attribute type mapping.
15
16
  def self.openapi_types
16
17
  {
17
- :'message' => :'String'
18
+ :'error' => :'String'
18
19
  }
19
20
  end
20
21
 
@@ -28,19 +29,19 @@ module Phrase
28
29
  # @param [Hash] attributes Model attributes in the form of hash
29
30
  def initialize(attributes = {})
30
31
  if (!attributes.is_a?(Hash))
31
- fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::KeyLinksIndex400Response` initialize method"
32
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::IcuSkeletonError` initialize method"
32
33
  end
33
34
 
34
35
  # check to see if the attribute exists and convert string to symbol for hash key
35
36
  attributes = attributes.each_with_object({}) { |(k, v), h|
36
37
  if (!self.class.attribute_map.key?(k.to_sym))
37
- fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::KeyLinksIndex400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
38
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::IcuSkeletonError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
38
39
  end
39
40
  h[k.to_sym] = v
40
41
  }
41
42
 
42
- if attributes.key?(:'message')
43
- self.message = attributes[:'message']
43
+ if attributes.key?(:'error')
44
+ self.error = attributes[:'error']
44
45
  end
45
46
  end
46
47
 
@@ -62,7 +63,7 @@ module Phrase
62
63
  def ==(o)
63
64
  return true if self.equal?(o)
64
65
  self.class == o.class &&
65
- message == o.message
66
+ error == o.error
66
67
  end
67
68
 
68
69
  # @see the `==` method
@@ -74,7 +75,7 @@ module Phrase
74
75
  # Calculates hash code according to all attributes.
75
76
  # @return [Integer] Hash code
76
77
  def hash
77
- [message].hash
78
+ [error].hash
78
79
  end
79
80
 
80
81
  # Builds the object from hash
@@ -2,22 +2,22 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class IcuSkeletonParameters
5
- # Source content to derive skeletons from. Mutually exclusive with `id`; exactly one of the two must be provided.
5
+ # Source ICU message string to derive skeletons from. Mutually exclusive with `id`; exactly one of the two must be provided.
6
6
  attr_accessor :content
7
7
 
8
- # Translation code to source content from. Mutually exclusive with `content`; exactly one of the two must be provided.
8
+ # Code of an existing translation to source content from. Mutually exclusive with `content`; exactly one of the two must be provided. Returns 404 when the translation does not exist.
9
9
  attr_accessor :id
10
10
 
11
- # Locale codes
11
+ # Locale codes for which to generate skeletons. The pluralization rules of each locale determine which plural forms appear in the output.
12
12
  attr_accessor :locale_codes
13
13
 
14
- # Keep the content and add missing plural forms for each locale
14
+ # When true, preserves the existing translation text in each plural form and adds any missing forms for the locale rather than stripping all literal content.
15
15
  attr_accessor :keep_content
16
16
 
17
- # Indicates whether the zero form should be included or excluded in the returned skeletons
17
+ # When true, includes the zero plural form in the generated skeleton for locales that support it.
18
18
  attr_accessor :zero_form_enabled
19
19
 
20
- # Strings supports two CLDR variants, when it comes to pluralization rules. \\ You can choose which one you want to use when constructing the skeletons. Possible values \\ are `legacy` and `cldr_41`. Default value is `legacy`.
20
+ # Pluralization rule set to use when constructing skeletons. Pass `legacy` for pre-CLDR behaviour, or a CLDR version string such as `cldr48`. Defaults to the project's configured version when omitted.
21
21
  attr_accessor :cldr_version
22
22
 
23
23
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -28,6 +28,9 @@ module Phrase
28
28
  # The ID of the job template this job was created from, or null if no template was used.
29
29
  attr_accessor :job_template_id
30
30
 
31
+ # The review due date for this job. Returns `null` when the project does not have review workflow enabled.
32
+ attr_accessor :review_due_date
33
+
31
34
  # Attribute mapping from ruby-style variable name to JSON key.
32
35
  def self.attribute_map
33
36
  {
@@ -42,7 +45,8 @@ module Phrase
42
45
  :'created_at' => :'created_at',
43
46
  :'updated_at' => :'updated_at',
44
47
  :'automation_id' => :'automation_id',
45
- :'job_template_id' => :'job_template_id'
48
+ :'job_template_id' => :'job_template_id',
49
+ :'review_due_date' => :'review_due_date'
46
50
  }
47
51
  end
48
52
 
@@ -60,7 +64,8 @@ module Phrase
60
64
  :'created_at' => :'DateTime',
61
65
  :'updated_at' => :'DateTime',
62
66
  :'automation_id' => :'String',
63
- :'job_template_id' => :'String'
67
+ :'job_template_id' => :'String',
68
+ :'review_due_date' => :'DateTime'
64
69
  }
65
70
  end
66
71
 
@@ -69,7 +74,8 @@ module Phrase
69
74
  Set.new([
70
75
  :'due_date',
71
76
  :'automation_id',
72
- :'job_template_id'
77
+ :'job_template_id',
78
+ :'review_due_date'
73
79
  ])
74
80
  end
75
81
 
@@ -135,6 +141,10 @@ module Phrase
135
141
  if attributes.key?(:'job_template_id')
136
142
  self.job_template_id = attributes[:'job_template_id']
137
143
  end
144
+
145
+ if attributes.key?(:'review_due_date')
146
+ self.review_due_date = attributes[:'review_due_date']
147
+ end
138
148
  end
139
149
 
140
150
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -166,7 +176,8 @@ module Phrase
166
176
  created_at == o.created_at &&
167
177
  updated_at == o.updated_at &&
168
178
  automation_id == o.automation_id &&
169
- job_template_id == o.job_template_id
179
+ job_template_id == o.job_template_id &&
180
+ review_due_date == o.review_due_date
170
181
  end
171
182
 
172
183
  # @see the `==` method
@@ -178,7 +189,7 @@ module Phrase
178
189
  # Calculates hash code according to all attributes.
179
190
  # @return [Integer] Hash code
180
191
  def hash
181
- [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, automation_id, job_template_id].hash
192
+ [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, automation_id, job_template_id, review_due_date].hash
182
193
  end
183
194
 
184
195
  # Builds the object from hash
@@ -28,6 +28,9 @@ module Phrase
28
28
  # The ID of the job template this job was created from, or null if no template was used.
29
29
  attr_accessor :job_template_id
30
30
 
31
+ # The review due date for this job. Returns `null` when the project does not have review workflow enabled.
32
+ attr_accessor :review_due_date
33
+
31
34
  attr_accessor :owner
32
35
 
33
36
  attr_accessor :job_tag_name
@@ -61,6 +64,7 @@ module Phrase
61
64
  :'updated_at' => :'updated_at',
62
65
  :'automation_id' => :'automation_id',
63
66
  :'job_template_id' => :'job_template_id',
67
+ :'review_due_date' => :'review_due_date',
64
68
  :'owner' => :'owner',
65
69
  :'job_tag_name' => :'job_tag_name',
66
70
  :'source_translations_updated_at' => :'source_translations_updated_at',
@@ -87,6 +91,7 @@ module Phrase
87
91
  :'updated_at' => :'DateTime',
88
92
  :'automation_id' => :'String',
89
93
  :'job_template_id' => :'String',
94
+ :'review_due_date' => :'DateTime',
90
95
  :'owner' => :'UserPreview',
91
96
  :'job_tag_name' => :'String',
92
97
  :'source_translations_updated_at' => :'DateTime',
@@ -104,6 +109,7 @@ module Phrase
104
109
  :'due_date',
105
110
  :'automation_id',
106
111
  :'job_template_id',
112
+ :'review_due_date',
107
113
  ])
108
114
  end
109
115
 
@@ -177,6 +183,10 @@ module Phrase
177
183
  self.job_template_id = attributes[:'job_template_id']
178
184
  end
179
185
 
186
+ if attributes.key?(:'review_due_date')
187
+ self.review_due_date = attributes[:'review_due_date']
188
+ end
189
+
180
190
  if attributes.key?(:'owner')
181
191
  self.owner = attributes[:'owner']
182
192
  end
@@ -246,6 +256,7 @@ module Phrase
246
256
  updated_at == o.updated_at &&
247
257
  automation_id == o.automation_id &&
248
258
  job_template_id == o.job_template_id &&
259
+ review_due_date == o.review_due_date &&
249
260
  owner == o.owner &&
250
261
  job_tag_name == o.job_tag_name &&
251
262
  source_translations_updated_at == o.source_translations_updated_at &&
@@ -265,7 +276,7 @@ module Phrase
265
276
  # Calculates hash code according to all attributes.
266
277
  # @return [Integer] Hash code
267
278
  def hash
268
- [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, automation_id, job_template_id, owner, job_tag_name, source_translations_updated_at, source_locale, locales, keys, annotations, locked].hash
279
+ [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, automation_id, job_template_id, review_due_date, owner, job_tag_name, source_translations_updated_at, source_locale, locales, keys, annotations, locked].hash
269
280
  end
270
281
 
271
282
  # Builds the object from hash