notifo-io-easierlife 1.0.0
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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +167 -0
- data/Rakefile +10 -0
- data/docs/AddAllowedTopicDto.md +18 -0
- data/docs/AddContributorDto.md +20 -0
- data/docs/AppContributorDto.md +22 -0
- data/docs/AppDetailsDto.md +48 -0
- data/docs/AppDto.md +28 -0
- data/docs/AppsApi.md +646 -0
- data/docs/ConfigsApi.md +127 -0
- data/docs/ConfirmMode.md +15 -0
- data/docs/CreateEmailTemplateDto.md +18 -0
- data/docs/EmailTemplateDto.md +22 -0
- data/docs/EmailVerificationStatus.md +15 -0
- data/docs/ErrorDto.md +26 -0
- data/docs/EventDto.md +40 -0
- data/docs/EventsApi.md +142 -0
- data/docs/IsoDayOfWeek.md +15 -0
- data/docs/ListResponseDtoOfEventDto.md +20 -0
- data/docs/ListResponseDtoOfLogEntryDto.md +20 -0
- data/docs/ListResponseDtoOfMediaDto.md +20 -0
- data/docs/ListResponseDtoOfSubscriptionDto.md +20 -0
- data/docs/ListResponseDtoOfTemplateDto.md +20 -0
- data/docs/ListResponseDtoOfTopicDto.md +20 -0
- data/docs/ListResponseDtoOfUserDto.md +20 -0
- data/docs/LogEntryDto.md +24 -0
- data/docs/LogsApi.md +78 -0
- data/docs/MediaApi.md +382 -0
- data/docs/MediaDto.md +30 -0
- data/docs/MediaType.md +15 -0
- data/docs/NotificationFormattingDto.md +32 -0
- data/docs/NotificationSend.md +15 -0
- data/docs/NotificationSettingDto.md +20 -0
- data/docs/ProfileDto.md +32 -0
- data/docs/PublishDto.md +36 -0
- data/docs/PublishManyDto.md +18 -0
- data/docs/ResizeMode.md +15 -0
- data/docs/SchedulingDto.md +24 -0
- data/docs/SchedulingType.md +15 -0
- data/docs/SubscriptionDto.md +20 -0
- data/docs/TemplateDto.md +22 -0
- data/docs/TemplatesApi.md +208 -0
- data/docs/TopicDto.md +22 -0
- data/docs/TopicsApi.md +78 -0
- data/docs/UpdateProfileDto.md +28 -0
- data/docs/UpsertAppDto.md +36 -0
- data/docs/UpsertTemplateDto.md +22 -0
- data/docs/UpsertTemplatesDto.md +18 -0
- data/docs/UpsertUserDto.md +32 -0
- data/docs/UpsertUsersDto.md +18 -0
- data/docs/UserApi.md +323 -0
- data/docs/UserDto.md +36 -0
- data/docs/UsersApi.md +610 -0
- data/git_push.sh +58 -0
- data/lib/notifo.rb +89 -0
- data/lib/notifo/api/apps_api.rb +678 -0
- data/lib/notifo/api/configs_api.rb +132 -0
- data/lib/notifo/api/events_api.rb +161 -0
- data/lib/notifo/api/logs_api.rb +92 -0
- data/lib/notifo/api/media_api.rb +419 -0
- data/lib/notifo/api/templates_api.rb +228 -0
- data/lib/notifo/api/topics_api.rb +92 -0
- data/lib/notifo/api/user_api.rb +331 -0
- data/lib/notifo/api/users_api.rb +667 -0
- data/lib/notifo/api_client.rb +389 -0
- data/lib/notifo/api_error.rb +57 -0
- data/lib/notifo/configuration.rb +270 -0
- data/lib/notifo/models/add_allowed_topic_dto.rb +243 -0
- data/lib/notifo/models/add_contributor_dto.rb +277 -0
- data/lib/notifo/models/app_contributor_dto.rb +311 -0
- data/lib/notifo/models/app_details_dto.rb +489 -0
- data/lib/notifo/models/app_dto.rb +362 -0
- data/lib/notifo/models/confirm_mode.rb +38 -0
- data/lib/notifo/models/create_email_template_dto.rb +243 -0
- data/lib/notifo/models/email_template_dto.rb +288 -0
- data/lib/notifo/models/email_verification_status.rb +39 -0
- data/lib/notifo/models/error_dto.rb +265 -0
- data/lib/notifo/models/event_dto.rb +456 -0
- data/lib/notifo/models/iso_day_of_week.rb +43 -0
- data/lib/notifo/models/list_response_dto_of_event_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_media_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_template_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_topic_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_user_dto.rb +241 -0
- data/lib/notifo/models/log_entry_dto.rb +326 -0
- data/lib/notifo/models/media_dto.rb +390 -0
- data/lib/notifo/models/media_type.rb +39 -0
- data/lib/notifo/models/notification_formatting_dto.rb +305 -0
- data/lib/notifo/models/notification_send.rb +39 -0
- data/lib/notifo/models/notification_setting_dto.rb +234 -0
- data/lib/notifo/models/profile_dto.rb +361 -0
- data/lib/notifo/models/publish_dto.rb +338 -0
- data/lib/notifo/models/publish_many_dto.rb +226 -0
- data/lib/notifo/models/resize_mode.rb +42 -0
- data/lib/notifo/models/scheduling_dto.rb +248 -0
- data/lib/notifo/models/scheduling_type.rb +37 -0
- data/lib/notifo/models/subscription_dto.rb +256 -0
- data/lib/notifo/models/template_dto.rb +274 -0
- data/lib/notifo/models/topic_dto.rb +294 -0
- data/lib/notifo/models/update_profile_dto.rb +277 -0
- data/lib/notifo/models/upsert_app_dto.rb +321 -0
- data/lib/notifo/models/upsert_template_dto.rb +270 -0
- data/lib/notifo/models/upsert_templates_dto.rb +226 -0
- data/lib/notifo/models/upsert_user_dto.rb +299 -0
- data/lib/notifo/models/upsert_users_dto.rb +226 -0
- data/lib/notifo/models/user_dto.rb +381 -0
- data/lib/notifo/version.rb +15 -0
- data/notifo-io-1.0.0.gem +0 -0
- data/notifo.gemspec +38 -0
- data/spec/api/apps_api_spec.rb +151 -0
- data/spec/api/configs_api_spec.rb +55 -0
- data/spec/api/events_api_spec.rb +61 -0
- data/spec/api/logs_api_spec.rb +49 -0
- data/spec/api/media_api_spec.rb +117 -0
- data/spec/api/templates_api_spec.rb +73 -0
- data/spec/api/topics_api_spec.rb +49 -0
- data/spec/api/user_api_spec.rb +92 -0
- data/spec/api/users_api_spec.rb +152 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/add_allowed_topic_dto_spec.rb +34 -0
- data/spec/models/add_contributor_dto_spec.rb +40 -0
- data/spec/models/app_contributor_dto_spec.rb +46 -0
- data/spec/models/app_details_dto_spec.rb +124 -0
- data/spec/models/app_dto_spec.rb +64 -0
- data/spec/models/confirm_mode_spec.rb +28 -0
- data/spec/models/create_email_template_dto_spec.rb +34 -0
- data/spec/models/email_template_dto_spec.rb +46 -0
- data/spec/models/email_verification_status_spec.rb +28 -0
- data/spec/models/error_dto_spec.rb +58 -0
- data/spec/models/event_dto_spec.rb +100 -0
- data/spec/models/iso_day_of_week_spec.rb +28 -0
- data/spec/models/list_response_dto_of_event_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_media_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_subscription_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_template_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_topic_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_user_dto_spec.rb +40 -0
- data/spec/models/log_entry_dto_spec.rb +52 -0
- data/spec/models/media_dto_spec.rb +70 -0
- data/spec/models/media_type_spec.rb +28 -0
- data/spec/models/notification_formatting_dto_spec.rb +76 -0
- data/spec/models/notification_send_spec.rb +28 -0
- data/spec/models/notification_setting_dto_spec.rb +40 -0
- data/spec/models/profile_dto_spec.rb +76 -0
- data/spec/models/publish_dto_spec.rb +88 -0
- data/spec/models/publish_many_dto_spec.rb +34 -0
- data/spec/models/resize_mode_spec.rb +28 -0
- data/spec/models/scheduling_dto_spec.rb +52 -0
- data/spec/models/scheduling_type_spec.rb +28 -0
- data/spec/models/subscription_dto_spec.rb +40 -0
- data/spec/models/template_dto_spec.rb +46 -0
- data/spec/models/topic_dto_spec.rb +46 -0
- data/spec/models/update_profile_dto_spec.rb +64 -0
- data/spec/models/upsert_app_dto_spec.rb +88 -0
- data/spec/models/upsert_template_dto_spec.rb +46 -0
- data/spec/models/upsert_templates_dto_spec.rb +34 -0
- data/spec/models/upsert_user_dto_spec.rb +76 -0
- data/spec/models/upsert_users_dto_spec.rb +34 -0
- data/spec/models/user_dto_spec.rb +88 -0
- data/spec/spec_helper.rb +111 -0
- metadata +301 -0
data/git_push.sh
ADDED
@@ -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
|
+
|
data/lib/notifo.rb
ADDED
@@ -0,0 +1,89 @@
|
|
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.1.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_dto'
|
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/iso_day_of_week'
|
32
|
+
require 'notifo/models/list_response_dto_of_event_dto'
|
33
|
+
require 'notifo/models/list_response_dto_of_log_entry_dto'
|
34
|
+
require 'notifo/models/list_response_dto_of_media_dto'
|
35
|
+
require 'notifo/models/list_response_dto_of_subscription_dto'
|
36
|
+
require 'notifo/models/list_response_dto_of_template_dto'
|
37
|
+
require 'notifo/models/list_response_dto_of_topic_dto'
|
38
|
+
require 'notifo/models/list_response_dto_of_user_dto'
|
39
|
+
require 'notifo/models/log_entry_dto'
|
40
|
+
require 'notifo/models/media_dto'
|
41
|
+
require 'notifo/models/media_type'
|
42
|
+
require 'notifo/models/notification_formatting_dto'
|
43
|
+
require 'notifo/models/notification_send'
|
44
|
+
require 'notifo/models/notification_setting_dto'
|
45
|
+
require 'notifo/models/profile_dto'
|
46
|
+
require 'notifo/models/publish_dto'
|
47
|
+
require 'notifo/models/publish_many_dto'
|
48
|
+
require 'notifo/models/resize_mode'
|
49
|
+
require 'notifo/models/scheduling_dto'
|
50
|
+
require 'notifo/models/scheduling_type'
|
51
|
+
require 'notifo/models/subscription_dto'
|
52
|
+
require 'notifo/models/template_dto'
|
53
|
+
require 'notifo/models/topic_dto'
|
54
|
+
require 'notifo/models/update_profile_dto'
|
55
|
+
require 'notifo/models/upsert_app_dto'
|
56
|
+
require 'notifo/models/upsert_template_dto'
|
57
|
+
require 'notifo/models/upsert_templates_dto'
|
58
|
+
require 'notifo/models/upsert_user_dto'
|
59
|
+
require 'notifo/models/upsert_users_dto'
|
60
|
+
require 'notifo/models/user_dto'
|
61
|
+
|
62
|
+
# APIs
|
63
|
+
require 'notifo/api/apps_api'
|
64
|
+
require 'notifo/api/configs_api'
|
65
|
+
require 'notifo/api/events_api'
|
66
|
+
require 'notifo/api/logs_api'
|
67
|
+
require 'notifo/api/media_api'
|
68
|
+
require 'notifo/api/templates_api'
|
69
|
+
require 'notifo/api/topics_api'
|
70
|
+
require 'notifo/api/user_api'
|
71
|
+
require 'notifo/api/users_api'
|
72
|
+
|
73
|
+
module Notifo
|
74
|
+
class << self
|
75
|
+
# Customize default settings for the SDK using block.
|
76
|
+
# Notifo.configure do |config|
|
77
|
+
# config.username = "xxx"
|
78
|
+
# config.password = "xxx"
|
79
|
+
# end
|
80
|
+
# If no block given, return the default Configuration object.
|
81
|
+
def configure
|
82
|
+
if block_given?
|
83
|
+
yield(Configuration.default)
|
84
|
+
else
|
85
|
+
Configuration.default
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
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.1.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 [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<(EmailTemplateDto, Integer, Hash)>] 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] || '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
|