phrase 2.26.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/README.md +5 -5
  4. data/docs/AuthorizationCreateParameters.md +1 -1
  5. data/docs/AuthorizationsApi.md +1 -1
  6. data/docs/BlacklistedKeyCreateParameters.md +1 -1
  7. data/docs/BlacklistedKeysApi.md +1 -1
  8. data/docs/BranchCreateParameters.md +1 -1
  9. data/docs/BranchesApi.md +1 -1
  10. data/docs/DistributionCreateParameters.md +2 -2
  11. data/docs/DistributionsApi.md +1 -1
  12. data/docs/FigmaAttachmentCreateParameters.md +1 -1
  13. data/docs/FigmaAttachmentsApi.md +1 -1
  14. data/docs/GlossariesApi.md +1 -1
  15. data/docs/GlossaryCreateParameters.md +1 -1
  16. data/docs/GlossaryTermCreateParameters.md +1 -1
  17. data/docs/GlossaryTermTranslationCreateParameters.md +2 -2
  18. data/docs/GlossaryTermTranslationsApi.md +1 -1
  19. data/docs/GlossaryTermsApi.md +1 -1
  20. data/docs/ICUApi.md +4 -4
  21. data/docs/InvitationCreateParameters.md +2 -2
  22. data/docs/InvitationsApi.md +1 -1
  23. data/docs/JobCreateParameters.md +1 -1
  24. data/docs/JobsApi.md +1 -1
  25. data/docs/KeyCreateParameters.md +2 -2
  26. data/docs/KeyLink.md +7 -7
  27. data/docs/KeyLinksBatchDestroyParameters.md +3 -1
  28. data/docs/KeyUpdateParameters.md +1 -1
  29. data/docs/KeysApi.md +1 -1
  30. data/docs/LinkedKeysApi.md +4 -6
  31. data/docs/LocaleCreateParameters.md +3 -3
  32. data/docs/LocaleUpdateParameters.md +1 -1
  33. data/docs/LocalesApi.md +3 -3
  34. data/docs/OrderCreateParameters.md +4 -4
  35. data/docs/OrdersApi.md +1 -1
  36. data/docs/ProjectCreateParameters.md +2 -2
  37. data/docs/ProjectUpdateParameters.md +1 -1
  38. data/docs/ProjectsApi.md +1 -1
  39. data/docs/ScreenshotMarkerCreateParameters.md +1 -1
  40. data/docs/ScreenshotMarkersApi.md +1 -1
  41. data/docs/ScreenshotUpdateParameters.md +1 -1
  42. data/docs/SpaceCreateParameters.md +1 -1
  43. data/docs/SpacesApi.md +2 -2
  44. data/docs/SpacesProjectsCreateParameters.md +1 -1
  45. data/docs/StyleGuidesApi.md +1 -1
  46. data/docs/StyleguideCreateParameters.md +1 -1
  47. data/docs/TagCreateParameters.md +1 -1
  48. data/docs/TagsApi.md +1 -1
  49. data/docs/TeamCreateParameters.md +1 -1
  50. data/docs/TeamsApi.md +4 -4
  51. data/docs/TeamsProjectsCreateParameters.md +1 -1
  52. data/docs/TeamsSpacesCreateParameters.md +1 -1
  53. data/docs/TeamsUsersCreateParameters.md +1 -1
  54. data/docs/TranslationCreateParameters.md +1 -1
  55. data/docs/UploadsApi.md +10 -10
  56. data/docs/VariableCreateParameters.md +1 -1
  57. data/docs/VariablesApi.md +1 -1
  58. data/docs/WebhookCreateParameters.md +1 -1
  59. data/docs/WebhooksApi.md +1 -1
  60. data/lib/phrase/api/icu_api.rb +4 -4
  61. data/lib/phrase/api/linked_keys_api.rb +2 -5
  62. data/lib/phrase/api/locales_api.rb +2 -2
  63. data/lib/phrase/api/uploads_api.rb +26 -14
  64. data/lib/phrase/models/authorization_create_parameters.rb +5 -0
  65. data/lib/phrase/models/blacklisted_key_create_parameters.rb +5 -0
  66. data/lib/phrase/models/branch_create_parameters.rb +5 -0
  67. data/lib/phrase/models/distribution_create_parameters.rb +10 -0
  68. data/lib/phrase/models/figma_attachment_create_parameters.rb +5 -0
  69. data/lib/phrase/models/glossary_create_parameters.rb +5 -0
  70. data/lib/phrase/models/glossary_term_create_parameters.rb +5 -0
  71. data/lib/phrase/models/glossary_term_translation_create_parameters.rb +10 -0
  72. data/lib/phrase/models/invitation_create_parameters.rb +10 -0
  73. data/lib/phrase/models/job_create_parameters.rb +5 -0
  74. data/lib/phrase/models/key_create_parameters.rb +5 -0
  75. data/lib/phrase/models/key_link.rb +0 -35
  76. data/lib/phrase/models/key_links_batch_destroy_parameters.rb +16 -4
  77. data/lib/phrase/models/locale_create_parameters.rb +11 -1
  78. data/lib/phrase/models/locale_update_parameters.rb +1 -1
  79. data/lib/phrase/models/order_create_parameters.rb +12 -2
  80. data/lib/phrase/models/project_create_parameters.rb +5 -0
  81. data/lib/phrase/models/screenshot_marker_create_parameters.rb +5 -0
  82. data/lib/phrase/models/space_create_parameters.rb +5 -0
  83. data/lib/phrase/models/spaces_projects_create_parameters.rb +5 -0
  84. data/lib/phrase/models/styleguide_create_parameters.rb +5 -0
  85. data/lib/phrase/models/tag_create_parameters.rb +5 -0
  86. data/lib/phrase/models/team_create_parameters.rb +5 -0
  87. data/lib/phrase/models/teams_projects_create_parameters.rb +5 -0
  88. data/lib/phrase/models/teams_spaces_create_parameters.rb +5 -0
  89. data/lib/phrase/models/teams_users_create_parameters.rb +5 -0
  90. data/lib/phrase/models/translation_create_parameters.rb +1 -1
  91. data/lib/phrase/models/variable_create_parameters.rb +5 -0
  92. data/lib/phrase/models/webhook_create_parameters.rb +5 -0
  93. data/lib/phrase/version.rb +1 -1
  94. data/spec/api/icu_api_spec.rb +2 -2
  95. data/spec/api/linked_keys_api_spec.rb +1 -2
  96. data/spec/api/locales_api_spec.rb +1 -1
  97. data/spec/api/uploads_api_spec.rb +2 -2
  98. data/spec/models/key_links_batch_destroy_parameters_spec.rb +6 -0
  99. metadata +2 -2
data/docs/SpacesApi.md CHANGED
@@ -41,7 +41,7 @@ end
41
41
 
42
42
  api_instance = Phrase::SpacesApi.new
43
43
  account_id = 'account_id_example' # String | Account ID
44
- space_create_parameters = Phrase::SpaceCreateParameters.new # SpaceCreateParameters |
44
+ space_create_parameters = Phrase::SpaceCreateParameters.new({name: 'My Android Projects'}) # SpaceCreateParameters |
45
45
  opts = {
46
46
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
47
47
  }
@@ -360,7 +360,7 @@ end
360
360
  api_instance = Phrase::SpacesApi.new
361
361
  account_id = 'account_id_example' # String | Account ID
362
362
  space_id = 'space_id_example' # String | Space ID
363
- spaces_projects_create_parameters = Phrase::SpacesProjectsCreateParameters.new # SpacesProjectsCreateParameters |
363
+ spaces_projects_create_parameters = Phrase::SpacesProjectsCreateParameters.new({id: 'a4b3c2d1'}) # SpacesProjectsCreateParameters |
364
364
  opts = {
365
365
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
366
366
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **id** | **String** | Project ID to add or to the Space | [optional]
7
+ **id** | **String** | Project ID to add or to the Space |
8
8
 
9
9
  ## Code Sample
10
10
 
@@ -38,7 +38,7 @@ end
38
38
 
39
39
  api_instance = Phrase::StyleGuidesApi.new
40
40
  project_id = 'project_id_example' # String | Project ID
41
- styleguide_create_parameters = Phrase::StyleguideCreateParameters.new # StyleguideCreateParameters |
41
+ styleguide_create_parameters = Phrase::StyleguideCreateParameters.new({title: 'Web application style guide'}) # StyleguideCreateParameters |
42
42
  opts = {
43
43
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
44
44
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **title** | **String** | Style guide title | [optional]
7
+ **title** | **String** | Style guide title |
8
8
  **audience** | **String** | Audience description | [optional]
9
9
  **target_audience** | **String** | Can be one of: not_specified, children, teenager, young_adults, adults, old_adults. | [optional]
10
10
  **grammatical_person** | **String** | Can be one of: not_specified, first_person_singular, second_person_singular, third_person_singular_masculine, third_person_singular_feminine, third_person_singular_neuter, first_person_plural, second_person_plural, third_person_plural. | [optional]
@@ -5,7 +5,7 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **branch** | **String** | specify the branch to use | [optional]
8
- **name** | **String** | Name of the tag | [optional]
8
+ **name** | **String** | Name of the tag |
9
9
 
10
10
  ## Code Sample
11
11
 
data/docs/TagsApi.md CHANGED
@@ -37,7 +37,7 @@ end
37
37
 
38
38
  api_instance = Phrase::TagsApi.new
39
39
  project_id = 'project_id_example' # String | Project ID
40
- tag_create_parameters = Phrase::TagCreateParameters.new # TagCreateParameters |
40
+ tag_create_parameters = Phrase::TagCreateParameters.new({name: 'my-feature'}) # TagCreateParameters |
41
41
  opts = {
42
42
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
43
43
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **name** | **String** | Name of the team | [optional]
7
+ **name** | **String** | Name of the team |
8
8
 
9
9
  ## Code Sample
10
10
 
data/docs/TeamsApi.md CHANGED
@@ -44,7 +44,7 @@ end
44
44
 
45
45
  api_instance = Phrase::TeamsApi.new
46
46
  account_id = 'account_id_example' # String | Account ID
47
- team_create_parameters = Phrase::TeamCreateParameters.new # TeamCreateParameters |
47
+ team_create_parameters = Phrase::TeamCreateParameters.new({name: 'German Translators'}) # TeamCreateParameters |
48
48
  opts = {
49
49
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
50
50
  }
@@ -363,7 +363,7 @@ end
363
363
  api_instance = Phrase::TeamsApi.new
364
364
  account_id = 'account_id_example' # String | Account ID
365
365
  team_id = 'team_id_example' # String | Team ID
366
- teams_projects_create_parameters = Phrase::TeamsProjectsCreateParameters.new # TeamsProjectsCreateParameters |
366
+ teams_projects_create_parameters = Phrase::TeamsProjectsCreateParameters.new({id: 'a4b3c2d1'}) # TeamsProjectsCreateParameters |
367
367
  opts = {
368
368
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
369
369
  }
@@ -491,7 +491,7 @@ end
491
491
  api_instance = Phrase::TeamsApi.new
492
492
  account_id = 'account_id_example' # String | Account ID
493
493
  team_id = 'team_id_example' # String | Team ID
494
- teams_spaces_create_parameters = Phrase::TeamsSpacesCreateParameters.new # TeamsSpacesCreateParameters |
494
+ teams_spaces_create_parameters = Phrase::TeamsSpacesCreateParameters.new({id: 'a4b3c2d1'}) # TeamsSpacesCreateParameters |
495
495
  opts = {
496
496
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
497
497
  }
@@ -619,7 +619,7 @@ end
619
619
  api_instance = Phrase::TeamsApi.new
620
620
  account_id = 'account_id_example' # String | Account ID
621
621
  team_id = 'team_id_example' # String | Team ID
622
- teams_users_create_parameters = Phrase::TeamsUsersCreateParameters.new # TeamsUsersCreateParameters |
622
+ teams_users_create_parameters = Phrase::TeamsUsersCreateParameters.new({id: 'a4b3c2d1'}) # TeamsUsersCreateParameters |
623
623
  opts = {
624
624
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
625
625
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **id** | **String** | Project ID to add to the Team | [optional]
7
+ **id** | **String** | Project ID to add to the Team |
8
8
 
9
9
  ## Code Sample
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **id** | **String** | Space ID to add to the Team | [optional]
7
+ **id** | **String** | Space ID to add to the Team |
8
8
 
9
9
  ## Code Sample
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **id** | **String** | User ID to add to the Team | [optional]
7
+ **id** | **String** | User ID to add to the Team |
8
8
 
9
9
  ## Code Sample
10
10
 
@@ -5,7 +5,7 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **branch** | **String** | specify the branch to use | [optional]
8
- **locale_id** | **String** | Locale. Can be the name or public id of the locale. Preferred is the public id. | [optional]
8
+ **locale_id** | **String** | Locale. Can be the name or id of the locale. Preferred is id | [optional]
9
9
  **key_id** | **String** | Key | [optional]
10
10
  **content** | **String** | Translation content | [optional]
11
11
  **plural_suffix** | **String** | Plural suffix. Can be one of: zero, one, two, few, many, other. Must be specified if the key associated to the translation is pluralized. | [optional]
data/docs/UploadsApi.md CHANGED
@@ -12,7 +12,7 @@ Method | HTTP request | Description
12
12
 
13
13
  ## upload_create
14
14
 
15
- > Upload upload_create(project_id, opts)
15
+ > Upload upload_create(project_id, file, file_format, locale_id, opts)
16
16
 
17
17
  Upload a new file
18
18
 
@@ -36,12 +36,12 @@ end
36
36
 
37
37
  api_instance = Phrase::UploadsApi.new
38
38
  project_id = 'project_id_example' # String | Project ID
39
+ file = File.new('/path/to/some/file') # File | File to be imported
40
+ file_format = 'file_format_example' # String | File format. Auto-detected when possible and not specified.
41
+ locale_id = 'locale_id_example' # String | Locale of the file's content. Can be the name or id of the locale. Preferred is id.
39
42
  opts = {
40
43
  x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
41
44
  branch: 'branch_example', # String | specify the branch to use
42
- file: File.new('/path/to/some/file'), # File | File to be imported
43
- file_format: 'file_format_example', # String | File format. Auto-detected when possible and not specified.
44
- locale_id: 'locale_id_example', # String | Locale of the file's content. Can be the name or public id of the locale. Preferred is the public id.
45
45
  tags: 'tags_example', # String | List of tags separated by comma to be associated with the new keys contained in the upload.
46
46
  update_translations: true, # Boolean | Indicates whether existing translations should be updated with the file content.
47
47
  update_descriptions: true, # Boolean | Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
@@ -49,7 +49,7 @@ opts = {
49
49
  skip_upload_tags: true, # Boolean | Indicates whether the upload should not create upload tags.
50
50
  skip_unverification: true, # Boolean | Indicates whether the upload should unverify updated translations.
51
51
  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\\\".
52
- locale_mapping: { ... }, # Object | Optional, format specific mapping between locale names and the columns the translations to those locales are contained in.
52
+ locale_mapping: { ... }, # Object | Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
53
53
  format_options: { ... }, # Object | Additional options available for specific formats. See our format guide for complete list.
54
54
  autotranslate: true, # Boolean | If set, translations for the uploaded language will be fetched automatically.
55
55
  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,7 +58,7 @@ opts = {
58
58
 
59
59
  begin
60
60
  #Upload a new file
61
- result = api_instance.upload_create(project_id, opts)
61
+ result = api_instance.upload_create(project_id, file, file_format, locale_id, opts)
62
62
  pp result
63
63
  rescue Phrase::ApiError => e
64
64
  puts "Exception when calling UploadsApi->upload_create: #{e}"
@@ -71,11 +71,11 @@ end
71
71
  Name | Type | Description | Notes
72
72
  ------------- | ------------- | ------------- | -------------
73
73
  **project_id** | **String**| Project ID |
74
+ **file** | **File**| File to be imported |
75
+ **file_format** | **String**| File format. Auto-detected when possible and not specified. |
76
+ **locale_id** | **String**| Locale of the file's content. Can be the name or id of the locale. Preferred is id. |
74
77
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
75
78
  **branch** | **String**| specify the branch to use | [optional]
76
- **file** | **File**| File to be imported | [optional]
77
- **file_format** | **String**| File format. Auto-detected when possible and not specified. | [optional]
78
- **locale_id** | **String**| Locale of the file's content. Can be the name or public id of the locale. Preferred is the public id. | [optional]
79
79
  **tags** | **String**| List of tags separated by comma to be associated with the new keys contained in the upload. | [optional]
80
80
  **update_translations** | **Boolean**| Indicates whether existing translations should be updated with the file content. | [optional]
81
81
  **update_descriptions** | **Boolean**| Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions. | [optional]
@@ -83,7 +83,7 @@ Name | Type | Description | Notes
83
83
  **skip_upload_tags** | **Boolean**| Indicates whether the upload should not create upload tags. | [optional]
84
84
  **skip_unverification** | **Boolean**| Indicates whether the upload should unverify updated translations. | [optional]
85
85
  **file_encoding** | **String**| Enforces a specific encoding on the file contents. Valid options are \\\"UTF-8\\\", \\\"UTF-16\\\" and \\\"ISO-8859-1\\\". | [optional]
86
- **locale_mapping** | [**Object**](Object.md)| Optional, format specific mapping between locale names and the columns the translations to those locales are contained in. | [optional]
86
+ **locale_mapping** | [**Object**](Object.md)| Mapping between locale names and translation columns. Required in some formats like CSV or XLSX. | [optional]
87
87
  **format_options** | [**Object**](Object.md)| Additional options available for specific formats. See our format guide for complete list. | [optional]
88
88
  **autotranslate** | **Boolean**| If set, translations for the uploaded language will be fetched automatically. | [optional]
89
89
  **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]
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **name** | **String** | Name of the variable | [optional]
7
+ **name** | **String** | Name of the variable |
8
8
  **value** | **String** | Value of the variable | [optional]
9
9
 
10
10
  ## Code Sample
data/docs/VariablesApi.md CHANGED
@@ -38,7 +38,7 @@ end
38
38
 
39
39
  api_instance = Phrase::VariablesApi.new
40
40
  project_id = 'project_id_example' # String | Project ID
41
- variable_create_parameters = Phrase::VariableCreateParameters.new # VariableCreateParameters |
41
+ variable_create_parameters = Phrase::VariableCreateParameters.new({name: 'MY_VARIABLE'}) # VariableCreateParameters |
42
42
  opts = {
43
43
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
44
44
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **callback_url** | **String** | Callback URL to send requests to | [optional]
7
+ **callback_url** | **String** | Callback URL to send requests to |
8
8
  **secret** | **String** | Webhook secret used to calculate signature. If empty, the default project secret will be used. | [optional]
9
9
  **description** | **String** | Webhook description | [optional]
10
10
  **events** | **String** | List of event names to trigger the webhook (separated by comma) | [optional]
data/docs/WebhooksApi.md CHANGED
@@ -39,7 +39,7 @@ end
39
39
 
40
40
  api_instance = Phrase::WebhooksApi.new
41
41
  project_id = 'project_id_example' # String | Project ID
42
- webhook_create_parameters = Phrase::WebhookCreateParameters.new # WebhookCreateParameters |
42
+ webhook_create_parameters = Phrase::WebhookCreateParameters.new({callback_url: 'http://example.com/hooks/phraseapp-notifications'}) # WebhookCreateParameters |
43
43
  opts = {
44
44
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
45
45
  }
@@ -7,8 +7,8 @@ module Phrase
7
7
  def initialize(api_client = ApiClient.default)
8
8
  @api_client = api_client
9
9
  end
10
- # Build icu skeletons
11
- # Returns icu skeletons for multiple locale codes based on a source content.
10
+ # Build ICU skeletons
11
+ # Returns ICU skeletons for multiple locale codes based on a source content.
12
12
  # @param icu_skeleton_parameters [IcuSkeletonParameters]
13
13
  # @param [Hash] opts the optional parameters
14
14
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
@@ -18,8 +18,8 @@ module Phrase
18
18
  data
19
19
  end
20
20
 
21
- # Build icu skeletons
22
- # Returns icu skeletons for multiple locale codes based on a source content.
21
+ # Build ICU skeletons
22
+ # Returns ICU skeletons for multiple locale codes based on a source content.
23
23
  # @param icu_skeleton_parameters [IcuSkeletonParameters]
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
@@ -14,7 +14,6 @@ module Phrase
14
14
  # @param key_links_batch_destroy_parameters [KeyLinksBatchDestroyParameters]
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 [Boolean] :unlink_parent Whether to unlink the parent key as well and unmark it as linked-key.
18
17
  # @return [nil]
19
18
  def key_links_batch_destroy(project_id, id, key_links_batch_destroy_parameters, opts = {})
20
19
  data, _status_code, _headers = key_links_batch_destroy_with_http_info(project_id, id, key_links_batch_destroy_parameters, opts)
@@ -28,7 +27,6 @@ module Phrase
28
27
  # @param key_links_batch_destroy_parameters [KeyLinksBatchDestroyParameters]
29
28
  # @param [Hash] opts the optional parameters
30
29
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
31
- # @option opts [Boolean] :unlink_parent Whether to unlink the parent key as well and unmark it as linked-key.
32
30
  # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
33
31
  def key_links_batch_destroy_with_http_info(project_id, id, key_links_batch_destroy_parameters, opts = {})
34
32
  if @api_client.config.debugging
@@ -51,7 +49,6 @@ module Phrase
51
49
 
52
50
  # query parameters
53
51
  query_params = opts[:query_params] || {}
54
- query_params[:'unlink_parent'] = opts[:'unlink_parent'] if !opts[:'unlink_parent'].nil?
55
52
 
56
53
  # header parameters
57
54
  header_params = opts[:header_params] || {}
@@ -248,7 +245,7 @@ module Phrase
248
245
  return response, status_code, headers
249
246
  end
250
247
 
251
- # Retrieve all child keys linked to a specific parent key
248
+ # List child keys of a parent key
252
249
  # Returns detailed information about a parent key, including its linked child keys.
253
250
  # @param project_id [String] Project ID
254
251
  # @param id [String] Parent Translation Key ID
@@ -260,7 +257,7 @@ module Phrase
260
257
  data
261
258
  end
262
259
 
263
- # Retrieve all child keys linked to a specific parent key
260
+ # List child keys of a parent key
264
261
  # Returns detailed information about a parent key, including its linked child keys.
265
262
  # @param project_id [String] Project ID
266
263
  # @param id [String] Parent Translation Key ID
@@ -248,7 +248,7 @@ module Phrase
248
248
  # @option opts [Boolean] :skip_unverified_translations Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with &lt;code&gt;include_unverified_translations&lt;/code&gt;.
249
249
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
250
250
  # @option opts [Boolean] :use_last_reviewed_version If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
251
- # @option opts [String] :fallback_locale_id If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;.
251
+ # @option opts [String] :fallback_locale_id If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;.
252
252
  # @option opts [String] :source_locale_id Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a &lt;code&gt;tag&lt;/code&gt; parameter indicating a specific job.
253
253
  # @option opts [Object] :custom_metadata_filters Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
254
254
  # @return [File]
@@ -279,7 +279,7 @@ module Phrase
279
279
  # @option opts [Boolean] :skip_unverified_translations Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with &lt;code&gt;include_unverified_translations&lt;/code&gt;.
280
280
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
281
281
  # @option opts [Boolean] :use_last_reviewed_version If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
282
- # @option opts [String] :fallback_locale_id If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;.
282
+ # @option opts [String] :fallback_locale_id If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;.
283
283
  # @option opts [String] :source_locale_id Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a &lt;code&gt;tag&lt;/code&gt; parameter indicating a specific job.
284
284
  # @option opts [Object] :custom_metadata_filters Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
285
285
  # @return [Array<(Response<(File)>, Integer, Hash)>] Response<(File)> data, response status code and response headers
@@ -10,12 +10,12 @@ module Phrase
10
10
  # Upload a new file
11
11
  # Upload a new language file. Creates necessary resources in your project.
12
12
  # @param project_id [String] Project ID
13
+ # @param file [File] File to be imported
14
+ # @param file_format [String] File format. Auto-detected when possible and not specified.
15
+ # @param locale_id [String] Locale of the file&#39;s content. Can be the name or id of the locale. Preferred is id.
13
16
  # @param [Hash] opts the optional parameters
14
17
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
15
18
  # @option opts [String] :branch specify the branch to use
16
- # @option opts [File] :file File to be imported
17
- # @option opts [String] :file_format File format. Auto-detected when possible and not specified.
18
- # @option opts [String] :locale_id Locale of the file&#39;s content. Can be the name or public id of the locale. Preferred is the public id.
19
19
  # @option opts [String] :tags List of tags separated by comma to be associated with the new keys contained in the upload.
20
20
  # @option opts [Boolean] :update_translations Indicates whether existing translations should be updated with the file content.
21
21
  # @option opts [Boolean] :update_descriptions Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
@@ -23,26 +23,26 @@ module Phrase
23
23
  # @option opts [Boolean] :skip_upload_tags Indicates whether the upload should not create upload tags.
24
24
  # @option opts [Boolean] :skip_unverification Indicates whether the upload should unverify updated translations.
25
25
  # @option opts [String] :file_encoding Enforces a specific encoding on the file contents. Valid options are \\\&quot;UTF-8\\\&quot;, \\\&quot;UTF-16\\\&quot; and \\\&quot;ISO-8859-1\\\&quot;.
26
- # @option opts [Object] :locale_mapping Optional, format specific mapping between locale names and the columns the translations to those locales are contained in.
26
+ # @option opts [Object] :locale_mapping Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
27
27
  # @option opts [Object] :format_options Additional options available for specific formats. See our format guide for complete list.
28
28
  # @option opts [Boolean] :autotranslate If set, translations for the uploaded language will be fetched automatically.
29
29
  # @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.
30
30
  # @option opts [Boolean] :tag_only_affected_keys Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is &#x60;false&#x60; (default to false)
31
31
  # @return [Upload]
32
- def upload_create(project_id, opts = {})
33
- data, _status_code, _headers = upload_create_with_http_info(project_id, opts)
32
+ def upload_create(project_id, file, file_format, locale_id, opts = {})
33
+ data, _status_code, _headers = upload_create_with_http_info(project_id, file, file_format, locale_id, opts)
34
34
  data
35
35
  end
36
36
 
37
37
  # Upload a new file
38
38
  # Upload a new language file. Creates necessary resources in your project.
39
39
  # @param project_id [String] Project ID
40
+ # @param file [File] File to be imported
41
+ # @param file_format [String] File format. Auto-detected when possible and not specified.
42
+ # @param locale_id [String] Locale of the file&#39;s content. Can be the name or id of the locale. Preferred is id.
40
43
  # @param [Hash] opts the optional parameters
41
44
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
42
45
  # @option opts [String] :branch specify the branch to use
43
- # @option opts [File] :file File to be imported
44
- # @option opts [String] :file_format File format. Auto-detected when possible and not specified.
45
- # @option opts [String] :locale_id Locale of the file&#39;s content. Can be the name or public id of the locale. Preferred is the public id.
46
46
  # @option opts [String] :tags List of tags separated by comma to be associated with the new keys contained in the upload.
47
47
  # @option opts [Boolean] :update_translations Indicates whether existing translations should be updated with the file content.
48
48
  # @option opts [Boolean] :update_descriptions Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
@@ -50,13 +50,13 @@ module Phrase
50
50
  # @option opts [Boolean] :skip_upload_tags Indicates whether the upload should not create upload tags.
51
51
  # @option opts [Boolean] :skip_unverification Indicates whether the upload should unverify updated translations.
52
52
  # @option opts [String] :file_encoding Enforces a specific encoding on the file contents. Valid options are \\\&quot;UTF-8\\\&quot;, \\\&quot;UTF-16\\\&quot; and \\\&quot;ISO-8859-1\\\&quot;.
53
- # @option opts [Object] :locale_mapping Optional, format specific mapping between locale names and the columns the translations to those locales are contained in.
53
+ # @option opts [Object] :locale_mapping Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
54
54
  # @option opts [Object] :format_options Additional options available for specific formats. See our format guide for complete list.
55
55
  # @option opts [Boolean] :autotranslate If set, translations for the uploaded language will be fetched automatically.
56
56
  # @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.
57
57
  # @option opts [Boolean] :tag_only_affected_keys Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is &#x60;false&#x60;
58
58
  # @return [Array<(Response<(Upload)>, Integer, Hash)>] Response<(Upload)> data, response status code and response headers
59
- def upload_create_with_http_info(project_id, opts = {})
59
+ def upload_create_with_http_info(project_id, file, file_format, locale_id, opts = {})
60
60
  if @api_client.config.debugging
61
61
  @api_client.config.logger.debug 'Calling API: UploadsApi.upload_create ...'
62
62
  end
@@ -64,6 +64,18 @@ module Phrase
64
64
  if @api_client.config.client_side_validation && project_id.nil?
65
65
  fail ArgumentError, "Missing the required parameter 'project_id' when calling UploadsApi.upload_create"
66
66
  end
67
+ # verify the required parameter 'file' is set
68
+ if @api_client.config.client_side_validation && file.nil?
69
+ fail ArgumentError, "Missing the required parameter 'file' when calling UploadsApi.upload_create"
70
+ end
71
+ # verify the required parameter 'file_format' is set
72
+ if @api_client.config.client_side_validation && file_format.nil?
73
+ fail ArgumentError, "Missing the required parameter 'file_format' when calling UploadsApi.upload_create"
74
+ end
75
+ # verify the required parameter 'locale_id' is set
76
+ if @api_client.config.client_side_validation && locale_id.nil?
77
+ fail ArgumentError, "Missing the required parameter 'locale_id' when calling UploadsApi.upload_create"
78
+ end
67
79
  # resource path
68
80
  local_var_path = '/projects/{project_id}/uploads'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
69
81
 
@@ -80,10 +92,10 @@ module Phrase
80
92
 
81
93
  # form parameters
82
94
  form_params = opts[:form_params] || {}
95
+ form_params['file'] = file
96
+ form_params['file_format'] = file_format
97
+ form_params['locale_id'] = locale_id
83
98
  form_params['branch'] = opts[:'branch'] if !opts[:'branch'].nil?
84
- form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
85
- form_params['file_format'] = opts[:'file_format'] if !opts[:'file_format'].nil?
86
- form_params['locale_id'] = opts[:'locale_id'] if !opts[:'locale_id'].nil?
87
99
  form_params['tags'] = opts[:'tags'] if !opts[:'tags'].nil?
88
100
  form_params['update_translations'] = opts[:'update_translations'] if !opts[:'update_translations'].nil?
89
101
  form_params['update_descriptions'] = opts[:'update_descriptions'] if !opts[:'update_descriptions'].nil?
@@ -69,12 +69,17 @@ module Phrase
69
69
  # @return Array for valid properties with the reasons
70
70
  def list_invalid_properties
71
71
  invalid_properties = Array.new
72
+ if @note.nil?
73
+ invalid_properties.push('invalid value for "note", note cannot be nil.')
74
+ end
75
+
72
76
  invalid_properties
73
77
  end
74
78
 
75
79
  # Check to see if the all the properties in the model are valid
76
80
  # @return true if the model is valid
77
81
  def valid?
82
+ return false if @note.nil?
78
83
  true
79
84
  end
80
85
 
@@ -49,12 +49,17 @@ module Phrase
49
49
  # @return Array for valid properties with the reasons
50
50
  def list_invalid_properties
51
51
  invalid_properties = Array.new
52
+ if @name.nil?
53
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
54
+ end
55
+
52
56
  invalid_properties
53
57
  end
54
58
 
55
59
  # Check to see if the all the properties in the model are valid
56
60
  # @return true if the model is valid
57
61
  def valid?
62
+ return false if @name.nil?
58
63
  true
59
64
  end
60
65
 
@@ -49,12 +49,17 @@ module Phrase
49
49
  # @return Array for valid properties with the reasons
50
50
  def list_invalid_properties
51
51
  invalid_properties = Array.new
52
+ if @name.nil?
53
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
54
+ end
55
+
52
56
  invalid_properties
53
57
  end
54
58
 
55
59
  # Check to see if the all the properties in the model are valid
56
60
  # @return true if the model is valid
57
61
  def valid?
62
+ return false if @name.nil?
58
63
  true
59
64
  end
60
65
 
@@ -127,12 +127,22 @@ module Phrase
127
127
  # @return Array for valid properties with the reasons
128
128
  def list_invalid_properties
129
129
  invalid_properties = Array.new
130
+ if @name.nil?
131
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
132
+ end
133
+
134
+ if @project_id.nil?
135
+ invalid_properties.push('invalid value for "project_id", project_id cannot be nil.')
136
+ end
137
+
130
138
  invalid_properties
131
139
  end
132
140
 
133
141
  # Check to see if the all the properties in the model are valid
134
142
  # @return true if the model is valid
135
143
  def valid?
144
+ return false if @name.nil?
145
+ return false if @project_id.nil?
136
146
  true
137
147
  end
138
148
 
@@ -58,12 +58,17 @@ module Phrase
58
58
  # @return Array for valid properties with the reasons
59
59
  def list_invalid_properties
60
60
  invalid_properties = Array.new
61
+ if @url.nil?
62
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
63
+ end
64
+
61
65
  invalid_properties
62
66
  end
63
67
 
64
68
  # Check to see if the all the properties in the model are valid
65
69
  # @return true if the model is valid
66
70
  def valid?
71
+ return false if @url.nil?
67
72
  true
68
73
  end
69
74
 
@@ -69,12 +69,17 @@ module Phrase
69
69
  # @return Array for valid properties with the reasons
70
70
  def list_invalid_properties
71
71
  invalid_properties = Array.new
72
+ if @name.nil?
73
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
74
+ end
75
+
72
76
  invalid_properties
73
77
  end
74
78
 
75
79
  # Check to see if the all the properties in the model are valid
76
80
  # @return true if the model is valid
77
81
  def valid?
82
+ return false if @name.nil?
78
83
  true
79
84
  end
80
85
 
@@ -76,12 +76,17 @@ module Phrase
76
76
  # @return Array for valid properties with the reasons
77
77
  def list_invalid_properties
78
78
  invalid_properties = Array.new
79
+ if @term.nil?
80
+ invalid_properties.push('invalid value for "term", term cannot be nil.')
81
+ end
82
+
79
83
  invalid_properties
80
84
  end
81
85
 
82
86
  # Check to see if the all the properties in the model are valid
83
87
  # @return true if the model is valid
84
88
  def valid?
89
+ return false if @term.nil?
85
90
  true
86
91
  end
87
92
 
@@ -58,12 +58,22 @@ module Phrase
58
58
  # @return Array for valid properties with the reasons
59
59
  def list_invalid_properties
60
60
  invalid_properties = Array.new
61
+ if @locale_code.nil?
62
+ invalid_properties.push('invalid value for "locale_code", locale_code cannot be nil.')
63
+ end
64
+
65
+ if @content.nil?
66
+ invalid_properties.push('invalid value for "content", content cannot be nil.')
67
+ end
68
+
61
69
  invalid_properties
62
70
  end
63
71
 
64
72
  # Check to see if the all the properties in the model are valid
65
73
  # @return true if the model is valid
66
74
  def valid?
75
+ return false if @locale_code.nil?
76
+ return false if @content.nil?
67
77
  true
68
78
  end
69
79
 
@@ -120,12 +120,22 @@ module Phrase
120
120
  # @return Array for valid properties with the reasons
121
121
  def list_invalid_properties
122
122
  invalid_properties = Array.new
123
+ if @email.nil?
124
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
125
+ end
126
+
127
+ if @role.nil?
128
+ invalid_properties.push('invalid value for "role", role cannot be nil.')
129
+ end
130
+
123
131
  invalid_properties
124
132
  end
125
133
 
126
134
  # Check to see if the all the properties in the model are valid
127
135
  # @return true if the model is valid
128
136
  def valid?
137
+ return false if @email.nil?
138
+ return false if @role.nil?
129
139
  true
130
140
  end
131
141