kickflow 0.1.0 → 0.2.1
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 +4 -0
- data/README.md +102 -100
- data/Rakefile +1 -1
- data/docs/DefaultApi.md +118 -114
- data/docs/FormField.md +3 -1
- data/docs/FormFieldDetail.md +2 -0
- data/docs/PatchTicketsTicketIdRequestInputsInner.md +4 -4
- data/docs/PatchTicketsTicketIdRequestSlipItemsInnerInputsInner.md +8 -2
- data/docs/PostFiles200Response.md +1 -1
- data/docs/PostTicketsIdCommentsRequest.md +1 -1
- data/docs/PostTicketsRequestInputsInner.md +4 -4
- data/docs/PostTicketsRequestSlipItemsInnerInputsInner.md +7 -1
- data/docs/PostTicketsRequestSlipItemsInnerInputsInnerTeamId.md +49 -0
- data/docs/PostTicketsRequestSlipItemsInnerInputsInnerTicketId.md +49 -0
- data/docs/PostTicketsRequestSlipItemsInnerInputsInnerUserId.md +49 -0
- data/docs/RouteStep.md +3 -1
- data/docs/Section.md +2 -0
- data/docs/SectionListItem.md +32 -0
- data/docs/SlipField.md +3 -1
- data/docs/SlipFieldDetail.md +2 -0
- data/docs/SlipItemInput.md +6 -0
- data/docs/SubStatus.md +1 -1
- data/docs/TicketWithStep.md +52 -0
- data/docs/TicketWorkflow.md +10 -6
- data/docs/UserImage.md +5 -1
- data/docs/Workflow.md +6 -4
- data/docs/WorkflowDetail.md +9 -5
- data/docs/WorkflowInTicket.md +10 -6
- data/kickflow.gemspec +8 -1
- data/lib/kickflow/api/_api.rb +115 -109
- data/lib/kickflow/configuration.rb +2 -2
- data/lib/kickflow/models/form_field.rb +16 -5
- data/lib/kickflow/models/form_field_detail.rb +12 -1
- data/lib/kickflow/models/patch_tickets_ticket_id_request_inputs_inner.rb +4 -4
- data/lib/kickflow/models/patch_tickets_ticket_id_request_slip_items_inner_inputs_inner.rb +30 -5
- data/lib/kickflow/models/post_files200_response.rb +1 -1
- data/lib/kickflow/models/post_tickets_id_comments_request.rb +1 -1
- data/lib/kickflow/models/post_tickets_request_inputs_inner.rb +4 -4
- data/lib/kickflow/models/post_tickets_request_slip_items_inner_inputs_inner.rb +29 -2
- data/lib/kickflow/models/post_tickets_request_slip_items_inner_inputs_inner_team_id.rb +106 -0
- data/lib/kickflow/models/post_tickets_request_slip_items_inner_inputs_inner_ticket_id.rb +106 -0
- data/lib/kickflow/models/post_tickets_request_slip_items_inner_inputs_inner_user_id.rb +106 -0
- data/lib/kickflow/models/role_create_body_permission_list_inner.rb +2 -2
- data/lib/kickflow/models/role_detail_all_of_permission_list.rb +2 -2
- data/lib/kickflow/models/role_update_body_permission_list_inner.rb +2 -2
- data/lib/kickflow/models/route_step.rb +22 -5
- data/lib/kickflow/models/route_step_condition_field.rb +34 -0
- data/lib/kickflow/models/section.rb +51 -1
- data/lib/kickflow/models/section_list_item.rb +336 -0
- data/lib/kickflow/models/slip_field.rb +18 -7
- data/lib/kickflow/models/slip_field_detail.rb +14 -3
- data/lib/kickflow/models/slip_item_input.rb +37 -1
- data/lib/kickflow/models/sub_status.rb +2 -0
- data/lib/kickflow/models/ticket_with_step.rb +568 -0
- data/lib/kickflow/models/user_image.rb +29 -9
- data/lib/kickflow/models/workflow.rb +17 -5
- data/lib/kickflow/models/workflow_detail.rb +30 -6
- data/lib/kickflow/models/workflow_in_ticket.rb +31 -7
- data/lib/kickflow/version.rb +1 -1
- data/lib/kickflow.rb +5 -3
- data/manifest.scm +7 -1
- data/pkg/kickflow-0.1.0.gem +0 -0
- data/pkg/kickflow-0.2.0.gem +0 -0
- data/spec/models/post_tickets_request_slip_items_inner_inputs_inner_team_id_spec.rb +32 -0
- data/spec/models/post_tickets_request_slip_items_inner_inputs_inner_ticket_id_spec.rb +32 -0
- data/spec/models/post_tickets_request_slip_items_inner_inputs_inner_user_id_spec.rb +32 -0
- data/spec/models/section_list_item_spec.rb +82 -0
- data/spec/models/ticket_with_step_spec.rb +146 -0
- data/vendor/schema.yaml +377 -167
- metadata +31 -3
@@ -0,0 +1,336 @@
|
|
1
|
+
=begin
|
2
|
+
#kickflow REST API v1
|
3
|
+
|
4
|
+
#kickflowの開発者用REST API (v1)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.7.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Kickflow
|
17
|
+
# 明細セクションまたはフォームセクション
|
18
|
+
class SectionListItem
|
19
|
+
attr_accessor :section_type
|
20
|
+
|
21
|
+
# タイトル
|
22
|
+
attr_accessor :title
|
23
|
+
|
24
|
+
# 説明
|
25
|
+
attr_accessor :description
|
26
|
+
|
27
|
+
# フォームセクションのID(UUID)。明細セクションには含まれません。
|
28
|
+
attr_accessor :id
|
29
|
+
|
30
|
+
# フォームフィールド。明細セクションには含まれません。
|
31
|
+
attr_accessor :form_fields
|
32
|
+
|
33
|
+
# 表示条件があるかどうか。明細セクションには含まれません。
|
34
|
+
attr_accessor :conditional
|
35
|
+
|
36
|
+
# 条件をすべて満たす必要があるかどうか。明細セクションには含まれません。
|
37
|
+
attr_accessor :condition_all_of
|
38
|
+
|
39
|
+
# 明細フィールド。フォームセクションには含まれません。
|
40
|
+
attr_accessor :slip_fields
|
41
|
+
|
42
|
+
class EnumAttributeValidator
|
43
|
+
attr_reader :datatype
|
44
|
+
attr_reader :allowable_values
|
45
|
+
|
46
|
+
def initialize(datatype, allowable_values)
|
47
|
+
@allowable_values = allowable_values.map do |value|
|
48
|
+
case datatype.to_s
|
49
|
+
when /Integer/i
|
50
|
+
value.to_i
|
51
|
+
when /Float/i
|
52
|
+
value.to_f
|
53
|
+
else
|
54
|
+
value
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def valid?(value)
|
60
|
+
!value || allowable_values.include?(value)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
65
|
+
def self.attribute_map
|
66
|
+
{
|
67
|
+
:'section_type' => :'sectionType',
|
68
|
+
:'title' => :'title',
|
69
|
+
:'description' => :'description',
|
70
|
+
:'id' => :'id',
|
71
|
+
:'form_fields' => :'formFields',
|
72
|
+
:'conditional' => :'conditional',
|
73
|
+
:'condition_all_of' => :'conditionAllOf',
|
74
|
+
:'slip_fields' => :'slipFields'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Returns all the JSON keys this model knows about
|
79
|
+
def self.acceptable_attributes
|
80
|
+
attribute_map.values
|
81
|
+
end
|
82
|
+
|
83
|
+
# Attribute type mapping.
|
84
|
+
def self.openapi_types
|
85
|
+
{
|
86
|
+
:'section_type' => :'String',
|
87
|
+
:'title' => :'String',
|
88
|
+
:'description' => :'String',
|
89
|
+
:'id' => :'String',
|
90
|
+
:'form_fields' => :'Array<FormFieldDetail>',
|
91
|
+
:'conditional' => :'Boolean',
|
92
|
+
:'condition_all_of' => :'Boolean',
|
93
|
+
:'slip_fields' => :'Array<SlipFieldDetail>'
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
# List of attributes with nullable: true
|
98
|
+
def self.openapi_nullable
|
99
|
+
Set.new([
|
100
|
+
:'title',
|
101
|
+
:'description',
|
102
|
+
])
|
103
|
+
end
|
104
|
+
|
105
|
+
# Initializes the object
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
def initialize(attributes = {})
|
108
|
+
if (!attributes.is_a?(Hash))
|
109
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Kickflow::SectionListItem` initialize method"
|
110
|
+
end
|
111
|
+
|
112
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
113
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
114
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
115
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Kickflow::SectionListItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
116
|
+
end
|
117
|
+
h[k.to_sym] = v
|
118
|
+
}
|
119
|
+
|
120
|
+
if attributes.key?(:'section_type')
|
121
|
+
self.section_type = attributes[:'section_type']
|
122
|
+
else
|
123
|
+
self.section_type = nil
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'title')
|
127
|
+
self.title = attributes[:'title']
|
128
|
+
else
|
129
|
+
self.title = nil
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'description')
|
133
|
+
self.description = attributes[:'description']
|
134
|
+
else
|
135
|
+
self.description = nil
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.key?(:'id')
|
139
|
+
self.id = attributes[:'id']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.key?(:'form_fields')
|
143
|
+
if (value = attributes[:'form_fields']).is_a?(Array)
|
144
|
+
self.form_fields = value
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'conditional')
|
149
|
+
self.conditional = attributes[:'conditional']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'condition_all_of')
|
153
|
+
self.condition_all_of = attributes[:'condition_all_of']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'slip_fields')
|
157
|
+
if (value = attributes[:'slip_fields']).is_a?(Array)
|
158
|
+
self.slip_fields = value
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
164
|
+
# @return Array for valid properties with the reasons
|
165
|
+
def list_invalid_properties
|
166
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
167
|
+
invalid_properties = Array.new
|
168
|
+
if @section_type.nil?
|
169
|
+
invalid_properties.push('invalid value for "section_type", section_type cannot be nil.')
|
170
|
+
end
|
171
|
+
|
172
|
+
invalid_properties
|
173
|
+
end
|
174
|
+
|
175
|
+
# Check to see if the all the properties in the model are valid
|
176
|
+
# @return true if the model is valid
|
177
|
+
def valid?
|
178
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
179
|
+
return false if @section_type.nil?
|
180
|
+
section_type_validator = EnumAttributeValidator.new('String', ["form", "slip"])
|
181
|
+
return false unless section_type_validator.valid?(@section_type)
|
182
|
+
true
|
183
|
+
end
|
184
|
+
|
185
|
+
# Custom attribute writer method checking allowed values (enum).
|
186
|
+
# @param [Object] section_type Object to be assigned
|
187
|
+
def section_type=(section_type)
|
188
|
+
validator = EnumAttributeValidator.new('String', ["form", "slip"])
|
189
|
+
unless validator.valid?(section_type)
|
190
|
+
fail ArgumentError, "invalid value for \"section_type\", must be one of #{validator.allowable_values}."
|
191
|
+
end
|
192
|
+
@section_type = section_type
|
193
|
+
end
|
194
|
+
|
195
|
+
# Checks equality by comparing each attribute.
|
196
|
+
# @param [Object] Object to be compared
|
197
|
+
def ==(o)
|
198
|
+
return true if self.equal?(o)
|
199
|
+
self.class == o.class &&
|
200
|
+
section_type == o.section_type &&
|
201
|
+
title == o.title &&
|
202
|
+
description == o.description &&
|
203
|
+
id == o.id &&
|
204
|
+
form_fields == o.form_fields &&
|
205
|
+
conditional == o.conditional &&
|
206
|
+
condition_all_of == o.condition_all_of &&
|
207
|
+
slip_fields == o.slip_fields
|
208
|
+
end
|
209
|
+
|
210
|
+
# @see the `==` method
|
211
|
+
# @param [Object] Object to be compared
|
212
|
+
def eql?(o)
|
213
|
+
self == o
|
214
|
+
end
|
215
|
+
|
216
|
+
# Calculates hash code according to all attributes.
|
217
|
+
# @return [Integer] Hash code
|
218
|
+
def hash
|
219
|
+
[section_type, title, description, id, form_fields, conditional, condition_all_of, slip_fields].hash
|
220
|
+
end
|
221
|
+
|
222
|
+
# Builds the object from hash
|
223
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
224
|
+
# @return [Object] Returns the model itself
|
225
|
+
def self.build_from_hash(attributes)
|
226
|
+
return nil unless attributes.is_a?(Hash)
|
227
|
+
attributes = attributes.transform_keys(&:to_sym)
|
228
|
+
transformed_hash = {}
|
229
|
+
openapi_types.each_pair do |key, type|
|
230
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
231
|
+
transformed_hash["#{key}"] = nil
|
232
|
+
elsif type =~ /\AArray<(.*)>/i
|
233
|
+
# check to ensure the input is an array given that the attribute
|
234
|
+
# is documented as an array but the input is not
|
235
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
236
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
237
|
+
end
|
238
|
+
elsif !attributes[attribute_map[key]].nil?
|
239
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
240
|
+
end
|
241
|
+
end
|
242
|
+
new(transformed_hash)
|
243
|
+
end
|
244
|
+
|
245
|
+
# Deserializes the data based on type
|
246
|
+
# @param string type Data type
|
247
|
+
# @param string value Value to be deserialized
|
248
|
+
# @return [Object] Deserialized data
|
249
|
+
def self._deserialize(type, value)
|
250
|
+
case type.to_sym
|
251
|
+
when :Time
|
252
|
+
Time.parse(value)
|
253
|
+
when :Date
|
254
|
+
Date.parse(value)
|
255
|
+
when :String
|
256
|
+
value.to_s
|
257
|
+
when :Integer
|
258
|
+
value.to_i
|
259
|
+
when :Float
|
260
|
+
value.to_f
|
261
|
+
when :Boolean
|
262
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
263
|
+
true
|
264
|
+
else
|
265
|
+
false
|
266
|
+
end
|
267
|
+
when :Object
|
268
|
+
# generic object (usually a Hash), return directly
|
269
|
+
value
|
270
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
271
|
+
inner_type = Regexp.last_match[:inner_type]
|
272
|
+
value.map { |v| _deserialize(inner_type, v) }
|
273
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
274
|
+
k_type = Regexp.last_match[:k_type]
|
275
|
+
v_type = Regexp.last_match[:v_type]
|
276
|
+
{}.tap do |hash|
|
277
|
+
value.each do |k, v|
|
278
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
279
|
+
end
|
280
|
+
end
|
281
|
+
else # model
|
282
|
+
# models (e.g. Pet) or oneOf
|
283
|
+
klass = Kickflow.const_get(type)
|
284
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
# Returns the string representation of the object
|
289
|
+
# @return [String] String presentation of the object
|
290
|
+
def to_s
|
291
|
+
to_hash.to_s
|
292
|
+
end
|
293
|
+
|
294
|
+
# to_body is an alias to to_hash (backward compatibility)
|
295
|
+
# @return [Hash] Returns the object in the form of hash
|
296
|
+
def to_body
|
297
|
+
to_hash
|
298
|
+
end
|
299
|
+
|
300
|
+
# Returns the object in the form of hash
|
301
|
+
# @return [Hash] Returns the object in the form of hash
|
302
|
+
def to_hash
|
303
|
+
hash = {}
|
304
|
+
self.class.attribute_map.each_pair do |attr, param|
|
305
|
+
value = self.send(attr)
|
306
|
+
if value.nil?
|
307
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
308
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
309
|
+
end
|
310
|
+
|
311
|
+
hash[param] = _to_hash(value)
|
312
|
+
end
|
313
|
+
hash
|
314
|
+
end
|
315
|
+
|
316
|
+
# Outputs non-array value in the form of hash
|
317
|
+
# For object, use to_hash. Otherwise, just return the value
|
318
|
+
# @param [Object] value Any valid value
|
319
|
+
# @return [Hash] Returns the value in the form of hash
|
320
|
+
def _to_hash(value)
|
321
|
+
if value.is_a?(Array)
|
322
|
+
value.compact.map { |v| _to_hash(v) }
|
323
|
+
elsif value.is_a?(Hash)
|
324
|
+
{}.tap do |hash|
|
325
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
326
|
+
end
|
327
|
+
elsif value.respond_to? :to_hash
|
328
|
+
value.to_hash
|
329
|
+
else
|
330
|
+
value
|
331
|
+
end
|
332
|
+
end
|
333
|
+
|
334
|
+
end
|
335
|
+
|
336
|
+
end
|
@@ -76,6 +76,9 @@ module Kickflow
|
|
76
76
|
# 隠しフィールドである場合true
|
77
77
|
attr_accessor :hidden
|
78
78
|
|
79
|
+
# trueの時、申請者・承認者が画面上から値を入力することを禁止します。 ボタン(外部API連携)による代入や、REST API経由での入力はこのオプションの対象外です。
|
80
|
+
attr_accessor :readonly_on_ui
|
81
|
+
|
79
82
|
class EnumAttributeValidator
|
80
83
|
attr_reader :datatype
|
81
84
|
attr_reader :allowable_values
|
@@ -120,7 +123,8 @@ module Kickflow
|
|
120
123
|
:'suffix' => :'suffix',
|
121
124
|
:'approver' => :'approver',
|
122
125
|
:'author' => :'author',
|
123
|
-
:'hidden' => :'hidden'
|
126
|
+
:'hidden' => :'hidden',
|
127
|
+
:'readonly_on_ui' => :'readonlyOnUi'
|
124
128
|
}
|
125
129
|
end
|
126
130
|
|
@@ -151,7 +155,8 @@ module Kickflow
|
|
151
155
|
:'suffix' => :'String',
|
152
156
|
:'approver' => :'Boolean',
|
153
157
|
:'author' => :'Boolean',
|
154
|
-
:'hidden' => :'Boolean'
|
158
|
+
:'hidden' => :'Boolean',
|
159
|
+
:'readonly_on_ui' => :'Boolean'
|
155
160
|
}
|
156
161
|
end
|
157
162
|
|
@@ -167,7 +172,8 @@ module Kickflow
|
|
167
172
|
:'delimited',
|
168
173
|
:'prefix',
|
169
174
|
:'suffix',
|
170
|
-
:'hidden'
|
175
|
+
:'hidden',
|
176
|
+
:'readonly_on_ui'
|
171
177
|
])
|
172
178
|
end
|
173
179
|
|
@@ -305,6 +311,10 @@ module Kickflow
|
|
305
311
|
if attributes.key?(:'hidden')
|
306
312
|
self.hidden = attributes[:'hidden']
|
307
313
|
end
|
314
|
+
|
315
|
+
if attributes.key?(:'readonly_on_ui')
|
316
|
+
self.readonly_on_ui = attributes[:'readonly_on_ui']
|
317
|
+
end
|
308
318
|
end
|
309
319
|
|
310
320
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -357,7 +367,7 @@ module Kickflow
|
|
357
367
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
358
368
|
return false if @id.nil?
|
359
369
|
return false if @field_type.nil?
|
360
|
-
field_type_validator = EnumAttributeValidator.new('String', ["text", "number", "integer", "calculation", "pull_down", "checkbox", "date", "file", "master"])
|
370
|
+
field_type_validator = EnumAttributeValidator.new('String', ["text", "number", "integer", "calculation", "pull_down", "checkbox", "date", "file", "master", "user", "team", "ticket"])
|
361
371
|
return false unless field_type_validator.valid?(@field_type)
|
362
372
|
return false if @code.nil?
|
363
373
|
return false if @title.nil?
|
@@ -372,7 +382,7 @@ module Kickflow
|
|
372
382
|
# Custom attribute writer method checking allowed values (enum).
|
373
383
|
# @param [Object] field_type Object to be assigned
|
374
384
|
def field_type=(field_type)
|
375
|
-
validator = EnumAttributeValidator.new('String', ["text", "number", "integer", "calculation", "pull_down", "checkbox", "date", "file", "master"])
|
385
|
+
validator = EnumAttributeValidator.new('String', ["text", "number", "integer", "calculation", "pull_down", "checkbox", "date", "file", "master", "user", "team", "ticket"])
|
376
386
|
unless validator.valid?(field_type)
|
377
387
|
fail ArgumentError, "invalid value for \"field_type\", must be one of #{validator.allowable_values}."
|
378
388
|
end
|
@@ -403,7 +413,8 @@ module Kickflow
|
|
403
413
|
suffix == o.suffix &&
|
404
414
|
approver == o.approver &&
|
405
415
|
author == o.author &&
|
406
|
-
hidden == o.hidden
|
416
|
+
hidden == o.hidden &&
|
417
|
+
readonly_on_ui == o.readonly_on_ui
|
407
418
|
end
|
408
419
|
|
409
420
|
# @see the `==` method
|
@@ -415,7 +426,7 @@ module Kickflow
|
|
415
426
|
# Calculates hash code according to all attributes.
|
416
427
|
# @return [Integer] Hash code
|
417
428
|
def hash
|
418
|
-
[id, field_type, code, title, required, show_total, options, regexp_format, formula, max_value, min_value, default_value, decimal_digit, delimited, allowed_extensions, prefix, suffix, approver, author, hidden].hash
|
429
|
+
[id, field_type, code, title, required, show_total, options, regexp_format, formula, max_value, min_value, default_value, decimal_digit, delimited, allowed_extensions, prefix, suffix, approver, author, hidden, readonly_on_ui].hash
|
419
430
|
end
|
420
431
|
|
421
432
|
# Builds the object from hash
|
@@ -76,6 +76,9 @@ module Kickflow
|
|
76
76
|
# 隠しフィールドである場合true
|
77
77
|
attr_accessor :hidden
|
78
78
|
|
79
|
+
# trueの時、申請者・承認者が画面上から値を入力することを禁止します。 ボタン(外部API連携)による代入や、REST API経由での入力はこのオプションの対象外です。
|
80
|
+
attr_accessor :readonly_on_ui
|
81
|
+
|
79
82
|
attr_accessor :general_master
|
80
83
|
|
81
84
|
attr_accessor :default_general_master_item
|
@@ -125,6 +128,7 @@ module Kickflow
|
|
125
128
|
:'approver' => :'approver',
|
126
129
|
:'author' => :'author',
|
127
130
|
:'hidden' => :'hidden',
|
131
|
+
:'readonly_on_ui' => :'readonlyOnUi',
|
128
132
|
:'general_master' => :'generalMaster',
|
129
133
|
:'default_general_master_item' => :'defaultGeneralMasterItem'
|
130
134
|
}
|
@@ -158,6 +162,7 @@ module Kickflow
|
|
158
162
|
:'approver' => :'Boolean',
|
159
163
|
:'author' => :'Boolean',
|
160
164
|
:'hidden' => :'Boolean',
|
165
|
+
:'readonly_on_ui' => :'Boolean',
|
161
166
|
:'general_master' => :'GeneralMaster',
|
162
167
|
:'default_general_master_item' => :'GeneralMasterItem'
|
163
168
|
}
|
@@ -176,6 +181,7 @@ module Kickflow
|
|
176
181
|
:'prefix',
|
177
182
|
:'suffix',
|
178
183
|
:'hidden',
|
184
|
+
:'readonly_on_ui',
|
179
185
|
:'general_master',
|
180
186
|
:'default_general_master_item'
|
181
187
|
])
|
@@ -323,6 +329,10 @@ module Kickflow
|
|
323
329
|
self.hidden = attributes[:'hidden']
|
324
330
|
end
|
325
331
|
|
332
|
+
if attributes.key?(:'readonly_on_ui')
|
333
|
+
self.readonly_on_ui = attributes[:'readonly_on_ui']
|
334
|
+
end
|
335
|
+
|
326
336
|
if attributes.key?(:'general_master')
|
327
337
|
self.general_master = attributes[:'general_master']
|
328
338
|
end
|
@@ -382,7 +392,7 @@ module Kickflow
|
|
382
392
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
383
393
|
return false if @id.nil?
|
384
394
|
return false if @field_type.nil?
|
385
|
-
field_type_validator = EnumAttributeValidator.new('String', ["text", "number", "integer", "calculation", "pull_down", "checkbox", "date", "file", "master"])
|
395
|
+
field_type_validator = EnumAttributeValidator.new('String', ["text", "number", "integer", "calculation", "pull_down", "checkbox", "date", "file", "master", "user", "team", "ticket"])
|
386
396
|
return false unless field_type_validator.valid?(@field_type)
|
387
397
|
return false if @code.nil?
|
388
398
|
return false if @title.nil?
|
@@ -397,7 +407,7 @@ module Kickflow
|
|
397
407
|
# Custom attribute writer method checking allowed values (enum).
|
398
408
|
# @param [Object] field_type Object to be assigned
|
399
409
|
def field_type=(field_type)
|
400
|
-
validator = EnumAttributeValidator.new('String', ["text", "number", "integer", "calculation", "pull_down", "checkbox", "date", "file", "master"])
|
410
|
+
validator = EnumAttributeValidator.new('String', ["text", "number", "integer", "calculation", "pull_down", "checkbox", "date", "file", "master", "user", "team", "ticket"])
|
401
411
|
unless validator.valid?(field_type)
|
402
412
|
fail ArgumentError, "invalid value for \"field_type\", must be one of #{validator.allowable_values}."
|
403
413
|
end
|
@@ -429,6 +439,7 @@ module Kickflow
|
|
429
439
|
approver == o.approver &&
|
430
440
|
author == o.author &&
|
431
441
|
hidden == o.hidden &&
|
442
|
+
readonly_on_ui == o.readonly_on_ui &&
|
432
443
|
general_master == o.general_master &&
|
433
444
|
default_general_master_item == o.default_general_master_item
|
434
445
|
end
|
@@ -442,7 +453,7 @@ module Kickflow
|
|
442
453
|
# Calculates hash code according to all attributes.
|
443
454
|
# @return [Integer] Hash code
|
444
455
|
def hash
|
445
|
-
[id, field_type, code, title, required, show_total, options, regexp_format, formula, max_value, min_value, default_value, decimal_digit, delimited, allowed_extensions, prefix, suffix, approver, author, hidden, general_master, default_general_master_item].hash
|
456
|
+
[id, field_type, code, title, required, show_total, options, regexp_format, formula, max_value, min_value, default_value, decimal_digit, delimited, allowed_extensions, prefix, suffix, approver, author, hidden, readonly_on_ui, general_master, default_general_master_item].hash
|
446
457
|
end
|
447
458
|
|
448
459
|
# Builds the object from hash
|
@@ -33,6 +33,15 @@ module Kickflow
|
|
33
33
|
# 入力値: 汎用マスタアイテム
|
34
34
|
attr_accessor :general_master_items
|
35
35
|
|
36
|
+
# 入力値: ユーザー
|
37
|
+
attr_accessor :users
|
38
|
+
|
39
|
+
# 入力値: チーム
|
40
|
+
attr_accessor :teams
|
41
|
+
|
42
|
+
# 入力値: チケット
|
43
|
+
attr_accessor :input_tickets
|
44
|
+
|
36
45
|
# 添付ファイル
|
37
46
|
attr_accessor :attachments
|
38
47
|
|
@@ -45,6 +54,9 @@ module Kickflow
|
|
45
54
|
:'updated_at' => :'updatedAt',
|
46
55
|
:'value' => :'value',
|
47
56
|
:'general_master_items' => :'generalMasterItems',
|
57
|
+
:'users' => :'users',
|
58
|
+
:'teams' => :'teams',
|
59
|
+
:'input_tickets' => :'inputTickets',
|
48
60
|
:'attachments' => :'attachments'
|
49
61
|
}
|
50
62
|
end
|
@@ -63,6 +75,9 @@ module Kickflow
|
|
63
75
|
:'updated_at' => :'Time',
|
64
76
|
:'value' => :'SlipItemInputValue',
|
65
77
|
:'general_master_items' => :'Array<GeneralMasterItem>',
|
78
|
+
:'users' => :'Array<User>',
|
79
|
+
:'teams' => :'Array<Team>',
|
80
|
+
:'input_tickets' => :'Array<Ticket>',
|
66
81
|
:'attachments' => :'Array<Attachment>'
|
67
82
|
}
|
68
83
|
end
|
@@ -127,6 +142,24 @@ module Kickflow
|
|
127
142
|
self.general_master_items = nil
|
128
143
|
end
|
129
144
|
|
145
|
+
if attributes.key?(:'users')
|
146
|
+
if (value = attributes[:'users']).is_a?(Array)
|
147
|
+
self.users = value
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.key?(:'teams')
|
152
|
+
if (value = attributes[:'teams']).is_a?(Array)
|
153
|
+
self.teams = value
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.key?(:'input_tickets')
|
158
|
+
if (value = attributes[:'input_tickets']).is_a?(Array)
|
159
|
+
self.input_tickets = value
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
130
163
|
if attributes.key?(:'attachments')
|
131
164
|
if (value = attributes[:'attachments']).is_a?(Array)
|
132
165
|
self.attachments = value
|
@@ -192,6 +225,9 @@ module Kickflow
|
|
192
225
|
updated_at == o.updated_at &&
|
193
226
|
value == o.value &&
|
194
227
|
general_master_items == o.general_master_items &&
|
228
|
+
users == o.users &&
|
229
|
+
teams == o.teams &&
|
230
|
+
input_tickets == o.input_tickets &&
|
195
231
|
attachments == o.attachments
|
196
232
|
end
|
197
233
|
|
@@ -204,7 +240,7 @@ module Kickflow
|
|
204
240
|
# Calculates hash code according to all attributes.
|
205
241
|
# @return [Integer] Hash code
|
206
242
|
def hash
|
207
|
-
[id, slip_field_id, created_at, updated_at, value, general_master_items, attachments].hash
|
243
|
+
[id, slip_field_id, created_at, updated_at, value, general_master_items, users, teams, input_tickets, attachments].hash
|
208
244
|
end
|
209
245
|
|
210
246
|
# Builds the object from hash
|