approveapi_swagger 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/doc/ApproveAPISwagger/AnswerMetadata.html +789 -0
- data/doc/ApproveAPISwagger/ApiClient.html +1032 -0
- data/doc/ApproveAPISwagger/ApiError.html +224 -0
- data/doc/ApproveAPISwagger/ApproveApi.html +501 -0
- data/doc/ApproveAPISwagger/Configuration.html +941 -0
- data/doc/ApproveAPISwagger/CreatePromptRequest.html +879 -0
- data/doc/ApproveAPISwagger/Error.html +754 -0
- data/doc/ApproveAPISwagger/Prompt.html +819 -0
- data/doc/ApproveAPISwagger/PromptAnswer.html +799 -0
- data/doc/ApproveAPISwagger/PromptMetadata.html +829 -0
- data/doc/ApproveAPISwagger/PromptStatus.html +754 -0
- data/doc/ApproveAPISwagger.html +185 -0
- data/doc/Gemfile.html +120 -0
- data/doc/Gemfile_lock.html +194 -0
- data/doc/README_md.html +225 -0
- data/doc/Rakefile.html +125 -0
- data/doc/approveapi_swagger_gemspec.html +161 -0
- data/doc/created.rid +39 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/docs/AnswerMetadata_md.html +123 -0
- data/doc/docs/ApproveApi_md.html +293 -0
- data/doc/docs/CreatePromptRequest_md.html +123 -0
- data/doc/docs/Error_md.html +123 -0
- data/doc/docs/PromptAnswer_md.html +123 -0
- data/doc/docs/PromptMetadata_md.html +123 -0
- data/doc/docs/PromptStatus_md.html +123 -0
- data/doc/docs/Prompt_md.html +123 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/git_push_sh.html +157 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +141 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +141 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +229 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +1036 -0
- data/docs/AnswerMetadata.md +1 -1
- data/docs/CreatePromptRequest.md +3 -3
- data/docs/Prompt.md +3 -3
- data/docs/PromptAnswer.md +1 -1
- data/docs/PromptMetadata.md +2 -2
- data/docs/PromptStatus.md +1 -0
- data/lib/approveapi_swagger/api/approve_api.rb +1 -0
- data/lib/approveapi_swagger/models/answer_metadata.rb +15 -13
- data/lib/approveapi_swagger/models/create_prompt_request.rb +35 -33
- data/lib/approveapi_swagger/models/error.rb +2 -0
- data/lib/approveapi_swagger/models/prompt.rb +33 -26
- data/lib/approveapi_swagger/models/prompt_answer.rb +18 -16
- data/lib/approveapi_swagger/models/prompt_metadata.rb +26 -24
- data/lib/approveapi_swagger/models/prompt_status.rb +21 -4
- data/lib/approveapi_swagger/version.rb +1 -1
- data/pkg/approveapi_swagger-1.0.2.gem +0 -0
- metadata +78 -7
- data/pkg/approveapi_swagger-1.0.1.gem +0 -0
data/docs/AnswerMetadata.md
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
+
**operating_system** | **String** | | [optional]
|
6
7
|
**ip_address** | **String** | | [optional]
|
7
8
|
**browser** | **String** | | [optional]
|
8
|
-
**operating_system** | **String** | | [optional]
|
9
9
|
|
10
10
|
|
data/docs/CreatePromptRequest.md
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**user** | **String** | The user to send the approval request to. Can be either an email address or a phone number. |
|
7
6
|
**body** | **String** | The body of the approval request to show the user. |
|
8
7
|
**title** | **String** | The title of an approval request. Defaults to an empty string. | [optional]
|
9
|
-
**approve_text** | **String** | The approve action text. Defaults to 'Approve'. | [optional]
|
10
8
|
**reject_text** | **String** | The reject action text. Defaults to 'Reject'. | [optional]
|
11
|
-
**long_poll** | **BOOLEAN** | If true, the request waits (long-polls) until the user responds to the prompt or more than 10 minutes pass. Defaults to false. | [optional]
|
12
9
|
**expires_in** | **Float** | The number of seconds until this request can no longer be answered. | [optional]
|
10
|
+
**long_poll** | **BOOLEAN** | If true, the request waits (long-polls) until the user responds to the prompt or more than 10 minutes pass. Defaults to false. | [optional]
|
11
|
+
**user** | **String** | The user to send the approval request to. Can be either an email address or a phone number. |
|
12
|
+
**approve_text** | **String** | The approve action text. Defaults to 'Approve'. | [optional]
|
13
13
|
**metadata** | [**PromptMetadata**](PromptMetadata.md) | | [optional]
|
14
14
|
|
15
15
|
|
data/docs/Prompt.md
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**id** | **String** | A unique id for this prompt. |
|
7
|
-
**sent_at** | **Float** | The unix timestamp when this prompt was sent. |
|
8
|
-
**expires_at** | **Float** | The unix timestamp when this prompt can no longer be answered. | [optional]
|
9
6
|
**answer** | [**PromptAnswer**](PromptAnswer.md) | | [optional]
|
7
|
+
**sent_at** | **Float** | The unix timestamp when this prompt was sent. |
|
8
|
+
**is_expired** | **BOOLEAN** | Whether the prompt can still be answered. |
|
9
|
+
**id** | **String** | A unique id for this prompt. |
|
10
10
|
**metadata** | [**PromptMetadata**](PromptMetadata.md) | | [optional]
|
11
11
|
|
12
12
|
|
data/docs/PromptAnswer.md
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**result** | **BOOLEAN** | The user's answer to whether or not they approve this prompt. |
|
7
6
|
**time** | **Float** | The unix timestamp when the user answered the prompt. |
|
7
|
+
**result** | **BOOLEAN** | The user's answer to whether or not they approve this prompt. |
|
8
8
|
**metadata** | [**AnswerMetadata**](AnswerMetadata.md) | | [optional]
|
9
9
|
|
10
10
|
|
data/docs/PromptMetadata.md
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**location** | **String** | The physical location, like Oakland, CA, of the action. | [optional]
|
7
6
|
**time** | **String** | The date/time of the action. | [optional]
|
7
|
+
**operating_system** | **String** | The operating system initiating the action, i.e. Mac OS X. | [optional]
|
8
8
|
**ip_address** | **String** | The IP address of the computer initiating the action. | [optional]
|
9
|
+
**location** | **String** | The physical location, like Oakland, CA, of the action. | [optional]
|
9
10
|
**browser** | **String** | The web browser initiating the action, i.e. Chrome. | [optional]
|
10
|
-
**operating_system** | **String** | The operating system initiating the action, i.e. Mac OS X. | [optional]
|
11
11
|
|
12
12
|
|
data/docs/PromptStatus.md
CHANGED
@@ -14,27 +14,27 @@ require 'date'
|
|
14
14
|
|
15
15
|
module ApproveAPISwagger
|
16
16
|
class AnswerMetadata
|
17
|
+
attr_accessor :operating_system
|
18
|
+
|
17
19
|
attr_accessor :ip_address
|
18
20
|
|
19
21
|
attr_accessor :browser
|
20
22
|
|
21
|
-
attr_accessor :operating_system
|
22
|
-
|
23
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
24
|
def self.attribute_map
|
25
25
|
{
|
26
|
+
:'operating_system' => :'operating_system',
|
26
27
|
:'ip_address' => :'ip_address',
|
27
|
-
:'browser' => :'browser'
|
28
|
-
:'operating_system' => :'operating_system'
|
28
|
+
:'browser' => :'browser'
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|
32
32
|
# Attribute type mapping.
|
33
33
|
def self.openapi_types
|
34
34
|
{
|
35
|
+
:'operating_system' => :'String',
|
35
36
|
:'ip_address' => :'String',
|
36
|
-
:'browser' => :'String'
|
37
|
-
:'operating_system' => :'String'
|
37
|
+
:'browser' => :'String'
|
38
38
|
}
|
39
39
|
end
|
40
40
|
|
@@ -46,6 +46,10 @@ module ApproveAPISwagger
|
|
46
46
|
# convert string to symbol for hash key
|
47
47
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
48
48
|
|
49
|
+
if attributes.has_key?(:'operating_system')
|
50
|
+
self.operating_system = attributes[:'operating_system']
|
51
|
+
end
|
52
|
+
|
49
53
|
if attributes.has_key?(:'ip_address')
|
50
54
|
self.ip_address = attributes[:'ip_address']
|
51
55
|
end
|
@@ -53,10 +57,6 @@ module ApproveAPISwagger
|
|
53
57
|
if attributes.has_key?(:'browser')
|
54
58
|
self.browser = attributes[:'browser']
|
55
59
|
end
|
56
|
-
|
57
|
-
if attributes.has_key?(:'operating_system')
|
58
|
-
self.operating_system = attributes[:'operating_system']
|
59
|
-
end
|
60
60
|
end
|
61
61
|
|
62
62
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -77,9 +77,9 @@ module ApproveAPISwagger
|
|
77
77
|
def ==(o)
|
78
78
|
return true if self.equal?(o)
|
79
79
|
self.class == o.class &&
|
80
|
+
operating_system == o.operating_system &&
|
80
81
|
ip_address == o.ip_address &&
|
81
|
-
browser == o.browser
|
82
|
-
operating_system == o.operating_system
|
82
|
+
browser == o.browser
|
83
83
|
end
|
84
84
|
|
85
85
|
# @see the `==` method
|
@@ -91,7 +91,7 @@ module ApproveAPISwagger
|
|
91
91
|
# Calculates hash code according to all attributes.
|
92
92
|
# @return [Fixnum] Hash code
|
93
93
|
def hash
|
94
|
-
[ip_address, browser
|
94
|
+
[operating_system, ip_address, browser].hash
|
95
95
|
end
|
96
96
|
|
97
97
|
# Builds the object from hash
|
@@ -203,5 +203,7 @@ module ApproveAPISwagger
|
|
203
203
|
value
|
204
204
|
end
|
205
205
|
end
|
206
|
+
|
206
207
|
end
|
208
|
+
|
207
209
|
end
|
@@ -14,39 +14,39 @@ require 'date'
|
|
14
14
|
|
15
15
|
module ApproveAPISwagger
|
16
16
|
class CreatePromptRequest
|
17
|
-
# The user to send the approval request to. Can be either an email address or a phone number.
|
18
|
-
attr_accessor :user
|
19
|
-
|
20
17
|
# The body of the approval request to show the user.
|
21
18
|
attr_accessor :body
|
22
19
|
|
23
20
|
# The title of an approval request. Defaults to an empty string.
|
24
21
|
attr_accessor :title
|
25
22
|
|
26
|
-
# The approve action text. Defaults to 'Approve'.
|
27
|
-
attr_accessor :approve_text
|
28
|
-
|
29
23
|
# The reject action text. Defaults to 'Reject'.
|
30
24
|
attr_accessor :reject_text
|
31
25
|
|
26
|
+
# The number of seconds until this request can no longer be answered.
|
27
|
+
attr_accessor :expires_in
|
28
|
+
|
32
29
|
# If true, the request waits (long-polls) until the user responds to the prompt or more than 10 minutes pass. Defaults to false.
|
33
30
|
attr_accessor :long_poll
|
34
31
|
|
35
|
-
# The
|
36
|
-
attr_accessor :
|
32
|
+
# The user to send the approval request to. Can be either an email address or a phone number.
|
33
|
+
attr_accessor :user
|
34
|
+
|
35
|
+
# The approve action text. Defaults to 'Approve'.
|
36
|
+
attr_accessor :approve_text
|
37
37
|
|
38
38
|
attr_accessor :metadata
|
39
39
|
|
40
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
41
|
def self.attribute_map
|
42
42
|
{
|
43
|
-
:'user' => :'user',
|
44
43
|
:'body' => :'body',
|
45
44
|
:'title' => :'title',
|
46
|
-
:'approve_text' => :'approve_text',
|
47
45
|
:'reject_text' => :'reject_text',
|
48
|
-
:'long_poll' => :'long_poll',
|
49
46
|
:'expires_in' => :'expires_in',
|
47
|
+
:'long_poll' => :'long_poll',
|
48
|
+
:'user' => :'user',
|
49
|
+
:'approve_text' => :'approve_text',
|
50
50
|
:'metadata' => :'metadata'
|
51
51
|
}
|
52
52
|
end
|
@@ -54,13 +54,13 @@ module ApproveAPISwagger
|
|
54
54
|
# Attribute type mapping.
|
55
55
|
def self.openapi_types
|
56
56
|
{
|
57
|
-
:'user' => :'String',
|
58
57
|
:'body' => :'String',
|
59
58
|
:'title' => :'String',
|
60
|
-
:'approve_text' => :'String',
|
61
59
|
:'reject_text' => :'String',
|
62
|
-
:'long_poll' => :'BOOLEAN',
|
63
60
|
:'expires_in' => :'Float',
|
61
|
+
:'long_poll' => :'BOOLEAN',
|
62
|
+
:'user' => :'String',
|
63
|
+
:'approve_text' => :'String',
|
64
64
|
:'metadata' => :'PromptMetadata'
|
65
65
|
}
|
66
66
|
end
|
@@ -73,10 +73,6 @@ module ApproveAPISwagger
|
|
73
73
|
# convert string to symbol for hash key
|
74
74
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
75
75
|
|
76
|
-
if attributes.has_key?(:'user')
|
77
|
-
self.user = attributes[:'user']
|
78
|
-
end
|
79
|
-
|
80
76
|
if attributes.has_key?(:'body')
|
81
77
|
self.body = attributes[:'body']
|
82
78
|
end
|
@@ -85,20 +81,24 @@ module ApproveAPISwagger
|
|
85
81
|
self.title = attributes[:'title']
|
86
82
|
end
|
87
83
|
|
88
|
-
if attributes.has_key?(:'approve_text')
|
89
|
-
self.approve_text = attributes[:'approve_text']
|
90
|
-
end
|
91
|
-
|
92
84
|
if attributes.has_key?(:'reject_text')
|
93
85
|
self.reject_text = attributes[:'reject_text']
|
94
86
|
end
|
95
87
|
|
88
|
+
if attributes.has_key?(:'expires_in')
|
89
|
+
self.expires_in = attributes[:'expires_in']
|
90
|
+
end
|
91
|
+
|
96
92
|
if attributes.has_key?(:'long_poll')
|
97
93
|
self.long_poll = attributes[:'long_poll']
|
98
94
|
end
|
99
95
|
|
100
|
-
if attributes.has_key?(:'
|
101
|
-
self.
|
96
|
+
if attributes.has_key?(:'user')
|
97
|
+
self.user = attributes[:'user']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.has_key?(:'approve_text')
|
101
|
+
self.approve_text = attributes[:'approve_text']
|
102
102
|
end
|
103
103
|
|
104
104
|
if attributes.has_key?(:'metadata')
|
@@ -110,22 +110,22 @@ module ApproveAPISwagger
|
|
110
110
|
# @return Array for valid properties with the reasons
|
111
111
|
def list_invalid_properties
|
112
112
|
invalid_properties = Array.new
|
113
|
-
if @user.nil?
|
114
|
-
invalid_properties.push('invalid value for "user", user cannot be nil.')
|
115
|
-
end
|
116
|
-
|
117
113
|
if @body.nil?
|
118
114
|
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
119
115
|
end
|
120
116
|
|
117
|
+
if @user.nil?
|
118
|
+
invalid_properties.push('invalid value for "user", user cannot be nil.')
|
119
|
+
end
|
120
|
+
|
121
121
|
invalid_properties
|
122
122
|
end
|
123
123
|
|
124
124
|
# Check to see if the all the properties in the model are valid
|
125
125
|
# @return true if the model is valid
|
126
126
|
def valid?
|
127
|
-
return false if @user.nil?
|
128
127
|
return false if @body.nil?
|
128
|
+
return false if @user.nil?
|
129
129
|
true
|
130
130
|
end
|
131
131
|
|
@@ -134,13 +134,13 @@ module ApproveAPISwagger
|
|
134
134
|
def ==(o)
|
135
135
|
return true if self.equal?(o)
|
136
136
|
self.class == o.class &&
|
137
|
-
user == o.user &&
|
138
137
|
body == o.body &&
|
139
138
|
title == o.title &&
|
140
|
-
approve_text == o.approve_text &&
|
141
139
|
reject_text == o.reject_text &&
|
142
|
-
long_poll == o.long_poll &&
|
143
140
|
expires_in == o.expires_in &&
|
141
|
+
long_poll == o.long_poll &&
|
142
|
+
user == o.user &&
|
143
|
+
approve_text == o.approve_text &&
|
144
144
|
metadata == o.metadata
|
145
145
|
end
|
146
146
|
|
@@ -153,7 +153,7 @@ module ApproveAPISwagger
|
|
153
153
|
# Calculates hash code according to all attributes.
|
154
154
|
# @return [Fixnum] Hash code
|
155
155
|
def hash
|
156
|
-
[
|
156
|
+
[body, title, reject_text, expires_in, long_poll, user, approve_text, metadata].hash
|
157
157
|
end
|
158
158
|
|
159
159
|
# Builds the object from hash
|
@@ -265,5 +265,7 @@ module ApproveAPISwagger
|
|
265
265
|
value
|
266
266
|
end
|
267
267
|
end
|
268
|
+
|
268
269
|
end
|
270
|
+
|
269
271
|
end
|
@@ -14,26 +14,26 @@ require 'date'
|
|
14
14
|
|
15
15
|
module ApproveAPISwagger
|
16
16
|
class Prompt
|
17
|
-
|
18
|
-
attr_accessor :id
|
17
|
+
attr_accessor :answer
|
19
18
|
|
20
19
|
# The unix timestamp when this prompt was sent.
|
21
20
|
attr_accessor :sent_at
|
22
21
|
|
23
|
-
#
|
24
|
-
attr_accessor :
|
22
|
+
# Whether the prompt can still be answered.
|
23
|
+
attr_accessor :is_expired
|
25
24
|
|
26
|
-
|
25
|
+
# A unique id for this prompt.
|
26
|
+
attr_accessor :id
|
27
27
|
|
28
28
|
attr_accessor :metadata
|
29
29
|
|
30
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
31
|
def self.attribute_map
|
32
32
|
{
|
33
|
-
:'id' => :'id',
|
34
|
-
:'sent_at' => :'sent_at',
|
35
|
-
:'expires_at' => :'expires_at',
|
36
33
|
:'answer' => :'answer',
|
34
|
+
:'sent_at' => :'sent_at',
|
35
|
+
:'is_expired' => :'is_expired',
|
36
|
+
:'id' => :'id',
|
37
37
|
:'metadata' => :'metadata'
|
38
38
|
}
|
39
39
|
end
|
@@ -41,10 +41,10 @@ module ApproveAPISwagger
|
|
41
41
|
# Attribute type mapping.
|
42
42
|
def self.openapi_types
|
43
43
|
{
|
44
|
-
:'id' => :'String',
|
45
|
-
:'sent_at' => :'Float',
|
46
|
-
:'expires_at' => :'Float',
|
47
44
|
:'answer' => :'PromptAnswer',
|
45
|
+
:'sent_at' => :'Float',
|
46
|
+
:'is_expired' => :'BOOLEAN',
|
47
|
+
:'id' => :'String',
|
48
48
|
:'metadata' => :'PromptMetadata'
|
49
49
|
}
|
50
50
|
end
|
@@ -57,20 +57,20 @@ module ApproveAPISwagger
|
|
57
57
|
# convert string to symbol for hash key
|
58
58
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
59
59
|
|
60
|
-
if attributes.has_key?(:'
|
61
|
-
self.
|
60
|
+
if attributes.has_key?(:'answer')
|
61
|
+
self.answer = attributes[:'answer']
|
62
62
|
end
|
63
63
|
|
64
64
|
if attributes.has_key?(:'sent_at')
|
65
65
|
self.sent_at = attributes[:'sent_at']
|
66
66
|
end
|
67
67
|
|
68
|
-
if attributes.has_key?(:'
|
69
|
-
self.
|
68
|
+
if attributes.has_key?(:'is_expired')
|
69
|
+
self.is_expired = attributes[:'is_expired']
|
70
70
|
end
|
71
71
|
|
72
|
-
if attributes.has_key?(:'
|
73
|
-
self.
|
72
|
+
if attributes.has_key?(:'id')
|
73
|
+
self.id = attributes[:'id']
|
74
74
|
end
|
75
75
|
|
76
76
|
if attributes.has_key?(:'metadata')
|
@@ -82,22 +82,27 @@ module ApproveAPISwagger
|
|
82
82
|
# @return Array for valid properties with the reasons
|
83
83
|
def list_invalid_properties
|
84
84
|
invalid_properties = Array.new
|
85
|
-
if @id.nil?
|
86
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
87
|
-
end
|
88
|
-
|
89
85
|
if @sent_at.nil?
|
90
86
|
invalid_properties.push('invalid value for "sent_at", sent_at cannot be nil.')
|
91
87
|
end
|
92
88
|
|
89
|
+
if @is_expired.nil?
|
90
|
+
invalid_properties.push('invalid value for "is_expired", is_expired cannot be nil.')
|
91
|
+
end
|
92
|
+
|
93
|
+
if @id.nil?
|
94
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
95
|
+
end
|
96
|
+
|
93
97
|
invalid_properties
|
94
98
|
end
|
95
99
|
|
96
100
|
# Check to see if the all the properties in the model are valid
|
97
101
|
# @return true if the model is valid
|
98
102
|
def valid?
|
99
|
-
return false if @id.nil?
|
100
103
|
return false if @sent_at.nil?
|
104
|
+
return false if @is_expired.nil?
|
105
|
+
return false if @id.nil?
|
101
106
|
true
|
102
107
|
end
|
103
108
|
|
@@ -106,10 +111,10 @@ module ApproveAPISwagger
|
|
106
111
|
def ==(o)
|
107
112
|
return true if self.equal?(o)
|
108
113
|
self.class == o.class &&
|
109
|
-
id == o.id &&
|
110
|
-
sent_at == o.sent_at &&
|
111
|
-
expires_at == o.expires_at &&
|
112
114
|
answer == o.answer &&
|
115
|
+
sent_at == o.sent_at &&
|
116
|
+
is_expired == o.is_expired &&
|
117
|
+
id == o.id &&
|
113
118
|
metadata == o.metadata
|
114
119
|
end
|
115
120
|
|
@@ -122,7 +127,7 @@ module ApproveAPISwagger
|
|
122
127
|
# Calculates hash code according to all attributes.
|
123
128
|
# @return [Fixnum] Hash code
|
124
129
|
def hash
|
125
|
-
[
|
130
|
+
[answer, sent_at, is_expired, id, metadata].hash
|
126
131
|
end
|
127
132
|
|
128
133
|
# Builds the object from hash
|
@@ -234,5 +239,7 @@ module ApproveAPISwagger
|
|
234
239
|
value
|
235
240
|
end
|
236
241
|
end
|
242
|
+
|
237
243
|
end
|
244
|
+
|
238
245
|
end
|
@@ -14,19 +14,19 @@ require 'date'
|
|
14
14
|
|
15
15
|
module ApproveAPISwagger
|
16
16
|
class PromptAnswer
|
17
|
-
# The user's answer to whether or not they approve this prompt.
|
18
|
-
attr_accessor :result
|
19
|
-
|
20
17
|
# The unix timestamp when the user answered the prompt.
|
21
18
|
attr_accessor :time
|
22
19
|
|
20
|
+
# The user's answer to whether or not they approve this prompt.
|
21
|
+
attr_accessor :result
|
22
|
+
|
23
23
|
attr_accessor :metadata
|
24
24
|
|
25
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
26
|
def self.attribute_map
|
27
27
|
{
|
28
|
-
:'result' => :'result',
|
29
28
|
:'time' => :'time',
|
29
|
+
:'result' => :'result',
|
30
30
|
:'metadata' => :'metadata'
|
31
31
|
}
|
32
32
|
end
|
@@ -34,8 +34,8 @@ module ApproveAPISwagger
|
|
34
34
|
# Attribute type mapping.
|
35
35
|
def self.openapi_types
|
36
36
|
{
|
37
|
-
:'result' => :'BOOLEAN',
|
38
37
|
:'time' => :'Float',
|
38
|
+
:'result' => :'BOOLEAN',
|
39
39
|
:'metadata' => :'AnswerMetadata'
|
40
40
|
}
|
41
41
|
end
|
@@ -48,14 +48,14 @@ module ApproveAPISwagger
|
|
48
48
|
# convert string to symbol for hash key
|
49
49
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
50
50
|
|
51
|
-
if attributes.has_key?(:'result')
|
52
|
-
self.result = attributes[:'result']
|
53
|
-
end
|
54
|
-
|
55
51
|
if attributes.has_key?(:'time')
|
56
52
|
self.time = attributes[:'time']
|
57
53
|
end
|
58
54
|
|
55
|
+
if attributes.has_key?(:'result')
|
56
|
+
self.result = attributes[:'result']
|
57
|
+
end
|
58
|
+
|
59
59
|
if attributes.has_key?(:'metadata')
|
60
60
|
self.metadata = attributes[:'metadata']
|
61
61
|
end
|
@@ -65,22 +65,22 @@ module ApproveAPISwagger
|
|
65
65
|
# @return Array for valid properties with the reasons
|
66
66
|
def list_invalid_properties
|
67
67
|
invalid_properties = Array.new
|
68
|
-
if @result.nil?
|
69
|
-
invalid_properties.push('invalid value for "result", result cannot be nil.')
|
70
|
-
end
|
71
|
-
|
72
68
|
if @time.nil?
|
73
69
|
invalid_properties.push('invalid value for "time", time cannot be nil.')
|
74
70
|
end
|
75
71
|
|
72
|
+
if @result.nil?
|
73
|
+
invalid_properties.push('invalid value for "result", result cannot be nil.')
|
74
|
+
end
|
75
|
+
|
76
76
|
invalid_properties
|
77
77
|
end
|
78
78
|
|
79
79
|
# Check to see if the all the properties in the model are valid
|
80
80
|
# @return true if the model is valid
|
81
81
|
def valid?
|
82
|
-
return false if @result.nil?
|
83
82
|
return false if @time.nil?
|
83
|
+
return false if @result.nil?
|
84
84
|
true
|
85
85
|
end
|
86
86
|
|
@@ -89,8 +89,8 @@ module ApproveAPISwagger
|
|
89
89
|
def ==(o)
|
90
90
|
return true if self.equal?(o)
|
91
91
|
self.class == o.class &&
|
92
|
-
result == o.result &&
|
93
92
|
time == o.time &&
|
93
|
+
result == o.result &&
|
94
94
|
metadata == o.metadata
|
95
95
|
end
|
96
96
|
|
@@ -103,7 +103,7 @@ module ApproveAPISwagger
|
|
103
103
|
# Calculates hash code according to all attributes.
|
104
104
|
# @return [Fixnum] Hash code
|
105
105
|
def hash
|
106
|
-
[
|
106
|
+
[time, result, metadata].hash
|
107
107
|
end
|
108
108
|
|
109
109
|
# Builds the object from hash
|
@@ -215,5 +215,7 @@ module ApproveAPISwagger
|
|
215
215
|
value
|
216
216
|
end
|
217
217
|
end
|
218
|
+
|
218
219
|
end
|
220
|
+
|
219
221
|
end
|