talon_one 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -4
  3. data/docs/ApplicationSession.md +2 -1
  4. data/docs/Attribute.md +0 -2
  5. data/docs/ErrorSource.md +1 -0
  6. data/docs/Meta.md +1 -0
  7. data/docs/Notification.md +10 -0
  8. data/docs/Notifications.md +7 -0
  9. data/docs/ReferralRejectionReason.md +10 -0
  10. data/docs/UpdateUser.md +1 -0
  11. data/docs/User.md +1 -0
  12. data/docs/Webhook.md +0 -1
  13. data/lib/talon_one.rb +3 -0
  14. data/lib/talon_one/models/application_session.rb +12 -2
  15. data/lib/talon_one/models/attribute.rb +4 -38
  16. data/lib/talon_one/models/coupon_rejection_reason.rb +2 -2
  17. data/lib/talon_one/models/error_source.rb +14 -4
  18. data/lib/talon_one/models/meta.rb +10 -1
  19. data/lib/talon_one/models/notification.rb +219 -0
  20. data/lib/talon_one/models/notifications.rb +174 -0
  21. data/lib/talon_one/models/referral_rejection_reason.rb +251 -0
  22. data/lib/talon_one/models/update_user.rb +13 -4
  23. data/lib/talon_one/models/user.rb +13 -4
  24. data/lib/talon_one/models/webhook.rb +4 -21
  25. data/lib/talon_one/version.rb +1 -1
  26. data/spec/models/application_session_spec.rb +6 -0
  27. data/spec/models/attribute_spec.rb +0 -12
  28. data/spec/models/coupon_rejection_reason_spec.rb +1 -1
  29. data/spec/models/error_source_spec.rb +6 -0
  30. data/spec/models/meta_spec.rb +6 -0
  31. data/spec/models/notification_spec.rb +53 -0
  32. data/spec/models/notifications_spec.rb +35 -0
  33. data/spec/models/referral_rejection_reason_spec.rb +57 -0
  34. data/spec/models/update_user_spec.rb +6 -0
  35. data/spec/models/user_spec.rb +6 -0
  36. data/spec/models/webhook_spec.rb +0 -6
  37. data/talon_one-1.1.2.gem +0 -0
  38. metadata +15 -2
@@ -51,6 +51,8 @@ module TalonOne
51
51
  # Contains a list of all roles a user is a memeber of
52
52
  attr_accessor :roles
53
53
 
54
+ attr_accessor :application_notification_subscriptions
55
+
54
56
  class EnumAttributeValidator
55
57
  attr_reader :datatype
56
58
  attr_reader :allowable_values
@@ -87,7 +89,8 @@ module TalonOne
87
89
  :'policy' => :'policy',
88
90
  :'release_update' => :'releaseUpdate',
89
91
  :'latest_feature' => :'latestFeature',
90
- :'roles' => :'roles'
92
+ :'roles' => :'roles',
93
+ :'application_notification_subscriptions' => :'applicationNotificationSubscriptions'
91
94
  }
92
95
  end
93
96
 
@@ -105,7 +108,8 @@ module TalonOne
105
108
  :'policy' => :'String',
106
109
  :'release_update' => :'BOOLEAN',
107
110
  :'latest_feature' => :'String',
108
- :'roles' => :'Array<Integer>'
111
+ :'roles' => :'Array<Integer>',
112
+ :'application_notification_subscriptions' => :'Object'
109
113
  }
110
114
  end
111
115
 
@@ -166,6 +170,10 @@ module TalonOne
166
170
  self.roles = value
167
171
  end
168
172
  end
173
+
174
+ if attributes.has_key?(:'applicationNotificationSubscriptions')
175
+ self.application_notification_subscriptions = attributes[:'applicationNotificationSubscriptions']
176
+ end
169
177
  end
170
178
 
171
179
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -259,7 +267,8 @@ module TalonOne
259
267
  policy == o.policy &&
260
268
  release_update == o.release_update &&
261
269
  latest_feature == o.latest_feature &&
262
- roles == o.roles
270
+ roles == o.roles &&
271
+ application_notification_subscriptions == o.application_notification_subscriptions
263
272
  end
264
273
 
265
274
  # @see the `==` method
@@ -271,7 +280,7 @@ module TalonOne
271
280
  # Calculates hash code according to all attributes.
272
281
  # @return [Fixnum] Hash code
273
282
  def hash
274
- [id, created, modified, email, account_id, invite_token, state, name, policy, release_update, latest_feature, roles].hash
283
+ [id, created, modified, email, account_id, invite_token, state, name, policy, release_update, latest_feature, roles, application_notification_subscriptions].hash
275
284
  end
276
285
 
277
286
  # Builds the object from hash
@@ -48,9 +48,6 @@ module TalonOne
48
48
  # Enables or disables webhook from showing in rule builder
49
49
  attr_accessor :enabled
50
50
 
51
- # array of rulesets where webhook is used
52
- attr_accessor :used_at
53
-
54
51
  class EnumAttributeValidator
55
52
  attr_reader :datatype
56
53
  attr_reader :allowable_values
@@ -86,8 +83,7 @@ module TalonOne
86
83
  :'headers' => :'headers',
87
84
  :'payload' => :'payload',
88
85
  :'params' => :'params',
89
- :'enabled' => :'enabled',
90
- :'used_at' => :'usedAt'
86
+ :'enabled' => :'enabled'
91
87
  }
92
88
  end
93
89
 
@@ -104,8 +100,7 @@ module TalonOne
104
100
  :'headers' => :'Array<String>',
105
101
  :'payload' => :'String',
106
102
  :'params' => :'Array<TemplateArgDef>',
107
- :'enabled' => :'BOOLEAN',
108
- :'used_at' => :'Array<String>'
103
+ :'enabled' => :'BOOLEAN'
109
104
  }
110
105
  end
111
106
 
@@ -166,12 +161,6 @@ module TalonOne
166
161
  if attributes.has_key?(:'enabled')
167
162
  self.enabled = attributes[:'enabled']
168
163
  end
169
-
170
- if attributes.has_key?(:'usedAt')
171
- if (value = attributes[:'usedAt']).is_a?(Array)
172
- self.used_at = value
173
- end
174
- end
175
164
  end
176
165
 
177
166
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -218,10 +207,6 @@ module TalonOne
218
207
  invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
219
208
  end
220
209
 
221
- if @used_at.nil?
222
- invalid_properties.push('invalid value for "used_at", used_at cannot be nil.')
223
- end
224
-
225
210
  invalid_properties
226
211
  end
227
212
 
@@ -240,7 +225,6 @@ module TalonOne
240
225
  return false if @headers.nil?
241
226
  return false if @params.nil?
242
227
  return false if @enabled.nil?
243
- return false if @used_at.nil?
244
228
  true
245
229
  end
246
230
 
@@ -269,8 +253,7 @@ module TalonOne
269
253
  headers == o.headers &&
270
254
  payload == o.payload &&
271
255
  params == o.params &&
272
- enabled == o.enabled &&
273
- used_at == o.used_at
256
+ enabled == o.enabled
274
257
  end
275
258
 
276
259
  # @see the `==` method
@@ -282,7 +265,7 @@ module TalonOne
282
265
  # Calculates hash code according to all attributes.
283
266
  # @return [Fixnum] Hash code
284
267
  def hash
285
- [id, created, modified, application_ids, title, verb, url, headers, payload, params, enabled, used_at].hash
268
+ [id, created, modified, application_ids, title, verb, url, headers, payload, params, enabled].hash
286
269
  end
287
270
 
288
271
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.7
11
11
  =end
12
12
 
13
13
  module TalonOne
14
- VERSION = '1.1.2'
14
+ VERSION = '1.2.0'
15
15
  end
@@ -96,6 +96,12 @@ describe 'ApplicationSession' do
96
96
  end
97
97
  end
98
98
 
99
+ describe 'test attribute "total"' do
100
+ it 'should work' do
101
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
102
+ end
103
+ end
104
+
99
105
  describe 'test attribute "attributes"' do
100
106
  it 'should work' do
101
107
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -106,16 +106,4 @@ describe 'Attribute' do
106
106
  end
107
107
  end
108
108
 
109
- describe 'test attribute "locked"' do
110
- it 'should work' do
111
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
112
- end
113
- end
114
-
115
- describe 'test attribute "used_at"' do
116
- it 'should work' do
117
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
118
- end
119
- end
120
-
121
109
  end
@@ -47,7 +47,7 @@ describe 'CouponRejectionReason' do
47
47
  describe 'test attribute "reason"' do
48
48
  it 'should work' do
49
49
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["CouponNotFound", "CouponPartOfNotRunningCampaign", "CouponLimitReached", "CampaignLimitReached", "ProfileLimitReached", "CouponRecipientDoesNotMatch", "CouponExpired", "CouponStartDateInFuture", "CouponRejectedByCondition"])
50
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["CouponNotFound", "CouponPartOfNotRunningCampaign", "CouponValidConditionMissing", "CouponLimitReached", "CampaignLimitReached", "ProfileLimitReached", "CouponRecipientDoesNotMatch", "CouponExpired", "CouponStartDateInFuture", "CouponRejectedByCondition", "EffectCouldNotBeApplied"])
51
51
  # validator.allowable_values.each do |value|
52
52
  # expect { @instance.reason = value }.not_to raise_error
53
53
  # end
@@ -50,4 +50,10 @@ describe 'ErrorSource' do
50
50
  end
51
51
  end
52
52
 
53
+ describe 'test attribute "resource"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
53
59
  end
@@ -50,6 +50,12 @@ describe 'Meta' do
50
50
  end
51
51
  end
52
52
 
53
+ describe 'test attribute "referral_rejection_reason"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
53
59
  describe 'test attribute "warnings"' do
54
60
  it 'should work' do
55
61
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -0,0 +1,53 @@
1
+ =begin
2
+ #Talon.One API
3
+
4
+ #The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.7
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TalonOne::Notification
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'Notification' do
21
+ before do
22
+ # run before each test
23
+ @instance = TalonOne::Notification.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of Notification' do
31
+ it 'should create an instance of Notification' do
32
+ expect(@instance).to be_instance_of(TalonOne::Notification)
33
+ end
34
+ end
35
+ describe 'test attribute "id"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "name"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "description"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,35 @@
1
+ =begin
2
+ #Talon.One API
3
+
4
+ #The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.7
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TalonOne::Notifications
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'Notifications' do
21
+ before do
22
+ # run before each test
23
+ @instance = TalonOne::Notifications.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of Notifications' do
31
+ it 'should create an instance of Notifications' do
32
+ expect(@instance).to be_instance_of(TalonOne::Notifications)
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,57 @@
1
+ =begin
2
+ #Talon.One API
3
+
4
+ #The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.7
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TalonOne::ReferralRejectionReason
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'ReferralRejectionReason' do
21
+ before do
22
+ # run before each test
23
+ @instance = TalonOne::ReferralRejectionReason.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of ReferralRejectionReason' do
31
+ it 'should create an instance of ReferralRejectionReason' do
32
+ expect(@instance).to be_instance_of(TalonOne::ReferralRejectionReason)
33
+ end
34
+ end
35
+ describe 'test attribute "campaign_id"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "referral_id"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "reason"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ReferralNotFound", "ReferralRecipientIdSameAsAdvocate", "ReferralPartOfNotRunningCampaign", "ReferralValidConditionMissing", "ReferralLimitReached", "CampaignLimitReached", "ProfileLimitReached", "ReferralRecipientDoesNotMatch", "ReferralExpired", "ReferralStartDateInFuture", "ReferralRejectedByCondition", "EffectCouldNotBeApplied"])
51
+ # validator.allowable_values.each do |value|
52
+ # expect { @instance.reason = value }.not_to raise_error
53
+ # end
54
+ end
55
+ end
56
+
57
+ end
@@ -90,4 +90,10 @@ describe 'UpdateUser' do
90
90
  end
91
91
  end
92
92
 
93
+ describe 'test attribute "application_notification_subscriptions"' do
94
+ it 'should work' do
95
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
96
+ end
97
+ end
98
+
93
99
  end
@@ -108,4 +108,10 @@ describe 'User' do
108
108
  end
109
109
  end
110
110
 
111
+ describe 'test attribute "application_notification_subscriptions"' do
112
+ it 'should work' do
113
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
114
+ end
115
+ end
116
+
111
117
  end
@@ -102,10 +102,4 @@ describe 'Webhook' do
102
102
  end
103
103
  end
104
104
 
105
- describe 'test attribute "used_at"' do
106
- it 'should work' do
107
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
108
- end
109
- end
110
-
111
105
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: talon_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Talon.One GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-11 00:00:00.000000000 Z
11
+ date: 2019-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -341,7 +341,10 @@ files:
341
341
  - docs/NewTemplateDef.md
342
342
  - docs/NewUser.md
343
343
  - docs/NewWebhook.md
344
+ - docs/Notification.md
345
+ - docs/Notifications.md
344
346
  - docs/Referral.md
347
+ - docs/ReferralRejectionReason.md
345
348
  - docs/Role.md
346
349
  - docs/RoleAssign.md
347
350
  - docs/RoleMembership.md
@@ -505,7 +508,10 @@ files:
505
508
  - lib/talon_one/models/new_template_def.rb
506
509
  - lib/talon_one/models/new_user.rb
507
510
  - lib/talon_one/models/new_webhook.rb
511
+ - lib/talon_one/models/notification.rb
512
+ - lib/talon_one/models/notifications.rb
508
513
  - lib/talon_one/models/referral.rb
514
+ - lib/talon_one/models/referral_rejection_reason.rb
509
515
  - lib/talon_one/models/role.rb
510
516
  - lib/talon_one/models/role_assign.rb
511
517
  - lib/talon_one/models/role_membership.rb
@@ -667,6 +673,9 @@ files:
667
673
  - spec/models/new_template_def_spec.rb
668
674
  - spec/models/new_user_spec.rb
669
675
  - spec/models/new_webhook_spec.rb
676
+ - spec/models/notification_spec.rb
677
+ - spec/models/notifications_spec.rb
678
+ - spec/models/referral_rejection_reason_spec.rb
670
679
  - spec/models/referral_spec.rb
671
680
  - spec/models/role_assign_spec.rb
672
681
  - spec/models/role_membership_spec.rb
@@ -693,6 +702,7 @@ files:
693
702
  - talon_one-1.0.0.gem
694
703
  - talon_one-1.1.0.gem
695
704
  - talon_one-1.1.1.gem
705
+ - talon_one-1.1.2.gem
696
706
  - talon_one.gemspec
697
707
  homepage: https://github.com/talon-one/talon_one.rb/
698
708
  licenses:
@@ -723,6 +733,7 @@ test_files:
723
733
  - spec/api/management_api_spec.rb
724
734
  - spec/api_client_spec.rb
725
735
  - spec/configuration_spec.rb
736
+ - spec/models/notification_spec.rb
726
737
  - spec/models/new_customer_profile_spec.rb
727
738
  - spec/models/inline_response_200_27_spec.rb
728
739
  - spec/models/webhook_spec.rb
@@ -763,6 +774,7 @@ test_files:
763
774
  - spec/models/inline_response_200_26_spec.rb
764
775
  - spec/models/application_session_spec.rb
765
776
  - spec/models/new_loyalty_program_spec.rb
777
+ - spec/models/referral_rejection_reason_spec.rb
766
778
  - spec/models/loyalty_ledger_spec.rb
767
779
  - spec/models/new_application_spec.rb
768
780
  - spec/models/role_assign_spec.rb
@@ -875,6 +887,7 @@ test_files:
875
887
  - spec/models/multi_application_entity_spec.rb
876
888
  - spec/models/update_account_spec.rb
877
889
  - spec/models/template_def_spec.rb
890
+ - spec/models/notifications_spec.rb
878
891
  - spec/models/inline_response_200_7_spec.rb
879
892
  - spec/models/new_role_spec.rb
880
893
  - spec/models/inline_response_200_22_spec.rb