## Schedule Pro Services Invoice `client.V1.Contracts.ScheduleProServicesInvoice(ctx, body) (*V1ContractScheduleProServicesInvoiceResponse, error)` **post** `/v1/contracts/scheduleProServicesInvoice` Create a new scheduled invoice for Professional Services terms on a contract. This endpoint's availability is dependent on your client's configuration. ### Parameters - **body:** `V1ContractScheduleProServicesInvoiceParams` - **ContractID:** `param.Field[string]` - **CustomerID:** `param.Field[string]` - **IssuedAt:** `param.Field[Time]` The date the invoice is issued - **LineItems:** `param.Field[[]V1ContractScheduleProServicesInvoiceParamsLineItem]` Each line requires an amount or both unit_price and quantity. - **ProfessionalServiceID:** `string` - **AmendmentID:** `string` If the professional_service_id was added on an amendment, this is required. - **Amount:** `float64` Amount for the term on the new invoice. - **Metadata:** `string` For client use. - **NetsuiteInvoiceBillingEnd:** `Time` The end date for the billing period on the invoice. - **NetsuiteInvoiceBillingStart:** `Time` The start date for the billing period on the invoice. - **Quantity:** `float64` Quantity for the charge. Will be multiplied by unit_price to determine the amount. - **UnitPrice:** `float64` If specified, this overrides the unit price on the pro service term. Must also provide quantity (but not amount) if providing unit_price. - **NetsuiteInvoiceHeaderEnd:** `param.Field[Time]` The end date of the invoice header in Netsuite - **NetsuiteInvoiceHeaderStart:** `param.Field[Time]` The start date of the invoice header in Netsuite ### Returns - Not supported - **Data:** `[]Invoice` - **ID:** `string` - **CreditType:** `CreditTypeData` - **CustomerID:** `string` - **LineItems:** `[]InvoiceLineItem` - **CreditType:** `CreditTypeData` - **Name:** `string` - **Total:** `float64` - **AppliedCommitOrCredit:** `InvoiceLineItemsAppliedCommitOrCredit` Details about the credit or commit that was applied to this line item. Only present on line items with product of `USAGE`, `SUBSCRIPTION` or `COMPOSITE` types. - **ID:** `string` - **Type:** `InvoiceLineItemsAppliedCommitOrCreditType` - `InvoiceLineItemsAppliedCommitOrCreditType` - `InvoiceLineItemsAppliedCommitOrCreditType` - `InvoiceLineItemsAppliedCommitOrCreditType` - **CommitCustomFields:** `map[string, string]` - **CommitID:** `string` For line items with product of `USAGE`, `SUBSCRIPTION`, or `COMPOSITE` types, the ID of the credit or commit that was applied to this line item. For line items with product type of `FIXED`, the ID of the prepaid or postpaid commit that is being paid for. - **CommitNetsuiteItemID:** `string` - **CommitNetsuiteSalesOrderID:** `string` - **CommitSegmentID:** `string` - **CommitType:** `string` `PrepaidCommit` (for commit types `PREPAID` and `CREDIT`) or `PostpaidCommit` (for commit type `POSTPAID`). - **CustomFields:** `map[string, string]` - **DiscountCustomFields:** `map[string, string]` - **DiscountID:** `string` ID of the discount applied to this line item. - **EndingBefore:** `Time` The line item's end date (exclusive). - **GroupKey:** `string` - **GroupValue:** `string` - **IsProrated:** `bool` Indicates whether the line item is prorated for `SUBSCRIPTION` type product. - **ListPrice:** `Rate` Only present for contract invoices and when the `include_list_prices` query parameter is set to true. This will include the list rate for the charge if applicable. Only present for usage and subscription line items. - **Metadata:** `string` - **NetsuiteInvoiceBillingEnd:** `Time` The end date for the billing period on the invoice. - **NetsuiteInvoiceBillingStart:** `Time` The start date for the billing period on the invoice. - **NetsuiteItemID:** `string` - **PostpaidCommit:** `InvoiceLineItemsPostpaidCommit` Only present for line items paying for a postpaid commit true-up. - **ID:** `string` - **PresentationGroupValues:** `map[string, string]` Includes the presentation group values associated with this line item if presentation group keys are used. - **PricingGroupValues:** `map[string, string]` Includes the pricing group values associated with this line item if dimensional pricing is used. - **ProductCustomFields:** `map[string, string]` - **ProductID:** `string` ID of the product associated with the line item. - **ProductTags:** `[]string` The current product tags associated with the line item's `product_id`. - **ProductType:** `string` The type of the line item's product. Possible values are `FixedProductListItem` (for `FIXED` type products), `UsageProductListItem` (for `USAGE` type products), `SubscriptionProductListItem` (for `SUBSCRIPTION` type products) or `CompositeProductListItem` (for `COMPOSITE` type products). For scheduled charges, commit and credit payments, the value is `FixedProductListItem`. - **ProfessionalServiceCustomFields:** `map[string, string]` - **ProfessionalServiceID:** `string` - **Quantity:** `float64` The quantity associated with the line item. - **ResellerType:** `InvoiceLineItemsResellerType` - `InvoiceLineItemsResellerType` - `InvoiceLineItemsResellerType` - `InvoiceLineItemsResellerType` - `InvoiceLineItemsResellerType` - **ScheduledChargeCustomFields:** `map[string, string]` - **ScheduledChargeID:** `string` ID of scheduled charge. - **StartingAt:** `Time` The line item's start date (inclusive). - **SubLineItems:** `[]InvoiceLineItemsSubLineItem` - **CustomFields:** `map[string, string]` - **Name:** `string` - **Quantity:** `float64` - **Subtotal:** `float64` - **ChargeID:** `string` - **CreditGrantID:** `string` - **EndDate:** `Time` The end date for the charge (for seats charges only). - **Price:** `float64` the unit price for this charge, present only if the charge is not tiered and the quantity is nonzero - **StartDate:** `Time` The start date for the charge (for seats charges only). - **TierPeriod:** `InvoiceLineItemsSubLineItemsTierPeriod` when the current tier started and ends (for tiered charges only) - **StartingAt:** `Time` - **EndingBefore:** `Time` - **Tiers:** `[]InvoiceLineItemsSubLineItemsTier` - **Price:** `float64` - **Quantity:** `float64` - **StartingAt:** `float64` at what metric amount this tier begins - **Subtotal:** `float64` - **SubscriptionCustomFields:** `map[string, string]` - **Tier:** `InvoiceLineItemsTier` Populated if the line item has a tiered price. - **Level:** `float64` - **StartingAt:** `string` - **Size:** `string` - **UnitPrice:** `float64` The unit price associated with the line item. - **Status:** `string` - **Total:** `float64` - **Type:** `string` - **AmendmentID:** `string` - **BillableStatus:** `InvoiceBillableStatus` This field's availability is dependent on your client's configuration. - `InvoiceBillableStatus` - `InvoiceBillableStatus` - **ContractCustomFields:** `map[string, string]` - **ContractID:** `string` - **CorrectionRecord:** `InvoiceCorrectionRecord` - **CorrectedInvoiceID:** `string` - **Memo:** `string` - **Reason:** `string` - **CorrectedExternalInvoice:** `InvoiceCorrectionRecordCorrectedExternalInvoice` - **BillingProviderType:** `InvoiceCorrectionRecordCorrectedExternalInvoiceBillingProviderType` - `InvoiceCorrectionRecordCorrectedExternalInvoiceBillingProviderType` - `InvoiceCorrectionRecordCorrectedExternalInvoiceBillingProviderType` - `InvoiceCorrectionRecordCorrectedExternalInvoiceBillingProviderType` - `InvoiceCorrectionRecordCorrectedExternalInvoiceBillingProviderType` - `InvoiceCorrectionRecordCorrectedExternalInvoiceBillingProviderType` - `InvoiceCorrectionRecordCorrectedExternalInvoiceBillingProviderType` - `InvoiceCorrectionRecordCorrectedExternalInvoiceBillingProviderType` - `InvoiceCorrectionRecordCorrectedExternalInvoiceBillingProviderType` - **ExternalStatus:** `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - `InvoiceCorrectionRecordCorrectedExternalInvoiceExternalStatus` - **InvoiceID:** `string` - **IssuedAtTimestamp:** `Time` - **CreatedAt:** `Time` When the invoice was created (UTC). This field is present for correction invoices only. - **CustomFields:** `map[string, unknown]` - **CustomerCustomFields:** `map[string, string]` - **EndTimestamp:** `Time` End of the usage period this invoice covers (UTC) - **ExternalInvoice:** `InvoiceExternalInvoice` - **BillingProviderType:** `InvoiceExternalInvoiceBillingProviderType` - `InvoiceExternalInvoiceBillingProviderType` - `InvoiceExternalInvoiceBillingProviderType` - `InvoiceExternalInvoiceBillingProviderType` - `InvoiceExternalInvoiceBillingProviderType` - `InvoiceExternalInvoiceBillingProviderType` - `InvoiceExternalInvoiceBillingProviderType` - `InvoiceExternalInvoiceBillingProviderType` - `InvoiceExternalInvoiceBillingProviderType` - **ExternalStatus:** `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - `InvoiceExternalInvoiceExternalStatus` - **InvoiceID:** `string` - **IssuedAtTimestamp:** `Time` - **InvoiceAdjustments:** `[]InvoiceInvoiceAdjustment` - **CreditType:** `CreditTypeData` - **Name:** `string` - **Total:** `float64` - **CreditGrantCustomFields:** `map[string, string]` - **CreditGrantID:** `string` - **IssuedAt:** `Time` When the invoice was issued (UTC) - **NetPaymentTermsDays:** `float64` - **NetsuiteSalesOrderID:** `string` This field's availability is dependent on your client's configuration. - **PlanCustomFields:** `map[string, string]` - **PlanID:** `string` - **PlanName:** `string` - **ResellerRoyalty:** `InvoiceResellerRoyalty` Only present for contract invoices with reseller royalties. - **Fraction:** `string` - **NetsuiteResellerID:** `string` - **ResellerType:** `InvoiceResellerRoyaltyResellerType` - `InvoiceResellerRoyaltyResellerType` - `InvoiceResellerRoyaltyResellerType` - `InvoiceResellerRoyaltyResellerType` - `InvoiceResellerRoyaltyResellerType` - **AwsOptions:** `InvoiceResellerRoyaltyAwsOptions` - **AwsAccountNumber:** `string` - **AwsOfferID:** `string` - **AwsPayerReferenceID:** `string` - **GcpOptions:** `InvoiceResellerRoyaltyGcpOptions` - **GcpAccountID:** `string` - **GcpOfferID:** `string` - **SalesforceOpportunityID:** `string` This field's availability is dependent on your client's configuration. - **StartTimestamp:** `Time` Beginning of the usage period this invoice covers (UTC) - **Subtotal:** `float64` ### Example ```go package main import ( "context" "fmt" "time" "github.com/Metronome-Industries/metronome-go" "github.com/Metronome-Industries/metronome-go/option" ) func main() { client := metronome.NewClient( option.WithBearerToken("My Bearer Token"), ) response, err := client.V1.Contracts.ScheduleProServicesInvoice(context.TODO(), metronome.V1ContractScheduleProServicesInvoiceParams{ ContractID: metronome.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), CustomerID: metronome.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), IssuedAt: metronome.F(time.Now()), LineItems: metronome.F([]metronome.V1ContractScheduleProServicesInvoiceParamsLineItem{metronome.V1ContractScheduleProServicesInvoiceParamsLineItem{ ProfessionalServiceID: metronome.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ```