Skip to content

Commit fe33d7e

Browse files
authored
chore: sync listCharges fixture with certificate-purchase entry (#502)
* chore: sync listCharges fixture with certificate-purchase entry * chore: add CHANGELOG entry for listCharges fixture sync
1 parent aef7b3c commit fe33d7e

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/), the format is
44

55
## main
66

7+
### Changed
8+
9+
- Updated the `listCharges` test fixture to include a certificate purchase entry demonstrating that `product_reference` is a string even when it represents a numeric ID. (#502)
10+
711
### Removed
812

913
- **BREAKING**: Removed the deprecated `contact_id` field from the `Certificate` struct and from `LetsencryptCertificateInput`. The field was deprecated on 2022-05-17 and is no longer required for certificate operations.

tests/fixtures/v2/api/listCharges/success.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ cache-control: no-store, must-revalidate, private, max-age=0
99
x-request-id: a57a87c8-626a-4361-9fb8-b55ca9be8e5d
1010
x-runtime: 0.060526
1111

12-
{"data":[{"invoiced_at":"2023-08-17T05:53:36Z","total_amount":"14.50","balance_amount":"0.00","reference":"1-2","state":"collected","items":[{"description":"Register bubble-registered.com","amount":"14.50","product_id":1,"product_type":"domain-registration","product_reference":"bubble-registered.com"}]},{"invoiced_at":"2023-08-17T05:57:53Z","total_amount":"14.50","balance_amount":"0.00","reference":"2-2","state":"refunded","items":[{"description":"Register example.com","amount":"14.50","product_id":2,"product_type":"domain-registration","product_reference":"example.com"}]},{"invoiced_at":"2023-10-24T07:49:05Z","total_amount":"1099999.99","balance_amount":"0.00","reference":"4-2","state":"collected","items":[{"description":"Test Line Item 1","amount":"99999.99","product_id":null,"product_type":"manual","product_reference":null},{"description":"Test Line Item 2","amount":"1000000.00","product_id":null,"product_type":"manual","product_reference":null}]}],"pagination":{"current_page":1,"per_page":30,"total_entries":3,"total_pages":1}}
12+
{"data":[{"invoiced_at":"2023-08-17T05:53:36Z","total_amount":"14.50","balance_amount":"0.00","reference":"1-2","state":"collected","items":[{"description":"Register bubble-registered.com","amount":"14.50","product_id":1,"product_type":"domain-registration","product_reference":"bubble-registered.com"}]},{"invoiced_at":"2023-08-17T05:57:53Z","total_amount":"14.50","balance_amount":"0.00","reference":"2-2","state":"refunded","items":[{"description":"Register example.com","amount":"14.50","product_id":2,"product_type":"domain-registration","product_reference":"example.com"}]},{"invoiced_at":"2023-10-24T07:49:05Z","total_amount":"1099999.99","balance_amount":"0.00","reference":"4-2","state":"collected","items":[{"description":"Test Line Item 1","amount":"99999.99","product_id":null,"product_type":"manual","product_reference":null},{"description":"Test Line Item 2","amount":"1000000.00","product_id":null,"product_type":"manual","product_reference":null}]},{"invoiced_at":"2023-10-24T09:00:00Z","total_amount":"20.00","balance_amount":"0.00","reference":"5-2","state":"collected","items":[{"description":"Purchase Certificate www.bubble-registered.com","amount":"20.00","product_id":42,"product_type":"certificate-purchase","product_reference":"42"}]}],"pagination":{"current_page":1,"per_page":30,"total_entries":4,"total_pages":1}}

tests/service/billing_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def test_list_charges_success(self):
1919
Charge({"invoiced_at": "2023-08-17T05:53:36Z","total_amount": "14.50","balance_amount": "0.00","reference": "1-2","state": "collected","items":[{"description": "Register bubble-registered.com","amount": "14.50","product_id": 1,"product_type": "domain-registration","product_reference": "bubble-registered.com"}]}),
2020
Charge({"invoiced_at": "2023-08-17T05:57:53Z","total_amount": "14.50","balance_amount": "0.00","reference": "2-2","state": "refunded","items":[{"description": "Register example.com","amount": "14.50","product_id": 2,"product_type": "domain-registration","product_reference": "example.com"}]}),
2121
Charge({"invoiced_at": "2023-10-24T07:49:05Z","total_amount": "1099999.99","balance_amount": "0.00","reference": "4-2","state": "collected","items":[{"description": "Test Line Item 1","amount": "99999.99","product_id": None,"product_type": "manual","product_reference":None},{"description": "Test Line Item 2","amount": "1000000.00","product_id": None,"product_type": "manual","product_reference":None}]}),
22+
Charge({"invoiced_at": "2023-10-24T09:00:00Z","total_amount": "20.00","balance_amount": "0.00","reference": "5-2","state": "collected","items":[{"description": "Purchase Certificate www.bubble-registered.com","amount": "20.00","product_id": 42,"product_type": "certificate-purchase","product_reference": "42"}]}),
2223
])
2324

2425
@responses.activate

0 commit comments

Comments
 (0)