Skip to content

Commit b6c0ccb

Browse files
committed
billing: Replace IDs and other values before writing fixtures.
1 parent f812b76 commit b6c0ccb

File tree

27 files changed

+399
-315
lines changed

27 files changed

+399
-315
lines changed

corporate/tests/stripe_fixtures/billing_page_permissions:Customer.create.1.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"account_balance": 0,
3-
"created": 1539881153,
3+
"created": 1542020403,
44
"currency": null,
5-
"default_source": "card_1DMedAGh0CmXqmnwDLwrAV1v",
5+
"default_source": "card_replaced0000000000000001",
66
"delinquent": false,
77
"description": "zulip (Zulip Dev)",
88
"discount": null,
99
"email": "[email protected]",
10-
"id": "cus_DoHBcS2dBGOP9t",
11-
"invoice_prefix": "3B3F5D6",
10+
"id": "cus_replaced000001",
11+
"invoice_prefix": "REPLD01",
1212
"livemode": false,
1313
"metadata": {
1414
"realm_id": "1",
@@ -29,14 +29,14 @@
2929
"address_zip_check": "pass",
3030
"brand": "Visa",
3131
"country": "US",
32-
"customer": "cus_DoHBcS2dBGOP9t",
32+
"customer": "cus_replaced000001",
3333
"cvc_check": "pass",
3434
"dynamic_last4": null,
3535
"exp_month": 3,
3636
"exp_year": 2033,
37-
"fingerprint": "6dAXT9VZvwro65EK",
37+
"fingerprint": "REPLACED00000001",
3838
"funding": "credit",
39-
"id": "card_1DMedAGh0CmXqmnwDLwrAV1v",
39+
"id": "card_replaced0000000000000001",
4040
"last4": "4242",
4141
"metadata": {},
4242
"name": "Ada Starr",
@@ -47,14 +47,14 @@
4747
"has_more": false,
4848
"object": "list",
4949
"total_count": 1,
50-
"url": "/v1/customers/cus_DoHBcS2dBGOP9t/sources"
50+
"url": "/v1/customers/cus_replaced000001/sources"
5151
},
5252
"subscriptions": {
5353
"data": [],
5454
"has_more": false,
5555
"object": "list",
5656
"total_count": 0,
57-
"url": "/v1/customers/cus_DoHBcS2dBGOP9t/subscriptions"
57+
"url": "/v1/customers/cus_replaced000001/subscriptions"
5858
},
5959
"tax_info": null,
6060
"tax_info_verification": null

corporate/tests/stripe_fixtures/billing_page_permissions:Customer.retrieve.1.json

+23-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"account_balance": 0,
3-
"created": 1539881153,
3+
"created": 1542020403,
44
"currency": "usd",
55
"default_source": {
66
"address_city": "Pacific",
@@ -13,14 +13,14 @@
1313
"address_zip_check": "pass",
1414
"brand": "Visa",
1515
"country": "US",
16-
"customer": "cus_DoHBcS2dBGOP9t",
16+
"customer": "cus_replaced000001",
1717
"cvc_check": "pass",
1818
"dynamic_last4": null,
1919
"exp_month": 3,
2020
"exp_year": 2033,
21-
"fingerprint": "6dAXT9VZvwro65EK",
21+
"fingerprint": "REPLACED00000001",
2222
"funding": "credit",
23-
"id": "card_1DMedAGh0CmXqmnwDLwrAV1v",
23+
"id": "card_replaced0000000000000001",
2424
"last4": "4242",
2525
"metadata": {},
2626
"name": "Ada Starr",
@@ -31,8 +31,8 @@
3131
"description": "zulip (Zulip Dev)",
3232
"discount": null,
3333
"email": "[email protected]",
34-
"id": "cus_DoHBcS2dBGOP9t",
35-
"invoice_prefix": "3B3F5D6",
34+
"id": "cus_replaced000001",
35+
"invoice_prefix": "REPLD01",
3636
"livemode": false,
3737
"metadata": {
3838
"realm_id": "1",
@@ -53,14 +53,14 @@
5353
"address_zip_check": "pass",
5454
"brand": "Visa",
5555
"country": "US",
56-
"customer": "cus_DoHBcS2dBGOP9t",
56+
"customer": "cus_replaced000001",
5757
"cvc_check": "pass",
5858
"dynamic_last4": null,
5959
"exp_month": 3,
6060
"exp_year": 2033,
61-
"fingerprint": "6dAXT9VZvwro65EK",
61+
"fingerprint": "REPLACED00000001",
6262
"funding": "credit",
63-
"id": "card_1DMedAGh0CmXqmnwDLwrAV1v",
63+
"id": "card_replaced0000000000000001",
6464
"last4": "4242",
6565
"metadata": {},
6666
"name": "Ada Starr",
@@ -71,29 +71,30 @@
7171
"has_more": false,
7272
"object": "list",
7373
"total_count": 1,
74-
"url": "/v1/customers/cus_DoHBcS2dBGOP9t/sources"
74+
"url": "/v1/customers/cus_replaced000001/sources"
7575
},
7676
"subscriptions": {
7777
"data": [
7878
{
7979
"application_fee_percent": null,
8080
"billing": "charge_automatically",
81-
"billing_cycle_anchor": 1539881154,
81+
"billing_cycle_anchor": 1542020405,
8282
"cancel_at_period_end": false,
8383
"canceled_at": null,
84-
"created": 1539881154,
85-
"current_period_end": 1571417154,
86-
"current_period_start": 1539881154,
87-
"customer": "cus_DoHBcS2dBGOP9t",
84+
"created": 1542020405,
85+
"current_period_end": 1573556405,
86+
"current_period_start": 1542020405,
87+
"customer": "cus_replaced000001",
8888
"days_until_due": null,
89+
"default_source": null,
8990
"discount": null,
9091
"ended_at": null,
91-
"id": "sub_DoHBD49xn11qGo",
92+
"id": "sub_replaced000001",
9293
"items": {
9394
"data": [
9495
{
95-
"created": 1539881154,
96-
"id": "si_DoHB9flY9e7zrZ",
96+
"created": 1542020406,
97+
"id": "si_replaced000001",
9798
"metadata": {},
9899
"object": "subscription_item",
99100
"plan": {
@@ -118,13 +119,13 @@
118119
"usage_type": "licensed"
119120
},
120121
"quantity": 8,
121-
"subscription": "sub_DoHBD49xn11qGo"
122+
"subscription": "sub_replaced000001"
122123
}
123124
],
124125
"has_more": false,
125126
"object": "list",
126127
"total_count": 1,
127-
"url": "/v1/subscription_items?subscription=sub_DoHBD49xn11qGo"
128+
"url": "/v1/subscription_items?subscription=sub_replaced000001"
128129
},
129130
"livemode": false,
130131
"metadata": {},
@@ -151,7 +152,7 @@
151152
"usage_type": "licensed"
152153
},
153154
"quantity": 8,
154-
"start": 1539881154,
155+
"start": 1542020405,
155156
"status": "active",
156157
"tax_percent": 0.0,
157158
"trial_end": null,
@@ -161,7 +162,7 @@
161162
"has_more": false,
162163
"object": "list",
163164
"total_count": 1,
164-
"url": "/v1/customers/cus_DoHBcS2dBGOP9t/subscriptions"
165+
"url": "/v1/customers/cus_replaced000001/subscriptions"
165166
},
166167
"tax_info": null,
167168
"tax_info_verification": null

corporate/tests/stripe_fixtures/billing_page_permissions:Customer.retrieve.2.json

+23-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"account_balance": 0,
3-
"created": 1539881153,
3+
"created": 1542020403,
44
"currency": "usd",
55
"default_source": {
66
"address_city": "Pacific",
@@ -13,14 +13,14 @@
1313
"address_zip_check": "pass",
1414
"brand": "Visa",
1515
"country": "US",
16-
"customer": "cus_DoHBcS2dBGOP9t",
16+
"customer": "cus_replaced000001",
1717
"cvc_check": "pass",
1818
"dynamic_last4": null,
1919
"exp_month": 3,
2020
"exp_year": 2033,
21-
"fingerprint": "6dAXT9VZvwro65EK",
21+
"fingerprint": "REPLACED00000001",
2222
"funding": "credit",
23-
"id": "card_1DMedAGh0CmXqmnwDLwrAV1v",
23+
"id": "card_replaced0000000000000001",
2424
"last4": "4242",
2525
"metadata": {},
2626
"name": "Ada Starr",
@@ -31,8 +31,8 @@
3131
"description": "zulip (Zulip Dev)",
3232
"discount": null,
3333
"email": "[email protected]",
34-
"id": "cus_DoHBcS2dBGOP9t",
35-
"invoice_prefix": "3B3F5D6",
34+
"id": "cus_replaced000001",
35+
"invoice_prefix": "REPLD01",
3636
"livemode": false,
3737
"metadata": {
3838
"realm_id": "1",
@@ -53,14 +53,14 @@
5353
"address_zip_check": "pass",
5454
"brand": "Visa",
5555
"country": "US",
56-
"customer": "cus_DoHBcS2dBGOP9t",
56+
"customer": "cus_replaced000001",
5757
"cvc_check": "pass",
5858
"dynamic_last4": null,
5959
"exp_month": 3,
6060
"exp_year": 2033,
61-
"fingerprint": "6dAXT9VZvwro65EK",
61+
"fingerprint": "REPLACED00000001",
6262
"funding": "credit",
63-
"id": "card_1DMedAGh0CmXqmnwDLwrAV1v",
63+
"id": "card_replaced0000000000000001",
6464
"last4": "4242",
6565
"metadata": {},
6666
"name": "Ada Starr",
@@ -71,29 +71,30 @@
7171
"has_more": false,
7272
"object": "list",
7373
"total_count": 1,
74-
"url": "/v1/customers/cus_DoHBcS2dBGOP9t/sources"
74+
"url": "/v1/customers/cus_replaced000001/sources"
7575
},
7676
"subscriptions": {
7777
"data": [
7878
{
7979
"application_fee_percent": null,
8080
"billing": "charge_automatically",
81-
"billing_cycle_anchor": 1539881154,
81+
"billing_cycle_anchor": 1542020405,
8282
"cancel_at_period_end": false,
8383
"canceled_at": null,
84-
"created": 1539881154,
85-
"current_period_end": 1571417154,
86-
"current_period_start": 1539881154,
87-
"customer": "cus_DoHBcS2dBGOP9t",
84+
"created": 1542020405,
85+
"current_period_end": 1573556405,
86+
"current_period_start": 1542020405,
87+
"customer": "cus_replaced000001",
8888
"days_until_due": null,
89+
"default_source": null,
8990
"discount": null,
9091
"ended_at": null,
91-
"id": "sub_DoHBD49xn11qGo",
92+
"id": "sub_replaced000001",
9293
"items": {
9394
"data": [
9495
{
95-
"created": 1539881154,
96-
"id": "si_DoHB9flY9e7zrZ",
96+
"created": 1542020406,
97+
"id": "si_replaced000001",
9798
"metadata": {},
9899
"object": "subscription_item",
99100
"plan": {
@@ -118,13 +119,13 @@
118119
"usage_type": "licensed"
119120
},
120121
"quantity": 8,
121-
"subscription": "sub_DoHBD49xn11qGo"
122+
"subscription": "sub_replaced000001"
122123
}
123124
],
124125
"has_more": false,
125126
"object": "list",
126127
"total_count": 1,
127-
"url": "/v1/subscription_items?subscription=sub_DoHBD49xn11qGo"
128+
"url": "/v1/subscription_items?subscription=sub_replaced000001"
128129
},
129130
"livemode": false,
130131
"metadata": {},
@@ -151,7 +152,7 @@
151152
"usage_type": "licensed"
152153
},
153154
"quantity": 8,
154-
"start": 1539881154,
155+
"start": 1542020405,
155156
"status": "active",
156157
"tax_percent": 0.0,
157158
"trial_end": null,
@@ -161,7 +162,7 @@
161162
"has_more": false,
162163
"object": "list",
163164
"total_count": 1,
164-
"url": "/v1/customers/cus_DoHBcS2dBGOP9t/subscriptions"
165+
"url": "/v1/customers/cus_replaced000001/subscriptions"
165166
},
166167
"tax_info": null,
167168
"tax_info_verification": null

corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.1.json

+18-14
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,29 @@
1010
"charge": null,
1111
"closed": false,
1212
"currency": "usd",
13-
"customer": "cus_DoHBcS2dBGOP9t",
14-
"date": 1571417154,
13+
"customer": "cus_replaced000001",
14+
"date": 1573556405,
15+
"default_source": null,
1516
"description": "",
1617
"discount": null,
1718
"due_date": null,
1819
"ending_balance": 0,
20+
"finalized_at": null,
1921
"forgiven": false,
2022
"lines": {
2123
"data": [
2224
{
2325
"amount": 64000,
2426
"currency": "usd",
25-
"description": "8 user \u00d7 Zulip Cloud Standard (at $80.00 / year)",
27+
"description": "8 user \u00d7 Zulip Cloud Premium (at $80.00 / year)",
2628
"discountable": true,
27-
"id": "sli_31180ead97e161",
29+
"id": "sli_replaced000001",
2830
"livemode": false,
2931
"metadata": {},
3032
"object": "line_item",
3133
"period": {
32-
"end": 1603039554,
33-
"start": 1571417154
34+
"end": 1605178805,
35+
"start": 1573556405
3436
},
3537
"plan": {
3638
"active": true,
@@ -55,28 +57,30 @@
5557
},
5658
"proration": false,
5759
"quantity": 8,
58-
"subscription": "sub_DoHBD49xn11qGo",
59-
"subscription_item": "si_DoHB9flY9e7zrZ",
60+
"subscription": "sub_replaced000001",
61+
"subscription_item": "si_replaced000001",
6062
"type": "subscription"
6163
}
6264
],
6365
"has_more": false,
6466
"object": "list",
6567
"total_count": 1,
66-
"url": "/v1/invoices/upcoming/lines?customer=cus_DoHBcS2dBGOP9t"
68+
"url": "/v1/invoices/upcoming/lines?customer=cus_replaced000001"
6769
},
6870
"livemode": false,
6971
"metadata": {},
70-
"next_payment_attempt": 1571420754,
71-
"number": "3B3F5D6-0002",
72+
"next_payment_attempt": 1573560005,
73+
"number": "REPLCED-0001",
7274
"object": "invoice",
7375
"paid": false,
74-
"period_end": 1571417154,
75-
"period_start": 1539881154,
76+
"payment_intent": null,
77+
"period_end": 1573556405,
78+
"period_start": 1542020405,
7679
"receipt_number": null,
7780
"starting_balance": 0,
7881
"statement_descriptor": null,
79-
"subscription": "sub_DoHBD49xn11qGo",
82+
"status": "draft",
83+
"subscription": "sub_replaced000001",
8084
"subtotal": 64000,
8185
"tax": 0,
8286
"tax_percent": 0.0,

0 commit comments

Comments
 (0)