@shipengine/js-api 3.8.0 → 3.9.0
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/funding-sources/api.d.ts +2 -2
- package/funding-sources/types.d.ts +8 -1
- package/index.js +4 -2
- package/index.mjs +4 -2
- package/package.json +1 -1
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, CarrierRegistration, CarrierRegistrationResponse, CreateFundingSource, CreditCardInfo, FundingSource, FundingSourceAddress, FundingSourceCreateResponse, FundingSourceTransactionsResponse, InsuranceFundingSourceAcceptedTermsResponse, MetadataResponse } from "./types";
|
|
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, fundingSourceId: string) => Promise<import("axios").AxiosResponse<{
|
|
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
|
/**
|
|
@@ -24,6 +24,8 @@ export type FundingSource = {
|
|
|
24
24
|
fundingSourceId: string;
|
|
25
25
|
paymentMethod: {
|
|
26
26
|
creditCardInfo: AbbreviatedCreditCardInfo | null;
|
|
27
|
+
paymentMethodId?: string;
|
|
28
|
+
sessionId?: string;
|
|
27
29
|
};
|
|
28
30
|
};
|
|
29
31
|
/** @internal */
|
|
@@ -74,7 +76,12 @@ export interface FundingSourceAddress {
|
|
|
74
76
|
postalCode: string;
|
|
75
77
|
stateProvince: string;
|
|
76
78
|
}
|
|
77
|
-
|
|
79
|
+
export interface AuctanePayInfo {
|
|
80
|
+
/** ID of an already saved Payment Method */
|
|
81
|
+
paymentMethodId?: string;
|
|
82
|
+
/** Auctane Pay Session ID used for the payment */
|
|
83
|
+
sessionId?: string;
|
|
84
|
+
}
|
|
78
85
|
export interface CreditCardInfo {
|
|
79
86
|
cardNumber: string;
|
|
80
87
|
cvv: string;
|
package/index.js
CHANGED
|
@@ -3500,7 +3500,7 @@ class FundingSourcesAPI {
|
|
|
3500
3500
|
* user to update the billing address or payment information associated with the
|
|
3501
3501
|
* funding source.
|
|
3502
3502
|
*/
|
|
3503
|
-
this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$4(this, null, function* () {
|
|
3503
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$4(this, null, function* () {
|
|
3504
3504
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
3505
3505
|
if (!endUserIpAddress) {
|
|
3506
3506
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -3510,7 +3510,9 @@ class FundingSourcesAPI {
|
|
|
3510
3510
|
{
|
|
3511
3511
|
billingInfo,
|
|
3512
3512
|
endUserIpAddress,
|
|
3513
|
-
paymentMethod: {
|
|
3513
|
+
paymentMethod: __spreadValues$3({
|
|
3514
|
+
creditCardInfo
|
|
3515
|
+
}, auctanePayInfo)
|
|
3514
3516
|
}
|
|
3515
3517
|
);
|
|
3516
3518
|
});
|
package/index.mjs
CHANGED
|
@@ -3496,7 +3496,7 @@ class FundingSourcesAPI {
|
|
|
3496
3496
|
* user to update the billing address or payment information associated with the
|
|
3497
3497
|
* funding source.
|
|
3498
3498
|
*/
|
|
3499
|
-
this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$4(this, null, function* () {
|
|
3499
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$4(this, null, function* () {
|
|
3500
3500
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
3501
3501
|
if (!endUserIpAddress) {
|
|
3502
3502
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -3506,7 +3506,9 @@ class FundingSourcesAPI {
|
|
|
3506
3506
|
{
|
|
3507
3507
|
billingInfo,
|
|
3508
3508
|
endUserIpAddress,
|
|
3509
|
-
paymentMethod: {
|
|
3509
|
+
paymentMethod: __spreadValues$3({
|
|
3510
|
+
creditCardInfo
|
|
3511
|
+
}, auctanePayInfo)
|
|
3510
3512
|
}
|
|
3511
3513
|
);
|
|
3512
3514
|
});
|