Skip to content

Commit ff2209f

Browse files
committed
fixed merge conflicts with latest release
2 parents 8a79160 + 19c4574 commit ff2209f

File tree

163 files changed

+7586
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+7586
-46
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "firestore-stripe-web-sdk/**"
7+
branches:
8+
- "**"
9+
10+
jobs:
11+
testing:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: NPM Install
16+
run: npm i
17+
- name: Unit Test
18+
run: lerna run --scope @stripe/firestore-stripe-payments test
19+
- name: API Report
20+
run: lerna run --scope @stripe/firestore-stripe-payments api-extractor

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
api-extractor.json
12
package.json
23
extension.yaml
34
package-lock.json
@@ -6,9 +7,11 @@ package-lock.json
67

78
# generated files
89
README.md
10+
**/etc/**
911
**/functions/lib/**
1012
**/lib/**
1113
**/dist/**
14+
**/markdown/**
1215
coverage
1316

1417
# extension install md files

firestore-stripe-invoices/extension.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ contributors:
3838

3939
billingRequired: true # this extension makes requests to a third party API (Stripe)
4040

41+
externalServices:
42+
- name: Stripe
43+
- pricingUri: https://stripe.com/pricing
44+
4145
roles:
4246
- role: firebaseauth.viewer
4347
reason: >-
@@ -137,6 +141,7 @@ params:
137141

138142
- param: STRIPE_API_KEY
139143
label: Stripe API key with restricted access
144+
type: secret
140145
description: >-
141146
What is your Stripe API key for sending invoices?
142147
We recommend creating a new [restricted key](https://stripe.com/docs/keys#limit-access)
@@ -159,6 +164,7 @@ params:
159164

160165
- param: STRIPE_WEBHOOK_SECRET
161166
label: Stripe webhook secret
167+
type: secret
162168
description: >-
163169
This is your signing secret for a Stripe-registered webhook that updates
164170
each Cloud Firestore document with the invoice's status from the Stripe

firestore-stripe-invoices/functions/lib/index.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

firestore-stripe-invoices/functions/lib/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

firestore-stripe-invoices/functions/src/index.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,8 @@ export const sendInvoice = functions.handler.firestore.document.onCreate(
138138
}
139139

140140
// Check to see if there's a Stripe customer associated with the email address
141-
let customers: Stripe.ApiList<Stripe.Customer> = await stripe.customers.list(
142-
{ email }
143-
);
141+
let customers: Stripe.ApiList<Stripe.Customer> =
142+
await stripe.customers.list({ email });
144143
let customer: Stripe.Customer;
145144

146145
if (customers.data.length) {
@@ -173,15 +172,15 @@ export const sendInvoice = functions.handler.firestore.document.onCreate(
173172
idempotencyKey: eventId,
174173
default_tax_rates: payload.default_tax_rates,
175174
transfer_data: payload.transfer_data,
176-
description: payload.description
175+
description: payload.description,
177176
});
178177

179178
if (invoice) {
180179
// Email the invoice to the customer
181-
const finalizedInvoice: Stripe.Invoice = await stripe.invoices.sendInvoice(
182-
invoice.id,
183-
{ idempotencyKey: `invoices-sendInvoice-${eventId}` }
184-
);
180+
const finalizedInvoice: Stripe.Invoice =
181+
await stripe.invoices.sendInvoice(invoice.id, {
182+
idempotencyKey: `invoices-sendInvoice-${eventId}`,
183+
});
185184
if (finalizedInvoice.status === 'open') {
186185
// Successfully emailed the invoice
187186
logs.invoiceSent(

firestore-stripe-invoices/functions/src/interfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface InvoicePayload {
2424
destination: string;
2525
amount?: number;
2626
};
27-
description?:string;
27+
description?: string;
2828
}
2929

3030
export interface OrderItem {

firestore-stripe-payments/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## Version 0.2.1 - TBD
1+
## Version 0.2.3 - 2021-11-22
22

33
[feat] Manage payment methods in the Dashboard: setting `payment_method_types` is now optional. By default, all payment methods enabled in your Stripe Dashboard will be presented on the Stripe Checkout page.
44

5-
## Version 0.2.0 - TBD
5+
## Version 0.2.2 - 2021-11-09
66

77
[RENAME] The extension has been renamed from `firestore-stripe-subscriptions` to `firestore-stripe-payments` to better reflect the support for both one time, and recurring payments.
88

0 commit comments

Comments
 (0)