@peable.to/shared-types 0.5.1 → 0.6.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.
@@ -25,7 +25,7 @@ function encode(value) {
25
25
  }
26
26
  function canonicalBillingAuthority(authority) {
27
27
  return encode({
28
- schemaVersion: authority.schemaVersion,
28
+ schema_version: authority.schema_version,
29
29
  source: authority.source,
30
30
  invoice: authority.invoice,
31
31
  method: authority.method,
@@ -33,7 +33,7 @@ function canonicalBillingAuthority(authority) {
33
33
  }
34
34
  function canonicalBillingTaxQuote(authority) {
35
35
  return encode({
36
- schemaVersion: authority.schemaVersion,
36
+ schema_version: authority.schema_version,
37
37
  source: authority.source,
38
38
  quote: authority.quote,
39
39
  });
@@ -20,7 +20,7 @@ function encode(value) {
20
20
  }
21
21
  export function canonicalBillingAuthority(authority) {
22
22
  return encode({
23
- schemaVersion: authority.schemaVersion,
23
+ schema_version: authority.schema_version,
24
24
  source: authority.source,
25
25
  invoice: authority.invoice,
26
26
  method: authority.method,
@@ -28,7 +28,7 @@ export function canonicalBillingAuthority(authority) {
28
28
  }
29
29
  export function canonicalBillingTaxQuote(authority) {
30
30
  return encode({
31
- schemaVersion: authority.schemaVersion,
31
+ schema_version: authority.schema_version,
32
32
  source: authority.source,
33
33
  quote: authority.quote,
34
34
  });
@@ -1,6 +1,6 @@
1
1
  import type { BillingFinalInvoiceAuthority, BillingTaxQuote } from './billing';
2
- export declare function canonicalBillingAuthority(authority: Pick<BillingFinalInvoiceAuthority, 'schemaVersion' | 'source' | 'invoice' | 'method'>): string;
3
- export declare function canonicalBillingTaxQuote(authority: Pick<BillingTaxQuote, 'schemaVersion' | 'source' | 'quote'>): string;
2
+ export declare function canonicalBillingAuthority(authority: Pick<BillingFinalInvoiceAuthority, 'schema_version' | 'source' | 'invoice' | 'method'>): string;
3
+ export declare function canonicalBillingTaxQuote(authority: Pick<BillingTaxQuote, 'schema_version' | 'source' | 'quote'>): string;
4
4
  /**
5
5
  * The PUBLIC halves of the Ed25519 keys production Peable signs billing
6
6
  * authority with (signed tax quotes and final invoice authorities), by key id.
@@ -4,7 +4,7 @@ import type { BillingInvoiceTaxLine } from './tax';
4
4
  export declare const BILLING_SUBSCRIPTION_STATUSES: readonly ["incomplete", "incomplete_expired", "trialing", "active", "past_due", "canceled", "unpaid", "paused"];
5
5
  export type BillingSubscriptionStatus = (typeof BILLING_SUBSCRIPTION_STATUSES)[number];
6
6
  export interface BillingCustomer {
7
- providerCustomerId: string;
7
+ provider_customer_id: string;
8
8
  }
9
9
  /** A settlement rail a merchant's recurring offers can be paid through. `stripe`
10
10
  * (and any further fiat provider) settles in fiat; `faircoin` settles natively
@@ -16,12 +16,12 @@ export type BillingRailSettlement = 'fiat' | 'faircoin';
16
16
  /** One offer a rail can sell. Fiat provider rails bind their prices from the
17
17
  * app's own provider catalogue, so they list `offers: null`. */
18
18
  export interface BillingRailOffer {
19
- providerPriceId: string;
20
- planId: string;
19
+ provider_price_id: string;
20
+ plan_id: string;
21
21
  interval: 'month' | 'year';
22
22
  currency: string;
23
- grossMinorUnits: number;
24
- taxTreatment: 'inclusive' | 'exclusive';
23
+ gross_minor_units: number;
24
+ tax_treatment: 'inclusive' | 'exclusive';
25
25
  }
26
26
  export interface BillingRailOption {
27
27
  rail: BillingRail;
@@ -29,7 +29,7 @@ export interface BillingRailOption {
29
29
  /** The rail a request that names none is served by: the first configured. */
30
30
  default: boolean;
31
31
  /** Whether `createTaxQuote` is answered for this rail. */
32
- taxQuotes: boolean;
32
+ tax_quotes: boolean;
33
33
  /** `automatic`: the provider charges each period. `payer_initiated`: each
34
34
  * period is an explicit payment through `renewSubscription`. */
35
35
  renewal: 'automatic' | 'payer_initiated';
@@ -40,8 +40,8 @@ export interface BillingRailList {
40
40
  data: BillingRailOption[];
41
41
  }
42
42
  export interface EnsureBillingCustomerParams {
43
- storeId: string;
44
- storeName: string;
43
+ store_id: string;
44
+ store_name: string;
45
45
  /** The payer's chosen rail. Omitted: the merchant's default rail. A customer
46
46
  * belongs to one rail, and its checkouts and subscriptions follow it. */
47
47
  rail?: BillingRail;
@@ -51,41 +51,41 @@ export interface CreateBillingCheckoutParams {
51
51
  rail?: BillingRail;
52
52
  /** Opt-in fiscal checkout. The full signed quote is immutable and single-use.
53
53
  * Requires a trusted Peable adapter capable of applying these exact amounts. */
54
- taxQuote?: BillingTaxQuote;
55
- providerCustomerId: string;
56
- providerPriceId: string;
57
- trialDays: number;
58
- returnUrl: string;
59
- storeId: string;
60
- planId: string;
54
+ tax_quote?: BillingTaxQuote;
55
+ provider_customer_id: string;
56
+ provider_price_id: string;
57
+ trial_days: number;
58
+ return_url: string;
59
+ store_id: string;
60
+ plan_id: string;
61
61
  }
62
62
  export interface CreateBillingPortalParams {
63
- providerCustomerId: string;
64
- returnUrl: string;
63
+ provider_customer_id: string;
64
+ return_url: string;
65
65
  }
66
66
  /** Sensitive owner-only URL. The gateway refuses replay after expiresAt. */
67
67
  export interface BillingHostedSession {
68
68
  url: string;
69
- expiresAt: string;
69
+ expires_at: number;
70
70
  }
71
71
  /** Provider observations only. Consumers own plan/status/entitlement interpretation. */
72
72
  export interface BillingSubscription {
73
- providerSubscriptionId: string;
73
+ provider_subscription_id: string;
74
74
  /** Discovery only; invoice must still be read and proven paid. */
75
- latestInvoiceId?: string | null;
76
- providerCustomerId: string;
77
- providerPriceId: string;
78
- storeId: string;
79
- planId: string;
75
+ latest_invoice_id?: string | null;
76
+ provider_customer_id: string;
77
+ provider_price_id: string;
78
+ store_id: string;
79
+ plan_id: string;
80
80
  livemode: boolean;
81
81
  status: BillingSubscriptionStatus;
82
82
  interval: 'month' | 'year';
83
- cancelAtPeriodEnd: boolean;
84
- currentPeriodStart: string;
85
- currentPeriodEnd: string;
86
- trialEndsAt: string | null;
87
- cancelAt: string | null;
88
- cancelledAt: string | null;
83
+ cancel_at_period_end: boolean;
84
+ current_period_start: number;
85
+ current_period_end: number;
86
+ trial_ends_at: number | null;
87
+ cancel_at: number | null;
88
+ cancelled_at: number | null;
89
89
  }
90
90
  /** Owned recurring checkout correlation; completing checkout is not paid evidence. */
91
91
  export interface BillingCheckoutSession extends BillingHostedSession {
@@ -93,101 +93,101 @@ export interface BillingCheckoutSession extends BillingHostedSession {
93
93
  }
94
94
  export interface BillingCheckoutObservation {
95
95
  /** Immutable subscription_create invoice proven for this exact checkout. Discovery only, never paid authority. */
96
- initialInvoiceId: string | null;
96
+ initial_invoice_id: string | null;
97
97
  id: string;
98
98
  status: 'open' | 'complete' | 'expired';
99
- storeId: string;
100
- planId: string;
101
- providerCustomerId: string;
102
- providerPriceId: string;
99
+ store_id: string;
100
+ plan_id: string;
101
+ provider_customer_id: string;
102
+ provider_price_id: string;
103
103
  subscription: BillingSubscription | null;
104
104
  }
105
105
  /** Authenticated authoritative read, one settled full non-prorated line only.
106
106
  * Tax figures are provider observations, not a tax quote or seller configuration. */
107
107
  export interface BillingInvoiceState extends BillingPaidInvoice {
108
- chargeId: string;
109
- amountRefunded: string;
108
+ charge_id: string;
109
+ amount_refunded: string;
110
110
  state: 'paid' | 'fully_refunded' | 'partially_refunded';
111
111
  }
112
112
  export interface BillingPaidInvoice {
113
- invoiceId: string;
114
- lineId: string;
115
- paymentIntentId: string;
116
- providerSubscriptionId: string;
117
- providerCustomerId: string;
118
- providerPriceId: string;
119
- storeId: string;
120
- planId: string;
113
+ invoice_id: string;
114
+ line_id: string;
115
+ payment_intent_id: string;
116
+ provider_subscription_id: string;
117
+ provider_customer_id: string;
118
+ provider_price_id: string;
119
+ store_id: string;
120
+ plan_id: string;
121
121
  livemode: boolean;
122
122
  currency: string;
123
- amountPaid: string;
124
- netAmount: string | null;
125
- taxAmount: string | null;
126
- periodStart: string;
127
- periodEnd: string;
128
- paidAt: string;
129
- observedAt: string;
123
+ amount_paid: string;
124
+ net_amount: string | null;
125
+ tax_amount: string | null;
126
+ period_start: number;
127
+ period_end: number;
128
+ paid_at: number;
129
+ observed_at: number;
130
130
  }
131
131
  /** Provider-independent fiscal evidence. Values come from the configured authority,
132
132
  * never from invoice amounts, merchant metadata, or an application tax guess. */
133
133
  export interface BillingInvoiceAuthoritySource {
134
- invoiceId: string;
135
- paymentIntentId: string;
136
- customerId: string;
137
- subscriptionId: string;
138
- priceId: string;
139
- planId: string;
140
- merchantId: string;
141
- appId: string;
134
+ invoice_id: string;
135
+ payment_intent_id: string;
136
+ customer_id: string;
137
+ subscription_id: string;
138
+ price_id: string;
139
+ plan_id: string;
140
+ merchant_id: string;
141
+ app_id: string;
142
142
  mode: 'test' | 'live';
143
143
  environment: 'development' | 'staging' | 'production';
144
144
  }
145
145
  export interface BillingFinalInvoice {
146
146
  platform: 'peable';
147
147
  currency: string;
148
- grossMinorUnits: number;
149
- netMinorUnits: number;
150
- taxMinorUnits: number;
151
- merchantFeeMinorUnits: number;
152
- taxTreatment: 'inclusive' | 'exclusive';
153
- sellerId: string;
154
- invoiceIssuerId: string;
155
- taxQuoteId: string;
156
- customerLocationEvidenceId: string;
157
- taxRateEvidenceId: string;
148
+ gross_minor_units: number;
149
+ net_minor_units: number;
150
+ tax_minor_units: number;
151
+ merchant_fee_minor_units: number;
152
+ tax_treatment: 'inclusive' | 'exclusive';
153
+ seller_id: string;
154
+ invoice_issuer_id: string;
155
+ tax_quote_id: string;
156
+ customer_location_evidence_id: string;
157
+ tax_rate_evidence_id: string;
158
158
  context: {
159
- payerAccountId: string;
160
- beneficiaryAccountId: string;
161
- providerSubscriptionId: string;
162
- offerId: string;
163
- offerVersion: number;
164
- periodStart: string;
165
- periodEnd: string;
159
+ payer_account_id: string;
160
+ beneficiary_account_id: string;
161
+ provider_subscription_id: string;
162
+ offer_id: string;
163
+ offer_version: number;
164
+ period_start: number;
165
+ period_end: number;
166
166
  mode: 'test' | 'live';
167
167
  environment: 'development' | 'staging' | 'production';
168
168
  };
169
- issuedAt: string;
170
- expiresAt: string;
171
- faircoinQuote?: {
169
+ issued_at: number;
170
+ expires_at: number;
171
+ faircoin_quote?: {
172
172
  id: string;
173
- amountBaseUnits: string;
174
- quotedAt: string;
175
- expiresAt: string;
176
- roundingEvidenceId: string;
173
+ amount_base_units: string;
174
+ quoted_at: number;
175
+ expires_at: number;
176
+ rounding_evidence_id: string;
177
177
  };
178
178
  /** Present only when requested (`include: ['tax_lines']`): the frozen
179
179
  * Peable Tax lines behind `taxMinorUnits`, covered by the same signature. */
180
- taxLines?: BillingInvoiceTaxLine[];
180
+ tax_lines?: BillingInvoiceTaxLine[];
181
181
  }
182
182
  export interface BillingFinalInvoiceAuthority {
183
- schemaVersion: 1;
183
+ schema_version: 2;
184
184
  source: BillingInvoiceAuthoritySource;
185
185
  invoice: BillingFinalInvoice;
186
186
  method: 'card' | 'faircoin';
187
187
  /** Versioned canonical payload: source, invoice and method after strict schema parsing. */
188
188
  signature: {
189
189
  algorithm: 'Ed25519';
190
- keyId: string;
190
+ key_id: string;
191
191
  value: string;
192
192
  };
193
193
  }
@@ -202,87 +202,87 @@ export type BillingFaircoinRenewalChoice = {
202
202
  consent: BillingFaircoinRenewalConsent;
203
203
  };
204
204
  export interface BillingFaircoinRenewalConsent {
205
- authorizationId: string;
206
- payerAccountId: string;
207
- merchantId: string;
208
- appId: string;
209
- subscriptionId: string;
210
- planId: string;
205
+ authorization_id: string;
206
+ payer_account_id: string;
207
+ merchant_id: string;
208
+ app_id: string;
209
+ subscription_id: string;
210
+ plan_id: string;
211
211
  mode: 'test' | 'live';
212
212
  environment: 'development' | 'staging' | 'production';
213
- explicitConsent: true;
214
- consentEvidenceId: string;
215
- maximumAmountBaseUnits: string;
213
+ explicit_consent: true;
214
+ consent_evidence_id: string;
215
+ maximum_amount_base_units: string;
216
216
  interval: 'month';
217
- intervalCount: 1;
218
- startsAt: string;
219
- expiresAt: string;
220
- acceptedAt: string;
217
+ interval_count: 1;
218
+ starts_at: number;
219
+ expires_at: number;
220
+ accepted_at: number;
221
221
  }
222
222
  export interface BillingFaircoinRenewalRevocation {
223
- authorizationId: string;
224
- revokedAt: string;
225
- revocationEvidenceId: string;
223
+ authorization_id: string;
224
+ revoked_at: number;
225
+ revocation_evidence_id: string;
226
226
  }
227
227
  /** A merchant asks Peable to quote a registered product. Monetary/fiscal
228
228
  * configuration is resolved inside Peable, never supplied by a consumer. */
229
229
  export interface CreateBillingTaxQuoteParams {
230
230
  /** Omitted: the first of the merchant's rails that answers tax quotes. */
231
231
  rail?: BillingRail;
232
- storeId: string;
233
- planId: string;
232
+ store_id: string;
233
+ plan_id: string;
234
234
  /** Selects one offer when a plan is sold at several prices. */
235
- providerPriceId?: string;
235
+ provider_price_id?: string;
236
236
  /** A `tax.location_evidence` id (`taxloc_…`) recorded for this `storeId`. */
237
- customerLocationEvidenceId: string;
237
+ customer_location_evidence_id: string;
238
238
  }
239
239
  export interface BillingTaxQuote {
240
- schemaVersion: 1;
240
+ schema_version: 2;
241
241
  source: {
242
- merchantId: string;
243
- appId: string;
244
- storeId: string;
245
- planId: string;
242
+ merchant_id: string;
243
+ app_id: string;
244
+ store_id: string;
245
+ plan_id: string;
246
246
  mode: 'test' | 'live';
247
247
  environment: 'development' | 'staging' | 'production';
248
248
  };
249
249
  quote: {
250
250
  id: string;
251
251
  currency: string;
252
- grossMinorUnits: number;
253
- netMinorUnits: number;
254
- taxMinorUnits: number;
255
- taxTreatment: 'inclusive' | 'exclusive';
256
- sellerId: string;
257
- invoiceIssuerId: string;
258
- taxRemitterId: string;
259
- taxServiceRef: string;
252
+ gross_minor_units: number;
253
+ net_minor_units: number;
254
+ tax_minor_units: number;
255
+ tax_treatment: 'inclusive' | 'exclusive';
256
+ seller_id: string;
257
+ invoice_issuer_id: string;
258
+ tax_remitter_id: string;
259
+ tax_service_ref: string;
260
260
  country: string;
261
- coverageEvidenceId: string;
262
- taxRateEvidenceId: string;
263
- customerLocationEvidenceId: string;
264
- quotedAt: string;
265
- expiresAt: string;
261
+ coverage_evidence_id: string;
262
+ tax_rate_evidence_id: string;
263
+ customer_location_evidence_id: string;
264
+ quoted_at: number;
265
+ expires_at: number;
266
266
  };
267
267
  signature: {
268
268
  algorithm: 'Ed25519';
269
- keyId: string;
269
+ key_id: string;
270
270
  value: string;
271
271
  };
272
272
  }
273
273
  /** Read-only recovery of one previously attempted recurring checkout. Neither
274
274
  * absence nor uncertainty permits cancellation or another financial operation. */
275
275
  export interface RetrieveBillingCheckoutOperationParams {
276
- idempotencyKey: string;
277
- providerCustomerId: string;
278
- providerPriceId: string;
279
- storeId: string;
280
- planId: string;
276
+ idempotency_key: string;
277
+ provider_customer_id: string;
278
+ provider_price_id: string;
279
+ store_id: string;
280
+ plan_id: string;
281
281
  }
282
282
  export interface BillingCheckoutOperationSource extends RetrieveBillingCheckoutOperationParams {
283
- taxQuoteId: string | null;
284
- merchantId: string;
285
- appId: string;
283
+ tax_quote_id: string | null;
284
+ merchant_id: string;
285
+ app_id: string;
286
286
  mode: 'test' | 'live';
287
287
  environment: 'development' | 'staging' | 'production';
288
288
  }
@@ -294,19 +294,19 @@ export type BillingCheckoutOperationRecovery = {
294
294
  source: BillingCheckoutOperationSource;
295
295
  checkout: {
296
296
  id: string;
297
- expiresAt: string;
297
+ expires_at: number;
298
298
  url?: string;
299
299
  };
300
300
  };
301
301
  export interface BillingFaircoinFxQuote {
302
302
  id: string;
303
303
  currency: 'USD';
304
- grossMinorUnits: number;
305
- amountBaseUnits: string;
306
- usdPerFair: string;
304
+ gross_minor_units: number;
305
+ amount_base_units: string;
306
+ usd_per_fair: string;
307
307
  source: string;
308
- observedAt: string;
309
- quotedAt: string;
310
- expiresAt: string;
308
+ observed_at: number;
309
+ quoted_at: number;
310
+ expires_at: number;
311
311
  rounding: 'ceil_to_base_unit';
312
312
  }
@@ -7,9 +7,9 @@ import type { PaymentIntent, PaymentIntentRail } from './paymentIntent';
7
7
  export interface CheckoutSession {
8
8
  id: string;
9
9
  object: 'checkout_session';
10
- paymentIntentId: string;
10
+ payment_intent_id: string;
11
11
  /** The wrapped intent's `client_secret`, returned to the merchant on create. */
12
- clientSecret: string;
12
+ client_secret: string;
13
13
  amount: string;
14
14
  currency: CurrencyCode;
15
15
  rail: PaymentIntentRail;
@@ -19,14 +19,14 @@ export interface CheckoutSession {
19
19
  * The seller the wrapped payment is made on behalf of (`ca_…`), or `null`
20
20
  * (ADR 0012 D5). Optional in the type for older fixtures; always sent.
21
21
  */
22
- connectedAccountId?: string | null;
22
+ connected_account_id?: string | null;
23
23
  metadata: Record<string, string>;
24
- successUrl?: string;
25
- cancelUrl?: string;
24
+ success_url?: string;
25
+ cancel_url?: string;
26
26
  /** Canonical `checkout.peable.to/c/<id>` URL. */
27
27
  url: string;
28
- createdAt: string;
29
- updatedAt: string;
28
+ created: number;
29
+ updated_at: number;
30
30
  }
31
31
  /**
32
32
  * What the checkout page loads at `/c/:id`, authorized by possession of the
@@ -36,13 +36,13 @@ export interface CheckoutSession {
36
36
  */
37
37
  export interface CheckoutSessionPublic {
38
38
  /** Frozen commercial USD price and exact FAIR settlement quote; no payer metadata. */
39
- billingQuote?: BillingFaircoinFxQuote;
39
+ billing_quote?: BillingFaircoinFxQuote;
40
40
  id: string;
41
41
  object: 'checkout_session';
42
- successUrl?: string;
43
- cancelUrl?: string;
42
+ success_url?: string;
43
+ cancel_url?: string;
44
44
  merchant: MerchantDisplay;
45
- paymentIntent: PaymentIntent;
45
+ payment_intent: PaymentIntent;
46
46
  }
47
47
  export interface CreateCheckoutSessionParams {
48
48
  amount: string;
@@ -53,8 +53,8 @@ export interface CreateCheckoutSessionParams {
53
53
  /** Defaults to `'FAIR'` on the faircoin rail; required on the card rail. */
54
54
  currency?: CurrencyCode;
55
55
  metadata?: Record<string, string>;
56
- successUrl?: string;
57
- cancelUrl?: string;
56
+ success_url?: string;
57
+ cancel_url?: string;
58
58
  /** Pay this seller (`ca_…`) rather than the merchant — see `CreatePaymentIntentParams.connectedAccount`. */
59
- connectedAccount?: string;
59
+ connected_account?: string;
60
60
  }
@@ -4,15 +4,15 @@ import type { NetworkType } from './network';
4
4
  export interface ConnectOnboarding {
5
5
  object: 'connect_onboarding';
6
6
  /** The `ca_…` being onboarded. */
7
- accountId: string;
7
+ account_id: string;
8
8
  /** Who is asking — the PLATFORM's public display, as a payer would see it. */
9
9
  platform: MerchantDisplay;
10
10
  /** The chain the seller will be paid on. Their key must be for this network. */
11
11
  network: NetworkType;
12
12
  /** When this link stops working. */
13
- expiresAt: string;
13
+ expires_at: number;
14
14
  /** Where to send the seller once the key is registered. */
15
- returnUrl: string;
15
+ return_url: string;
16
16
  }
17
17
  /** `POST /v1/connect/onboarding/:token/faircoin` — the seller's watch-only ACCOUNT xpub. */
18
18
  export interface RegisterFaircoinKeyParams {
@@ -22,9 +22,9 @@ export interface RegisterFaircoinKeyParams {
22
22
  /** The answer to a successful registration. */
23
23
  export interface ConnectOnboardingComplete {
24
24
  object: 'connect_onboarding';
25
- accountId: string;
25
+ account_id: string;
26
26
  status: 'active';
27
- returnUrl: string;
27
+ return_url: string;
28
28
  }
29
29
  /**
30
30
  * A FairCoin onboarding link, as the platform receives it from
@@ -35,5 +35,5 @@ export interface ConnectOnboardingComplete {
35
35
  export interface AccountLink {
36
36
  object: 'account_link';
37
37
  url: string;
38
- expiresAt: string;
38
+ expires_at: number;
39
39
  }
@@ -26,7 +26,7 @@ export interface Dispute {
26
26
  id: string;
27
27
  object: 'dispute';
28
28
  /** The PUBLIC `pi_…` id, which is what every other contract here calls `id`. */
29
- paymentIntentId: string;
29
+ payment_intent_id: string;
30
30
  /**
31
31
  * Amount in the currency's smallest unit as a canonical integer string —
32
32
  * the same encoding every other money field on these contracts uses.
@@ -47,15 +47,15 @@ export interface Dispute {
47
47
  */
48
48
  reason: string | null;
49
49
  /**
50
- * When the network stops accepting evidence, ISO-8601.
50
+ * When the network stops accepting evidence, Unix seconds.
51
51
  *
52
52
  * `null` once the dispute is closed — there is no deadline for a decision
53
53
  * already made, and a closed dispute still showing one would put a response
54
54
  * in front of a merchant that can no longer be given.
55
55
  */
56
- evidenceDueAt: string | null;
56
+ evidence_due_at: number | null;
57
57
  /**
58
- * When the merchant's response reached the network, ISO-8601. `null` while
58
+ * When the merchant's response reached the network, Unix seconds. `null` while
59
59
  * none has been submitted.
60
60
  *
61
61
  * The timestamp and nothing else: the evidence itself is forwarded to the
@@ -66,9 +66,9 @@ export interface Dispute {
66
66
  * Together with `evidenceDueAt` it answers the only two questions a merchant
67
67
  * has about a live dispute: whether they still owe a response, and by when.
68
68
  */
69
- evidenceSubmittedAt: string | null;
70
- createdAt: string;
71
- updatedAt: string;
69
+ evidence_submitted_at: number | null;
70
+ created: number;
71
+ updated_at: number;
72
72
  }
73
73
  /**
74
74
  * A merchant's response to a dispute — the whole field set, declared once.
@@ -104,21 +104,21 @@ export interface Dispute {
104
104
  * forgotten. What is recorded is `evidenceSubmittedAt` and nothing more.
105
105
  */
106
106
  export interface DisputeEvidence {
107
- productDescription?: string;
108
- customerName?: string;
109
- customerEmailAddress?: string;
110
- customerPurchaseIp?: string;
111
- billingAddress?: string;
112
- shippingAddress?: string;
113
- shippingCarrier?: string;
114
- shippingDate?: string;
115
- shippingTrackingNumber?: string;
116
- serviceDate?: string;
117
- accessActivityLog?: string;
118
- cancellationPolicyDisclosure?: string;
119
- cancellationRebuttal?: string;
120
- duplicateChargeExplanation?: string;
121
- refundPolicyDisclosure?: string;
122
- refundRefusalExplanation?: string;
123
- uncategorizedText?: string;
107
+ product_description?: string;
108
+ customer_name?: string;
109
+ customer_email_address?: string;
110
+ customer_purchase_ip?: string;
111
+ billing_address?: string;
112
+ shipping_address?: string;
113
+ shipping_carrier?: string;
114
+ shipping_date?: string;
115
+ shipping_tracking_number?: string;
116
+ service_date?: string;
117
+ access_activity_log?: string;
118
+ cancellation_policy_disclosure?: string;
119
+ cancellation_rebuttal?: string;
120
+ duplicate_charge_explanation?: string;
121
+ refund_policy_disclosure?: string;
122
+ refund_refusal_explanation?: string;
123
+ uncategorized_text?: string;
124
124
  }