samplify_api_client 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -0
- data/README.md +221 -0
- data/Rakefile +8 -0
- data/docs/AppError.md +10 -0
- data/docs/ApplicationItemData.md +11 -0
- data/docs/AttributeData.md +16 -0
- data/docs/AttributeOption.md +10 -0
- data/docs/Attributes.md +10 -0
- data/docs/AttributesApi.md +78 -0
- data/docs/AuthApi.md +191 -0
- data/docs/AuthError.md +9 -0
- data/docs/Author.md +10 -0
- data/docs/BuyProject.md +10 -0
- data/docs/BuyProjectItem.md +12 -0
- data/docs/BuyProjectResponse.md +9 -0
- data/docs/BuyProjectsPayload.md +7 -0
- data/docs/Categories.md +10 -0
- data/docs/CategoriesApi.md +72 -0
- data/docs/CategoryData.md +9 -0
- data/docs/CodePayload.md +11 -0
- data/docs/Countries.md +10 -0
- data/docs/CountriesApi.md +72 -0
- data/docs/CountryData.md +11 -0
- data/docs/CreateLineItem.md +10 -0
- data/docs/DefaultApi.md +88 -0
- data/docs/EndLinks.md +13 -0
- data/docs/ErrorType.md +9 -0
- data/docs/Event.md +10 -0
- data/docs/EventData.md +15 -0
- data/docs/EventListData.md +15 -0
- data/docs/Events.md +10 -0
- data/docs/EventsApi.md +287 -0
- data/docs/ExclusionData.md +9 -0
- data/docs/Feasibility.md +10 -0
- data/docs/FeasibilityApi.md +61 -0
- data/docs/FeasibilityData.md +14 -0
- data/docs/FeasibilityResponseData.md +9 -0
- data/docs/LineItemActionResponse.md +14 -0
- data/docs/LineItemData.md +22 -0
- data/docs/LineItemItemData.md +17 -0
- data/docs/LineItemReportData.md +25 -0
- data/docs/LineItemResponseData.md +27 -0
- data/docs/LineItems.md +10 -0
- data/docs/LineItemsApi.md +420 -0
- data/docs/Links.md +12 -0
- data/docs/LogoutPayload.md +10 -0
- data/docs/Meta.md +10 -0
- data/docs/Project.md +14 -0
- data/docs/ProjectAction.md +10 -0
- data/docs/ProjectActionResponse.md +13 -0
- data/docs/ProjectCategoryData.md +8 -0
- data/docs/ProjectItemData.md +14 -0
- data/docs/ProjectReport.md +10 -0
- data/docs/ProjectReportData.md +21 -0
- data/docs/ProjectReports.md +10 -0
- data/docs/ProjectResponse.md +10 -0
- data/docs/ProjectResponseData.md +19 -0
- data/docs/ProjectSurveyEndLinks.md +10 -0
- data/docs/ProjectSurveyEndLinksData.md +12 -0
- data/docs/Projects.md +10 -0
- data/docs/ProjectsApi.md +620 -0
- data/docs/QuotaCell.md +10 -0
- data/docs/QuotaCellFeasibility.md +9 -0
- data/docs/QuotaGroupData.md +9 -0
- data/docs/QuotaGroupFeasibility.md +8 -0
- data/docs/QuotaPlanData.md +9 -0
- data/docs/Reconcile.md +10 -0
- data/docs/ReconcileData.md +7 -0
- data/docs/RefreshTokenPayload.md +10 -0
- data/docs/Reprice.md +10 -0
- data/docs/RepriceData.md +22 -0
- data/docs/RepricePayload.md +20 -0
- data/docs/RespondentApi.md +86 -0
- data/docs/Status.md +9 -0
- data/docs/SupportedLanguage.md +10 -0
- data/docs/SurveyEndLinks.md +10 -0
- data/docs/SurveyTestId.md +10 -0
- data/docs/SurveyTestLink.md +9 -0
- data/docs/Target.md +11 -0
- data/docs/TargetingAttribute.md +10 -0
- data/docs/TokenMedia.md +11 -0
- data/docs/TokenPayload.md +11 -0
- data/docs/URLParam.md +9 -0
- data/docs/UpdateLineItem.md +21 -0
- data/docs/UpdateProjectData.md +13 -0
- data/docs/UpdateProjectLineItem.md +22 -0
- data/docs/UserInfo.md +10 -0
- data/docs/UserInfoResponseData.md +10 -0
- data/docs/UsersApi.md +68 -0
- data/examples/auth.rb +18 -0
- data/git_push.sh +55 -0
- data/lib/samplify_api_client/api/attributes_api.rb +111 -0
- data/lib/samplify_api_client/api/auth_api.rb +230 -0
- data/lib/samplify_api_client/api/categories_api.rb +99 -0
- data/lib/samplify_api_client/api/countries_api.rb +99 -0
- data/lib/samplify_api_client/api/default_api.rb +115 -0
- data/lib/samplify_api_client/api/events_api.rb +317 -0
- data/lib/samplify_api_client/api/feasibility_api.rb +75 -0
- data/lib/samplify_api_client/api/line_items_api.rb +468 -0
- data/lib/samplify_api_client/api/projects_api.rb +660 -0
- data/lib/samplify_api_client/api/respondent_api.rb +113 -0
- data/lib/samplify_api_client/api/users_api.rb +81 -0
- data/lib/samplify_api_client/api_client.rb +389 -0
- data/lib/samplify_api_client/api_error.rb +38 -0
- data/lib/samplify_api_client/configuration.rb +209 -0
- data/lib/samplify_api_client/models/app_error.rb +218 -0
- data/lib/samplify_api_client/models/application_item_data.rb +234 -0
- data/lib/samplify_api_client/models/attribute_data.rb +334 -0
- data/lib/samplify_api_client/models/attribute_option.rb +219 -0
- data/lib/samplify_api_client/models/attributes.rb +219 -0
- data/lib/samplify_api_client/models/auth_error.rb +205 -0
- data/lib/samplify_api_client/models/author.rb +253 -0
- data/lib/samplify_api_client/models/buy_project.rb +219 -0
- data/lib/samplify_api_client/models/buy_project_item.rb +243 -0
- data/lib/samplify_api_client/models/buy_project_response.rb +194 -0
- data/lib/samplify_api_client/models/buy_projects_payload.rb +174 -0
- data/lib/samplify_api_client/models/categories.rb +219 -0
- data/lib/samplify_api_client/models/category_data.rb +204 -0
- data/lib/samplify_api_client/models/code_payload.rb +229 -0
- data/lib/samplify_api_client/models/countries.rb +219 -0
- data/lib/samplify_api_client/models/country_data.rb +230 -0
- data/lib/samplify_api_client/models/create_line_item.rb +217 -0
- data/lib/samplify_api_client/models/end_links.rb +288 -0
- data/lib/samplify_api_client/models/error_type.rb +204 -0
- data/lib/samplify_api_client/models/event.rb +217 -0
- data/lib/samplify_api_client/models/event_data.rb +289 -0
- data/lib/samplify_api_client/models/event_list_data.rb +289 -0
- data/lib/samplify_api_client/models/events.rb +219 -0
- data/lib/samplify_api_client/models/exclusion_data.rb +206 -0
- data/lib/samplify_api_client/models/feasibility.rb +219 -0
- data/lib/samplify_api_client/models/feasibility_data.rb +255 -0
- data/lib/samplify_api_client/models/feasibility_response_data.rb +193 -0
- data/lib/samplify_api_client/models/line_item_action_response.rb +244 -0
- data/lib/samplify_api_client/models/line_item_data.rb +398 -0
- data/lib/samplify_api_client/models/line_item_item_data.rb +358 -0
- data/lib/samplify_api_client/models/line_item_report_data.rb +478 -0
- data/lib/samplify_api_client/models/line_item_response_data.rb +408 -0
- data/lib/samplify_api_client/models/line_items.rb +219 -0
- data/lib/samplify_api_client/models/links.rb +219 -0
- data/lib/samplify_api_client/models/logout_payload.rb +219 -0
- data/lib/samplify_api_client/models/meta.rb +203 -0
- data/lib/samplify_api_client/models/project.rb +273 -0
- data/lib/samplify_api_client/models/project_action.rb +217 -0
- data/lib/samplify_api_client/models/project_action_response.rb +236 -0
- data/lib/samplify_api_client/models/project_category_data.rb +191 -0
- data/lib/samplify_api_client/models/project_item_data.rb +307 -0
- data/lib/samplify_api_client/models/project_report.rb +217 -0
- data/lib/samplify_api_client/models/project_report_data.rb +414 -0
- data/lib/samplify_api_client/models/project_reports.rb +219 -0
- data/lib/samplify_api_client/models/project_response.rb +217 -0
- data/lib/samplify_api_client/models/project_response_data.rb +347 -0
- data/lib/samplify_api_client/models/project_survey_end_links.rb +217 -0
- data/lib/samplify_api_client/models/project_survey_end_links_data.rb +272 -0
- data/lib/samplify_api_client/models/projects.rb +219 -0
- data/lib/samplify_api_client/models/quota_cell.rb +206 -0
- data/lib/samplify_api_client/models/quota_cell_feasibility.rb +204 -0
- data/lib/samplify_api_client/models/quota_group_data.rb +201 -0
- data/lib/samplify_api_client/models/quota_group_feasibility.rb +185 -0
- data/lib/samplify_api_client/models/quota_plan_data.rb +198 -0
- data/lib/samplify_api_client/models/reconcile.rb +217 -0
- data/lib/samplify_api_client/models/reconcile_data.rb +174 -0
- data/lib/samplify_api_client/models/refresh_token_payload.rb +214 -0
- data/lib/samplify_api_client/models/reprice.rb +217 -0
- data/lib/samplify_api_client/models/reprice_data.rb +399 -0
- data/lib/samplify_api_client/models/reprice_payload.rb +369 -0
- data/lib/samplify_api_client/models/status.rb +206 -0
- data/lib/samplify_api_client/models/supported_language.rb +219 -0
- data/lib/samplify_api_client/models/survey_end_links.rb +216 -0
- data/lib/samplify_api_client/models/survey_test_id.rb +219 -0
- data/lib/samplify_api_client/models/survey_test_link.rb +206 -0
- data/lib/samplify_api_client/models/target.rb +258 -0
- data/lib/samplify_api_client/models/targeting_attribute.rb +216 -0
- data/lib/samplify_api_client/models/token_media.rb +235 -0
- data/lib/samplify_api_client/models/token_payload.rb +229 -0
- data/lib/samplify_api_client/models/update_line_item.rb +353 -0
- data/lib/samplify_api_client/models/update_project_data.rb +238 -0
- data/lib/samplify_api_client/models/update_project_line_item.rb +368 -0
- data/lib/samplify_api_client/models/url_param.rb +204 -0
- data/lib/samplify_api_client/models/user_info.rb +217 -0
- data/lib/samplify_api_client/models/user_info_response_data.rb +221 -0
- data/lib/samplify_api_client/version.rb +15 -0
- data/lib/samplify_api_client.rb +125 -0
- data/samplify_api_client.gemspec +45 -0
- data/spec/api/attributes_api_spec.rb +53 -0
- data/spec/api/auth_api_spec.rb +79 -0
- data/spec/api/categories_api_spec.rb +51 -0
- data/spec/api/countries_api_spec.rb +51 -0
- data/spec/api/default_api_spec.rb +55 -0
- data/spec/api/events_api_spec.rb +100 -0
- data/spec/api/feasibility_api_spec.rb +46 -0
- data/spec/api/line_items_api_spec.rb +128 -0
- data/spec/api/projects_api_spec.rb +168 -0
- data/spec/api/respondent_api_spec.rb +55 -0
- data/spec/api/users_api_spec.rb +49 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/app_error_spec.rb +53 -0
- data/spec/models/application_item_data_spec.rb +59 -0
- data/spec/models/attribute_data_spec.rb +93 -0
- data/spec/models/attribute_option_spec.rb +53 -0
- data/spec/models/attributes_spec.rb +53 -0
- data/spec/models/auth_error_spec.rb +47 -0
- data/spec/models/author_spec.rb +57 -0
- data/spec/models/buy_project_item_spec.rb +65 -0
- data/spec/models/buy_project_response_spec.rb +47 -0
- data/spec/models/buy_project_spec.rb +53 -0
- data/spec/models/buy_projects_payload_spec.rb +35 -0
- data/spec/models/categories_spec.rb +53 -0
- data/spec/models/category_data_spec.rb +47 -0
- data/spec/models/code_payload_spec.rb +59 -0
- data/spec/models/countries_spec.rb +53 -0
- data/spec/models/country_data_spec.rb +59 -0
- data/spec/models/create_line_item_spec.rb +53 -0
- data/spec/models/end_links_spec.rb +75 -0
- data/spec/models/error_type_spec.rb +47 -0
- data/spec/models/event_data_spec.rb +83 -0
- data/spec/models/event_list_data_spec.rb +83 -0
- data/spec/models/event_spec.rb +53 -0
- data/spec/models/events_spec.rb +53 -0
- data/spec/models/exclusion_data_spec.rb +47 -0
- data/spec/models/feasibility_data_spec.rb +77 -0
- data/spec/models/feasibility_response_data_spec.rb +47 -0
- data/spec/models/feasibility_spec.rb +53 -0
- data/spec/models/line_item_action_response_spec.rb +77 -0
- data/spec/models/line_item_data_spec.rb +129 -0
- data/spec/models/line_item_item_data_spec.rb +99 -0
- data/spec/models/line_item_report_data_spec.rb +147 -0
- data/spec/models/line_item_response_data_spec.rb +159 -0
- data/spec/models/line_items_spec.rb +53 -0
- data/spec/models/links_spec.rb +65 -0
- data/spec/models/logout_payload_spec.rb +53 -0
- data/spec/models/meta_spec.rb +53 -0
- data/spec/models/project_action_response_spec.rb +71 -0
- data/spec/models/project_action_spec.rb +53 -0
- data/spec/models/project_category_data_spec.rb +41 -0
- data/spec/models/project_item_data_spec.rb +81 -0
- data/spec/models/project_report_data_spec.rb +123 -0
- data/spec/models/project_report_spec.rb +53 -0
- data/spec/models/project_reports_spec.rb +53 -0
- data/spec/models/project_response_data_spec.rb +107 -0
- data/spec/models/project_response_spec.rb +53 -0
- data/spec/models/project_spec.rb +77 -0
- data/spec/models/project_survey_end_links_data_spec.rb +69 -0
- data/spec/models/project_survey_end_links_spec.rb +53 -0
- data/spec/models/projects_spec.rb +53 -0
- data/spec/models/quota_cell_feasibility_spec.rb +47 -0
- data/spec/models/quota_cell_spec.rb +53 -0
- data/spec/models/quota_group_data_spec.rb +47 -0
- data/spec/models/quota_group_feasibility_spec.rb +41 -0
- data/spec/models/quota_plan_data_spec.rb +47 -0
- data/spec/models/reconcile_data_spec.rb +35 -0
- data/spec/models/reconcile_spec.rb +53 -0
- data/spec/models/refresh_token_payload_spec.rb +53 -0
- data/spec/models/reprice_data_spec.rb +125 -0
- data/spec/models/reprice_payload_spec.rb +113 -0
- data/spec/models/reprice_spec.rb +53 -0
- data/spec/models/status_spec.rb +47 -0
- data/spec/models/supported_language_spec.rb +53 -0
- data/spec/models/survey_end_links_spec.rb +53 -0
- data/spec/models/survey_test_id_spec.rb +53 -0
- data/spec/models/survey_test_link_spec.rb +47 -0
- data/spec/models/target_spec.rb +63 -0
- data/spec/models/targeting_attribute_spec.rb +53 -0
- data/spec/models/token_media_spec.rb +59 -0
- data/spec/models/token_payload_spec.rb +59 -0
- data/spec/models/update_line_item_spec.rb +123 -0
- data/spec/models/update_project_data_spec.rb +71 -0
- data/spec/models/update_project_line_item_spec.rb +129 -0
- data/spec/models/url_param_spec.rb +47 -0
- data/spec/models/user_info_response_data_spec.rb +53 -0
- data/spec/models/user_info_spec.rb +53 -0
- data/spec/spec_helper.rb +111 -0
- metadata +585 -0
@@ -0,0 +1,660 @@
|
|
1
|
+
=begin
|
2
|
+
#Samplify API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module SamplifyAPIClient
|
16
|
+
class ProjectsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# buy projects
|
23
|
+
# @param ext_project_id
|
24
|
+
# @param payload
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [BuyProject]
|
27
|
+
def projects_buy(ext_project_id, payload, opts = {})
|
28
|
+
data, _status_code, _headers = projects_buy_with_http_info(ext_project_id, payload, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# buy projects
|
33
|
+
# @param ext_project_id
|
34
|
+
# @param payload
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(BuyProject, Fixnum, Hash)>] BuyProject data, response status code and response headers
|
37
|
+
def projects_buy_with_http_info(ext_project_id, payload, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_buy ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'ext_project_id' is set
|
42
|
+
if @api_client.config.client_side_validation && ext_project_id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling ProjectsApi.projects_buy"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'payload' is set
|
46
|
+
if @api_client.config.client_side_validation && payload.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'payload' when calling ProjectsApi.projects_buy"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/sample/v1/projects/{extProjectId}/buy'.sub('{' + 'extProjectId' + '}', ext_project_id.to_s)
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.buyproject+json'])
|
59
|
+
# HTTP header 'Content-Type'
|
60
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = {}
|
64
|
+
|
65
|
+
# http body (model)
|
66
|
+
post_body = @api_client.object_to_http_body(payload)
|
67
|
+
auth_names = ['jwt']
|
68
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => 'BuyProject')
|
75
|
+
if @api_client.config.debugging
|
76
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_buy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
77
|
+
end
|
78
|
+
return data, status_code, headers
|
79
|
+
end
|
80
|
+
# close projects
|
81
|
+
# @param ext_project_id
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @return [ProjectAction]
|
84
|
+
def projects_close(ext_project_id, opts = {})
|
85
|
+
data, _status_code, _headers = projects_close_with_http_info(ext_project_id, opts)
|
86
|
+
data
|
87
|
+
end
|
88
|
+
|
89
|
+
# close projects
|
90
|
+
# @param ext_project_id
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(ProjectAction, Fixnum, Hash)>] ProjectAction data, response status code and response headers
|
93
|
+
def projects_close_with_http_info(ext_project_id, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_close ...'
|
96
|
+
end
|
97
|
+
# verify the required parameter 'ext_project_id' is set
|
98
|
+
if @api_client.config.client_side_validation && ext_project_id.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling ProjectsApi.projects_close"
|
100
|
+
end
|
101
|
+
# resource path
|
102
|
+
local_var_path = '/sample/v1/projects/{extProjectId}/close'.sub('{' + 'extProjectId' + '}', ext_project_id.to_s)
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = {}
|
106
|
+
|
107
|
+
# header parameters
|
108
|
+
header_params = {}
|
109
|
+
# HTTP header 'Accept' (if needed)
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.project.action+json'])
|
111
|
+
# HTTP header 'Content-Type'
|
112
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
113
|
+
|
114
|
+
# form parameters
|
115
|
+
form_params = {}
|
116
|
+
|
117
|
+
# http body (model)
|
118
|
+
post_body = nil
|
119
|
+
auth_names = ['jwt']
|
120
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
121
|
+
:header_params => header_params,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body,
|
125
|
+
:auth_names => auth_names,
|
126
|
+
:return_type => 'ProjectAction')
|
127
|
+
if @api_client.config.debugging
|
128
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_close\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
129
|
+
end
|
130
|
+
return data, status_code, headers
|
131
|
+
end
|
132
|
+
# create projects
|
133
|
+
# @param payload
|
134
|
+
# @param [Hash] opts the optional parameters
|
135
|
+
# @return [ProjectResponse]
|
136
|
+
def projects_create(payload, opts = {})
|
137
|
+
data, _status_code, _headers = projects_create_with_http_info(payload, opts)
|
138
|
+
data
|
139
|
+
end
|
140
|
+
|
141
|
+
# create projects
|
142
|
+
# @param payload
|
143
|
+
# @param [Hash] opts the optional parameters
|
144
|
+
# @return [Array<(ProjectResponse, Fixnum, Hash)>] ProjectResponse data, response status code and response headers
|
145
|
+
def projects_create_with_http_info(payload, opts = {})
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_create ...'
|
148
|
+
end
|
149
|
+
# verify the required parameter 'payload' is set
|
150
|
+
if @api_client.config.client_side_validation && payload.nil?
|
151
|
+
fail ArgumentError, "Missing the required parameter 'payload' when calling ProjectsApi.projects_create"
|
152
|
+
end
|
153
|
+
# resource path
|
154
|
+
local_var_path = '/sample/v1/projects'
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = {}
|
158
|
+
|
159
|
+
# header parameters
|
160
|
+
header_params = {}
|
161
|
+
# HTTP header 'Accept' (if needed)
|
162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.create+json'])
|
163
|
+
# HTTP header 'Content-Type'
|
164
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
165
|
+
|
166
|
+
# form parameters
|
167
|
+
form_params = {}
|
168
|
+
|
169
|
+
# http body (model)
|
170
|
+
post_body = @api_client.object_to_http_body(payload)
|
171
|
+
auth_names = ['jwt']
|
172
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
173
|
+
:header_params => header_params,
|
174
|
+
:query_params => query_params,
|
175
|
+
:form_params => form_params,
|
176
|
+
:body => post_body,
|
177
|
+
:auth_names => auth_names,
|
178
|
+
:return_type => 'ProjectResponse')
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
181
|
+
end
|
182
|
+
return data, status_code, headers
|
183
|
+
end
|
184
|
+
# get projects
|
185
|
+
# @param ext_project_id
|
186
|
+
# @param [Hash] opts the optional parameters
|
187
|
+
# @return [ProjectResponse]
|
188
|
+
def projects_get(ext_project_id, opts = {})
|
189
|
+
data, _status_code, _headers = projects_get_with_http_info(ext_project_id, opts)
|
190
|
+
data
|
191
|
+
end
|
192
|
+
|
193
|
+
# get projects
|
194
|
+
# @param ext_project_id
|
195
|
+
# @param [Hash] opts the optional parameters
|
196
|
+
# @return [Array<(ProjectResponse, Fixnum, Hash)>] ProjectResponse data, response status code and response headers
|
197
|
+
def projects_get_with_http_info(ext_project_id, opts = {})
|
198
|
+
if @api_client.config.debugging
|
199
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_get ...'
|
200
|
+
end
|
201
|
+
# verify the required parameter 'ext_project_id' is set
|
202
|
+
if @api_client.config.client_side_validation && ext_project_id.nil?
|
203
|
+
fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling ProjectsApi.projects_get"
|
204
|
+
end
|
205
|
+
# resource path
|
206
|
+
local_var_path = '/sample/v1/projects/{extProjectId}'.sub('{' + 'extProjectId' + '}', ext_project_id.to_s)
|
207
|
+
|
208
|
+
# query parameters
|
209
|
+
query_params = {}
|
210
|
+
|
211
|
+
# header parameters
|
212
|
+
header_params = {}
|
213
|
+
# HTTP header 'Accept' (if needed)
|
214
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.create+json'])
|
215
|
+
# HTTP header 'Content-Type'
|
216
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
217
|
+
|
218
|
+
# form parameters
|
219
|
+
form_params = {}
|
220
|
+
|
221
|
+
# http body (model)
|
222
|
+
post_body = nil
|
223
|
+
auth_names = ['jwt']
|
224
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
225
|
+
:header_params => header_params,
|
226
|
+
:query_params => query_params,
|
227
|
+
:form_params => form_params,
|
228
|
+
:body => post_body,
|
229
|
+
:auth_names => auth_names,
|
230
|
+
:return_type => 'ProjectResponse')
|
231
|
+
if @api_client.config.debugging
|
232
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
233
|
+
end
|
234
|
+
return data, status_code, headers
|
235
|
+
end
|
236
|
+
# getReport projects
|
237
|
+
# @param ext_project_id
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [ProjectReport]
|
240
|
+
def projects_get_report(ext_project_id, opts = {})
|
241
|
+
data, _status_code, _headers = projects_get_report_with_http_info(ext_project_id, opts)
|
242
|
+
data
|
243
|
+
end
|
244
|
+
|
245
|
+
# getReport projects
|
246
|
+
# @param ext_project_id
|
247
|
+
# @param [Hash] opts the optional parameters
|
248
|
+
# @return [Array<(ProjectReport, Fixnum, Hash)>] ProjectReport data, response status code and response headers
|
249
|
+
def projects_get_report_with_http_info(ext_project_id, opts = {})
|
250
|
+
if @api_client.config.debugging
|
251
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_get_report ...'
|
252
|
+
end
|
253
|
+
# verify the required parameter 'ext_project_id' is set
|
254
|
+
if @api_client.config.client_side_validation && ext_project_id.nil?
|
255
|
+
fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling ProjectsApi.projects_get_report"
|
256
|
+
end
|
257
|
+
# resource path
|
258
|
+
local_var_path = '/sample/v1/projects/{extProjectId}/report'.sub('{' + 'extProjectId' + '}', ext_project_id.to_s)
|
259
|
+
|
260
|
+
# query parameters
|
261
|
+
query_params = {}
|
262
|
+
|
263
|
+
# header parameters
|
264
|
+
header_params = {}
|
265
|
+
# HTTP header 'Accept' (if needed)
|
266
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.projects.report+json'])
|
267
|
+
# HTTP header 'Content-Type'
|
268
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
269
|
+
|
270
|
+
# form parameters
|
271
|
+
form_params = {}
|
272
|
+
|
273
|
+
# http body (model)
|
274
|
+
post_body = nil
|
275
|
+
auth_names = ['jwt']
|
276
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
277
|
+
:header_params => header_params,
|
278
|
+
:query_params => query_params,
|
279
|
+
:form_params => form_params,
|
280
|
+
:body => post_body,
|
281
|
+
:auth_names => auth_names,
|
282
|
+
:return_type => 'ProjectReport')
|
283
|
+
if @api_client.config.debugging
|
284
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_get_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
285
|
+
end
|
286
|
+
return data, status_code, headers
|
287
|
+
end
|
288
|
+
# getReports projects
|
289
|
+
# @param ext_project_id Only return project with the given external project ID
|
290
|
+
# @param [Hash] opts the optional parameters
|
291
|
+
# @return [ProjectReports]
|
292
|
+
def projects_get_reports(ext_project_id, opts = {})
|
293
|
+
data, _status_code, _headers = projects_get_reports_with_http_info(ext_project_id, opts)
|
294
|
+
data
|
295
|
+
end
|
296
|
+
|
297
|
+
# getReports projects
|
298
|
+
# @param ext_project_id Only return project with the given external project ID
|
299
|
+
# @param [Hash] opts the optional parameters
|
300
|
+
# @return [Array<(ProjectReports, Fixnum, Hash)>] ProjectReports data, response status code and response headers
|
301
|
+
def projects_get_reports_with_http_info(ext_project_id, opts = {})
|
302
|
+
if @api_client.config.debugging
|
303
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_get_reports ...'
|
304
|
+
end
|
305
|
+
# verify the required parameter 'ext_project_id' is set
|
306
|
+
if @api_client.config.client_side_validation && ext_project_id.nil?
|
307
|
+
fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling ProjectsApi.projects_get_reports"
|
308
|
+
end
|
309
|
+
# resource path
|
310
|
+
local_var_path = '/sample/v1/projects/report'
|
311
|
+
|
312
|
+
# query parameters
|
313
|
+
query_params = {}
|
314
|
+
query_params[:'extProjectId'] = ext_project_id
|
315
|
+
|
316
|
+
# header parameters
|
317
|
+
header_params = {}
|
318
|
+
# HTTP header 'Accept' (if needed)
|
319
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.projects.reports+json'])
|
320
|
+
# HTTP header 'Content-Type'
|
321
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
322
|
+
|
323
|
+
# form parameters
|
324
|
+
form_params = {}
|
325
|
+
|
326
|
+
# http body (model)
|
327
|
+
post_body = nil
|
328
|
+
auth_names = ['jwt']
|
329
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
330
|
+
:header_params => header_params,
|
331
|
+
:query_params => query_params,
|
332
|
+
:form_params => form_params,
|
333
|
+
:body => post_body,
|
334
|
+
:auth_names => auth_names,
|
335
|
+
:return_type => 'ProjectReports')
|
336
|
+
if @api_client.config.debugging
|
337
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_get_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
338
|
+
end
|
339
|
+
return data, status_code, headers
|
340
|
+
end
|
341
|
+
# getSurveyEndLinks projects
|
342
|
+
# @param ext_project_id
|
343
|
+
# @param survey_id
|
344
|
+
# @param [Hash] opts the optional parameters
|
345
|
+
# @return [ProjectSurveyEndLinks]
|
346
|
+
def projects_get_survey_end_links(ext_project_id, survey_id, opts = {})
|
347
|
+
data, _status_code, _headers = projects_get_survey_end_links_with_http_info(ext_project_id, survey_id, opts)
|
348
|
+
data
|
349
|
+
end
|
350
|
+
|
351
|
+
# getSurveyEndLinks projects
|
352
|
+
# @param ext_project_id
|
353
|
+
# @param survey_id
|
354
|
+
# @param [Hash] opts the optional parameters
|
355
|
+
# @return [Array<(ProjectSurveyEndLinks, Fixnum, Hash)>] ProjectSurveyEndLinks data, response status code and response headers
|
356
|
+
def projects_get_survey_end_links_with_http_info(ext_project_id, survey_id, opts = {})
|
357
|
+
if @api_client.config.debugging
|
358
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_get_survey_end_links ...'
|
359
|
+
end
|
360
|
+
# verify the required parameter 'ext_project_id' is set
|
361
|
+
if @api_client.config.client_side_validation && ext_project_id.nil?
|
362
|
+
fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling ProjectsApi.projects_get_survey_end_links"
|
363
|
+
end
|
364
|
+
# verify the required parameter 'survey_id' is set
|
365
|
+
if @api_client.config.client_side_validation && survey_id.nil?
|
366
|
+
fail ArgumentError, "Missing the required parameter 'survey_id' when calling ProjectsApi.projects_get_survey_end_links"
|
367
|
+
end
|
368
|
+
# resource path
|
369
|
+
local_var_path = '/sample/v1/projects/{extProjectId}/surveys/{surveyId}/links'.sub('{' + 'extProjectId' + '}', ext_project_id.to_s).sub('{' + 'surveyId' + '}', survey_id.to_s)
|
370
|
+
|
371
|
+
# query parameters
|
372
|
+
query_params = {}
|
373
|
+
|
374
|
+
# header parameters
|
375
|
+
header_params = {}
|
376
|
+
# HTTP header 'Accept' (if needed)
|
377
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.projects.survey.endlinks+json'])
|
378
|
+
# HTTP header 'Content-Type'
|
379
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
380
|
+
|
381
|
+
# form parameters
|
382
|
+
form_params = {}
|
383
|
+
|
384
|
+
# http body (model)
|
385
|
+
post_body = nil
|
386
|
+
auth_names = ['jwt']
|
387
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
388
|
+
:header_params => header_params,
|
389
|
+
:query_params => query_params,
|
390
|
+
:form_params => form_params,
|
391
|
+
:body => post_body,
|
392
|
+
:auth_names => auth_names,
|
393
|
+
:return_type => 'ProjectSurveyEndLinks')
|
394
|
+
if @api_client.config.debugging
|
395
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_get_survey_end_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
396
|
+
end
|
397
|
+
return data, status_code, headers
|
398
|
+
end
|
399
|
+
# invoices projects
|
400
|
+
# @param ext_project_id
|
401
|
+
# @param [Hash] opts the optional parameters
|
402
|
+
# @return [nil]
|
403
|
+
def projects_invoices(ext_project_id, opts = {})
|
404
|
+
projects_invoices_with_http_info(ext_project_id, opts)
|
405
|
+
nil
|
406
|
+
end
|
407
|
+
|
408
|
+
# invoices projects
|
409
|
+
# @param ext_project_id
|
410
|
+
# @param [Hash] opts the optional parameters
|
411
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
412
|
+
def projects_invoices_with_http_info(ext_project_id, opts = {})
|
413
|
+
if @api_client.config.debugging
|
414
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_invoices ...'
|
415
|
+
end
|
416
|
+
# verify the required parameter 'ext_project_id' is set
|
417
|
+
if @api_client.config.client_side_validation && ext_project_id.nil?
|
418
|
+
fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling ProjectsApi.projects_invoices"
|
419
|
+
end
|
420
|
+
# resource path
|
421
|
+
local_var_path = '/sample/v1/projects/{extProjectId}/invoices'.sub('{' + 'extProjectId' + '}', ext_project_id.to_s)
|
422
|
+
|
423
|
+
# query parameters
|
424
|
+
query_params = {}
|
425
|
+
|
426
|
+
# header parameters
|
427
|
+
header_params = {}
|
428
|
+
# HTTP header 'Accept' (if needed)
|
429
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.app.error+json', 'text/plain'])
|
430
|
+
# HTTP header 'Content-Type'
|
431
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
432
|
+
|
433
|
+
# form parameters
|
434
|
+
form_params = {}
|
435
|
+
|
436
|
+
# http body (model)
|
437
|
+
post_body = nil
|
438
|
+
auth_names = ['jwt']
|
439
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
440
|
+
:header_params => header_params,
|
441
|
+
:query_params => query_params,
|
442
|
+
:form_params => form_params,
|
443
|
+
:body => post_body,
|
444
|
+
:auth_names => auth_names)
|
445
|
+
if @api_client.config.debugging
|
446
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
447
|
+
end
|
448
|
+
return data, status_code, headers
|
449
|
+
end
|
450
|
+
# list projects
|
451
|
+
# @param [Hash] opts the optional parameters
|
452
|
+
# @option opts [String] :created_at return projects with createdAt start date
|
453
|
+
# @option opts [String] :ext_project_id Only return project with the given external project id
|
454
|
+
# @option opts [Integer] :limit Maximum number of projects to return (default to 10)
|
455
|
+
# @option opts [Integer] :offset The first zero-based offset project to return (default to 0)
|
456
|
+
# @option opts [String] :scope Only return projects within the given scope
|
457
|
+
# @option opts [Array<String>] :sort Sort the projects by the given key(s)
|
458
|
+
# @option opts [String] :state Only return projects with the given state
|
459
|
+
# @option opts [String] :title Only return projects with the given title
|
460
|
+
# @return [Projects]
|
461
|
+
def projects_list(opts = {})
|
462
|
+
data, _status_code, _headers = projects_list_with_http_info(opts)
|
463
|
+
data
|
464
|
+
end
|
465
|
+
|
466
|
+
# list projects
|
467
|
+
# @param [Hash] opts the optional parameters
|
468
|
+
# @option opts [String] :created_at return projects with createdAt start date
|
469
|
+
# @option opts [String] :ext_project_id Only return project with the given external project id
|
470
|
+
# @option opts [Integer] :limit Maximum number of projects to return
|
471
|
+
# @option opts [Integer] :offset The first zero-based offset project to return
|
472
|
+
# @option opts [String] :scope Only return projects within the given scope
|
473
|
+
# @option opts [Array<String>] :sort Sort the projects by the given key(s)
|
474
|
+
# @option opts [String] :state Only return projects with the given state
|
475
|
+
# @option opts [String] :title Only return projects with the given title
|
476
|
+
# @return [Array<(Projects, Fixnum, Hash)>] Projects data, response status code and response headers
|
477
|
+
def projects_list_with_http_info(opts = {})
|
478
|
+
if @api_client.config.debugging
|
479
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_list ...'
|
480
|
+
end
|
481
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
|
482
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProjectsApi.projects_list, must be smaller than or equal to 1000.'
|
483
|
+
end
|
484
|
+
|
485
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
486
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProjectsApi.projects_list, must be greater than or equal to 1.'
|
487
|
+
end
|
488
|
+
|
489
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
490
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ProjectsApi.projects_list, must be greater than or equal to 0.'
|
491
|
+
end
|
492
|
+
|
493
|
+
if @api_client.config.client_side_validation && opts[:'scope'] && !['application', 'user'].include?(opts[:'scope'])
|
494
|
+
fail ArgumentError, 'invalid value for "scope", must be one of application, user'
|
495
|
+
end
|
496
|
+
# resource path
|
497
|
+
local_var_path = '/sample/v1/projects'
|
498
|
+
|
499
|
+
# query parameters
|
500
|
+
query_params = {}
|
501
|
+
query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil?
|
502
|
+
query_params[:'extProjectId'] = opts[:'ext_project_id'] if !opts[:'ext_project_id'].nil?
|
503
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
504
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
505
|
+
query_params[:'scope'] = opts[:'scope'] if !opts[:'scope'].nil?
|
506
|
+
query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?
|
507
|
+
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
|
508
|
+
query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
|
509
|
+
|
510
|
+
# header parameters
|
511
|
+
header_params = {}
|
512
|
+
# HTTP header 'Accept' (if needed)
|
513
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.projects+json'])
|
514
|
+
# HTTP header 'Content-Type'
|
515
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
516
|
+
|
517
|
+
# form parameters
|
518
|
+
form_params = {}
|
519
|
+
|
520
|
+
# http body (model)
|
521
|
+
post_body = nil
|
522
|
+
auth_names = ['jwt']
|
523
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
524
|
+
:header_params => header_params,
|
525
|
+
:query_params => query_params,
|
526
|
+
:form_params => form_params,
|
527
|
+
:body => post_body,
|
528
|
+
:auth_names => auth_names,
|
529
|
+
:return_type => 'Projects')
|
530
|
+
if @api_client.config.debugging
|
531
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
532
|
+
end
|
533
|
+
return data, status_code, headers
|
534
|
+
end
|
535
|
+
# reconcile projects
|
536
|
+
# @param ext_project_id
|
537
|
+
# @param file File
|
538
|
+
# @param message Message
|
539
|
+
# @param [Hash] opts the optional parameters
|
540
|
+
# @return [Reconcile]
|
541
|
+
def projects_reconcile(ext_project_id, file, message, opts = {})
|
542
|
+
data, _status_code, _headers = projects_reconcile_with_http_info(ext_project_id, file, message, opts)
|
543
|
+
data
|
544
|
+
end
|
545
|
+
|
546
|
+
# reconcile projects
|
547
|
+
# @param ext_project_id
|
548
|
+
# @param file File
|
549
|
+
# @param message Message
|
550
|
+
# @param [Hash] opts the optional parameters
|
551
|
+
# @return [Array<(Reconcile, Fixnum, Hash)>] Reconcile data, response status code and response headers
|
552
|
+
def projects_reconcile_with_http_info(ext_project_id, file, message, opts = {})
|
553
|
+
if @api_client.config.debugging
|
554
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_reconcile ...'
|
555
|
+
end
|
556
|
+
# verify the required parameter 'ext_project_id' is set
|
557
|
+
if @api_client.config.client_side_validation && ext_project_id.nil?
|
558
|
+
fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling ProjectsApi.projects_reconcile"
|
559
|
+
end
|
560
|
+
# verify the required parameter 'file' is set
|
561
|
+
if @api_client.config.client_side_validation && file.nil?
|
562
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling ProjectsApi.projects_reconcile"
|
563
|
+
end
|
564
|
+
# verify the required parameter 'message' is set
|
565
|
+
if @api_client.config.client_side_validation && message.nil?
|
566
|
+
fail ArgumentError, "Missing the required parameter 'message' when calling ProjectsApi.projects_reconcile"
|
567
|
+
end
|
568
|
+
# resource path
|
569
|
+
local_var_path = '/sample/v1/projects/{extProjectId}/reconcile'.sub('{' + 'extProjectId' + '}', ext_project_id.to_s)
|
570
|
+
|
571
|
+
# query parameters
|
572
|
+
query_params = {}
|
573
|
+
|
574
|
+
# header parameters
|
575
|
+
header_params = {}
|
576
|
+
# HTTP header 'Accept' (if needed)
|
577
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.app.error+json', 'application/vnd.projects.reconcile+json'])
|
578
|
+
# HTTP header 'Content-Type'
|
579
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
580
|
+
|
581
|
+
# form parameters
|
582
|
+
form_params = {}
|
583
|
+
form_params['file'] = file
|
584
|
+
form_params['message'] = message
|
585
|
+
|
586
|
+
# http body (model)
|
587
|
+
post_body = nil
|
588
|
+
auth_names = ['jwt']
|
589
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
590
|
+
:header_params => header_params,
|
591
|
+
:query_params => query_params,
|
592
|
+
:form_params => form_params,
|
593
|
+
:body => post_body,
|
594
|
+
:auth_names => auth_names,
|
595
|
+
:return_type => 'Reconcile')
|
596
|
+
if @api_client.config.debugging
|
597
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_reconcile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
598
|
+
end
|
599
|
+
return data, status_code, headers
|
600
|
+
end
|
601
|
+
# update projects
|
602
|
+
# @param ext_project_id
|
603
|
+
# @param payload
|
604
|
+
# @param [Hash] opts the optional parameters
|
605
|
+
# @return [ProjectResponse]
|
606
|
+
def projects_update(ext_project_id, payload, opts = {})
|
607
|
+
data, _status_code, _headers = projects_update_with_http_info(ext_project_id, payload, opts)
|
608
|
+
data
|
609
|
+
end
|
610
|
+
|
611
|
+
# update projects
|
612
|
+
# @param ext_project_id
|
613
|
+
# @param payload
|
614
|
+
# @param [Hash] opts the optional parameters
|
615
|
+
# @return [Array<(ProjectResponse, Fixnum, Hash)>] ProjectResponse data, response status code and response headers
|
616
|
+
def projects_update_with_http_info(ext_project_id, payload, opts = {})
|
617
|
+
if @api_client.config.debugging
|
618
|
+
@api_client.config.logger.debug 'Calling API: ProjectsApi.projects_update ...'
|
619
|
+
end
|
620
|
+
# verify the required parameter 'ext_project_id' is set
|
621
|
+
if @api_client.config.client_side_validation && ext_project_id.nil?
|
622
|
+
fail ArgumentError, "Missing the required parameter 'ext_project_id' when calling ProjectsApi.projects_update"
|
623
|
+
end
|
624
|
+
# verify the required parameter 'payload' is set
|
625
|
+
if @api_client.config.client_side_validation && payload.nil?
|
626
|
+
fail ArgumentError, "Missing the required parameter 'payload' when calling ProjectsApi.projects_update"
|
627
|
+
end
|
628
|
+
# resource path
|
629
|
+
local_var_path = '/sample/v1/projects/{extProjectId}'.sub('{' + 'extProjectId' + '}', ext_project_id.to_s)
|
630
|
+
|
631
|
+
# query parameters
|
632
|
+
query_params = {}
|
633
|
+
|
634
|
+
# header parameters
|
635
|
+
header_params = {}
|
636
|
+
# HTTP header 'Accept' (if needed)
|
637
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.create+json'])
|
638
|
+
# HTTP header 'Content-Type'
|
639
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
640
|
+
|
641
|
+
# form parameters
|
642
|
+
form_params = {}
|
643
|
+
|
644
|
+
# http body (model)
|
645
|
+
post_body = @api_client.object_to_http_body(payload)
|
646
|
+
auth_names = ['jwt']
|
647
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
648
|
+
:header_params => header_params,
|
649
|
+
:query_params => query_params,
|
650
|
+
:form_params => form_params,
|
651
|
+
:body => post_body,
|
652
|
+
:auth_names => auth_names,
|
653
|
+
:return_type => 'ProjectResponse')
|
654
|
+
if @api_client.config.debugging
|
655
|
+
@api_client.config.logger.debug "API called: ProjectsApi#projects_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
656
|
+
end
|
657
|
+
return data, status_code, headers
|
658
|
+
end
|
659
|
+
end
|
660
|
+
end
|