notifo-io 1.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +163 -0
  4. data/Rakefile +10 -0
  5. data/docs/AddAllowedTopicRequest.md +18 -0
  6. data/docs/AddContributorDto.md +20 -0
  7. data/docs/AppContributorDto.md +22 -0
  8. data/docs/AppDetailsDto.md +48 -0
  9. data/docs/AppDto.md +28 -0
  10. data/docs/AppsApi.md +646 -0
  11. data/docs/ConfigsApi.md +127 -0
  12. data/docs/ConfirmMode.md +15 -0
  13. data/docs/CreateEmailTemplateDto.md +18 -0
  14. data/docs/EmailTemplateDto.md +22 -0
  15. data/docs/EmailVerificationStatus.md +15 -0
  16. data/docs/ErrorDto.md +26 -0
  17. data/docs/EventDto.md +40 -0
  18. data/docs/EventsApi.md +142 -0
  19. data/docs/InlineObject.md +18 -0
  20. data/docs/IsoDayOfWeek.md +15 -0
  21. data/docs/ListResponseDtoOfEventDto.md +20 -0
  22. data/docs/ListResponseDtoOfLogEntryDto.md +20 -0
  23. data/docs/ListResponseDtoOfMediaDto.md +20 -0
  24. data/docs/ListResponseDtoOfSubscriptionDto.md +20 -0
  25. data/docs/ListResponseDtoOfTemplateDto.md +20 -0
  26. data/docs/ListResponseDtoOfTopicDto.md +20 -0
  27. data/docs/ListResponseDtoOfUserDto.md +20 -0
  28. data/docs/LogEntryDto.md +24 -0
  29. data/docs/LogsApi.md +78 -0
  30. data/docs/MediaApi.md +295 -0
  31. data/docs/MediaDto.md +28 -0
  32. data/docs/MediaType.md +15 -0
  33. data/docs/NotificationFormattingDto.md +32 -0
  34. data/docs/NotificationSettingDto.md +20 -0
  35. data/docs/PublishManyRequestDto.md +18 -0
  36. data/docs/PublishRequestDto.md +36 -0
  37. data/docs/ResizeMode.md +15 -0
  38. data/docs/SchedulingDto.md +24 -0
  39. data/docs/SchedulingType.md +15 -0
  40. data/docs/SubscribeDto.md +20 -0
  41. data/docs/SubscriptionDto.md +20 -0
  42. data/docs/TemplateDto.md +22 -0
  43. data/docs/TemplatesApi.md +208 -0
  44. data/docs/TopicDto.md +22 -0
  45. data/docs/TopicsApi.md +270 -0
  46. data/docs/UpsertAppDto.md +36 -0
  47. data/docs/UpsertTemplateDto.md +22 -0
  48. data/docs/UpsertTemplatesDto.md +18 -0
  49. data/docs/UpsertUserDto.md +32 -0
  50. data/docs/UpsertUsersDto.md +18 -0
  51. data/docs/UserDto.md +36 -0
  52. data/docs/UsersApi.md +610 -0
  53. data/git_push.sh +58 -0
  54. data/lib/notifo.rb +87 -0
  55. data/lib/notifo/api/apps_api.rb +678 -0
  56. data/lib/notifo/api/configs_api.rb +132 -0
  57. data/lib/notifo/api/events_api.rb +161 -0
  58. data/lib/notifo/api/logs_api.rb +92 -0
  59. data/lib/notifo/api/media_api.rb +322 -0
  60. data/lib/notifo/api/templates_api.rb +228 -0
  61. data/lib/notifo/api/topics_api.rb +281 -0
  62. data/lib/notifo/api/users_api.rb +667 -0
  63. data/lib/notifo/api_client.rb +389 -0
  64. data/lib/notifo/api_error.rb +57 -0
  65. data/lib/notifo/configuration.rb +268 -0
  66. data/lib/notifo/models/add_allowed_topic_request.rb +219 -0
  67. data/lib/notifo/models/add_contributor_dto.rb +229 -0
  68. data/lib/notifo/models/app_contributor_dto.rb +239 -0
  69. data/lib/notifo/models/app_details_dto.rb +381 -0
  70. data/lib/notifo/models/app_dto.rb +273 -0
  71. data/lib/notifo/models/confirm_mode.rb +38 -0
  72. data/lib/notifo/models/create_email_template_dto.rb +219 -0
  73. data/lib/notifo/models/email_template_dto.rb +240 -0
  74. data/lib/notifo/models/email_verification_status.rb +39 -0
  75. data/lib/notifo/models/error_dto.rb +265 -0
  76. data/lib/notifo/models/event_dto.rb +333 -0
  77. data/lib/notifo/models/inline_object.rb +219 -0
  78. data/lib/notifo/models/iso_day_of_week.rb +43 -0
  79. data/lib/notifo/models/list_response_dto_of_event_dto.rb +231 -0
  80. data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +231 -0
  81. data/lib/notifo/models/list_response_dto_of_media_dto.rb +231 -0
  82. data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +231 -0
  83. data/lib/notifo/models/list_response_dto_of_template_dto.rb +231 -0
  84. data/lib/notifo/models/list_response_dto_of_topic_dto.rb +231 -0
  85. data/lib/notifo/models/list_response_dto_of_user_dto.rb +231 -0
  86. data/lib/notifo/models/log_entry_dto.rb +249 -0
  87. data/lib/notifo/models/media_dto.rb +269 -0
  88. data/lib/notifo/models/media_type.rb +39 -0
  89. data/lib/notifo/models/notification_formatting_dto.rb +295 -0
  90. data/lib/notifo/models/notification_setting_dto.rb +231 -0
  91. data/lib/notifo/models/publish_many_request_dto.rb +221 -0
  92. data/lib/notifo/models/publish_request_dto.rb +315 -0
  93. data/lib/notifo/models/resize_mode.rb +42 -0
  94. data/lib/notifo/models/scheduling_dto.rb +251 -0
  95. data/lib/notifo/models/scheduling_type.rb +37 -0
  96. data/lib/notifo/models/subscribe_dto.rb +229 -0
  97. data/lib/notifo/models/subscription_dto.rb +229 -0
  98. data/lib/notifo/models/template_dto.rb +239 -0
  99. data/lib/notifo/models/topic_dto.rb +239 -0
  100. data/lib/notifo/models/upsert_app_dto.rb +321 -0
  101. data/lib/notifo/models/upsert_template_dto.rb +240 -0
  102. data/lib/notifo/models/upsert_templates_dto.rb +221 -0
  103. data/lib/notifo/models/upsert_user_dto.rb +297 -0
  104. data/lib/notifo/models/upsert_users_dto.rb +221 -0
  105. data/lib/notifo/models/user_dto.rb +309 -0
  106. data/lib/notifo/version.rb +15 -0
  107. data/notifo-io-1.0.0.gem +0 -0
  108. data/notifo-io-1.0.0.pre.beta.gem +0 -0
  109. data/notifo.gemspec +38 -0
  110. data/spec/api/apps_api_spec.rb +151 -0
  111. data/spec/api/configs_api_spec.rb +55 -0
  112. data/spec/api/events_api_spec.rb +61 -0
  113. data/spec/api/logs_api_spec.rb +49 -0
  114. data/spec/api/media_api_spec.rb +95 -0
  115. data/spec/api/templates_api_spec.rb +73 -0
  116. data/spec/api/topics_api_spec.rb +85 -0
  117. data/spec/api/users_api_spec.rb +152 -0
  118. data/spec/api_client_spec.rb +226 -0
  119. data/spec/configuration_spec.rb +42 -0
  120. data/spec/models/add_allowed_topic_request_spec.rb +34 -0
  121. data/spec/models/add_contributor_dto_spec.rb +40 -0
  122. data/spec/models/app_contributor_dto_spec.rb +46 -0
  123. data/spec/models/app_details_dto_spec.rb +124 -0
  124. data/spec/models/app_dto_spec.rb +64 -0
  125. data/spec/models/confirm_mode_spec.rb +28 -0
  126. data/spec/models/create_email_template_dto_spec.rb +34 -0
  127. data/spec/models/email_template_dto_spec.rb +46 -0
  128. data/spec/models/email_verification_status_spec.rb +28 -0
  129. data/spec/models/error_dto_spec.rb +58 -0
  130. data/spec/models/event_dto_spec.rb +100 -0
  131. data/spec/models/inline_object_spec.rb +34 -0
  132. data/spec/models/iso_day_of_week_spec.rb +28 -0
  133. data/spec/models/list_response_dto_of_event_dto_spec.rb +40 -0
  134. data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +40 -0
  135. data/spec/models/list_response_dto_of_media_dto_spec.rb +40 -0
  136. data/spec/models/list_response_dto_of_subscription_dto_spec.rb +40 -0
  137. data/spec/models/list_response_dto_of_template_dto_spec.rb +40 -0
  138. data/spec/models/list_response_dto_of_topic_dto_spec.rb +40 -0
  139. data/spec/models/list_response_dto_of_user_dto_spec.rb +40 -0
  140. data/spec/models/log_entry_dto_spec.rb +52 -0
  141. data/spec/models/media_dto_spec.rb +64 -0
  142. data/spec/models/media_type_spec.rb +28 -0
  143. data/spec/models/notification_formatting_dto_spec.rb +76 -0
  144. data/spec/models/notification_setting_dto_spec.rb +40 -0
  145. data/spec/models/publish_many_request_dto_spec.rb +34 -0
  146. data/spec/models/publish_request_dto_spec.rb +88 -0
  147. data/spec/models/resize_mode_spec.rb +28 -0
  148. data/spec/models/scheduling_dto_spec.rb +52 -0
  149. data/spec/models/scheduling_type_spec.rb +28 -0
  150. data/spec/models/subscribe_dto_spec.rb +40 -0
  151. data/spec/models/subscription_dto_spec.rb +40 -0
  152. data/spec/models/template_dto_spec.rb +46 -0
  153. data/spec/models/topic_dto_spec.rb +46 -0
  154. data/spec/models/upsert_app_dto_spec.rb +88 -0
  155. data/spec/models/upsert_template_dto_spec.rb +46 -0
  156. data/spec/models/upsert_templates_dto_spec.rb +34 -0
  157. data/spec/models/upsert_user_dto_spec.rb +76 -0
  158. data/spec/models/upsert_users_dto_spec.rb +34 -0
  159. data/spec/models/user_dto_spec.rb +88 -0
  160. data/spec/spec_helper.rb +111 -0
  161. metadata +294 -0
@@ -0,0 +1,58 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=`git remote`
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'
58
+
@@ -0,0 +1,87 @@
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
+ # Common files
14
+ require 'notifo/api_client'
15
+ require 'notifo/api_error'
16
+ require 'notifo/version'
17
+ require 'notifo/configuration'
18
+
19
+ # Models
20
+ require 'notifo/models/add_allowed_topic_request'
21
+ require 'notifo/models/add_contributor_dto'
22
+ require 'notifo/models/app_contributor_dto'
23
+ require 'notifo/models/app_details_dto'
24
+ require 'notifo/models/app_dto'
25
+ require 'notifo/models/confirm_mode'
26
+ require 'notifo/models/create_email_template_dto'
27
+ require 'notifo/models/email_template_dto'
28
+ require 'notifo/models/email_verification_status'
29
+ require 'notifo/models/error_dto'
30
+ require 'notifo/models/event_dto'
31
+ require 'notifo/models/inline_object'
32
+ require 'notifo/models/iso_day_of_week'
33
+ require 'notifo/models/list_response_dto_of_event_dto'
34
+ require 'notifo/models/list_response_dto_of_log_entry_dto'
35
+ require 'notifo/models/list_response_dto_of_media_dto'
36
+ require 'notifo/models/list_response_dto_of_subscription_dto'
37
+ require 'notifo/models/list_response_dto_of_template_dto'
38
+ require 'notifo/models/list_response_dto_of_topic_dto'
39
+ require 'notifo/models/list_response_dto_of_user_dto'
40
+ require 'notifo/models/log_entry_dto'
41
+ require 'notifo/models/media_dto'
42
+ require 'notifo/models/media_type'
43
+ require 'notifo/models/notification_formatting_dto'
44
+ require 'notifo/models/notification_setting_dto'
45
+ require 'notifo/models/publish_many_request_dto'
46
+ require 'notifo/models/publish_request_dto'
47
+ require 'notifo/models/resize_mode'
48
+ require 'notifo/models/scheduling_dto'
49
+ require 'notifo/models/scheduling_type'
50
+ require 'notifo/models/subscribe_dto'
51
+ require 'notifo/models/subscription_dto'
52
+ require 'notifo/models/template_dto'
53
+ require 'notifo/models/topic_dto'
54
+ require 'notifo/models/upsert_app_dto'
55
+ require 'notifo/models/upsert_template_dto'
56
+ require 'notifo/models/upsert_templates_dto'
57
+ require 'notifo/models/upsert_user_dto'
58
+ require 'notifo/models/upsert_users_dto'
59
+ require 'notifo/models/user_dto'
60
+
61
+ # APIs
62
+ require 'notifo/api/apps_api'
63
+ require 'notifo/api/configs_api'
64
+ require 'notifo/api/events_api'
65
+ require 'notifo/api/logs_api'
66
+ require 'notifo/api/media_api'
67
+ require 'notifo/api/templates_api'
68
+ require 'notifo/api/topics_api'
69
+ require 'notifo/api/users_api'
70
+
71
+ module Notifo
72
+ class << self
73
+ # Customize default settings for the SDK using block.
74
+ # Notifo.configure do |config|
75
+ # config.username = "xxx"
76
+ # config.password = "xxx"
77
+ # end
78
+ # If no block given, return the default Configuration object.
79
+ def configure
80
+ if block_given?
81
+ yield(Configuration.default)
82
+ else
83
+ Configuration.default
84
+ end
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,678 @@
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 'cgi'
14
+
15
+ module Notifo
16
+ class AppsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete an app contributor.
23
+ # @param app_id [String] The id of the app.
24
+ # @param contributor_id [String] The contributor to remove.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AppDetailsDto]
27
+ def apps_delete_contributor(app_id, contributor_id, opts = {})
28
+ data, _status_code, _headers = apps_delete_contributor_with_http_info(app_id, contributor_id, opts)
29
+ data
30
+ end
31
+
32
+ # Delete an app contributor.
33
+ # @param app_id [String] The id of the app.
34
+ # @param contributor_id [String] The contributor to remove.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AppDetailsDto, Integer, Hash)>] AppDetailsDto data, response status code and response headers
37
+ def apps_delete_contributor_with_http_info(app_id, contributor_id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AppsApi.apps_delete_contributor ...'
40
+ end
41
+ # verify the required parameter 'app_id' is set
42
+ if @api_client.config.client_side_validation && app_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppsApi.apps_delete_contributor"
44
+ end
45
+ # verify the required parameter 'contributor_id' is set
46
+ if @api_client.config.client_side_validation && contributor_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'contributor_id' when calling AppsApi.apps_delete_contributor"
48
+ end
49
+ # resource path
50
+ local_var_path = '/api/apps/{appId}/contributors/{contributorId}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'contributorId' + '}', CGI.escape(contributor_id.to_s))
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:debug_body]
65
+
66
+ # return_type
67
+ return_type = opts[:debug_return_type] || 'AppDetailsDto'
68
+
69
+ # auth_names
70
+ auth_names = opts[:debug_auth_names] || []
71
+
72
+ new_options = opts.merge(
73
+ :operation => :"AppsApi.apps_delete_contributor",
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: AppsApi#apps_delete_contributor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # Delete an app email template.
90
+ # @param app_id [String] The id of the app where the email templates belong to.
91
+ # @param language [String] The language.
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [nil]
94
+ def apps_delete_email_template(app_id, language, opts = {})
95
+ apps_delete_email_template_with_http_info(app_id, language, opts)
96
+ nil
97
+ end
98
+
99
+ # Delete an app email template.
100
+ # @param app_id [String] The id of the app where the email templates belong to.
101
+ # @param language [String] The language.
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
104
+ def apps_delete_email_template_with_http_info(app_id, language, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: AppsApi.apps_delete_email_template ...'
107
+ end
108
+ # verify the required parameter 'app_id' is set
109
+ if @api_client.config.client_side_validation && app_id.nil?
110
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppsApi.apps_delete_email_template"
111
+ end
112
+ # verify the required parameter 'language' is set
113
+ if @api_client.config.client_side_validation && language.nil?
114
+ fail ArgumentError, "Missing the required parameter 'language' when calling AppsApi.apps_delete_email_template"
115
+ end
116
+ # resource path
117
+ local_var_path = '/api/apps/{appId}/email-templates/{language}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'language' + '}', CGI.escape(language.to_s))
118
+
119
+ # query parameters
120
+ query_params = opts[:query_params] || {}
121
+
122
+ # header parameters
123
+ header_params = opts[:header_params] || {}
124
+ # HTTP header 'Accept' (if needed)
125
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
126
+
127
+ # form parameters
128
+ form_params = opts[:form_params] || {}
129
+
130
+ # http body (model)
131
+ post_body = opts[:debug_body]
132
+
133
+ # return_type
134
+ return_type = opts[:debug_return_type]
135
+
136
+ # auth_names
137
+ auth_names = opts[:debug_auth_names] || []
138
+
139
+ new_options = opts.merge(
140
+ :operation => :"AppsApi.apps_delete_email_template",
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: AppsApi#apps_delete_email_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # Get app by id.
157
+ # @param app_id [String] The id of the app.
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [AppDetailsDto]
160
+ def apps_get_app(app_id, opts = {})
161
+ data, _status_code, _headers = apps_get_app_with_http_info(app_id, opts)
162
+ data
163
+ end
164
+
165
+ # Get app by id.
166
+ # @param app_id [String] The id of the app.
167
+ # @param [Hash] opts the optional parameters
168
+ # @return [Array<(AppDetailsDto, Integer, Hash)>] AppDetailsDto data, response status code and response headers
169
+ def apps_get_app_with_http_info(app_id, opts = {})
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug 'Calling API: AppsApi.apps_get_app ...'
172
+ end
173
+ # verify the required parameter 'app_id' is set
174
+ if @api_client.config.client_side_validation && app_id.nil?
175
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppsApi.apps_get_app"
176
+ end
177
+ # resource path
178
+ local_var_path = '/api/apps/{appId}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
179
+
180
+ # query parameters
181
+ query_params = opts[:query_params] || {}
182
+
183
+ # header parameters
184
+ header_params = opts[:header_params] || {}
185
+ # HTTP header 'Accept' (if needed)
186
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
187
+
188
+ # form parameters
189
+ form_params = opts[:form_params] || {}
190
+
191
+ # http body (model)
192
+ post_body = opts[:debug_body]
193
+
194
+ # return_type
195
+ return_type = opts[:debug_return_type] || 'AppDetailsDto'
196
+
197
+ # auth_names
198
+ auth_names = opts[:debug_auth_names] || []
199
+
200
+ new_options = opts.merge(
201
+ :operation => :"AppsApi.apps_get_app",
202
+ :header_params => header_params,
203
+ :query_params => query_params,
204
+ :form_params => form_params,
205
+ :body => post_body,
206
+ :auth_names => auth_names,
207
+ :return_type => return_type
208
+ )
209
+
210
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
211
+ if @api_client.config.debugging
212
+ @api_client.config.logger.debug "API called: AppsApi#apps_get_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
213
+ end
214
+ return data, status_code, headers
215
+ end
216
+
217
+ # Get the user apps.
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [Array<AppDto>]
220
+ def apps_get_apps(opts = {})
221
+ data, _status_code, _headers = apps_get_apps_with_http_info(opts)
222
+ data
223
+ end
224
+
225
+ # Get the user apps.
226
+ # @param [Hash] opts the optional parameters
227
+ # @return [Array<(Array<AppDto>, Integer, Hash)>] Array<AppDto> data, response status code and response headers
228
+ def apps_get_apps_with_http_info(opts = {})
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug 'Calling API: AppsApi.apps_get_apps ...'
231
+ end
232
+ # resource path
233
+ local_var_path = '/api/apps'
234
+
235
+ # query parameters
236
+ query_params = opts[:query_params] || {}
237
+
238
+ # header parameters
239
+ header_params = opts[:header_params] || {}
240
+ # HTTP header 'Accept' (if needed)
241
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
242
+
243
+ # form parameters
244
+ form_params = opts[:form_params] || {}
245
+
246
+ # http body (model)
247
+ post_body = opts[:debug_body]
248
+
249
+ # return_type
250
+ return_type = opts[:debug_return_type] || 'Array<AppDto>'
251
+
252
+ # auth_names
253
+ auth_names = opts[:debug_auth_names] || []
254
+
255
+ new_options = opts.merge(
256
+ :operation => :"AppsApi.apps_get_apps",
257
+ :header_params => header_params,
258
+ :query_params => query_params,
259
+ :form_params => form_params,
260
+ :body => post_body,
261
+ :auth_names => auth_names,
262
+ :return_type => return_type
263
+ )
264
+
265
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
266
+ if @api_client.config.debugging
267
+ @api_client.config.logger.debug "API called: AppsApi#apps_get_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
268
+ end
269
+ return data, status_code, headers
270
+ end
271
+
272
+ # Get the app email templates.
273
+ # @param app_id [String] The id of the app where the email templates belong to.
274
+ # @param [Hash] opts the optional parameters
275
+ # @return [Hash<String, EmailTemplateDto>]
276
+ def apps_get_email_templates(app_id, opts = {})
277
+ data, _status_code, _headers = apps_get_email_templates_with_http_info(app_id, opts)
278
+ data
279
+ end
280
+
281
+ # Get the app email templates.
282
+ # @param app_id [String] The id of the app where the email templates belong to.
283
+ # @param [Hash] opts the optional parameters
284
+ # @return [Array<(Hash<String, EmailTemplateDto>, Integer, Hash)>] Hash<String, EmailTemplateDto> data, response status code and response headers
285
+ def apps_get_email_templates_with_http_info(app_id, opts = {})
286
+ if @api_client.config.debugging
287
+ @api_client.config.logger.debug 'Calling API: AppsApi.apps_get_email_templates ...'
288
+ end
289
+ # verify the required parameter 'app_id' is set
290
+ if @api_client.config.client_side_validation && app_id.nil?
291
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppsApi.apps_get_email_templates"
292
+ end
293
+ # resource path
294
+ local_var_path = '/api/apps/{appId}/email-templates'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
295
+
296
+ # query parameters
297
+ query_params = opts[:query_params] || {}
298
+
299
+ # header parameters
300
+ header_params = opts[:header_params] || {}
301
+ # HTTP header 'Accept' (if needed)
302
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
303
+
304
+ # form parameters
305
+ form_params = opts[:form_params] || {}
306
+
307
+ # http body (model)
308
+ post_body = opts[:debug_body]
309
+
310
+ # return_type
311
+ return_type = opts[:debug_return_type] || 'Hash<String, EmailTemplateDto>'
312
+
313
+ # auth_names
314
+ auth_names = opts[:debug_auth_names] || []
315
+
316
+ new_options = opts.merge(
317
+ :operation => :"AppsApi.apps_get_email_templates",
318
+ :header_params => header_params,
319
+ :query_params => query_params,
320
+ :form_params => form_params,
321
+ :body => post_body,
322
+ :auth_names => auth_names,
323
+ :return_type => return_type
324
+ )
325
+
326
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug "API called: AppsApi#apps_get_email_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
329
+ end
330
+ return data, status_code, headers
331
+ end
332
+
333
+ # Create an app.
334
+ # @param upsert_app_dto [UpsertAppDto] The request object.
335
+ # @param [Hash] opts the optional parameters
336
+ # @return [AppDto]
337
+ def apps_post_app(upsert_app_dto, opts = {})
338
+ data, _status_code, _headers = apps_post_app_with_http_info(upsert_app_dto, opts)
339
+ data
340
+ end
341
+
342
+ # Create an app.
343
+ # @param upsert_app_dto [UpsertAppDto] The request object.
344
+ # @param [Hash] opts the optional parameters
345
+ # @return [Array<(AppDto, Integer, Hash)>] AppDto data, response status code and response headers
346
+ def apps_post_app_with_http_info(upsert_app_dto, opts = {})
347
+ if @api_client.config.debugging
348
+ @api_client.config.logger.debug 'Calling API: AppsApi.apps_post_app ...'
349
+ end
350
+ # verify the required parameter 'upsert_app_dto' is set
351
+ if @api_client.config.client_side_validation && upsert_app_dto.nil?
352
+ fail ArgumentError, "Missing the required parameter 'upsert_app_dto' when calling AppsApi.apps_post_app"
353
+ end
354
+ # resource path
355
+ local_var_path = '/api/apps'
356
+
357
+ # query parameters
358
+ query_params = opts[:query_params] || {}
359
+
360
+ # header parameters
361
+ header_params = opts[:header_params] || {}
362
+ # HTTP header 'Accept' (if needed)
363
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
364
+ # HTTP header 'Content-Type'
365
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
366
+
367
+ # form parameters
368
+ form_params = opts[:form_params] || {}
369
+
370
+ # http body (model)
371
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(upsert_app_dto)
372
+
373
+ # return_type
374
+ return_type = opts[:debug_return_type] || 'AppDto'
375
+
376
+ # auth_names
377
+ auth_names = opts[:debug_auth_names] || []
378
+
379
+ new_options = opts.merge(
380
+ :operation => :"AppsApi.apps_post_app",
381
+ :header_params => header_params,
382
+ :query_params => query_params,
383
+ :form_params => form_params,
384
+ :body => post_body,
385
+ :auth_names => auth_names,
386
+ :return_type => return_type
387
+ )
388
+
389
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
390
+ if @api_client.config.debugging
391
+ @api_client.config.logger.debug "API called: AppsApi#apps_post_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
392
+ end
393
+ return data, status_code, headers
394
+ end
395
+
396
+ # Add an app contributor.
397
+ # @param app_id [String] The id of the app.
398
+ # @param add_contributor_dto [AddContributorDto] The request object.
399
+ # @param [Hash] opts the optional parameters
400
+ # @return [AppDetailsDto]
401
+ def apps_post_contributor(app_id, add_contributor_dto, opts = {})
402
+ data, _status_code, _headers = apps_post_contributor_with_http_info(app_id, add_contributor_dto, opts)
403
+ data
404
+ end
405
+
406
+ # Add an app contributor.
407
+ # @param app_id [String] The id of the app.
408
+ # @param add_contributor_dto [AddContributorDto] The request object.
409
+ # @param [Hash] opts the optional parameters
410
+ # @return [Array<(AppDetailsDto, Integer, Hash)>] AppDetailsDto data, response status code and response headers
411
+ def apps_post_contributor_with_http_info(app_id, add_contributor_dto, opts = {})
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug 'Calling API: AppsApi.apps_post_contributor ...'
414
+ end
415
+ # verify the required parameter 'app_id' is set
416
+ if @api_client.config.client_side_validation && app_id.nil?
417
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppsApi.apps_post_contributor"
418
+ end
419
+ # verify the required parameter 'add_contributor_dto' is set
420
+ if @api_client.config.client_side_validation && add_contributor_dto.nil?
421
+ fail ArgumentError, "Missing the required parameter 'add_contributor_dto' when calling AppsApi.apps_post_contributor"
422
+ end
423
+ # resource path
424
+ local_var_path = '/api/apps/{appId}/contributors'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
425
+
426
+ # query parameters
427
+ query_params = opts[:query_params] || {}
428
+
429
+ # header parameters
430
+ header_params = opts[:header_params] || {}
431
+ # HTTP header 'Accept' (if needed)
432
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
433
+ # HTTP header 'Content-Type'
434
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
435
+
436
+ # form parameters
437
+ form_params = opts[:form_params] || {}
438
+
439
+ # http body (model)
440
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(add_contributor_dto)
441
+
442
+ # return_type
443
+ return_type = opts[:debug_return_type] || 'AppDetailsDto'
444
+
445
+ # auth_names
446
+ auth_names = opts[:debug_auth_names] || []
447
+
448
+ new_options = opts.merge(
449
+ :operation => :"AppsApi.apps_post_contributor",
450
+ :header_params => header_params,
451
+ :query_params => query_params,
452
+ :form_params => form_params,
453
+ :body => post_body,
454
+ :auth_names => auth_names,
455
+ :return_type => return_type
456
+ )
457
+
458
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
459
+ if @api_client.config.debugging
460
+ @api_client.config.logger.debug "API called: AppsApi#apps_post_contributor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
461
+ end
462
+ return data, status_code, headers
463
+ end
464
+
465
+ # Create an app email template.
466
+ # @param app_id [String] The id of the app where the email templates belong to.
467
+ # @param create_email_template_dto [CreateEmailTemplateDto] The request object.
468
+ # @param [Hash] opts the optional parameters
469
+ # @return [Hash<String, EmailTemplateDto>]
470
+ def apps_post_email_template(app_id, create_email_template_dto, opts = {})
471
+ data, _status_code, _headers = apps_post_email_template_with_http_info(app_id, create_email_template_dto, opts)
472
+ data
473
+ end
474
+
475
+ # Create an app email template.
476
+ # @param app_id [String] The id of the app where the email templates belong to.
477
+ # @param create_email_template_dto [CreateEmailTemplateDto] The request object.
478
+ # @param [Hash] opts the optional parameters
479
+ # @return [Array<(Hash<String, EmailTemplateDto>, Integer, Hash)>] Hash<String, EmailTemplateDto> data, response status code and response headers
480
+ def apps_post_email_template_with_http_info(app_id, create_email_template_dto, opts = {})
481
+ if @api_client.config.debugging
482
+ @api_client.config.logger.debug 'Calling API: AppsApi.apps_post_email_template ...'
483
+ end
484
+ # verify the required parameter 'app_id' is set
485
+ if @api_client.config.client_side_validation && app_id.nil?
486
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppsApi.apps_post_email_template"
487
+ end
488
+ # verify the required parameter 'create_email_template_dto' is set
489
+ if @api_client.config.client_side_validation && create_email_template_dto.nil?
490
+ fail ArgumentError, "Missing the required parameter 'create_email_template_dto' when calling AppsApi.apps_post_email_template"
491
+ end
492
+ # resource path
493
+ local_var_path = '/api/apps/{appId}/email-templates'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
494
+
495
+ # query parameters
496
+ query_params = opts[:query_params] || {}
497
+
498
+ # header parameters
499
+ header_params = opts[:header_params] || {}
500
+ # HTTP header 'Accept' (if needed)
501
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
502
+ # HTTP header 'Content-Type'
503
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
504
+
505
+ # form parameters
506
+ form_params = opts[:form_params] || {}
507
+
508
+ # http body (model)
509
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_email_template_dto)
510
+
511
+ # return_type
512
+ return_type = opts[:debug_return_type] || 'Hash<String, EmailTemplateDto>'
513
+
514
+ # auth_names
515
+ auth_names = opts[:debug_auth_names] || []
516
+
517
+ new_options = opts.merge(
518
+ :operation => :"AppsApi.apps_post_email_template",
519
+ :header_params => header_params,
520
+ :query_params => query_params,
521
+ :form_params => form_params,
522
+ :body => post_body,
523
+ :auth_names => auth_names,
524
+ :return_type => return_type
525
+ )
526
+
527
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
528
+ if @api_client.config.debugging
529
+ @api_client.config.logger.debug "API called: AppsApi#apps_post_email_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
530
+ end
531
+ return data, status_code, headers
532
+ end
533
+
534
+ # Update an app.
535
+ # @param app_id [String] The app id to update.
536
+ # @param upsert_app_dto [UpsertAppDto] The request object.
537
+ # @param [Hash] opts the optional parameters
538
+ # @return [AppDetailsDto]
539
+ def apps_put_app(app_id, upsert_app_dto, opts = {})
540
+ data, _status_code, _headers = apps_put_app_with_http_info(app_id, upsert_app_dto, opts)
541
+ data
542
+ end
543
+
544
+ # Update an app.
545
+ # @param app_id [String] The app id to update.
546
+ # @param upsert_app_dto [UpsertAppDto] The request object.
547
+ # @param [Hash] opts the optional parameters
548
+ # @return [Array<(AppDetailsDto, Integer, Hash)>] AppDetailsDto data, response status code and response headers
549
+ def apps_put_app_with_http_info(app_id, upsert_app_dto, opts = {})
550
+ if @api_client.config.debugging
551
+ @api_client.config.logger.debug 'Calling API: AppsApi.apps_put_app ...'
552
+ end
553
+ # verify the required parameter 'app_id' is set
554
+ if @api_client.config.client_side_validation && app_id.nil?
555
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppsApi.apps_put_app"
556
+ end
557
+ # verify the required parameter 'upsert_app_dto' is set
558
+ if @api_client.config.client_side_validation && upsert_app_dto.nil?
559
+ fail ArgumentError, "Missing the required parameter 'upsert_app_dto' when calling AppsApi.apps_put_app"
560
+ end
561
+ # resource path
562
+ local_var_path = '/api/apps/{appId}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
563
+
564
+ # query parameters
565
+ query_params = opts[:query_params] || {}
566
+
567
+ # header parameters
568
+ header_params = opts[:header_params] || {}
569
+ # HTTP header 'Accept' (if needed)
570
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
571
+ # HTTP header 'Content-Type'
572
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
573
+
574
+ # form parameters
575
+ form_params = opts[:form_params] || {}
576
+
577
+ # http body (model)
578
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(upsert_app_dto)
579
+
580
+ # return_type
581
+ return_type = opts[:debug_return_type] || 'AppDetailsDto'
582
+
583
+ # auth_names
584
+ auth_names = opts[:debug_auth_names] || []
585
+
586
+ new_options = opts.merge(
587
+ :operation => :"AppsApi.apps_put_app",
588
+ :header_params => header_params,
589
+ :query_params => query_params,
590
+ :form_params => form_params,
591
+ :body => post_body,
592
+ :auth_names => auth_names,
593
+ :return_type => return_type
594
+ )
595
+
596
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
597
+ if @api_client.config.debugging
598
+ @api_client.config.logger.debug "API called: AppsApi#apps_put_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
599
+ end
600
+ return data, status_code, headers
601
+ end
602
+
603
+ # Update an app email template.
604
+ # @param app_id [String] The id of the app where the email templates belong to.
605
+ # @param language [String] The language.
606
+ # @param email_template_dto [EmailTemplateDto] The request object.
607
+ # @param [Hash] opts the optional parameters
608
+ # @return [nil]
609
+ def apps_put_email_template(app_id, language, email_template_dto, opts = {})
610
+ apps_put_email_template_with_http_info(app_id, language, email_template_dto, opts)
611
+ nil
612
+ end
613
+
614
+ # Update an app email template.
615
+ # @param app_id [String] The id of the app where the email templates belong to.
616
+ # @param language [String] The language.
617
+ # @param email_template_dto [EmailTemplateDto] The request object.
618
+ # @param [Hash] opts the optional parameters
619
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
620
+ def apps_put_email_template_with_http_info(app_id, language, email_template_dto, opts = {})
621
+ if @api_client.config.debugging
622
+ @api_client.config.logger.debug 'Calling API: AppsApi.apps_put_email_template ...'
623
+ end
624
+ # verify the required parameter 'app_id' is set
625
+ if @api_client.config.client_side_validation && app_id.nil?
626
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppsApi.apps_put_email_template"
627
+ end
628
+ # verify the required parameter 'language' is set
629
+ if @api_client.config.client_side_validation && language.nil?
630
+ fail ArgumentError, "Missing the required parameter 'language' when calling AppsApi.apps_put_email_template"
631
+ end
632
+ # verify the required parameter 'email_template_dto' is set
633
+ if @api_client.config.client_side_validation && email_template_dto.nil?
634
+ fail ArgumentError, "Missing the required parameter 'email_template_dto' when calling AppsApi.apps_put_email_template"
635
+ end
636
+ # resource path
637
+ local_var_path = '/api/apps/{appId}/email-templates/{language}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'language' + '}', CGI.escape(language.to_s))
638
+
639
+ # query parameters
640
+ query_params = opts[:query_params] || {}
641
+
642
+ # header parameters
643
+ header_params = opts[:header_params] || {}
644
+ # HTTP header 'Accept' (if needed)
645
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
646
+ # HTTP header 'Content-Type'
647
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
648
+
649
+ # form parameters
650
+ form_params = opts[:form_params] || {}
651
+
652
+ # http body (model)
653
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(email_template_dto)
654
+
655
+ # return_type
656
+ return_type = opts[:debug_return_type]
657
+
658
+ # auth_names
659
+ auth_names = opts[:debug_auth_names] || []
660
+
661
+ new_options = opts.merge(
662
+ :operation => :"AppsApi.apps_put_email_template",
663
+ :header_params => header_params,
664
+ :query_params => query_params,
665
+ :form_params => form_params,
666
+ :body => post_body,
667
+ :auth_names => auth_names,
668
+ :return_type => return_type
669
+ )
670
+
671
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
672
+ if @api_client.config.debugging
673
+ @api_client.config.logger.debug "API called: AppsApi#apps_put_email_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
674
+ end
675
+ return data, status_code, headers
676
+ end
677
+ end
678
+ end