storj/satellite/payments/stripecoinpayments
Andrew Harding 99206fca04 satellite/payments/stripecoinpayments: skip line item generation for records with no usage
This change updates the stripecoinpayments service to optionally skip
generating line items for payments records that have no egress, storage,
or segments for the billing period.

This results in a reduction from 4 to 1 Stripe API calls for customers
who have no usage. The final API call is the attempt to generate an
invoice on stripe, which expectedly fails because there are no unapplied line
items. Removing that final API call would require some additional
queries and is out of scope for this change.

This functionality is behind the
`payments.stripe-coin-payments.skip-empty-invoices` feature flag.

https://github.com/storj/storj/issues/5381

Change-Id: Id184969a4c79047c40502336d69c51388ab03bf8
2022-12-16 17:02:50 +00:00
..
accounts_test.go satellite/payments/stripecoinpayments: add config for price overrides 2022-12-09 15:33:27 +00:00
accounts.go satellite/{web/payments}: show token balance on billing overview 2022-12-08 11:47:37 +00:00
client.go satellite/payments/stripecoinpayments: auto advance $0 invoices 2022-10-03 21:54:39 -05:00
conversion.go satellite: remove unused coinpayments code and chores 2022-11-30 16:24:48 +00:00
coupons.go satellite: invalid coupon code returns 400 status code 2022-10-31 13:43:09 -06:00
creditcards_test.go satellite/{payments,admin}: add deletion of user creditcards on account deletion 2020-08-27 10:18:19 +00:00
creditcards.go satellite/payments: Implement coupon codes 2021-07-26 17:15:55 +00:00
customers_test.go satellite/payments/stripecoinpayments: fix mock data-race 2022-08-01 14:30:39 +00:00
customers.go satellite/billing: make stripe invoice generation work with multiregion satellites 2021-05-06 11:51:03 -06:00
db.go satellite/{payments,satellitedb}: Remove custom coupon implementation 2021-10-11 19:47:00 +00:00
invoices.go satellite/payments: Fix discount when listing invoices. 2021-10-22 10:16:27 -04:00
projectrecords_test.go satellite: use segment count for billing 2021-10-27 19:21:50 +00:00
projectrecords.go satellite: use segment count for billing 2021-10-27 19:21:50 +00:00
service_test.go satellite/payments/stripecoinpayments: skip line item generation for records with no usage 2022-12-16 17:02:50 +00:00
service.go satellite/payments/stripecoinpayments: skip line item generation for records with no usage 2022-12-16 17:02:50 +00:00
stripemock.go satellite/payments/stripecoinpayments: skip line item generation for records with no usage 2022-12-16 17:02:50 +00:00
tokens_test.go satellite/{payments/storjscan,satellitedb}: Add wallet implementation 2022-06-03 11:45:47 +00:00
tokens.go satellite/payments: remove Deposit from Tokens interface 2022-10-17 13:32:06 +02:00
transactions_test.go satellite: remove unused coinpayments code and chores 2022-11-30 16:24:48 +00:00
transactions.go satellite: remove unused coinpayments code and chores 2022-11-30 16:24:48 +00:00