pingram 1.0.18 → 1.0.20
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 +3 -3
- data/lib/pingram/api/account_api.rb +70 -66
- data/lib/pingram/api/email_api.rb +61 -0
- data/lib/pingram/api/members_api.rb +2 -2
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/client_wrapper.rb +0 -10
- data/lib/pingram/models/{push_settings_fcm_response.rb → campaign_webhook_response.rb} +20 -19
- data/lib/pingram/models/create_account_request.rb +150 -0
- data/lib/pingram/models/create_account_response.rb +30 -30
- data/lib/pingram/models/{create_account_request_body.rb → create_personal_access_token_request.rb} +18 -7
- data/lib/pingram/models/create_personal_access_token_response.rb +313 -0
- data/lib/pingram/models/{apn_config.rb → delete_email_suppressions_response.rb} +36 -86
- data/lib/pingram/models/get_members_response_inner.rb +29 -1
- data/lib/pingram/models/intercom_webhook_data_item_any_of.rb +1 -0
- data/lib/pingram/models/list_invoices_response.rb +194 -0
- data/lib/pingram/models/list_invoices_response_invoices_inner.rb +389 -0
- data/lib/pingram/models/{push_settings_fcm_put_request.rb → list_personal_access_tokens_response.rb} +21 -19
- data/lib/pingram/models/list_personal_access_tokens_response_tokens_inner.rb +287 -0
- data/lib/pingram/models/member_update_request.rb +1 -0
- data/lib/pingram/models/sender_post_body.rb +1 -13
- data/lib/pingram/models/ten_dlc_brand_registration_details.rb +14 -14
- data/lib/pingram/models/ten_dlc_campaign_registration_details.rb +457 -0
- data/lib/pingram/models/ten_dlc_campaign_update_request.rb +363 -0
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +11 -5
- data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/reline-0.7.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.8.2 → io-console-0.9.2}/gem_make.out +15 -14
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.8.2 → io-console-0.9.2}/mkmf.log +112 -109
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/ext/io/console/Makefile +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/ext/io/console/console.c +521 -28
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/ext/io/console/extconf.rb +13 -14
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/ext/io/console/win32_vk.inc +313 -165
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/ansi.rb +6 -4
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/windows.rb +49 -23
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io.rb +8 -2
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/line_editor.rb +49 -21
- data/vendor/bundle/ruby/3.2.0/gems/reline-0.7.0/lib/reline/version.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline.rb +10 -9
- data/vendor/bundle/ruby/3.2.0/specifications/{io-console-0.8.2.gemspec → io-console-0.9.2.gemspec} +3 -3
- data/vendor/bundle/ruby/3.2.0/specifications/{reline-0.6.3.gemspec → reline-0.7.0.gemspec} +2 -2
- metadata +55 -49
- data/lib/pingram/api/push_settings_api.rb +0 -374
- data/vendor/bundle/ruby/3.2.0/cache/io-console-0.8.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/reline-0.6.3.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.8.2/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/reline-0.6.3/lib/reline/version.rb +0 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.8.2 → io-console-0.9.2}/gem.build_complete +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/.document +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/BSDL +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/COPYING +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/README.md +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/lib/io/console/size.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/BSDL +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/COPYING +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/README.md +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/config.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/face.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/history.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/dumb.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/base.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/composite.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/emacs.rb +2 -2
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/vi_command.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/vi_insert.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_stroke.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/kill_ring.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/unicode/east_asian_width.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/unicode.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/license_of_rb-readline +0 -0
|
@@ -15,15 +15,15 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Pingram
|
|
17
17
|
class CreateAccountResponse < ApiModelBase
|
|
18
|
-
attr_accessor :
|
|
18
|
+
attr_accessor :success
|
|
19
19
|
|
|
20
|
-
attr_accessor :
|
|
20
|
+
attr_accessor :account_id
|
|
21
21
|
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
23
|
def self.attribute_map
|
|
24
24
|
{
|
|
25
|
-
:'
|
|
26
|
-
:'
|
|
25
|
+
:'success' => :'success',
|
|
26
|
+
:'account_id' => :'accountId'
|
|
27
27
|
}
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -40,8 +40,8 @@ module Pingram
|
|
|
40
40
|
# Attribute type mapping.
|
|
41
41
|
def self.openapi_types
|
|
42
42
|
{
|
|
43
|
-
:'
|
|
44
|
-
:'
|
|
43
|
+
:'success' => :'Boolean',
|
|
44
|
+
:'account_id' => :'String'
|
|
45
45
|
}
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -67,16 +67,16 @@ module Pingram
|
|
|
67
67
|
h[k.to_sym] = v
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
if attributes.key?(:'
|
|
71
|
-
self.
|
|
70
|
+
if attributes.key?(:'success')
|
|
71
|
+
self.success = attributes[:'success']
|
|
72
72
|
else
|
|
73
|
-
self.
|
|
73
|
+
self.success = nil
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
if attributes.key?(:'
|
|
77
|
-
self.
|
|
76
|
+
if attributes.key?(:'account_id')
|
|
77
|
+
self.account_id = attributes[:'account_id']
|
|
78
78
|
else
|
|
79
|
-
self.
|
|
79
|
+
self.account_id = nil
|
|
80
80
|
end
|
|
81
81
|
end
|
|
82
82
|
|
|
@@ -85,12 +85,12 @@ module Pingram
|
|
|
85
85
|
def list_invalid_properties
|
|
86
86
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
87
|
invalid_properties = Array.new
|
|
88
|
-
if @
|
|
89
|
-
invalid_properties.push('invalid value for "
|
|
88
|
+
if @success.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
-
if @
|
|
93
|
-
invalid_properties.push('invalid value for "
|
|
92
|
+
if @account_id.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
invalid_properties
|
|
@@ -100,29 +100,29 @@ module Pingram
|
|
|
100
100
|
# @return true if the model is valid
|
|
101
101
|
def valid?
|
|
102
102
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
return false if @success.nil?
|
|
103
104
|
return false if @account_id.nil?
|
|
104
|
-
return false if @name.nil?
|
|
105
105
|
true
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
# Custom attribute writer method with validation
|
|
109
|
-
# @param [Object]
|
|
110
|
-
def
|
|
111
|
-
if
|
|
112
|
-
fail ArgumentError, '
|
|
109
|
+
# @param [Object] success Value to be assigned
|
|
110
|
+
def success=(success)
|
|
111
|
+
if success.nil?
|
|
112
|
+
fail ArgumentError, 'success cannot be nil'
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
@
|
|
115
|
+
@success = success
|
|
116
116
|
end
|
|
117
117
|
|
|
118
118
|
# Custom attribute writer method with validation
|
|
119
|
-
# @param [Object]
|
|
120
|
-
def
|
|
121
|
-
if
|
|
122
|
-
fail ArgumentError, '
|
|
119
|
+
# @param [Object] account_id Value to be assigned
|
|
120
|
+
def account_id=(account_id)
|
|
121
|
+
if account_id.nil?
|
|
122
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
123
123
|
end
|
|
124
124
|
|
|
125
|
-
@
|
|
125
|
+
@account_id = account_id
|
|
126
126
|
end
|
|
127
127
|
|
|
128
128
|
# Checks equality by comparing each attribute.
|
|
@@ -130,8 +130,8 @@ module Pingram
|
|
|
130
130
|
def ==(o)
|
|
131
131
|
return true if self.equal?(o)
|
|
132
132
|
self.class == o.class &&
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
success == o.success &&
|
|
134
|
+
account_id == o.account_id
|
|
135
135
|
end
|
|
136
136
|
|
|
137
137
|
# @see the `==` method
|
|
@@ -143,7 +143,7 @@ module Pingram
|
|
|
143
143
|
# Calculates hash code according to all attributes.
|
|
144
144
|
# @return [Integer] Hash code
|
|
145
145
|
def hash
|
|
146
|
-
[
|
|
146
|
+
[success, account_id].hash
|
|
147
147
|
end
|
|
148
148
|
|
|
149
149
|
# Builds the object from hash
|
data/lib/pingram/models/{create_account_request_body.rb → create_personal_access_token_request.rb}
RENAMED
|
@@ -14,13 +14,18 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Pingram
|
|
17
|
-
class
|
|
17
|
+
class CreatePersonalAccessTokenRequest < ApiModelBase
|
|
18
|
+
# Human-readable name for the token
|
|
18
19
|
attr_accessor :name
|
|
19
20
|
|
|
21
|
+
# Optional ISO-8601 expiry. Omit for a non-expiring token.
|
|
22
|
+
attr_accessor :expires_at
|
|
23
|
+
|
|
20
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
25
|
def self.attribute_map
|
|
22
26
|
{
|
|
23
|
-
:'name' => :'name'
|
|
27
|
+
:'name' => :'name',
|
|
28
|
+
:'expires_at' => :'expiresAt'
|
|
24
29
|
}
|
|
25
30
|
end
|
|
26
31
|
|
|
@@ -37,7 +42,8 @@ module Pingram
|
|
|
37
42
|
# Attribute type mapping.
|
|
38
43
|
def self.openapi_types
|
|
39
44
|
{
|
|
40
|
-
:'name' => :'String'
|
|
45
|
+
:'name' => :'String',
|
|
46
|
+
:'expires_at' => :'String'
|
|
41
47
|
}
|
|
42
48
|
end
|
|
43
49
|
|
|
@@ -51,14 +57,14 @@ module Pingram
|
|
|
51
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
58
|
def initialize(attributes = {})
|
|
53
59
|
if (!attributes.is_a?(Hash))
|
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::CreatePersonalAccessTokenRequest` initialize method"
|
|
55
61
|
end
|
|
56
62
|
|
|
57
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
64
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
66
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::CreatePersonalAccessTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
68
|
end
|
|
63
69
|
h[k.to_sym] = v
|
|
64
70
|
}
|
|
@@ -68,6 +74,10 @@ module Pingram
|
|
|
68
74
|
else
|
|
69
75
|
self.name = nil
|
|
70
76
|
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'expires_at')
|
|
79
|
+
self.expires_at = attributes[:'expires_at']
|
|
80
|
+
end
|
|
71
81
|
end
|
|
72
82
|
|
|
73
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -105,7 +115,8 @@ module Pingram
|
|
|
105
115
|
def ==(o)
|
|
106
116
|
return true if self.equal?(o)
|
|
107
117
|
self.class == o.class &&
|
|
108
|
-
name == o.name
|
|
118
|
+
name == o.name &&
|
|
119
|
+
expires_at == o.expires_at
|
|
109
120
|
end
|
|
110
121
|
|
|
111
122
|
# @see the `==` method
|
|
@@ -117,7 +128,7 @@ module Pingram
|
|
|
117
128
|
# Calculates hash code according to all attributes.
|
|
118
129
|
# @return [Integer] Hash code
|
|
119
130
|
def hash
|
|
120
|
-
[name].hash
|
|
131
|
+
[name, expires_at].hash
|
|
121
132
|
end
|
|
122
133
|
|
|
123
134
|
# Builds the object from hash
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pingram
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pingram
|
|
17
|
+
class CreatePersonalAccessTokenResponse < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
attr_accessor :token_prefix
|
|
23
|
+
|
|
24
|
+
attr_accessor :created_at
|
|
25
|
+
|
|
26
|
+
attr_accessor :expires_at
|
|
27
|
+
|
|
28
|
+
attr_accessor :last_used_at
|
|
29
|
+
|
|
30
|
+
attr_accessor :revoked
|
|
31
|
+
|
|
32
|
+
# Full token — returned only on create. Store it securely; it cannot be retrieved again.
|
|
33
|
+
attr_accessor :token
|
|
34
|
+
|
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
:'id' => :'id',
|
|
39
|
+
:'name' => :'name',
|
|
40
|
+
:'token_prefix' => :'tokenPrefix',
|
|
41
|
+
:'created_at' => :'createdAt',
|
|
42
|
+
:'expires_at' => :'expiresAt',
|
|
43
|
+
:'last_used_at' => :'lastUsedAt',
|
|
44
|
+
:'revoked' => :'revoked',
|
|
45
|
+
:'token' => :'token'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns attribute mapping this model knows about
|
|
50
|
+
def self.acceptable_attribute_map
|
|
51
|
+
attribute_map
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
|
55
|
+
def self.acceptable_attributes
|
|
56
|
+
acceptable_attribute_map.values
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Attribute type mapping.
|
|
60
|
+
def self.openapi_types
|
|
61
|
+
{
|
|
62
|
+
:'id' => :'String',
|
|
63
|
+
:'name' => :'String',
|
|
64
|
+
:'token_prefix' => :'String',
|
|
65
|
+
:'created_at' => :'String',
|
|
66
|
+
:'expires_at' => :'String',
|
|
67
|
+
:'last_used_at' => :'String',
|
|
68
|
+
:'revoked' => :'Boolean',
|
|
69
|
+
:'token' => :'String'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# List of attributes with nullable: true
|
|
74
|
+
def self.openapi_nullable
|
|
75
|
+
Set.new([
|
|
76
|
+
])
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Initializes the object
|
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
81
|
+
def initialize(attributes = {})
|
|
82
|
+
if (!attributes.is_a?(Hash))
|
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::CreatePersonalAccessTokenResponse` initialize method"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
87
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
89
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::CreatePersonalAccessTokenResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
91
|
+
end
|
|
92
|
+
h[k.to_sym] = v
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'id')
|
|
96
|
+
self.id = attributes[:'id']
|
|
97
|
+
else
|
|
98
|
+
self.id = nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'name')
|
|
102
|
+
self.name = attributes[:'name']
|
|
103
|
+
else
|
|
104
|
+
self.name = nil
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'token_prefix')
|
|
108
|
+
self.token_prefix = attributes[:'token_prefix']
|
|
109
|
+
else
|
|
110
|
+
self.token_prefix = nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'created_at')
|
|
114
|
+
self.created_at = attributes[:'created_at']
|
|
115
|
+
else
|
|
116
|
+
self.created_at = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'expires_at')
|
|
120
|
+
self.expires_at = attributes[:'expires_at']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'last_used_at')
|
|
124
|
+
self.last_used_at = attributes[:'last_used_at']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'revoked')
|
|
128
|
+
self.revoked = attributes[:'revoked']
|
|
129
|
+
else
|
|
130
|
+
self.revoked = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'token')
|
|
134
|
+
self.token = attributes[:'token']
|
|
135
|
+
else
|
|
136
|
+
self.token = nil
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
141
|
+
# @return Array for valid properties with the reasons
|
|
142
|
+
def list_invalid_properties
|
|
143
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
144
|
+
invalid_properties = Array.new
|
|
145
|
+
if @id.nil?
|
|
146
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if @name.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if @token_prefix.nil?
|
|
154
|
+
invalid_properties.push('invalid value for "token_prefix", token_prefix cannot be nil.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if @created_at.nil?
|
|
158
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if @revoked.nil?
|
|
162
|
+
invalid_properties.push('invalid value for "revoked", revoked cannot be nil.')
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if @token.nil?
|
|
166
|
+
invalid_properties.push('invalid value for "token", token cannot be nil.')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
invalid_properties
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Check to see if the all the properties in the model are valid
|
|
173
|
+
# @return true if the model is valid
|
|
174
|
+
def valid?
|
|
175
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
176
|
+
return false if @id.nil?
|
|
177
|
+
return false if @name.nil?
|
|
178
|
+
return false if @token_prefix.nil?
|
|
179
|
+
return false if @created_at.nil?
|
|
180
|
+
return false if @revoked.nil?
|
|
181
|
+
return false if @token.nil?
|
|
182
|
+
true
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Custom attribute writer method with validation
|
|
186
|
+
# @param [Object] id Value to be assigned
|
|
187
|
+
def id=(id)
|
|
188
|
+
if id.nil?
|
|
189
|
+
fail ArgumentError, 'id cannot be nil'
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
@id = id
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Custom attribute writer method with validation
|
|
196
|
+
# @param [Object] name Value to be assigned
|
|
197
|
+
def name=(name)
|
|
198
|
+
if name.nil?
|
|
199
|
+
fail ArgumentError, 'name cannot be nil'
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
@name = name
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Custom attribute writer method with validation
|
|
206
|
+
# @param [Object] token_prefix Value to be assigned
|
|
207
|
+
def token_prefix=(token_prefix)
|
|
208
|
+
if token_prefix.nil?
|
|
209
|
+
fail ArgumentError, 'token_prefix cannot be nil'
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
@token_prefix = token_prefix
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Custom attribute writer method with validation
|
|
216
|
+
# @param [Object] created_at Value to be assigned
|
|
217
|
+
def created_at=(created_at)
|
|
218
|
+
if created_at.nil?
|
|
219
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
@created_at = created_at
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Custom attribute writer method with validation
|
|
226
|
+
# @param [Object] revoked Value to be assigned
|
|
227
|
+
def revoked=(revoked)
|
|
228
|
+
if revoked.nil?
|
|
229
|
+
fail ArgumentError, 'revoked cannot be nil'
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
@revoked = revoked
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Custom attribute writer method with validation
|
|
236
|
+
# @param [Object] token Value to be assigned
|
|
237
|
+
def token=(token)
|
|
238
|
+
if token.nil?
|
|
239
|
+
fail ArgumentError, 'token cannot be nil'
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
@token = token
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Checks equality by comparing each attribute.
|
|
246
|
+
# @param [Object] Object to be compared
|
|
247
|
+
def ==(o)
|
|
248
|
+
return true if self.equal?(o)
|
|
249
|
+
self.class == o.class &&
|
|
250
|
+
id == o.id &&
|
|
251
|
+
name == o.name &&
|
|
252
|
+
token_prefix == o.token_prefix &&
|
|
253
|
+
created_at == o.created_at &&
|
|
254
|
+
expires_at == o.expires_at &&
|
|
255
|
+
last_used_at == o.last_used_at &&
|
|
256
|
+
revoked == o.revoked &&
|
|
257
|
+
token == o.token
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# @see the `==` method
|
|
261
|
+
# @param [Object] Object to be compared
|
|
262
|
+
def eql?(o)
|
|
263
|
+
self == o
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Calculates hash code according to all attributes.
|
|
267
|
+
# @return [Integer] Hash code
|
|
268
|
+
def hash
|
|
269
|
+
[id, name, token_prefix, created_at, expires_at, last_used_at, revoked, token].hash
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Builds the object from hash
|
|
273
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
274
|
+
# @return [Object] Returns the model itself
|
|
275
|
+
def self.build_from_hash(attributes)
|
|
276
|
+
return nil unless attributes.is_a?(Hash)
|
|
277
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
278
|
+
transformed_hash = {}
|
|
279
|
+
openapi_types.each_pair do |key, type|
|
|
280
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
281
|
+
transformed_hash["#{key}"] = nil
|
|
282
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
283
|
+
# check to ensure the input is an array given that the attribute
|
|
284
|
+
# is documented as an array but the input is not
|
|
285
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
286
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
287
|
+
end
|
|
288
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
289
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
new(transformed_hash)
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Returns the object in the form of hash
|
|
296
|
+
# @return [Hash] Returns the object in the form of hash
|
|
297
|
+
def to_hash
|
|
298
|
+
hash = {}
|
|
299
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
300
|
+
value = self.send(attr)
|
|
301
|
+
if value.nil?
|
|
302
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
303
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
hash[param] = _to_hash(value)
|
|
307
|
+
end
|
|
308
|
+
hash
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
end
|