diff --git a/customer.go b/customer.go index 3dd1299..6046de7 100644 --- a/customer.go +++ b/customer.go @@ -17,6 +17,12 @@ const ( PaymentProviderGocardless CustomerPaymentProvider = "gocardless" ) +type IntegrationType string + +const ( + IntegrationNetsuite IntegrationType = "netsuite" +) + type CustomerParams struct { Customer *CustomerInput `json:"customer"` } @@ -79,6 +85,7 @@ type CustomerInput struct { Timezone string `json:"timezone,omitempty"` Metadata []CustomerMetadataInput `json:"metadata,omitempty"` BillingConfiguration CustomerBillingConfigurationInput `json:"billing_configuration,omitempty"` + IntegrationCustomer IntegrationCustomer `json:"integration_customer,omitempty"` TaxCodes []string `json:"tax_codes,omitempty"` } @@ -106,6 +113,14 @@ type CustomerBillingConfiguration struct { DocumentLocale string `json:"document_locale,omitempty"` } +type IntegrationCustomer struct { + 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 CustomerChargeUsage struct { Units string `json:"units,omitempty"` EventsCount int `json:"events_count"` @@ -198,6 +213,7 @@ type Customer struct { Phone string `json:"phone,omitempty"` URL string `json:"url,omitempty"` BillingConfiguration CustomerBillingConfiguration `json:"billing_configuration,omitempty"` + IntegrationCustomer IntegrationCustomer `json:"integration_customer,omitempty"` Metadata []MetadataResponse `json:"metadata,omitempty"` Currency Currency `json:"currency,omitempty"` Timezone string `json:"timezone,omitempty"`