ultracart_rest_api_v2_typescript 3.10.7 → 3.10.10

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.10
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.10 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -54,6 +54,9 @@ Not every change is committed to every SDK.
54
54
 
55
55
  | Version | Date | Comments |
56
56
  | --: | :-: | --- |
57
+ | 3.10.10 | 06/06/2022 | storefront communication options for syncing to third party provider list |
58
+ | 3.10.9 | 06/01/2022 | bug fixes for customer profile store credit |
59
+ | 3.10.8 | 05/27/2022 | customer store credit |
57
60
  | 3.10.7 | 05/23/2022 | add internal gift cert to order summary, addl provider info for storefront comm |
58
61
  | 3.10.6 | 05/23/2022 | add internal gift cert to order summary, addl provider info for storefront comm |
59
62
  | 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
+ * Available store credit which is defined as unused and vested
10034
+ * @type {number}
10035
+ * @memberof CustomerStoreCredit
10036
+ */
10037
+ available?: number;
10038
+ /**
10039
+ * Amount of store credit expiring within 30 days
10040
+ * @type {number}
10041
+ * @memberof CustomerStoreCredit
10042
+ */
10043
+ expiring?: number;
10044
+ /**
10045
+ * Array of future ledger entries including expiring entries
10046
+ * @type {Array<CustomerStoreCreditLedgerEntry>}
10047
+ * @memberof CustomerStoreCredit
10048
+ */
10049
+ future_ledgers?: Array<CustomerStoreCreditLedgerEntry>;
10050
+ /**
10051
+ * Array of past ledger entries including accrual, usage, and expiring entries
10052
+ * @type {Array<CustomerStoreCreditLedgerEntry>}
10053
+ * @memberof CustomerStoreCredit
10054
+ */
10055
+ past_ledgers?: Array<CustomerStoreCreditLedgerEntry>;
10056
+ /**
10057
+ * Total lifetime store credit for this customer.
10058
+ * @type {number}
10059
+ * @memberof CustomerStoreCredit
10060
+ */
10061
+ total?: number;
10062
+ /**
10063
+ * Amount of store credit vesting
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
@@ -14429,6 +14599,18 @@ export interface EmailSegment {
14429
14599
  * @memberof EmailSegment
14430
14600
  */
14431
14601
  storefront_oid?: number;
14602
+ /**
14603
+ * List id of third party provider to sync with.
14604
+ * @type {string}
14605
+ * @memberof EmailSegment
14606
+ */
14607
+ thirdparty_list_id?: string;
14608
+ /**
14609
+ * Name of third party provider to sync segment to a list with.
14610
+ * @type {string}
14611
+ * @memberof EmailSegment
14612
+ */
14613
+ thirdparty_provider_name?: string;
14432
14614
  /**
14433
14615
  * Details on the flows or campaigns that use this list.
14434
14616
  * @type {Array<EmailListSegmentUsedBy>}
@@ -44443,6 +44625,67 @@ export class CouponApi extends BaseAPI implements CouponApiInterface {
44443
44625
  */
44444
44626
  export const CustomerApiFetchParamCreator = function (configuration?: Configuration) {
44445
44627
  return {
44628
+ /**
44629
+ * Adds store credit to a customer
44630
+ * @summary Adds store credit to a customer
44631
+ * @param {number} customer_profile_oid The customer oid to credit.
44632
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
44633
+ * @param {*} [options] Override http request option.
44634
+ * @throws {RequiredError}
44635
+ */
44636
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options: any = {}): FetchArgs {
44637
+ // verify required parameter 'customer_profile_oid' is not null or undefined
44638
+ if (customer_profile_oid === null || customer_profile_oid === undefined) {
44639
+ throw new RequiredError('customer_profile_oid','Required parameter customer_profile_oid was null or undefined when calling addCustomerStoreCredit.');
44640
+ }
44641
+ // verify required parameter 'store_credit_request' is not null or undefined
44642
+ if (store_credit_request === null || store_credit_request === undefined) {
44643
+ throw new RequiredError('store_credit_request','Required parameter store_credit_request was null or undefined when calling addCustomerStoreCredit.');
44644
+ }
44645
+ const localVarPath = `/customer/customers/{customer_profile_oid}/store_credit`
44646
+ .replace(`{${"customer_profile_oid"}}`, encodeURIComponent(String(customer_profile_oid)));
44647
+ const localVarUrlObj = url.parse(localVarPath, true);
44648
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
44649
+ const localVarHeaderParameter = {} as any;
44650
+ const localVarQueryParameter = {} as any;
44651
+
44652
+ if(configuration && configuration.apiVersion) {
44653
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
44654
+ }
44655
+
44656
+
44657
+
44658
+ // authentication ultraCartOauth required
44659
+ // oauth required
44660
+ if (configuration && configuration.accessToken) {
44661
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
44662
+ ? configuration.accessToken("ultraCartOauth", ["customer_write"])
44663
+ : configuration.accessToken;
44664
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
44665
+ }
44666
+
44667
+ // authentication ultraCartSimpleApiKey required
44668
+ if (configuration && configuration.apiKey) {
44669
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
44670
+ ? configuration.apiKey("x-ultracart-simple-key")
44671
+ : configuration.apiKey;
44672
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
44673
+ }
44674
+
44675
+ localVarHeaderParameter['Content-Type'] = 'application/json; charset=UTF-8';
44676
+
44677
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
44678
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
44679
+ delete localVarUrlObj.search;
44680
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
44681
+ const needsSerialization = (<any>"CustomerStoreCreditAddRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
44682
+ localVarRequestOptions.body = needsSerialization ? JSON.stringify(store_credit_request || {}) : (store_credit_request || "");
44683
+
44684
+ return {
44685
+ url: url.format(localVarUrlObj),
44686
+ options: localVarRequestOptions,
44687
+ };
44688
+ },
44446
44689
  /**
44447
44690
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
44448
44691
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -44735,6 +44978,58 @@ export const CustomerApiFetchParamCreator = function (configuration?: Configurat
44735
44978
 
44736
44979
 
44737
44980
 
44981
+ // authentication ultraCartOauth required
44982
+ // oauth required
44983
+ if (configuration && configuration.accessToken) {
44984
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
44985
+ ? configuration.accessToken("ultraCartOauth", ["customer_read"])
44986
+ : configuration.accessToken;
44987
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
44988
+ }
44989
+
44990
+ // authentication ultraCartSimpleApiKey required
44991
+ if (configuration && configuration.apiKey) {
44992
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
44993
+ ? configuration.apiKey("x-ultracart-simple-key")
44994
+ : configuration.apiKey;
44995
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
44996
+ }
44997
+
44998
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
44999
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
45000
+ delete localVarUrlObj.search;
45001
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
45002
+
45003
+ return {
45004
+ url: url.format(localVarUrlObj),
45005
+ options: localVarRequestOptions,
45006
+ };
45007
+ },
45008
+ /**
45009
+ * Retrieve the customer store credit accumulated through loyalty programs
45010
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
45011
+ * @param {number} customer_profile_oid The customer oid to retrieve.
45012
+ * @param {*} [options] Override http request option.
45013
+ * @throws {RequiredError}
45014
+ */
45015
+ getCustomerStoreCredit(customer_profile_oid: number, options: any = {}): FetchArgs {
45016
+ // verify required parameter 'customer_profile_oid' is not null or undefined
45017
+ if (customer_profile_oid === null || customer_profile_oid === undefined) {
45018
+ throw new RequiredError('customer_profile_oid','Required parameter customer_profile_oid was null or undefined when calling getCustomerStoreCredit.');
45019
+ }
45020
+ const localVarPath = `/customer/customers/{customer_profile_oid}/store_credit`
45021
+ .replace(`{${"customer_profile_oid"}}`, encodeURIComponent(String(customer_profile_oid)));
45022
+ const localVarUrlObj = url.parse(localVarPath, true);
45023
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
45024
+ const localVarHeaderParameter = {} as any;
45025
+ const localVarQueryParameter = {} as any;
45026
+
45027
+ if(configuration && configuration.apiVersion) {
45028
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
45029
+ }
45030
+
45031
+
45032
+
44738
45033
  // authentication ultraCartOauth required
44739
45034
  // oauth required
44740
45035
  if (configuration && configuration.accessToken) {
@@ -45405,6 +45700,28 @@ export const CustomerApiFetchParamCreator = function (configuration?: Configurat
45405
45700
  */
45406
45701
  export const CustomerApiFp = function(configuration?: Configuration) {
45407
45702
  return {
45703
+ /**
45704
+ * Adds store credit to a customer
45705
+ * @summary Adds store credit to a customer
45706
+ * @param {number} customer_profile_oid The customer oid to credit.
45707
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
45708
+ * @param {*} [options] Override http request option.
45709
+ * @throws {RequiredError}
45710
+ */
45711
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<BaseResponse> {
45712
+ const localVarFetchArgs = CustomerApiFetchParamCreator(configuration).addCustomerStoreCredit(customer_profile_oid, store_credit_request, options);
45713
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
45714
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
45715
+
45716
+ if (response.status >= 200 && response.status < 300) {
45717
+ return response.json();
45718
+
45719
+ } else {
45720
+ throw response;
45721
+ }
45722
+ });
45723
+ };
45724
+ },
45408
45725
  /**
45409
45726
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
45410
45727
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -45532,6 +45849,27 @@ export const CustomerApiFp = function(configuration?: Configuration) {
45532
45849
  });
45533
45850
  };
45534
45851
  },
45852
+ /**
45853
+ * Retrieve the customer store credit accumulated through loyalty programs
45854
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
45855
+ * @param {number} customer_profile_oid The customer oid to retrieve.
45856
+ * @param {*} [options] Override http request option.
45857
+ * @throws {RequiredError}
45858
+ */
45859
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<CustomerStoreCreditResponse> {
45860
+ const localVarFetchArgs = CustomerApiFetchParamCreator(configuration).getCustomerStoreCredit(customer_profile_oid, options);
45861
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
45862
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
45863
+
45864
+ if (response.status >= 200 && response.status < 300) {
45865
+ return response.json();
45866
+
45867
+ } else {
45868
+ throw response;
45869
+ }
45870
+ });
45871
+ };
45872
+ },
45535
45873
  /**
45536
45874
  * 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
45875
  * @summary Retrieve customers
@@ -45749,6 +46087,17 @@ export const CustomerApiFp = function(configuration?: Configuration) {
45749
46087
  */
45750
46088
  export const CustomerApiFactory = function (configuration?: Configuration, fetch?: FetchAPI, basePath?: string) {
45751
46089
  return {
46090
+ /**
46091
+ * Adds store credit to a customer
46092
+ * @summary Adds store credit to a customer
46093
+ * @param {number} customer_profile_oid The customer oid to credit.
46094
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
46095
+ * @param {*} [options] Override http request option.
46096
+ * @throws {RequiredError}
46097
+ */
46098
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any) {
46099
+ return CustomerApiFp(configuration).addCustomerStoreCredit(customer_profile_oid, store_credit_request, options)(fetch, basePath);
46100
+ },
45752
46101
  /**
45753
46102
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
45754
46103
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -45810,6 +46159,16 @@ export const CustomerApiFactory = function (configuration?: Configuration, fetch
45810
46159
  getCustomerEmailLists(options?: any) {
45811
46160
  return CustomerApiFp(configuration).getCustomerEmailLists(options)(fetch, basePath);
45812
46161
  },
46162
+ /**
46163
+ * Retrieve the customer store credit accumulated through loyalty programs
46164
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
46165
+ * @param {number} customer_profile_oid The customer oid to retrieve.
46166
+ * @param {*} [options] Override http request option.
46167
+ * @throws {RequiredError}
46168
+ */
46169
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any) {
46170
+ return CustomerApiFp(configuration).getCustomerStoreCredit(customer_profile_oid, options)(fetch, basePath);
46171
+ },
45813
46172
  /**
45814
46173
  * 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
46174
  * @summary Retrieve customers
@@ -45939,6 +46298,17 @@ export const CustomerApiFactory = function (configuration?: Configuration, fetch
45939
46298
  * @interface CustomerApi
45940
46299
  */
45941
46300
  export interface CustomerApiInterface {
46301
+ /**
46302
+ * Adds store credit to a customer
46303
+ * @summary Adds store credit to a customer
46304
+ * @param {number} customer_profile_oid The customer oid to credit.
46305
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
46306
+ * @param {*} [options] Override http request option.
46307
+ * @throws {RequiredError}
46308
+ * @memberof CustomerApiInterface
46309
+ */
46310
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): Promise<BaseResponse>;
46311
+
45942
46312
  /**
45943
46313
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
45944
46314
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -46000,6 +46370,16 @@ export interface CustomerApiInterface {
46000
46370
  */
46001
46371
  getCustomerEmailLists(options?: any): Promise<EmailListsResponse>;
46002
46372
 
46373
+ /**
46374
+ * Retrieve the customer store credit accumulated through loyalty programs
46375
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
46376
+ * @param {number} customer_profile_oid The customer oid to retrieve.
46377
+ * @param {*} [options] Override http request option.
46378
+ * @throws {RequiredError}
46379
+ * @memberof CustomerApiInterface
46380
+ */
46381
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): Promise<CustomerStoreCreditResponse>;
46382
+
46003
46383
  /**
46004
46384
  * 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
46385
  * @summary Retrieve customers
@@ -46129,6 +46509,19 @@ export interface CustomerApiInterface {
46129
46509
  * @extends {BaseAPI}
46130
46510
  */
46131
46511
  export class CustomerApi extends BaseAPI implements CustomerApiInterface {
46512
+ /**
46513
+ * Adds store credit to a customer
46514
+ * @summary Adds store credit to a customer
46515
+ * @param {number} customer_profile_oid The customer oid to credit.
46516
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
46517
+ * @param {*} [options] Override http request option.
46518
+ * @throws {RequiredError}
46519
+ * @memberof CustomerApi
46520
+ */
46521
+ public addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any) {
46522
+ return CustomerApiFp(this.configuration).addCustomerStoreCredit(customer_profile_oid, store_credit_request, options)(this.fetch, this.basePath);
46523
+ }
46524
+
46132
46525
  /**
46133
46526
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
46134
46527
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -46202,6 +46595,18 @@ export class CustomerApi extends BaseAPI implements CustomerApiInterface {
46202
46595
  return CustomerApiFp(this.configuration).getCustomerEmailLists(options)(this.fetch, this.basePath);
46203
46596
  }
46204
46597
 
46598
+ /**
46599
+ * Retrieve the customer store credit accumulated through loyalty programs
46600
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
46601
+ * @param {number} customer_profile_oid The customer oid to retrieve.
46602
+ * @param {*} [options] Override http request option.
46603
+ * @throws {RequiredError}
46604
+ * @memberof CustomerApi
46605
+ */
46606
+ public getCustomerStoreCredit(customer_profile_oid: number, options?: any) {
46607
+ return CustomerApiFp(this.configuration).getCustomerStoreCredit(customer_profile_oid, options)(this.fetch, this.basePath);
46608
+ }
46609
+
46205
46610
  /**
46206
46611
  * 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
46612
  * @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
+ * Available store credit which is defined as unused and vested
9802
+ * @type {number}
9803
+ * @memberof CustomerStoreCredit
9804
+ */
9805
+ available?: number;
9806
+ /**
9807
+ * Amount of store credit expiring within 30 days
9808
+ * @type {number}
9809
+ * @memberof CustomerStoreCredit
9810
+ */
9811
+ expiring?: number;
9812
+ /**
9813
+ * Array of future ledger entries including expiring entries
9814
+ * @type {Array<CustomerStoreCreditLedgerEntry>}
9815
+ * @memberof CustomerStoreCredit
9816
+ */
9817
+ future_ledgers?: Array<CustomerStoreCreditLedgerEntry>;
9818
+ /**
9819
+ * Array of past ledger entries including accrual, usage, and expiring entries
9820
+ * @type {Array<CustomerStoreCreditLedgerEntry>}
9821
+ * @memberof CustomerStoreCredit
9822
+ */
9823
+ past_ledgers?: Array<CustomerStoreCreditLedgerEntry>;
9824
+ /**
9825
+ * Total lifetime store credit for this customer.
9826
+ * @type {number}
9827
+ * @memberof CustomerStoreCredit
9828
+ */
9829
+ total?: number;
9830
+ /**
9831
+ * Amount of store credit vesting
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
@@ -14110,6 +14276,18 @@ export interface EmailSegment {
14110
14276
  * @memberof EmailSegment
14111
14277
  */
14112
14278
  storefront_oid?: number;
14279
+ /**
14280
+ * List id of third party provider to sync with.
14281
+ * @type {string}
14282
+ * @memberof EmailSegment
14283
+ */
14284
+ thirdparty_list_id?: string;
14285
+ /**
14286
+ * Name of third party provider to sync segment to a list with.
14287
+ * @type {string}
14288
+ * @memberof EmailSegment
14289
+ */
14290
+ thirdparty_provider_name?: string;
14113
14291
  /**
14114
14292
  * Details on the flows or campaigns that use this list.
14115
14293
  * @type {Array<EmailListSegmentUsedBy>}
@@ -38475,6 +38653,15 @@ export declare class CouponApi extends BaseAPI implements CouponApiInterface {
38475
38653
  * @export
38476
38654
  */
38477
38655
  export declare const CustomerApiFetchParamCreator: (configuration?: Configuration) => {
38656
+ /**
38657
+ * Adds store credit to a customer
38658
+ * @summary Adds store credit to a customer
38659
+ * @param {number} customer_profile_oid The customer oid to credit.
38660
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
38661
+ * @param {*} [options] Override http request option.
38662
+ * @throws {RequiredError}
38663
+ */
38664
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): FetchArgs;
38478
38665
  /**
38479
38666
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
38480
38667
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -38524,6 +38711,14 @@ export declare const CustomerApiFetchParamCreator: (configuration?: Configuratio
38524
38711
  * @throws {RequiredError}
38525
38712
  */
38526
38713
  getCustomerEmailLists(options?: any): FetchArgs;
38714
+ /**
38715
+ * Retrieve the customer store credit accumulated through loyalty programs
38716
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
38717
+ * @param {number} customer_profile_oid The customer oid to retrieve.
38718
+ * @param {*} [options] Override http request option.
38719
+ * @throws {RequiredError}
38720
+ */
38721
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): FetchArgs;
38527
38722
  /**
38528
38723
  * 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
38724
  * @summary Retrieve customers
@@ -38634,6 +38829,15 @@ export declare const CustomerApiFetchParamCreator: (configuration?: Configuratio
38634
38829
  * @export
38635
38830
  */
38636
38831
  export declare const CustomerApiFp: (configuration?: Configuration) => {
38832
+ /**
38833
+ * Adds store credit to a customer
38834
+ * @summary Adds store credit to a customer
38835
+ * @param {number} customer_profile_oid The customer oid to credit.
38836
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
38837
+ * @param {*} [options] Override http request option.
38838
+ * @throws {RequiredError}
38839
+ */
38840
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<BaseResponse>;
38637
38841
  /**
38638
38842
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
38639
38843
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -38683,6 +38887,14 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
38683
38887
  * @throws {RequiredError}
38684
38888
  */
38685
38889
  getCustomerEmailLists(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<EmailListsResponse>;
38890
+ /**
38891
+ * Retrieve the customer store credit accumulated through loyalty programs
38892
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
38893
+ * @param {number} customer_profile_oid The customer oid to retrieve.
38894
+ * @param {*} [options] Override http request option.
38895
+ * @throws {RequiredError}
38896
+ */
38897
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<CustomerStoreCreditResponse>;
38686
38898
  /**
38687
38899
  * 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
38900
  * @summary Retrieve customers
@@ -38793,6 +39005,15 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
38793
39005
  * @export
38794
39006
  */
38795
39007
  export declare const CustomerApiFactory: (configuration?: Configuration, fetch?: FetchAPI, basePath?: string) => {
39008
+ /**
39009
+ * Adds store credit to a customer
39010
+ * @summary Adds store credit to a customer
39011
+ * @param {number} customer_profile_oid The customer oid to credit.
39012
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
39013
+ * @param {*} [options] Override http request option.
39014
+ * @throws {RequiredError}
39015
+ */
39016
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): Promise<BaseResponse>;
38796
39017
  /**
38797
39018
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
38798
39019
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -38842,6 +39063,14 @@ export declare const CustomerApiFactory: (configuration?: Configuration, fetch?:
38842
39063
  * @throws {RequiredError}
38843
39064
  */
38844
39065
  getCustomerEmailLists(options?: any): Promise<EmailListsResponse>;
39066
+ /**
39067
+ * Retrieve the customer store credit accumulated through loyalty programs
39068
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
39069
+ * @param {number} customer_profile_oid The customer oid to retrieve.
39070
+ * @param {*} [options] Override http request option.
39071
+ * @throws {RequiredError}
39072
+ */
39073
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): Promise<CustomerStoreCreditResponse>;
38845
39074
  /**
38846
39075
  * 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
39076
  * @summary Retrieve customers
@@ -38953,6 +39182,16 @@ export declare const CustomerApiFactory: (configuration?: Configuration, fetch?:
38953
39182
  * @interface CustomerApi
38954
39183
  */
38955
39184
  export interface CustomerApiInterface {
39185
+ /**
39186
+ * Adds store credit to a customer
39187
+ * @summary Adds store credit to a customer
39188
+ * @param {number} customer_profile_oid The customer oid to credit.
39189
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
39190
+ * @param {*} [options] Override http request option.
39191
+ * @throws {RequiredError}
39192
+ * @memberof CustomerApiInterface
39193
+ */
39194
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): Promise<BaseResponse>;
38956
39195
  /**
38957
39196
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
38958
39197
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -39008,6 +39247,15 @@ export interface CustomerApiInterface {
39008
39247
  * @memberof CustomerApiInterface
39009
39248
  */
39010
39249
  getCustomerEmailLists(options?: any): Promise<EmailListsResponse>;
39250
+ /**
39251
+ * Retrieve the customer store credit accumulated through loyalty programs
39252
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
39253
+ * @param {number} customer_profile_oid The customer oid to retrieve.
39254
+ * @param {*} [options] Override http request option.
39255
+ * @throws {RequiredError}
39256
+ * @memberof CustomerApiInterface
39257
+ */
39258
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): Promise<CustomerStoreCreditResponse>;
39011
39259
  /**
39012
39260
  * 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
39261
  * @summary Retrieve customers
@@ -39128,6 +39376,16 @@ export interface CustomerApiInterface {
39128
39376
  * @extends {BaseAPI}
39129
39377
  */
39130
39378
  export declare class CustomerApi extends BaseAPI implements CustomerApiInterface {
39379
+ /**
39380
+ * Adds store credit to a customer
39381
+ * @summary Adds store credit to a customer
39382
+ * @param {number} customer_profile_oid The customer oid to credit.
39383
+ * @param {CustomerStoreCreditAddRequest} store_credit_request Store credit to add
39384
+ * @param {*} [options] Override http request option.
39385
+ * @throws {RequiredError}
39386
+ * @memberof CustomerApi
39387
+ */
39388
+ addCustomerStoreCredit(customer_profile_oid: number, store_credit_request: CustomerStoreCreditAddRequest, options?: any): Promise<BaseResponse>;
39131
39389
  /**
39132
39390
  * Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
39133
39391
  * @summary Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
@@ -39183,6 +39441,15 @@ export declare class CustomerApi extends BaseAPI implements CustomerApiInterface
39183
39441
  * @memberof CustomerApi
39184
39442
  */
39185
39443
  getCustomerEmailLists(options?: any): Promise<EmailListsResponse>;
39444
+ /**
39445
+ * Retrieve the customer store credit accumulated through loyalty programs
39446
+ * @summary Retrieve the customer store credit accumulated through loyalty programs
39447
+ * @param {number} customer_profile_oid The customer oid to retrieve.
39448
+ * @param {*} [options] Override http request option.
39449
+ * @throws {RequiredError}
39450
+ * @memberof CustomerApi
39451
+ */
39452
+ getCustomerStoreCredit(customer_profile_oid: number, options?: any): Promise<CustomerStoreCreditResponse>;
39186
39453
  /**
39187
39454
  * 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
39455
  * @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.10",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "keywords": [