<commit_before>package stripe

import "encoding/json"

// InvoiceLineType is the list of allowed values for the invoice line's type.
// Allowed values are "invoiceitem", "subscription".
type InvoiceLineType string

const (
	InvoiceLineTypeInvoiceItem  InvoiceLineType = "invoiceitem"
	InvoiceLineTypeSubscription InvoiceLineType = "subscription"
)

// InvoiceBilling is the type of billing method for this invoice.
// Currently supported values are "send_invoice" and "charge_automatically".
type InvoiceBilling string

const (
	InvoiceBillingChargeAutomatically InvoiceBilling = "charge_automatically"
	InvoiceBillingSendInvoice         InvoiceBilling = "send_invoice"
)

// InvoiceParams is the set of parameters that can be used when creating or updating an invoice.
// For more details see https://stripe.com/docs/api#create_invoice, https://stripe.com/docs/api#update_invoice.
type InvoiceParams struct {
	Params              `form:"*"`
	ApplicationFee      *int64   `form:"application_fee"`
	Billing             *string  `form:"billing"`
	Closed              *bool    `form:"closed"`
	Customer            *string  `form:"customer"`
	DaysUntilDue        *int64   `form:"days_until_due"`
	Description         *string  `form:"description"`
	DueDate             *int64   `form:"due_date"`
	Forgiven            *bool    `form:"forgiven"`
	Paid                *bool    `form:"paid"`
	StatementDescriptor *string  `form:"statement_descriptor"`
	Subscription        *string  `form:"subscription"`
	TaxPercent          *float64 `form:"tax_percent"`

	// These are all for exclusive use by GetNext.

	SubscriptionItems         []*SubscriptionItemsParams `form:"subscription_items,indexed"`
	SubscriptionPlan          *string                    `form:"subscription_plan"`
	SubscriptionProrate       *bool                      `form:"subscription_prorate"`
	SubscriptionProrationDate *int64                     `form:"subscription_proration_date"`
	SubscriptionQuantity      *int64                     `form:"subscription_quantity"`
	SubscriptionTrialEnd      *int64                     `form:"subscription_trial_end"`
}

// InvoiceListParams is the set of parameters that can be used when listing invoices.
// For more details see https://stripe.com/docs/api#list_customer_invoices.
type InvoiceListParams struct {
	ListParams   `form:"*"`
	Billing      *string           `form:"billing"`
	Customer     *string           `form:"customer"`
	Date         *int64            `form:"date"`
	DateRange    *RangeQueryParams `form:"date"`
	DueDate      *int64            `form:"due_date"`
	Subscription *string           `form:"subscription"`
}

// InvoiceLineListParams is the set of parameters that can be used when listing invoice line items.
// For more details see https://stripe.com/docs/api#invoice_lines.
type InvoiceLineListParams struct {
	ListParams `form:"*"`

	Customer *string `form:"customer"`

	// ID is the invoice ID to list invoice lines for.
	ID *string `form:"-"` // Goes in the URL

	Subscription *string `form:"subscription"`
}

// Invoice is the resource representing a Stripe invoice.
// For more details see https://stripe.com/docs/api#invoice_object.
type Invoice struct {
	AmountDue           int64             `json:"amount_due"`
	ApplicationFee      int64             `json:"application_fee"`
	AttemptCount        int64             `json:"attempt_count"`
	Attempted           bool              `json:"attempted"`
	Billing             InvoiceBilling    `json:"billing"`
	Charge              *Charge           `json:"charge"`
	Closed              bool              `json:"closed"`
	Currency            Currency          `json:"currency"`
	Customer            *Customer         `json:"customer"`
	Date                int64             `json:"date"`
	Description         string            `json:"description"`
	Discount            *Discount         `json:"discount"`
	DueDate             int64             `json:"due_date"`
	EndingBalance       int64             `json:"ending_balance"`
	Forgiven            bool              `json:"forgiven"`
	ID                  string            `json:"id"`<commit_msg>Add invoice's pdf and hosted url<commit_after>package stripe

import "encoding/json"

// InvoiceLineType is the list of allowed values for the invoice line's type.
// Allowed values are "invoiceitem", "subscription".
type InvoiceLineType string

const (
	InvoiceLineTypeInvoiceItem  InvoiceLineType = "invoiceitem"
	InvoiceLineTypeSubscription InvoiceLineType = "subscription"
)

// InvoiceBilling is the type of billing method for this invoice.
// Currently supported values are "send_invoice" and "charge_automatically".
type InvoiceBilling string

const (
	InvoiceBillingChargeAutomatically InvoiceBilling = "charge_automatically"
	InvoiceBillingSendInvoice         InvoiceBilling = "send_invoice"
)

// InvoiceParams is the set of parameters that can be used when creating or updating an invoice.
// For more details see https://stripe.com/docs/api#create_invoice, https://stripe.com/docs/api#update_invoice.
type InvoiceParams struct {
	Params              `form:"*"`
	ApplicationFee      *int64   `form:"application_fee"`
	Billing             *string  `form:"billing"`
	Closed              *bool    `form:"closed"`
	Customer            *string  `form:"customer"`
	DaysUntilDue        *int64   `form:"days_until_due"`
	Description         *string  `form:"description"`
	DueDate             *int64   `form:"due_date"`
	Forgiven            *bool    `form:"forgiven"`
	Paid                *bool    `form:"paid"`
	StatementDescriptor *string  `form:"statement_descriptor"`
	Subscription        *string  `form:"subscription"`
	TaxPercent          *float64 `form:"tax_percent"`

	// These are all for exclusive use by GetNext.

	SubscriptionItems         []*SubscriptionItemsParams `form:"subscription_items,indexed"`
	SubscriptionPlan          *string                    `form:"subscription_plan"`
	SubscriptionProrate       *bool                      `form:"subscription_prorate"`
	SubscriptionProrationDate *int64                     `form:"subscription_proration_date"`
	SubscriptionQuantity      *int64                     `form:"subscription_quantity"`
	SubscriptionTrialEnd      *int64                     `form:"subscription_trial_end"`
}

// InvoiceListParams is the set of parameters that can be used when listing invoices.
// For more details see https://stripe.com/docs/api#list_customer_invoices.
type InvoiceListParams struct {
	ListParams   `form:"*"`
	Billing      *string           `form:"billing"`
	Customer     *string           `form:"customer"`
	Date         *int64            `form:"date"`
	DateRange    *RangeQueryParams `form:"date"`
	DueDate      *int64            `form:"due_date"`
	Subscription *string           `form:"subscription"`
}

// InvoiceLineListParams is the set of parameters that can be used when listing invoice line items.
// For more details see https://stripe.com/docs/api#invoice_lines.
type InvoiceLineListParams struct {
	ListParams `form:"*"`

	Customer *string `form:"customer"`

	// ID is the invoice ID to list invoice lines for.
	ID *string `form:"-"` // Goes in the URL

	Subscription *string `form:"subscription"`
}

// Invoice is the resource representing a Stripe invoice.
// For more details see https://stripe.com/docs/api#invoice_object.
type Invoice struct {
	AmountDue           int64             `json:"amount_due"`
	ApplicationFee      int64             `json:"application_fee"`
	AttemptCount        int64             `json:"attempt_count"`
	Attempted           bool              `json:"attempted"`
	Billing             InvoiceBilling    `json:"billing"`
	Charge              *Charge           `json:"charge"`
	Closed              bool              `json:"closed"`
	Currency            Currency          `json:"currency"`
	Customer            *Customer         `json:"customer"`
	Date                int64             `json:"date"`
	Description         string            `json:"description"`
	Discount            *Discount         `json:"discount"`
	DueDate             int64             `json:"due_date"`
	EndingBalance       int64             `json:"ending_balance"`
	Forgiven            bool              `json:"forgiven"`
	HostedInvoiceURL    string            `json:"hosted_invoice_url"`
	ID                  string            `json:"id"`
	InvoicePDF          string            `json:"invoice_pdf"`
{'fraction_non_alphanumeric': 0.09339217557251908, 'fraction_numerical': 0.00715648854961832, 'mean_word_length': 2.5025062656641603, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4168550', 'n_tokens_mistral': 2328, 'n_tokens_neox': 2225, 'n_words': 610}