@shipengine/js-api 4.3.3 → 4.4.1
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/account-billing/types.d.ts +3 -11
- package/errors/types.d.ts +1 -1
- package/funding-sources/api.d.ts +2 -2
- package/funding-sources/types.d.ts +1 -17
- package/index.js +1 -2
- package/index.mjs +1 -2
- package/package.json +1 -1
- package/payments/types.d.ts +21 -0
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** @internal */
|
|
3
|
-
export type AccountBillingProvider = Provider;
|
|
1
|
+
import { AbbreviatedCreditCardInfo, BankAccountInfo } from "../payments";
|
|
4
2
|
/** @internal */
|
|
5
3
|
type PaymentMethod = {
|
|
6
|
-
bankAccountInfo:
|
|
7
|
-
|
|
8
|
-
provider: string;
|
|
9
|
-
} | null;
|
|
10
|
-
creditCardInfo: {
|
|
11
|
-
cardNumberLastFour: string;
|
|
12
|
-
provider: AccountBillingProvider;
|
|
13
|
-
} | null;
|
|
4
|
+
bankAccountInfo: BankAccountInfo | null;
|
|
5
|
+
creditCardInfo: AbbreviatedCreditCardInfo | null;
|
|
14
6
|
paymentMethodId?: string;
|
|
15
7
|
};
|
|
16
8
|
/** @internal */
|
package/errors/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @category Entities
|
|
3
3
|
*/
|
|
4
|
-
export type CodedErrorCode = "auto_fund_not_supported" | "batch_cannot_be_modified" | "carrier_conflict" | "carrier_disconnected" | "carrier_not_connected" | "carrier_not_supported" | "confirmation_not_supported" | "default_warehouse_cannot_be_deleted" | "duplicated_name" | "duplicated_rate_card" | "empty_file" | "field_conflict" | "field_value_required" | "forbidden" | "funding_source_registration_in_progress" | "identifier_conflict" | "identifiers_must_match" | "insufficient_funds" | "insufficient_rate_card_data" | "insurance_failure" | "invalid_address" | "invalid_billing_plan" | "invalid_currency" | "invalid_field_value" | "invalid_file_size" | "invalid_file_type" | "invalid_identifier" | "invalid_packages" | "invalid_rates" | "invalid_service" | "invalid_shipping_rule" | "invalid_status" | "invalid_string_length" | "invalid_weight_bands_rates" | "invalid_weight_bands" | "invalid_zones" | "label_images_not_supported" | "meter_failure" | "not_found" | "order_source_not_active" | "rate_limit_exceeded" | "refresh_not_supported" | "repeated_surcharges_in_rate_card" | "repeated_surcharges_in_services" | "repeated_surcharges_in_zone" | "request_body_required" | "return_label_not_supported" | "settings_not_supported" | "subscription_inactive" | "terms_not_accepted" | "tracking_not_supported" | "trial_expired" | "unauthorized" | "unknown" | "unspecified" | "verification_failure" | "warehouse_conflict" | "webhook_event_type_conflict";
|
|
4
|
+
export type CodedErrorCode = "auto_fund_not_supported" | "batch_cannot_be_modified" | "billing_info_not_found" | "carrier_conflict" | "carrier_disconnected" | "carrier_not_connected" | "carrier_not_supported" | "confirmation_not_supported" | "default_warehouse_cannot_be_deleted" | "duplicated_name" | "duplicated_rate_card" | "empty_file" | "field_conflict" | "field_value_required" | "forbidden" | "funding_source_registration_in_progress" | "identifier_conflict" | "identifiers_must_match" | "insufficient_funds" | "insufficient_rate_card_data" | "insurance_failure" | "invalid_address" | "invalid_billing_info" | "invalid_billing_plan" | "invalid_currency" | "invalid_field_value" | "invalid_file_size" | "invalid_file_type" | "invalid_identifier" | "invalid_packages" | "invalid_rates" | "invalid_service" | "invalid_shipping_rule" | "invalid_status" | "invalid_string_length" | "invalid_weight_bands_rates" | "invalid_weight_bands" | "invalid_zones" | "label_images_not_supported" | "meter_failure" | "not_found" | "order_source_not_active" | "rate_limit_exceeded" | "refresh_not_supported" | "repeated_surcharges_in_rate_card" | "repeated_surcharges_in_services" | "repeated_surcharges_in_zone" | "request_body_required" | "return_label_not_supported" | "settings_not_supported" | "subscription_inactive" | "terms_not_accepted" | "tracking_not_supported" | "trial_expired" | "unauthorized" | "unknown" | "unspecified" | "verification_failure" | "warehouse_conflict" | "webhook_event_type_conflict";
|
|
5
5
|
/**
|
|
6
6
|
* @category Entities
|
|
7
7
|
*/
|
package/funding-sources/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { Money } from "../payments";
|
|
3
3
|
import { CreationRangeQuery, PageableQuery } from "../resources";
|
|
4
|
-
import { AddFundsResponse, AuctanePayInfo,
|
|
4
|
+
import { AddFundsResponse, AuctanePayInfo, CarrierRegistration, CarrierRegistrationResponse, CreateFundingSource, CreditCardInfo, FundingSource, FundingSourceAddress, FundingSourceCreateResponse, FundingSourceTransactionsResponse, InsuranceFundingSourceAcceptedTermsResponse, MetadataResponse } from "./types";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
* # Funding Sources API module - /v1/funding_sources
|
|
@@ -30,7 +30,7 @@ export declare class FundingSourcesAPI {
|
|
|
30
30
|
* user to update the billing address or payment information associated with the
|
|
31
31
|
* funding source.
|
|
32
32
|
*/
|
|
33
|
-
update: (billingInfo: FundingSourceAddress, creditCardInfo: CreditCardInfo | undefined,
|
|
33
|
+
update: (billingInfo: FundingSourceAddress, creditCardInfo: CreditCardInfo | undefined, auctanePayInfo: AuctanePayInfo | undefined, fundingSourceId: string) => Promise<import("axios").AxiosResponse<{
|
|
34
34
|
fundingSource: FundingSource;
|
|
35
35
|
}, any>>;
|
|
36
36
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AbbreviatedCreditCardInfo, BankAccountInfo, Provider } from "../payments";
|
|
1
2
|
import { PageableResult } from "../resources";
|
|
2
3
|
/**
|
|
3
4
|
* @internal
|
|
@@ -12,7 +13,6 @@ export type CreateFundingSource = {
|
|
|
12
13
|
billingInfo: FundingSourceAddress;
|
|
13
14
|
iovationBlackBox: IovationBlackBox;
|
|
14
15
|
paymentMethod: {
|
|
15
|
-
bankAccountInfo?: BankAccountInfo;
|
|
16
16
|
creditCardInfo?: CreditCardInfo;
|
|
17
17
|
paymentMethodId?: string;
|
|
18
18
|
sessionId?: string;
|
|
@@ -29,22 +29,10 @@ export type FundingSource = {
|
|
|
29
29
|
bankAccountInfo: BankAccountInfo | null;
|
|
30
30
|
creditCardInfo: AbbreviatedCreditCardInfo | null;
|
|
31
31
|
paymentMethodId?: string;
|
|
32
|
-
sessionId?: string;
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
34
|
/** @internal */
|
|
36
|
-
export type AbbreviatedCreditCardInfo = {
|
|
37
|
-
cardNumberLastFour: string;
|
|
38
|
-
provider: Provider;
|
|
39
|
-
};
|
|
40
|
-
/** @internal */
|
|
41
35
|
export type FundingSourceInsuranceProvider = "parcelguard" | "x_cover";
|
|
42
|
-
/**
|
|
43
|
-
* @internal
|
|
44
|
-
* Used for creating new funding source without Auctane Pay.
|
|
45
|
-
* As well for receiving existing funding source information.
|
|
46
|
-
*/
|
|
47
|
-
export type Provider = "visa" | "mastercard" | "american_express" | "discover" | "maestro" | "diners_club" | "ach" | "jcb" | "pulse" | "star" | "union_pay";
|
|
48
36
|
/** @internal */
|
|
49
37
|
export interface FundingSourcePickupAddress extends Omit<FundingSourceAddress, "email" | "phone"> {
|
|
50
38
|
email?: string;
|
|
@@ -98,10 +86,6 @@ export interface CreditCardInfo {
|
|
|
98
86
|
name: string;
|
|
99
87
|
provider: Provider;
|
|
100
88
|
}
|
|
101
|
-
export interface BankAccountInfo {
|
|
102
|
-
lastFour: string;
|
|
103
|
-
provider: string;
|
|
104
|
-
}
|
|
105
89
|
/** @internal */
|
|
106
90
|
export interface Term {
|
|
107
91
|
termType: string;
|
package/index.js
CHANGED
|
@@ -3545,7 +3545,7 @@ class FundingSourcesAPI {
|
|
|
3545
3545
|
* user to update the billing address or payment information associated with the
|
|
3546
3546
|
* funding source.
|
|
3547
3547
|
*/
|
|
3548
|
-
this.update = (billingInfo, creditCardInfo,
|
|
3548
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$4(this, null, function* () {
|
|
3549
3549
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
3550
3550
|
if (!endUserIpAddress) {
|
|
3551
3551
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -3556,7 +3556,6 @@ class FundingSourcesAPI {
|
|
|
3556
3556
|
billingInfo,
|
|
3557
3557
|
endUserIpAddress,
|
|
3558
3558
|
paymentMethod: __spreadValues$3({
|
|
3559
|
-
bankAccountInfo,
|
|
3560
3559
|
creditCardInfo
|
|
3561
3560
|
}, auctanePayInfo)
|
|
3562
3561
|
}
|
package/index.mjs
CHANGED
|
@@ -3541,7 +3541,7 @@ class FundingSourcesAPI {
|
|
|
3541
3541
|
* user to update the billing address or payment information associated with the
|
|
3542
3542
|
* funding source.
|
|
3543
3543
|
*/
|
|
3544
|
-
this.update = (billingInfo, creditCardInfo,
|
|
3544
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$4(this, null, function* () {
|
|
3545
3545
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
3546
3546
|
if (!endUserIpAddress) {
|
|
3547
3547
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -3552,7 +3552,6 @@ class FundingSourcesAPI {
|
|
|
3552
3552
|
billingInfo,
|
|
3553
3553
|
endUserIpAddress,
|
|
3554
3554
|
paymentMethod: __spreadValues$3({
|
|
3555
|
-
bankAccountInfo,
|
|
3556
3555
|
creditCardInfo
|
|
3557
3556
|
}, auctanePayInfo)
|
|
3558
3557
|
}
|
package/package.json
CHANGED
package/payments/types.d.ts
CHANGED
|
@@ -17,6 +17,27 @@ export interface CreditCard {
|
|
|
17
17
|
number: string;
|
|
18
18
|
type: CreditCardVendor;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* @category Entities
|
|
22
|
+
*/
|
|
23
|
+
export interface BankAccountInfo {
|
|
24
|
+
institutionName: string;
|
|
25
|
+
lastFour: string;
|
|
26
|
+
provider: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @category Entities
|
|
30
|
+
*/
|
|
31
|
+
export type AbbreviatedCreditCardInfo = {
|
|
32
|
+
cardNumberLastFour: string;
|
|
33
|
+
provider: Provider;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @category Entities
|
|
37
|
+
* Used for creating new funding source without Auctane Pay.
|
|
38
|
+
* As well for receiving existing funding source and subscription billing information.
|
|
39
|
+
*/
|
|
40
|
+
export type Provider = "visa" | "mastercard" | "american_express" | "discover" | "maestro" | "diners_club" | "ach" | "jcb" | "pulse" | "star" | "union_pay";
|
|
20
41
|
/**
|
|
21
42
|
* @category Entities
|
|
22
43
|
*/
|