/** * Magento Community * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 2.2 * * * 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 { CustomerDataAttributeMetadataInterface } from '../model/customerDataAttributeMetadataInterface'; import { ErrorResponse } from '../model/errorResponse'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; @Injectable() export class CustomerAddressMetadataV1Service { protected basePath = 'http://shop.sergiofabbri.com/rest'; 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; } /** * * Get all attribute metadata. * @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 customerAddressMetadataV1GetAllAttributesMetadataGet(observe?: 'body', reportProgress?: boolean): Observable>; public customerAddressMetadataV1GetAllAttributesMetadataGet(observe?: 'response', reportProgress?: boolean): Observable>>; public customerAddressMetadataV1GetAllAttributesMetadataGet(observe?: 'events', reportProgress?: boolean): Observable>>; public customerAddressMetadataV1GetAllAttributesMetadataGet(observe: any = 'body', reportProgress: boolean = false ): Observable { let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ ]; 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}/V1/attributeMetadata/customerAddress`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * Retrieve attribute metadata. * @param attributeCode * @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 customerAddressMetadataV1GetAttributeMetadataGet(attributeCode: string, observe?: 'body', reportProgress?: boolean): Observable; public customerAddressMetadataV1GetAttributeMetadataGet(attributeCode: string, observe?: 'response', reportProgress?: boolean): Observable>; public customerAddressMetadataV1GetAttributeMetadataGet(attributeCode: string, observe?: 'events', reportProgress?: boolean): Observable>; public customerAddressMetadataV1GetAttributeMetadataGet(attributeCode: string, observe: any = 'body', reportProgress: boolean = false ): Observable { if (attributeCode === null || attributeCode === undefined) { throw new Error('Required parameter attributeCode was null or undefined when calling customerAddressMetadataV1GetAttributeMetadataGet.'); } let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ ]; 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}/V1/attributeMetadata/customerAddress/attribute/${encodeURIComponent(String(attributeCode))}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * Retrieve all attributes filtered by form code * @param formCode * @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 customerAddressMetadataV1GetAttributesGet(formCode: string, observe?: 'body', reportProgress?: boolean): Observable>; public customerAddressMetadataV1GetAttributesGet(formCode: string, observe?: 'response', reportProgress?: boolean): Observable>>; public customerAddressMetadataV1GetAttributesGet(formCode: string, observe?: 'events', reportProgress?: boolean): Observable>>; public customerAddressMetadataV1GetAttributesGet(formCode: string, observe: any = 'body', reportProgress: boolean = false ): Observable { if (formCode === null || formCode === undefined) { throw new Error('Required parameter formCode was null or undefined when calling customerAddressMetadataV1GetAttributesGet.'); } let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ ]; 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}/V1/attributeMetadata/customerAddress/form/${encodeURIComponent(String(formCode))}`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * * Get custom attributes metadata for the given data interface. * @param dataInterfaceName * @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 customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName?: string, observe?: 'body', reportProgress?: boolean): Observable>; public customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName?: string, observe?: 'response', reportProgress?: boolean): Observable>>; public customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName?: string, observe?: 'events', reportProgress?: boolean): Observable>>; public customerAddressMetadataV1GetCustomAttributesMetadataGet(dataInterfaceName?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); if (dataInterfaceName !== undefined) { queryParameters = queryParameters.set('dataInterfaceName', dataInterfaceName); } let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ ]; 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}/V1/attributeMetadata/customerAddress/custom`, { params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } }