Twice now a mock written from the upstream source passed while a real server disagreed — the system-log timestamps and the `/subscriptions/steps` shape — and `frequency_id` and several empty-string fields were wrong the same way. Reading the source harder was not going to find the next one. `tests/fixtures/*.json` hold the *shapes* of real responses: every key, with its JSON type, and no values at all. `real_shapes.rs` decodes each one and checks that a decode plus re-serialise loses no key, so a field the models silently drop now fails a test. It also refuses a fixture holding any real value, and refuses a fixture that no test reads. `seed_sample_data.rs` fills a disposable instance with one row of each kind and `capture_shapes.rs` captures the shapes back out with GET requests only, so the set can be refreshed when a divergence turns up. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
186 lines
3.0 KiB
JSON
186 lines
3.0 KiB
JSON
{
|
|
"bulk_updates": {
|
|
"client": [
|
|
""
|
|
],
|
|
"expense": [
|
|
""
|
|
],
|
|
"recurring_invoice": [
|
|
""
|
|
],
|
|
"task": [
|
|
""
|
|
]
|
|
},
|
|
"countries": [
|
|
{
|
|
"capital": "",
|
|
"citizenship": "",
|
|
"country_code": "",
|
|
"currency": "",
|
|
"currency_code": "",
|
|
"currency_sub_unit": "",
|
|
"decimal_separator": "",
|
|
"eea": false,
|
|
"full_name": "",
|
|
"id": "",
|
|
"iso_3166_2": "",
|
|
"iso_3166_3": "",
|
|
"name": "",
|
|
"region_code": "",
|
|
"sub_region_code": "",
|
|
"swap_currency_symbol": false,
|
|
"swap_postal_code": false,
|
|
"thousand_separator": ""
|
|
}
|
|
],
|
|
"currencies": [
|
|
{
|
|
"code": "",
|
|
"decimal_separator": "",
|
|
"exchange_rate": 0,
|
|
"id": "",
|
|
"name": "",
|
|
"precision": 0,
|
|
"swap_currency_symbol": false,
|
|
"symbol": "",
|
|
"thousand_separator": ""
|
|
}
|
|
],
|
|
"date_formats": [
|
|
{
|
|
"format": "",
|
|
"format_dart": "",
|
|
"format_moment": "",
|
|
"id": ""
|
|
}
|
|
],
|
|
"datetime_formats": [
|
|
{
|
|
"format": "",
|
|
"format_dart": "",
|
|
"format_moment": "",
|
|
"id": ""
|
|
}
|
|
],
|
|
"gateways": [
|
|
{
|
|
"created_at": 0,
|
|
"default_gateway_type_id": "",
|
|
"fields": "",
|
|
"id": "",
|
|
"is_offsite": false,
|
|
"is_secure": false,
|
|
"key": "",
|
|
"name": "",
|
|
"options": {
|
|
"1": {
|
|
"refund": false,
|
|
"token_billing": false,
|
|
"webhooks": [
|
|
""
|
|
]
|
|
},
|
|
"2": {
|
|
"refund": false,
|
|
"token_billing": false,
|
|
"webhooks": [
|
|
""
|
|
]
|
|
}
|
|
},
|
|
"provider": "",
|
|
"site_url": "",
|
|
"sort_order": 0,
|
|
"updated_at": 0,
|
|
"visible": false
|
|
}
|
|
],
|
|
"industries": [
|
|
{
|
|
"id": "",
|
|
"name": ""
|
|
}
|
|
],
|
|
"languages": [
|
|
{
|
|
"id": "",
|
|
"locale": "",
|
|
"name": ""
|
|
}
|
|
],
|
|
"license_key": false,
|
|
"payment_types": [
|
|
{
|
|
"gateway_type_id": 0,
|
|
"id": "",
|
|
"name": ""
|
|
}
|
|
],
|
|
"sizes": [
|
|
{
|
|
"id": "",
|
|
"name": ""
|
|
}
|
|
],
|
|
"templates": {
|
|
"invoice": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"partial_payment": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"payment": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"payment_failed": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"purchase_order": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"quote": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"quote_reminder1": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"reminder1": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"reminder2": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"reminder3": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"reminder_endless": {
|
|
"body": "",
|
|
"subject": ""
|
|
},
|
|
"statement": {
|
|
"body": "",
|
|
"subject": ""
|
|
}
|
|
},
|
|
"timezones": [
|
|
{
|
|
"id": "",
|
|
"location": "",
|
|
"name": "",
|
|
"utc_offset": 0
|
|
}
|
|
]
|
|
}
|