notifo-io 1.0.0.1 → 1.0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -7
  3. data/docs/{AddAllowedTopicRequest.md → AddAllowedTopicDto.md} +2 -2
  4. data/docs/AppDetailsDto.md +2 -2
  5. data/docs/AppDto.md +1 -1
  6. data/docs/EventDto.md +5 -5
  7. data/docs/EventsApi.md +6 -6
  8. data/docs/MediaApi.md +2 -2
  9. data/docs/MediaDto.md +2 -2
  10. data/docs/NotificationFormattingDto.md +8 -8
  11. data/docs/NotificationSend.md +15 -0
  12. data/docs/NotificationSettingDto.md +1 -1
  13. data/docs/ProfileDto.md +32 -0
  14. data/docs/{PublishRequestDto.md → PublishDto.md} +5 -5
  15. data/docs/PublishManyDto.md +18 -0
  16. data/docs/SchedulingDto.md +2 -2
  17. data/docs/SubscriptionDto.md +1 -1
  18. data/docs/TemplateDto.md +2 -2
  19. data/docs/TopicDto.md +1 -1
  20. data/docs/TopicsApi.md +0 -192
  21. data/docs/UpdateProfileDto.md +28 -0
  22. data/docs/UpsertTemplateDto.md +2 -2
  23. data/docs/UpsertUserDto.md +1 -1
  24. data/docs/UserApi.md +323 -0
  25. data/docs/UserDto.md +2 -2
  26. data/docs/UsersApi.md +12 -12
  27. data/lib/notifo.rb +7 -4
  28. data/lib/notifo/api/events_api.rb +9 -9
  29. data/lib/notifo/api/media_api.rb +2 -2
  30. data/lib/notifo/api/topics_api.rb +0 -189
  31. data/lib/notifo/api/user_api.rb +331 -0
  32. data/lib/notifo/api/users_api.rb +18 -18
  33. data/lib/notifo/models/{add_allowed_topic_request.rb → add_allowed_topic_dto.rb} +3 -3
  34. data/lib/notifo/models/app_details_dto.rb +5 -4
  35. data/lib/notifo/models/app_dto.rb +4 -2
  36. data/lib/notifo/models/event_dto.rb +14 -11
  37. data/lib/notifo/models/media_dto.rb +5 -5
  38. data/lib/notifo/models/notification_formatting_dto.rb +29 -29
  39. data/lib/notifo/models/notification_send.rb +39 -0
  40. data/lib/notifo/models/notification_setting_dto.rb +1 -3
  41. data/lib/notifo/models/profile_dto.rb +295 -0
  42. data/lib/notifo/models/{publish_request_dto.rb → publish_dto.rb} +10 -11
  43. data/lib/notifo/models/{publish_many_request_dto.rb → publish_many_dto.rb} +4 -4
  44. data/lib/notifo/models/scheduling_dto.rb +2 -5
  45. data/lib/notifo/models/subscription_dto.rb +5 -2
  46. data/lib/notifo/models/template_dto.rb +5 -4
  47. data/lib/notifo/models/topic_dto.rb +4 -2
  48. data/lib/notifo/models/{subscribe_dto.rb → update_profile_dto.rb} +65 -17
  49. data/lib/notifo/models/upsert_template_dto.rb +5 -4
  50. data/lib/notifo/models/upsert_user_dto.rb +4 -2
  51. data/lib/notifo/models/user_dto.rb +8 -4
  52. data/notifo-1.0.0.gem +0 -0
  53. data/notifo-io-1.0.0.gem +0 -0
  54. data/notifo.gemspec +5 -5
  55. data/spec/api/events_api_spec.rb +1 -1
  56. data/spec/api/media_api_spec.rb +1 -1
  57. data/spec/api/topics_api_spec.rb +0 -36
  58. data/spec/api/user_api_spec.rb +92 -0
  59. data/spec/api/users_api_spec.rb +2 -2
  60. data/spec/models/{add_allowed_topic_request_spec.rb → add_allowed_topic_dto_spec.rb} +6 -6
  61. data/spec/models/notification_send_spec.rb +28 -0
  62. data/spec/models/profile_dto_spec.rb +76 -0
  63. data/spec/models/{publish_request_dto_spec.rb → publish_dto_spec.rb} +6 -6
  64. data/spec/models/{publish_many_request_dto_spec.rb → publish_many_dto_spec.rb} +6 -6
  65. data/spec/models/update_profile_dto_spec.rb +64 -0
  66. metadata +35 -25
  67. data/docs/PublishManyRequestDto.md +0 -18
  68. data/docs/SubscribeDto.md +0 -20
  69. data/notifo-io-1.0.0.pre.beta.gem +0 -0
  70. data/notifo-io-1.0.0.pre.gem +0 -0
  71. data/spec/models/subscribe_dto_spec.rb +0 -40
@@ -18,7 +18,6 @@ module Notifo
18
18
  # The code of the template.
19
19
  attr_accessor :code
20
20
 
21
- # The formatting.
22
21
  attr_accessor :formatting
23
22
 
24
23
  # Notification settings per channel.
@@ -42,8 +41,8 @@ module Notifo
42
41
  def self.openapi_types
43
42
  {
44
43
  :'code' => :'String',
45
- :'formatting' => :'OneOfNotificationFormattingDto',
46
- :'settings' => :'OneOfmap'
44
+ :'formatting' => :'NotificationFormattingDto',
45
+ :'settings' => :'Hash<String, NotificationSettingDto>'
47
46
  }
48
47
  end
49
48
 
@@ -77,7 +76,9 @@ module Notifo
77
76
  end
78
77
 
79
78
  if attributes.key?(:'settings')
80
- self.settings = attributes[:'settings']
79
+ if (value = attributes[:'settings']).is_a?(Hash)
80
+ self.settings = value
81
+ end
81
82
  end
82
83
  end
83
84
 
@@ -43,7 +43,7 @@ module Notifo
43
43
  {
44
44
  :'path' => :'String',
45
45
  :'last_update' => :'Time',
46
- :'counters' => :'OneOfmap'
46
+ :'counters' => :'Hash<String, Integer>'
47
47
  }
48
48
  end
49
49
 
@@ -77,7 +77,9 @@ module Notifo
77
77
  end
78
78
 
79
79
  if attributes.key?(:'counters')
80
- self.counters = attributes[:'counters']
80
+ if (value = attributes[:'counters']).is_a?(Hash)
81
+ self.counters = value
82
+ end
81
83
  end
82
84
  end
83
85
 
@@ -14,18 +14,34 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Notifo
17
- class SubscribeDto
18
- # The topic to add.
19
- attr_accessor :topic_prefix
17
+ class UpdateProfileDto
18
+ # The full name of the user.
19
+ attr_accessor :full_name
20
+
21
+ # The email of the user.
22
+ attr_accessor :email_address
23
+
24
+ # The phone number.
25
+ attr_accessor :phone_number
26
+
27
+ # The preferred language of the user.
28
+ attr_accessor :preferred_language
29
+
30
+ # The timezone of the user.
31
+ attr_accessor :preferred_timezone
20
32
 
21
33
  # Notification settings per channel.
22
- attr_accessor :topic_settings
34
+ attr_accessor :settings
23
35
 
24
36
  # Attribute mapping from ruby-style variable name to JSON key.
25
37
  def self.attribute_map
26
38
  {
27
- :'topic_prefix' => :'topicPrefix',
28
- :'topic_settings' => :'topicSettings'
39
+ :'full_name' => :'fullName',
40
+ :'email_address' => :'emailAddress',
41
+ :'phone_number' => :'phoneNumber',
42
+ :'preferred_language' => :'preferredLanguage',
43
+ :'preferred_timezone' => :'preferredTimezone',
44
+ :'settings' => :'settings'
29
45
  }
30
46
  end
31
47
 
@@ -37,14 +53,24 @@ module Notifo
37
53
  # Attribute type mapping.
38
54
  def self.openapi_types
39
55
  {
40
- :'topic_prefix' => :'String',
41
- :'topic_settings' => :'OneOfmap'
56
+ :'full_name' => :'String',
57
+ :'email_address' => :'String',
58
+ :'phone_number' => :'String',
59
+ :'preferred_language' => :'String',
60
+ :'preferred_timezone' => :'String',
61
+ :'settings' => :'Hash<String, NotificationSettingDto>'
42
62
  }
43
63
  end
44
64
 
45
65
  # List of attributes with nullable: true
46
66
  def self.openapi_nullable
47
67
  Set.new([
68
+ :'full_name',
69
+ :'email_address',
70
+ :'phone_number',
71
+ :'preferred_language',
72
+ :'preferred_timezone',
73
+ :'settings'
48
74
  ])
49
75
  end
50
76
 
@@ -52,23 +78,41 @@ module Notifo
52
78
  # @param [Hash] attributes Model attributes in the form of hash
53
79
  def initialize(attributes = {})
54
80
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `Notifo::SubscribeDto` initialize method"
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Notifo::UpdateProfileDto` initialize method"
56
82
  end
57
83
 
58
84
  # check to see if the attribute exists and convert string to symbol for hash key
59
85
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
86
  if (!self.class.attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Notifo::SubscribeDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Notifo::UpdateProfileDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
88
  end
63
89
  h[k.to_sym] = v
64
90
  }
65
91
 
66
- if attributes.key?(:'topic_prefix')
67
- self.topic_prefix = attributes[:'topic_prefix']
92
+ if attributes.key?(:'full_name')
93
+ self.full_name = attributes[:'full_name']
68
94
  end
69
95
 
70
- if attributes.key?(:'topic_settings')
71
- self.topic_settings = attributes[:'topic_settings']
96
+ if attributes.key?(:'email_address')
97
+ self.email_address = attributes[:'email_address']
98
+ end
99
+
100
+ if attributes.key?(:'phone_number')
101
+ self.phone_number = attributes[:'phone_number']
102
+ end
103
+
104
+ if attributes.key?(:'preferred_language')
105
+ self.preferred_language = attributes[:'preferred_language']
106
+ end
107
+
108
+ if attributes.key?(:'preferred_timezone')
109
+ self.preferred_timezone = attributes[:'preferred_timezone']
110
+ end
111
+
112
+ if attributes.key?(:'settings')
113
+ if (value = attributes[:'settings']).is_a?(Hash)
114
+ self.settings = value
115
+ end
72
116
  end
73
117
  end
74
118
 
@@ -90,8 +134,12 @@ module Notifo
90
134
  def ==(o)
91
135
  return true if self.equal?(o)
92
136
  self.class == o.class &&
93
- topic_prefix == o.topic_prefix &&
94
- topic_settings == o.topic_settings
137
+ full_name == o.full_name &&
138
+ email_address == o.email_address &&
139
+ phone_number == o.phone_number &&
140
+ preferred_language == o.preferred_language &&
141
+ preferred_timezone == o.preferred_timezone &&
142
+ settings == o.settings
95
143
  end
96
144
 
97
145
  # @see the `==` method
@@ -103,7 +151,7 @@ module Notifo
103
151
  # Calculates hash code according to all attributes.
104
152
  # @return [Integer] Hash code
105
153
  def hash
106
- [topic_prefix, topic_settings].hash
154
+ [full_name, email_address, phone_number, preferred_language, preferred_timezone, settings].hash
107
155
  end
108
156
 
109
157
  # Builds the object from hash
@@ -18,7 +18,6 @@ module Notifo
18
18
  # The code of the template.
19
19
  attr_accessor :code
20
20
 
21
- # The formatting.
22
21
  attr_accessor :formatting
23
22
 
24
23
  # Notification settings per channel.
@@ -42,8 +41,8 @@ module Notifo
42
41
  def self.openapi_types
43
42
  {
44
43
  :'code' => :'String',
45
- :'formatting' => :'OneOfNotificationFormattingDto',
46
- :'settings' => :'OneOfmap'
44
+ :'formatting' => :'NotificationFormattingDto',
45
+ :'settings' => :'Hash<String, NotificationSettingDto>'
47
46
  }
48
47
  end
49
48
 
@@ -78,7 +77,9 @@ module Notifo
78
77
  end
79
78
 
80
79
  if attributes.key?(:'settings')
81
- self.settings = attributes[:'settings']
80
+ if (value = attributes[:'settings']).is_a?(Hash)
81
+ self.settings = value
82
+ end
82
83
  end
83
84
  end
84
85
 
@@ -68,7 +68,7 @@ module Notifo
68
68
  :'preferred_language' => :'String',
69
69
  :'preferred_timezone' => :'String',
70
70
  :'requires_whitelisted_topics' => :'Boolean',
71
- :'settings' => :'OneOfmap'
71
+ :'settings' => :'Hash<String, NotificationSettingDto>'
72
72
  }
73
73
  end
74
74
 
@@ -130,7 +130,9 @@ module Notifo
130
130
  end
131
131
 
132
132
  if attributes.key?(:'settings')
133
- self.settings = attributes[:'settings']
133
+ if (value = attributes[:'settings']).is_a?(Hash)
134
+ self.settings = value
135
+ end
134
136
  end
135
137
  end
136
138
 
@@ -77,8 +77,8 @@ module Notifo
77
77
  :'preferred_language' => :'String',
78
78
  :'preferred_timezone' => :'String',
79
79
  :'requires_whitelisted_topics' => :'Boolean',
80
- :'settings' => :'OneOfmap',
81
- :'counters' => :'OneOfmap'
80
+ :'settings' => :'Hash<String, NotificationSettingDto>',
81
+ :'counters' => :'Hash<String, Integer>'
82
82
  }
83
83
  end
84
84
 
@@ -136,11 +136,15 @@ module Notifo
136
136
  end
137
137
 
138
138
  if attributes.key?(:'settings')
139
- self.settings = attributes[:'settings']
139
+ if (value = attributes[:'settings']).is_a?(Hash)
140
+ self.settings = value
141
+ end
140
142
  end
141
143
 
142
144
  if attributes.key?(:'counters')
143
- self.counters = attributes[:'counters']
145
+ if (value = attributes[:'counters']).is_a?(Hash)
146
+ self.counters = value
147
+ end
144
148
  end
145
149
  end
146
150
 
Binary file
Binary file
@@ -3,7 +3,7 @@
3
3
  =begin
4
4
  #Notifo API
5
5
 
6
- Notifo is a multi-channel notification service for collaboration tools, e-commerce, news, magazines and everybody who wants to notify their users.
6
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
 
@@ -17,13 +17,13 @@ require "notifo/version"
17
17
 
18
18
  Gem::Specification.new do |s|
19
19
  s.name = "notifo-io"
20
- s.version = "1.0.0.1"
20
+ s.version = "1.0.0.2"
21
21
  s.platform = Gem::Platform::RUBY
22
- s.authors = ["Sebastian Stehle"]
22
+ s.authors = ["OpenAPI-Generator"]
23
23
  s.email = [""]
24
- s.homepage = "http://notio.io"
24
+ s.homepage = "https://openapi-generator.tech"
25
25
  s.summary = "Notifo API Ruby Gem"
26
- s.description = "Notifo is a multi-channel notification service for collaboration tools, e-commerce, news, magazines and everybody who wants to notify their users."
26
+ s.description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)"
27
27
  s.license = "Unlicense"
28
28
  s.required_ruby_version = ">= 2.4"
29
29
 
@@ -49,7 +49,7 @@ describe 'EventsApi' do
49
49
  # unit tests for events_post_events
50
50
  # Publish events.
51
51
  # @param app_id The app where the events belongs to.
52
- # @param publish_many_request_dto The publish request.
52
+ # @param publish_many_dto The publish request.
53
53
  # @param [Hash] opts the optional parameters
54
54
  # @return [nil]
55
55
  describe 'events_post_events test' do
@@ -55,7 +55,7 @@ describe 'MediaApi' do
55
55
  # @option opts [Integer] :height The target height when an image.
56
56
  # @option opts [Integer] :quality The target quality when an image.
57
57
  # @option opts [String] :preset A preset dimension.
58
- # @option opts [OneOfResizeMode] :mode The resize mode.
58
+ # @option opts [ResizeMode] :mode The resize mode.
59
59
  # @option opts [Float] :focus_x The x position of the focues point.
60
60
  # @option opts [Float] :focus_y The y position of the focues point.
61
61
  # @option opts [Boolean] :force True to resize it and clear the cache.
@@ -32,18 +32,6 @@ describe 'TopicsApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for topics_get_subscription
36
- # Gets a user subscription.
37
- # User Id and App Id are resolved using the API token.
38
- # @param topic The topic path.
39
- # @param [Hash] opts the optional parameters
40
- # @return [nil]
41
- describe 'topics_get_subscription test' 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
35
  # unit tests for topics_get_topics
48
36
  # Query topics.
49
37
  # @param app_id The app where the topics belongs to.
@@ -58,28 +46,4 @@ describe 'TopicsApi' do
58
46
  end
59
47
  end
60
48
 
61
- # unit tests for topics_subscribe
62
- # Creates a user subscription.
63
- # User Id and App Id are resolved using the API token.
64
- # @param topic The topic path.
65
- # @param [Hash] opts the optional parameters
66
- # @return [nil]
67
- describe 'topics_subscribe test' do
68
- it 'should work' do
69
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
70
- end
71
- end
72
-
73
- # unit tests for topics_unsubscribe
74
- # Deletes a user subscription.
75
- # User Id and App Id are resolved using the API token.
76
- # @param topic The topic path.
77
- # @param [Hash] opts the optional parameters
78
- # @return [nil]
79
- describe 'topics_unsubscribe test' do
80
- it 'should work' do
81
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
- end
83
- end
84
-
85
49
  end
@@ -0,0 +1,92 @@
1
+ =begin
2
+ #Notifo API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for Notifo::UserApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'UserApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = Notifo::UserApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of UserApi' do
30
+ it 'should create an instance of UserApi' do
31
+ expect(@api_instance).to be_instance_of(Notifo::UserApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for user_delete_subscription
36
+ # Deletes a user subscription.
37
+ # User Id and App Id are resolved using the API token.
38
+ # @param topic The topic path.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [nil]
41
+ describe 'user_delete_subscription test' 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
+ # unit tests for user_get_subscription
48
+ # Gets a user subscription.
49
+ # User Id and App Id are resolved using the API token.
50
+ # @param topic The topic path.
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [SubscriptionDto]
53
+ describe 'user_get_subscription test' 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
+
59
+ # unit tests for user_get_user
60
+ # Get the current user.
61
+ # @param [Hash] opts the optional parameters
62
+ # @return [ProfileDto]
63
+ describe 'user_get_user test' do
64
+ it 'should work' do
65
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
66
+ end
67
+ end
68
+
69
+ # unit tests for user_post_subscription
70
+ # Creates a user subscription.
71
+ # User Id and App Id are resolved using the API token.
72
+ # @param subscription_dto The subscription settings.
73
+ # @param [Hash] opts the optional parameters
74
+ # @return [nil]
75
+ describe 'user_post_subscription test' do
76
+ it 'should work' do
77
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
78
+ end
79
+ end
80
+
81
+ # unit tests for user_post_user
82
+ # Update the user.
83
+ # @param update_profile_dto The upsert request.
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [ProfileDto]
86
+ describe 'user_post_user test' do
87
+ it 'should work' do
88
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
89
+ end
90
+ end
91
+
92
+ end