@shipengine/js-api 4.7.0 → 4.8.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.
@@ -21,6 +21,13 @@ export interface AuctanePaySessionMetadata {
21
21
  * Allowed Payment Method for AuctanePay
22
22
  */
23
23
  export type AuctanePayPaymentMethod = "credit_card" | "pay_pal" | "stamps" | "pay_by_bank_us" | "pay_by_bank_eu";
24
+ /**
25
+ * @category Entities
26
+ * Payment Method Details for AuctanePay
27
+ */
28
+ export type AuctanePayPaymentMethodDetails = {
29
+ fees: PaymentMethodDetailFee[] | null;
30
+ };
24
31
  /**
25
32
  * @category Entities
26
33
  * Note: This is similar to but distinct from the TransactionCategory in funding-sources
@@ -81,6 +88,8 @@ export interface PaymentMethodHolderAddress {
81
88
  * we have on file for the payment method.
82
89
  */
83
90
  expiration: string;
91
+ /** Array of fee details */
92
+ fees: PaymentMethodDetailFee[];
84
93
  /** The Payment Method ID */
85
94
  id: string;
86
95
  /** The nickname of the payment method */
@@ -117,12 +126,16 @@ export interface CreateSessionResponse {
117
126
  id: string;
118
127
  /** Metadata */
119
128
  metadata: AuctanePaySessionMetadata;
129
+ /** Payment Method Meta Type Details */
130
+ paymentMethodMetaTypeDetails: Record<keyof AuctanePayPaymentMethod, AuctanePayPaymentMethodDetails> | null;
120
131
  /** Recent payment methods */
121
132
  recentPaymentMethods: PaymentMethodHolderAddress[];
122
133
  /** @deprecated */
123
134
  sessionData: string;
124
135
  /** @deprecated */
125
136
  sessionId: string;
137
+ /** Category of the transaction */
138
+ transactionCategory: AuctanePayTransactionCategory;
126
139
  }
127
140
  /**
128
141
  * @category Entities
@@ -144,6 +157,14 @@ export interface MoneyAmount {
144
157
  /** Currency code */
145
158
  currencyCode: string;
146
159
  }
160
+ export interface PaymentMethodDetailFee {
161
+ /** Fee percentage */
162
+ percentage: number;
163
+ /** Transaction categories */
164
+ transactionCategories: AuctanePayTransactionCategory[];
165
+ /** Fee type */
166
+ type: string;
167
+ }
147
168
  /**
148
169
  * @category Entities
149
170
  * Fee information for a transaction
@@ -1,5 +1,6 @@
1
1
  import { AbbreviatedCreditCardInfo, BankAccountInfo, Provider } from "../payments";
2
2
  import { PageableResult } from "../resources";
3
+ import { PaymentMethodDetailFee } from "../types";
3
4
  /**
4
5
  * @internal
5
6
  * An encoded device fingerprint string containing information about the end-user's computing device such as OS, browser, etc.
@@ -28,12 +29,7 @@ export type FundingSource = {
28
29
  paymentMethod: {
29
30
  bankAccountInfo: BankAccountInfo | null;
30
31
  creditCardInfo: AbbreviatedCreditCardInfo | null;
31
- fees: [
32
- {
33
- percentage: number;
34
- type: string;
35
- }
36
- ] | null;
32
+ fees: PaymentMethodDetailFee[] | null;
37
33
  paymentMethodId?: string;
38
34
  };
39
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {