phrase 1.0.8 → 1.0.9
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/LocalesApi.md +2 -0
- data/docs/Webhook.md +2 -0
- data/docs/WebhookCreateParameters.md +3 -1
- data/docs/WebhookUpdateParameters.md +3 -1
- data/lib/phrase.rb +1 -0
- data/lib/phrase/api/locales_api.rb +3 -0
- 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/webhook.rb +10 -1
- data/lib/phrase/models/webhook_create_parameters.rb +14 -4
- data/lib/phrase/models/webhook_update_parameters.rb +14 -4
- data/lib/phrase/version.rb +1 -1
- data/spec/api/locales_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_spec.rb +9 -3
- data/spec/models/webhook_create_parameters_spec.rb +6 -0
- data/spec/models/webhook_spec.rb +6 -0
- data/spec/models/webhook_update_parameters_spec.rb +6 -0
- metadata +161 -157
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45f843197c2f2f61eef52c3671197f5130a8959a012ac56b5378ee33967ba867
|
4
|
+
data.tar.gz: 7ae163d2f7a2c509354c36b0b38172850e95cda6c36b679196e3cf27a150111e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d8b5c3e052cdcce736e4388bfe6f06a773e5bb1b61d414ab2ede45ed7f148e39afda8d3efc924b9014ef05186a9f3a3d5d87f9cf4200c73c2ae81df921d164e
|
7
|
+
data.tar.gz: b7239c6357c00f56335cf89b34c33e31e895d64eeada546df237371306a74a6dc86d9a122a37ce86323b13db40b7172327ee4f677dbb6507fc645b07a9e20840
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Phrase is a translation management platform for software projects. You can colla
|
|
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: 1.0.
|
10
|
+
- Package version: 1.0.9
|
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-1.0.
|
59
|
+
gem install ./phrase-1.0.9.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-1.0.
|
62
|
+
(for development, run `gem install --dev ./phrase-1.0.9.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -314,6 +314,7 @@ Class | Method | HTTP request | Description
|
|
314
314
|
- [Phrase::Branch](docs/Branch.md)
|
315
315
|
- [Phrase::BranchCreateParameters](docs/BranchCreateParameters.md)
|
316
316
|
- [Phrase::BranchMergeParameters](docs/BranchMergeParameters.md)
|
317
|
+
- [Phrase::BranchName](docs/BranchName.md)
|
317
318
|
- [Phrase::BranchUpdateParameters](docs/BranchUpdateParameters.md)
|
318
319
|
- [Phrase::Comment](docs/Comment.md)
|
319
320
|
- [Phrase::CommentCreateParameters](docs/CommentCreateParameters.md)
|
data/docs/BranchName.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Phrase::BranchName
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'Phrase'
|
13
|
+
|
14
|
+
instance = Phrase::BranchName.new(name: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/docs/Job.md
CHANGED
@@ -10,9 +10,10 @@ Name | Type | Description | Notes
|
|
10
10
|
**due_date** | **DateTime** | | [optional]
|
11
11
|
**state** | **String** | | [optional]
|
12
12
|
**ticket_url** | **String** | | [optional]
|
13
|
+
**project** | [**ProjectShort**](ProjectShort.md) | | [optional]
|
14
|
+
**branch** | [**BranchName**](BranchName.md) | | [optional]
|
13
15
|
**created_at** | **DateTime** | | [optional]
|
14
16
|
**updated_at** | **DateTime** | | [optional]
|
15
|
-
**project** | [**ProjectShort**](ProjectShort.md) | | [optional]
|
16
17
|
|
17
18
|
## Code Sample
|
18
19
|
|
@@ -25,9 +26,10 @@ instance = Phrase::Job.new(id: null,
|
|
25
26
|
due_date: null,
|
26
27
|
state: null,
|
27
28
|
ticket_url: null,
|
29
|
+
project: null,
|
30
|
+
branch: null,
|
28
31
|
created_at: null,
|
29
|
-
updated_at: null
|
30
|
-
project: null)
|
32
|
+
updated_at: null)
|
31
33
|
```
|
32
34
|
|
33
35
|
|
data/docs/JobDetails.md
CHANGED
@@ -10,9 +10,10 @@ Name | Type | Description | Notes
|
|
10
10
|
**due_date** | **DateTime** | | [optional]
|
11
11
|
**state** | **String** | | [optional]
|
12
12
|
**ticket_url** | **String** | | [optional]
|
13
|
+
**project** | [**ProjectShort**](ProjectShort.md) | | [optional]
|
14
|
+
**branch** | [**BranchName**](BranchName.md) | | [optional]
|
13
15
|
**created_at** | **DateTime** | | [optional]
|
14
16
|
**updated_at** | **DateTime** | | [optional]
|
15
|
-
**project** | [**ProjectShort**](ProjectShort.md) | | [optional]
|
16
17
|
**owner** | [**UserPreview**](UserPreview.md) | | [optional]
|
17
18
|
**job_tag_name** | **String** | | [optional]
|
18
19
|
**locales** | [**Array<LocalePreview>**](LocalePreview.md) | | [optional]
|
@@ -29,9 +30,10 @@ instance = Phrase::JobDetails.new(id: null,
|
|
29
30
|
due_date: null,
|
30
31
|
state: null,
|
31
32
|
ticket_url: null,
|
33
|
+
project: null,
|
34
|
+
branch: null,
|
32
35
|
created_at: null,
|
33
36
|
updated_at: null,
|
34
|
-
project: null,
|
35
37
|
owner: null,
|
36
38
|
job_tag_name: null,
|
37
39
|
locales: null,
|
data/docs/LocalesApi.md
CHANGED
@@ -174,6 +174,7 @@ opts = {
|
|
174
174
|
tags: 'feature1,feature2', # String | Limit results to keys tagged with a list of comma separated tag names.
|
175
175
|
tag: 'feature', # String | Limit download to tagged keys. This parameter is deprecated. Please use the \"tags\" parameter instead
|
176
176
|
include_empty_translations: true, # Boolean | Indicates whether keys without translations should be included in the output as well.
|
177
|
+
exclude_empty_zero_forms: true, # Boolean | Indicates whether zero forms should be included when empty in pluralized keys.
|
177
178
|
include_translated_keys: true, # Boolean | Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
|
178
179
|
keep_notranslate_tags: true, # Boolean | Indicates whether [NOTRANSLATE] tags should be kept.
|
179
180
|
convert_emoji: true, # Boolean | This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
|
@@ -206,6 +207,7 @@ Name | Type | Description | Notes
|
|
206
207
|
**tags** | **String**| Limit results to keys tagged with a list of comma separated tag names. | [optional]
|
207
208
|
**tag** | **String**| Limit download to tagged keys. This parameter is deprecated. Please use the \"tags\" parameter instead | [optional]
|
208
209
|
**include_empty_translations** | **Boolean**| Indicates whether keys without translations should be included in the output as well. | [optional]
|
210
|
+
**exclude_empty_zero_forms** | **Boolean**| Indicates whether zero forms should be included when empty in pluralized keys. | [optional]
|
209
211
|
**include_translated_keys** | **Boolean**| Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys. | [optional]
|
210
212
|
**keep_notranslate_tags** | **Boolean**| Indicates whether [NOTRANSLATE] tags should be kept. | [optional]
|
211
213
|
**convert_emoji** | **Boolean**| This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively. | [optional]
|
data/docs/Webhook.md
CHANGED
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
**description** | **String** | | [optional]
|
10
10
|
**events** | **Array<String>** | | [optional]
|
11
11
|
**active** | **Boolean** | | [optional]
|
12
|
+
**include_branches** | **Boolean** | | [optional]
|
12
13
|
**created_at** | **DateTime** | | [optional]
|
13
14
|
**updated_at** | **DateTime** | | [optional]
|
14
15
|
|
@@ -22,6 +23,7 @@ instance = Phrase::Webhook.new(id: null,
|
|
22
23
|
description: null,
|
23
24
|
events: null,
|
24
25
|
active: null,
|
26
|
+
include_branches: null,
|
25
27
|
created_at: null,
|
26
28
|
updated_at: null)
|
27
29
|
```
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
**description** | **String** | Webhook description | [optional]
|
10
10
|
**events** | **String** | List of event names to trigger the webhook (separated by comma) | [optional]
|
11
11
|
**active** | **Boolean** | Whether webhook is active or inactive | [optional]
|
12
|
+
**include_branches** | **Boolean** | If enabled, webhook will also be triggered for events from branches of the project specified. | [optional]
|
12
13
|
|
13
14
|
## Code Sample
|
14
15
|
|
@@ -19,7 +20,8 @@ instance = Phrase::WebhookCreateParameters.new(callback_url: http://example.com/
|
|
19
20
|
secret: secr3t,
|
20
21
|
description: My webhook for chat notifications,
|
21
22
|
events: locales:create,translations:update,
|
22
|
-
active: null
|
23
|
+
active: null,
|
24
|
+
include_branches: null)
|
23
25
|
```
|
24
26
|
|
25
27
|
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
**description** | **String** | Webhook description | [optional]
|
10
10
|
**events** | **String** | List of event names to trigger the webhook (separated by comma) | [optional]
|
11
11
|
**active** | **Boolean** | Whether webhook is active or inactive | [optional]
|
12
|
+
**include_branches** | **Boolean** | If enabled, webhook will also be triggered for events from branches of the project specified. | [optional]
|
12
13
|
|
13
14
|
## Code Sample
|
14
15
|
|
@@ -19,7 +20,8 @@ instance = Phrase::WebhookUpdateParameters.new(callback_url: http://example.com/
|
|
19
20
|
secret: secr3t,
|
20
21
|
description: My webhook for chat notifications,
|
21
22
|
events: locales:create,translations:update,
|
22
|
-
active: null
|
23
|
+
active: null,
|
24
|
+
include_branches: null)
|
23
25
|
```
|
24
26
|
|
25
27
|
|
data/lib/phrase.rb
CHANGED
@@ -28,6 +28,7 @@ require 'phrase/models/blacklisted_key_update_parameters'
|
|
28
28
|
require 'phrase/models/branch'
|
29
29
|
require 'phrase/models/branch_create_parameters'
|
30
30
|
require 'phrase/models/branch_merge_parameters'
|
31
|
+
require 'phrase/models/branch_name'
|
31
32
|
require 'phrase/models/branch_update_parameters'
|
32
33
|
require 'phrase/models/comment'
|
33
34
|
require 'phrase/models/comment_create_parameters'
|
@@ -165,6 +165,7 @@ module Phrase
|
|
165
165
|
# @option opts [String] :tags Limit results to keys tagged with a list of comma separated tag names.
|
166
166
|
# @option opts [String] :tag Limit download to tagged keys. This parameter is deprecated. Please use the \"tags\" parameter instead
|
167
167
|
# @option opts [Boolean] :include_empty_translations Indicates whether keys without translations should be included in the output as well.
|
168
|
+
# @option opts [Boolean] :exclude_empty_zero_forms Indicates whether zero forms should be included when empty in pluralized keys.
|
168
169
|
# @option opts [Boolean] :include_translated_keys Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
|
169
170
|
# @option opts [Boolean] :keep_notranslate_tags Indicates whether [NOTRANSLATE] tags should be kept.
|
170
171
|
# @option opts [Boolean] :convert_emoji This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
|
@@ -191,6 +192,7 @@ module Phrase
|
|
191
192
|
# @option opts [String] :tags Limit results to keys tagged with a list of comma separated tag names.
|
192
193
|
# @option opts [String] :tag Limit download to tagged keys. This parameter is deprecated. Please use the \"tags\" parameter instead
|
193
194
|
# @option opts [Boolean] :include_empty_translations Indicates whether keys without translations should be included in the output as well.
|
195
|
+
# @option opts [Boolean] :exclude_empty_zero_forms Indicates whether zero forms should be included when empty in pluralized keys.
|
194
196
|
# @option opts [Boolean] :include_translated_keys Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
|
195
197
|
# @option opts [Boolean] :keep_notranslate_tags Indicates whether [NOTRANSLATE] tags should be kept.
|
196
198
|
# @option opts [Boolean] :convert_emoji This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
|
@@ -223,6 +225,7 @@ module Phrase
|
|
223
225
|
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
|
224
226
|
query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
|
225
227
|
query_params[:'include_empty_translations'] = opts[:'include_empty_translations'] if !opts[:'include_empty_translations'].nil?
|
228
|
+
query_params[:'exclude_empty_zero_forms'] = opts[:'exclude_empty_zero_forms'] if !opts[:'exclude_empty_zero_forms'].nil?
|
226
229
|
query_params[:'include_translated_keys'] = opts[:'include_translated_keys'] if !opts[:'include_translated_keys'].nil?
|
227
230
|
query_params[:'keep_notranslate_tags'] = opts[:'keep_notranslate_tags'] if !opts[:'keep_notranslate_tags'].nil?
|
228
231
|
query_params[:'convert_emoji'] = opts[:'convert_emoji'] if !opts[:'convert_emoji'].nil?
|
@@ -0,0 +1,194 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class BranchName
|
5
|
+
attr_accessor :name
|
6
|
+
|
7
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
8
|
+
def self.attribute_map
|
9
|
+
{
|
10
|
+
:'name' => :'name'
|
11
|
+
}
|
12
|
+
end
|
13
|
+
|
14
|
+
# Attribute type mapping.
|
15
|
+
def self.openapi_types
|
16
|
+
{
|
17
|
+
:'name' => :'String'
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# List of attributes with nullable: true
|
22
|
+
def self.openapi_nullable
|
23
|
+
Set.new([
|
24
|
+
])
|
25
|
+
end
|
26
|
+
|
27
|
+
# Initializes the object
|
28
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
29
|
+
def initialize(attributes = {})
|
30
|
+
if (!attributes.is_a?(Hash))
|
31
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::BranchName` initialize method"
|
32
|
+
end
|
33
|
+
|
34
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
35
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
36
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
37
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::BranchName`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
38
|
+
end
|
39
|
+
h[k.to_sym] = v
|
40
|
+
}
|
41
|
+
|
42
|
+
if attributes.key?(:'name')
|
43
|
+
self.name = attributes[:'name']
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
48
|
+
# @return Array for valid properties with the reasons
|
49
|
+
def list_invalid_properties
|
50
|
+
invalid_properties = Array.new
|
51
|
+
invalid_properties
|
52
|
+
end
|
53
|
+
|
54
|
+
# Check to see if the all the properties in the model are valid
|
55
|
+
# @return true if the model is valid
|
56
|
+
def valid?
|
57
|
+
true
|
58
|
+
end
|
59
|
+
|
60
|
+
# Checks equality by comparing each attribute.
|
61
|
+
# @param [Object] Object to be compared
|
62
|
+
def ==(o)
|
63
|
+
return true if self.equal?(o)
|
64
|
+
self.class == o.class &&
|
65
|
+
name == o.name
|
66
|
+
end
|
67
|
+
|
68
|
+
# @see the `==` method
|
69
|
+
# @param [Object] Object to be compared
|
70
|
+
def eql?(o)
|
71
|
+
self == o
|
72
|
+
end
|
73
|
+
|
74
|
+
# Calculates hash code according to all attributes.
|
75
|
+
# @return [Integer] Hash code
|
76
|
+
def hash
|
77
|
+
[name].hash
|
78
|
+
end
|
79
|
+
|
80
|
+
# Builds the object from hash
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
# @return [Object] Returns the model itself
|
83
|
+
def self.build_from_hash(attributes)
|
84
|
+
new.build_from_hash(attributes)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Builds the object from hash
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
89
|
+
# @return [Object] Returns the model itself
|
90
|
+
def build_from_hash(attributes)
|
91
|
+
return nil unless attributes.is_a?(Hash)
|
92
|
+
self.class.openapi_types.each_pair do |key, type|
|
93
|
+
if type =~ /\AArray<(.*)>/i
|
94
|
+
# check to ensure the input is an array given that the attribute
|
95
|
+
# is documented as an array but the input is not
|
96
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
97
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
98
|
+
end
|
99
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
100
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
101
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
102
|
+
end
|
103
|
+
|
104
|
+
self
|
105
|
+
end
|
106
|
+
|
107
|
+
# Deserializes the data based on type
|
108
|
+
# @param string type Data type
|
109
|
+
# @param string value Value to be deserialized
|
110
|
+
# @return [Object] Deserialized data
|
111
|
+
def _deserialize(type, value)
|
112
|
+
case type.to_sym
|
113
|
+
when :DateTime
|
114
|
+
DateTime.parse(value)
|
115
|
+
when :Date
|
116
|
+
Date.parse(value)
|
117
|
+
when :String
|
118
|
+
value.to_s
|
119
|
+
when :Integer
|
120
|
+
value.to_i
|
121
|
+
when :Float
|
122
|
+
value.to_f
|
123
|
+
when :Boolean
|
124
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
125
|
+
true
|
126
|
+
else
|
127
|
+
false
|
128
|
+
end
|
129
|
+
when :Object
|
130
|
+
# generic object (usually a Hash), return directly
|
131
|
+
value
|
132
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
133
|
+
inner_type = Regexp.last_match[:inner_type]
|
134
|
+
value.map { |v| _deserialize(inner_type, v) }
|
135
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
136
|
+
k_type = Regexp.last_match[:k_type]
|
137
|
+
v_type = Regexp.last_match[:v_type]
|
138
|
+
{}.tap do |hash|
|
139
|
+
value.each do |k, v|
|
140
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
else # model
|
144
|
+
Phrase.const_get(type).build_from_hash(value)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# Returns the string representation of the object
|
149
|
+
# @return [String] String presentation of the object
|
150
|
+
def to_s
|
151
|
+
to_hash.to_s
|
152
|
+
end
|
153
|
+
|
154
|
+
# to_body is an alias to to_hash (backward compatibility)
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
156
|
+
def to_body
|
157
|
+
to_hash
|
158
|
+
end
|
159
|
+
|
160
|
+
# Returns the object in the form of hash
|
161
|
+
# @return [Hash] Returns the object in the form of hash
|
162
|
+
def to_hash
|
163
|
+
hash = {}
|
164
|
+
self.class.attribute_map.each_pair do |attr, param|
|
165
|
+
value = self.send(attr)
|
166
|
+
if value.nil?
|
167
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
168
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
169
|
+
end
|
170
|
+
|
171
|
+
hash[param] = _to_hash(value)
|
172
|
+
end
|
173
|
+
hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Outputs non-array value in the form of hash
|
177
|
+
# For object, use to_hash. Otherwise, just return the value
|
178
|
+
# @param [Object] value Any valid value
|
179
|
+
# @return [Hash] Returns the value in the form of hash
|
180
|
+
def _to_hash(value)
|
181
|
+
if value.is_a?(Array)
|
182
|
+
value.compact.map { |v| _to_hash(v) }
|
183
|
+
elsif value.is_a?(Hash)
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
186
|
+
end
|
187
|
+
elsif value.respond_to? :to_hash
|
188
|
+
value.to_hash
|
189
|
+
else
|
190
|
+
value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
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
|