@metronome/sdk 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.mts +226 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +226 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts.map +1 -1
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.mjs.map +1 -1
- package/resources/v1/audit-logs.d.mts.map +1 -1
- package/resources/v1/audit-logs.d.ts.map +1 -1
- package/resources/v1/audit-logs.mjs.map +1 -1
- package/resources/v1/billable-metrics.d.mts.map +1 -1
- package/resources/v1/billable-metrics.d.ts.map +1 -1
- package/resources/v1/billable-metrics.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +406 -1
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +406 -1
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/contracts/index.d.mts.map +1 -1
- package/resources/v1/contracts/index.d.ts.map +1 -1
- package/resources/v1/contracts/index.mjs.map +1 -1
- package/resources/v1/contracts/named-schedules.d.mts.map +1 -1
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/products.d.mts.map +1 -1
- package/resources/v1/contracts/products.d.ts.map +1 -1
- package/resources/v1/contracts/products.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts.d.mts.map +1 -1
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/contracts.mjs.map +1 -1
- package/resources/v1/credit-grants.d.mts.map +1 -1
- package/resources/v1/credit-grants.d.ts.map +1 -1
- package/resources/v1/credit-grants.mjs.map +1 -1
- package/resources/v1/custom-fields.d.mts.map +1 -1
- package/resources/v1/custom-fields.d.ts.map +1 -1
- package/resources/v1/custom-fields.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts.map +1 -1
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.mjs.map +1 -1
- package/resources/v1/customers/billing-config.d.mts.map +1 -1
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.mjs.map +1 -1
- package/resources/v1/customers/commits.d.mts.map +1 -1
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.mjs.map +1 -1
- package/resources/v1/customers/credits.d.mts.map +1 -1
- package/resources/v1/customers/credits.d.ts.map +1 -1
- package/resources/v1/customers/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/invoices.d.mts.map +1 -1
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.mjs.map +1 -1
- package/resources/v1/customers/named-schedules.d.mts.map +1 -1
- package/resources/v1/customers/named-schedules.d.ts.map +1 -1
- package/resources/v1/customers/named-schedules.mjs.map +1 -1
- package/resources/v1/customers/plans.d.mts.map +1 -1
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/customers/plans.mjs.map +1 -1
- package/resources/v1/customers.d.mts.map +1 -1
- package/resources/v1/customers.d.ts.map +1 -1
- package/resources/v1/customers.mjs.map +1 -1
- package/resources/v1/dashboards.d.mts.map +1 -1
- package/resources/v1/dashboards.d.ts.map +1 -1
- package/resources/v1/dashboards.mjs.map +1 -1
- package/resources/v1/index.d.mts +0 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +0 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +1 -3
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +0 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/invoices.d.mts.map +1 -1
- package/resources/v1/invoices.d.ts.map +1 -1
- package/resources/v1/invoices.mjs.map +1 -1
- package/resources/v1/packages.d.mts +57 -4
- package/resources/v1/packages.d.mts.map +1 -1
- package/resources/v1/packages.d.ts +57 -4
- package/resources/v1/packages.d.ts.map +1 -1
- package/resources/v1/packages.js +3 -4
- package/resources/v1/packages.js.map +1 -1
- package/resources/v1/packages.mjs +3 -4
- package/resources/v1/packages.mjs.map +1 -1
- package/resources/v1/plans.d.mts.map +1 -1
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/pricing-units.d.mts.map +1 -1
- package/resources/v1/pricing-units.d.ts.map +1 -1
- package/resources/v1/pricing-units.mjs.map +1 -1
- package/resources/v1/services.d.mts.map +1 -1
- package/resources/v1/services.d.ts.map +1 -1
- package/resources/v1/services.mjs.map +1 -1
- package/resources/v1/settings/billing-providers.d.mts.map +1 -1
- package/resources/v1/settings/billing-providers.d.ts.map +1 -1
- package/resources/v1/settings/billing-providers.mjs.map +1 -1
- package/resources/v1/settings/index.d.mts.map +1 -1
- package/resources/v1/settings/index.d.ts.map +1 -1
- package/resources/v1/settings/index.mjs.map +1 -1
- package/resources/v1/settings/settings.d.mts.map +1 -1
- package/resources/v1/settings/settings.d.ts.map +1 -1
- package/resources/v1/settings/settings.mjs.map +1 -1
- package/resources/v1/settings.d.mts.map +1 -1
- package/resources/v1/settings.d.ts.map +1 -1
- package/resources/v1/settings.mjs.map +1 -1
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +0 -4
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +0 -4
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +0 -4
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +0 -4
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1.d.mts.map +1 -1
- package/resources/v1.d.ts.map +1 -1
- package/resources/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.mts +1337 -1
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +1337 -1
- package/resources/v2/contracts.d.ts.map +1 -1
- package/resources/v2/contracts.mjs.map +1 -1
- package/resources/v2/index.d.mts.map +1 -1
- package/resources/v2/index.d.ts.map +1 -1
- package/resources/v2/index.mjs.map +1 -1
- package/resources/v2/v2.d.mts.map +1 -1
- package/resources/v2/v2.d.ts.map +1 -1
- package/resources/v2/v2.mjs.map +1 -1
- package/resources/v2.d.mts.map +1 -1
- package/resources/v2.d.ts.map +1 -1
- package/resources/v2.mjs.map +1 -1
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/resources/shared.ts +290 -0
- package/src/resources/v1/contracts/contracts.ts +530 -1
- package/src/resources/v1/index.ts +0 -11
- package/src/resources/v1/packages.ts +81 -4
- package/src/resources/v1/v1.ts +0 -26
- package/src/resources/v2/contracts.ts +1756 -1
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/v1/payments.d.mts +0 -127
- package/resources/v1/payments.d.mts.map +0 -1
- package/resources/v1/payments.d.ts +0 -127
- package/resources/v1/payments.d.ts.map +0 -1
- package/resources/v1/payments.js +0 -71
- package/resources/v1/payments.js.map +0 -1
- package/resources/v1/payments.mjs +0 -67
- package/resources/v1/payments.mjs.map +0 -1
- package/src/resources/v1/payments.ts +0 -187
|
@@ -730,7 +730,472 @@ export class Contracts extends APIResource {
|
|
|
730
730
|
export type ContractListBalancesResponsesBodyCursorPage = BodyCursorPage<ContractListBalancesResponse>;
|
|
731
731
|
|
|
732
732
|
export interface ContractCreateResponse {
|
|
733
|
-
data:
|
|
733
|
+
data: ContractCreateResponse.Data;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
export namespace ContractCreateResponse {
|
|
737
|
+
export interface Data {
|
|
738
|
+
id: string;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* The created contract.
|
|
742
|
+
*/
|
|
743
|
+
contract?: Data.Contract;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
export namespace Data {
|
|
747
|
+
/**
|
|
748
|
+
* The created contract.
|
|
749
|
+
*/
|
|
750
|
+
export interface Contract {
|
|
751
|
+
id: string;
|
|
752
|
+
|
|
753
|
+
commits: Array<Shared.Commit>;
|
|
754
|
+
|
|
755
|
+
created_at: string;
|
|
756
|
+
|
|
757
|
+
created_by: string;
|
|
758
|
+
|
|
759
|
+
customer_id: string;
|
|
760
|
+
|
|
761
|
+
overrides: Array<Shared.Override>;
|
|
762
|
+
|
|
763
|
+
scheduled_charges: Array<Shared.ScheduledCharge>;
|
|
764
|
+
|
|
765
|
+
starting_at: string;
|
|
766
|
+
|
|
767
|
+
transitions: Array<Contract.Transition>;
|
|
768
|
+
|
|
769
|
+
usage_filter: Array<Contract.UsageFilter>;
|
|
770
|
+
|
|
771
|
+
usage_statement_schedule: Contract.UsageStatementSchedule;
|
|
772
|
+
|
|
773
|
+
credits?: Array<Shared.Credit>;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
777
|
+
*/
|
|
778
|
+
custom_fields?: { [key: string]: string };
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* The billing provider configuration associated with the contract.
|
|
782
|
+
*/
|
|
783
|
+
customer_billing_provider_configuration?: Contract.CustomerBillingProviderConfiguration;
|
|
784
|
+
|
|
785
|
+
ending_before?: string;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
789
|
+
* respective list endpoints to get the full lists.
|
|
790
|
+
*/
|
|
791
|
+
has_more?: Contract.HasMore;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
795
|
+
* configuration with a single parent.
|
|
796
|
+
*/
|
|
797
|
+
hierarchy_configuration?: Shared.HierarchyConfiguration;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
801
|
+
* prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
802
|
+
* each multiplier; the one with the lowest priority value will be prioritized
|
|
803
|
+
* first.
|
|
804
|
+
*/
|
|
805
|
+
multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT';
|
|
806
|
+
|
|
807
|
+
name?: string;
|
|
808
|
+
|
|
809
|
+
net_payment_terms_days?: number;
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* ID of the package this contract was created from, if applicable.
|
|
813
|
+
*/
|
|
814
|
+
package_id?: string;
|
|
815
|
+
|
|
816
|
+
prepaid_balance_threshold_configuration?: Shared.PrepaidBalanceThresholdConfiguration;
|
|
817
|
+
|
|
818
|
+
rate_card_id?: string;
|
|
819
|
+
|
|
820
|
+
recurring_commits?: Array<Contract.RecurringCommit>;
|
|
821
|
+
|
|
822
|
+
recurring_credits?: Array<Contract.RecurringCredit>;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
826
|
+
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
827
|
+
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
828
|
+
* after a Contract has been created. If this field is omitted, charges will appear
|
|
829
|
+
* on a separate invoice from usage charges.
|
|
830
|
+
*/
|
|
831
|
+
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
832
|
+
|
|
833
|
+
spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* List of subscriptions on the contract.
|
|
837
|
+
*/
|
|
838
|
+
subscriptions?: Array<Shared.Subscription>;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Optional uniqueness key to prevent duplicate contract creations.
|
|
842
|
+
*/
|
|
843
|
+
uniqueness_key?: string;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
export namespace Contract {
|
|
847
|
+
export interface Transition {
|
|
848
|
+
from_contract_id: string;
|
|
849
|
+
|
|
850
|
+
to_contract_id: string;
|
|
851
|
+
|
|
852
|
+
type: 'SUPERSEDE' | 'RENEWAL';
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
export interface UsageFilter {
|
|
856
|
+
group_key: string;
|
|
857
|
+
|
|
858
|
+
group_values: Array<string>;
|
|
859
|
+
|
|
860
|
+
starting_at: string;
|
|
861
|
+
|
|
862
|
+
ending_before?: string;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export interface UsageStatementSchedule {
|
|
866
|
+
/**
|
|
867
|
+
* Contract usage statements follow a selected cadence based on this date.
|
|
868
|
+
*/
|
|
869
|
+
billing_anchor_date: string;
|
|
870
|
+
|
|
871
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* The billing provider configuration associated with the contract.
|
|
876
|
+
*/
|
|
877
|
+
export interface CustomerBillingProviderConfiguration {
|
|
878
|
+
id?: string;
|
|
879
|
+
|
|
880
|
+
billing_provider?:
|
|
881
|
+
| 'aws_marketplace'
|
|
882
|
+
| 'stripe'
|
|
883
|
+
| 'netsuite'
|
|
884
|
+
| 'custom'
|
|
885
|
+
| 'azure_marketplace'
|
|
886
|
+
| 'quickbooks_online'
|
|
887
|
+
| 'workday'
|
|
888
|
+
| 'gcp_marketplace'
|
|
889
|
+
| 'metronome';
|
|
890
|
+
|
|
891
|
+
delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
896
|
+
* respective list endpoints to get the full lists.
|
|
897
|
+
*/
|
|
898
|
+
export interface HasMore {
|
|
899
|
+
/**
|
|
900
|
+
* Whether there are more commits on this contract than the limit for this
|
|
901
|
+
* endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
902
|
+
* of commits.
|
|
903
|
+
*/
|
|
904
|
+
commits: boolean;
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Whether there are more credits on this contract than the limit for this
|
|
908
|
+
* endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
909
|
+
* of credits.
|
|
910
|
+
*/
|
|
911
|
+
credits: boolean;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
export interface RecurringCommit {
|
|
915
|
+
id: string;
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* The amount of commit to grant.
|
|
919
|
+
*/
|
|
920
|
+
access_amount: RecurringCommit.AccessAmount;
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* The amount of time the created commits will be valid for
|
|
924
|
+
*/
|
|
925
|
+
commit_duration: RecurringCommit.CommitDuration;
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Will be passed down to the individual commits
|
|
929
|
+
*/
|
|
930
|
+
priority: number;
|
|
931
|
+
|
|
932
|
+
product: RecurringCommit.Product;
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Whether the created commits will use the commit rate or list rate
|
|
936
|
+
*/
|
|
937
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* Determines the start time for the first commit
|
|
941
|
+
*/
|
|
942
|
+
starting_at: string;
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* Will be passed down to the individual commits
|
|
946
|
+
*/
|
|
947
|
+
applicable_product_ids?: Array<string>;
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* Will be passed down to the individual commits
|
|
951
|
+
*/
|
|
952
|
+
applicable_product_tags?: Array<string>;
|
|
953
|
+
|
|
954
|
+
contract?: RecurringCommit.Contract;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* Will be passed down to the individual commits
|
|
958
|
+
*/
|
|
959
|
+
description?: string;
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
963
|
+
*/
|
|
964
|
+
ending_before?: string;
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
968
|
+
*/
|
|
969
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
973
|
+
*/
|
|
974
|
+
invoice_amount?: RecurringCommit.InvoiceAmount;
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
978
|
+
*/
|
|
979
|
+
name?: string;
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Will be passed down to the individual commits
|
|
983
|
+
*/
|
|
984
|
+
netsuite_sales_order_id?: string;
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
988
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
989
|
+
*/
|
|
990
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
994
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
995
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
996
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
997
|
+
* invoice dates.
|
|
998
|
+
*/
|
|
999
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1003
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1004
|
+
* between 0 and 1.
|
|
1005
|
+
*/
|
|
1006
|
+
rollover_fraction?: number;
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1010
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1011
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1012
|
+
*/
|
|
1013
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1017
|
+
*/
|
|
1018
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
export namespace RecurringCommit {
|
|
1022
|
+
/**
|
|
1023
|
+
* The amount of commit to grant.
|
|
1024
|
+
*/
|
|
1025
|
+
export interface AccessAmount {
|
|
1026
|
+
credit_type_id: string;
|
|
1027
|
+
|
|
1028
|
+
unit_price: number;
|
|
1029
|
+
|
|
1030
|
+
quantity?: number;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* The amount of time the created commits will be valid for
|
|
1035
|
+
*/
|
|
1036
|
+
export interface CommitDuration {
|
|
1037
|
+
value: number;
|
|
1038
|
+
|
|
1039
|
+
unit?: 'PERIODS';
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
export interface Product {
|
|
1043
|
+
id: string;
|
|
1044
|
+
|
|
1045
|
+
name: string;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
export interface Contract {
|
|
1049
|
+
id: string;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
1054
|
+
*/
|
|
1055
|
+
export interface InvoiceAmount {
|
|
1056
|
+
credit_type_id: string;
|
|
1057
|
+
|
|
1058
|
+
quantity: number;
|
|
1059
|
+
|
|
1060
|
+
unit_price: number;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
export interface RecurringCredit {
|
|
1065
|
+
id: string;
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* The amount of commit to grant.
|
|
1069
|
+
*/
|
|
1070
|
+
access_amount: RecurringCredit.AccessAmount;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* The amount of time the created commits will be valid for
|
|
1074
|
+
*/
|
|
1075
|
+
commit_duration: RecurringCredit.CommitDuration;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Will be passed down to the individual commits
|
|
1079
|
+
*/
|
|
1080
|
+
priority: number;
|
|
1081
|
+
|
|
1082
|
+
product: RecurringCredit.Product;
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Whether the created commits will use the commit rate or list rate
|
|
1086
|
+
*/
|
|
1087
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* Determines the start time for the first commit
|
|
1091
|
+
*/
|
|
1092
|
+
starting_at: string;
|
|
1093
|
+
|
|
1094
|
+
/**
|
|
1095
|
+
* Will be passed down to the individual commits
|
|
1096
|
+
*/
|
|
1097
|
+
applicable_product_ids?: Array<string>;
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* Will be passed down to the individual commits
|
|
1101
|
+
*/
|
|
1102
|
+
applicable_product_tags?: Array<string>;
|
|
1103
|
+
|
|
1104
|
+
contract?: RecurringCredit.Contract;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Will be passed down to the individual commits
|
|
1108
|
+
*/
|
|
1109
|
+
description?: string;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1113
|
+
*/
|
|
1114
|
+
ending_before?: string;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
1118
|
+
*/
|
|
1119
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1123
|
+
*/
|
|
1124
|
+
name?: string;
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* Will be passed down to the individual commits
|
|
1128
|
+
*/
|
|
1129
|
+
netsuite_sales_order_id?: string;
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1133
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1134
|
+
*/
|
|
1135
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1139
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1140
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1141
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1142
|
+
* invoice dates.
|
|
1143
|
+
*/
|
|
1144
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1148
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1149
|
+
* between 0 and 1.
|
|
1150
|
+
*/
|
|
1151
|
+
rollover_fraction?: number;
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1155
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1156
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1157
|
+
*/
|
|
1158
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1162
|
+
*/
|
|
1163
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
export namespace RecurringCredit {
|
|
1167
|
+
/**
|
|
1168
|
+
* The amount of commit to grant.
|
|
1169
|
+
*/
|
|
1170
|
+
export interface AccessAmount {
|
|
1171
|
+
credit_type_id: string;
|
|
1172
|
+
|
|
1173
|
+
unit_price: number;
|
|
1174
|
+
|
|
1175
|
+
quantity?: number;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* The amount of time the created commits will be valid for
|
|
1180
|
+
*/
|
|
1181
|
+
export interface CommitDuration {
|
|
1182
|
+
value: number;
|
|
1183
|
+
|
|
1184
|
+
unit?: 'PERIODS';
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
export interface Product {
|
|
1188
|
+
id: string;
|
|
1189
|
+
|
|
1190
|
+
name: string;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
export interface Contract {
|
|
1194
|
+
id: string;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
734
1199
|
}
|
|
735
1200
|
|
|
736
1201
|
export interface ContractRetrieveResponse {
|
|
@@ -1145,6 +1610,12 @@ export interface ContractCreateParams {
|
|
|
1145
1610
|
|
|
1146
1611
|
spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
|
|
1147
1612
|
|
|
1613
|
+
/**
|
|
1614
|
+
* Spend trackers to attach to this contract. Aliases must be unique within a
|
|
1615
|
+
* contract.
|
|
1616
|
+
*/
|
|
1617
|
+
spend_trackers?: Array<ContractCreateParams.SpendTracker>;
|
|
1618
|
+
|
|
1148
1619
|
/**
|
|
1149
1620
|
* Optional list of
|
|
1150
1621
|
* [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
|
@@ -1280,6 +1751,11 @@ export namespace ContractCreateParams {
|
|
|
1280
1751
|
*/
|
|
1281
1752
|
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
1282
1753
|
|
|
1754
|
+
/**
|
|
1755
|
+
* Optional attributes for spend tracker integration. Immutable after creation.
|
|
1756
|
+
*/
|
|
1757
|
+
spend_tracker_attributes?: Commit.SpendTrackerAttributes;
|
|
1758
|
+
|
|
1283
1759
|
/**
|
|
1284
1760
|
* A temporary ID for the commit that can be used to reference the commit for
|
|
1285
1761
|
* commit specific overrides.
|
|
@@ -1420,6 +1896,17 @@ export namespace ContractCreateParams {
|
|
|
1420
1896
|
unit_price?: number;
|
|
1421
1897
|
}
|
|
1422
1898
|
}
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* Optional attributes for spend tracker integration. Immutable after creation.
|
|
1902
|
+
*/
|
|
1903
|
+
export interface SpendTrackerAttributes {
|
|
1904
|
+
/**
|
|
1905
|
+
* If true, this commit will be included in spend trackers with discounted set to
|
|
1906
|
+
* DISCOUNTED_ONLY
|
|
1907
|
+
*/
|
|
1908
|
+
counts_as_discounted: boolean;
|
|
1909
|
+
}
|
|
1423
1910
|
}
|
|
1424
1911
|
|
|
1425
1912
|
export interface Credit {
|
|
@@ -2424,6 +2911,32 @@ export namespace ContractCreateParams {
|
|
|
2424
2911
|
}
|
|
2425
2912
|
}
|
|
2426
2913
|
|
|
2914
|
+
export interface SpendTracker {
|
|
2915
|
+
/**
|
|
2916
|
+
* Human-readable identifier, unique per contract.
|
|
2917
|
+
*/
|
|
2918
|
+
alias: string;
|
|
2919
|
+
|
|
2920
|
+
applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
|
|
2921
|
+
|
|
2922
|
+
credit_type_id: string;
|
|
2923
|
+
|
|
2924
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
export namespace SpendTracker {
|
|
2928
|
+
export interface ApplicableSpendSpecifier {
|
|
2929
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
2930
|
+
|
|
2931
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
2932
|
+
|
|
2933
|
+
/**
|
|
2934
|
+
* Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
2935
|
+
*/
|
|
2936
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
2937
|
+
}
|
|
2938
|
+
}
|
|
2939
|
+
|
|
2427
2940
|
export interface Subscription {
|
|
2428
2941
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2429
2942
|
|
|
@@ -2824,6 +3337,11 @@ export namespace ContractAmendParams {
|
|
|
2824
3337
|
*/
|
|
2825
3338
|
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
2826
3339
|
|
|
3340
|
+
/**
|
|
3341
|
+
* Optional attributes for spend tracker integration. Immutable after creation.
|
|
3342
|
+
*/
|
|
3343
|
+
spend_tracker_attributes?: Commit.SpendTrackerAttributes;
|
|
3344
|
+
|
|
2827
3345
|
/**
|
|
2828
3346
|
* A temporary ID for the commit that can be used to reference the commit for
|
|
2829
3347
|
* commit specific overrides.
|
|
@@ -2964,6 +3482,17 @@ export namespace ContractAmendParams {
|
|
|
2964
3482
|
unit_price?: number;
|
|
2965
3483
|
}
|
|
2966
3484
|
}
|
|
3485
|
+
|
|
3486
|
+
/**
|
|
3487
|
+
* Optional attributes for spend tracker integration. Immutable after creation.
|
|
3488
|
+
*/
|
|
3489
|
+
export interface SpendTrackerAttributes {
|
|
3490
|
+
/**
|
|
3491
|
+
* If true, this commit will be included in spend trackers with discounted set to
|
|
3492
|
+
* DISCOUNTED_ONLY
|
|
3493
|
+
*/
|
|
3494
|
+
counts_as_discounted: boolean;
|
|
3495
|
+
}
|
|
2967
3496
|
}
|
|
2968
3497
|
|
|
2969
3498
|
export interface Credit {
|
|
@@ -143,17 +143,6 @@ export {
|
|
|
143
143
|
type PackageListResponsesCursorPage,
|
|
144
144
|
type PackageListContractsOnPackageResponsesCursorPage,
|
|
145
145
|
} from './packages';
|
|
146
|
-
export {
|
|
147
|
-
Payments,
|
|
148
|
-
type Payment,
|
|
149
|
-
type PaymentStatus,
|
|
150
|
-
type PaymentAttemptResponse,
|
|
151
|
-
type PaymentCancelResponse,
|
|
152
|
-
type PaymentListParams,
|
|
153
|
-
type PaymentAttemptParams,
|
|
154
|
-
type PaymentCancelParams,
|
|
155
|
-
type PaymentsBodyCursorPage,
|
|
156
|
-
} from './payments';
|
|
157
146
|
export {
|
|
158
147
|
Plans,
|
|
159
148
|
type PlanDetail,
|