Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lago_python_client/models/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from lago_python_client.base_model import BaseModel

from ..base_model import BaseResponseModel
from .error_detail import ErrorDetailsResponse
from .invoice_custom_section import InvoiceCustomSectionsResponseList
from .tax import TaxesResponse

Expand Down Expand Up @@ -145,3 +146,4 @@ class CustomerResponse(BaseResponseModel):
skip_invoice_custom_sections: Optional[bool]
applicable_invoice_custom_sections: Optional[InvoiceCustomSectionsResponseList]
billing_entity_code: Optional[str]
error_details: Optional[ErrorDetailsResponse]
2 changes: 1 addition & 1 deletion lago_python_client/models/error_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class ErrorDetailResponse(BaseModel):
organization_id: str
lago_id: str
error_code: str
details: Optional[Dict[str, Any]]

Expand Down
24 changes: 14 additions & 10 deletions tests/fixtures/customer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
"provider_customer_id": "cus_12345",
"sync_with_provider": true,
"document_locale": "fr",
"provider_payment_methods": [
"card",
"sepa_debit"
]
"provider_payment_methods": ["card", "sepa_debit"]
},
"shipping_address": {
"city": "Paris",
Expand Down Expand Up @@ -84,12 +81,19 @@
],
"applicable_invoice_custom_sections": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "custom_section_name",
"code": "custom_section_code",
"description": "custom_section_description",
"details": "custom_section_details",
"display_name": "custom_section_display_name"
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "custom_section_name",
"code": "custom_section_code",
"description": "custom_section_description",
"details": "custom_section_details",
"display_name": "custom_section_display_name"
}
],
"error_details": [
{
"lago_id": "4c904c90-4c90-4c90-4c90-4c904c904c90",
"error_code": "tax_error",
"details": { "tax_error": ["customerAddressCouldNotResolve: Service failure"] }
}
]
}
Expand Down
11 changes: 8 additions & 3 deletions tests/fixtures/invoice.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@
"name": "User Seats",
"invoice_display_name": "charge_invoice_display_name",
"filters": {
"region": [
"us-east-1"
]
"region": ["us-east-1"]
}
},
"amount_cents": 100,
Expand Down Expand Up @@ -184,6 +182,13 @@
"name": "Free Beer"
}
}
],
"error_details": [
{
"lago_id": "4c904c90-4c90-4c90-4c90-4c904c904c90",
"error_code": "tax_error",
"details": { "tax_error": ["customerAddressCouldNotResolve: Service failure"] }
}
]
}
}
Loading