smplkit 1.0.8 → 1.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 240ff26d3b6331fc2d18ff45139a51805256dba0f4f967cfa22908813018969a
4
- data.tar.gz: '039b4b6006898ba7c0d772145b7f7e020db449fdbe84e9a5ea4a86cdaa556fa1'
3
+ metadata.gz: 7c58128ff207d255ca61de78cd05db65a37dce681d7940441db0a10acddd5e7a
4
+ data.tar.gz: 73500c410292e3a5a6daefa1a75ffaa0b9a61f951e50c9f8f52a1b5a893dd38a
5
5
  SHA512:
6
- metadata.gz: e29c56bca6774d6359cf6608b1af33f740f08f1279413840f828bc76f8156d47db0e63e276572e54ccdd8fb231711d57549dd541317df87c41f0ca27f9709c3b
7
- data.tar.gz: 6c503968b0071dc1b5ffdfca1dea9a7b264246e55d9d618aa515c3a6ae408472b8bc2973fc2c1466c2a658a1a3c79633b3c273a406e4a88caae5900ece333ff7
6
+ metadata.gz: 0f55ecc713c6c7171b52469098c6f9b3268d1bf43fe66ec8da85eb1d1a5293cb1f0e801c975cd1db4a9d15c3e509319b382b5f98220beb26d2761e7b78781cc1
7
+ data.tar.gz: 7c5a33b527b9d042919b62c570ba14578607131386f1bcba9a6ede04f99f0d97ae9288287f99f9bad0bb826f3f12970196e82908fbf56d5e70c43ea0768d75dc
@@ -25,6 +25,7 @@ module SmplkitGeneratedClient::App
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [String] :mode (default to 'signin')
27
27
  # @option opts [String] :source
28
+ # @option opts [String] :entry_point
28
29
  # @return [nil]
29
30
  def begin_oidc_login(provider, opts = {})
30
31
  begin_oidc_login_with_http_info(provider, opts)
@@ -37,6 +38,7 @@ module SmplkitGeneratedClient::App
37
38
  # @param [Hash] opts the optional parameters
38
39
  # @option opts [String] :mode (default to 'signin')
39
40
  # @option opts [String] :source
41
+ # @option opts [String] :entry_point
40
42
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
43
  def begin_oidc_login_with_http_info(provider, opts = {})
42
44
  if @api_client.config.debugging
@@ -53,6 +55,7 @@ module SmplkitGeneratedClient::App
53
55
  query_params = opts[:query_params] || {}
54
56
  query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
55
57
  query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?
58
+ query_params[:'entry_point'] = opts[:'entry_point'] if !opts[:'entry_point'].nil?
56
59
 
57
60
  # header parameters
58
61
  header_params = opts[:header_params] || {}
@@ -29,6 +29,12 @@ module SmplkitGeneratedClient::App
29
29
 
30
30
  attr_accessor :product_subscriptions
31
31
 
32
+ # Registration entry point (from account.data)
33
+ attr_accessor :entry_point
34
+
35
+ # Whether sample data is active (from account.settings)
36
+ attr_accessor :show_sample_data
37
+
32
38
  # Attribute mapping from ruby-style variable name to JSON key.
33
39
  def self.attribute_map
34
40
  {
@@ -38,7 +44,9 @@ module SmplkitGeneratedClient::App
38
44
  :'expires_at' => :'expires_at',
39
45
  :'created_at' => :'created_at',
40
46
  :'deleted_at' => :'deleted_at',
41
- :'product_subscriptions' => :'product_subscriptions'
47
+ :'product_subscriptions' => :'product_subscriptions',
48
+ :'entry_point' => :'entry_point',
49
+ :'show_sample_data' => :'show_sample_data'
42
50
  }
43
51
  end
44
52
 
@@ -61,7 +69,9 @@ module SmplkitGeneratedClient::App
61
69
  :'expires_at' => :'Time',
62
70
  :'created_at' => :'Time',
63
71
  :'deleted_at' => :'Time',
64
- :'product_subscriptions' => :'Hash<String, Object>'
72
+ :'product_subscriptions' => :'Hash<String, Object>',
73
+ :'entry_point' => :'String',
74
+ :'show_sample_data' => :'Boolean'
65
75
  }
66
76
  end
67
77
 
@@ -71,7 +81,9 @@ module SmplkitGeneratedClient::App
71
81
  :'expires_at',
72
82
  :'created_at',
73
83
  :'deleted_at',
74
- :'product_subscriptions'
84
+ :'product_subscriptions',
85
+ :'entry_point',
86
+ :'show_sample_data'
75
87
  ])
76
88
  end
77
89
 
@@ -126,6 +138,14 @@ module SmplkitGeneratedClient::App
126
138
  self.product_subscriptions = value
127
139
  end
128
140
  end
141
+
142
+ if attributes.key?(:'entry_point')
143
+ self.entry_point = attributes[:'entry_point']
144
+ end
145
+
146
+ if attributes.key?(:'show_sample_data')
147
+ self.show_sample_data = attributes[:'show_sample_data']
148
+ end
129
149
  end
130
150
 
131
151
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -202,7 +222,9 @@ module SmplkitGeneratedClient::App
202
222
  expires_at == o.expires_at &&
203
223
  created_at == o.created_at &&
204
224
  deleted_at == o.deleted_at &&
205
- product_subscriptions == o.product_subscriptions
225
+ product_subscriptions == o.product_subscriptions &&
226
+ entry_point == o.entry_point &&
227
+ show_sample_data == o.show_sample_data
206
228
  end
207
229
 
208
230
  # @see the `==` method
@@ -214,7 +236,7 @@ module SmplkitGeneratedClient::App
214
236
  # Calculates hash code according to all attributes.
215
237
  # @return [Integer] Hash code
216
238
  def hash
217
- [name, key, has_stripe_customer, expires_at, created_at, deleted_at, product_subscriptions].hash
239
+ [name, key, has_stripe_customer, expires_at, created_at, deleted_at, product_subscriptions, entry_point, show_sample_data].hash
218
240
  end
219
241
 
220
242
  # Builds the object from hash
@@ -19,11 +19,37 @@ module SmplkitGeneratedClient::App
19
19
 
20
20
  attr_accessor :password
21
21
 
22
+ # Registration entry point. Allowed: login, get_started, live_demo, unknown. Defaults to unknown when omitted.
23
+ attr_accessor :entry_point
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
22
47
  # Attribute mapping from ruby-style variable name to JSON key.
23
48
  def self.attribute_map
24
49
  {
25
50
  :'email' => :'email',
26
- :'password' => :'password'
51
+ :'password' => :'password',
52
+ :'entry_point' => :'entry_point'
27
53
  }
28
54
  end
29
55
 
@@ -41,13 +67,15 @@ module SmplkitGeneratedClient::App
41
67
  def self.openapi_types
42
68
  {
43
69
  :'email' => :'String',
44
- :'password' => :'String'
70
+ :'password' => :'String',
71
+ :'entry_point' => :'String'
45
72
  }
46
73
  end
47
74
 
48
75
  # List of attributes with nullable: true
49
76
  def self.openapi_nullable
50
77
  Set.new([
78
+ :'entry_point'
51
79
  ])
52
80
  end
53
81
 
@@ -78,6 +106,10 @@ module SmplkitGeneratedClient::App
78
106
  else
79
107
  self.password = nil
80
108
  end
109
+
110
+ if attributes.key?(:'entry_point')
111
+ self.entry_point = attributes[:'entry_point']
112
+ end
81
113
  end
82
114
 
83
115
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -112,6 +144,8 @@ module SmplkitGeneratedClient::App
112
144
  return false if @password.nil?
113
145
  return false if @password.to_s.length > 128
114
146
  return false if @password.to_s.length < 8
147
+ entry_point_validator = EnumAttributeValidator.new('String', ["login", "get_started", "live_demo", "unknown"])
148
+ return false unless entry_point_validator.valid?(@entry_point)
115
149
  true
116
150
  end
117
151
 
@@ -143,13 +177,24 @@ module SmplkitGeneratedClient::App
143
177
  @password = password
144
178
  end
145
179
 
180
+ # Custom attribute writer method checking allowed values (enum).
181
+ # @param [Object] entry_point Object to be assigned
182
+ def entry_point=(entry_point)
183
+ validator = EnumAttributeValidator.new('String', ["login", "get_started", "live_demo", "unknown"])
184
+ unless validator.valid?(entry_point)
185
+ fail ArgumentError, "invalid value for \"entry_point\", must be one of #{validator.allowable_values}."
186
+ end
187
+ @entry_point = entry_point
188
+ end
189
+
146
190
  # Checks equality by comparing each attribute.
147
191
  # @param [Object] Object to be compared
148
192
  def ==(o)
149
193
  return true if self.equal?(o)
150
194
  self.class == o.class &&
151
195
  email == o.email &&
152
- password == o.password
196
+ password == o.password &&
197
+ entry_point == o.entry_point
153
198
  end
154
199
 
155
200
  # @see the `==` method
@@ -161,7 +206,7 @@ module SmplkitGeneratedClient::App
161
206
  # Calculates hash code according to all attributes.
162
207
  # @return [Integer] Hash code
163
208
  def hash
164
- [email, password].hash
209
+ [email, password, entry_point].hash
165
210
  end
166
211
 
167
212
  # Builds the object from hash
@@ -39,6 +39,7 @@ describe 'AuthApi' do
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @option opts [String] :mode
41
41
  # @option opts [String] :source
42
+ # @option opts [String] :entry_point
42
43
  # @return [nil]
43
44
  describe 'begin_oidc_login test' do
44
45
  it 'should work' do
@@ -69,4 +69,16 @@ describe SmplkitGeneratedClient::App::Account do
69
69
  end
70
70
  end
71
71
 
72
+ describe 'test attribute "entry_point"' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
75
+ end
76
+ end
77
+
78
+ describe 'test attribute "show_sample_data"' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
81
+ end
82
+ end
83
+
72
84
  end
@@ -39,4 +39,14 @@ describe SmplkitGeneratedClient::App::RegisterRequest do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "entry_point"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["login", "get_started", "live_demo", "unknown"])
46
+ # validator.allowable_values.each do |value|
47
+ # expect { instance.entry_point = value }.not_to raise_error
48
+ # end
49
+ end
50
+ end
51
+
42
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smplkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smpl Solutions LLC