/** * 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 { AttendeeGroupVM } from '../model/attendeeGroupVM'; import { AttendeeRefundVM } from '../model/attendeeRefundVM'; import { AttendeeVM } from '../model/attendeeVM'; import { CreateAttendeeVM } from '../model/createAttendeeVM'; import { MessageVM } from '../model/messageVM'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; @Injectable() export class EventAttendeeService { 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 orgId * @param eventid * @param newMessage * @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 eventAttendeeContactAttendees(orgId: number, eventid: number, newMessage: MessageVM, observe?: 'body', reportProgress?: boolean): Observable; public eventAttendeeContactAttendees(orgId: number, eventid: number, newMessage: MessageVM, observe?: 'response', reportProgress?: boolean): Observable>; public eventAttendeeContactAttendees(orgId: number, eventid: number, newMessage: MessageVM, observe?: 'events', reportProgress?: boolean): Observable>; public eventAttendeeContactAttendees(orgId: number, eventid: number, newMessage: MessageVM, observe: any = 'body', reportProgress: boolean = false ): Observable { if (orgId === null || orgId === undefined) { throw new Error('Required parameter orgId was null or undefined when calling eventAttendeeContactAttendees.'); } if (eventid === null || eventid === undefined) { throw new Error('Required parameter eventid was null or undefined when calling eventAttendeeContactAttendees.'); } if (newMessage === null || newMessage === undefined) { throw new Error('Required parameter newMessage was null or undefined when calling eventAttendeeContactAttendees.'); } 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/organisation/${encodeURIComponent(String(orgId))}/event/${encodeURIComponent(String(eventid))}/attendee/contact`, newMessage, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param orgId * @param eventId * @param id * @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 eventAttendeeGetAttendee(orgId: number, eventId: number, id: number, observe?: 'body', reportProgress?: boolean): Observable; public eventAttendeeGetAttendee(orgId: number, eventId: number, id: number, observe?: 'response', reportProgress?: boolean): Observable>; public eventAttendeeGetAttendee(orgId: number, eventId: number, id: number, observe?: 'events', reportProgress?: boolean): Observable>; public eventAttendeeGetAttendee(orgId: number, eventId: number, id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (orgId === null || orgId === undefined) { throw new Error('Required parameter orgId was null or undefined when calling eventAttendeeGetAttendee.'); } if (eventId === null || eventId === undefined) { throw new Error('Required parameter eventId was null or undefined when calling eventAttendeeGetAttendee.'); } if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling eventAttendeeGetAttendee.'); } 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/organisation/${encodeURIComponent(String(orgId))}/event/${encodeURIComponent(String(eventId))}/attendee/${encodeURIComponent(String(id))}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param orgId * @param eventId * @param searchModel_free_text * @param searchModel_ticket_id * @param searchModel_guestlist_id * @param searchModel_checked_in * @param searchModel_total_available * @param searchModel_current_checkin_count * @param searchModel_total_checkin_count * @param searchModel_checkout_count * @param searchModel_total_attendees * @param searchModel_eventDate * @param searchModel_total_records * @param searchModel_haveSearch * @param searchModel_order_by * @param searchModel_pageSize * @param searchModel_pageNumber * @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 eventAttendeeGetAttendees(orgId: number, eventId: number, searchModel_free_text?: string, searchModel_ticket_id?: string, searchModel_guestlist_id?: string, searchModel_checked_in?: boolean, searchModel_total_available?: number, searchModel_current_checkin_count?: number, searchModel_total_checkin_count?: number, searchModel_checkout_count?: number, searchModel_total_attendees?: number, searchModel_eventDate?: Date, searchModel_total_records?: number, searchModel_haveSearch?: boolean, searchModel_order_by?: string, searchModel_pageSize?: number, searchModel_pageNumber?: number, observe?: 'body', reportProgress?: boolean): Observable; public eventAttendeeGetAttendees(orgId: number, eventId: number, searchModel_free_text?: string, searchModel_ticket_id?: string, searchModel_guestlist_id?: string, searchModel_checked_in?: boolean, searchModel_total_available?: number, searchModel_current_checkin_count?: number, searchModel_total_checkin_count?: number, searchModel_checkout_count?: number, searchModel_total_attendees?: number, searchModel_eventDate?: Date, searchModel_total_records?: number, searchModel_haveSearch?: boolean, searchModel_order_by?: string, searchModel_pageSize?: number, searchModel_pageNumber?: number, observe?: 'response', reportProgress?: boolean): Observable>; public eventAttendeeGetAttendees(orgId: number, eventId: number, searchModel_free_text?: string, searchModel_ticket_id?: string, searchModel_guestlist_id?: string, searchModel_checked_in?: boolean, searchModel_total_available?: number, searchModel_current_checkin_count?: number, searchModel_total_checkin_count?: number, searchModel_checkout_count?: number, searchModel_total_attendees?: number, searchModel_eventDate?: Date, searchModel_total_records?: number, searchModel_haveSearch?: boolean, searchModel_order_by?: string, searchModel_pageSize?: number, searchModel_pageNumber?: number, observe?: 'events', reportProgress?: boolean): Observable>; public eventAttendeeGetAttendees(orgId: number, eventId: number, searchModel_free_text?: string, searchModel_ticket_id?: string, searchModel_guestlist_id?: string, searchModel_checked_in?: boolean, searchModel_total_available?: number, searchModel_current_checkin_count?: number, searchModel_total_checkin_count?: number, searchModel_checkout_count?: number, searchModel_total_attendees?: number, searchModel_eventDate?: Date, searchModel_total_records?: number, searchModel_haveSearch?: boolean, searchModel_order_by?: string, searchModel_pageSize?: number, searchModel_pageNumber?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (orgId === null || orgId === undefined) { throw new Error('Required parameter orgId was null or undefined when calling eventAttendeeGetAttendees.'); } if (eventId === null || eventId === undefined) { throw new Error('Required parameter eventId was null or undefined when calling eventAttendeeGetAttendees.'); } let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); if (searchModel_free_text !== undefined) { queryParameters = queryParameters.set('searchModel.free_text', searchModel_free_text); } if (searchModel_ticket_id !== undefined) { queryParameters = queryParameters.set('searchModel.ticket_id', searchModel_ticket_id); } if (searchModel_guestlist_id !== undefined) { queryParameters = queryParameters.set('searchModel.guestlist_id', searchModel_guestlist_id); } if (searchModel_checked_in !== undefined) { queryParameters = queryParameters.set('searchModel.checked_in', searchModel_checked_in); } if (searchModel_total_available !== undefined) { queryParameters = queryParameters.set('searchModel.total_available', searchModel_total_available); } if (searchModel_current_checkin_count !== undefined) { queryParameters = queryParameters.set('searchModel.current_checkin_count', searchModel_current_checkin_count); } if (searchModel_total_checkin_count !== undefined) { queryParameters = queryParameters.set('searchModel.total_checkin_count', searchModel_total_checkin_count); } if (searchModel_checkout_count !== undefined) { queryParameters = queryParameters.set('searchModel.checkout_count', searchModel_checkout_count); } if (searchModel_total_attendees !== undefined) { queryParameters = queryParameters.set('searchModel.total_attendees', searchModel_total_attendees); } if (searchModel_eventDate !== undefined) { queryParameters = queryParameters.set('searchModel.eventDate', searchModel_eventDate.toISOString()); } if (searchModel_total_records !== undefined) { queryParameters = queryParameters.set('searchModel.total_records', searchModel_total_records); } if (searchModel_haveSearch !== undefined) { queryParameters = queryParameters.set('searchModel.haveSearch', searchModel_haveSearch); } if (searchModel_order_by !== undefined) { queryParameters = queryParameters.set('searchModel.order_by', searchModel_order_by); } if (searchModel_pageSize !== undefined) { queryParameters = queryParameters.set('searchModel.pageSize', searchModel_pageSize); } if (searchModel_pageNumber !== undefined) { queryParameters = queryParameters.set('searchModel.pageNumber', searchModel_pageNumber); } 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/organisation/${encodeURIComponent(String(orgId))}/event/${encodeURIComponent(String(eventId))}/attendee`, { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param orgId * @param eventid * @param newAttendee * @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 eventAttendeePostAttendee(orgId: number, eventid: number, newAttendee: CreateAttendeeVM, observe?: 'body', reportProgress?: boolean): Observable; public eventAttendeePostAttendee(orgId: number, eventid: number, newAttendee: CreateAttendeeVM, observe?: 'response', reportProgress?: boolean): Observable>; public eventAttendeePostAttendee(orgId: number, eventid: number, newAttendee: CreateAttendeeVM, observe?: 'events', reportProgress?: boolean): Observable>; public eventAttendeePostAttendee(orgId: number, eventid: number, newAttendee: CreateAttendeeVM, observe: any = 'body', reportProgress: boolean = false ): Observable { if (orgId === null || orgId === undefined) { throw new Error('Required parameter orgId was null or undefined when calling eventAttendeePostAttendee.'); } if (eventid === null || eventid === undefined) { throw new Error('Required parameter eventid was null or undefined when calling eventAttendeePostAttendee.'); } if (newAttendee === null || newAttendee === undefined) { throw new Error('Required parameter newAttendee was null or undefined when calling eventAttendeePostAttendee.'); } 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/organisation/${encodeURIComponent(String(orgId))}/event/${encodeURIComponent(String(eventid))}/attendee`, newAttendee, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param orgId * @param eventId * @param id * @param attendee * @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 eventAttendeePutAttendee(orgId: number, eventId: number, id: number, attendee: AttendeeVM, observe?: 'body', reportProgress?: boolean): Observable; public eventAttendeePutAttendee(orgId: number, eventId: number, id: number, attendee: AttendeeVM, observe?: 'response', reportProgress?: boolean): Observable>; public eventAttendeePutAttendee(orgId: number, eventId: number, id: number, attendee: AttendeeVM, observe?: 'events', reportProgress?: boolean): Observable>; public eventAttendeePutAttendee(orgId: number, eventId: number, id: number, attendee: AttendeeVM, observe: any = 'body', reportProgress: boolean = false ): Observable { if (orgId === null || orgId === undefined) { throw new Error('Required parameter orgId was null or undefined when calling eventAttendeePutAttendee.'); } if (eventId === null || eventId === undefined) { throw new Error('Required parameter eventId was null or undefined when calling eventAttendeePutAttendee.'); } if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling eventAttendeePutAttendee.'); } if (attendee === null || attendee === undefined) { throw new Error('Required parameter attendee was null or undefined when calling eventAttendeePutAttendee.'); } 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.put(`${this.basePath}/account/organisation/${encodeURIComponent(String(orgId))}/event/${encodeURIComponent(String(eventId))}/attendee/${encodeURIComponent(String(id))}`, attendee, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * * @param orgId * @param eventId * @param id * @param attendeeRefund * @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 eventAttendeeRefundAttendee(orgId: number, eventId: number, id: number, attendeeRefund: AttendeeRefundVM, observe?: 'body', reportProgress?: boolean): Observable; public eventAttendeeRefundAttendee(orgId: number, eventId: number, id: number, attendeeRefund: AttendeeRefundVM, observe?: 'response', reportProgress?: boolean): Observable>; public eventAttendeeRefundAttendee(orgId: number, eventId: number, id: number, attendeeRefund: AttendeeRefundVM, observe?: 'events', reportProgress?: boolean): Observable>; public eventAttendeeRefundAttendee(orgId: number, eventId: number, id: number, attendeeRefund: AttendeeRefundVM, observe: any = 'body', reportProgress: boolean = false ): Observable { if (orgId === null || orgId === undefined) { throw new Error('Required parameter orgId was null or undefined when calling eventAttendeeRefundAttendee.'); } if (eventId === null || eventId === undefined) { throw new Error('Required parameter eventId was null or undefined when calling eventAttendeeRefundAttendee.'); } if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling eventAttendeeRefundAttendee.'); } if (attendeeRefund === null || attendeeRefund === undefined) { throw new Error('Required parameter attendeeRefund was null or undefined when calling eventAttendeeRefundAttendee.'); } 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.put(`${this.basePath}/account/organisation/${encodeURIComponent(String(orgId))}/event/${encodeURIComponent(String(eventId))}/attendee/${encodeURIComponent(String(id))}/refund`, attendeeRefund, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } }