/** * Innertickets API * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: v1 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent } from '@angular/common/http'; import { CustomHttpUrlEncodingCodec } from '../encoder'; import { Observable } from 'rxjs/Observable'; import { GroupVMAPIFlagVM } from '../model/groupVMAPIFlagVM'; import { LoginBindingModel } from '../model/loginBindingModel'; import { Me } from '../model/me'; import { UserStatsVM } from '../model/userStatsVM'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; @Injectable() export class AccountService { protected basePath = 'https://api.innertickets.com'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (basePath) { this.basePath = basePath; } if (configuration) { this.configuration = configuration; this.basePath = basePath || configuration.basePath || this.basePath; } } /** * @param consumes string[] mime-types * @return true: consumes contains 'multipart/form-data', false: otherwise */ private canConsumeForm(consumes: string[]): boolean { const form = 'multipart/form-data'; for (let consume of consumes) { if (form === consume) { return true; } } return false; } /** * * * @param returnUrl * @param a * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public accountAuthForm(returnUrl?: string, a?: string, observe?: 'body', reportProgress?: boolean): Observable; public accountAuthForm(returnUrl?: string, a?: string, observe?: 'response', reportProgress?: boolean): Observable>; public accountAuthForm(returnUrl?: string, a?: string, observe?: 'events', reportProgress?: boolean): Observable>; public accountAuthForm(returnUrl?: string, a?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); if (returnUrl !== undefined) { queryParameters = queryParameters.set('returnUrl', returnUrl); } if (a !== undefined) { queryParameters = queryParameters.set('a', a); } let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json', 'text/json', 'application/xml', 'text/xml' ]; let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set("Accept", httpHeaderAcceptSelected); } // to determine the Content-Type header let consumes: string[] = [ ]; return this.httpClient.get(`${this.basePath}/account/AuthForm`, { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public accountFindFlags(observe?: 'body', reportProgress?: boolean): Observable; public accountFindFlags(observe?: 'response', reportProgress?: boolean): Observable>; public accountFindFlags(observe?: 'events', reportProgress?: boolean): Observable>; public accountFindFlags(observe: any = 'body', reportProgress: boolean = false ): Observable { let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json', 'text/json', 'application/xml', 'text/xml' ]; let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set("Accept", httpHeaderAcceptSelected); } // to determine the Content-Type header let consumes: string[] = [ ]; return this.httpClient.get(`${this.basePath}/account/flag`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public accountMe(observe?: 'body', reportProgress?: boolean): Observable; public accountMe(observe?: 'response', reportProgress?: boolean): Observable>; public accountMe(observe?: 'events', reportProgress?: boolean): Observable>; public accountMe(observe: any = 'body', reportProgress: boolean = false ): Observable { let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json', 'text/json', 'application/xml', 'text/xml' ]; let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set("Accept", httpHeaderAcceptSelected); } // to determine the Content-Type header let consumes: string[] = [ ]; return this.httpClient.get(`${this.basePath}/account/me`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param model * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public accountPostAuthForm(model: LoginBindingModel, observe?: 'body', reportProgress?: boolean): Observable; public accountPostAuthForm(model: LoginBindingModel, observe?: 'response', reportProgress?: boolean): Observable>; public accountPostAuthForm(model: LoginBindingModel, observe?: 'events', reportProgress?: boolean): Observable>; public accountPostAuthForm(model: LoginBindingModel, observe: any = 'body', reportProgress: boolean = false ): Observable { if (model === null || model === undefined) { throw new Error('Required parameter model was null or undefined when calling accountPostAuthForm.'); } let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json', 'text/json', 'application/xml', 'text/xml' ]; let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set("Accept", httpHeaderAcceptSelected); } // to determine the Content-Type header let consumes: string[] = [ 'application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded' ]; let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers = headers.set("Content-Type", httpContentTypeSelected); } return this.httpClient.post(`${this.basePath}/account/AuthForm`, model, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param model * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public accountPostGuestForm(model: LoginBindingModel, observe?: 'body', reportProgress?: boolean): Observable; public accountPostGuestForm(model: LoginBindingModel, observe?: 'response', reportProgress?: boolean): Observable>; public accountPostGuestForm(model: LoginBindingModel, observe?: 'events', reportProgress?: boolean): Observable>; public accountPostGuestForm(model: LoginBindingModel, observe: any = 'body', reportProgress: boolean = false ): Observable { if (model === null || model === undefined) { throw new Error('Required parameter model was null or undefined when calling accountPostGuestForm.'); } let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json', 'text/json', 'application/xml', 'text/xml' ]; let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set("Accept", httpHeaderAcceptSelected); } // to determine the Content-Type header let consumes: string[] = [ 'application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded' ]; let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers = headers.set("Content-Type", httpContentTypeSelected); } return this.httpClient.post(`${this.basePath}/account/GuestForm`, model, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param t * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public accountRequestToken(t: string, observe?: 'body', reportProgress?: boolean): Observable; public accountRequestToken(t: string, observe?: 'response', reportProgress?: boolean): Observable>; public accountRequestToken(t: string, observe?: 'events', reportProgress?: boolean): Observable>; public accountRequestToken(t: string, observe: any = 'body', reportProgress: boolean = false ): Observable { if (t === null || t === undefined) { throw new Error('Required parameter t was null or undefined when calling accountRequestToken.'); } let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); if (t !== undefined) { queryParameters = queryParameters.set('t', t); } let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json', 'text/json', 'application/xml', 'text/xml' ]; let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set("Accept", httpHeaderAcceptSelected); } // to determine the Content-Type header let consumes: string[] = [ ]; return this.httpClient.get(`${this.basePath}/account/RequestToken`, { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param filter_from * @param filter_to * @param filter_includeTicketSales * @param filter_includePromoSales * @param filter_includeManualSales * @param filter_includeSystemSales * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public accountStats(filter_from?: Date, filter_to?: Date, filter_includeTicketSales?: boolean, filter_includePromoSales?: boolean, filter_includeManualSales?: boolean, filter_includeSystemSales?: boolean, observe?: 'body', reportProgress?: boolean): Observable; public accountStats(filter_from?: Date, filter_to?: Date, filter_includeTicketSales?: boolean, filter_includePromoSales?: boolean, filter_includeManualSales?: boolean, filter_includeSystemSales?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; public accountStats(filter_from?: Date, filter_to?: Date, filter_includeTicketSales?: boolean, filter_includePromoSales?: boolean, filter_includeManualSales?: boolean, filter_includeSystemSales?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; public accountStats(filter_from?: Date, filter_to?: Date, filter_includeTicketSales?: boolean, filter_includePromoSales?: boolean, filter_includeManualSales?: boolean, filter_includeSystemSales?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); if (filter_from !== undefined) { queryParameters = queryParameters.set('filter.from', filter_from.toISOString()); } if (filter_to !== undefined) { queryParameters = queryParameters.set('filter.to', filter_to.toISOString()); } if (filter_includeTicketSales !== undefined) { queryParameters = queryParameters.set('filter.includeTicketSales', filter_includeTicketSales); } if (filter_includePromoSales !== undefined) { queryParameters = queryParameters.set('filter.includePromoSales', filter_includePromoSales); } if (filter_includeManualSales !== undefined) { queryParameters = queryParameters.set('filter.includeManualSales', filter_includeManualSales); } if (filter_includeSystemSales !== undefined) { queryParameters = queryParameters.set('filter.includeSystemSales', filter_includeSystemSales); } let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json', 'text/json', 'application/xml', 'text/xml' ]; let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set("Accept", httpHeaderAcceptSelected); } // to determine the Content-Type header let consumes: string[] = [ ]; return this.httpClient.get(`${this.basePath}/account/stats`, { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } }