Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (integration-customers): update integration customer definition #185

Merged
merged 1 commit into from
Jun 25, 2024
Merged
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
62 changes: 36 additions & 26 deletions customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,23 @@ type CustomerBillingConfiguration struct {
}

type IntegrationCustomer struct {
LagoID uuid.UUID `json:"id,omitempty"`
ExternalCustomerId string `json:"external_customer_id,omitempty"`
IntegrationType IntegrationType `json:"integration_type,omitempty"`
IntegrationCode bool `json:"integration_code,omitempty"`
SubsidiaryId string `json:"subsidiary_id,omitempty"`
SyncWithProvider bool `json:"sync_with_provider,omitempty"`
}

type IntegrationCustomersResponse struct {
LagoID uuid.UUID `json:"lago_id,omitempty"`
ExternalCustomerId string `json:"external_customer_id,omitempty"`
IntegrationType IntegrationType `json:"type,omitempty"`
IntegrationCode bool `json:"integration_code,omitempty"`
SubsidiaryId string `json:"subsidiary_id,omitempty"`
SyncWithProvider bool `json:"sync_with_provider,omitempty"`
}

type CustomerChargeUsage struct {
Units string `json:"units,omitempty"`
EventsCount int `json:"events_count"`
Expand All @@ -136,11 +146,11 @@ type CustomerChargeUsage struct {

type CustomerChargeGroupdUsage struct {
LagoId string `json:"lago_id,omitempty"`
Key string `json:"key,omitempty"`
Value string `json:"value,omitempty"`
AmountCents int `json:"amount_cents,omitempty"`
EventsCount int `json:"events_count,omitempty"`
Units string `json:"units,omitempty"`
Key string `json:"key,omitempty"`
Value string `json:"value,omitempty"`
AmountCents int `json:"amount_cents,omitempty"`
EventsCount int `json:"events_count,omitempty"`
Units string `json:"units,omitempty"`
}

type CustomerChargeFilterUsage struct {
Expand Down Expand Up @@ -197,27 +207,27 @@ type Customer struct {
ExternalID string `json:"external_id,omitempty"`
Slug string `json:"slug,omitempty"`

Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
AddressLine1 string `json:"address_line1,omitempty"`
AddressLine2 string `json:"address_line2,omitempty"`
City string `json:"city,omitempty"`
State string `json:"state,omitempty"`
Zipcode string `json:"zipcode,omitempty"`
Country string `json:"country,omitempty"`
LegalName string `json:"legal_name,omitempty"`
LegalNumber string `json:"legal_number,omitempty"`
NetPaymentTerm int `json:"net_payment_term,omitempty"`
TaxIdentificationNumber string `json:"tax_identification_number,omitempty"`
LogoURL string `json:"logo_url,omitempty"`
Phone string `json:"phone,omitempty"`
URL string `json:"url,omitempty"`
BillingConfiguration CustomerBillingConfiguration `json:"billing_configuration,omitempty"`
IntegrationCustomers []IntegrationCustomer `json:"integration_customers,omitempty"`
Metadata []MetadataResponse `json:"metadata,omitempty"`
Currency Currency `json:"currency,omitempty"`
Timezone string `json:"timezone,omitempty"`
ApplicableTimezone string `json:"applicable_timezone,omitempty"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
AddressLine1 string `json:"address_line1,omitempty"`
AddressLine2 string `json:"address_line2,omitempty"`
City string `json:"city,omitempty"`
State string `json:"state,omitempty"`
Zipcode string `json:"zipcode,omitempty"`
Country string `json:"country,omitempty"`
LegalName string `json:"legal_name,omitempty"`
LegalNumber string `json:"legal_number,omitempty"`
NetPaymentTerm int `json:"net_payment_term,omitempty"`
TaxIdentificationNumber string `json:"tax_identification_number,omitempty"`
LogoURL string `json:"logo_url,omitempty"`
Phone string `json:"phone,omitempty"`
URL string `json:"url,omitempty"`
BillingConfiguration CustomerBillingConfiguration `json:"billing_configuration,omitempty"`
IntegrationCustomers []IntegrationCustomersResponse `json:"integration_customers,omitempty"`
Metadata []MetadataResponse `json:"metadata,omitempty"`
Currency Currency `json:"currency,omitempty"`
Timezone string `json:"timezone,omitempty"`
ApplicableTimezone string `json:"applicable_timezone,omitempty"`

Taxes []Tax `json:"taxes,omitempty"`

Expand Down
Loading