phrase 3.6.0 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +4 -3
- data/docs/CommentCreateParameters.md +5 -3
- data/docs/CommentCreateParameters1.md +19 -0
- data/docs/CommentRepliesApi.md +6 -8
- data/docs/CommentsApi.md +2 -6
- data/docs/KeyCreateParameters.md +3 -1
- data/docs/KeyUpdateParameters.md +1 -1
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectUpdateParameters.md +1 -1
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/UploadsApi.md +2 -2
- data/lib/phrase/api/comment_replies_api.rb +12 -10
- data/lib/phrase/api/comments_api.rb +0 -6
- data/lib/phrase/api/uploads_api.rb +2 -2
- data/lib/phrase/models/comment_create_parameters.rb +25 -8
- data/lib/phrase/models/comment_create_parameters1.rb +212 -0
- data/lib/phrase/models/key_create_parameters.rb +11 -1
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +1 -0
- data/spec/api/comment_replies_api_spec.rb +1 -2
- data/spec/api/comments_api_spec.rb +0 -2
- data/spec/models/comment_create_parameters1_spec.rb +35 -0
- data/spec/models/comment_create_parameters_spec.rb +7 -1
- data/spec/models/key_create_parameters_spec.rb +6 -0
- metadata +247 -243
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3f5c696d27e08c101a167dddb80b511ae88507f70a8c1b9391211093ecbe8d1
|
4
|
+
data.tar.gz: 8cd98e44aee6743df2811f7f647c8a3f8c3eb4ff75d5f6789e9d22a1a43ae701
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed36f256d74a41f434e893d24d6f6d0b6180255318a75f7b649ec210707b39ea6da91524cce29d47ffdcb14378c3ac4b70253383273e5ab43c8ed53f1db7a241
|
7
|
+
data.tar.gz: 55579b6ed6a2cb30a9628a79f2fc2c34d1c95c353083cbd8ad4fc667ae295b30cbe0ed3700333a8ca34741c6b9ea101e22a52fa98c9d0dee668050245fab6f10
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [3.7.0](https://github.com/phrase/openapi/compare/ruby-v3.6.0...ruby-v3.7.0) (2024-12-03)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* **API:** Add Pagination header to POST search endpoints [[#457](https://github.com/phrase/openapi/issues/457)] ([#706](https://github.com/phrase/openapi/issues/706)) ([9a79fa3](https://github.com/phrase/openapi/commit/9a79fa31bb3b9d58272fa2f4e82d72d0d44a93a0))
|
9
|
+
* **API:** autotranslate param in key creation [STRINGS-786] ([#713](https://github.com/phrase/openapi/issues/713)) ([581d0ff](https://github.com/phrase/openapi/commit/581d0ff5f1d06757e5ddd9603b78fc8d435d68ee))
|
10
|
+
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
* **API:** Comment creation schema fix #STRINGS-866 ([#718](https://github.com/phrase/openapi/issues/718)) ([e201d13](https://github.com/phrase/openapi/commit/e201d1360c89698dd8d3642cc28f89dd0e50a1fb))
|
15
|
+
|
3
16
|
## [3.6.0](https://github.com/phrase/openapi/compare/ruby-v3.5.0...ruby-v3.6.0) (2024-10-02)
|
4
17
|
|
5
18
|
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Phrase Strings is a translation management platform for software projects. You c
|
|
7
7
|
## This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 3.
|
10
|
+
- Package version: 3.7.0
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://developers.phrase.com/api/](https://developers.phrase.com/api/)
|
13
13
|
|
@@ -56,10 +56,10 @@ gem build phrase.gemspec
|
|
56
56
|
Then install the gem locally:
|
57
57
|
|
58
58
|
```shell
|
59
|
-
gem install ./phrase-3.
|
59
|
+
gem install ./phrase-3.7.0.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-3.
|
62
|
+
(for development, run `gem install --dev ./phrase-3.7.0.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -436,6 +436,7 @@ Class | Method | HTTP request | Description
|
|
436
436
|
- [Phrase::BranchUpdateParameters](docs/BranchUpdateParameters.md)
|
437
437
|
- [Phrase::Comment](docs/Comment.md)
|
438
438
|
- [Phrase::CommentCreateParameters](docs/CommentCreateParameters.md)
|
439
|
+
- [Phrase::CommentCreateParameters1](docs/CommentCreateParameters1.md)
|
439
440
|
- [Phrase::CommentMarkReadParameters](docs/CommentMarkReadParameters.md)
|
440
441
|
- [Phrase::CommentReaction](docs/CommentReaction.md)
|
441
442
|
- [Phrase::CommentUpdateParameters](docs/CommentUpdateParameters.md)
|
@@ -4,16 +4,18 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
+
**message** | **String** | Comment message |
|
7
8
|
**branch** | **String** | specify the branch to use | [optional]
|
8
|
-
**
|
9
|
+
**locale_ids** | **Array<String>** | specify the locales for the comment | [optional]
|
9
10
|
|
10
11
|
## Code Sample
|
11
12
|
|
12
13
|
```ruby
|
13
14
|
require 'Phrase'
|
14
15
|
|
15
|
-
instance = Phrase::CommentCreateParameters.new(
|
16
|
-
|
16
|
+
instance = Phrase::CommentCreateParameters.new(message: Some message...,
|
17
|
+
branch: my-feature-branch,
|
18
|
+
locale_ids: ["someId","someOtherId"])
|
17
19
|
```
|
18
20
|
|
19
21
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Phrase::CommentCreateParameters1
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**message** | **String** | Reply message body |
|
8
|
+
**branch** | **String** | Specify the branch to use | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'Phrase'
|
14
|
+
|
15
|
+
instance = Phrase::CommentCreateParameters1.new(message: Some message...,
|
16
|
+
branch: my-feature-branch)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/CommentRepliesApi.md
CHANGED
@@ -94,7 +94,7 @@ Response<([**Array<Comment>**](Comment.md))>
|
|
94
94
|
|
95
95
|
## reply_create
|
96
96
|
|
97
|
-
> Comment reply_create(project_id, key_id, comment_id, opts)
|
97
|
+
> Comment reply_create(project_id, key_id, comment_id, comment_create_parameters1, opts)
|
98
98
|
|
99
99
|
Create a reply
|
100
100
|
|
@@ -120,15 +120,14 @@ api_instance = Phrase::CommentRepliesApi.new
|
|
120
120
|
project_id = 'project_id_example' # String | Project ID
|
121
121
|
key_id = 'key_id_example' # String | Translation Key ID
|
122
122
|
comment_id = 'comment_id_example' # String | Comment ID
|
123
|
+
comment_create_parameters1 = Phrase::CommentCreateParameters1.new({message: 'Some message...'}) # CommentCreateParameters1 |
|
123
124
|
opts = {
|
124
|
-
x_phrase_app_otp: 'x_phrase_app_otp_example'
|
125
|
-
branch: 'my-feature-branch', # String | specify the branch to use
|
126
|
-
message: 'some message...' # String | specify the message for the comment
|
125
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
127
126
|
}
|
128
127
|
|
129
128
|
begin
|
130
129
|
#Create a reply
|
131
|
-
result = api_instance.reply_create(project_id, key_id, comment_id, opts)
|
130
|
+
result = api_instance.reply_create(project_id, key_id, comment_id, comment_create_parameters1, opts)
|
132
131
|
pp result
|
133
132
|
rescue Phrase::ApiError => e
|
134
133
|
puts "Exception when calling CommentRepliesApi->reply_create: #{e}"
|
@@ -143,9 +142,8 @@ Name | Type | Description | Notes
|
|
143
142
|
**project_id** | **String**| Project ID |
|
144
143
|
**key_id** | **String**| Translation Key ID |
|
145
144
|
**comment_id** | **String**| Comment ID |
|
145
|
+
**comment_create_parameters1** | [**CommentCreateParameters1**](CommentCreateParameters1.md)| |
|
146
146
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
147
|
-
**branch** | **String**| specify the branch to use | [optional]
|
148
|
-
**message** | **String**| specify the message for the comment | [optional]
|
149
147
|
|
150
148
|
### Return type
|
151
149
|
|
@@ -157,7 +155,7 @@ Response<([**Comment**](Comment.md))>
|
|
157
155
|
|
158
156
|
### HTTP request headers
|
159
157
|
|
160
|
-
- **Content-Type**:
|
158
|
+
- **Content-Type**: application/json
|
161
159
|
- **Accept**: application/json
|
162
160
|
|
163
161
|
|
data/docs/CommentsApi.md
CHANGED
@@ -42,11 +42,9 @@ end
|
|
42
42
|
api_instance = Phrase::CommentsApi.new
|
43
43
|
project_id = 'project_id_example' # String | Project ID
|
44
44
|
key_id = 'key_id_example' # String | Translation Key ID
|
45
|
-
comment_create_parameters = Phrase::CommentCreateParameters.new # CommentCreateParameters |
|
45
|
+
comment_create_parameters = Phrase::CommentCreateParameters.new({message: 'Some message...'}) # CommentCreateParameters |
|
46
46
|
opts = {
|
47
|
-
x_phrase_app_otp: 'x_phrase_app_otp_example'
|
48
|
-
message: 'some message...', # String | specify the message for the comment
|
49
|
-
locale_ids: ['inner_example'] # Array<String> | specify the locales for the comment
|
47
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
50
48
|
}
|
51
49
|
|
52
50
|
begin
|
@@ -67,8 +65,6 @@ Name | Type | Description | Notes
|
|
67
65
|
**key_id** | **String**| Translation Key ID |
|
68
66
|
**comment_create_parameters** | [**CommentCreateParameters**](CommentCreateParameters.md)| |
|
69
67
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
70
|
-
**message** | **String**| specify the message for the comment | [optional]
|
71
|
-
**locale_ids** | [**Array<String>**](String.md)| specify the locales for the comment | [optional]
|
72
68
|
|
73
69
|
### Return type
|
74
70
|
|
data/docs/KeyCreateParameters.md
CHANGED
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
|
|
16
16
|
**remove_screenshot** | **Boolean** | Indicates whether the screenshot will be deleted. This parameter is deprecated. Please use the Screenshots endpoint instead. | [optional]
|
17
17
|
**unformatted** | **Boolean** | Indicates whether the key should be exported as \"unformatted\". Supported by Android XML and other formats. | [optional]
|
18
18
|
**default_translation_content** | **String** | Creates a translation in the default locale with the specified content | [optional]
|
19
|
+
**autotranslate** | **Boolean** | Indicates whether the key should be autotranslated to other locales based on the copy provided in `default_translation_content`. | [optional]
|
19
20
|
**xml_space_preserve** | **Boolean** | Indicates whether the key should be exported with \"xml:space=preserve\". Supported by several XML-based formats. | [optional]
|
20
21
|
**original_file** | **String** | Original file attribute. Used in some formats, e.g. XLIFF. | [optional]
|
21
22
|
**localized_format_string** | **String** | NSStringLocalizedFormatKey attribute. Used in .stringsdict format. | [optional]
|
@@ -35,10 +36,11 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
|
|
35
36
|
data_type: number,
|
36
37
|
tags: awesome-feature,needs-proofreading,
|
37
38
|
max_characters_allowed: 140,
|
38
|
-
screenshot: [B@
|
39
|
+
screenshot: [B@38b65eb9,
|
39
40
|
remove_screenshot: null,
|
40
41
|
unformatted: null,
|
41
42
|
default_translation_content: Default translation content,
|
43
|
+
autotranslate: null,
|
42
44
|
xml_space_preserve: null,
|
43
45
|
original_file: null,
|
44
46
|
localized_format_string: null,
|
data/docs/KeyUpdateParameters.md
CHANGED
@@ -34,7 +34,7 @@ instance = Phrase::KeyUpdateParameters.new(branch: my-feature-branch,
|
|
34
34
|
data_type: number,
|
35
35
|
tags: awesome-feature,needs-proofreading,
|
36
36
|
max_characters_allowed: 140,
|
37
|
-
screenshot: [B@
|
37
|
+
screenshot: [B@3c32105c,
|
38
38
|
remove_screenshot: null,
|
39
39
|
unformatted: null,
|
40
40
|
xml_space_preserve: null,
|
@@ -37,7 +37,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
|
|
37
37
|
main_format: yml,
|
38
38
|
media: Python,
|
39
39
|
shares_translation_memory: true,
|
40
|
-
project_image: [B@
|
40
|
+
project_image: [B@2bd89b8e,
|
41
41
|
remove_project_image: null,
|
42
42
|
account_id: abcd1234,
|
43
43
|
point_of_contact: abcd1234,
|
@@ -38,7 +38,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
|
|
38
38
|
main_format: yml,
|
39
39
|
media: Python,
|
40
40
|
shares_translation_memory: true,
|
41
|
-
project_image: [B@
|
41
|
+
project_image: [B@4c49193a,
|
42
42
|
remove_project_image: false,
|
43
43
|
workflow: review,
|
44
44
|
machine_translation_enabled: true,
|
data/docs/UploadsApi.md
CHANGED
@@ -52,7 +52,7 @@ opts = {
|
|
52
52
|
skip_unverification: true, # Boolean | Indicates whether the upload should unverify updated translations.
|
53
53
|
file_encoding: 'file_encoding_example', # String | Enforces a specific encoding on the file contents. Valid options are \\\"UTF-8\\\", \\\"UTF-16\\\" and \\\"ISO-8859-1\\\".
|
54
54
|
locale_mapping: { ... }, # Object | Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
|
55
|
-
format_options: { ... }, # Object | Additional options available for specific formats. See our format guide for complete list.
|
55
|
+
format_options: { ... }, # Object | Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings).
|
56
56
|
autotranslate: true, # Boolean | If set, translations for the uploaded language will be fetched automatically.
|
57
57
|
mark_reviewed: true, # Boolean | Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
|
58
58
|
tag_only_affected_keys: true, # Boolean | Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`
|
@@ -89,7 +89,7 @@ Name | Type | Description | Notes
|
|
89
89
|
**skip_unverification** | **Boolean**| Indicates whether the upload should unverify updated translations. | [optional]
|
90
90
|
**file_encoding** | **String**| Enforces a specific encoding on the file contents. Valid options are \\\"UTF-8\\\", \\\"UTF-16\\\" and \\\"ISO-8859-1\\\". | [optional]
|
91
91
|
**locale_mapping** | [**Object**](Object.md)| Mapping between locale names and translation columns. Required in some formats like CSV or XLSX. | [optional]
|
92
|
-
**format_options** | [**Object**](Object.md)| Additional options available for specific formats. See our format guide for complete list. | [optional]
|
92
|
+
**format_options** | [**Object**](Object.md)| Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings). | [optional]
|
93
93
|
**autotranslate** | **Boolean**| If set, translations for the uploaded language will be fetched automatically. | [optional]
|
94
94
|
**mark_reviewed** | **Boolean**| Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project. | [optional]
|
95
95
|
**tag_only_affected_keys** | **Boolean**| Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false` | [optional] [default to false]
|
@@ -116,13 +116,12 @@ module Phrase
|
|
116
116
|
# @param project_id [String] Project ID
|
117
117
|
# @param key_id [String] Translation Key ID
|
118
118
|
# @param comment_id [String] Comment ID
|
119
|
+
# @param comment_create_parameters1 [CommentCreateParameters1]
|
119
120
|
# @param [Hash] opts the optional parameters
|
120
121
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
121
|
-
# @option opts [String] :branch specify the branch to use
|
122
|
-
# @option opts [String] :message specify the message for the comment
|
123
122
|
# @return [Comment]
|
124
|
-
def reply_create(project_id, key_id, comment_id, opts = {})
|
125
|
-
data, _status_code, _headers = reply_create_with_http_info(project_id, key_id, comment_id, opts)
|
123
|
+
def reply_create(project_id, key_id, comment_id, comment_create_parameters1, opts = {})
|
124
|
+
data, _status_code, _headers = reply_create_with_http_info(project_id, key_id, comment_id, comment_create_parameters1, opts)
|
126
125
|
data
|
127
126
|
end
|
128
127
|
|
@@ -131,12 +130,11 @@ module Phrase
|
|
131
130
|
# @param project_id [String] Project ID
|
132
131
|
# @param key_id [String] Translation Key ID
|
133
132
|
# @param comment_id [String] Comment ID
|
133
|
+
# @param comment_create_parameters1 [CommentCreateParameters1]
|
134
134
|
# @param [Hash] opts the optional parameters
|
135
135
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
136
|
-
# @option opts [String] :branch specify the branch to use
|
137
|
-
# @option opts [String] :message specify the message for the comment
|
138
136
|
# @return [Array<(Response<(Comment)>, Integer, Hash)>] Response<(Comment)> data, response status code and response headers
|
139
|
-
def reply_create_with_http_info(project_id, key_id, comment_id, opts = {})
|
137
|
+
def reply_create_with_http_info(project_id, key_id, comment_id, comment_create_parameters1, opts = {})
|
140
138
|
if @api_client.config.debugging
|
141
139
|
@api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_create ...'
|
142
140
|
end
|
@@ -152,25 +150,29 @@ module Phrase
|
|
152
150
|
if @api_client.config.client_side_validation && comment_id.nil?
|
153
151
|
fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_create"
|
154
152
|
end
|
153
|
+
# verify the required parameter 'comment_create_parameters1' is set
|
154
|
+
if @api_client.config.client_side_validation && comment_create_parameters1.nil?
|
155
|
+
fail ArgumentError, "Missing the required parameter 'comment_create_parameters1' when calling CommentRepliesApi.reply_create"
|
156
|
+
end
|
155
157
|
# resource path
|
156
158
|
local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s))
|
157
159
|
|
158
160
|
# query parameters
|
159
161
|
query_params = opts[:query_params] || {}
|
160
|
-
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
161
|
-
query_params[:'message'] = opts[:'message'] if !opts[:'message'].nil?
|
162
162
|
|
163
163
|
# header parameters
|
164
164
|
header_params = opts[:header_params] || {}
|
165
165
|
# HTTP header 'Accept' (if needed)
|
166
166
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
167
|
+
# HTTP header 'Content-Type'
|
168
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
167
169
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
168
170
|
|
169
171
|
# form parameters
|
170
172
|
form_params = opts[:form_params] || {}
|
171
173
|
|
172
174
|
# http body (model)
|
173
|
-
post_body = opts[:body]
|
175
|
+
post_body = opts[:body] || @api_client.object_to_http_body(comment_create_parameters1)
|
174
176
|
|
175
177
|
# return_type
|
176
178
|
return_type = opts[:return_type] || 'Comment'
|
@@ -14,8 +14,6 @@ module Phrase
|
|
14
14
|
# @param comment_create_parameters [CommentCreateParameters]
|
15
15
|
# @param [Hash] opts the optional parameters
|
16
16
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
17
|
-
# @option opts [String] :message specify the message for the comment
|
18
|
-
# @option opts [Array<String>] :locale_ids specify the locales for the comment
|
19
17
|
# @return [Comment]
|
20
18
|
def comment_create(project_id, key_id, comment_create_parameters, opts = {})
|
21
19
|
data, _status_code, _headers = comment_create_with_http_info(project_id, key_id, comment_create_parameters, opts)
|
@@ -29,8 +27,6 @@ module Phrase
|
|
29
27
|
# @param comment_create_parameters [CommentCreateParameters]
|
30
28
|
# @param [Hash] opts the optional parameters
|
31
29
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
32
|
-
# @option opts [String] :message specify the message for the comment
|
33
|
-
# @option opts [Array<String>] :locale_ids specify the locales for the comment
|
34
30
|
# @return [Array<(Response<(Comment)>, Integer, Hash)>] Response<(Comment)> data, response status code and response headers
|
35
31
|
def comment_create_with_http_info(project_id, key_id, comment_create_parameters, opts = {})
|
36
32
|
if @api_client.config.debugging
|
@@ -53,8 +49,6 @@ module Phrase
|
|
53
49
|
|
54
50
|
# query parameters
|
55
51
|
query_params = opts[:query_params] || {}
|
56
|
-
query_params[:'message'] = opts[:'message'] if !opts[:'message'].nil?
|
57
|
-
query_params[:'locale_ids'] = @api_client.build_collection_param(opts[:'locale_ids'], :multi) if !opts[:'locale_ids'].nil?
|
58
52
|
|
59
53
|
# header parameters
|
60
54
|
header_params = opts[:header_params] || {}
|
@@ -26,7 +26,7 @@ module Phrase
|
|
26
26
|
# @option opts [Boolean] :skip_unverification Indicates whether the upload should unverify updated translations.
|
27
27
|
# @option opts [String] :file_encoding Enforces a specific encoding on the file contents. Valid options are \\\"UTF-8\\\", \\\"UTF-16\\\" and \\\"ISO-8859-1\\\".
|
28
28
|
# @option opts [Object] :locale_mapping Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
|
29
|
-
# @option opts [Object] :format_options Additional options available for specific formats. See our format guide for complete list.
|
29
|
+
# @option opts [Object] :format_options Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings).
|
30
30
|
# @option opts [Boolean] :autotranslate If set, translations for the uploaded language will be fetched automatically.
|
31
31
|
# @option opts [Boolean] :mark_reviewed Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
|
32
32
|
# @option opts [Boolean] :tag_only_affected_keys Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false` (default to false)
|
@@ -56,7 +56,7 @@ module Phrase
|
|
56
56
|
# @option opts [Boolean] :skip_unverification Indicates whether the upload should unverify updated translations.
|
57
57
|
# @option opts [String] :file_encoding Enforces a specific encoding on the file contents. Valid options are \\\"UTF-8\\\", \\\"UTF-16\\\" and \\\"ISO-8859-1\\\".
|
58
58
|
# @option opts [Object] :locale_mapping Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
|
59
|
-
# @option opts [Object] :format_options Additional options available for specific formats. See our format guide for complete list.
|
59
|
+
# @option opts [Object] :format_options Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings).
|
60
60
|
# @option opts [Boolean] :autotranslate If set, translations for the uploaded language will be fetched automatically.
|
61
61
|
# @option opts [Boolean] :mark_reviewed Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
|
62
62
|
# @option opts [Boolean] :tag_only_affected_keys Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`
|
@@ -2,25 +2,30 @@ require 'date'
|
|
2
2
|
|
3
3
|
module Phrase
|
4
4
|
class CommentCreateParameters
|
5
|
+
# Comment message
|
6
|
+
attr_accessor :message
|
7
|
+
|
5
8
|
# specify the branch to use
|
6
9
|
attr_accessor :branch
|
7
10
|
|
8
|
-
#
|
9
|
-
attr_accessor :
|
11
|
+
# specify the locales for the comment
|
12
|
+
attr_accessor :locale_ids
|
10
13
|
|
11
14
|
# Attribute mapping from ruby-style variable name to JSON key.
|
12
15
|
def self.attribute_map
|
13
16
|
{
|
17
|
+
:'message' => :'message',
|
14
18
|
:'branch' => :'branch',
|
15
|
-
:'
|
19
|
+
:'locale_ids' => :'locale_ids'
|
16
20
|
}
|
17
21
|
end
|
18
22
|
|
19
23
|
# Attribute type mapping.
|
20
24
|
def self.openapi_types
|
21
25
|
{
|
26
|
+
:'message' => :'String',
|
22
27
|
:'branch' => :'String',
|
23
|
-
:'
|
28
|
+
:'locale_ids' => :'Array<String>'
|
24
29
|
}
|
25
30
|
end
|
26
31
|
|
@@ -45,12 +50,18 @@ module Phrase
|
|
45
50
|
h[k.to_sym] = v
|
46
51
|
}
|
47
52
|
|
53
|
+
if attributes.key?(:'message')
|
54
|
+
self.message = attributes[:'message']
|
55
|
+
end
|
56
|
+
|
48
57
|
if attributes.key?(:'branch')
|
49
58
|
self.branch = attributes[:'branch']
|
50
59
|
end
|
51
60
|
|
52
|
-
if attributes.key?(:'
|
53
|
-
|
61
|
+
if attributes.key?(:'locale_ids')
|
62
|
+
if (value = attributes[:'locale_ids']).is_a?(Array)
|
63
|
+
self.locale_ids = value
|
64
|
+
end
|
54
65
|
end
|
55
66
|
end
|
56
67
|
|
@@ -58,12 +69,17 @@ module Phrase
|
|
58
69
|
# @return Array for valid properties with the reasons
|
59
70
|
def list_invalid_properties
|
60
71
|
invalid_properties = Array.new
|
72
|
+
if @message.nil?
|
73
|
+
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
74
|
+
end
|
75
|
+
|
61
76
|
invalid_properties
|
62
77
|
end
|
63
78
|
|
64
79
|
# Check to see if the all the properties in the model are valid
|
65
80
|
# @return true if the model is valid
|
66
81
|
def valid?
|
82
|
+
return false if @message.nil?
|
67
83
|
true
|
68
84
|
end
|
69
85
|
|
@@ -72,8 +88,9 @@ module Phrase
|
|
72
88
|
def ==(o)
|
73
89
|
return true if self.equal?(o)
|
74
90
|
self.class == o.class &&
|
91
|
+
message == o.message &&
|
75
92
|
branch == o.branch &&
|
76
|
-
|
93
|
+
locale_ids == o.locale_ids
|
77
94
|
end
|
78
95
|
|
79
96
|
# @see the `==` method
|
@@ -85,7 +102,7 @@ module Phrase
|
|
85
102
|
# Calculates hash code according to all attributes.
|
86
103
|
# @return [Integer] Hash code
|
87
104
|
def hash
|
88
|
-
[branch,
|
105
|
+
[message, branch, locale_ids].hash
|
89
106
|
end
|
90
107
|
|
91
108
|
# Builds the object from hash
|