mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 2045: feature(crm-data-access): Updated Add Card Endpoint
feature(crm-data-access): Updated Add Card Endpoint Ref: #5329
This commit is contained in:
committed by
Lorenz Hilpert
parent
cf359954ca
commit
7a98db35fb
@@ -37,6 +37,7 @@ class CustomerService extends __BaseService {
|
||||
static readonly CustomerUpdateCustomerPath = '/customer/{customerId}';
|
||||
static readonly CustomerPatchCustomerPath = '/customer/{customerId}';
|
||||
static readonly CustomerDeleteCustomerPath = '/customer/{customerId}';
|
||||
static readonly CustomerMergeLoyaltyAccountsPath = '/customer/{customerId}/loyalty/merge';
|
||||
static readonly CustomerAddLoyaltyCardPath = '/customer/{customerId}/loyalty/add-card';
|
||||
static readonly CustomerCreateCustomerPath = '/customer';
|
||||
static readonly CustomerAddPayerReferencePath = '/customer/{customerId}/payer';
|
||||
@@ -392,6 +393,56 @@ class CustomerService extends __BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Kundenkarte hinzufügen
|
||||
* @param params The `CustomerService.CustomerMergeLoyaltyAccountsParams` containing the following parameters:
|
||||
*
|
||||
* - `loyaltyCardValues`:
|
||||
*
|
||||
* - `customerId`:
|
||||
*
|
||||
* - `locale`:
|
||||
*/
|
||||
CustomerMergeLoyaltyAccountsResponse(params: CustomerService.CustomerMergeLoyaltyAccountsParams): __Observable<__StrictHttpResponse<ResponseArgsOfAccountDetailsDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = params.loyaltyCardValues;
|
||||
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/customer/${encodeURIComponent(String(params.customerId))}/loyalty/merge`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
params: __params,
|
||||
responseType: 'json'
|
||||
});
|
||||
|
||||
return this.http.request<any>(req).pipe(
|
||||
__filter(_r => _r instanceof HttpResponse),
|
||||
__map((_r) => {
|
||||
return _r as __StrictHttpResponse<ResponseArgsOfAccountDetailsDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Kundenkarte hinzufügen
|
||||
* @param params The `CustomerService.CustomerMergeLoyaltyAccountsParams` containing the following parameters:
|
||||
*
|
||||
* - `loyaltyCardValues`:
|
||||
*
|
||||
* - `customerId`:
|
||||
*
|
||||
* - `locale`:
|
||||
*/
|
||||
CustomerMergeLoyaltyAccounts(params: CustomerService.CustomerMergeLoyaltyAccountsParams): __Observable<ResponseArgsOfAccountDetailsDTO> {
|
||||
return this.CustomerMergeLoyaltyAccountsResponse(params).pipe(
|
||||
__map(_r => _r.body as ResponseArgsOfAccountDetailsDTO)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Kundenkarte hinzufügen
|
||||
* @param params The `CustomerService.CustomerAddLoyaltyCardParams` containing the following parameters:
|
||||
@@ -914,6 +965,15 @@ module CustomerService {
|
||||
deletionComment?: null | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for CustomerMergeLoyaltyAccounts
|
||||
*/
|
||||
export interface CustomerMergeLoyaltyAccountsParams {
|
||||
loyaltyCardValues: AddLoyaltyCardValues;
|
||||
customerId: number;
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for CustomerAddLoyaltyCard
|
||||
*/
|
||||
|
||||
@@ -153,7 +153,7 @@ export class CrmSearchService {
|
||||
const parsed = AddCardSchema.parse(params);
|
||||
|
||||
const req$ = this.#customerService
|
||||
.CustomerAddLoyaltyCard({
|
||||
.CustomerMergeLoyaltyAccounts({
|
||||
customerId: parsed.customerId,
|
||||
loyaltyCardValues: {
|
||||
cardCode: parsed.loyaltyCardValues.cardCode,
|
||||
|
||||
Reference in New Issue
Block a user