ultracart_rest_api_v2_typescript 3.10.7 → 3.10.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@3.10.7
1
+ ## ultracart_rest_api_v2_typescript@3.10.8
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install ultracart_rest_api_v2_typescript@3.10.7 --save
39
+ npm install ultracart_rest_api_v2_typescript@3.10.8 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -54,6 +54,7 @@ Not every change is committed to every SDK.
54
54
 
55
55
  | Version | Date | Comments |
56
56
  | --: | :-: | --- |
57
+ | 3.10.8 | 05/27/2022 | customer store credit |
57
58
  | 3.10.7 | 05/23/2022 | add internal gift cert to order summary, addl provider info for storefront comm |
58
59
  | 3.10.6 | 05/23/2022 | add internal gift cert to order summary, addl provider info for storefront comm |
59
60
  | 3.10.5 | 05/20/2022 | dependabot on java gson version |
package/api.ts CHANGED
@@ -9123,6 +9123,12 @@ export interface CustomerEditorValues {
9123
9123
  * @memberof CustomerEditorValues
9124
9124
  */
9125
9125
  countries?: Array<Country>;
9126
+ /**
9127
+ * loyalty_program_type
9128
+ * @type {string}
9129
+ * @memberof CustomerEditorValues
9130
+ */
9131
+ loyalty_program_type?: string;
9126
9132
  /**
9127
9133
  * qb_classes
9128
9134
  * @type {Array<string>}
@@ -10017,6 +10023,170 @@ export interface CustomerSoftwareEntitlement {
10017
10023
  software_sku?: string;
10018
10024
  }
10019
10025
 
10026
+ /**
10027
+ *
10028
+ * @export
10029
+ * @interface CustomerStoreCredit
10030
+ */
10031
+ export interface CustomerStoreCredit {
10032
+ /**
10033
+ *
10034
+ * @type {number}
10035
+ * @memberof CustomerStoreCredit
10036
+ */
10037
+ available?: number;
10038
+ /**
10039
+ *
10040
+ * @type {number}
10041
+ * @memberof CustomerStoreCredit
10042
+ */
10043
+ expiring?: number;
10044
+ /**
10045
+ *
10046
+ * @type {Array<CustomerStoreCreditLedgerEntry>}
10047
+ * @memberof CustomerStoreCredit
10048
+ */
10049
+ futureLedgers?: Array<CustomerStoreCreditLedgerEntry>;
10050
+ /**
10051
+ *
10052
+ * @type {Array<CustomerStoreCreditLedgerEntry>}
10053
+ * @memberof CustomerStoreCredit
10054
+ */
10055
+ pastLedgers?: Array<CustomerStoreCreditLedgerEntry>;
10056
+ /**
10057
+ *
10058
+ * @type {number}
10059
+ * @memberof CustomerStoreCredit
10060
+ */
10061
+ total?: number;
10062
+ /**
10063
+ *
10064
+ * @type {number}
10065
+ * @memberof CustomerStoreCredit
10066
+ */
10067
+ vesting?: number;
10068
+ }
10069
+
10070
+ /**
10071
+ *
10072
+ * @export
10073
+ * @interface CustomerStoreCreditAddRequest
10074
+ */
10075
+ export interface CustomerStoreCreditAddRequest {
10076
+ /**
10077
+ * Amount of store credit
10078
+ * @type {number}
10079
+ * @memberof CustomerStoreCreditAddRequest
10080
+ */
10081
+ amount?: number;
10082
+ /**
10083
+ * Description or reason for the store credit
10084
+ * @type {string}
10085
+ * @memberof CustomerStoreCreditAddRequest
10086
+ */
10087
+ description?: string;
10088
+ /**
10089
+ * Optional days for store credit to expire or zero for no expiration
10090
+ * @type {number}
10091
+ * @memberof CustomerStoreCreditAddRequest
10092
+ */
10093
+ expiration_days?: number;
10094
+ /**
10095
+ * Optional days for store credit to vesting or zero for immediately available
10096
+ * @type {number}
10097
+ * @memberof CustomerStoreCreditAddRequest
10098
+ */
10099
+ vesting_days?: number;
10100
+ }
10101
+
10102
+ /**
10103
+ *
10104
+ * @export
10105
+ * @interface CustomerStoreCreditLedgerEntry
10106
+ */
10107
+ export interface CustomerStoreCreditLedgerEntry {
10108
+ /**
10109
+ * Identifies the state of this ledger entry whether the entry is Vesting or Expiring
10110
+ * @type {string}
10111
+ * @memberof CustomerStoreCreditLedgerEntry
10112
+ */
10113
+ action?: string;
10114
+ /**
10115
+ * The amount of the activity.
10116
+ * @type {number}
10117
+ * @memberof CustomerStoreCreditLedgerEntry
10118
+ */
10119
+ amount?: number;
10120
+ /**
10121
+ * Description of what this ledger entry is used.
10122
+ * @type {string}
10123
+ * @memberof CustomerStoreCreditLedgerEntry
10124
+ */
10125
+ description?: string;
10126
+ /**
10127
+ * Date time of this ledger activity.
10128
+ * @type {string}
10129
+ * @memberof CustomerStoreCreditLedgerEntry
10130
+ */
10131
+ entry_dts?: string;
10132
+ /**
10133
+ * Gift certificate ledger oid is a primary key for this object, used internally.
10134
+ * @type {number}
10135
+ * @memberof CustomerStoreCreditLedgerEntry
10136
+ */
10137
+ gift_certificate_ledger_oid?: number;
10138
+ /**
10139
+ * Gift certificate oid.
10140
+ * @type {number}
10141
+ * @memberof CustomerStoreCreditLedgerEntry
10142
+ */
10143
+ gift_certificate_oid?: number;
10144
+ /**
10145
+ * The order id if this gift certificate was used as part of the payment.
10146
+ * @type {string}
10147
+ * @memberof CustomerStoreCreditLedgerEntry
10148
+ */
10149
+ reference_order_id?: string;
10150
+ }
10151
+
10152
+ /**
10153
+ *
10154
+ * @export
10155
+ * @interface CustomerStoreCreditResponse
10156
+ */
10157
+ export interface CustomerStoreCreditResponse {
10158
+ /**
10159
+ *
10160
+ * @type {CustomerStoreCredit}
10161
+ * @memberof CustomerStoreCreditResponse
10162
+ */
10163
+ customer_store_credit?: CustomerStoreCredit;
10164
+ /**
10165
+ *
10166
+ * @type {ModelError}
10167
+ * @memberof CustomerStoreCreditResponse
10168
+ */
10169
+ error?: ModelError;
10170
+ /**
10171
+ *
10172
+ * @type {ResponseMetadata}
10173
+ * @memberof CustomerStoreCreditResponse
10174
+ */
10175
+ metadata?: ResponseMetadata;
10176
+ /**
10177
+ * Indicates if API call was successful
10178
+ * @type {boolean}
10179
+ * @memberof CustomerStoreCreditResponse
10180
+ */
10181
+ success?: boolean;
10182
+ /**
10183
+ *
10184
+ * @type {Warning}
10185
+ * @memberof CustomerStoreCreditResponse
10186
+ */
10187
+ warning?: Warning;
10188
+ }
10189
+
10020
10190
  /**
10021
10191
  *
10022
10192
  * @export
@@ -44443,6 +44613,67 @@ export class CouponApi extends BaseAPI implements CouponApiInterface {
44443
44613
  */
44444
44614
  export const CustomerApiFetchParamCreator = function (configuration?: Configuration) {
44445
44615
  return {
44616
+ /**
44617
+ * Adds store credit to a customer
44618
+ * @summary Adds store credit to a customer
44619
+ * @param {number} customer_profile_oid The customer oid to credit.
44620
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
44621
+ * @param {*} [options] Override http request option.
44622
+ * @throws {RequiredError}
44623
+ */
44624
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options: any = {}): FetchArgs {
44625
+ // verify required parameter 'customer_profile_oid' is not null or undefined
44626
+ if (customer_profile_oid === null || customer_profile_oid === undefined) {
44627
+ throw new RequiredError('customer_profile_oid','Required parameter customer_profile_oid was null or undefined when calling addCustomerStoreCredit.');
44628
+ }
44629
+ // verify required parameter 'store_credit_request' is not null or undefined
44630
+ if (store_credit_request === null || store_credit_request === undefined) {
44631
+ throw new RequiredError('store_credit_request','Required parameter store_credit_request was null or undefined when calling addCustomerStoreCredit.');
44632
+ }
44633
+ const localVarPath = `/customer/customers/{customer_profile_oid}/store_credit`
44634
+ .replace(`{${"customer_profile_oid"}}`, encodeURIComponent(String(customer_profile_oid)));
44635
+ const localVarUrlObj = url.parse(localVarPath, true);
44636
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
44637
+ const localVarHeaderParameter = {} as any;
44638
+ const localVarQueryParameter = {} as any;
44639
+
44640
+ if(configuration && configuration.apiVersion) {
44641
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
44642
+ }
44643
+
44644
+
44645
+
44646
+ // authentication ultraCartOauth required
44647
+ // oauth required
44648
+ if (configuration && configuration.accessToken) {
44649
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
44650
+ ? configuration.accessToken("ultraCartOauth", ["customer_write"])
44651
+ : configuration.accessToken;
44652
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
44653
+ }
44654
+
44655
+ // authentication ultraCartSimpleApiKey required
44656
+ if (configuration && configuration.apiKey) {
44657
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
44658
+ ? configuration.apiKey("x-ultracart-simple-key")
44659
+ : configuration.apiKey;
44660
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
44661
+ }
44662
+
44663
+ localVarHeaderParameter['Content-Type'] = 'application/json; charset=UTF-8';
44664
+
44665
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
44666
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
44667
+ delete localVarUrlObj.search;
44668
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
44669
+ const needsSerialization = (<any>"CustomerStoreCreditAddRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
44670
+ localVarRequestOptions.body = needsSerialization ? JSON.stringify(store_credit_request || {}) : (store_credit_request || "");
44671
+
44672
+ return {
44673
+ url: url.format(localVarUrlObj),
44674
+ options: localVarRequestOptions,
44675
+ };
44676
+ },
44446
44677
  /**
44447
44678
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
44448
44679
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -44735,6 +44966,58 @@ export const CustomerApiFetchParamCreator = function (configuration?: Configurat
44735
44966
 
44736
44967
 
44737
44968
 
44969
+ // authentication ultraCartOauth required
44970
+ // oauth required
44971
+ if (configuration && configuration.accessToken) {
44972
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
44973
+ ? configuration.accessToken("ultraCartOauth", ["customer_read"])
44974
+ : configuration.accessToken;
44975
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
44976
+ }
44977
+
44978
+ // authentication ultraCartSimpleApiKey required
44979
+ if (configuration && configuration.apiKey) {
44980
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
44981
+ ? configuration.apiKey("x-ultracart-simple-key")
44982
+ : configuration.apiKey;
44983
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
44984
+ }
44985
+
44986
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
44987
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
44988
+ delete localVarUrlObj.search;
44989
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
44990
+
44991
+ return {
44992
+ url: url.format(localVarUrlObj),
44993
+ options: localVarRequestOptions,
44994
+ };
44995
+ },
44996
+ /**
44997
+ * Retrieve the customer store credit accumulated through loyalty programs
44998
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
44999
+ * @param {number} customer_profile_oid The customer oid to retrieve.
45000
+ * @param {*} [options] Override http request option.
45001
+ * @throws {RequiredError}
45002
+ */
45003
+ getCustomerStoreCredit(customer_profile_oid: number, options: any = {}): FetchArgs {
45004
+ // verify required parameter 'customer_profile_oid' is not null or undefined
45005
+ if (customer_profile_oid === null || customer_profile_oid === undefined) {
45006
+ throw new RequiredError('customer_profile_oid','Required parameter customer_profile_oid was null or undefined when calling getCustomerStoreCredit.');
45007
+ }
45008
+ const localVarPath = `/customer/customers/{customer_profile_oid}/store_credit`
45009
+ .replace(`{${"customer_profile_oid"}}`, encodeURIComponent(String(customer_profile_oid)));
45010
+ const localVarUrlObj = url.parse(localVarPath, true);
45011
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
45012
+ const localVarHeaderParameter = {} as any;
45013
+ const localVarQueryParameter = {} as any;
45014
+
45015
+ if(configuration && configuration.apiVersion) {
45016
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
45017
+ }
45018
+
45019
+
45020
+
44738
45021
  // authentication ultraCartOauth required
44739
45022
  // oauth required
44740
45023
  if (configuration && configuration.accessToken) {
@@ -45405,6 +45688,28 @@ export const CustomerApiFetchParamCreator = function (configuration?: Configurat
45405
45688
  */
45406
45689
  export const CustomerApiFp = function(configuration?: Configuration) {
45407
45690
  return {
45691
+ /**
45692
+ * Adds store credit to a customer
45693
+ * @summary Adds store credit to a customer
45694
+ * @param {number} customer_profile_oid The customer oid to credit.
45695
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
45696
+ * @param {*} [options] Override http request option.
45697
+ * @throws {RequiredError}
45698
+ */
45699
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<BaseResponse> {
45700
+ const localVarFetchArgs = CustomerApiFetchParamCreator(configuration).addCustomerStoreCredit(customer_profile_oid, store_credit_request, options);
45701
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
45702
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
45703
+
45704
+ if (response.status >= 200 && response.status < 300) {
45705
+ return response.json();
45706
+
45707
+ } else {
45708
+ throw response;
45709
+ }
45710
+ });
45711
+ };
45712
+ },
45408
45713
  /**
45409
45714
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
45410
45715
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -45532,6 +45837,27 @@ export const CustomerApiFp = function(configuration?: Configuration) {
45532
45837
  });
45533
45838
  };
45534
45839
  },
45840
+ /**
45841
+ * Retrieve the customer store credit accumulated through loyalty programs
45842
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
45843
+ * @param {number} customer_profile_oid The customer oid to retrieve.
45844
+ * @param {*} [options] Override http request option.
45845
+ * @throws {RequiredError}
45846
+ */
45847
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<CustomerStoreCreditResponse> {
45848
+ const localVarFetchArgs = CustomerApiFetchParamCreator(configuration).getCustomerStoreCredit(customer_profile_oid, options);
45849
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
45850
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
45851
+
45852
+ if (response.status >= 200 && response.status < 300) {
45853
+ return response.json();
45854
+
45855
+ } else {
45856
+ throw response;
45857
+ }
45858
+ });
45859
+ };
45860
+ },
45535
45861
  /**
45536
45862
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
45537
45863
  * @summary Retrieve customers
@@ -45749,6 +46075,17 @@ export const CustomerApiFp = function(configuration?: Configuration) {
45749
46075
  */
45750
46076
  export const CustomerApiFactory = function (configuration?: Configuration, fetch?: FetchAPI, basePath?: string) {
45751
46077
  return {
46078
+ /**
46079
+ * Adds store credit to a customer
46080
+ * @summary Adds store credit to a customer
46081
+ * @param {number} customer_profile_oid The customer oid to credit.
46082
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
46083
+ * @param {*} [options] Override http request option.
46084
+ * @throws {RequiredError}
46085
+ */
46086
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any) {
46087
+ return CustomerApiFp(configuration).addCustomerStoreCredit(customer_profile_oid, store_credit_request, options)(fetch, basePath);
46088
+ },
45752
46089
  /**
45753
46090
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
45754
46091
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -45810,6 +46147,16 @@ export const CustomerApiFactory = function (configuration?: Configuration, fetch
45810
46147
  getCustomerEmailLists(options?: any) {
45811
46148
  return CustomerApiFp(configuration).getCustomerEmailLists(options)(fetch, basePath);
45812
46149
  },
46150
+ /**
46151
+ * Retrieve the customer store credit accumulated through loyalty programs
46152
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
46153
+ * @param {number} customer_profile_oid The customer oid to retrieve.
46154
+ * @param {*} [options] Override http request option.
46155
+ * @throws {RequiredError}
46156
+ */
46157
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any) {
46158
+ return CustomerApiFp(configuration).getCustomerStoreCredit(customer_profile_oid, options)(fetch, basePath);
46159
+ },
45813
46160
  /**
45814
46161
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
45815
46162
  * @summary Retrieve customers
@@ -45939,6 +46286,17 @@ export const CustomerApiFactory = function (configuration?: Configuration, fetch
45939
46286
  * @interface CustomerApi
45940
46287
  */
45941
46288
  export interface CustomerApiInterface {
46289
+ /**
46290
+ * Adds store credit to a customer
46291
+ * @summary Adds store credit to a customer
46292
+ * @param {number} customer_profile_oid The customer oid to credit.
46293
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
46294
+ * @param {*} [options] Override http request option.
46295
+ * @throws {RequiredError}
46296
+ * @memberof CustomerApiInterface
46297
+ */
46298
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): Promise<BaseResponse>;
46299
+
45942
46300
  /**
45943
46301
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
45944
46302
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -46000,6 +46358,16 @@ export interface CustomerApiInterface {
46000
46358
  */
46001
46359
  getCustomerEmailLists(options?: any): Promise<EmailListsResponse>;
46002
46360
 
46361
+ /**
46362
+ * Retrieve the customer store credit accumulated through loyalty programs
46363
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
46364
+ * @param {number} customer_profile_oid The customer oid to retrieve.
46365
+ * @param {*} [options] Override http request option.
46366
+ * @throws {RequiredError}
46367
+ * @memberof CustomerApiInterface
46368
+ */
46369
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): Promise<CustomerStoreCreditResponse>;
46370
+
46003
46371
  /**
46004
46372
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
46005
46373
  * @summary Retrieve customers
@@ -46129,6 +46497,19 @@ export interface CustomerApiInterface {
46129
46497
  * @extends {BaseAPI}
46130
46498
  */
46131
46499
  export class CustomerApi extends BaseAPI implements CustomerApiInterface {
46500
+ /**
46501
+ * Adds store credit to a customer
46502
+ * @summary Adds store credit to a customer
46503
+ * @param {number} customer_profile_oid The customer oid to credit.
46504
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
46505
+ * @param {*} [options] Override http request option.
46506
+ * @throws {RequiredError}
46507
+ * @memberof CustomerApi
46508
+ */
46509
+ public addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any) {
46510
+ return CustomerApiFp(this.configuration).addCustomerStoreCredit(customer_profile_oid, store_credit_request, options)(this.fetch, this.basePath);
46511
+ }
46512
+
46132
46513
  /**
46133
46514
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
46134
46515
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -46202,6 +46583,18 @@ export class CustomerApi extends BaseAPI implements CustomerApiInterface {
46202
46583
  return CustomerApiFp(this.configuration).getCustomerEmailLists(options)(this.fetch, this.basePath);
46203
46584
  }
46204
46585
 
46586
+ /**
46587
+ * Retrieve the customer store credit accumulated through loyalty programs
46588
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
46589
+ * @param {number} customer_profile_oid The customer oid to retrieve.
46590
+ * @param {*} [options] Override http request option.
46591
+ * @throws {RequiredError}
46592
+ * @memberof CustomerApi
46593
+ */
46594
+ public getCustomerStoreCredit(customer_profile_oid: number, options?: any) {
46595
+ return CustomerApiFp(this.configuration).getCustomerStoreCredit(customer_profile_oid, options)(this.fetch, this.basePath);
46596
+ }
46597
+
46205
46598
  /**
46206
46599
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
46207
46600
  * @summary Retrieve customers
package/dist/api.d.ts CHANGED
@@ -8906,6 +8906,12 @@ export interface CustomerEditorValues {
8906
8906
  * @memberof CustomerEditorValues
8907
8907
  */
8908
8908
  countries?: Array<Country>;
8909
+ /**
8910
+ * loyalty_program_type
8911
+ * @type {string}
8912
+ * @memberof CustomerEditorValues
8913
+ */
8914
+ loyalty_program_type?: string;
8909
8915
  /**
8910
8916
  * qb_classes
8911
8917
  * @type {Array<string>}
@@ -9785,6 +9791,166 @@ export interface CustomerSoftwareEntitlement {
9785
9791
  */
9786
9792
  software_sku?: string;
9787
9793
  }
9794
+ /**
9795
+ *
9796
+ * @export
9797
+ * @interface CustomerStoreCredit
9798
+ */
9799
+ export interface CustomerStoreCredit {
9800
+ /**
9801
+ *
9802
+ * @type {number}
9803
+ * @memberof CustomerStoreCredit
9804
+ */
9805
+ available?: number;
9806
+ /**
9807
+ *
9808
+ * @type {number}
9809
+ * @memberof CustomerStoreCredit
9810
+ */
9811
+ expiring?: number;
9812
+ /**
9813
+ *
9814
+ * @type {Array<CustomerStoreCreditLedgerEntry>}
9815
+ * @memberof CustomerStoreCredit
9816
+ */
9817
+ futureLedgers?: Array<CustomerStoreCreditLedgerEntry>;
9818
+ /**
9819
+ *
9820
+ * @type {Array<CustomerStoreCreditLedgerEntry>}
9821
+ * @memberof CustomerStoreCredit
9822
+ */
9823
+ pastLedgers?: Array<CustomerStoreCreditLedgerEntry>;
9824
+ /**
9825
+ *
9826
+ * @type {number}
9827
+ * @memberof CustomerStoreCredit
9828
+ */
9829
+ total?: number;
9830
+ /**
9831
+ *
9832
+ * @type {number}
9833
+ * @memberof CustomerStoreCredit
9834
+ */
9835
+ vesting?: number;
9836
+ }
9837
+ /**
9838
+ *
9839
+ * @export
9840
+ * @interface CustomerStoreCreditAddRequest
9841
+ */
9842
+ export interface CustomerStoreCreditAddRequest {
9843
+ /**
9844
+ * Amount of store credit
9845
+ * @type {number}
9846
+ * @memberof CustomerStoreCreditAddRequest
9847
+ */
9848
+ amount?: number;
9849
+ /**
9850
+ * Description or reason for the store credit
9851
+ * @type {string}
9852
+ * @memberof CustomerStoreCreditAddRequest
9853
+ */
9854
+ description?: string;
9855
+ /**
9856
+ * Optional days for store credit to expire or zero for no expiration
9857
+ * @type {number}
9858
+ * @memberof CustomerStoreCreditAddRequest
9859
+ */
9860
+ expiration_days?: number;
9861
+ /**
9862
+ * Optional days for store credit to vesting or zero for immediately available
9863
+ * @type {number}
9864
+ * @memberof CustomerStoreCreditAddRequest
9865
+ */
9866
+ vesting_days?: number;
9867
+ }
9868
+ /**
9869
+ *
9870
+ * @export
9871
+ * @interface CustomerStoreCreditLedgerEntry
9872
+ */
9873
+ export interface CustomerStoreCreditLedgerEntry {
9874
+ /**
9875
+ * Identifies the state of this ledger entry whether the entry is Vesting or Expiring
9876
+ * @type {string}
9877
+ * @memberof CustomerStoreCreditLedgerEntry
9878
+ */
9879
+ action?: string;
9880
+ /**
9881
+ * The amount of the activity.
9882
+ * @type {number}
9883
+ * @memberof CustomerStoreCreditLedgerEntry
9884
+ */
9885
+ amount?: number;
9886
+ /**
9887
+ * Description of what this ledger entry is used.
9888
+ * @type {string}
9889
+ * @memberof CustomerStoreCreditLedgerEntry
9890
+ */
9891
+ description?: string;
9892
+ /**
9893
+ * Date time of this ledger activity.
9894
+ * @type {string}
9895
+ * @memberof CustomerStoreCreditLedgerEntry
9896
+ */
9897
+ entry_dts?: string;
9898
+ /**
9899
+ * Gift certificate ledger oid is a primary key for this object, used internally.
9900
+ * @type {number}
9901
+ * @memberof CustomerStoreCreditLedgerEntry
9902
+ */
9903
+ gift_certificate_ledger_oid?: number;
9904
+ /**
9905
+ * Gift certificate oid.
9906
+ * @type {number}
9907
+ * @memberof CustomerStoreCreditLedgerEntry
9908
+ */
9909
+ gift_certificate_oid?: number;
9910
+ /**
9911
+ * The order id if this gift certificate was used as part of the payment.
9912
+ * @type {string}
9913
+ * @memberof CustomerStoreCreditLedgerEntry
9914
+ */
9915
+ reference_order_id?: string;
9916
+ }
9917
+ /**
9918
+ *
9919
+ * @export
9920
+ * @interface CustomerStoreCreditResponse
9921
+ */
9922
+ export interface CustomerStoreCreditResponse {
9923
+ /**
9924
+ *
9925
+ * @type {CustomerStoreCredit}
9926
+ * @memberof CustomerStoreCreditResponse
9927
+ */
9928
+ customer_store_credit?: CustomerStoreCredit;
9929
+ /**
9930
+ *
9931
+ * @type {ModelError}
9932
+ * @memberof CustomerStoreCreditResponse
9933
+ */
9934
+ error?: ModelError;
9935
+ /**
9936
+ *
9937
+ * @type {ResponseMetadata}
9938
+ * @memberof CustomerStoreCreditResponse
9939
+ */
9940
+ metadata?: ResponseMetadata;
9941
+ /**
9942
+ * Indicates if API call was successful
9943
+ * @type {boolean}
9944
+ * @memberof CustomerStoreCreditResponse
9945
+ */
9946
+ success?: boolean;
9947
+ /**
9948
+ *
9949
+ * @type {Warning}
9950
+ * @memberof CustomerStoreCreditResponse
9951
+ */
9952
+ warning?: Warning;
9953
+ }
9788
9954
  /**
9789
9955
  *
9790
9956
  * @export
@@ -38475,6 +38641,15 @@ export declare class CouponApi extends BaseAPI implements CouponApiInterface {
38475
38641
  * @export
38476
38642
  */
38477
38643
  export declare const CustomerApiFetchParamCreator: (configuration?: Configuration) => {
38644
+ /**
38645
+ * Adds store credit to a customer
38646
+ * @summary Adds store credit to a customer
38647
+ * @param {number} customer_profile_oid The customer oid to credit.
38648
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
38649
+ * @param {*} [options] Override http request option.
38650
+ * @throws {RequiredError}
38651
+ */
38652
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): FetchArgs;
38478
38653
  /**
38479
38654
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
38480
38655
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -38524,6 +38699,14 @@ export declare const CustomerApiFetchParamCreator: (configuration?: Configuratio
38524
38699
  * @throws {RequiredError}
38525
38700
  */
38526
38701
  getCustomerEmailLists(options?: any): FetchArgs;
38702
+ /**
38703
+ * Retrieve the customer store credit accumulated through loyalty programs
38704
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
38705
+ * @param {number} customer_profile_oid The customer oid to retrieve.
38706
+ * @param {*} [options] Override http request option.
38707
+ * @throws {RequiredError}
38708
+ */
38709
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): FetchArgs;
38527
38710
  /**
38528
38711
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
38529
38712
  * @summary Retrieve customers
@@ -38634,6 +38817,15 @@ export declare const CustomerApiFetchParamCreator: (configuration?: Configuratio
38634
38817
  * @export
38635
38818
  */
38636
38819
  export declare const CustomerApiFp: (configuration?: Configuration) => {
38820
+ /**
38821
+ * Adds store credit to a customer
38822
+ * @summary Adds store credit to a customer
38823
+ * @param {number} customer_profile_oid The customer oid to credit.
38824
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
38825
+ * @param {*} [options] Override http request option.
38826
+ * @throws {RequiredError}
38827
+ */
38828
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<BaseResponse>;
38637
38829
  /**
38638
38830
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
38639
38831
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -38683,6 +38875,14 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
38683
38875
  * @throws {RequiredError}
38684
38876
  */
38685
38877
  getCustomerEmailLists(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<EmailListsResponse>;
38878
+ /**
38879
+ * Retrieve the customer store credit accumulated through loyalty programs
38880
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
38881
+ * @param {number} customer_profile_oid The customer oid to retrieve.
38882
+ * @param {*} [options] Override http request option.
38883
+ * @throws {RequiredError}
38884
+ */
38885
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<CustomerStoreCreditResponse>;
38686
38886
  /**
38687
38887
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
38688
38888
  * @summary Retrieve customers
@@ -38793,6 +38993,15 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
38793
38993
  * @export
38794
38994
  */
38795
38995
  export declare const CustomerApiFactory: (configuration?: Configuration, fetch?: FetchAPI, basePath?: string) => {
38996
+ /**
38997
+ * Adds store credit to a customer
38998
+ * @summary Adds store credit to a customer
38999
+ * @param {number} customer_profile_oid The customer oid to credit.
39000
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
39001
+ * @param {*} [options] Override http request option.
39002
+ * @throws {RequiredError}
39003
+ */
39004
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): Promise<BaseResponse>;
38796
39005
  /**
38797
39006
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
38798
39007
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -38842,6 +39051,14 @@ export declare const CustomerApiFactory: (configuration?: Configuration, fetch?:
38842
39051
  * @throws {RequiredError}
38843
39052
  */
38844
39053
  getCustomerEmailLists(options?: any): Promise<EmailListsResponse>;
39054
+ /**
39055
+ * Retrieve the customer store credit accumulated through loyalty programs
39056
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
39057
+ * @param {number} customer_profile_oid The customer oid to retrieve.
39058
+ * @param {*} [options] Override http request option.
39059
+ * @throws {RequiredError}
39060
+ */
39061
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): Promise<CustomerStoreCreditResponse>;
38845
39062
  /**
38846
39063
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
38847
39064
  * @summary Retrieve customers
@@ -38953,6 +39170,16 @@ export declare const CustomerApiFactory: (configuration?: Configuration, fetch?:
38953
39170
  * @interface CustomerApi
38954
39171
  */
38955
39172
  export interface CustomerApiInterface {
39173
+ /**
39174
+ * Adds store credit to a customer
39175
+ * @summary Adds store credit to a customer
39176
+ * @param {number} customer_profile_oid The customer oid to credit.
39177
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
39178
+ * @param {*} [options] Override http request option.
39179
+ * @throws {RequiredError}
39180
+ * @memberof CustomerApiInterface
39181
+ */
39182
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): Promise<BaseResponse>;
38956
39183
  /**
38957
39184
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
38958
39185
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -39008,6 +39235,15 @@ export interface CustomerApiInterface {
39008
39235
  * @memberof CustomerApiInterface
39009
39236
  */
39010
39237
  getCustomerEmailLists(options?: any): Promise<EmailListsResponse>;
39238
+ /**
39239
+ * Retrieve the customer store credit accumulated through loyalty programs
39240
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
39241
+ * @param {number} customer_profile_oid The customer oid to retrieve.
39242
+ * @param {*} [options] Override http request option.
39243
+ * @throws {RequiredError}
39244
+ * @memberof CustomerApiInterface
39245
+ */
39246
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): Promise<CustomerStoreCreditResponse>;
39011
39247
  /**
39012
39248
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
39013
39249
  * @summary Retrieve customers
@@ -39128,6 +39364,16 @@ export interface CustomerApiInterface {
39128
39364
  * @extends {BaseAPI}
39129
39365
  */
39130
39366
  export declare class CustomerApi extends BaseAPI implements CustomerApiInterface {
39367
+ /**
39368
+ * Adds store credit to a customer
39369
+ * @summary Adds store credit to a customer
39370
+ * @param {number} customer_profile_oid The customer oid to credit.
39371
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
39372
+ * @param {*} [options] Override http request option.
39373
+ * @throws {RequiredError}
39374
+ * @memberof CustomerApi
39375
+ */
39376
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): Promise<BaseResponse>;
39131
39377
  /**
39132
39378
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
39133
39379
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -39183,6 +39429,15 @@ export declare class CustomerApi extends BaseAPI implements CustomerApiInterface
39183
39429
  * @memberof CustomerApi
39184
39430
  */
39185
39431
  getCustomerEmailLists(options?: any): Promise<EmailListsResponse>;
39432
+ /**
39433
+ * Retrieve the customer store credit accumulated through loyalty programs
39434
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
39435
+ * @param {number} customer_profile_oid The customer oid to retrieve.
39436
+ * @param {*} [options] Override http request option.
39437
+ * @throws {RequiredError}
39438
+ * @memberof CustomerApi
39439
+ */
39440
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): Promise<CustomerStoreCreditResponse>;
39186
39441
  /**
39187
39442
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
39188
39443
  * @summary Retrieve customers
package/dist/api.js CHANGED
@@ -8820,6 +8820,60 @@ exports.CouponApi = CouponApi;
8820
8820
  */
8821
8821
  var CustomerApiFetchParamCreator = function (configuration) {
8822
8822
  return {
8823
+ /**
8824
+ * Adds store credit to a customer
8825
+ * @summary Adds store credit to a customer
8826
+ * @param {number} customer_profile_oid The customer oid to credit.
8827
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
8828
+ * @param {*} [options] Override http request option.
8829
+ * @throws {RequiredError}
8830
+ */
8831
+ addCustomerStoreCredit: function (customer_profile_oid, store_credit_request, options) {
8832
+ if (options === void 0) { options = {}; }
8833
+ // verify required parameter 'customer_profile_oid' is not null or undefined
8834
+ if (customer_profile_oid === null || customer_profile_oid === undefined) {
8835
+ throw new RequiredError('customer_profile_oid', 'Required parameter customer_profile_oid was null or undefined when calling addCustomerStoreCredit.');
8836
+ }
8837
+ // verify required parameter 'store_credit_request' is not null or undefined
8838
+ if (store_credit_request === null || store_credit_request === undefined) {
8839
+ throw new RequiredError('store_credit_request', 'Required parameter store_credit_request was null or undefined when calling addCustomerStoreCredit.');
8840
+ }
8841
+ var localVarPath = "/customer/customers/{customer_profile_oid}/store_credit"
8842
+ .replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(customer_profile_oid)));
8843
+ var localVarUrlObj = url.parse(localVarPath, true);
8844
+ var localVarRequestOptions = Object.assign({ method: 'POST' }, options);
8845
+ var localVarHeaderParameter = {};
8846
+ var localVarQueryParameter = {};
8847
+ if (configuration && configuration.apiVersion) {
8848
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
8849
+ }
8850
+ // authentication ultraCartOauth required
8851
+ // oauth required
8852
+ if (configuration && configuration.accessToken) {
8853
+ var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
8854
+ ? configuration.accessToken("ultraCartOauth", ["customer_write"])
8855
+ : configuration.accessToken;
8856
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
8857
+ }
8858
+ // authentication ultraCartSimpleApiKey required
8859
+ if (configuration && configuration.apiKey) {
8860
+ var localVarApiKeyValue = typeof configuration.apiKey === 'function'
8861
+ ? configuration.apiKey("x-ultracart-simple-key")
8862
+ : configuration.apiKey;
8863
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
8864
+ }
8865
+ localVarHeaderParameter['Content-Type'] = 'application/json; charset=UTF-8';
8866
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
8867
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
8868
+ delete localVarUrlObj.search;
8869
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
8870
+ var needsSerialization = ("CustomerStoreCreditAddRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
8871
+ localVarRequestOptions.body = needsSerialization ? JSON.stringify(store_credit_request || {}) : (store_credit_request || "");
8872
+ return {
8873
+ url: url.format(localVarUrlObj),
8874
+ options: localVarRequestOptions,
8875
+ };
8876
+ },
8823
8877
  /**
8824
8878
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
8825
8879
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -9100,6 +9154,52 @@ var CustomerApiFetchParamCreator = function (configuration) {
9100
9154
  options: localVarRequestOptions,
9101
9155
  };
9102
9156
  },
9157
+ /**
9158
+ * Retrieve the customer store credit accumulated through loyalty programs
9159
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
9160
+ * @param {number} customer_profile_oid The customer oid to retrieve.
9161
+ * @param {*} [options] Override http request option.
9162
+ * @throws {RequiredError}
9163
+ */
9164
+ getCustomerStoreCredit: function (customer_profile_oid, options) {
9165
+ if (options === void 0) { options = {}; }
9166
+ // verify required parameter 'customer_profile_oid' is not null or undefined
9167
+ if (customer_profile_oid === null || customer_profile_oid === undefined) {
9168
+ throw new RequiredError('customer_profile_oid', 'Required parameter customer_profile_oid was null or undefined when calling getCustomerStoreCredit.');
9169
+ }
9170
+ var localVarPath = "/customer/customers/{customer_profile_oid}/store_credit"
9171
+ .replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(customer_profile_oid)));
9172
+ var localVarUrlObj = url.parse(localVarPath, true);
9173
+ var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
9174
+ var localVarHeaderParameter = {};
9175
+ var localVarQueryParameter = {};
9176
+ if (configuration && configuration.apiVersion) {
9177
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
9178
+ }
9179
+ // authentication ultraCartOauth required
9180
+ // oauth required
9181
+ if (configuration && configuration.accessToken) {
9182
+ var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
9183
+ ? configuration.accessToken("ultraCartOauth", ["customer_read"])
9184
+ : configuration.accessToken;
9185
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
9186
+ }
9187
+ // authentication ultraCartSimpleApiKey required
9188
+ if (configuration && configuration.apiKey) {
9189
+ var localVarApiKeyValue = typeof configuration.apiKey === 'function'
9190
+ ? configuration.apiKey("x-ultracart-simple-key")
9191
+ : configuration.apiKey;
9192
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
9193
+ }
9194
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
9195
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
9196
+ delete localVarUrlObj.search;
9197
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
9198
+ return {
9199
+ url: url.format(localVarUrlObj),
9200
+ options: localVarRequestOptions,
9201
+ };
9202
+ },
9103
9203
  /**
9104
9204
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
9105
9205
  * @summary Retrieve customers
@@ -9649,6 +9749,29 @@ exports.CustomerApiFetchParamCreator = CustomerApiFetchParamCreator;
9649
9749
  */
9650
9750
  var CustomerApiFp = function (configuration) {
9651
9751
  return {
9752
+ /**
9753
+ * Adds store credit to a customer
9754
+ * @summary Adds store credit to a customer
9755
+ * @param {number} customer_profile_oid The customer oid to credit.
9756
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
9757
+ * @param {*} [options] Override http request option.
9758
+ * @throws {RequiredError}
9759
+ */
9760
+ addCustomerStoreCredit: function (customer_profile_oid, store_credit_request, options) {
9761
+ var localVarFetchArgs = (0, exports.CustomerApiFetchParamCreator)(configuration).addCustomerStoreCredit(customer_profile_oid, store_credit_request, options);
9762
+ return function (fetch, basePath) {
9763
+ if (fetch === void 0) { fetch = portableFetch; }
9764
+ if (basePath === void 0) { basePath = BASE_PATH; }
9765
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
9766
+ if (response.status >= 200 && response.status < 300) {
9767
+ return response.json();
9768
+ }
9769
+ else {
9770
+ throw response;
9771
+ }
9772
+ });
9773
+ };
9774
+ },
9652
9775
  /**
9653
9776
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
9654
9777
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -9782,6 +9905,28 @@ var CustomerApiFp = function (configuration) {
9782
9905
  });
9783
9906
  };
9784
9907
  },
9908
+ /**
9909
+ * Retrieve the customer store credit accumulated through loyalty programs
9910
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
9911
+ * @param {number} customer_profile_oid The customer oid to retrieve.
9912
+ * @param {*} [options] Override http request option.
9913
+ * @throws {RequiredError}
9914
+ */
9915
+ getCustomerStoreCredit: function (customer_profile_oid, options) {
9916
+ var localVarFetchArgs = (0, exports.CustomerApiFetchParamCreator)(configuration).getCustomerStoreCredit(customer_profile_oid, options);
9917
+ return function (fetch, basePath) {
9918
+ if (fetch === void 0) { fetch = portableFetch; }
9919
+ if (basePath === void 0) { basePath = BASE_PATH; }
9920
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
9921
+ if (response.status >= 200 && response.status < 300) {
9922
+ return response.json();
9923
+ }
9924
+ else {
9925
+ throw response;
9926
+ }
9927
+ });
9928
+ };
9929
+ },
9785
9930
  /**
9786
9931
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
9787
9932
  * @summary Retrieve customers
@@ -10007,6 +10152,17 @@ exports.CustomerApiFp = CustomerApiFp;
10007
10152
  */
10008
10153
  var CustomerApiFactory = function (configuration, fetch, basePath) {
10009
10154
  return {
10155
+ /**
10156
+ * Adds store credit to a customer
10157
+ * @summary Adds store credit to a customer
10158
+ * @param {number} customer_profile_oid The customer oid to credit.
10159
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
10160
+ * @param {*} [options] Override http request option.
10161
+ * @throws {RequiredError}
10162
+ */
10163
+ addCustomerStoreCredit: function (customer_profile_oid, store_credit_request, options) {
10164
+ return (0, exports.CustomerApiFp)(configuration).addCustomerStoreCredit(customer_profile_oid, store_credit_request, options)(fetch, basePath);
10165
+ },
10010
10166
  /**
10011
10167
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
10012
10168
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -10068,6 +10224,16 @@ var CustomerApiFactory = function (configuration, fetch, basePath) {
10068
10224
  getCustomerEmailLists: function (options) {
10069
10225
  return (0, exports.CustomerApiFp)(configuration).getCustomerEmailLists(options)(fetch, basePath);
10070
10226
  },
10227
+ /**
10228
+ * Retrieve the customer store credit accumulated through loyalty programs
10229
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
10230
+ * @param {number} customer_profile_oid The customer oid to retrieve.
10231
+ * @param {*} [options] Override http request option.
10232
+ * @throws {RequiredError}
10233
+ */
10234
+ getCustomerStoreCredit: function (customer_profile_oid, options) {
10235
+ return (0, exports.CustomerApiFp)(configuration).getCustomerStoreCredit(customer_profile_oid, options)(fetch, basePath);
10236
+ },
10071
10237
  /**
10072
10238
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
10073
10239
  * @summary Retrieve customers
@@ -10202,6 +10368,18 @@ var CustomerApi = /** @class */ (function (_super) {
10202
10368
  function CustomerApi() {
10203
10369
  return _super !== null && _super.apply(this, arguments) || this;
10204
10370
  }
10371
+ /**
10372
+ * Adds store credit to a customer
10373
+ * @summary Adds store credit to a customer
10374
+ * @param {number} customer_profile_oid The customer oid to credit.
10375
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
10376
+ * @param {*} [options] Override http request option.
10377
+ * @throws {RequiredError}
10378
+ * @memberof CustomerApi
10379
+ */
10380
+ CustomerApi.prototype.addCustomerStoreCredit = function (customer_profile_oid, store_credit_request, options) {
10381
+ return (0, exports.CustomerApiFp)(this.configuration).addCustomerStoreCredit(customer_profile_oid, store_credit_request, options)(this.fetch, this.basePath);
10382
+ };
10205
10383
  /**
10206
10384
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
10207
10385
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -10269,6 +10447,17 @@ var CustomerApi = /** @class */ (function (_super) {
10269
10447
  CustomerApi.prototype.getCustomerEmailLists = function (options) {
10270
10448
  return (0, exports.CustomerApiFp)(this.configuration).getCustomerEmailLists(options)(this.fetch, this.basePath);
10271
10449
  };
10450
+ /**
10451
+ * Retrieve the customer store credit accumulated through loyalty programs
10452
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
10453
+ * @param {number} customer_profile_oid The customer oid to retrieve.
10454
+ * @param {*} [options] Override http request option.
10455
+ * @throws {RequiredError}
10456
+ * @memberof CustomerApi
10457
+ */
10458
+ CustomerApi.prototype.getCustomerStoreCredit = function (customer_profile_oid, options) {
10459
+ return (0, exports.CustomerApiFp)(this.configuration).getCustomerStoreCredit(customer_profile_oid, options)(this.fetch, this.basePath);
10460
+ };
10272
10461
  /**
10273
10462
  * Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
10274
10463
  * @summary Retrieve customers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "3.10.7",
3
+ "version": "3.10.8",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "keywords": [