ultracart_rest_api_v2_typescript 3.11.26 → 3.11.28

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.11.26
1
+ ## ultracart_rest_api_v2_typescript@3.11.28
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.11.26 --save
39
+ npm install ultracart_rest_api_v2_typescript@3.11.28 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -54,6 +54,8 @@ Not every change is committed to every SDK.
54
54
 
55
55
  | Version | Date | Comments |
56
56
  | --: | :-: | --- |
57
+ | 3.11.28 | 11/07/2025 | OrderApi.assignToAffiliate |
58
+ | 3.11.27 | 11/06/2025 | conversation ai knowledge base changes |
57
59
  | 3.11.26 | 10/20/2025 | conversation api bug fixes |
58
60
  | 3.11.25 | 10/20/2025 | conversation api bug fix for bad url on agent profile kb upload |
59
61
  | 3.11.24 | 10/20/2025 | new perm flag on conversation virtual agent capabilities |
package/api.ts CHANGED
@@ -8285,6 +8285,12 @@ export interface ConversationEventWebchatContext {
8285
8285
  * @interface ConversationInsertKnowledgeBaseDocumentRequest
8286
8286
  */
8287
8287
  export interface ConversationInsertKnowledgeBaseDocumentRequest {
8288
+ /**
8289
+ *
8290
+ * @type {string}
8291
+ * @memberof ConversationInsertKnowledgeBaseDocumentRequest
8292
+ */
8293
+ original_file_name?: string;
8288
8294
  /**
8289
8295
  *
8290
8296
  * @type {string}
@@ -8405,6 +8411,12 @@ export interface ConversationKnowledgeBaseDocument {
8405
8411
  * @memberof ConversationKnowledgeBaseDocument
8406
8412
  */
8407
8413
  s3_key?: string;
8414
+ /**
8415
+ *
8416
+ * @type {string}
8417
+ * @memberof ConversationKnowledgeBaseDocument
8418
+ */
8419
+ s3_url?: string;
8408
8420
  }
8409
8421
 
8410
8422
  /**
@@ -33722,6 +33734,32 @@ export namespace OrderAffiliateLedger {
33722
33734
  }
33723
33735
  }
33724
33736
 
33737
+ /**
33738
+ *
33739
+ * @export
33740
+ * @interface OrderAssignToAffiliateRequest
33741
+ */
33742
+ export interface OrderAssignToAffiliateRequest {
33743
+ /**
33744
+ * Affiliate email to associate with the order
33745
+ * @type {string}
33746
+ * @memberof OrderAssignToAffiliateRequest
33747
+ */
33748
+ affiliate_email?: string;
33749
+ /**
33750
+ * Affiliate id to associate with the order
33751
+ * @type {number}
33752
+ * @memberof OrderAssignToAffiliateRequest
33753
+ */
33754
+ affiliate_id?: number;
33755
+ /**
33756
+ * Affiliate sub id to associate with the order
33757
+ * @type {string}
33758
+ * @memberof OrderAssignToAffiliateRequest
33759
+ */
33760
+ affiliate_sub_id?: string;
33761
+ }
33762
+
33725
33763
  /**
33726
33764
  *
33727
33765
  * @export
@@ -35997,7 +36035,8 @@ export namespace OrderPayment {
35997
36035
  ApplePay = <any> 'Apple Pay',
35998
36036
  GooglePay = <any> 'Google Pay',
35999
36037
  HealthBenefitCard = <any> 'Health Benefit Card',
36000
- PayPalFastlane = <any> 'PayPal Fastlane'
36038
+ PayPalFastlane = <any> 'PayPal Fastlane',
36039
+ Klarna = <any> 'Klarna'
36001
36040
  }
36002
36041
  /**
36003
36042
  * @export
@@ -76895,6 +76934,72 @@ export const OrderApiFetchParamCreator = function (configuration?: Configuration
76895
76934
  options: localVarRequestOptions,
76896
76935
  };
76897
76936
  },
76937
+ /**
76938
+ * Assigns an order to an affiliate.
76939
+ * @summary Assigns an order to an affiliate
76940
+ * @param {string} order_id The order id to assign to the affiliate.
76941
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
76942
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
76943
+ * @param {*} [options] Override http request option.
76944
+ * @throws {RequiredError}
76945
+ */
76946
+ assignToAffiliate(order_id: string, assign_to_affiliate_request: OrderAssignToAffiliateRequest, _expand?: string, options: any = {}): FetchArgs {
76947
+ // verify required parameter 'order_id' is not null or undefined
76948
+ if (order_id === null || order_id === undefined) {
76949
+ throw new RequiredError('order_id','Required parameter order_id was null or undefined when calling assignToAffiliate.');
76950
+ }
76951
+ // verify required parameter 'assign_to_affiliate_request' is not null or undefined
76952
+ if (assign_to_affiliate_request === null || assign_to_affiliate_request === undefined) {
76953
+ throw new RequiredError('assign_to_affiliate_request','Required parameter assign_to_affiliate_request was null or undefined when calling assignToAffiliate.');
76954
+ }
76955
+ const localVarPath = `/order/orders/{order_id}/assignToAffiliate`
76956
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
76957
+ const localVarUrlObj = url.parse(localVarPath, true);
76958
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
76959
+ const localVarHeaderParameter = {} as any;
76960
+ const localVarQueryParameter = {} as any;
76961
+
76962
+ if(configuration && configuration.apiVersion) {
76963
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
76964
+ }
76965
+
76966
+
76967
+
76968
+ // authentication ultraCartOauth required
76969
+ // oauth required
76970
+ if (configuration && configuration.accessToken) {
76971
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
76972
+ ? configuration.accessToken("ultraCartOauth", ["order_write"])
76973
+ : configuration.accessToken;
76974
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
76975
+ }
76976
+
76977
+ // authentication ultraCartSimpleApiKey required
76978
+ if (configuration && configuration.apiKey) {
76979
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
76980
+ ? configuration.apiKey("x-ultracart-simple-key")
76981
+ : configuration.apiKey;
76982
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
76983
+ }
76984
+
76985
+ if (_expand !== undefined) {
76986
+ localVarQueryParameter['_expand'] = _expand;
76987
+ }
76988
+
76989
+ localVarHeaderParameter['Content-Type'] = 'application/json';
76990
+
76991
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
76992
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
76993
+ delete localVarUrlObj.search;
76994
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
76995
+ const needsSerialization = (<any>"OrderAssignToAffiliateRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
76996
+ localVarRequestOptions.body = needsSerialization ? JSON.stringify(assign_to_affiliate_request || {}) : (assign_to_affiliate_request || "");
76997
+
76998
+ return {
76999
+ url: url.format(localVarUrlObj),
77000
+ options: localVarRequestOptions,
77001
+ };
77002
+ },
76898
77003
  /**
76899
77004
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
76900
77005
  * @summary Set a refund block on an order
@@ -78769,6 +78874,29 @@ export const OrderApiFp = function(configuration?: Configuration) {
78769
78874
  });
78770
78875
  };
78771
78876
  },
78877
+ /**
78878
+ * Assigns an order to an affiliate.
78879
+ * @summary Assigns an order to an affiliate
78880
+ * @param {string} order_id The order id to assign to the affiliate.
78881
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
78882
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
78883
+ * @param {*} [options] Override http request option.
78884
+ * @throws {RequiredError}
78885
+ */
78886
+ assignToAffiliate(order_id: string, assign_to_affiliate_request: OrderAssignToAffiliateRequest, _expand?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderResponse> {
78887
+ const localVarFetchArgs = OrderApiFetchParamCreator(configuration).assignToAffiliate(order_id, assign_to_affiliate_request, _expand, options);
78888
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
78889
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
78890
+
78891
+ if (response.status >= 200 && response.status < 300) {
78892
+ return response.json();
78893
+
78894
+ } else {
78895
+ throw response;
78896
+ }
78897
+ });
78898
+ };
78899
+ },
78772
78900
  /**
78773
78901
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
78774
78902
  * @summary Set a refund block on an order
@@ -79457,6 +79585,18 @@ export const OrderApiFactory = function (configuration?: Configuration, fetch?:
79457
79585
  adjustOrderTotal(order_id: string, desired_total: string, options?: any) {
79458
79586
  return OrderApiFp(configuration).adjustOrderTotal(order_id, desired_total, options)(fetch, basePath);
79459
79587
  },
79588
+ /**
79589
+ * Assigns an order to an affiliate.
79590
+ * @summary Assigns an order to an affiliate
79591
+ * @param {string} order_id The order id to assign to the affiliate.
79592
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
79593
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
79594
+ * @param {*} [options] Override http request option.
79595
+ * @throws {RequiredError}
79596
+ */
79597
+ assignToAffiliate(order_id: string, assign_to_affiliate_request: OrderAssignToAffiliateRequest, _expand?: string, options?: any) {
79598
+ return OrderApiFp(configuration).assignToAffiliate(order_id, assign_to_affiliate_request, _expand, options)(fetch, basePath);
79599
+ },
79460
79600
  /**
79461
79601
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
79462
79602
  * @summary Set a refund block on an order
@@ -79826,6 +79966,18 @@ export interface OrderApiInterface {
79826
79966
  */
79827
79967
  adjustOrderTotal(order_id: string, desired_total: string, options?: any): Promise<BaseResponse>;
79828
79968
 
79969
+ /**
79970
+ * Assigns an order to an affiliate.
79971
+ * @summary Assigns an order to an affiliate
79972
+ * @param {string} order_id The order id to assign to the affiliate.
79973
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
79974
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
79975
+ * @param {*} [options] Override http request option.
79976
+ * @throws {RequiredError}
79977
+ * @memberof OrderApiInterface
79978
+ */
79979
+ assignToAffiliate(order_id: string, assign_to_affiliate_request: OrderAssignToAffiliateRequest, _expand?: string, options?: any): Promise<OrderResponse>;
79980
+
79829
79981
  /**
79830
79982
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
79831
79983
  * @summary Set a refund block on an order
@@ -80197,6 +80349,20 @@ export class OrderApi extends BaseAPI implements OrderApiInterface {
80197
80349
  return OrderApiFp(this.configuration).adjustOrderTotal(order_id, desired_total, options)(this.fetch, this.basePath);
80198
80350
  }
80199
80351
 
80352
+ /**
80353
+ * Assigns an order to an affiliate.
80354
+ * @summary Assigns an order to an affiliate
80355
+ * @param {string} order_id The order id to assign to the affiliate.
80356
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
80357
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
80358
+ * @param {*} [options] Override http request option.
80359
+ * @throws {RequiredError}
80360
+ * @memberof OrderApi
80361
+ */
80362
+ public assignToAffiliate(order_id: string, assign_to_affiliate_request: OrderAssignToAffiliateRequest, _expand?: string, options?: any) {
80363
+ return OrderApiFp(this.configuration).assignToAffiliate(order_id, assign_to_affiliate_request, _expand, options)(this.fetch, this.basePath);
80364
+ }
80365
+
80200
80366
  /**
80201
80367
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
80202
80368
  * @summary Set a refund block on an order
package/dist/api.d.ts CHANGED
@@ -8090,6 +8090,12 @@ export interface ConversationEventWebchatContext {
8090
8090
  * @interface ConversationInsertKnowledgeBaseDocumentRequest
8091
8091
  */
8092
8092
  export interface ConversationInsertKnowledgeBaseDocumentRequest {
8093
+ /**
8094
+ *
8095
+ * @type {string}
8096
+ * @memberof ConversationInsertKnowledgeBaseDocumentRequest
8097
+ */
8098
+ original_file_name?: string;
8093
8099
  /**
8094
8100
  *
8095
8101
  * @type {string}
@@ -8207,6 +8213,12 @@ export interface ConversationKnowledgeBaseDocument {
8207
8213
  * @memberof ConversationKnowledgeBaseDocument
8208
8214
  */
8209
8215
  s3_key?: string;
8216
+ /**
8217
+ *
8218
+ * @type {string}
8219
+ * @memberof ConversationKnowledgeBaseDocument
8220
+ */
8221
+ s3_url?: string;
8210
8222
  }
8211
8223
  /**
8212
8224
  *
@@ -33000,6 +33012,31 @@ export declare namespace OrderAffiliateLedger {
33000
33012
  PartiallyPaid
33001
33013
  }
33002
33014
  }
33015
+ /**
33016
+ *
33017
+ * @export
33018
+ * @interface OrderAssignToAffiliateRequest
33019
+ */
33020
+ export interface OrderAssignToAffiliateRequest {
33021
+ /**
33022
+ * Affiliate email to associate with the order
33023
+ * @type {string}
33024
+ * @memberof OrderAssignToAffiliateRequest
33025
+ */
33026
+ affiliate_email?: string;
33027
+ /**
33028
+ * Affiliate id to associate with the order
33029
+ * @type {number}
33030
+ * @memberof OrderAssignToAffiliateRequest
33031
+ */
33032
+ affiliate_id?: number;
33033
+ /**
33034
+ * Affiliate sub id to associate with the order
33035
+ * @type {string}
33036
+ * @memberof OrderAssignToAffiliateRequest
33037
+ */
33038
+ affiliate_sub_id?: string;
33039
+ }
33003
33040
  /**
33004
33041
  *
33005
33042
  * @export
@@ -35236,7 +35273,8 @@ export declare namespace OrderPayment {
35236
35273
  ApplePay,
35237
35274
  GooglePay,
35238
35275
  HealthBenefitCard,
35239
- PayPalFastlane
35276
+ PayPalFastlane,
35277
+ Klarna
35240
35278
  }
35241
35279
  /**
35242
35280
  * @export
@@ -58159,6 +58197,16 @@ export declare const OrderApiFetchParamCreator: (configuration?: Configuration)
58159
58197
  * @throws {RequiredError}
58160
58198
  */
58161
58199
  adjustOrderTotal(order_id: string, desired_total: string, options?: any): FetchArgs;
58200
+ /**
58201
+ * Assigns an order to an affiliate.
58202
+ * @summary Assigns an order to an affiliate
58203
+ * @param {string} order_id The order id to assign to the affiliate.
58204
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
58205
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
58206
+ * @param {*} [options] Override http request option.
58207
+ * @throws {RequiredError}
58208
+ */
58209
+ assignToAffiliate(order_id: string, assign_to_affiliate_request: OrderAssignToAffiliateRequest, _expand?: string, options?: any): FetchArgs;
58162
58210
  /**
58163
58211
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
58164
58212
  * @summary Set a refund block on an order
@@ -58465,6 +58513,16 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
58465
58513
  * @throws {RequiredError}
58466
58514
  */
58467
58515
  adjustOrderTotal(order_id: string, desired_total: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<BaseResponse>;
58516
+ /**
58517
+ * Assigns an order to an affiliate.
58518
+ * @summary Assigns an order to an affiliate
58519
+ * @param {string} order_id The order id to assign to the affiliate.
58520
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
58521
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
58522
+ * @param {*} [options] Override http request option.
58523
+ * @throws {RequiredError}
58524
+ */
58525
+ assignToAffiliate(order_id: string, assign_to_affiliate_request: OrderAssignToAffiliateRequest, _expand?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderResponse>;
58468
58526
  /**
58469
58527
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
58470
58528
  * @summary Set a refund block on an order
@@ -58771,6 +58829,16 @@ export declare const OrderApiFactory: (configuration?: Configuration, fetch?: Fe
58771
58829
  * @throws {RequiredError}
58772
58830
  */
58773
58831
  adjustOrderTotal(order_id: string, desired_total: string, options?: any): Promise<BaseResponse>;
58832
+ /**
58833
+ * Assigns an order to an affiliate.
58834
+ * @summary Assigns an order to an affiliate
58835
+ * @param {string} order_id The order id to assign to the affiliate.
58836
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
58837
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
58838
+ * @param {*} [options] Override http request option.
58839
+ * @throws {RequiredError}
58840
+ */
58841
+ assignToAffiliate(order_id: string, assign_to_affiliate_request: OrderAssignToAffiliateRequest, _expand?: string, options?: any): Promise<OrderResponse>;
58774
58842
  /**
58775
58843
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
58776
58844
  * @summary Set a refund block on an order
@@ -59079,6 +59147,17 @@ export interface OrderApiInterface {
59079
59147
  * @memberof OrderApiInterface
59080
59148
  */
59081
59149
  adjustOrderTotal(order_id: string, desired_total: string, options?: any): Promise<BaseResponse>;
59150
+ /**
59151
+ * Assigns an order to an affiliate.
59152
+ * @summary Assigns an order to an affiliate
59153
+ * @param {string} order_id The order id to assign to the affiliate.
59154
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
59155
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
59156
+ * @param {*} [options] Override http request option.
59157
+ * @throws {RequiredError}
59158
+ * @memberof OrderApiInterface
59159
+ */
59160
+ assignToAffiliate(order_id: string, assign_to_affiliate_request: OrderAssignToAffiliateRequest, _expand?: string, options?: any): Promise<OrderResponse>;
59082
59161
  /**
59083
59162
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
59084
59163
  * @summary Set a refund block on an order
@@ -59417,6 +59496,17 @@ export declare class OrderApi extends BaseAPI implements OrderApiInterface {
59417
59496
  * @memberof OrderApi
59418
59497
  */
59419
59498
  adjustOrderTotal(order_id: string, desired_total: string, options?: any): Promise<BaseResponse>;
59499
+ /**
59500
+ * Assigns an order to an affiliate.
59501
+ * @summary Assigns an order to an affiliate
59502
+ * @param {string} order_id The order id to assign to the affiliate.
59503
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
59504
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
59505
+ * @param {*} [options] Override http request option.
59506
+ * @throws {RequiredError}
59507
+ * @memberof OrderApi
59508
+ */
59509
+ assignToAffiliate(order_id: string, assign_to_affiliate_request: OrderAssignToAffiliateRequest, _expand?: string, options?: any): Promise<OrderResponse>;
59420
59510
  /**
59421
59511
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
59422
59512
  * @summary Set a refund block on an order
package/dist/api.js CHANGED
@@ -1427,6 +1427,7 @@ var OrderPayment;
1427
1427
  PaymentMethodEnum[PaymentMethodEnum["GooglePay"] = 'Google Pay'] = "GooglePay";
1428
1428
  PaymentMethodEnum[PaymentMethodEnum["HealthBenefitCard"] = 'Health Benefit Card'] = "HealthBenefitCard";
1429
1429
  PaymentMethodEnum[PaymentMethodEnum["PayPalFastlane"] = 'PayPal Fastlane'] = "PayPalFastlane";
1430
+ PaymentMethodEnum[PaymentMethodEnum["Klarna"] = 'Klarna'] = "Klarna";
1430
1431
  })(PaymentMethodEnum = OrderPayment.PaymentMethodEnum || (OrderPayment.PaymentMethodEnum = {}));
1431
1432
  /**
1432
1433
  * @export
@@ -27269,6 +27270,64 @@ var OrderApiFetchParamCreator = function (configuration) {
27269
27270
  options: localVarRequestOptions,
27270
27271
  };
27271
27272
  },
27273
+ /**
27274
+ * Assigns an order to an affiliate.
27275
+ * @summary Assigns an order to an affiliate
27276
+ * @param {string} order_id The order id to assign to the affiliate.
27277
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
27278
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
27279
+ * @param {*} [options] Override http request option.
27280
+ * @throws {RequiredError}
27281
+ */
27282
+ assignToAffiliate: function (order_id, assign_to_affiliate_request, _expand, options) {
27283
+ if (options === void 0) { options = {}; }
27284
+ // verify required parameter 'order_id' is not null or undefined
27285
+ if (order_id === null || order_id === undefined) {
27286
+ throw new RequiredError('order_id', 'Required parameter order_id was null or undefined when calling assignToAffiliate.');
27287
+ }
27288
+ // verify required parameter 'assign_to_affiliate_request' is not null or undefined
27289
+ if (assign_to_affiliate_request === null || assign_to_affiliate_request === undefined) {
27290
+ throw new RequiredError('assign_to_affiliate_request', 'Required parameter assign_to_affiliate_request was null or undefined when calling assignToAffiliate.');
27291
+ }
27292
+ var localVarPath = "/order/orders/{order_id}/assignToAffiliate"
27293
+ .replace("{".concat("order_id", "}"), encodeURIComponent(String(order_id)));
27294
+ var localVarUrlObj = url.parse(localVarPath, true);
27295
+ var localVarRequestOptions = Object.assign({ method: 'POST' }, options);
27296
+ var localVarHeaderParameter = {};
27297
+ var localVarQueryParameter = {};
27298
+ if (configuration && configuration.apiVersion) {
27299
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
27300
+ }
27301
+ // authentication ultraCartOauth required
27302
+ // oauth required
27303
+ if (configuration && configuration.accessToken) {
27304
+ var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
27305
+ ? configuration.accessToken("ultraCartOauth", ["order_write"])
27306
+ : configuration.accessToken;
27307
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
27308
+ }
27309
+ // authentication ultraCartSimpleApiKey required
27310
+ if (configuration && configuration.apiKey) {
27311
+ var localVarApiKeyValue = typeof configuration.apiKey === 'function'
27312
+ ? configuration.apiKey("x-ultracart-simple-key")
27313
+ : configuration.apiKey;
27314
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
27315
+ }
27316
+ if (_expand !== undefined) {
27317
+ localVarQueryParameter['_expand'] = _expand;
27318
+ }
27319
+ localVarHeaderParameter['Content-Type'] = 'application/json';
27320
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
27321
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
27322
+ delete localVarUrlObj.search;
27323
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
27324
+ var needsSerialization = ("OrderAssignToAffiliateRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
27325
+ localVarRequestOptions.body = needsSerialization ? JSON.stringify(assign_to_affiliate_request || {}) : (assign_to_affiliate_request || "");
27326
+ return {
27327
+ url: url.format(localVarUrlObj),
27328
+ options: localVarRequestOptions,
27329
+ };
27330
+ },
27272
27331
  /**
27273
27332
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
27274
27333
  * @summary Set a refund block on an order
@@ -28903,6 +28962,30 @@ var OrderApiFp = function (configuration) {
28903
28962
  });
28904
28963
  };
28905
28964
  },
28965
+ /**
28966
+ * Assigns an order to an affiliate.
28967
+ * @summary Assigns an order to an affiliate
28968
+ * @param {string} order_id The order id to assign to the affiliate.
28969
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
28970
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
28971
+ * @param {*} [options] Override http request option.
28972
+ * @throws {RequiredError}
28973
+ */
28974
+ assignToAffiliate: function (order_id, assign_to_affiliate_request, _expand, options) {
28975
+ var localVarFetchArgs = (0, exports.OrderApiFetchParamCreator)(configuration).assignToAffiliate(order_id, assign_to_affiliate_request, _expand, options);
28976
+ return function (fetch, basePath) {
28977
+ if (fetch === void 0) { fetch = portableFetch; }
28978
+ if (basePath === void 0) { basePath = BASE_PATH; }
28979
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
28980
+ if (response.status >= 200 && response.status < 300) {
28981
+ return response.json();
28982
+ }
28983
+ else {
28984
+ throw response;
28985
+ }
28986
+ });
28987
+ };
28988
+ },
28906
28989
  /**
28907
28990
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
28908
28991
  * @summary Set a refund block on an order
@@ -29620,6 +29703,18 @@ var OrderApiFactory = function (configuration, fetch, basePath) {
29620
29703
  adjustOrderTotal: function (order_id, desired_total, options) {
29621
29704
  return (0, exports.OrderApiFp)(configuration).adjustOrderTotal(order_id, desired_total, options)(fetch, basePath);
29622
29705
  },
29706
+ /**
29707
+ * Assigns an order to an affiliate.
29708
+ * @summary Assigns an order to an affiliate
29709
+ * @param {string} order_id The order id to assign to the affiliate.
29710
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
29711
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
29712
+ * @param {*} [options] Override http request option.
29713
+ * @throws {RequiredError}
29714
+ */
29715
+ assignToAffiliate: function (order_id, assign_to_affiliate_request, _expand, options) {
29716
+ return (0, exports.OrderApiFp)(configuration).assignToAffiliate(order_id, assign_to_affiliate_request, _expand, options)(fetch, basePath);
29717
+ },
29623
29718
  /**
29624
29719
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
29625
29720
  * @summary Set a refund block on an order
@@ -29995,6 +30090,19 @@ var OrderApi = /** @class */ (function (_super) {
29995
30090
  OrderApi.prototype.adjustOrderTotal = function (order_id, desired_total, options) {
29996
30091
  return (0, exports.OrderApiFp)(this.configuration).adjustOrderTotal(order_id, desired_total, options)(this.fetch, this.basePath);
29997
30092
  };
30093
+ /**
30094
+ * Assigns an order to an affiliate.
30095
+ * @summary Assigns an order to an affiliate
30096
+ * @param {string} order_id The order id to assign to the affiliate.
30097
+ * @param {OrderAssignToAffiliateRequest} assign_to_affiliate_request Assign to affiliate request
30098
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
30099
+ * @param {*} [options] Override http request option.
30100
+ * @throws {RequiredError}
30101
+ * @memberof OrderApi
30102
+ */
30103
+ OrderApi.prototype.assignToAffiliate = function (order_id, assign_to_affiliate_request, _expand, options) {
30104
+ return (0, exports.OrderApiFp)(this.configuration).assignToAffiliate(order_id, assign_to_affiliate_request, _expand, options)(this.fetch, this.basePath);
30105
+ };
29998
30106
  /**
29999
30107
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
30000
30108
  * @summary Set a refund block on an order
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "3.11.26",
3
+ "version": "3.11.28",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "keywords": [