torii-backend 0.0.4 → 0.0.5
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/spec/server-v1.json +1 -1
- data/src/torii/backend/client.rb +38 -38
- data/src/torii/backend/generated/lib/torii_backend_generated/api/allowed_origins_api.rb +145 -0
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/api/server_sessions_api.rb +6 -6
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/api/server_users_api.rb +102 -28
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/api_client.rb +4 -3
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/api_error.rb +3 -3
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/api_model_base.rb +3 -3
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/configuration.rb +14 -7
- data/src/torii/backend/generated/lib/torii_backend_generated/models/allowed_origins_response.rb +166 -0
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/models/create_user_request.rb +50 -36
- data/src/torii/backend/generated/lib/{torii-backend-generated/models/cursor_page_response_user_response.rb → torii_backend_generated/models/cursor_page_response_server_user_response.rb} +7 -7
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/models/problem_detail.rb +3 -3
- data/src/torii/backend/generated/lib/{torii-backend-generated/models/user_response.rb → torii_backend_generated/models/server_user_response.rb} +119 -43
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/models/server_user_search_request.rb +3 -3
- data/src/torii/backend/generated/lib/torii_backend_generated/models/set_allowed_origins_request.rb +166 -0
- data/src/torii/backend/generated/lib/torii_backend_generated/models/update_user_metadata_request.rb +175 -0
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/models/update_user_request.rb +29 -39
- data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/models/user_session_response.rb +19 -8
- data/src/torii/backend/generated/lib/torii_backend_generated/version.rb +15 -0
- data/src/torii/backend/generated/lib/torii_backend_generated.rb +53 -0
- data/src/torii/backend/generated/spec/api/allowed_origins_api_spec.rb +57 -0
- data/src/torii/backend/generated/spec/api/server_sessions_api_spec.rb +72 -0
- data/src/torii/backend/generated/spec/api/server_users_api_spec.rb +135 -0
- data/src/torii/backend/generated/spec/models/allowed_origins_response_spec.rb +36 -0
- data/src/torii/backend/generated/spec/models/create_user_request_spec.rb +72 -0
- data/src/torii/backend/generated/spec/models/cursor_page_response_server_user_response_spec.rb +48 -0
- data/src/torii/backend/generated/spec/models/problem_detail_spec.rb +66 -0
- data/src/torii/backend/generated/spec/models/server_user_response_spec.rb +128 -0
- data/src/torii/backend/generated/spec/models/server_user_search_request_spec.rb +64 -0
- data/src/torii/backend/generated/spec/models/set_allowed_origins_request_spec.rb +36 -0
- data/src/torii/backend/generated/spec/models/update_user_metadata_request_spec.rb +48 -0
- data/src/torii/backend/generated/spec/models/update_user_request_spec.rb +58 -0
- data/src/torii/backend/generated/spec/models/user_session_response_spec.rb +90 -0
- data/src/torii/backend/generated/spec/spec_helper.rb +111 -0
- data/src/torii/backend/version.rb +1 -1
- data/src/torii-backend-generated.rb +8 -19
- metadata +35 -17
- data/src/torii/backend/generated/lib/torii-backend-generated/version.rb +0 -15
- data/src/torii/backend/generated/lib/torii-backend-generated.rb +0 -49
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Torii Backend API
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -22,27 +22,31 @@ module ToriiBackendGenerated
|
|
|
22
22
|
# Initial password. Subject to the environment's password policy. Omit to create a passwordless user (e.g. social-only).
|
|
23
23
|
attr_accessor :password
|
|
24
24
|
|
|
25
|
-
#
|
|
26
|
-
attr_accessor :
|
|
25
|
+
# First (given) name to seed on the profile.
|
|
26
|
+
attr_accessor :first_name
|
|
27
27
|
|
|
28
|
-
#
|
|
29
|
-
attr_accessor :
|
|
28
|
+
# Last (family) name to seed on the profile.
|
|
29
|
+
attr_accessor :last_name
|
|
30
30
|
|
|
31
|
-
#
|
|
32
|
-
attr_accessor :
|
|
31
|
+
# Initial public metadata (SDK-readable, server-written). Max 512 bytes.
|
|
32
|
+
attr_accessor :public_metadata
|
|
33
33
|
|
|
34
|
-
#
|
|
35
|
-
attr_accessor :
|
|
34
|
+
# Initial private metadata (server-only). Max 4096 bytes.
|
|
35
|
+
attr_accessor :private_metadata
|
|
36
|
+
|
|
37
|
+
# Initial unsafe metadata (end-user writable). Max 512 bytes.
|
|
38
|
+
attr_accessor :unsafe_metadata
|
|
36
39
|
|
|
37
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
41
|
def self.attribute_map
|
|
39
42
|
{
|
|
40
43
|
:'email' => :'email',
|
|
41
44
|
:'password' => :'password',
|
|
42
|
-
:'
|
|
43
|
-
:'
|
|
44
|
-
:'
|
|
45
|
-
:'
|
|
45
|
+
:'first_name' => :'firstName',
|
|
46
|
+
:'last_name' => :'lastName',
|
|
47
|
+
:'public_metadata' => :'publicMetadata',
|
|
48
|
+
:'private_metadata' => :'privateMetadata',
|
|
49
|
+
:'unsafe_metadata' => :'unsafeMetadata'
|
|
46
50
|
}
|
|
47
51
|
end
|
|
48
52
|
|
|
@@ -61,10 +65,11 @@ module ToriiBackendGenerated
|
|
|
61
65
|
{
|
|
62
66
|
:'email' => :'String',
|
|
63
67
|
:'password' => :'String',
|
|
64
|
-
:'
|
|
65
|
-
:'
|
|
66
|
-
:'
|
|
67
|
-
:'
|
|
68
|
+
:'first_name' => :'String',
|
|
69
|
+
:'last_name' => :'String',
|
|
70
|
+
:'public_metadata' => :'Hash<String, Object>',
|
|
71
|
+
:'private_metadata' => :'Hash<String, Object>',
|
|
72
|
+
:'unsafe_metadata' => :'Hash<String, Object>'
|
|
68
73
|
}
|
|
69
74
|
end
|
|
70
75
|
|
|
@@ -73,10 +78,8 @@ module ToriiBackendGenerated
|
|
|
73
78
|
Set.new([
|
|
74
79
|
:'email',
|
|
75
80
|
:'password',
|
|
76
|
-
:'
|
|
77
|
-
:'
|
|
78
|
-
:'address',
|
|
79
|
-
:'date_of_birth'
|
|
81
|
+
:'first_name',
|
|
82
|
+
:'last_name',
|
|
80
83
|
])
|
|
81
84
|
end
|
|
82
85
|
|
|
@@ -104,20 +107,30 @@ module ToriiBackendGenerated
|
|
|
104
107
|
self.password = attributes[:'password']
|
|
105
108
|
end
|
|
106
109
|
|
|
107
|
-
if attributes.key?(:'
|
|
108
|
-
self.
|
|
110
|
+
if attributes.key?(:'first_name')
|
|
111
|
+
self.first_name = attributes[:'first_name']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'last_name')
|
|
115
|
+
self.last_name = attributes[:'last_name']
|
|
109
116
|
end
|
|
110
117
|
|
|
111
|
-
if attributes.key?(:'
|
|
112
|
-
|
|
118
|
+
if attributes.key?(:'public_metadata')
|
|
119
|
+
if (value = attributes[:'public_metadata']).is_a?(Hash)
|
|
120
|
+
self.public_metadata = value
|
|
121
|
+
end
|
|
113
122
|
end
|
|
114
123
|
|
|
115
|
-
if attributes.key?(:'
|
|
116
|
-
|
|
124
|
+
if attributes.key?(:'private_metadata')
|
|
125
|
+
if (value = attributes[:'private_metadata']).is_a?(Hash)
|
|
126
|
+
self.private_metadata = value
|
|
127
|
+
end
|
|
117
128
|
end
|
|
118
129
|
|
|
119
|
-
if attributes.key?(:'
|
|
120
|
-
|
|
130
|
+
if attributes.key?(:'unsafe_metadata')
|
|
131
|
+
if (value = attributes[:'unsafe_metadata']).is_a?(Hash)
|
|
132
|
+
self.unsafe_metadata = value
|
|
133
|
+
end
|
|
121
134
|
end
|
|
122
135
|
end
|
|
123
136
|
|
|
@@ -143,10 +156,11 @@ module ToriiBackendGenerated
|
|
|
143
156
|
self.class == o.class &&
|
|
144
157
|
email == o.email &&
|
|
145
158
|
password == o.password &&
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
159
|
+
first_name == o.first_name &&
|
|
160
|
+
last_name == o.last_name &&
|
|
161
|
+
public_metadata == o.public_metadata &&
|
|
162
|
+
private_metadata == o.private_metadata &&
|
|
163
|
+
unsafe_metadata == o.unsafe_metadata
|
|
150
164
|
end
|
|
151
165
|
|
|
152
166
|
# @see the `==` method
|
|
@@ -158,7 +172,7 @@ module ToriiBackendGenerated
|
|
|
158
172
|
# Calculates hash code according to all attributes.
|
|
159
173
|
# @return [Integer] Hash code
|
|
160
174
|
def hash
|
|
161
|
-
[email, password,
|
|
175
|
+
[email, password, first_name, last_name, public_metadata, private_metadata, unsafe_metadata].hash
|
|
162
176
|
end
|
|
163
177
|
|
|
164
178
|
# Builds the object from hash
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Torii Backend API
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module ToriiBackendGenerated
|
|
17
17
|
# A single page of results in a cursor-paginated list. Pass `nextCursor` as the `cursor` query parameter to fetch the following page.
|
|
18
|
-
class
|
|
18
|
+
class CursorPageResponseServerUserResponse < ApiModelBase
|
|
19
19
|
# Items in this page, in stable order.
|
|
20
20
|
attr_accessor :items
|
|
21
21
|
|
|
@@ -47,7 +47,7 @@ module ToriiBackendGenerated
|
|
|
47
47
|
# Attribute type mapping.
|
|
48
48
|
def self.openapi_types
|
|
49
49
|
{
|
|
50
|
-
:'items' => :'Array<
|
|
50
|
+
:'items' => :'Array<ServerUserResponse>',
|
|
51
51
|
:'next_cursor' => :'String',
|
|
52
52
|
:'has_more' => :'Boolean'
|
|
53
53
|
}
|
|
@@ -64,14 +64,14 @@ module ToriiBackendGenerated
|
|
|
64
64
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
65
|
def initialize(attributes = {})
|
|
66
66
|
if (!attributes.is_a?(Hash))
|
|
67
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ToriiBackendGenerated::
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ToriiBackendGenerated::CursorPageResponseServerUserResponse` initialize method"
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
71
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
72
72
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
73
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
74
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ToriiBackendGenerated::
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ToriiBackendGenerated::CursorPageResponseServerUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
75
75
|
end
|
|
76
76
|
h[k.to_sym] = v
|
|
77
77
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Torii Backend API
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Torii Backend API
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -14,8 +14,8 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ToriiBackendGenerated
|
|
17
|
-
# An end-user
|
|
18
|
-
class
|
|
17
|
+
# An end-user, including server-only private metadata. Returned only on the secret-key backend API.
|
|
18
|
+
class ServerUserResponse < ApiModelBase
|
|
19
19
|
# Unique identifier for this user.
|
|
20
20
|
attr_accessor :id
|
|
21
21
|
|
|
@@ -25,18 +25,15 @@ module ToriiBackendGenerated
|
|
|
25
25
|
# Full name on the profile, if any.
|
|
26
26
|
attr_accessor :name
|
|
27
27
|
|
|
28
|
-
#
|
|
29
|
-
attr_accessor :
|
|
28
|
+
# First (given) name on the profile, if any.
|
|
29
|
+
attr_accessor :first_name
|
|
30
|
+
|
|
31
|
+
# Last (family) name on the profile, if any.
|
|
32
|
+
attr_accessor :last_name
|
|
30
33
|
|
|
31
34
|
# Preferred locale for emails and UI messages.
|
|
32
35
|
attr_accessor :locale
|
|
33
36
|
|
|
34
|
-
# Free-form address string, if provided.
|
|
35
|
-
attr_accessor :address
|
|
36
|
-
|
|
37
|
-
# Date of birth in ISO-8601 (YYYY-MM-DD), if provided.
|
|
38
|
-
attr_accessor :date_of_birth
|
|
39
|
-
|
|
40
37
|
# Lifecycle status of the user (e.g. active, banned).
|
|
41
38
|
attr_accessor :status
|
|
42
39
|
|
|
@@ -46,7 +43,7 @@ module ToriiBackendGenerated
|
|
|
46
43
|
# When this user was last modified (ISO-8601 UTC).
|
|
47
44
|
attr_accessor :updated_at
|
|
48
45
|
|
|
49
|
-
# Primary email on the profile, if any.
|
|
46
|
+
# Primary email on the profile, if any.
|
|
50
47
|
attr_accessor :email
|
|
51
48
|
|
|
52
49
|
# When this user's primary email was verified, if it has been verified.
|
|
@@ -55,6 +52,15 @@ module ToriiBackendGenerated
|
|
|
55
52
|
# When this user was deleted, if soft-deleted. Null for active users.
|
|
56
53
|
attr_accessor :deleted_at
|
|
57
54
|
|
|
55
|
+
# Public metadata: readable by the SDK, writable only server-side.
|
|
56
|
+
attr_accessor :public_metadata
|
|
57
|
+
|
|
58
|
+
# Private metadata: server-only. Never exposed to the SDK or in a JWT.
|
|
59
|
+
attr_accessor :private_metadata
|
|
60
|
+
|
|
61
|
+
# Unsafe metadata: readable and writable by the end-user via the SDK.
|
|
62
|
+
attr_accessor :unsafe_metadata
|
|
63
|
+
|
|
58
64
|
class EnumAttributeValidator
|
|
59
65
|
attr_reader :datatype
|
|
60
66
|
attr_reader :allowable_values
|
|
@@ -83,16 +89,18 @@ module ToriiBackendGenerated
|
|
|
83
89
|
:'id' => :'id',
|
|
84
90
|
:'environment_id' => :'environmentId',
|
|
85
91
|
:'name' => :'name',
|
|
86
|
-
:'
|
|
92
|
+
:'first_name' => :'firstName',
|
|
93
|
+
:'last_name' => :'lastName',
|
|
87
94
|
:'locale' => :'locale',
|
|
88
|
-
:'address' => :'address',
|
|
89
|
-
:'date_of_birth' => :'dateOfBirth',
|
|
90
95
|
:'status' => :'status',
|
|
91
96
|
:'created_at' => :'createdAt',
|
|
92
97
|
:'updated_at' => :'updatedAt',
|
|
93
98
|
:'email' => :'email',
|
|
94
99
|
:'email_verified_at' => :'emailVerifiedAt',
|
|
95
|
-
:'deleted_at' => :'deletedAt'
|
|
100
|
+
:'deleted_at' => :'deletedAt',
|
|
101
|
+
:'public_metadata' => :'publicMetadata',
|
|
102
|
+
:'private_metadata' => :'privateMetadata',
|
|
103
|
+
:'unsafe_metadata' => :'unsafeMetadata'
|
|
96
104
|
}
|
|
97
105
|
end
|
|
98
106
|
|
|
@@ -112,16 +120,18 @@ module ToriiBackendGenerated
|
|
|
112
120
|
:'id' => :'String',
|
|
113
121
|
:'environment_id' => :'String',
|
|
114
122
|
:'name' => :'String',
|
|
115
|
-
:'
|
|
123
|
+
:'first_name' => :'String',
|
|
124
|
+
:'last_name' => :'String',
|
|
116
125
|
:'locale' => :'String',
|
|
117
|
-
:'address' => :'String',
|
|
118
|
-
:'date_of_birth' => :'Date',
|
|
119
126
|
:'status' => :'String',
|
|
120
127
|
:'created_at' => :'Time',
|
|
121
128
|
:'updated_at' => :'Time',
|
|
122
129
|
:'email' => :'String',
|
|
123
130
|
:'email_verified_at' => :'Time',
|
|
124
|
-
:'deleted_at' => :'Time'
|
|
131
|
+
:'deleted_at' => :'Time',
|
|
132
|
+
:'public_metadata' => :'Hash<String, Object>',
|
|
133
|
+
:'private_metadata' => :'Hash<String, Object>',
|
|
134
|
+
:'unsafe_metadata' => :'Hash<String, Object>'
|
|
125
135
|
}
|
|
126
136
|
end
|
|
127
137
|
|
|
@@ -129,13 +139,12 @@ module ToriiBackendGenerated
|
|
|
129
139
|
def self.openapi_nullable
|
|
130
140
|
Set.new([
|
|
131
141
|
:'name',
|
|
132
|
-
:'
|
|
142
|
+
:'first_name',
|
|
143
|
+
:'last_name',
|
|
133
144
|
:'locale',
|
|
134
|
-
:'address',
|
|
135
|
-
:'date_of_birth',
|
|
136
145
|
:'email',
|
|
137
146
|
:'email_verified_at',
|
|
138
|
-
:'deleted_at'
|
|
147
|
+
:'deleted_at',
|
|
139
148
|
])
|
|
140
149
|
end
|
|
141
150
|
|
|
@@ -143,14 +152,14 @@ module ToriiBackendGenerated
|
|
|
143
152
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
153
|
def initialize(attributes = {})
|
|
145
154
|
if (!attributes.is_a?(Hash))
|
|
146
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ToriiBackendGenerated::
|
|
155
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ToriiBackendGenerated::ServerUserResponse` initialize method"
|
|
147
156
|
end
|
|
148
157
|
|
|
149
158
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
150
159
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
151
160
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
152
161
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
153
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ToriiBackendGenerated::
|
|
162
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ToriiBackendGenerated::ServerUserResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
154
163
|
end
|
|
155
164
|
h[k.to_sym] = v
|
|
156
165
|
}
|
|
@@ -171,20 +180,16 @@ module ToriiBackendGenerated
|
|
|
171
180
|
self.name = attributes[:'name']
|
|
172
181
|
end
|
|
173
182
|
|
|
174
|
-
if attributes.key?(:'
|
|
175
|
-
self.
|
|
183
|
+
if attributes.key?(:'first_name')
|
|
184
|
+
self.first_name = attributes[:'first_name']
|
|
176
185
|
end
|
|
177
186
|
|
|
178
|
-
if attributes.key?(:'
|
|
179
|
-
self.
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
if attributes.key?(:'address')
|
|
183
|
-
self.address = attributes[:'address']
|
|
187
|
+
if attributes.key?(:'last_name')
|
|
188
|
+
self.last_name = attributes[:'last_name']
|
|
184
189
|
end
|
|
185
190
|
|
|
186
|
-
if attributes.key?(:'
|
|
187
|
-
self.
|
|
191
|
+
if attributes.key?(:'locale')
|
|
192
|
+
self.locale = attributes[:'locale']
|
|
188
193
|
end
|
|
189
194
|
|
|
190
195
|
if attributes.key?(:'status')
|
|
@@ -216,6 +221,30 @@ module ToriiBackendGenerated
|
|
|
216
221
|
if attributes.key?(:'deleted_at')
|
|
217
222
|
self.deleted_at = attributes[:'deleted_at']
|
|
218
223
|
end
|
|
224
|
+
|
|
225
|
+
if attributes.key?(:'public_metadata')
|
|
226
|
+
if (value = attributes[:'public_metadata']).is_a?(Hash)
|
|
227
|
+
self.public_metadata = value
|
|
228
|
+
end
|
|
229
|
+
else
|
|
230
|
+
self.public_metadata = nil
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if attributes.key?(:'private_metadata')
|
|
234
|
+
if (value = attributes[:'private_metadata']).is_a?(Hash)
|
|
235
|
+
self.private_metadata = value
|
|
236
|
+
end
|
|
237
|
+
else
|
|
238
|
+
self.private_metadata = nil
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if attributes.key?(:'unsafe_metadata')
|
|
242
|
+
if (value = attributes[:'unsafe_metadata']).is_a?(Hash)
|
|
243
|
+
self.unsafe_metadata = value
|
|
244
|
+
end
|
|
245
|
+
else
|
|
246
|
+
self.unsafe_metadata = nil
|
|
247
|
+
end
|
|
219
248
|
end
|
|
220
249
|
|
|
221
250
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -243,6 +272,18 @@ module ToriiBackendGenerated
|
|
|
243
272
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
244
273
|
end
|
|
245
274
|
|
|
275
|
+
if @public_metadata.nil?
|
|
276
|
+
invalid_properties.push('invalid value for "public_metadata", public_metadata cannot be nil.')
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
if @private_metadata.nil?
|
|
280
|
+
invalid_properties.push('invalid value for "private_metadata", private_metadata cannot be nil.')
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
if @unsafe_metadata.nil?
|
|
284
|
+
invalid_properties.push('invalid value for "unsafe_metadata", unsafe_metadata cannot be nil.')
|
|
285
|
+
end
|
|
286
|
+
|
|
246
287
|
invalid_properties
|
|
247
288
|
end
|
|
248
289
|
|
|
@@ -259,6 +300,9 @@ module ToriiBackendGenerated
|
|
|
259
300
|
return false unless status_validator.valid?(@status)
|
|
260
301
|
return false if @created_at.nil?
|
|
261
302
|
return false if @updated_at.nil?
|
|
303
|
+
return false if @public_metadata.nil?
|
|
304
|
+
return false if @private_metadata.nil?
|
|
305
|
+
return false if @unsafe_metadata.nil?
|
|
262
306
|
true
|
|
263
307
|
end
|
|
264
308
|
|
|
@@ -322,6 +366,36 @@ module ToriiBackendGenerated
|
|
|
322
366
|
@updated_at = updated_at
|
|
323
367
|
end
|
|
324
368
|
|
|
369
|
+
# Custom attribute writer method with validation
|
|
370
|
+
# @param [Object] public_metadata Value to be assigned
|
|
371
|
+
def public_metadata=(public_metadata)
|
|
372
|
+
if public_metadata.nil?
|
|
373
|
+
fail ArgumentError, 'public_metadata cannot be nil'
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
@public_metadata = public_metadata
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
# Custom attribute writer method with validation
|
|
380
|
+
# @param [Object] private_metadata Value to be assigned
|
|
381
|
+
def private_metadata=(private_metadata)
|
|
382
|
+
if private_metadata.nil?
|
|
383
|
+
fail ArgumentError, 'private_metadata cannot be nil'
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
@private_metadata = private_metadata
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
# Custom attribute writer method with validation
|
|
390
|
+
# @param [Object] unsafe_metadata Value to be assigned
|
|
391
|
+
def unsafe_metadata=(unsafe_metadata)
|
|
392
|
+
if unsafe_metadata.nil?
|
|
393
|
+
fail ArgumentError, 'unsafe_metadata cannot be nil'
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
@unsafe_metadata = unsafe_metadata
|
|
397
|
+
end
|
|
398
|
+
|
|
325
399
|
# Checks equality by comparing each attribute.
|
|
326
400
|
# @param [Object] Object to be compared
|
|
327
401
|
def ==(o)
|
|
@@ -330,16 +404,18 @@ module ToriiBackendGenerated
|
|
|
330
404
|
id == o.id &&
|
|
331
405
|
environment_id == o.environment_id &&
|
|
332
406
|
name == o.name &&
|
|
333
|
-
|
|
407
|
+
first_name == o.first_name &&
|
|
408
|
+
last_name == o.last_name &&
|
|
334
409
|
locale == o.locale &&
|
|
335
|
-
address == o.address &&
|
|
336
|
-
date_of_birth == o.date_of_birth &&
|
|
337
410
|
status == o.status &&
|
|
338
411
|
created_at == o.created_at &&
|
|
339
412
|
updated_at == o.updated_at &&
|
|
340
413
|
email == o.email &&
|
|
341
414
|
email_verified_at == o.email_verified_at &&
|
|
342
|
-
deleted_at == o.deleted_at
|
|
415
|
+
deleted_at == o.deleted_at &&
|
|
416
|
+
public_metadata == o.public_metadata &&
|
|
417
|
+
private_metadata == o.private_metadata &&
|
|
418
|
+
unsafe_metadata == o.unsafe_metadata
|
|
343
419
|
end
|
|
344
420
|
|
|
345
421
|
# @see the `==` method
|
|
@@ -351,7 +427,7 @@ module ToriiBackendGenerated
|
|
|
351
427
|
# Calculates hash code according to all attributes.
|
|
352
428
|
# @return [Integer] Hash code
|
|
353
429
|
def hash
|
|
354
|
-
[id, environment_id, name,
|
|
430
|
+
[id, environment_id, name, first_name, last_name, locale, status, created_at, updated_at, email, email_verified_at, deleted_at, public_metadata, private_metadata, unsafe_metadata].hash
|
|
355
431
|
end
|
|
356
432
|
|
|
357
433
|
# Builds the object from hash
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Torii Backend API
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|