{
	"id": "Invoice.json",
	"title": "Invoice",
	"description": "A statement of the money due for goods or services; a bill.",
	"media": {"type": "application/json;profile=http://schema.org/Invoice"},
	"allOf": [{"$ref": "Thing.json"}, {"$ref": "Intangible.json"}],
	"type": "object",
	"properties": {
		"accountId": {"$ref": "#/definitions/accountId"},
		"billingPeriod": {"$ref": "Duration.json#/definitions/possibleRef"},
		"broker": {
			"oneOf": [
				{
					"type": "array",
					"items": {"$ref": "#/definitions/broker"}
				},
				{"$ref": "#/definitions/broker"}
			]
		},
		"category": {
			"oneOf": [
				{
					"type": "array",
					"items": {"$ref": "#/definitions/category"}
				},
				{"$ref": "#/definitions/category"}
			]
		},
		"confirmationNumber": {"$ref": "#/definitions/confirmationNumber"},
		"customer": {"$ref": "#/definitions/customer"},
		"minimumPaymentDue": {"$ref": "#/definitions/minimumPaymentDue"},
		"paymentDueDate": {"$ref": "#/definitions/paymentDueDate"},
		"paymentMethod": {"$ref": "PaymentMethod.json#/definitions/possibleRef"},
		"paymentMethodId": {
			"oneOf": [
				{
					"type": "array",
					"items": {"$ref": "#/definitions/paymentMethodId"}
				},
				{"$ref": "#/definitions/paymentMethodId"}
			]
		},
		"paymentStatus": {"$ref": "#/definitions/paymentStatus"},
		"provider": {"$ref": "#/definitions/provider"},
		"referencesOrder": {"$ref": "Order.json#/definitions/possibleRef"},
		"scheduledPaymentDate": {"$ref": "#/definitions/scheduledPaymentDate"},
		"totalPaymentDue": {"$ref": "#/definitions/totalPaymentDue"}
	},
	"definitions": {
		"accountId": {
			"title": "Account Id",
			"description": "The identifier for the account the payment will be applied to.",
			"type": "string"
		},
		"array": {
			"type": "array",
			"items": {"$ref": "#"}
		},
		"broker": {
			"title": "Broker",
			"description": "An entity that arranges for an exchange between a buyer and a seller.  In most cases a broker never acquires or releases ownership of a product or service involved in an exchange.  If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. Supersedes bookingAgent.",
			"anyOf": [{"$ref": "Organization.json#/definitions/possibleRef"}, {"$ref": "Person.json#/definitions/possibleRef"}]
		},
		"category": {
			"title": "Category",
			"description": "A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.",
			"anyOf": [{"type": "string"}, {"$ref": "PhysicalActivityCategory.json#/definitions/possibleRef"}, {"$ref": "Thing.json#/definitions/possibleRef"}]
		},
		"confirmationNumber": {
			"title": "Confirmation Number",
			"description": "A number that confirms the given order or payment has been received.",
			"type": "string"
		},
		"customer": {
			"title": "Customer",
			"description": "Party placing the order or paying the invoice.",
			"anyOf": [{"$ref": "Organization.json#/definitions/possibleRef"}, {"$ref": "Person.json#/definitions/possibleRef"}]
		},
		"minimumPaymentDue": {
			"title": "Minimum Payment Due",
			"description": "The minimum payment required at this time.",
			"anyOf": [{"$ref": "MonetaryAmount.json#/definitions/possibleRef"}, {"$ref": "PriceSpecification.json#/definitions/possibleRef"}]
		},
		"paymentDueDate": {
			"title": "Payment Due Date",
			"description": "The date that payment is due. Supersedes paymentDue.",
			"anyOf": [
				{
					"type": "string",
					"format": "date"
				},
				{
					"type": "string",
					"format": "date-time"
				}
			]
		},
		"paymentMethodId": {
			"title": "Payment Method Id",
			"description": "An identifier for the method of payment used (e.g. the last 4 digits of the credit card).",
			"type": "string"
		},
		"paymentStatus": {
			"title": "Payment Status",
			"description": "The status of payment; whether the invoice has been paid or not.",
			"anyOf": [{"$ref": "PaymentStatusType.json#/definitions/possibleRef"}, {"type": "string"}]
		},
		"possibleRef": {
			"oneOf": [
				{"$ref": "#"},
				{
					"type": "string",
					"format": "uri",
					"links": [{
						"rel": "full",
						"href": "{+$}"
					}]
				}
			]
		},
		"possibleRefArray": {
			"oneOf": [
				{
					"type": "array",
					"items": {"$ref": "#/definitions/possibleRef"}
				},
				{
					"type": "string",
					"format": "uri",
					"links": [{
						"rel": "full",
						"href": "{+$}"
					}]
				}
			]
		},
		"provider": {
			"title": "Provider",
			"description": "The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. Supersedes carrier.",
			"anyOf": [{"$ref": "Organization.json#/definitions/possibleRef"}, {"$ref": "Person.json#/definitions/possibleRef"}]
		},
		"scheduledPaymentDate": {
			"title": "Scheduled Payment Date",
			"description": "The date the invoice is scheduled to be paid.",
			"type": "string",
			"format": "date"
		},
		"totalPaymentDue": {
			"title": "Total Payment Due",
			"description": "The total amount due.",
			"anyOf": [{"$ref": "MonetaryAmount.json#/definitions/possibleRef"}, {"$ref": "PriceSpecification.json#/definitions/possibleRef"}]
		}
	}
}