|
| 1 | +/** |
| 2 | + * HelloAsso API |
| 3 | + * HelloAsso auto-generated SDK |
| 4 | + * |
| 5 | + * The version of the OpenAPI document: public |
| 6 | + * |
| 7 | + * |
| 8 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 9 | + * https://openapi-generator.tech |
| 10 | + * Do not edit the class manually. |
| 11 | + * |
| 12 | + */ |
| 13 | + |
| 14 | + |
| 15 | +import ApiClient from "../ApiClient"; |
| 16 | +import HelloAssoApiV5ModelsOrganizationsOrganizationPublicConfigurationModel from '../model/HelloAssoApiV5ModelsOrganizationsOrganizationPublicConfigurationModel'; |
| 17 | +import HelloAssoApiV5ModelsOrganizationsOrganizationPublicConfigurationsRequest from '../model/HelloAssoApiV5ModelsOrganizationsOrganizationPublicConfigurationsRequest'; |
| 18 | + |
| 19 | +/** |
| 20 | +* OrganizationPublicConfigurations service. |
| 21 | +* @module api/OrganizationPublicConfigurationsApi |
| 22 | +* @version public |
| 23 | +*/ |
| 24 | +export default class OrganizationPublicConfigurationsApi { |
| 25 | + |
| 26 | + /** |
| 27 | + * Constructs a new OrganizationPublicConfigurationsApi. |
| 28 | + * @alias module:api/OrganizationPublicConfigurationsApi |
| 29 | + * @class |
| 30 | + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, |
| 31 | + * default to {@link module:ApiClient#instance} if unspecified. |
| 32 | + */ |
| 33 | + constructor(apiClient) { |
| 34 | + this.apiClient = apiClient || ApiClient.instance; |
| 35 | + } |
| 36 | + |
| 37 | + |
| 38 | + /** |
| 39 | + * Callback function to receive the result of the organizationsOrganizationSlugConfigurationsGet operation. |
| 40 | + * @callback module:api/OrganizationPublicConfigurationsApi~organizationsOrganizationSlugConfigurationsGetCallback |
| 41 | + * @param {String} error Error message, if any. |
| 42 | + * @param {Array.<module:model/HelloAssoApiV5ModelsOrganizationsOrganizationPublicConfigurationModel>} data The data returned by the service call. |
| 43 | + * @param {String} response The complete HTTP response. |
| 44 | + */ |
| 45 | + |
| 46 | + /** |
| 47 | + * <br/><br/><b>Your token must have one of these roles : </b><br/>OrganizationAdmin<br/><br/>If you are an <b>association</b>, you can obtain these roles with your client.<br/>If you are a <b>partner</b>, you can obtain these roles by the authorize flow.<br/><br/><b>Your clientId must be allowed all of those privileges : </b> <br/> OrganizationAdministration<br/><br/> |
| 48 | + * @param {String} organizationSlug |
| 49 | + * @param {module:api/OrganizationPublicConfigurationsApi~organizationsOrganizationSlugConfigurationsGetCallback} callback The callback function, accepting three arguments: error, data, response |
| 50 | + * data is of type: {@link Array.<module:model/HelloAssoApiV5ModelsOrganizationsOrganizationPublicConfigurationModel>} |
| 51 | + */ |
| 52 | + organizationsOrganizationSlugConfigurationsGet(organizationSlug, callback) { |
| 53 | + let postBody = null; |
| 54 | + // verify the required parameter 'organizationSlug' is set |
| 55 | + if (organizationSlug === undefined || organizationSlug === null) { |
| 56 | + throw new Error("Missing the required parameter 'organizationSlug' when calling organizationsOrganizationSlugConfigurationsGet"); |
| 57 | + } |
| 58 | + |
| 59 | + let pathParams = { |
| 60 | + 'organizationSlug': organizationSlug |
| 61 | + }; |
| 62 | + let queryParams = { |
| 63 | + }; |
| 64 | + let headerParams = { |
| 65 | + }; |
| 66 | + let formParams = { |
| 67 | + }; |
| 68 | + |
| 69 | + let authNames = []; |
| 70 | + let contentTypes = []; |
| 71 | + let accepts = ['text/plain', 'application/json', 'text/json']; |
| 72 | + let returnType = [HelloAssoApiV5ModelsOrganizationsOrganizationPublicConfigurationModel]; |
| 73 | + return this.apiClient.callApi( |
| 74 | + '/organizations/{organizationSlug}/configurations', 'GET', |
| 75 | + pathParams, queryParams, headerParams, formParams, postBody, |
| 76 | + authNames, contentTypes, accepts, returnType, null, callback |
| 77 | + ); |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * Callback function to receive the result of the organizationsOrganizationSlugConfigurationsPut operation. |
| 82 | + * @callback module:api/OrganizationPublicConfigurationsApi~organizationsOrganizationSlugConfigurationsPutCallback |
| 83 | + * @param {String} error Error message, if any. |
| 84 | + * @param data This operation does not return a value. |
| 85 | + * @param {String} response The complete HTTP response. |
| 86 | + */ |
| 87 | + |
| 88 | + /** |
| 89 | + * <br/><br/><b>Your token must have one of these roles : </b><br/>OrganizationAdmin<br/><br/>If you are an <b>association</b>, you can obtain these roles with your client.<br/>If you are a <b>partner</b>, you can obtain these roles by the authorize flow.<br/><br/><b>Your clientId must be allowed all of those privileges : </b> <br/> OrganizationAdministration<br/><br/> |
| 90 | + * @param {String} organizationSlug |
| 91 | + * @param {Object} opts Optional parameters |
| 92 | + * @param {module:model/HelloAssoApiV5ModelsOrganizationsOrganizationPublicConfigurationsRequest} [helloAssoApiV5ModelsOrganizationsOrganizationPublicConfigurationsRequest] |
| 93 | + * @param {module:api/OrganizationPublicConfigurationsApi~organizationsOrganizationSlugConfigurationsPutCallback} callback The callback function, accepting three arguments: error, data, response |
| 94 | + */ |
| 95 | + organizationsOrganizationSlugConfigurationsPut(organizationSlug, opts, callback) { |
| 96 | + opts = opts || {}; |
| 97 | + let postBody = opts['helloAssoApiV5ModelsOrganizationsOrganizationPublicConfigurationsRequest']; |
| 98 | + // verify the required parameter 'organizationSlug' is set |
| 99 | + if (organizationSlug === undefined || organizationSlug === null) { |
| 100 | + throw new Error("Missing the required parameter 'organizationSlug' when calling organizationsOrganizationSlugConfigurationsPut"); |
| 101 | + } |
| 102 | + |
| 103 | + let pathParams = { |
| 104 | + 'organizationSlug': organizationSlug |
| 105 | + }; |
| 106 | + let queryParams = { |
| 107 | + }; |
| 108 | + let headerParams = { |
| 109 | + }; |
| 110 | + let formParams = { |
| 111 | + }; |
| 112 | + |
| 113 | + let authNames = []; |
| 114 | + let contentTypes = ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']; |
| 115 | + let accepts = []; |
| 116 | + let returnType = null; |
| 117 | + return this.apiClient.callApi( |
| 118 | + '/organizations/{organizationSlug}/configurations', 'PUT', |
| 119 | + pathParams, queryParams, headerParams, formParams, postBody, |
| 120 | + authNames, contentTypes, accepts, returnType, null, callback |
| 121 | + ); |
| 122 | + } |
| 123 | + |
| 124 | + |
| 125 | +} |
0 commit comments