approveapi_swagger 1.0.0 → 1.0.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/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/docs/AnswerMetadata.md +1 -1
- data/docs/CreatePromptRequest.md +4 -3
- data/docs/Prompt.md +3 -2
- data/docs/PromptAnswer.md +1 -1
- data/docs/PromptMetadata.md +2 -2
- data/lib/approveapi_swagger/api/approve_api.rb +0 -1
- data/lib/approveapi_swagger/models/answer_metadata.rb +13 -15
- data/lib/approveapi_swagger/models/create_prompt_request.rb +45 -37
- data/lib/approveapi_swagger/models/error.rb +0 -2
- data/lib/approveapi_swagger/models/prompt.rb +29 -21
- data/lib/approveapi_swagger/models/prompt_answer.rb +16 -18
- data/lib/approveapi_swagger/models/prompt_metadata.rb +24 -26
- data/lib/approveapi_swagger/models/prompt_status.rb +0 -2
- data/lib/approveapi_swagger/version.rb +1 -1
- data/pkg/approveapi_swagger-1.0.1.gem +0 -0
- metadata +7 -7
- data/pkg/approveapi_swagger-1.0.0.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 563c3f6d2c2cb63261ad754f1a6eaea578822478537524453bf753a2390b2acd
|
|
4
|
+
data.tar.gz: 1cb1262188767e92e5489175245bc9335e5ad6450a7c34d955b09ce32a7e9e4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 597dacc3780bb0057db574be1c98ecdff466d65a2e3c65085b023a760b118d5255dd3256b001e349f2025dcc48ff42355c2d6675d9e78d0db946526d789fd15d
|
|
7
|
+
data.tar.gz: 8eeaf77e0077f8a634985491c4626ec10ac4c89e59b670496d205418701c8cde546427385c5470c479f297c9c8ae8a772308c9349013006444310fc659fffda7
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ The simple API to request a user's approval on anything via email + sms.
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: 1.0.0
|
|
10
|
-
- Package version: 1.0.
|
|
10
|
+
- Package version: 1.0.1
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
@@ -23,15 +23,15 @@ gem build approveapi_swagger.gemspec
|
|
|
23
23
|
Then either install the gem locally:
|
|
24
24
|
|
|
25
25
|
```shell
|
|
26
|
-
gem install ./approveapi_swagger-1.0.
|
|
26
|
+
gem install ./approveapi_swagger-1.0.1.gem
|
|
27
27
|
```
|
|
28
|
-
(for development, run `gem install --dev ./approveapi_swagger-1.0.
|
|
28
|
+
(for development, run `gem install --dev ./approveapi_swagger-1.0.1.gem` to install the development dependencies)
|
|
29
29
|
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
31
31
|
|
|
32
32
|
Finally add this to the Gemfile:
|
|
33
33
|
|
|
34
|
-
gem 'approveapi_swagger', '~> 1.0.
|
|
34
|
+
gem 'approveapi_swagger', '~> 1.0.1'
|
|
35
35
|
|
|
36
36
|
### Install from Git
|
|
37
37
|
|
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]
|
|
7
6
|
**ip_address** | **String** | | [optional]
|
|
8
7
|
**browser** | **String** | | [optional]
|
|
8
|
+
**operating_system** | **String** | | [optional]
|
|
9
9
|
|
|
10
10
|
|
data/docs/CreatePromptRequest.md
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
## Properties
|
|
4
4
|
Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
|
-
**body** | **String** | The body of the approval request to show the user. |
|
|
7
6
|
**user** | **String** | The user to send the approval request to. Can be either an email address or a phone number. |
|
|
7
|
+
**body** | **String** | The body of the approval request to show the user. |
|
|
8
8
|
**title** | **String** | The title of an approval request. Defaults to an empty string. | [optional]
|
|
9
|
-
**reject_text** | **String** | The reject action text. Defaults to 'Reject'. | [optional]
|
|
10
9
|
**approve_text** | **String** | The approve action text. Defaults to 'Approve'. | [optional]
|
|
11
|
-
**
|
|
10
|
+
**reject_text** | **String** | The reject action text. Defaults to 'Reject'. | [optional]
|
|
12
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
|
+
**expires_in** | **Float** | The number of seconds until this request can no longer be answered. | [optional]
|
|
13
|
+
**metadata** | [**PromptMetadata**](PromptMetadata.md) | | [optional]
|
|
13
14
|
|
|
14
15
|
|
data/docs/Prompt.md
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
## Properties
|
|
4
4
|
Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
|
-
**answer** | [**PromptAnswer**](PromptAnswer.md) | | [optional]
|
|
7
|
-
**sent_at** | **Float** | The unix timestamp when this prompt was sent. |
|
|
8
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
|
+
**answer** | [**PromptAnswer**](PromptAnswer.md) | | [optional]
|
|
9
10
|
**metadata** | [**PromptMetadata**](PromptMetadata.md) | | [optional]
|
|
10
11
|
|
|
11
12
|
|
data/docs/PromptAnswer.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
## Properties
|
|
4
4
|
Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
|
-
**time** | **Float** | The unix timestamp when the user answered the prompt. |
|
|
7
6
|
**result** | **BOOLEAN** | The user's answer to whether or not they approve this prompt. |
|
|
7
|
+
**time** | **Float** | The unix timestamp when the user answered the 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]
|
|
6
7
|
**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]
|
|
10
9
|
**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
|
|
|
@@ -14,27 +14,27 @@ require 'date'
|
|
|
14
14
|
|
|
15
15
|
module ApproveAPISwagger
|
|
16
16
|
class AnswerMetadata
|
|
17
|
-
attr_accessor :operating_system
|
|
18
|
-
|
|
19
17
|
attr_accessor :ip_address
|
|
20
18
|
|
|
21
19
|
attr_accessor :browser
|
|
22
20
|
|
|
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',
|
|
27
26
|
:'ip_address' => :'ip_address',
|
|
28
|
-
:'browser' => :'browser'
|
|
27
|
+
:'browser' => :'browser',
|
|
28
|
+
:'operating_system' => :'operating_system'
|
|
29
29
|
}
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Attribute type mapping.
|
|
33
33
|
def self.openapi_types
|
|
34
34
|
{
|
|
35
|
-
:'operating_system' => :'String',
|
|
36
35
|
:'ip_address' => :'String',
|
|
37
|
-
:'browser' => :'String'
|
|
36
|
+
:'browser' => :'String',
|
|
37
|
+
:'operating_system' => :'String'
|
|
38
38
|
}
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -46,10 +46,6 @@ 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
|
-
|
|
53
49
|
if attributes.has_key?(:'ip_address')
|
|
54
50
|
self.ip_address = attributes[:'ip_address']
|
|
55
51
|
end
|
|
@@ -57,6 +53,10 @@ module ApproveAPISwagger
|
|
|
57
53
|
if attributes.has_key?(:'browser')
|
|
58
54
|
self.browser = attributes[:'browser']
|
|
59
55
|
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 &&
|
|
81
80
|
ip_address == o.ip_address &&
|
|
82
|
-
browser == o.browser
|
|
81
|
+
browser == o.browser &&
|
|
82
|
+
operating_system == o.operating_system
|
|
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
|
-
[
|
|
94
|
+
[ip_address, browser, operating_system].hash
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
# Builds the object from hash
|
|
@@ -203,7 +203,5 @@ module ApproveAPISwagger
|
|
|
203
203
|
value
|
|
204
204
|
end
|
|
205
205
|
end
|
|
206
|
-
|
|
207
206
|
end
|
|
208
|
-
|
|
209
207
|
end
|
|
@@ -14,49 +14,54 @@ require 'date'
|
|
|
14
14
|
|
|
15
15
|
module ApproveAPISwagger
|
|
16
16
|
class CreatePromptRequest
|
|
17
|
-
# The body of the approval request to show the user.
|
|
18
|
-
attr_accessor :body
|
|
19
|
-
|
|
20
17
|
# The user to send the approval request to. Can be either an email address or a phone number.
|
|
21
18
|
attr_accessor :user
|
|
22
19
|
|
|
20
|
+
# The body of the approval request to show the user.
|
|
21
|
+
attr_accessor :body
|
|
22
|
+
|
|
23
23
|
# The title of an approval request. Defaults to an empty string.
|
|
24
24
|
attr_accessor :title
|
|
25
25
|
|
|
26
|
-
# The reject action text. Defaults to 'Reject'.
|
|
27
|
-
attr_accessor :reject_text
|
|
28
|
-
|
|
29
26
|
# The approve action text. Defaults to 'Approve'.
|
|
30
27
|
attr_accessor :approve_text
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
# The reject action text. Defaults to 'Reject'.
|
|
30
|
+
attr_accessor :reject_text
|
|
33
31
|
|
|
34
32
|
# If true, the request waits (long-polls) until the user responds to the prompt or more than 10 minutes pass. Defaults to false.
|
|
35
33
|
attr_accessor :long_poll
|
|
36
34
|
|
|
35
|
+
# The number of seconds until this request can no longer be answered.
|
|
36
|
+
attr_accessor :expires_in
|
|
37
|
+
|
|
38
|
+
attr_accessor :metadata
|
|
39
|
+
|
|
37
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
41
|
def self.attribute_map
|
|
39
42
|
{
|
|
40
|
-
:'body' => :'body',
|
|
41
43
|
:'user' => :'user',
|
|
44
|
+
:'body' => :'body',
|
|
42
45
|
:'title' => :'title',
|
|
43
|
-
:'reject_text' => :'reject_text',
|
|
44
46
|
:'approve_text' => :'approve_text',
|
|
45
|
-
:'
|
|
46
|
-
:'long_poll' => :'long_poll'
|
|
47
|
+
:'reject_text' => :'reject_text',
|
|
48
|
+
:'long_poll' => :'long_poll',
|
|
49
|
+
:'expires_in' => :'expires_in',
|
|
50
|
+
:'metadata' => :'metadata'
|
|
47
51
|
}
|
|
48
52
|
end
|
|
49
53
|
|
|
50
54
|
# Attribute type mapping.
|
|
51
55
|
def self.openapi_types
|
|
52
56
|
{
|
|
53
|
-
:'body' => :'String',
|
|
54
57
|
:'user' => :'String',
|
|
58
|
+
:'body' => :'String',
|
|
55
59
|
:'title' => :'String',
|
|
56
|
-
:'reject_text' => :'String',
|
|
57
60
|
:'approve_text' => :'String',
|
|
58
|
-
:'
|
|
59
|
-
:'long_poll' => :'BOOLEAN'
|
|
61
|
+
:'reject_text' => :'String',
|
|
62
|
+
:'long_poll' => :'BOOLEAN',
|
|
63
|
+
:'expires_in' => :'Float',
|
|
64
|
+
:'metadata' => :'PromptMetadata'
|
|
60
65
|
}
|
|
61
66
|
end
|
|
62
67
|
|
|
@@ -68,55 +73,59 @@ module ApproveAPISwagger
|
|
|
68
73
|
# convert string to symbol for hash key
|
|
69
74
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
70
75
|
|
|
71
|
-
if attributes.has_key?(:'body')
|
|
72
|
-
self.body = attributes[:'body']
|
|
73
|
-
end
|
|
74
|
-
|
|
75
76
|
if attributes.has_key?(:'user')
|
|
76
77
|
self.user = attributes[:'user']
|
|
77
78
|
end
|
|
78
79
|
|
|
79
|
-
if attributes.has_key?(:'
|
|
80
|
-
self.
|
|
80
|
+
if attributes.has_key?(:'body')
|
|
81
|
+
self.body = attributes[:'body']
|
|
81
82
|
end
|
|
82
83
|
|
|
83
|
-
if attributes.has_key?(:'
|
|
84
|
-
self.
|
|
84
|
+
if attributes.has_key?(:'title')
|
|
85
|
+
self.title = attributes[:'title']
|
|
85
86
|
end
|
|
86
87
|
|
|
87
88
|
if attributes.has_key?(:'approve_text')
|
|
88
89
|
self.approve_text = attributes[:'approve_text']
|
|
89
90
|
end
|
|
90
91
|
|
|
91
|
-
if attributes.has_key?(:'
|
|
92
|
-
self.
|
|
92
|
+
if attributes.has_key?(:'reject_text')
|
|
93
|
+
self.reject_text = attributes[:'reject_text']
|
|
93
94
|
end
|
|
94
95
|
|
|
95
96
|
if attributes.has_key?(:'long_poll')
|
|
96
97
|
self.long_poll = attributes[:'long_poll']
|
|
97
98
|
end
|
|
99
|
+
|
|
100
|
+
if attributes.has_key?(:'expires_in')
|
|
101
|
+
self.expires_in = attributes[:'expires_in']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.has_key?(:'metadata')
|
|
105
|
+
self.metadata = attributes[:'metadata']
|
|
106
|
+
end
|
|
98
107
|
end
|
|
99
108
|
|
|
100
109
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
101
110
|
# @return Array for valid properties with the reasons
|
|
102
111
|
def list_invalid_properties
|
|
103
112
|
invalid_properties = Array.new
|
|
104
|
-
if @body.nil?
|
|
105
|
-
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
|
106
|
-
end
|
|
107
|
-
|
|
108
113
|
if @user.nil?
|
|
109
114
|
invalid_properties.push('invalid value for "user", user cannot be nil.')
|
|
110
115
|
end
|
|
111
116
|
|
|
117
|
+
if @body.nil?
|
|
118
|
+
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
|
119
|
+
end
|
|
120
|
+
|
|
112
121
|
invalid_properties
|
|
113
122
|
end
|
|
114
123
|
|
|
115
124
|
# Check to see if the all the properties in the model are valid
|
|
116
125
|
# @return true if the model is valid
|
|
117
126
|
def valid?
|
|
118
|
-
return false if @body.nil?
|
|
119
127
|
return false if @user.nil?
|
|
128
|
+
return false if @body.nil?
|
|
120
129
|
true
|
|
121
130
|
end
|
|
122
131
|
|
|
@@ -125,13 +134,14 @@ module ApproveAPISwagger
|
|
|
125
134
|
def ==(o)
|
|
126
135
|
return true if self.equal?(o)
|
|
127
136
|
self.class == o.class &&
|
|
128
|
-
body == o.body &&
|
|
129
137
|
user == o.user &&
|
|
138
|
+
body == o.body &&
|
|
130
139
|
title == o.title &&
|
|
131
|
-
reject_text == o.reject_text &&
|
|
132
140
|
approve_text == o.approve_text &&
|
|
133
|
-
|
|
134
|
-
long_poll == o.long_poll
|
|
141
|
+
reject_text == o.reject_text &&
|
|
142
|
+
long_poll == o.long_poll &&
|
|
143
|
+
expires_in == o.expires_in &&
|
|
144
|
+
metadata == o.metadata
|
|
135
145
|
end
|
|
136
146
|
|
|
137
147
|
# @see the `==` method
|
|
@@ -143,7 +153,7 @@ module ApproveAPISwagger
|
|
|
143
153
|
# Calculates hash code according to all attributes.
|
|
144
154
|
# @return [Fixnum] Hash code
|
|
145
155
|
def hash
|
|
146
|
-
[
|
|
156
|
+
[user, body, title, approve_text, reject_text, long_poll, expires_in, metadata].hash
|
|
147
157
|
end
|
|
148
158
|
|
|
149
159
|
# Builds the object from hash
|
|
@@ -255,7 +265,5 @@ module ApproveAPISwagger
|
|
|
255
265
|
value
|
|
256
266
|
end
|
|
257
267
|
end
|
|
258
|
-
|
|
259
268
|
end
|
|
260
|
-
|
|
261
269
|
end
|
|
@@ -14,22 +14,26 @@ require 'date'
|
|
|
14
14
|
|
|
15
15
|
module ApproveAPISwagger
|
|
16
16
|
class Prompt
|
|
17
|
-
|
|
17
|
+
# A unique id for this prompt.
|
|
18
|
+
attr_accessor :id
|
|
18
19
|
|
|
19
20
|
# The unix timestamp when this prompt was sent.
|
|
20
21
|
attr_accessor :sent_at
|
|
21
22
|
|
|
22
|
-
#
|
|
23
|
-
attr_accessor :
|
|
23
|
+
# The unix timestamp when this prompt can no longer be answered.
|
|
24
|
+
attr_accessor :expires_at
|
|
25
|
+
|
|
26
|
+
attr_accessor :answer
|
|
24
27
|
|
|
25
28
|
attr_accessor :metadata
|
|
26
29
|
|
|
27
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
31
|
def self.attribute_map
|
|
29
32
|
{
|
|
30
|
-
:'answer' => :'answer',
|
|
31
|
-
:'sent_at' => :'sent_at',
|
|
32
33
|
:'id' => :'id',
|
|
34
|
+
:'sent_at' => :'sent_at',
|
|
35
|
+
:'expires_at' => :'expires_at',
|
|
36
|
+
:'answer' => :'answer',
|
|
33
37
|
:'metadata' => :'metadata'
|
|
34
38
|
}
|
|
35
39
|
end
|
|
@@ -37,9 +41,10 @@ module ApproveAPISwagger
|
|
|
37
41
|
# Attribute type mapping.
|
|
38
42
|
def self.openapi_types
|
|
39
43
|
{
|
|
40
|
-
:'answer' => :'PromptAnswer',
|
|
41
|
-
:'sent_at' => :'Float',
|
|
42
44
|
:'id' => :'String',
|
|
45
|
+
:'sent_at' => :'Float',
|
|
46
|
+
:'expires_at' => :'Float',
|
|
47
|
+
:'answer' => :'PromptAnswer',
|
|
43
48
|
:'metadata' => :'PromptMetadata'
|
|
44
49
|
}
|
|
45
50
|
end
|
|
@@ -52,16 +57,20 @@ module ApproveAPISwagger
|
|
|
52
57
|
# convert string to symbol for hash key
|
|
53
58
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
54
59
|
|
|
55
|
-
if attributes.has_key?(:'
|
|
56
|
-
self.
|
|
60
|
+
if attributes.has_key?(:'id')
|
|
61
|
+
self.id = attributes[:'id']
|
|
57
62
|
end
|
|
58
63
|
|
|
59
64
|
if attributes.has_key?(:'sent_at')
|
|
60
65
|
self.sent_at = attributes[:'sent_at']
|
|
61
66
|
end
|
|
62
67
|
|
|
63
|
-
if attributes.has_key?(:'
|
|
64
|
-
self.
|
|
68
|
+
if attributes.has_key?(:'expires_at')
|
|
69
|
+
self.expires_at = attributes[:'expires_at']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.has_key?(:'answer')
|
|
73
|
+
self.answer = attributes[:'answer']
|
|
65
74
|
end
|
|
66
75
|
|
|
67
76
|
if attributes.has_key?(:'metadata')
|
|
@@ -73,22 +82,22 @@ module ApproveAPISwagger
|
|
|
73
82
|
# @return Array for valid properties with the reasons
|
|
74
83
|
def list_invalid_properties
|
|
75
84
|
invalid_properties = Array.new
|
|
76
|
-
if @sent_at.nil?
|
|
77
|
-
invalid_properties.push('invalid value for "sent_at", sent_at cannot be nil.')
|
|
78
|
-
end
|
|
79
|
-
|
|
80
85
|
if @id.nil?
|
|
81
86
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
82
87
|
end
|
|
83
88
|
|
|
89
|
+
if @sent_at.nil?
|
|
90
|
+
invalid_properties.push('invalid value for "sent_at", sent_at cannot be nil.')
|
|
91
|
+
end
|
|
92
|
+
|
|
84
93
|
invalid_properties
|
|
85
94
|
end
|
|
86
95
|
|
|
87
96
|
# Check to see if the all the properties in the model are valid
|
|
88
97
|
# @return true if the model is valid
|
|
89
98
|
def valid?
|
|
90
|
-
return false if @sent_at.nil?
|
|
91
99
|
return false if @id.nil?
|
|
100
|
+
return false if @sent_at.nil?
|
|
92
101
|
true
|
|
93
102
|
end
|
|
94
103
|
|
|
@@ -97,9 +106,10 @@ module ApproveAPISwagger
|
|
|
97
106
|
def ==(o)
|
|
98
107
|
return true if self.equal?(o)
|
|
99
108
|
self.class == o.class &&
|
|
100
|
-
answer == o.answer &&
|
|
101
|
-
sent_at == o.sent_at &&
|
|
102
109
|
id == o.id &&
|
|
110
|
+
sent_at == o.sent_at &&
|
|
111
|
+
expires_at == o.expires_at &&
|
|
112
|
+
answer == o.answer &&
|
|
103
113
|
metadata == o.metadata
|
|
104
114
|
end
|
|
105
115
|
|
|
@@ -112,7 +122,7 @@ module ApproveAPISwagger
|
|
|
112
122
|
# Calculates hash code according to all attributes.
|
|
113
123
|
# @return [Fixnum] Hash code
|
|
114
124
|
def hash
|
|
115
|
-
[
|
|
125
|
+
[id, sent_at, expires_at, answer, metadata].hash
|
|
116
126
|
end
|
|
117
127
|
|
|
118
128
|
# Builds the object from hash
|
|
@@ -224,7 +234,5 @@ module ApproveAPISwagger
|
|
|
224
234
|
value
|
|
225
235
|
end
|
|
226
236
|
end
|
|
227
|
-
|
|
228
237
|
end
|
|
229
|
-
|
|
230
238
|
end
|
|
@@ -14,19 +14,19 @@ require 'date'
|
|
|
14
14
|
|
|
15
15
|
module ApproveAPISwagger
|
|
16
16
|
class PromptAnswer
|
|
17
|
-
# The unix timestamp when the user answered the prompt.
|
|
18
|
-
attr_accessor :time
|
|
19
|
-
|
|
20
17
|
# The user's answer to whether or not they approve this prompt.
|
|
21
18
|
attr_accessor :result
|
|
22
19
|
|
|
20
|
+
# The unix timestamp when the user answered the prompt.
|
|
21
|
+
attr_accessor :time
|
|
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
|
-
:'time' => :'time',
|
|
29
28
|
:'result' => :'result',
|
|
29
|
+
:'time' => :'time',
|
|
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
|
-
:'time' => :'Float',
|
|
38
37
|
:'result' => :'BOOLEAN',
|
|
38
|
+
:'time' => :'Float',
|
|
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?(:'time')
|
|
52
|
-
self.time = attributes[:'time']
|
|
53
|
-
end
|
|
54
|
-
|
|
55
51
|
if attributes.has_key?(:'result')
|
|
56
52
|
self.result = attributes[:'result']
|
|
57
53
|
end
|
|
58
54
|
|
|
55
|
+
if attributes.has_key?(:'time')
|
|
56
|
+
self.time = attributes[:'time']
|
|
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 @time.nil?
|
|
69
|
-
invalid_properties.push('invalid value for "time", time cannot be nil.')
|
|
70
|
-
end
|
|
71
|
-
|
|
72
68
|
if @result.nil?
|
|
73
69
|
invalid_properties.push('invalid value for "result", result cannot be nil.')
|
|
74
70
|
end
|
|
75
71
|
|
|
72
|
+
if @time.nil?
|
|
73
|
+
invalid_properties.push('invalid value for "time", time 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 @time.nil?
|
|
83
82
|
return false if @result.nil?
|
|
83
|
+
return false if @time.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
|
-
time == o.time &&
|
|
93
92
|
result == o.result &&
|
|
93
|
+
time == o.time &&
|
|
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
|
+
[result, time, metadata].hash
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
# Builds the object from hash
|
|
@@ -215,7 +215,5 @@ module ApproveAPISwagger
|
|
|
215
215
|
value
|
|
216
216
|
end
|
|
217
217
|
end
|
|
218
|
-
|
|
219
218
|
end
|
|
220
|
-
|
|
221
219
|
end
|
|
@@ -14,40 +14,40 @@ require 'date'
|
|
|
14
14
|
|
|
15
15
|
module ApproveAPISwagger
|
|
16
16
|
class PromptMetadata
|
|
17
|
+
# The physical location, like Oakland, CA, of the action.
|
|
18
|
+
attr_accessor :location
|
|
19
|
+
|
|
17
20
|
# The date/time of the action.
|
|
18
21
|
attr_accessor :time
|
|
19
22
|
|
|
20
|
-
# The operating system initiating the action, i.e. Mac OS X.
|
|
21
|
-
attr_accessor :operating_system
|
|
22
|
-
|
|
23
23
|
# The IP address of the computer initiating the action.
|
|
24
24
|
attr_accessor :ip_address
|
|
25
25
|
|
|
26
|
-
# The physical location, like Oakland, CA, of the action.
|
|
27
|
-
attr_accessor :location
|
|
28
|
-
|
|
29
26
|
# The web browser initiating the action, i.e. Chrome.
|
|
30
27
|
attr_accessor :browser
|
|
31
28
|
|
|
29
|
+
# The operating system initiating the action, i.e. Mac OS X.
|
|
30
|
+
attr_accessor :operating_system
|
|
31
|
+
|
|
32
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
33
|
def self.attribute_map
|
|
34
34
|
{
|
|
35
|
+
:'location' => :'location',
|
|
35
36
|
:'time' => :'time',
|
|
36
|
-
:'operating_system' => :'operating_system',
|
|
37
37
|
:'ip_address' => :'ip_address',
|
|
38
|
-
:'
|
|
39
|
-
:'
|
|
38
|
+
:'browser' => :'browser',
|
|
39
|
+
:'operating_system' => :'operating_system'
|
|
40
40
|
}
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
# Attribute type mapping.
|
|
44
44
|
def self.openapi_types
|
|
45
45
|
{
|
|
46
|
+
:'location' => :'String',
|
|
46
47
|
:'time' => :'String',
|
|
47
|
-
:'operating_system' => :'String',
|
|
48
48
|
:'ip_address' => :'String',
|
|
49
|
-
:'
|
|
50
|
-
:'
|
|
49
|
+
:'browser' => :'String',
|
|
50
|
+
:'operating_system' => :'String'
|
|
51
51
|
}
|
|
52
52
|
end
|
|
53
53
|
|
|
@@ -59,25 +59,25 @@ module ApproveAPISwagger
|
|
|
59
59
|
# convert string to symbol for hash key
|
|
60
60
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
61
61
|
|
|
62
|
-
if attributes.has_key?(:'
|
|
63
|
-
self.
|
|
62
|
+
if attributes.has_key?(:'location')
|
|
63
|
+
self.location = attributes[:'location']
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
if attributes.has_key?(:'
|
|
67
|
-
self.
|
|
66
|
+
if attributes.has_key?(:'time')
|
|
67
|
+
self.time = attributes[:'time']
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
if attributes.has_key?(:'ip_address')
|
|
71
71
|
self.ip_address = attributes[:'ip_address']
|
|
72
72
|
end
|
|
73
73
|
|
|
74
|
-
if attributes.has_key?(:'location')
|
|
75
|
-
self.location = attributes[:'location']
|
|
76
|
-
end
|
|
77
|
-
|
|
78
74
|
if attributes.has_key?(:'browser')
|
|
79
75
|
self.browser = attributes[:'browser']
|
|
80
76
|
end
|
|
77
|
+
|
|
78
|
+
if attributes.has_key?(:'operating_system')
|
|
79
|
+
self.operating_system = attributes[:'operating_system']
|
|
80
|
+
end
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -98,11 +98,11 @@ module ApproveAPISwagger
|
|
|
98
98
|
def ==(o)
|
|
99
99
|
return true if self.equal?(o)
|
|
100
100
|
self.class == o.class &&
|
|
101
|
+
location == o.location &&
|
|
101
102
|
time == o.time &&
|
|
102
|
-
operating_system == o.operating_system &&
|
|
103
103
|
ip_address == o.ip_address &&
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
browser == o.browser &&
|
|
105
|
+
operating_system == o.operating_system
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
# @see the `==` method
|
|
@@ -114,7 +114,7 @@ module ApproveAPISwagger
|
|
|
114
114
|
# Calculates hash code according to all attributes.
|
|
115
115
|
# @return [Fixnum] Hash code
|
|
116
116
|
def hash
|
|
117
|
-
[
|
|
117
|
+
[location, time, ip_address, browser, operating_system].hash
|
|
118
118
|
end
|
|
119
119
|
|
|
120
120
|
# Builds the object from hash
|
|
@@ -226,7 +226,5 @@ module ApproveAPISwagger
|
|
|
226
226
|
value
|
|
227
227
|
end
|
|
228
228
|
end
|
|
229
|
-
|
|
230
229
|
end
|
|
231
|
-
|
|
232
230
|
end
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: approveapi_swagger
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ApproveAPI
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-02-
|
|
11
|
+
date: 2019-02-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -224,7 +224,7 @@ files:
|
|
|
224
224
|
- lib/approveapi_swagger/models/prompt_metadata.rb
|
|
225
225
|
- lib/approveapi_swagger/models/prompt_status.rb
|
|
226
226
|
- lib/approveapi_swagger/version.rb
|
|
227
|
-
- pkg/approveapi_swagger-1.0.
|
|
227
|
+
- pkg/approveapi_swagger-1.0.1.gem
|
|
228
228
|
- spec/api/approve_api_spec.rb
|
|
229
229
|
- spec/api_client_spec.rb
|
|
230
230
|
- spec/configuration_spec.rb
|
|
@@ -264,11 +264,11 @@ test_files:
|
|
|
264
264
|
- spec/api/approve_api_spec.rb
|
|
265
265
|
- spec/api_client_spec.rb
|
|
266
266
|
- spec/configuration_spec.rb
|
|
267
|
-
- spec/models/
|
|
268
|
-
- spec/models/
|
|
267
|
+
- spec/models/answer_metadata_spec.rb
|
|
268
|
+
- spec/models/prompt_spec.rb
|
|
269
269
|
- spec/models/prompt_answer_spec.rb
|
|
270
270
|
- spec/models/prompt_status_spec.rb
|
|
271
|
+
- spec/models/error_spec.rb
|
|
272
|
+
- spec/models/prompt_metadata_spec.rb
|
|
271
273
|
- spec/models/create_prompt_request_spec.rb
|
|
272
|
-
- spec/models/answer_metadata_spec.rb
|
|
273
|
-
- spec/models/prompt_spec.rb
|
|
274
274
|
- spec/spec_helper.rb
|
|
Binary file
|