ittybit 0.7.5.2 → 0.7.6
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/lib/ittybit/automations/client.rb +14 -6
- data/lib/ittybit/files/client.rb +67 -77
- data/lib/ittybit/media/client.rb +78 -34
- data/lib/ittybit/signatures/client.rb +20 -24
- data/lib/ittybit/signatures/types/signatures_create_request_method.rb +0 -3
- data/lib/ittybit/types/automation.rb +17 -27
- data/lib/ittybit/types/automation_list_response.rb +15 -2
- data/lib/ittybit/types/automation_response.rb +15 -2
- data/lib/ittybit/types/automation_status.rb +0 -1
- data/lib/ittybit/types/automation_trigger.rb +11 -16
- data/lib/ittybit/types/{confirmation_response_data.rb → confirmation.rb} +11 -9
- data/lib/ittybit/types/confirmation_response.rb +20 -7
- data/lib/ittybit/types/file.rb +64 -68
- data/lib/ittybit/types/file_kind.rb +0 -1
- data/lib/ittybit/types/file_list_response.rb +15 -2
- data/lib/ittybit/types/file_object.rb +0 -1
- data/lib/ittybit/types/file_response.rb +15 -2
- data/lib/ittybit/types/file_status.rb +0 -1
- data/lib/ittybit/types/links.rb +4 -4
- data/lib/ittybit/types/links_list.rb +17 -32
- data/lib/ittybit/types/media.rb +34 -56
- data/lib/ittybit/types/media_kind.rb +0 -1
- data/lib/ittybit/types/media_list_response.rb +15 -2
- data/lib/ittybit/types/media_response.rb +15 -2
- data/lib/ittybit/types/media_source.rb +52 -53
- data/lib/ittybit/types/media_source_kind.rb +0 -1
- data/lib/ittybit/types/media_source_object.rb +0 -1
- data/lib/ittybit/types/media_source_orientation.rb +9 -0
- data/lib/ittybit/types/media_source_status.rb +0 -1
- data/lib/ittybit/types/meta_list.rb +40 -15
- data/lib/ittybit/types/meta_list_type.rb +8 -0
- data/lib/ittybit/types/signature.rb +14 -14
- data/lib/ittybit/types/signature_response.rb +15 -2
- data/lib/ittybit/types/task.rb +30 -50
- data/lib/ittybit/types/task_list_response.rb +15 -2
- data/lib/ittybit/types/task_response.rb +15 -2
- data/lib/ittybit/types/task_status.rb +0 -1
- data/lib/ittybit/types/task_summary.rb +20 -20
- data/lib/ittybit/types/task_summary_kind.rb +9 -13
- data/lib/ittybit/types/task_summary_status.rb +0 -1
- data/lib/ittybit/types/workflow_task_step.rb +61 -29
- data/lib/ittybit/types/workflow_task_step_kind.rb +9 -13
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +3 -6
- metadata +5 -8
- data/lib/ittybit/files/types/files_delete_response.rb +0 -89
- data/lib/ittybit/files/types/files_delete_response_data.rb +0 -60
- data/lib/ittybit/types/automation_trigger_conditions_item.rb +0 -65
- data/lib/ittybit/types/error_response.rb +0 -74
- data/lib/ittybit/types/media_urls.rb +0 -70
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "meta_list"
|
4
4
|
require_relative "media"
|
5
|
+
require_relative "error"
|
5
6
|
require_relative "links_list"
|
6
7
|
require "ostruct"
|
7
8
|
require "json"
|
@@ -12,6 +13,8 @@ module Ittybit
|
|
12
13
|
attr_reader :meta
|
13
14
|
# @return [Array<Ittybit::Media>]
|
14
15
|
attr_reader :data
|
16
|
+
# @return [Ittybit::Error]
|
17
|
+
attr_reader :error
|
15
18
|
# @return [Ittybit::LinksList]
|
16
19
|
attr_reader :links
|
17
20
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -24,15 +27,17 @@ module Ittybit
|
|
24
27
|
|
25
28
|
# @param meta [Ittybit::MetaList]
|
26
29
|
# @param data [Array<Ittybit::Media>]
|
30
|
+
# @param error [Ittybit::Error]
|
27
31
|
# @param links [Ittybit::LinksList]
|
28
32
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
33
|
# @return [Ittybit::MediaListResponse]
|
30
|
-
def initialize(meta: OMIT, data: OMIT, links: OMIT, additional_properties: nil)
|
34
|
+
def initialize(meta: OMIT, data: OMIT, error: OMIT, links: OMIT, additional_properties: nil)
|
31
35
|
@meta = meta if meta != OMIT
|
32
36
|
@data = data if data != OMIT
|
37
|
+
@error = error if error != OMIT
|
33
38
|
@links = links if links != OMIT
|
34
39
|
@additional_properties = additional_properties
|
35
|
-
@_field_set = { "meta": meta, "data": data, "links": links }.reject do |_k, v|
|
40
|
+
@_field_set = { "meta": meta, "data": data, "error": error, "links": links }.reject do |_k, v|
|
36
41
|
v == OMIT
|
37
42
|
end
|
38
43
|
end
|
@@ -54,6 +59,12 @@ module Ittybit
|
|
54
59
|
item = item.to_json
|
55
60
|
Ittybit::Media.from_json(json_object: item)
|
56
61
|
end
|
62
|
+
if parsed_json["error"].nil?
|
63
|
+
error = nil
|
64
|
+
else
|
65
|
+
error = parsed_json["error"].to_json
|
66
|
+
error = Ittybit::Error.from_json(json_object: error)
|
67
|
+
end
|
57
68
|
if parsed_json["links"].nil?
|
58
69
|
links = nil
|
59
70
|
else
|
@@ -63,6 +74,7 @@ module Ittybit
|
|
63
74
|
new(
|
64
75
|
meta: meta,
|
65
76
|
data: data,
|
77
|
+
error: error,
|
66
78
|
links: links,
|
67
79
|
additional_properties: struct
|
68
80
|
)
|
@@ -84,6 +96,7 @@ module Ittybit
|
|
84
96
|
def self.validate_raw(obj:)
|
85
97
|
obj.meta.nil? || Ittybit::MetaList.validate_raw(obj: obj.meta)
|
86
98
|
obj.data&.is_a?(Array) != false || raise("Passed value for field obj.data is not the expected type, validation failed.")
|
99
|
+
obj.error.nil? || Ittybit::Error.validate_raw(obj: obj.error)
|
87
100
|
obj.links.nil? || Ittybit::LinksList.validate_raw(obj: obj.links)
|
88
101
|
end
|
89
102
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "meta"
|
4
4
|
require_relative "media"
|
5
|
+
require_relative "error"
|
5
6
|
require_relative "links"
|
6
7
|
require "ostruct"
|
7
8
|
require "json"
|
@@ -12,6 +13,8 @@ module Ittybit
|
|
12
13
|
attr_reader :meta
|
13
14
|
# @return [Ittybit::Media]
|
14
15
|
attr_reader :data
|
16
|
+
# @return [Ittybit::Error]
|
17
|
+
attr_reader :error
|
15
18
|
# @return [Ittybit::Links]
|
16
19
|
attr_reader :links
|
17
20
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -24,15 +27,17 @@ module Ittybit
|
|
24
27
|
|
25
28
|
# @param meta [Ittybit::META]
|
26
29
|
# @param data [Ittybit::Media]
|
30
|
+
# @param error [Ittybit::Error]
|
27
31
|
# @param links [Ittybit::Links]
|
28
32
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
33
|
# @return [Ittybit::MediaResponse]
|
30
|
-
def initialize(meta: OMIT, data: OMIT, links: OMIT, additional_properties: nil)
|
34
|
+
def initialize(meta: OMIT, data: OMIT, error: OMIT, links: OMIT, additional_properties: nil)
|
31
35
|
@meta = meta if meta != OMIT
|
32
36
|
@data = data if data != OMIT
|
37
|
+
@error = error if error != OMIT
|
33
38
|
@links = links if links != OMIT
|
34
39
|
@additional_properties = additional_properties
|
35
|
-
@_field_set = { "meta": meta, "data": data, "links": links }.reject do |_k, v|
|
40
|
+
@_field_set = { "meta": meta, "data": data, "error": error, "links": links }.reject do |_k, v|
|
36
41
|
v == OMIT
|
37
42
|
end
|
38
43
|
end
|
@@ -51,6 +56,12 @@ module Ittybit
|
|
51
56
|
data = parsed_json["data"].to_json
|
52
57
|
data = Ittybit::Media.from_json(json_object: data)
|
53
58
|
end
|
59
|
+
if parsed_json["error"].nil?
|
60
|
+
error = nil
|
61
|
+
else
|
62
|
+
error = parsed_json["error"].to_json
|
63
|
+
error = Ittybit::Error.from_json(json_object: error)
|
64
|
+
end
|
54
65
|
if parsed_json["links"].nil?
|
55
66
|
links = nil
|
56
67
|
else
|
@@ -60,6 +71,7 @@ module Ittybit
|
|
60
71
|
new(
|
61
72
|
meta: meta,
|
62
73
|
data: data,
|
74
|
+
error: error,
|
63
75
|
links: links,
|
64
76
|
additional_properties: struct
|
65
77
|
)
|
@@ -81,6 +93,7 @@ module Ittybit
|
|
81
93
|
def self.validate_raw(obj:)
|
82
94
|
obj.meta&.is_a?(Object) != false || raise("Passed value for field obj.meta is not the expected type, validation failed.")
|
83
95
|
obj.data.nil? || Ittybit::Media.validate_raw(obj: obj.data)
|
96
|
+
obj.error.nil? || Ittybit::Error.validate_raw(obj: obj.error)
|
84
97
|
obj.links.nil? || Ittybit::Links.validate_raw(obj: obj.links)
|
85
98
|
end
|
86
99
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "media_source_object"
|
4
4
|
require_relative "media_source_kind"
|
5
|
+
require_relative "media_source_orientation"
|
5
6
|
require "date"
|
6
7
|
require_relative "media_source_status"
|
7
8
|
require "ostruct"
|
@@ -9,56 +10,55 @@ require "json"
|
|
9
10
|
|
10
11
|
module Ittybit
|
11
12
|
class MediaSource
|
12
|
-
# @return [String]
|
13
|
+
# @return [String]
|
13
14
|
attr_reader :id
|
14
|
-
# @return [Ittybit::MediaSourceObject]
|
15
|
+
# @return [Ittybit::MediaSourceObject]
|
15
16
|
attr_reader :object
|
16
|
-
# @return [Ittybit::MediaSourceKind]
|
17
|
+
# @return [Ittybit::MediaSourceKind]
|
17
18
|
attr_reader :kind
|
18
|
-
# @return [String]
|
19
|
+
# @return [String]
|
19
20
|
attr_reader :type
|
20
|
-
# @return [String]
|
21
|
+
# @return [String]
|
21
22
|
attr_reader :codec
|
22
|
-
# @return [String]
|
23
|
+
# @return [String]
|
23
24
|
attr_reader :container
|
24
|
-
# @return [Integer]
|
25
|
+
# @return [Integer]
|
25
26
|
attr_reader :width
|
26
|
-
# @return [Integer]
|
27
|
+
# @return [Integer]
|
27
28
|
attr_reader :height
|
28
|
-
# @return [
|
29
|
+
# @return [Ittybit::MediaSourceOrientation]
|
29
30
|
attr_reader :orientation
|
30
|
-
# @return [Float]
|
31
|
+
# @return [Float]
|
31
32
|
attr_reader :rotation
|
32
|
-
# @return [Boolean]
|
33
|
+
# @return [Boolean]
|
33
34
|
attr_reader :transparency
|
34
|
-
# @return [Integer]
|
35
|
+
# @return [Integer]
|
35
36
|
attr_reader :frames
|
36
|
-
# @return [Float]
|
37
|
+
# @return [Float]
|
37
38
|
attr_reader :duration
|
38
|
-
# @return [Float]
|
39
|
+
# @return [Float]
|
39
40
|
attr_reader :fps
|
40
|
-
# @return [Integer]
|
41
|
+
# @return [Integer]
|
41
42
|
attr_reader :filesize
|
42
|
-
# @return [Integer]
|
43
|
+
# @return [Integer]
|
43
44
|
attr_reader :bitrate
|
44
|
-
# @return [String]
|
45
|
-
# media `urls` object.
|
45
|
+
# @return [String]
|
46
46
|
attr_reader :ref
|
47
|
-
# @return [String]
|
47
|
+
# @return [String]
|
48
48
|
attr_reader :folder
|
49
|
-
# @return [String]
|
49
|
+
# @return [String]
|
50
50
|
attr_reader :filename
|
51
|
-
# @return [String]
|
51
|
+
# @return [String]
|
52
52
|
attr_reader :url
|
53
|
-
# @return [Hash{String => Object}]
|
53
|
+
# @return [Hash{String => Object}]
|
54
54
|
attr_reader :metadata
|
55
|
-
# @return [Boolean]
|
55
|
+
# @return [Boolean]
|
56
56
|
attr_reader :original
|
57
|
-
# @return [DateTime]
|
57
|
+
# @return [DateTime]
|
58
58
|
attr_reader :created
|
59
|
-
# @return [DateTime]
|
59
|
+
# @return [DateTime]
|
60
60
|
attr_reader :updated
|
61
|
-
# @return [Ittybit::MediaSourceStatus]
|
61
|
+
# @return [Ittybit::MediaSourceStatus]
|
62
62
|
attr_reader :status
|
63
63
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
64
64
|
attr_reader :additional_properties
|
@@ -68,32 +68,31 @@ module Ittybit
|
|
68
68
|
|
69
69
|
OMIT = Object.new
|
70
70
|
|
71
|
-
# @param id [String]
|
72
|
-
# @param object [Ittybit::MediaSourceObject]
|
73
|
-
# @param kind [Ittybit::MediaSourceKind]
|
74
|
-
# @param type [String]
|
75
|
-
# @param codec [String]
|
76
|
-
# @param container [String]
|
77
|
-
# @param width [Integer]
|
78
|
-
# @param height [Integer]
|
79
|
-
# @param orientation [
|
80
|
-
# @param rotation [Float]
|
81
|
-
# @param transparency [Boolean]
|
82
|
-
# @param frames [Integer]
|
83
|
-
# @param duration [Float]
|
84
|
-
# @param fps [Float]
|
85
|
-
# @param filesize [Integer]
|
86
|
-
# @param bitrate [Integer]
|
87
|
-
# @param ref [String]
|
88
|
-
#
|
89
|
-
# @param
|
90
|
-
# @param
|
91
|
-
# @param
|
92
|
-
# @param
|
93
|
-
# @param
|
94
|
-
# @param
|
95
|
-
# @param
|
96
|
-
# @param status [Ittybit::MediaSourceStatus] Processing status of the file.
|
71
|
+
# @param id [String]
|
72
|
+
# @param object [Ittybit::MediaSourceObject]
|
73
|
+
# @param kind [Ittybit::MediaSourceKind]
|
74
|
+
# @param type [String]
|
75
|
+
# @param codec [String]
|
76
|
+
# @param container [String]
|
77
|
+
# @param width [Integer]
|
78
|
+
# @param height [Integer]
|
79
|
+
# @param orientation [Ittybit::MediaSourceOrientation]
|
80
|
+
# @param rotation [Float]
|
81
|
+
# @param transparency [Boolean]
|
82
|
+
# @param frames [Integer]
|
83
|
+
# @param duration [Float]
|
84
|
+
# @param fps [Float]
|
85
|
+
# @param filesize [Integer]
|
86
|
+
# @param bitrate [Integer]
|
87
|
+
# @param ref [String]
|
88
|
+
# @param folder [String]
|
89
|
+
# @param filename [String]
|
90
|
+
# @param url [String]
|
91
|
+
# @param metadata [Hash{String => Object}]
|
92
|
+
# @param original [Boolean]
|
93
|
+
# @param created [DateTime]
|
94
|
+
# @param updated [DateTime]
|
95
|
+
# @param status [Ittybit::MediaSourceStatus]
|
97
96
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
98
97
|
# @return [Ittybit::MediaSource]
|
99
98
|
def initialize(id:, object:, kind:, type:, filesize:, url:, created:, updated:, status:, codec: OMIT, container: OMIT, width: OMIT, height: OMIT,
|
@@ -239,7 +238,7 @@ module Ittybit
|
|
239
238
|
obj.container&.is_a?(String) != false || raise("Passed value for field obj.container is not the expected type, validation failed.")
|
240
239
|
obj.width&.is_a?(Integer) != false || raise("Passed value for field obj.width is not the expected type, validation failed.")
|
241
240
|
obj.height&.is_a?(Integer) != false || raise("Passed value for field obj.height is not the expected type, validation failed.")
|
242
|
-
obj.orientation&.is_a?(
|
241
|
+
obj.orientation&.is_a?(Ittybit::MediaSourceOrientation) != false || raise("Passed value for field obj.orientation is not the expected type, validation failed.")
|
243
242
|
obj.rotation&.is_a?(Float) != false || raise("Passed value for field obj.rotation is not the expected type, validation failed.")
|
244
243
|
obj.transparency&.is_a?(Boolean) != false || raise("Passed value for field obj.transparency is not the expected type, validation failed.")
|
245
244
|
obj.frames&.is_a?(Integer) != false || raise("Passed value for field obj.frames is not the expected type, validation failed.")
|
@@ -1,21 +1,28 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "meta_list_type"
|
3
4
|
require "ostruct"
|
4
5
|
require "json"
|
5
6
|
|
6
7
|
module Ittybit
|
7
8
|
class MetaList
|
8
|
-
# @return [String]
|
9
|
+
# @return [String]
|
9
10
|
attr_reader :request_id
|
10
|
-
# @return [String]
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :org_id
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :project_id
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :version
|
17
|
+
# @return [Ittybit::MetaListType]
|
11
18
|
attr_reader :type
|
12
|
-
# @return [Integer]
|
19
|
+
# @return [Integer]
|
13
20
|
attr_reader :limit
|
14
|
-
# @return [Integer]
|
21
|
+
# @return [Integer]
|
15
22
|
attr_reader :total
|
16
|
-
# @return [Integer]
|
23
|
+
# @return [Integer]
|
17
24
|
attr_reader :page
|
18
|
-
# @return [Integer]
|
25
|
+
# @return [Integer]
|
19
26
|
attr_reader :pages
|
20
27
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
21
28
|
attr_reader :additional_properties
|
@@ -25,17 +32,23 @@ module Ittybit
|
|
25
32
|
|
26
33
|
OMIT = Object.new
|
27
34
|
|
28
|
-
# @param request_id [String]
|
29
|
-
# @param
|
30
|
-
# @param
|
31
|
-
# @param
|
32
|
-
# @param
|
33
|
-
# @param
|
35
|
+
# @param request_id [String]
|
36
|
+
# @param org_id [String]
|
37
|
+
# @param project_id [String]
|
38
|
+
# @param version [String]
|
39
|
+
# @param type [Ittybit::MetaListType]
|
40
|
+
# @param limit [Integer]
|
41
|
+
# @param total [Integer]
|
42
|
+
# @param page [Integer]
|
43
|
+
# @param pages [Integer]
|
34
44
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
35
45
|
# @return [Ittybit::MetaList]
|
36
|
-
def initialize(request_id: OMIT,
|
37
|
-
additional_properties: nil)
|
46
|
+
def initialize(request_id: OMIT, org_id: OMIT, project_id: OMIT, version: OMIT, type: OMIT, limit: OMIT,
|
47
|
+
total: OMIT, page: OMIT, pages: OMIT, additional_properties: nil)
|
38
48
|
@request_id = request_id if request_id != OMIT
|
49
|
+
@org_id = org_id if org_id != OMIT
|
50
|
+
@project_id = project_id if project_id != OMIT
|
51
|
+
@version = version if version != OMIT
|
39
52
|
@type = type if type != OMIT
|
40
53
|
@limit = limit if limit != OMIT
|
41
54
|
@total = total if total != OMIT
|
@@ -44,6 +57,9 @@ module Ittybit
|
|
44
57
|
@additional_properties = additional_properties
|
45
58
|
@_field_set = {
|
46
59
|
"request_id": request_id,
|
60
|
+
"org_id": org_id,
|
61
|
+
"project_id": project_id,
|
62
|
+
"version": version,
|
47
63
|
"type": type,
|
48
64
|
"limit": limit,
|
49
65
|
"total": total,
|
@@ -62,6 +78,9 @@ module Ittybit
|
|
62
78
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
63
79
|
parsed_json = JSON.parse(json_object)
|
64
80
|
request_id = parsed_json["request_id"]
|
81
|
+
org_id = parsed_json["org_id"]
|
82
|
+
project_id = parsed_json["project_id"]
|
83
|
+
version = parsed_json["version"]
|
65
84
|
type = parsed_json["type"]
|
66
85
|
limit = parsed_json["limit"]
|
67
86
|
total = parsed_json["total"]
|
@@ -69,6 +88,9 @@ module Ittybit
|
|
69
88
|
pages = parsed_json["pages"]
|
70
89
|
new(
|
71
90
|
request_id: request_id,
|
91
|
+
org_id: org_id,
|
92
|
+
project_id: project_id,
|
93
|
+
version: version,
|
72
94
|
type: type,
|
73
95
|
limit: limit,
|
74
96
|
total: total,
|
@@ -93,7 +115,10 @@ module Ittybit
|
|
93
115
|
# @return [Void]
|
94
116
|
def self.validate_raw(obj:)
|
95
117
|
obj.request_id&.is_a?(String) != false || raise("Passed value for field obj.request_id is not the expected type, validation failed.")
|
96
|
-
obj.
|
118
|
+
obj.org_id&.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.")
|
119
|
+
obj.project_id&.is_a?(String) != false || raise("Passed value for field obj.project_id is not the expected type, validation failed.")
|
120
|
+
obj.version&.is_a?(String) != false || raise("Passed value for field obj.version is not the expected type, validation failed.")
|
121
|
+
obj.type&.is_a?(Ittybit::MetaListType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
97
122
|
obj.limit&.is_a?(Integer) != false || raise("Passed value for field obj.limit is not the expected type, validation failed.")
|
98
123
|
obj.total&.is_a?(Integer) != false || raise("Passed value for field obj.total is not the expected type, validation failed.")
|
99
124
|
obj.page&.is_a?(Integer) != false || raise("Passed value for field obj.page is not the expected type, validation failed.")
|
@@ -5,19 +5,19 @@ require "json"
|
|
5
5
|
|
6
6
|
module Ittybit
|
7
7
|
class Signature
|
8
|
-
# @return [String]
|
8
|
+
# @return [String]
|
9
9
|
attr_reader :domain
|
10
|
-
# @return [String]
|
10
|
+
# @return [String]
|
11
11
|
attr_reader :filename
|
12
|
-
# @return [String]
|
12
|
+
# @return [String]
|
13
13
|
attr_reader :folder
|
14
|
-
# @return [Integer]
|
14
|
+
# @return [Integer]
|
15
15
|
attr_reader :expiry
|
16
|
-
# @return [String]
|
16
|
+
# @return [String]
|
17
17
|
attr_reader :method
|
18
|
-
# @return [String]
|
18
|
+
# @return [String]
|
19
19
|
attr_reader :signature
|
20
|
-
# @return [String]
|
20
|
+
# @return [String]
|
21
21
|
attr_reader :url
|
22
22
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
23
23
|
attr_reader :additional_properties
|
@@ -27,13 +27,13 @@ module Ittybit
|
|
27
27
|
|
28
28
|
OMIT = Object.new
|
29
29
|
|
30
|
-
# @param domain [String]
|
31
|
-
# @param filename [String]
|
32
|
-
# @param folder [String]
|
33
|
-
# @param expiry [Integer]
|
34
|
-
# @param method [String]
|
35
|
-
# @param signature [String]
|
36
|
-
# @param url [String]
|
30
|
+
# @param domain [String]
|
31
|
+
# @param filename [String]
|
32
|
+
# @param folder [String]
|
33
|
+
# @param expiry [Integer]
|
34
|
+
# @param method [String]
|
35
|
+
# @param signature [String]
|
36
|
+
# @param url [String]
|
37
37
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
38
38
|
# @return [Ittybit::Signature]
|
39
39
|
def initialize(domain:, filename:, expiry:, method:, signature:, url:, folder: OMIT, additional_properties: nil)
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "meta"
|
4
4
|
require_relative "signature"
|
5
|
+
require_relative "error"
|
5
6
|
require_relative "links"
|
6
7
|
require "ostruct"
|
7
8
|
require "json"
|
@@ -12,6 +13,8 @@ module Ittybit
|
|
12
13
|
attr_reader :meta
|
13
14
|
# @return [Ittybit::Signature]
|
14
15
|
attr_reader :data
|
16
|
+
# @return [Ittybit::Error]
|
17
|
+
attr_reader :error
|
15
18
|
# @return [Ittybit::Links]
|
16
19
|
attr_reader :links
|
17
20
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -24,15 +27,17 @@ module Ittybit
|
|
24
27
|
|
25
28
|
# @param meta [Ittybit::META]
|
26
29
|
# @param data [Ittybit::Signature]
|
30
|
+
# @param error [Ittybit::Error]
|
27
31
|
# @param links [Ittybit::Links]
|
28
32
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
33
|
# @return [Ittybit::SignatureResponse]
|
30
|
-
def initialize(meta: OMIT, data: OMIT, links: OMIT, additional_properties: nil)
|
34
|
+
def initialize(meta: OMIT, data: OMIT, error: OMIT, links: OMIT, additional_properties: nil)
|
31
35
|
@meta = meta if meta != OMIT
|
32
36
|
@data = data if data != OMIT
|
37
|
+
@error = error if error != OMIT
|
33
38
|
@links = links if links != OMIT
|
34
39
|
@additional_properties = additional_properties
|
35
|
-
@_field_set = { "meta": meta, "data": data, "links": links }.reject do |_k, v|
|
40
|
+
@_field_set = { "meta": meta, "data": data, "error": error, "links": links }.reject do |_k, v|
|
36
41
|
v == OMIT
|
37
42
|
end
|
38
43
|
end
|
@@ -51,6 +56,12 @@ module Ittybit
|
|
51
56
|
data = parsed_json["data"].to_json
|
52
57
|
data = Ittybit::Signature.from_json(json_object: data)
|
53
58
|
end
|
59
|
+
if parsed_json["error"].nil?
|
60
|
+
error = nil
|
61
|
+
else
|
62
|
+
error = parsed_json["error"].to_json
|
63
|
+
error = Ittybit::Error.from_json(json_object: error)
|
64
|
+
end
|
54
65
|
if parsed_json["links"].nil?
|
55
66
|
links = nil
|
56
67
|
else
|
@@ -60,6 +71,7 @@ module Ittybit
|
|
60
71
|
new(
|
61
72
|
meta: meta,
|
62
73
|
data: data,
|
74
|
+
error: error,
|
63
75
|
links: links,
|
64
76
|
additional_properties: struct
|
65
77
|
)
|
@@ -81,6 +93,7 @@ module Ittybit
|
|
81
93
|
def self.validate_raw(obj:)
|
82
94
|
obj.meta&.is_a?(Object) != false || raise("Passed value for field obj.meta is not the expected type, validation failed.")
|
83
95
|
obj.data.nil? || Ittybit::Signature.validate_raw(obj: obj.data)
|
96
|
+
obj.error.nil? || Ittybit::Error.validate_raw(obj: obj.error)
|
84
97
|
obj.links.nil? || Ittybit::Links.validate_raw(obj: obj.links)
|
85
98
|
end
|
86
99
|
end
|