stage-ruby 0.0.02 → 0.0.03

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.
@@ -0,0 +1,242 @@
1
+ =begin
2
+ #Stage API Docs
3
+
4
+ #Stage Technologies complete API Documentation
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: support@heystage.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.33
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module Stage
15
+ class StageUserObjectForm
16
+ attr_accessor :arena_id
17
+
18
+ attr_accessor :deleted
19
+
20
+ attr_accessor :email
21
+
22
+ attr_accessor :id
23
+
24
+ attr_accessor :password
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'arena_id' => :'arenaId',
30
+ :'deleted' => :'deleted',
31
+ :'email' => :'email',
32
+ :'id' => :'id',
33
+ :'password' => :'password'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'arena_id' => :'Object',
41
+ :'deleted' => :'Object',
42
+ :'email' => :'Object',
43
+ :'id' => :'Object',
44
+ :'password' => :'Object'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Stage::StageUserObjectForm` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Stage::StageUserObjectForm`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'arena_id')
70
+ self.arena_id = attributes[:'arena_id']
71
+ end
72
+
73
+ if attributes.key?(:'deleted')
74
+ self.deleted = attributes[:'deleted']
75
+ end
76
+
77
+ if attributes.key?(:'email')
78
+ self.email = attributes[:'email']
79
+ end
80
+
81
+ if attributes.key?(:'id')
82
+ self.id = attributes[:'id']
83
+ end
84
+
85
+ if attributes.key?(:'password')
86
+ self.password = attributes[:'password']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ true
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ arena_id == o.arena_id &&
109
+ deleted == o.deleted &&
110
+ email == o.email &&
111
+ id == o.id &&
112
+ password == o.password
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ def hash
124
+ [arena_id, deleted, email, id, password].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def self.build_from_hash(attributes)
131
+ new.build_from_hash(attributes)
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ self.class.openapi_types.each_pair do |key, type|
140
+ if type =~ /\AArray<(.*)>/i
141
+ # check to ensure the input is an array given that the attribute
142
+ # is documented as an array but the input is not
143
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
144
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
145
+ end
146
+ elsif !attributes[self.class.attribute_map[key]].nil?
147
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
+ self.send("#{key}=", nil)
150
+ end
151
+ end
152
+
153
+ self
154
+ end
155
+
156
+ # Deserializes the data based on type
157
+ # @param string type Data type
158
+ # @param string value Value to be deserialized
159
+ # @return [Object] Deserialized data
160
+ def _deserialize(type, value)
161
+ case type.to_sym
162
+ when :DateTime
163
+ DateTime.parse(value)
164
+ when :Date
165
+ Date.parse(value)
166
+ when :String
167
+ value.to_s
168
+ when :Integer
169
+ value.to_i
170
+ when :Float
171
+ value.to_f
172
+ when :Boolean
173
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
174
+ true
175
+ else
176
+ false
177
+ end
178
+ when :Object
179
+ # generic object (usually a Hash), return directly
180
+ value
181
+ when /\AArray<(?<inner_type>.+)>\z/
182
+ inner_type = Regexp.last_match[:inner_type]
183
+ value.map { |v| _deserialize(inner_type, v) }
184
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
185
+ k_type = Regexp.last_match[:k_type]
186
+ v_type = Regexp.last_match[:v_type]
187
+ {}.tap do |hash|
188
+ value.each do |k, v|
189
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
190
+ end
191
+ end
192
+ else # model
193
+ Stage.const_get(type).build_from_hash(value)
194
+ end
195
+ end
196
+
197
+ # Returns the string representation of the object
198
+ # @return [String] String presentation of the object
199
+ def to_s
200
+ to_hash.to_s
201
+ end
202
+
203
+ # to_body is an alias to to_hash (backward compatibility)
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_body
206
+ to_hash
207
+ end
208
+
209
+ # Returns the object in the form of hash
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_hash
212
+ hash = {}
213
+ self.class.attribute_map.each_pair do |attr, param|
214
+ value = self.send(attr)
215
+ if value.nil?
216
+ is_nullable = self.class.openapi_nullable.include?(attr)
217
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
+ end
219
+
220
+ hash[param] = _to_hash(value)
221
+ end
222
+ hash
223
+ end
224
+
225
+ # Outputs non-array value in the form of hash
226
+ # For object, use to_hash. Otherwise, just return the value
227
+ # @param [Object] value Any valid value
228
+ # @return [Hash] Returns the value in the form of hash
229
+ def _to_hash(value)
230
+ if value.is_a?(Array)
231
+ value.compact.map { |v| _to_hash(v) }
232
+ elsif value.is_a?(Hash)
233
+ {}.tap do |hash|
234
+ value.each { |k, v| hash[k] = _to_hash(v) }
235
+ end
236
+ elsif value.respond_to? :to_hash
237
+ value.to_hash
238
+ else
239
+ value
240
+ end
241
+ end end
242
+ end
@@ -4,6 +4,8 @@ API_VERSION = "v1"
4
4
 
5
5
  CREATE_USER_PATH = "#{SDK_API_PATH_PREFIX}/#{API_VERSION}/users"
6
6
 
7
+ PLANS_PATH = "#{SDK_API_PATH_PREFIX}/#{API_VERSION}/plans"
8
+
7
9
  def has_access_path(user_identifier)
8
10
  "#{CREATE_USER_PATH}/#{user_identifier}/features"
9
11
  end
@@ -10,5 +10,5 @@ Swagger Codegen version: 3.0.33
10
10
  =end
11
11
 
12
12
  module Stage
13
- VERSION = '0.0.02'
13
+ VERSION = '0.0.03'
14
14
  end
data/lib/stage-ruby.rb CHANGED
@@ -20,8 +20,11 @@ require 'stage-ruby/models/access_feature_form'
20
20
  require 'stage-ruby/models/access_form'
21
21
  require 'stage-ruby/models/client_user_form'
22
22
  require 'stage-ruby/models/client_user_object_form'
23
+ require 'stage-ruby/models/feature_object_form'
23
24
  require 'stage-ruby/models/field'
25
+ require 'stage-ruby/models/plan_object_form'
24
26
  require 'stage-ruby/models/stage_error'
27
+ require 'stage-ruby/models/stage_user_object_form'
25
28
 
26
29
  # APIs
27
30
  require 'stage-ruby/api/stage_api'
data/spec/.DS_Store ADDED
Binary file
@@ -42,9 +42,20 @@ describe 'StageApi' do
42
42
  end
43
43
  end
44
44
 
45
+ # unit tests for get_plans
46
+ # Gets all plans.
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<PlanObjectForm>]
49
+ describe 'get_plans test' do
50
+ it 'should work' do
51
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
52
+ end
53
+ end
54
+
45
55
  # unit tests for has_access
46
56
  # Checks if a user has access to the identified feature.
47
- # @param identifiers identifiers
57
+ # @param identifiers The identifiers of the features being accessed.
58
+ # @param mark_accessed Whether this has-access check should mark the features as having been accessed.
48
59
  # @param user_identifier The identifier of the user who is accessing the feature.
49
60
  # @param [Hash] opts the optional parameters
50
61
  # @return [AccessForm]
@@ -55,7 +66,7 @@ describe 'StageApi' do
55
66
  end
56
67
 
57
68
  # unit tests for update_user_plan
58
- # Updates a user&#x27;s plan..
69
+ # Updates a user&#x27;s plan.
59
70
  # @param body The payload containing the information to update a user&#x27;s plan. Only identifier and planIdentifier fields are required.
60
71
  # @param user_identifier The identifier of the user.
61
72
  # @param [Hash] opts the optional parameters
@@ -43,6 +43,12 @@ describe 'ClientUserObjectForm' do
43
43
  end
44
44
  end
45
45
 
46
+ describe 'test attribute "created_by"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
46
52
  describe 'test attribute "deleted"' do
47
53
  it 'should work' do
48
54
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -0,0 +1,64 @@
1
+ =begin
2
+ #Stage API Docs
3
+
4
+ #Stage Technologies complete API Documentation
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: support@heystage.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.33
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for Stage::FeatureObjectForm
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'FeatureObjectForm' do
20
+ before do
21
+ # run before each test
22
+ @instance = Stage::FeatureObjectForm.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of FeatureObjectForm' do
30
+ it 'should create an instance of FeatureObjectForm' do
31
+ expect(@instance).to be_instance_of(Stage::FeatureObjectForm)
32
+ end
33
+ end
34
+ describe 'test attribute "description"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "identifier"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "limit"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "name"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ describe 'test attribute "order"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ end
@@ -0,0 +1,70 @@
1
+ =begin
2
+ #Stage API Docs
3
+
4
+ #Stage Technologies complete API Documentation
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: support@heystage.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.33
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for Stage::PlanObjectForm
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'PlanObjectForm' do
20
+ before do
21
+ # run before each test
22
+ @instance = Stage::PlanObjectForm.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of PlanObjectForm' do
30
+ it 'should create an instance of PlanObjectForm' do
31
+ expect(@instance).to be_instance_of(Stage::PlanObjectForm)
32
+ end
33
+ end
34
+ describe 'test attribute "description"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "features"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "identifier"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "name"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ describe 'test attribute "order"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "stripe_product_id"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
70
+ end
@@ -0,0 +1,64 @@
1
+ =begin
2
+ #Stage API Docs
3
+
4
+ #Stage Technologies complete API Documentation
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: support@heystage.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.33
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for Stage::StageUserObjectForm
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'StageUserObjectForm' do
20
+ before do
21
+ # run before each test
22
+ @instance = Stage::StageUserObjectForm.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of StageUserObjectForm' do
30
+ it 'should create an instance of StageUserObjectForm' do
31
+ expect(@instance).to be_instance_of(Stage::StageUserObjectForm)
32
+ end
33
+ end
34
+ describe 'test attribute "arena_id"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "deleted"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "email"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "id"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ describe 'test attribute "password"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stage-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.02
4
+ version: 0.0.03
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stage Technologies, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-13 00:00:00.000000000 Z
11
+ date: 2022-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -85,12 +85,17 @@ files:
85
85
  - docs/AccessForm.md
86
86
  - docs/ClientUserForm.md
87
87
  - docs/ClientUserObjectForm.md
88
+ - docs/FeatureObjectForm.md
88
89
  - docs/Field.md
90
+ - docs/PlanObjectForm.md
89
91
  - docs/StageApi.md
90
92
  - docs/StageError.md
93
+ - docs/StageUserObjectForm.md
91
94
  - example.rb
92
95
  - git_push.sh
96
+ - lib/.DS_Store
93
97
  - lib/stage-ruby.rb
98
+ - lib/stage-ruby/.DS_Store
94
99
  - lib/stage-ruby/api/stage_api.rb
95
100
  - lib/stage-ruby/api_client.rb
96
101
  - lib/stage-ruby/api_error.rb
@@ -99,10 +104,14 @@ files:
99
104
  - lib/stage-ruby/models/access_form.rb
100
105
  - lib/stage-ruby/models/client_user_form.rb
101
106
  - lib/stage-ruby/models/client_user_object_form.rb
107
+ - lib/stage-ruby/models/feature_object_form.rb
102
108
  - lib/stage-ruby/models/field.rb
109
+ - lib/stage-ruby/models/plan_object_form.rb
103
110
  - lib/stage-ruby/models/stage_error.rb
111
+ - lib/stage-ruby/models/stage_user_object_form.rb
104
112
  - lib/stage-ruby/utils.rb
105
113
  - lib/stage-ruby/version.rb
114
+ - spec/.DS_Store
106
115
  - spec/api/stage_api_spec.rb
107
116
  - spec/api_client_spec.rb
108
117
  - spec/base_object_spec.rb
@@ -111,9 +120,13 @@ files:
111
120
  - spec/models/access_form_spec.rb
112
121
  - spec/models/client_user_form_spec.rb
113
122
  - spec/models/client_user_object_form_spec.rb
123
+ - spec/models/feature_object_form_spec.rb
114
124
  - spec/models/field_spec.rb
125
+ - spec/models/plan_object_form_spec.rb
115
126
  - spec/models/stage_error_spec.rb
127
+ - spec/models/stage_user_object_form_spec.rb
116
128
  - spec/spec_helper.rb
129
+ - stage-ruby-0.0.02.gem
117
130
  - stage-ruby.gemspec
118
131
  homepage: https://github.com/swagger-api/swagger-codegen
119
132
  licenses:
@@ -146,6 +159,9 @@ test_files:
146
159
  - spec/models/client_user_object_form_spec.rb
147
160
  - spec/models/field_spec.rb
148
161
  - spec/models/access_form_spec.rb
162
+ - spec/models/stage_user_object_form_spec.rb
163
+ - spec/models/plan_object_form_spec.rb
164
+ - spec/models/feature_object_form_spec.rb
149
165
  - spec/models/stage_error_spec.rb
150
166
  - spec/models/access_feature_form_spec.rb
151
167
  - spec/models/client_user_form_spec.rb