notifo-io 1.0.0.1 → 1.0.0.2

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.
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
@@ -448,21 +448,21 @@ module Notifo
448
448
  # Add an allowed topic.
449
449
  # @param app_id [String] The app where the users belong to.
450
450
  # @param id [String] The user id.
451
- # @param add_allowed_topic_request [AddAllowedTopicRequest] The upsert request.
451
+ # @param add_allowed_topic_dto [AddAllowedTopicDto] The upsert request.
452
452
  # @param [Hash] opts the optional parameters
453
453
  # @return [nil]
454
- def users_post_allowed_topic(app_id, id, add_allowed_topic_request, opts = {})
455
- users_post_allowed_topic_with_http_info(app_id, id, add_allowed_topic_request, opts)
454
+ def users_post_allowed_topic(app_id, id, add_allowed_topic_dto, opts = {})
455
+ users_post_allowed_topic_with_http_info(app_id, id, add_allowed_topic_dto, opts)
456
456
  nil
457
457
  end
458
458
 
459
459
  # Add an allowed topic.
460
460
  # @param app_id [String] The app where the users belong to.
461
461
  # @param id [String] The user id.
462
- # @param add_allowed_topic_request [AddAllowedTopicRequest] The upsert request.
462
+ # @param add_allowed_topic_dto [AddAllowedTopicDto] The upsert request.
463
463
  # @param [Hash] opts the optional parameters
464
464
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
465
- def users_post_allowed_topic_with_http_info(app_id, id, add_allowed_topic_request, opts = {})
465
+ def users_post_allowed_topic_with_http_info(app_id, id, add_allowed_topic_dto, opts = {})
466
466
  if @api_client.config.debugging
467
467
  @api_client.config.logger.debug 'Calling API: UsersApi.users_post_allowed_topic ...'
468
468
  end
@@ -474,9 +474,9 @@ module Notifo
474
474
  if @api_client.config.client_side_validation && id.nil?
475
475
  fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_post_allowed_topic"
476
476
  end
477
- # verify the required parameter 'add_allowed_topic_request' is set
478
- if @api_client.config.client_side_validation && add_allowed_topic_request.nil?
479
- fail ArgumentError, "Missing the required parameter 'add_allowed_topic_request' when calling UsersApi.users_post_allowed_topic"
477
+ # verify the required parameter 'add_allowed_topic_dto' is set
478
+ if @api_client.config.client_side_validation && add_allowed_topic_dto.nil?
479
+ fail ArgumentError, "Missing the required parameter 'add_allowed_topic_dto' when calling UsersApi.users_post_allowed_topic"
480
480
  end
481
481
  # resource path
482
482
  local_var_path = '/api/apps/{appId}/users/{id}/allowed-topics'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
@@ -495,7 +495,7 @@ module Notifo
495
495
  form_params = opts[:form_params] || {}
496
496
 
497
497
  # http body (model)
498
- post_body = opts[:debug_body] || @api_client.object_to_http_body(add_allowed_topic_request)
498
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(add_allowed_topic_dto)
499
499
 
500
500
  # return_type
501
501
  return_type = opts[:debug_return_type]
@@ -523,21 +523,21 @@ module Notifo
523
523
  # Upsert a user subscriptions.
524
524
  # @param app_id [String] The app where the user belongs to.
525
525
  # @param id [String] The user id.
526
- # @param subscribe_dto [SubscribeDto] The subscription object.
526
+ # @param subscription_dto [SubscriptionDto] The subscription object.
527
527
  # @param [Hash] opts the optional parameters
528
528
  # @return [nil]
529
- def users_post_subscription(app_id, id, subscribe_dto, opts = {})
530
- users_post_subscription_with_http_info(app_id, id, subscribe_dto, opts)
529
+ def users_post_subscription(app_id, id, subscription_dto, opts = {})
530
+ users_post_subscription_with_http_info(app_id, id, subscription_dto, opts)
531
531
  nil
532
532
  end
533
533
 
534
534
  # Upsert a user subscriptions.
535
535
  # @param app_id [String] The app where the user belongs to.
536
536
  # @param id [String] The user id.
537
- # @param subscribe_dto [SubscribeDto] The subscription object.
537
+ # @param subscription_dto [SubscriptionDto] The subscription object.
538
538
  # @param [Hash] opts the optional parameters
539
539
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
540
- def users_post_subscription_with_http_info(app_id, id, subscribe_dto, opts = {})
540
+ def users_post_subscription_with_http_info(app_id, id, subscription_dto, opts = {})
541
541
  if @api_client.config.debugging
542
542
  @api_client.config.logger.debug 'Calling API: UsersApi.users_post_subscription ...'
543
543
  end
@@ -549,9 +549,9 @@ module Notifo
549
549
  if @api_client.config.client_side_validation && id.nil?
550
550
  fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_post_subscription"
551
551
  end
552
- # verify the required parameter 'subscribe_dto' is set
553
- if @api_client.config.client_side_validation && subscribe_dto.nil?
554
- fail ArgumentError, "Missing the required parameter 'subscribe_dto' when calling UsersApi.users_post_subscription"
552
+ # verify the required parameter 'subscription_dto' is set
553
+ if @api_client.config.client_side_validation && subscription_dto.nil?
554
+ fail ArgumentError, "Missing the required parameter 'subscription_dto' when calling UsersApi.users_post_subscription"
555
555
  end
556
556
  # resource path
557
557
  local_var_path = '/api/apps/{appId}/users/{id}/subscriptions'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
@@ -570,7 +570,7 @@ module Notifo
570
570
  form_params = opts[:form_params] || {}
571
571
 
572
572
  # http body (model)
573
- post_body = opts[:debug_body] || @api_client.object_to_http_body(subscribe_dto)
573
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(subscription_dto)
574
574
 
575
575
  # return_type
576
576
  return_type = opts[:debug_return_type]
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Notifo
17
- class AddAllowedTopicRequest
17
+ class AddAllowedTopicDto
18
18
  # The topic to add.
19
19
  attr_accessor :prefix
20
20
 
@@ -47,13 +47,13 @@ module Notifo
47
47
  # @param [Hash] attributes Model attributes in the form of hash
48
48
  def initialize(attributes = {})
49
49
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `Notifo::AddAllowedTopicRequest` initialize method"
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Notifo::AddAllowedTopicDto` initialize method"
51
51
  end
52
52
 
53
53
  # check to see if the attribute exists and convert string to symbol for hash key
54
54
  attributes = attributes.each_with_object({}) { |(k, v), h|
55
55
  if (!self.class.attribute_map.key?(k.to_sym))
56
- fail ArgumentError, "`#{k}` is not a valid attribute in `Notifo::AddAllowedTopicRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Notifo::AddAllowedTopicDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
57
  end
58
58
  h[k.to_sym] = v
59
59
  }
@@ -51,7 +51,6 @@ module Notifo
51
51
  # True, when SMS are allowed.
52
52
  attr_accessor :allow_sms
53
53
 
54
- # The verification status of the email.
55
54
  attr_accessor :email_verification_status
56
55
 
57
56
  # The api keys.
@@ -105,10 +104,10 @@ module Notifo
105
104
  :'confirm_url' => :'String',
106
105
  :'allow_email' => :'Boolean',
107
106
  :'allow_sms' => :'Boolean',
108
- :'email_verification_status' => :'OneOfEmailVerificationStatus',
107
+ :'email_verification_status' => :'EmailVerificationStatus',
109
108
  :'api_keys' => :'Hash<String, String>',
110
109
  :'contributors' => :'Array<AppContributorDto>',
111
- :'counters' => :'OneOfmap'
110
+ :'counters' => :'Hash<String, Integer>'
112
111
  }
113
112
  end
114
113
 
@@ -206,7 +205,9 @@ module Notifo
206
205
  end
207
206
 
208
207
  if attributes.key?(:'counters')
209
- self.counters = attributes[:'counters']
208
+ if (value = attributes[:'counters']).is_a?(Hash)
209
+ self.counters = value
210
+ end
210
211
  end
211
212
  end
212
213
 
@@ -58,7 +58,7 @@ module Notifo
58
58
  :'role' => :'String',
59
59
  :'languages' => :'Array<String>',
60
60
  :'api_keys' => :'Hash<String, String>',
61
- :'counters' => :'OneOfmap'
61
+ :'counters' => :'Hash<String, Integer>'
62
62
  }
63
63
  end
64
64
 
@@ -108,7 +108,9 @@ module Notifo
108
108
  end
109
109
 
110
110
  if attributes.key?(:'counters')
111
- self.counters = attributes[:'counters']
111
+ if (value = attributes[:'counters']).is_a?(Hash)
112
+ self.counters = value
113
+ end
112
114
  end
113
115
  end
114
116
 
@@ -33,7 +33,6 @@ module Notifo
33
33
  # The time when the event has been created.
34
34
  attr_accessor :created
35
35
 
36
- # The final formatting infos.
37
36
  attr_accessor :formatting
38
37
 
39
38
  # Notification settings per channel.
@@ -42,7 +41,6 @@ module Notifo
42
41
  # User defined properties.
43
42
  attr_accessor :properties
44
43
 
45
- # The scheduling options.
46
44
  attr_accessor :scheduling
47
45
 
48
46
  # The statistics counters.
@@ -83,11 +81,11 @@ module Notifo
83
81
  :'display_name' => :'String',
84
82
  :'data' => :'String',
85
83
  :'created' => :'Time',
86
- :'formatting' => :'OneOfNotificationFormattingDto',
87
- :'settings' => :'OneOfmap',
88
- :'properties' => :'OneOfmap',
89
- :'scheduling' => :'OneOfSchedulingDto',
90
- :'counters' => :'OneOfmap',
84
+ :'formatting' => :'NotificationFormattingDto',
85
+ :'settings' => :'Hash<String, NotificationSettingDto>',
86
+ :'properties' => :'Hash<String, String>',
87
+ :'scheduling' => :'SchedulingDto',
88
+ :'counters' => :'Hash<String, Integer>',
91
89
  :'silent' => :'Boolean'
92
90
  }
93
91
  end
@@ -97,7 +95,6 @@ module Notifo
97
95
  Set.new([
98
96
  :'creator_id',
99
97
  :'data',
100
- :'scheduling',
101
98
  :'counters',
102
99
  ])
103
100
  end
@@ -146,11 +143,15 @@ module Notifo
146
143
  end
147
144
 
148
145
  if attributes.key?(:'settings')
149
- self.settings = attributes[:'settings']
146
+ if (value = attributes[:'settings']).is_a?(Hash)
147
+ self.settings = value
148
+ end
150
149
  end
151
150
 
152
151
  if attributes.key?(:'properties')
153
- self.properties = attributes[:'properties']
152
+ if (value = attributes[:'properties']).is_a?(Hash)
153
+ self.properties = value
154
+ end
154
155
  end
155
156
 
156
157
  if attributes.key?(:'scheduling')
@@ -158,7 +159,9 @@ module Notifo
158
159
  end
159
160
 
160
161
  if attributes.key?(:'counters')
161
- self.counters = attributes[:'counters']
162
+ if (value = attributes[:'counters']).is_a?(Hash)
163
+ self.counters = value
164
+ end
162
165
  end
163
166
 
164
167
  if attributes.key?(:'silent')
@@ -27,10 +27,8 @@ module Notifo
27
27
  # The size of the media file.
28
28
  attr_accessor :file_size
29
29
 
30
- # The type of the media.
31
30
  attr_accessor :type
32
31
 
33
- # Metadata about the media.
34
32
  attr_accessor :metadata
35
33
 
36
34
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -57,8 +55,8 @@ module Notifo
57
55
  :'file_name' => :'String',
58
56
  :'file_info' => :'String',
59
57
  :'file_size' => :'Integer',
60
- :'type' => :'OneOfMediaType',
61
- :'metadata' => :'OneOfmap'
58
+ :'type' => :'MediaType',
59
+ :'metadata' => :'Hash<String, String>'
62
60
  }
63
61
  end
64
62
 
@@ -104,7 +102,9 @@ module Notifo
104
102
  end
105
103
 
106
104
  if attributes.key?(:'metadata')
107
- self.metadata = attributes[:'metadata']
105
+ if (value = attributes[:'metadata']).is_a?(Hash)
106
+ self.metadata = value
107
+ end
108
108
  end
109
109
  end
110
110
 
@@ -15,28 +15,20 @@ require 'time'
15
15
 
16
16
  module Notifo
17
17
  class NotificationFormattingDto
18
- # The required subject with one entry per language.
19
18
  attr_accessor :subject
20
19
 
21
- # The optional body with one entry per language.
22
20
  attr_accessor :body
23
21
 
24
- # The optional confirm text with one entry per language.
25
22
  attr_accessor :confirm_text
26
23
 
27
- # The optional small image with one entry per language.
28
24
  attr_accessor :image_small
29
25
 
30
- # The optional large image with one entry per language.
31
26
  attr_accessor :image_large
32
27
 
33
- # The optional link url with one entry per language.
34
28
  attr_accessor :link_url
35
29
 
36
- # The optional link name with one entry per language.
37
30
  attr_accessor :link_text
38
31
 
39
- # The confirmation mode.
40
32
  attr_accessor :confirm_mode
41
33
 
42
34
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -61,26 +53,20 @@ module Notifo
61
53
  # Attribute type mapping.
62
54
  def self.openapi_types
63
55
  {
64
- :'subject' => :'OneOfmap',
65
- :'body' => :'OneOfmap',
66
- :'confirm_text' => :'OneOfmap',
67
- :'image_small' => :'OneOfmap',
68
- :'image_large' => :'OneOfmap',
69
- :'link_url' => :'OneOfmap',
70
- :'link_text' => :'OneOfmap',
71
- :'confirm_mode' => :'OneOfConfirmMode'
56
+ :'subject' => :'Hash<String, String>',
57
+ :'body' => :'Hash<String, String>',
58
+ :'confirm_text' => :'Hash<String, String>',
59
+ :'image_small' => :'Hash<String, String>',
60
+ :'image_large' => :'Hash<String, String>',
61
+ :'link_url' => :'Hash<String, String>',
62
+ :'link_text' => :'Hash<String, String>',
63
+ :'confirm_mode' => :'ConfirmMode'
72
64
  }
73
65
  end
74
66
 
75
67
  # List of attributes with nullable: true
76
68
  def self.openapi_nullable
77
69
  Set.new([
78
- :'body',
79
- :'confirm_text',
80
- :'image_small',
81
- :'image_large',
82
- :'link_url',
83
- :'link_text',
84
70
  ])
85
71
  end
86
72
 
@@ -100,31 +86,45 @@ module Notifo
100
86
  }
101
87
 
102
88
  if attributes.key?(:'subject')
103
- self.subject = attributes[:'subject']
89
+ if (value = attributes[:'subject']).is_a?(Hash)
90
+ self.subject = value
91
+ end
104
92
  end
105
93
 
106
94
  if attributes.key?(:'body')
107
- self.body = attributes[:'body']
95
+ if (value = attributes[:'body']).is_a?(Hash)
96
+ self.body = value
97
+ end
108
98
  end
109
99
 
110
100
  if attributes.key?(:'confirm_text')
111
- self.confirm_text = attributes[:'confirm_text']
101
+ if (value = attributes[:'confirm_text']).is_a?(Hash)
102
+ self.confirm_text = value
103
+ end
112
104
  end
113
105
 
114
106
  if attributes.key?(:'image_small')
115
- self.image_small = attributes[:'image_small']
107
+ if (value = attributes[:'image_small']).is_a?(Hash)
108
+ self.image_small = value
109
+ end
116
110
  end
117
111
 
118
112
  if attributes.key?(:'image_large')
119
- self.image_large = attributes[:'image_large']
113
+ if (value = attributes[:'image_large']).is_a?(Hash)
114
+ self.image_large = value
115
+ end
120
116
  end
121
117
 
122
118
  if attributes.key?(:'link_url')
123
- self.link_url = attributes[:'link_url']
119
+ if (value = attributes[:'link_url']).is_a?(Hash)
120
+ self.link_url = value
121
+ end
124
122
  end
125
123
 
126
124
  if attributes.key?(:'link_text')
127
- self.link_text = attributes[:'link_text']
125
+ if (value = attributes[:'link_text']).is_a?(Hash)
126
+ self.link_text = value
127
+ end
128
128
  end
129
129
 
130
130
  if attributes.key?(:'confirm_mode')
@@ -0,0 +1,39 @@
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 'date'
14
+ require 'time'
15
+
16
+ module Notifo
17
+ class NotificationSend
18
+ INHERIT = "Inherit".freeze
19
+ SEND = "Send".freeze
20
+ NOT_SENDING = "NotSending".freeze
21
+ NOT_ALLOWED = "NotAllowed".freeze
22
+
23
+ # Builds the enum from string
24
+ # @param [String] The enum value in the form of the string
25
+ # @return [String] The enum value
26
+ def self.build_from_hash(value)
27
+ new.build_from_hash(value)
28
+ end
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ constantValues = NotificationSend.constants.select { |c| NotificationSend::const_get(c) == value }
35
+ raise "Invalid ENUM value #{value} for class #NotificationSend" if constantValues.empty?
36
+ value
37
+ end
38
+ end
39
+ end
@@ -15,7 +15,6 @@ require 'time'
15
15
 
16
16
  module Notifo
17
17
  class NotificationSettingDto
18
- # True or false to send the notification for the channel.
19
18
  attr_accessor :_send
20
19
 
21
20
  # The delay in seconds.
@@ -37,7 +36,7 @@ module Notifo
37
36
  # Attribute type mapping.
38
37
  def self.openapi_types
39
38
  {
40
- :'_send' => :'Boolean',
39
+ :'_send' => :'NotificationSend',
41
40
  :'delay_in_seconds' => :'Integer'
42
41
  }
43
42
  end
@@ -45,7 +44,6 @@ module Notifo
45
44
  # List of attributes with nullable: true
46
45
  def self.openapi_nullable
47
46
  Set.new([
48
- :'_send',
49
47
  :'delay_in_seconds'
50
48
  ])
51
49
  end