phrase 1.0.5 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/docs/BranchName.md +17 -0
- data/docs/Job.md +5 -3
- data/docs/JobDetails.md +4 -2
- data/docs/JobLocale.md +3 -1
- data/docs/LocalesApi.md +2 -0
- data/docs/ScreenshotsApi.md +3 -1
- data/docs/Webhook.md +2 -0
- data/docs/WebhookCreateParameters.md +5 -1
- data/docs/WebhookUpdateParameters.md +5 -1
- data/lib/phrase.rb +1 -0
- data/lib/phrase/api/locales_api.rb +3 -0
- data/lib/phrase/api/screenshots_api.rb +3 -0
- data/lib/phrase/api_client.rb +4 -2
- data/lib/phrase/models/branch_name.rb +194 -0
- data/lib/phrase/models/job.rb +22 -13
- data/lib/phrase/models/job_details.rb +19 -10
- data/lib/phrase/models/job_locale.rb +13 -4
- data/lib/phrase/models/webhook.rb +10 -1
- data/lib/phrase/models/webhook_create_parameters.rb +24 -4
- data/lib/phrase/models/webhook_update_parameters.rb +24 -4
- data/lib/phrase/version.rb +1 -1
- data/spec/api/locales_api_spec.rb +1 -0
- data/spec/api/screenshots_api_spec.rb +1 -0
- data/spec/models/branch_name_spec.rb +29 -0
- data/spec/models/job_details_spec.rb +9 -3
- data/spec/models/job_locale_spec.rb +6 -0
- data/spec/models/job_spec.rb +9 -3
- data/spec/models/webhook_create_parameters_spec.rb +12 -0
- data/spec/models/webhook_spec.rb +6 -0
- data/spec/models/webhook_update_parameters_spec.rb +12 -0
- metadata +166 -162
data/lib/phrase/models/job.rb
CHANGED
@@ -14,12 +14,14 @@ module Phrase
|
|
14
14
|
|
15
15
|
attr_accessor :ticket_url
|
16
16
|
|
17
|
+
attr_accessor :project
|
18
|
+
|
19
|
+
attr_accessor :branch
|
20
|
+
|
17
21
|
attr_accessor :created_at
|
18
22
|
|
19
23
|
attr_accessor :updated_at
|
20
24
|
|
21
|
-
attr_accessor :project
|
22
|
-
|
23
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
26
|
def self.attribute_map
|
25
27
|
{
|
@@ -29,9 +31,10 @@ module Phrase
|
|
29
31
|
:'due_date' => :'due_date',
|
30
32
|
:'state' => :'state',
|
31
33
|
:'ticket_url' => :'ticket_url',
|
34
|
+
:'project' => :'project',
|
35
|
+
:'branch' => :'branch',
|
32
36
|
:'created_at' => :'created_at',
|
33
|
-
:'updated_at' => :'updated_at'
|
34
|
-
:'project' => :'project'
|
37
|
+
:'updated_at' => :'updated_at'
|
35
38
|
}
|
36
39
|
end
|
37
40
|
|
@@ -44,9 +47,10 @@ module Phrase
|
|
44
47
|
:'due_date' => :'DateTime',
|
45
48
|
:'state' => :'String',
|
46
49
|
:'ticket_url' => :'String',
|
50
|
+
:'project' => :'ProjectShort',
|
51
|
+
:'branch' => :'BranchName',
|
47
52
|
:'created_at' => :'DateTime',
|
48
|
-
:'updated_at' => :'DateTime'
|
49
|
-
:'project' => :'ProjectShort'
|
53
|
+
:'updated_at' => :'DateTime'
|
50
54
|
}
|
51
55
|
end
|
52
56
|
|
@@ -95,6 +99,14 @@ module Phrase
|
|
95
99
|
self.ticket_url = attributes[:'ticket_url']
|
96
100
|
end
|
97
101
|
|
102
|
+
if attributes.key?(:'project')
|
103
|
+
self.project = attributes[:'project']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'branch')
|
107
|
+
self.branch = attributes[:'branch']
|
108
|
+
end
|
109
|
+
|
98
110
|
if attributes.key?(:'created_at')
|
99
111
|
self.created_at = attributes[:'created_at']
|
100
112
|
end
|
@@ -102,10 +114,6 @@ module Phrase
|
|
102
114
|
if attributes.key?(:'updated_at')
|
103
115
|
self.updated_at = attributes[:'updated_at']
|
104
116
|
end
|
105
|
-
|
106
|
-
if attributes.key?(:'project')
|
107
|
-
self.project = attributes[:'project']
|
108
|
-
end
|
109
117
|
end
|
110
118
|
|
111
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -132,9 +140,10 @@ module Phrase
|
|
132
140
|
due_date == o.due_date &&
|
133
141
|
state == o.state &&
|
134
142
|
ticket_url == o.ticket_url &&
|
143
|
+
project == o.project &&
|
144
|
+
branch == o.branch &&
|
135
145
|
created_at == o.created_at &&
|
136
|
-
updated_at == o.updated_at
|
137
|
-
project == o.project
|
146
|
+
updated_at == o.updated_at
|
138
147
|
end
|
139
148
|
|
140
149
|
# @see the `==` method
|
@@ -146,7 +155,7 @@ module Phrase
|
|
146
155
|
# Calculates hash code according to all attributes.
|
147
156
|
# @return [Integer] Hash code
|
148
157
|
def hash
|
149
|
-
[id, name, briefing, due_date, state, ticket_url, created_at, updated_at
|
158
|
+
[id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at].hash
|
150
159
|
end
|
151
160
|
|
152
161
|
# Builds the object from hash
|
@@ -14,12 +14,14 @@ module Phrase
|
|
14
14
|
|
15
15
|
attr_accessor :ticket_url
|
16
16
|
|
17
|
+
attr_accessor :project
|
18
|
+
|
19
|
+
attr_accessor :branch
|
20
|
+
|
17
21
|
attr_accessor :created_at
|
18
22
|
|
19
23
|
attr_accessor :updated_at
|
20
24
|
|
21
|
-
attr_accessor :project
|
22
|
-
|
23
25
|
attr_accessor :owner
|
24
26
|
|
25
27
|
attr_accessor :job_tag_name
|
@@ -37,9 +39,10 @@ module Phrase
|
|
37
39
|
:'due_date' => :'due_date',
|
38
40
|
:'state' => :'state',
|
39
41
|
:'ticket_url' => :'ticket_url',
|
42
|
+
:'project' => :'project',
|
43
|
+
:'branch' => :'branch',
|
40
44
|
:'created_at' => :'created_at',
|
41
45
|
:'updated_at' => :'updated_at',
|
42
|
-
:'project' => :'project',
|
43
46
|
:'owner' => :'owner',
|
44
47
|
:'job_tag_name' => :'job_tag_name',
|
45
48
|
:'locales' => :'locales',
|
@@ -56,9 +59,10 @@ module Phrase
|
|
56
59
|
:'due_date' => :'DateTime',
|
57
60
|
:'state' => :'String',
|
58
61
|
:'ticket_url' => :'String',
|
62
|
+
:'project' => :'ProjectShort',
|
63
|
+
:'branch' => :'BranchName',
|
59
64
|
:'created_at' => :'DateTime',
|
60
65
|
:'updated_at' => :'DateTime',
|
61
|
-
:'project' => :'ProjectShort',
|
62
66
|
:'owner' => :'UserPreview',
|
63
67
|
:'job_tag_name' => :'String',
|
64
68
|
:'locales' => :'Array<LocalePreview>',
|
@@ -119,6 +123,14 @@ module Phrase
|
|
119
123
|
self.ticket_url = attributes[:'ticket_url']
|
120
124
|
end
|
121
125
|
|
126
|
+
if attributes.key?(:'project')
|
127
|
+
self.project = attributes[:'project']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'branch')
|
131
|
+
self.branch = attributes[:'branch']
|
132
|
+
end
|
133
|
+
|
122
134
|
if attributes.key?(:'created_at')
|
123
135
|
self.created_at = attributes[:'created_at']
|
124
136
|
end
|
@@ -127,10 +139,6 @@ module Phrase
|
|
127
139
|
self.updated_at = attributes[:'updated_at']
|
128
140
|
end
|
129
141
|
|
130
|
-
if attributes.key?(:'project')
|
131
|
-
self.project = attributes[:'project']
|
132
|
-
end
|
133
|
-
|
134
142
|
if attributes.key?(:'owner')
|
135
143
|
self.owner = attributes[:'owner']
|
136
144
|
end
|
@@ -176,9 +184,10 @@ module Phrase
|
|
176
184
|
due_date == o.due_date &&
|
177
185
|
state == o.state &&
|
178
186
|
ticket_url == o.ticket_url &&
|
187
|
+
project == o.project &&
|
188
|
+
branch == o.branch &&
|
179
189
|
created_at == o.created_at &&
|
180
190
|
updated_at == o.updated_at &&
|
181
|
-
project == o.project &&
|
182
191
|
owner == o.owner &&
|
183
192
|
job_tag_name == o.job_tag_name &&
|
184
193
|
locales == o.locales &&
|
@@ -194,7 +203,7 @@ module Phrase
|
|
194
203
|
# Calculates hash code according to all attributes.
|
195
204
|
# @return [Integer] Hash code
|
196
205
|
def hash
|
197
|
-
[id, name, briefing, due_date, state, ticket_url, created_at, updated_at,
|
206
|
+
[id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, owner, job_tag_name, locales, keys].hash
|
198
207
|
end
|
199
208
|
|
200
209
|
# Builds the object from hash
|
@@ -10,13 +10,16 @@ module Phrase
|
|
10
10
|
|
11
11
|
attr_accessor :users
|
12
12
|
|
13
|
+
attr_accessor :completed
|
14
|
+
|
13
15
|
# Attribute mapping from ruby-style variable name to JSON key.
|
14
16
|
def self.attribute_map
|
15
17
|
{
|
16
18
|
:'id' => :'id',
|
17
19
|
:'job' => :'job',
|
18
20
|
:'locale' => :'locale',
|
19
|
-
:'users' => :'users'
|
21
|
+
:'users' => :'users',
|
22
|
+
:'completed' => :'completed'
|
20
23
|
}
|
21
24
|
end
|
22
25
|
|
@@ -26,7 +29,8 @@ module Phrase
|
|
26
29
|
:'id' => :'String',
|
27
30
|
:'job' => :'JobPreview',
|
28
31
|
:'locale' => :'LocalePreview',
|
29
|
-
:'users' => :'Array<UserPreview>'
|
32
|
+
:'users' => :'Array<UserPreview>',
|
33
|
+
:'completed' => :'Boolean'
|
30
34
|
}
|
31
35
|
end
|
32
36
|
|
@@ -68,6 +72,10 @@ module Phrase
|
|
68
72
|
self.users = value
|
69
73
|
end
|
70
74
|
end
|
75
|
+
|
76
|
+
if attributes.key?(:'completed')
|
77
|
+
self.completed = attributes[:'completed']
|
78
|
+
end
|
71
79
|
end
|
72
80
|
|
73
81
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -91,7 +99,8 @@ module Phrase
|
|
91
99
|
id == o.id &&
|
92
100
|
job == o.job &&
|
93
101
|
locale == o.locale &&
|
94
|
-
users == o.users
|
102
|
+
users == o.users &&
|
103
|
+
completed == o.completed
|
95
104
|
end
|
96
105
|
|
97
106
|
# @see the `==` method
|
@@ -103,7 +112,7 @@ module Phrase
|
|
103
112
|
# Calculates hash code according to all attributes.
|
104
113
|
# @return [Integer] Hash code
|
105
114
|
def hash
|
106
|
-
[id, job, locale, users].hash
|
115
|
+
[id, job, locale, users, completed].hash
|
107
116
|
end
|
108
117
|
|
109
118
|
# Builds the object from hash
|
@@ -12,6 +12,8 @@ module Phrase
|
|
12
12
|
|
13
13
|
attr_accessor :active
|
14
14
|
|
15
|
+
attr_accessor :include_branches
|
16
|
+
|
15
17
|
attr_accessor :created_at
|
16
18
|
|
17
19
|
attr_accessor :updated_at
|
@@ -24,6 +26,7 @@ module Phrase
|
|
24
26
|
:'description' => :'description',
|
25
27
|
:'events' => :'events',
|
26
28
|
:'active' => :'active',
|
29
|
+
:'include_branches' => :'include_branches',
|
27
30
|
:'created_at' => :'created_at',
|
28
31
|
:'updated_at' => :'updated_at'
|
29
32
|
}
|
@@ -37,6 +40,7 @@ module Phrase
|
|
37
40
|
:'description' => :'String',
|
38
41
|
:'events' => :'Array<String>',
|
39
42
|
:'active' => :'Boolean',
|
43
|
+
:'include_branches' => :'Boolean',
|
40
44
|
:'created_at' => :'DateTime',
|
41
45
|
:'updated_at' => :'DateTime'
|
42
46
|
}
|
@@ -85,6 +89,10 @@ module Phrase
|
|
85
89
|
self.active = attributes[:'active']
|
86
90
|
end
|
87
91
|
|
92
|
+
if attributes.key?(:'include_branches')
|
93
|
+
self.include_branches = attributes[:'include_branches']
|
94
|
+
end
|
95
|
+
|
88
96
|
if attributes.key?(:'created_at')
|
89
97
|
self.created_at = attributes[:'created_at']
|
90
98
|
end
|
@@ -117,6 +125,7 @@ module Phrase
|
|
117
125
|
description == o.description &&
|
118
126
|
events == o.events &&
|
119
127
|
active == o.active &&
|
128
|
+
include_branches == o.include_branches &&
|
120
129
|
created_at == o.created_at &&
|
121
130
|
updated_at == o.updated_at
|
122
131
|
end
|
@@ -130,7 +139,7 @@ module Phrase
|
|
130
139
|
# Calculates hash code according to all attributes.
|
131
140
|
# @return [Integer] Hash code
|
132
141
|
def hash
|
133
|
-
[id, callback_url, description, events, active, created_at, updated_at].hash
|
142
|
+
[id, callback_url, description, events, active, include_branches, created_at, updated_at].hash
|
134
143
|
end
|
135
144
|
|
136
145
|
# Builds the object from hash
|
@@ -5,6 +5,9 @@ module Phrase
|
|
5
5
|
# Callback URL to send requests to
|
6
6
|
attr_accessor :callback_url
|
7
7
|
|
8
|
+
# Webhook secret used to calculate signature. If empty, the default project secret will be used.
|
9
|
+
attr_accessor :secret
|
10
|
+
|
8
11
|
# Webhook description
|
9
12
|
attr_accessor :description
|
10
13
|
|
@@ -14,13 +17,18 @@ module Phrase
|
|
14
17
|
# Whether webhook is active or inactive
|
15
18
|
attr_accessor :active
|
16
19
|
|
20
|
+
# If enabled, webhook will also be triggered for events from branches of the project specified.
|
21
|
+
attr_accessor :include_branches
|
22
|
+
|
17
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
18
24
|
def self.attribute_map
|
19
25
|
{
|
20
26
|
:'callback_url' => :'callback_url',
|
27
|
+
:'secret' => :'secret',
|
21
28
|
:'description' => :'description',
|
22
29
|
:'events' => :'events',
|
23
|
-
:'active' => :'active'
|
30
|
+
:'active' => :'active',
|
31
|
+
:'include_branches' => :'include_branches'
|
24
32
|
}
|
25
33
|
end
|
26
34
|
|
@@ -28,9 +36,11 @@ module Phrase
|
|
28
36
|
def self.openapi_types
|
29
37
|
{
|
30
38
|
:'callback_url' => :'String',
|
39
|
+
:'secret' => :'String',
|
31
40
|
:'description' => :'String',
|
32
41
|
:'events' => :'String',
|
33
|
-
:'active' => :'Boolean'
|
42
|
+
:'active' => :'Boolean',
|
43
|
+
:'include_branches' => :'Boolean'
|
34
44
|
}
|
35
45
|
end
|
36
46
|
|
@@ -59,6 +69,10 @@ module Phrase
|
|
59
69
|
self.callback_url = attributes[:'callback_url']
|
60
70
|
end
|
61
71
|
|
72
|
+
if attributes.key?(:'secret')
|
73
|
+
self.secret = attributes[:'secret']
|
74
|
+
end
|
75
|
+
|
62
76
|
if attributes.key?(:'description')
|
63
77
|
self.description = attributes[:'description']
|
64
78
|
end
|
@@ -70,6 +84,10 @@ module Phrase
|
|
70
84
|
if attributes.key?(:'active')
|
71
85
|
self.active = attributes[:'active']
|
72
86
|
end
|
87
|
+
|
88
|
+
if attributes.key?(:'include_branches')
|
89
|
+
self.include_branches = attributes[:'include_branches']
|
90
|
+
end
|
73
91
|
end
|
74
92
|
|
75
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -91,9 +109,11 @@ module Phrase
|
|
91
109
|
return true if self.equal?(o)
|
92
110
|
self.class == o.class &&
|
93
111
|
callback_url == o.callback_url &&
|
112
|
+
secret == o.secret &&
|
94
113
|
description == o.description &&
|
95
114
|
events == o.events &&
|
96
|
-
active == o.active
|
115
|
+
active == o.active &&
|
116
|
+
include_branches == o.include_branches
|
97
117
|
end
|
98
118
|
|
99
119
|
# @see the `==` method
|
@@ -105,7 +125,7 @@ module Phrase
|
|
105
125
|
# Calculates hash code according to all attributes.
|
106
126
|
# @return [Integer] Hash code
|
107
127
|
def hash
|
108
|
-
[callback_url, description, events, active].hash
|
128
|
+
[callback_url, secret, description, events, active, include_branches].hash
|
109
129
|
end
|
110
130
|
|
111
131
|
# Builds the object from hash
|
@@ -5,6 +5,9 @@ module Phrase
|
|
5
5
|
# Callback URL to send requests to
|
6
6
|
attr_accessor :callback_url
|
7
7
|
|
8
|
+
# Webhook secret used to calculate signature. If empty, the default project secret will be used.
|
9
|
+
attr_accessor :secret
|
10
|
+
|
8
11
|
# Webhook description
|
9
12
|
attr_accessor :description
|
10
13
|
|
@@ -14,13 +17,18 @@ module Phrase
|
|
14
17
|
# Whether webhook is active or inactive
|
15
18
|
attr_accessor :active
|
16
19
|
|
20
|
+
# If enabled, webhook will also be triggered for events from branches of the project specified.
|
21
|
+
attr_accessor :include_branches
|
22
|
+
|
17
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
18
24
|
def self.attribute_map
|
19
25
|
{
|
20
26
|
:'callback_url' => :'callback_url',
|
27
|
+
:'secret' => :'secret',
|
21
28
|
:'description' => :'description',
|
22
29
|
:'events' => :'events',
|
23
|
-
:'active' => :'active'
|
30
|
+
:'active' => :'active',
|
31
|
+
:'include_branches' => :'include_branches'
|
24
32
|
}
|
25
33
|
end
|
26
34
|
|
@@ -28,9 +36,11 @@ module Phrase
|
|
28
36
|
def self.openapi_types
|
29
37
|
{
|
30
38
|
:'callback_url' => :'String',
|
39
|
+
:'secret' => :'String',
|
31
40
|
:'description' => :'String',
|
32
41
|
:'events' => :'String',
|
33
|
-
:'active' => :'Boolean'
|
42
|
+
:'active' => :'Boolean',
|
43
|
+
:'include_branches' => :'Boolean'
|
34
44
|
}
|
35
45
|
end
|
36
46
|
|
@@ -59,6 +69,10 @@ module Phrase
|
|
59
69
|
self.callback_url = attributes[:'callback_url']
|
60
70
|
end
|
61
71
|
|
72
|
+
if attributes.key?(:'secret')
|
73
|
+
self.secret = attributes[:'secret']
|
74
|
+
end
|
75
|
+
|
62
76
|
if attributes.key?(:'description')
|
63
77
|
self.description = attributes[:'description']
|
64
78
|
end
|
@@ -70,6 +84,10 @@ module Phrase
|
|
70
84
|
if attributes.key?(:'active')
|
71
85
|
self.active = attributes[:'active']
|
72
86
|
end
|
87
|
+
|
88
|
+
if attributes.key?(:'include_branches')
|
89
|
+
self.include_branches = attributes[:'include_branches']
|
90
|
+
end
|
73
91
|
end
|
74
92
|
|
75
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -91,9 +109,11 @@ module Phrase
|
|
91
109
|
return true if self.equal?(o)
|
92
110
|
self.class == o.class &&
|
93
111
|
callback_url == o.callback_url &&
|
112
|
+
secret == o.secret &&
|
94
113
|
description == o.description &&
|
95
114
|
events == o.events &&
|
96
|
-
active == o.active
|
115
|
+
active == o.active &&
|
116
|
+
include_branches == o.include_branches
|
97
117
|
end
|
98
118
|
|
99
119
|
# @see the `==` method
|
@@ -105,7 +125,7 @@ module Phrase
|
|
105
125
|
# Calculates hash code according to all attributes.
|
106
126
|
# @return [Integer] Hash code
|
107
127
|
def hash
|
108
|
-
[callback_url, description, events, active].hash
|
128
|
+
[callback_url, secret, description, events, active, include_branches].hash
|
109
129
|
end
|
110
130
|
|
111
131
|
# Builds the object from hash
|