phrase 4.37.1 → 4.38.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +4 -3
- data/docs/JobTemplateLocales.md +1 -1
- data/docs/LocalePreviewGlobal.md +21 -0
- data/lib/phrase/models/job_template_locales.rb +1 -1
- data/lib/phrase/models/locale_preview_global.rb +216 -0
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +1 -0
- data/spec/models/locale_preview_global_spec.rb +41 -0
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7dc6cad70c664a5774718b500545721234bba7e656f44703db2b8b9bcfc282fb
|
|
4
|
+
data.tar.gz: 4dd8973e69f505ed7dfb8ff32a5c48f003e6fc6e222031faac08ab796871478a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dcae6f9f6dd73846c1aec0e7ec6454a68695b8cccadcc71a985b352479198e9d7d5f5d328f43f122d4381748abfc7e07ecb6bd683c3f8c89aa373906f910f855
|
|
7
|
+
data.tar.gz: 521d81ba64b00d4307e74e1fe87397dfa80cf3d59af7001b70a739b536b96dc3f21c5a6a3c26eda3ce8094df7871e00a4c2f4cad352714f4964295f4f046231f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.38.0](https://github.com/phrase/strings-openapi/compare/ruby-v4.37.1...ruby-v4.38.0) (2026-12-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **API:** Adjust job_template_locale properties ([#772](https://github.com/phrase/strings-openapi/issues/772)) ([5f0370f](https://github.com/phrase/strings-openapi/commit/5f0370f3e036bc8e60ef4645acb6c9194e0be8c3))
|
|
9
|
+
|
|
3
10
|
## [4.37.1](https://github.com/phrase/strings-openapi/compare/ruby-v4.37.0...ruby-v4.37.1) (2026-12-01)
|
|
4
11
|
|
|
5
12
|
|
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: 4.
|
|
10
|
+
- Package version: 4.38.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-4.
|
|
59
|
+
gem install ./phrase-4.38.0.gem
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
(for development, run `gem install --dev ./phrase-4.
|
|
62
|
+
(for development, run `gem install --dev ./phrase-4.38.0.gem` to install the development dependencies)
|
|
63
63
|
|
|
64
64
|
## Getting Started
|
|
65
65
|
|
|
@@ -560,6 +560,7 @@ Class | Method | HTTP request | Description
|
|
|
560
560
|
- [Phrase::LocaleDownloadResult](docs/LocaleDownloadResult.md)
|
|
561
561
|
- [Phrase::LocalePreview](docs/LocalePreview.md)
|
|
562
562
|
- [Phrase::LocalePreview1](docs/LocalePreview1.md)
|
|
563
|
+
- [Phrase::LocalePreviewGlobal](docs/LocalePreviewGlobal.md)
|
|
563
564
|
- [Phrase::LocaleReport](docs/LocaleReport.md)
|
|
564
565
|
- [Phrase::LocaleStatistics](docs/LocaleStatistics.md)
|
|
565
566
|
- [Phrase::LocaleTeamPreview](docs/LocaleTeamPreview.md)
|
data/docs/JobTemplateLocales.md
CHANGED
|
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**id** | **String** | | [optional]
|
|
8
8
|
**job_template** | [**JobTemplatePreview**](JobTemplatePreview.md) | | [optional]
|
|
9
|
-
**locale** | [**
|
|
9
|
+
**locale** | [**LocalePreviewGlobal**](LocalePreviewGlobal.md) | | [optional]
|
|
10
10
|
**users** | [**Array<LocaleUserPreview>**](LocaleUserPreview.md) | | [optional]
|
|
11
11
|
**teams** | [**Array<LocaleTeamPreview>**](LocaleTeamPreview.md) | | [optional]
|
|
12
12
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Phrase::LocalePreviewGlobal
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**id** | **String** | The ID of the locale. Global Job Templates will return `null` here. | [optional]
|
|
8
|
+
**name** | **String** | | [optional]
|
|
9
|
+
**code** | **String** | | [optional]
|
|
10
|
+
|
|
11
|
+
## Code Sample
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'phrase'
|
|
15
|
+
|
|
16
|
+
instance = Phrase::LocalePreviewGlobal.new(id: nil,
|
|
17
|
+
name: nil,
|
|
18
|
+
code: nil)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
require 'date'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class LocalePreviewGlobal
|
|
5
|
+
# The ID of the locale. Global Job Templates will return `null` here.
|
|
6
|
+
attr_accessor :id
|
|
7
|
+
|
|
8
|
+
attr_accessor :name
|
|
9
|
+
|
|
10
|
+
attr_accessor :code
|
|
11
|
+
|
|
12
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
13
|
+
def self.attribute_map
|
|
14
|
+
{
|
|
15
|
+
:'id' => :'id',
|
|
16
|
+
:'name' => :'name',
|
|
17
|
+
:'code' => :'code'
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Attribute type mapping.
|
|
22
|
+
def self.openapi_types
|
|
23
|
+
{
|
|
24
|
+
:'id' => :'String',
|
|
25
|
+
:'name' => :'String',
|
|
26
|
+
:'code' => :'String'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# List of attributes with nullable: true
|
|
31
|
+
def self.openapi_nullable
|
|
32
|
+
Set.new([
|
|
33
|
+
:'id',
|
|
34
|
+
])
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Initializes the object
|
|
38
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
39
|
+
def initialize(attributes = {})
|
|
40
|
+
if (!attributes.is_a?(Hash))
|
|
41
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::LocalePreviewGlobal` initialize method"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
46
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
47
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::LocalePreviewGlobal`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
48
|
+
end
|
|
49
|
+
h[k.to_sym] = v
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if attributes.key?(:'id')
|
|
53
|
+
self.id = attributes[:'id']
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
if attributes.key?(:'name')
|
|
57
|
+
self.name = attributes[:'name']
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
if attributes.key?(:'code')
|
|
61
|
+
self.code = attributes[:'code']
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
66
|
+
# @return Array for valid properties with the reasons
|
|
67
|
+
def list_invalid_properties
|
|
68
|
+
invalid_properties = Array.new
|
|
69
|
+
invalid_properties
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Check to see if the all the properties in the model are valid
|
|
73
|
+
# @return true if the model is valid
|
|
74
|
+
def valid?
|
|
75
|
+
true
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Checks equality by comparing each attribute.
|
|
79
|
+
# @param [Object] Object to be compared
|
|
80
|
+
def ==(o)
|
|
81
|
+
return true if self.equal?(o)
|
|
82
|
+
self.class == o.class &&
|
|
83
|
+
id == o.id &&
|
|
84
|
+
name == o.name &&
|
|
85
|
+
code == o.code
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# @see the `==` method
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def eql?(o)
|
|
91
|
+
self == o
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Calculates hash code according to all attributes.
|
|
95
|
+
# @return [Integer] Hash code
|
|
96
|
+
def hash
|
|
97
|
+
[id, name, code].hash
|
|
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 self.build_from_hash(attributes)
|
|
104
|
+
new.build_from_hash(attributes)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Builds the object from hash
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
# @return [Object] Returns the model itself
|
|
110
|
+
def build_from_hash(attributes)
|
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
|
112
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
113
|
+
if type =~ /\AArray<(.*)>/i
|
|
114
|
+
# check to ensure the input is an array given that the attribute
|
|
115
|
+
# is documented as an array but the input is not
|
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
118
|
+
end
|
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
121
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
self
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Deserializes the data based on type
|
|
128
|
+
# @param string type Data type
|
|
129
|
+
# @param string value Value to be deserialized
|
|
130
|
+
# @return [Object] Deserialized data
|
|
131
|
+
def _deserialize(type, value)
|
|
132
|
+
case type.to_sym
|
|
133
|
+
when :DateTime
|
|
134
|
+
DateTime.parse(value)
|
|
135
|
+
when :Date
|
|
136
|
+
Date.parse(value)
|
|
137
|
+
when :Time
|
|
138
|
+
Time.parse(value)
|
|
139
|
+
when :String
|
|
140
|
+
value.to_s
|
|
141
|
+
when :Integer
|
|
142
|
+
value.to_i
|
|
143
|
+
when :Float
|
|
144
|
+
value.to_f
|
|
145
|
+
when :Boolean
|
|
146
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
147
|
+
true
|
|
148
|
+
else
|
|
149
|
+
false
|
|
150
|
+
end
|
|
151
|
+
when :Object
|
|
152
|
+
# generic object (usually a Hash), return directly
|
|
153
|
+
value
|
|
154
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
155
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
156
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
157
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
158
|
+
k_type = Regexp.last_match[:k_type]
|
|
159
|
+
v_type = Regexp.last_match[:v_type]
|
|
160
|
+
{}.tap do |hash|
|
|
161
|
+
value.each do |k, v|
|
|
162
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
else # model
|
|
166
|
+
Phrase.const_get(type).build_from_hash(value)
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Returns the string representation of the object
|
|
171
|
+
# @return [String] String presentation of the object
|
|
172
|
+
def to_s
|
|
173
|
+
to_hash.to_s
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
|
178
|
+
def to_body
|
|
179
|
+
to_hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the object in the form of hash
|
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
|
184
|
+
def to_hash
|
|
185
|
+
hash = {}
|
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
187
|
+
value = self.send(attr)
|
|
188
|
+
if value.nil?
|
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
hash[param] = _to_hash(value)
|
|
194
|
+
end
|
|
195
|
+
hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Outputs non-array value in the form of hash
|
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
200
|
+
# @param [Object] value Any valid value
|
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
|
202
|
+
def _to_hash(value)
|
|
203
|
+
if value.is_a?(Array)
|
|
204
|
+
value.compact.map { |v| _to_hash(v) }
|
|
205
|
+
elsif value.is_a?(Hash)
|
|
206
|
+
{}.tap do |hash|
|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
208
|
+
end
|
|
209
|
+
elsif value.respond_to? :to_hash
|
|
210
|
+
value.to_hash
|
|
211
|
+
else
|
|
212
|
+
value
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
end
|
data/lib/phrase/version.rb
CHANGED
data/lib/phrase.rb
CHANGED
|
@@ -129,6 +129,7 @@ require 'phrase/models/locale_download_params'
|
|
|
129
129
|
require 'phrase/models/locale_download_result'
|
|
130
130
|
require 'phrase/models/locale_preview'
|
|
131
131
|
require 'phrase/models/locale_preview1'
|
|
132
|
+
require 'phrase/models/locale_preview_global'
|
|
132
133
|
require 'phrase/models/locale_report'
|
|
133
134
|
require 'phrase/models/locale_statistics'
|
|
134
135
|
require 'phrase/models/locale_team_preview'
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'json'
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# Unit tests for Phrase::LocalePreviewGlobal
|
|
6
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
7
|
+
# Please update as you see appropriate
|
|
8
|
+
describe 'LocalePreviewGlobal' do
|
|
9
|
+
before do
|
|
10
|
+
# run before each test
|
|
11
|
+
@instance = Phrase::LocalePreviewGlobal.new
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
after do
|
|
15
|
+
# run after each test
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
describe 'test an instance of LocalePreviewGlobal' do
|
|
19
|
+
it 'should create an instance of LocalePreviewGlobal' do
|
|
20
|
+
expect(@instance).to be_instance_of(Phrase::LocalePreviewGlobal)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
describe 'test attribute "id"' do
|
|
24
|
+
it 'should work' do
|
|
25
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test attribute "name"' do
|
|
30
|
+
it 'should work' do
|
|
31
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
describe 'test attribute "code"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: phrase
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.38.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Phrase
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-12-
|
|
11
|
+
date: 2026-12-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -230,6 +230,7 @@ files:
|
|
|
230
230
|
- docs/LocaleDownloadsApi.md
|
|
231
231
|
- docs/LocalePreview.md
|
|
232
232
|
- docs/LocalePreview1.md
|
|
233
|
+
- docs/LocalePreviewGlobal.md
|
|
233
234
|
- docs/LocaleReport.md
|
|
234
235
|
- docs/LocaleStatistics.md
|
|
235
236
|
- docs/LocaleTeamPreview.md
|
|
@@ -584,6 +585,7 @@ files:
|
|
|
584
585
|
- lib/phrase/models/locale_download_result.rb
|
|
585
586
|
- lib/phrase/models/locale_preview.rb
|
|
586
587
|
- lib/phrase/models/locale_preview1.rb
|
|
588
|
+
- lib/phrase/models/locale_preview_global.rb
|
|
587
589
|
- lib/phrase/models/locale_report.rb
|
|
588
590
|
- lib/phrase/models/locale_statistics.rb
|
|
589
591
|
- lib/phrase/models/locale_team_preview.rb
|
|
@@ -903,6 +905,7 @@ files:
|
|
|
903
905
|
- spec/models/locale_download_result_spec.rb
|
|
904
906
|
- spec/models/locale_download_spec.rb
|
|
905
907
|
- spec/models/locale_preview1_spec.rb
|
|
908
|
+
- spec/models/locale_preview_global_spec.rb
|
|
906
909
|
- spec/models/locale_preview_spec.rb
|
|
907
910
|
- spec/models/locale_report_spec.rb
|
|
908
911
|
- spec/models/locale_spec.rb
|
|
@@ -1248,6 +1251,7 @@ test_files:
|
|
|
1248
1251
|
- spec/models/translation_unverify_parameters_spec.rb
|
|
1249
1252
|
- spec/models/affected_resources_spec.rb
|
|
1250
1253
|
- spec/models/upload_batches_create_parameters_spec.rb
|
|
1254
|
+
- spec/models/locale_preview_global_spec.rb
|
|
1251
1255
|
- spec/models/glossary_update_parameters_spec.rb
|
|
1252
1256
|
- spec/models/order_confirm_parameters_spec.rb
|
|
1253
1257
|
- spec/models/branch_create_parameters_spec.rb
|