samplify_api_client 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 +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,99 @@
|
|
|
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 CountriesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# list countries
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @option opts [String] :country_name Only return countries with the given name
|
|
25
|
+
# @option opts [String] :id Only return countries with the given id
|
|
26
|
+
# @option opts [String] :iso_code Only return countries with the given ISO code
|
|
27
|
+
# @option opts [Integer] :limit Maximum number of countries to return (default to 10)
|
|
28
|
+
# @option opts [Integer] :offset The first zero-based offset country to return (default to 0)
|
|
29
|
+
# @option opts [Array<String>] :sort Sort the countries by the given key(s)
|
|
30
|
+
# @return [Countries]
|
|
31
|
+
def countries_list(opts = {})
|
|
32
|
+
data, _status_code, _headers = countries_list_with_http_info(opts)
|
|
33
|
+
data
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# list countries
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @option opts [String] :country_name Only return countries with the given name
|
|
39
|
+
# @option opts [String] :id Only return countries with the given id
|
|
40
|
+
# @option opts [String] :iso_code Only return countries with the given ISO code
|
|
41
|
+
# @option opts [Integer] :limit Maximum number of countries to return
|
|
42
|
+
# @option opts [Integer] :offset The first zero-based offset country to return
|
|
43
|
+
# @option opts [Array<String>] :sort Sort the countries by the given key(s)
|
|
44
|
+
# @return [Array<(Countries, Fixnum, Hash)>] Countries data, response status code and response headers
|
|
45
|
+
def countries_list_with_http_info(opts = {})
|
|
46
|
+
if @api_client.config.debugging
|
|
47
|
+
@api_client.config.logger.debug 'Calling API: CountriesApi.countries_list ...'
|
|
48
|
+
end
|
|
49
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
|
|
50
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CountriesApi.countries_list, must be smaller than or equal to 1000.'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
54
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CountriesApi.countries_list, must be greater than or equal to 1.'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
58
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling CountriesApi.countries_list, must be greater than or equal to 0.'
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# resource path
|
|
62
|
+
local_var_path = '/sample/v1/countries'
|
|
63
|
+
|
|
64
|
+
# query parameters
|
|
65
|
+
query_params = {}
|
|
66
|
+
query_params[:'countryName'] = opts[:'country_name'] if !opts[:'country_name'].nil?
|
|
67
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
68
|
+
query_params[:'isoCode'] = opts[:'iso_code'] if !opts[:'iso_code'].nil?
|
|
69
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
70
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
71
|
+
query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?
|
|
72
|
+
|
|
73
|
+
# header parameters
|
|
74
|
+
header_params = {}
|
|
75
|
+
# HTTP header 'Accept' (if needed)
|
|
76
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.countries+json'])
|
|
77
|
+
# HTTP header 'Content-Type'
|
|
78
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
|
79
|
+
|
|
80
|
+
# form parameters
|
|
81
|
+
form_params = {}
|
|
82
|
+
|
|
83
|
+
# http body (model)
|
|
84
|
+
post_body = nil
|
|
85
|
+
auth_names = ['jwt']
|
|
86
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
87
|
+
:header_params => header_params,
|
|
88
|
+
:query_params => query_params,
|
|
89
|
+
:form_params => form_params,
|
|
90
|
+
:body => post_body,
|
|
91
|
+
:auth_names => auth_names,
|
|
92
|
+
:return_type => 'Countries')
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug "API called: CountriesApi#countries_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,115 @@
|
|
|
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 DefaultApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Download public/swagger/swagger.json
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [File]
|
|
25
|
+
def swaggerswagger_json(opts = {})
|
|
26
|
+
data, _status_code, _headers = swaggerswagger_json_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Download public/swagger/swagger.json
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
|
33
|
+
def swaggerswagger_json_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.swaggerswagger_json ...'
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/swagger.json'
|
|
39
|
+
|
|
40
|
+
# query parameters
|
|
41
|
+
query_params = {}
|
|
42
|
+
|
|
43
|
+
# header parameters
|
|
44
|
+
header_params = {}
|
|
45
|
+
# HTTP header 'Accept' (if needed)
|
|
46
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
|
47
|
+
# HTTP header 'Content-Type'
|
|
48
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = nil
|
|
55
|
+
auth_names = []
|
|
56
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
57
|
+
:header_params => header_params,
|
|
58
|
+
:query_params => query_params,
|
|
59
|
+
:form_params => form_params,
|
|
60
|
+
:body => post_body,
|
|
61
|
+
:auth_names => auth_names,
|
|
62
|
+
:return_type => 'File')
|
|
63
|
+
if @api_client.config.debugging
|
|
64
|
+
@api_client.config.logger.debug "API called: DefaultApi#swaggerswagger_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
65
|
+
end
|
|
66
|
+
return data, status_code, headers
|
|
67
|
+
end
|
|
68
|
+
# Download public/swagger/swagger.yaml
|
|
69
|
+
# @param [Hash] opts the optional parameters
|
|
70
|
+
# @return [File]
|
|
71
|
+
def swaggerswagger_yaml(opts = {})
|
|
72
|
+
data, _status_code, _headers = swaggerswagger_yaml_with_http_info(opts)
|
|
73
|
+
data
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Download public/swagger/swagger.yaml
|
|
77
|
+
# @param [Hash] opts the optional parameters
|
|
78
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
|
79
|
+
def swaggerswagger_yaml_with_http_info(opts = {})
|
|
80
|
+
if @api_client.config.debugging
|
|
81
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.swaggerswagger_yaml ...'
|
|
82
|
+
end
|
|
83
|
+
# resource path
|
|
84
|
+
local_var_path = '/swagger.yaml'
|
|
85
|
+
|
|
86
|
+
# query parameters
|
|
87
|
+
query_params = {}
|
|
88
|
+
|
|
89
|
+
# header parameters
|
|
90
|
+
header_params = {}
|
|
91
|
+
# HTTP header 'Accept' (if needed)
|
|
92
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
|
93
|
+
# HTTP header 'Content-Type'
|
|
94
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
|
95
|
+
|
|
96
|
+
# form parameters
|
|
97
|
+
form_params = {}
|
|
98
|
+
|
|
99
|
+
# http body (model)
|
|
100
|
+
post_body = nil
|
|
101
|
+
auth_names = []
|
|
102
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
103
|
+
:header_params => header_params,
|
|
104
|
+
:query_params => query_params,
|
|
105
|
+
:form_params => form_params,
|
|
106
|
+
:body => post_body,
|
|
107
|
+
:auth_names => auth_names,
|
|
108
|
+
:return_type => 'File')
|
|
109
|
+
if @api_client.config.debugging
|
|
110
|
+
@api_client.config.logger.debug "API called: DefaultApi#swaggerswagger_yaml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
111
|
+
end
|
|
112
|
+
return data, status_code, headers
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
@@ -0,0 +1,317 @@
|
|
|
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 EventsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# accept events
|
|
23
|
+
# Accept event
|
|
24
|
+
# @param event_id Event ID
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Event]
|
|
27
|
+
def events_accept(event_id, opts = {})
|
|
28
|
+
data, _status_code, _headers = events_accept_with_http_info(event_id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# accept events
|
|
33
|
+
# Accept event
|
|
34
|
+
# @param event_id Event ID
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Event, Fixnum, Hash)>] Event data, response status code and response headers
|
|
37
|
+
def events_accept_with_http_info(event_id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_accept ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'event_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && event_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.events_accept"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/sample/v1/events/{eventId}/accept'.sub('{' + 'eventId' + '}', event_id.to_s)
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.event+json'])
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
|
57
|
+
|
|
58
|
+
# form parameters
|
|
59
|
+
form_params = {}
|
|
60
|
+
|
|
61
|
+
# http body (model)
|
|
62
|
+
post_body = nil
|
|
63
|
+
auth_names = ['jwt']
|
|
64
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => 'Event')
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: EventsApi#events_accept\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
# get events
|
|
77
|
+
# Get event
|
|
78
|
+
# @param event_id Event ID
|
|
79
|
+
# @param [Hash] opts the optional parameters
|
|
80
|
+
# @return [Event]
|
|
81
|
+
def events_get(event_id, opts = {})
|
|
82
|
+
data, _status_code, _headers = events_get_with_http_info(event_id, opts)
|
|
83
|
+
data
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# get events
|
|
87
|
+
# Get event
|
|
88
|
+
# @param event_id Event ID
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @return [Array<(Event, Fixnum, Hash)>] Event data, response status code and response headers
|
|
91
|
+
def events_get_with_http_info(event_id, opts = {})
|
|
92
|
+
if @api_client.config.debugging
|
|
93
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_get ...'
|
|
94
|
+
end
|
|
95
|
+
# verify the required parameter 'event_id' is set
|
|
96
|
+
if @api_client.config.client_side_validation && event_id.nil?
|
|
97
|
+
fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.events_get"
|
|
98
|
+
end
|
|
99
|
+
# resource path
|
|
100
|
+
local_var_path = '/sample/v1/events/{eventId}'.sub('{' + 'eventId' + '}', event_id.to_s)
|
|
101
|
+
|
|
102
|
+
# query parameters
|
|
103
|
+
query_params = {}
|
|
104
|
+
|
|
105
|
+
# header parameters
|
|
106
|
+
header_params = {}
|
|
107
|
+
# HTTP header 'Accept' (if needed)
|
|
108
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.event+json'])
|
|
109
|
+
# HTTP header 'Content-Type'
|
|
110
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
|
111
|
+
|
|
112
|
+
# form parameters
|
|
113
|
+
form_params = {}
|
|
114
|
+
|
|
115
|
+
# http body (model)
|
|
116
|
+
post_body = nil
|
|
117
|
+
auth_names = ['jwt']
|
|
118
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
119
|
+
:header_params => header_params,
|
|
120
|
+
:query_params => query_params,
|
|
121
|
+
:form_params => form_params,
|
|
122
|
+
:body => post_body,
|
|
123
|
+
:auth_names => auth_names,
|
|
124
|
+
:return_type => 'Event')
|
|
125
|
+
if @api_client.config.debugging
|
|
126
|
+
@api_client.config.logger.debug "API called: EventsApi#events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
127
|
+
end
|
|
128
|
+
return data, status_code, headers
|
|
129
|
+
end
|
|
130
|
+
# list events
|
|
131
|
+
# List events.
|
|
132
|
+
# @param [Hash] opts the optional parameters
|
|
133
|
+
# @option opts [String] :event_type Only return events with the given eventType
|
|
134
|
+
# @option opts [String] :ext_line_item_id Only return events with the given external line item id
|
|
135
|
+
# @option opts [String] :ext_project_id Only return events with the given external project id
|
|
136
|
+
# @option opts [Integer] :limit Maximum number of events to return (default to 10)
|
|
137
|
+
# @option opts [Integer] :offset The first zero-based offset event to return (default to 0)
|
|
138
|
+
# @option opts [Array<String>] :sort Sort the events by the given key(s)
|
|
139
|
+
# @return [Events]
|
|
140
|
+
def events_list(opts = {})
|
|
141
|
+
data, _status_code, _headers = events_list_with_http_info(opts)
|
|
142
|
+
data
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# list events
|
|
146
|
+
# List events.
|
|
147
|
+
# @param [Hash] opts the optional parameters
|
|
148
|
+
# @option opts [String] :event_type Only return events with the given eventType
|
|
149
|
+
# @option opts [String] :ext_line_item_id Only return events with the given external line item id
|
|
150
|
+
# @option opts [String] :ext_project_id Only return events with the given external project id
|
|
151
|
+
# @option opts [Integer] :limit Maximum number of events to return
|
|
152
|
+
# @option opts [Integer] :offset The first zero-based offset event to return
|
|
153
|
+
# @option opts [Array<String>] :sort Sort the events by the given key(s)
|
|
154
|
+
# @return [Array<(Events, Fixnum, Hash)>] Events data, response status code and response headers
|
|
155
|
+
def events_list_with_http_info(opts = {})
|
|
156
|
+
if @api_client.config.debugging
|
|
157
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_list ...'
|
|
158
|
+
end
|
|
159
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
160
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EventsApi.events_list, must be smaller than or equal to 100.'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
164
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EventsApi.events_list, must be greater than or equal to 1.'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
168
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling EventsApi.events_list, must be greater than or equal to 0.'
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# resource path
|
|
172
|
+
local_var_path = '/sample/v1/events'
|
|
173
|
+
|
|
174
|
+
# query parameters
|
|
175
|
+
query_params = {}
|
|
176
|
+
query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil?
|
|
177
|
+
query_params[:'extLineItemId'] = opts[:'ext_line_item_id'] if !opts[:'ext_line_item_id'].nil?
|
|
178
|
+
query_params[:'extProjectId'] = opts[:'ext_project_id'] if !opts[:'ext_project_id'].nil?
|
|
179
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
180
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
181
|
+
query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?
|
|
182
|
+
|
|
183
|
+
# header parameters
|
|
184
|
+
header_params = {}
|
|
185
|
+
# HTTP header 'Accept' (if needed)
|
|
186
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.events+json'])
|
|
187
|
+
# HTTP header 'Content-Type'
|
|
188
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
|
189
|
+
|
|
190
|
+
# form parameters
|
|
191
|
+
form_params = {}
|
|
192
|
+
|
|
193
|
+
# http body (model)
|
|
194
|
+
post_body = nil
|
|
195
|
+
auth_names = ['jwt']
|
|
196
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
197
|
+
:header_params => header_params,
|
|
198
|
+
:query_params => query_params,
|
|
199
|
+
:form_params => form_params,
|
|
200
|
+
:body => post_body,
|
|
201
|
+
:auth_names => auth_names,
|
|
202
|
+
:return_type => 'Events')
|
|
203
|
+
if @api_client.config.debugging
|
|
204
|
+
@api_client.config.logger.debug "API called: EventsApi#events_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
205
|
+
end
|
|
206
|
+
return data, status_code, headers
|
|
207
|
+
end
|
|
208
|
+
# reject events
|
|
209
|
+
# Reject event
|
|
210
|
+
# @param event_id Event ID
|
|
211
|
+
# @param [Hash] opts the optional parameters
|
|
212
|
+
# @return [Event]
|
|
213
|
+
def events_reject(event_id, opts = {})
|
|
214
|
+
data, _status_code, _headers = events_reject_with_http_info(event_id, opts)
|
|
215
|
+
data
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# reject events
|
|
219
|
+
# Reject event
|
|
220
|
+
# @param event_id Event ID
|
|
221
|
+
# @param [Hash] opts the optional parameters
|
|
222
|
+
# @return [Array<(Event, Fixnum, Hash)>] Event data, response status code and response headers
|
|
223
|
+
def events_reject_with_http_info(event_id, opts = {})
|
|
224
|
+
if @api_client.config.debugging
|
|
225
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_reject ...'
|
|
226
|
+
end
|
|
227
|
+
# verify the required parameter 'event_id' is set
|
|
228
|
+
if @api_client.config.client_side_validation && event_id.nil?
|
|
229
|
+
fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.events_reject"
|
|
230
|
+
end
|
|
231
|
+
# resource path
|
|
232
|
+
local_var_path = '/sample/v1/events/{eventId}/reject'.sub('{' + 'eventId' + '}', event_id.to_s)
|
|
233
|
+
|
|
234
|
+
# query parameters
|
|
235
|
+
query_params = {}
|
|
236
|
+
|
|
237
|
+
# header parameters
|
|
238
|
+
header_params = {}
|
|
239
|
+
# HTTP header 'Accept' (if needed)
|
|
240
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.event+json'])
|
|
241
|
+
# HTTP header 'Content-Type'
|
|
242
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
|
243
|
+
|
|
244
|
+
# form parameters
|
|
245
|
+
form_params = {}
|
|
246
|
+
|
|
247
|
+
# http body (model)
|
|
248
|
+
post_body = nil
|
|
249
|
+
auth_names = ['jwt']
|
|
250
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
251
|
+
:header_params => header_params,
|
|
252
|
+
:query_params => query_params,
|
|
253
|
+
:form_params => form_params,
|
|
254
|
+
:body => post_body,
|
|
255
|
+
:auth_names => auth_names,
|
|
256
|
+
:return_type => 'Event')
|
|
257
|
+
if @api_client.config.debugging
|
|
258
|
+
@api_client.config.logger.debug "API called: EventsApi#events_reject\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
259
|
+
end
|
|
260
|
+
return data, status_code, headers
|
|
261
|
+
end
|
|
262
|
+
# reprice events
|
|
263
|
+
# Line item repricing event.
|
|
264
|
+
# @param payload
|
|
265
|
+
# @param [Hash] opts the optional parameters
|
|
266
|
+
# @return [Reprice]
|
|
267
|
+
def events_reprice(payload, opts = {})
|
|
268
|
+
data, _status_code, _headers = events_reprice_with_http_info(payload, opts)
|
|
269
|
+
data
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# reprice events
|
|
273
|
+
# Line item repricing event.
|
|
274
|
+
# @param payload
|
|
275
|
+
# @param [Hash] opts the optional parameters
|
|
276
|
+
# @return [Array<(Reprice, Fixnum, Hash)>] Reprice data, response status code and response headers
|
|
277
|
+
def events_reprice_with_http_info(payload, opts = {})
|
|
278
|
+
if @api_client.config.debugging
|
|
279
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_reprice ...'
|
|
280
|
+
end
|
|
281
|
+
# verify the required parameter 'payload' is set
|
|
282
|
+
if @api_client.config.client_side_validation && payload.nil?
|
|
283
|
+
fail ArgumentError, "Missing the required parameter 'payload' when calling EventsApi.events_reprice"
|
|
284
|
+
end
|
|
285
|
+
# resource path
|
|
286
|
+
local_var_path = '/sample/v1/events/lineItems/reprice'
|
|
287
|
+
|
|
288
|
+
# query parameters
|
|
289
|
+
query_params = {}
|
|
290
|
+
|
|
291
|
+
# header parameters
|
|
292
|
+
header_params = {}
|
|
293
|
+
# HTTP header 'Accept' (if needed)
|
|
294
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.reprice+json'])
|
|
295
|
+
# HTTP header 'Content-Type'
|
|
296
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])
|
|
297
|
+
|
|
298
|
+
# form parameters
|
|
299
|
+
form_params = {}
|
|
300
|
+
|
|
301
|
+
# http body (model)
|
|
302
|
+
post_body = @api_client.object_to_http_body(payload)
|
|
303
|
+
auth_names = []
|
|
304
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
305
|
+
:header_params => header_params,
|
|
306
|
+
:query_params => query_params,
|
|
307
|
+
:form_params => form_params,
|
|
308
|
+
:body => post_body,
|
|
309
|
+
:auth_names => auth_names,
|
|
310
|
+
:return_type => 'Reprice')
|
|
311
|
+
if @api_client.config.debugging
|
|
312
|
+
@api_client.config.logger.debug "API called: EventsApi#events_reprice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
313
|
+
end
|
|
314
|
+
return data, status_code, headers
|
|
315
|
+
end
|
|
316
|
+
end
|
|
317
|
+
end
|