metronome-sdk 3.5.0 → 3.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/client.rb +15 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +2 -0
- data/lib/metronome_sdk/models/contract_v2.rb +362 -4
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +1 -177
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +2 -179
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +119 -0
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_response.rb +315 -0
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +1 -0
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +8 -1
- data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +29 -1
- data/lib/metronome_sdk/models/v1/package_create_params.rb +1 -18
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +362 -3
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +6 -2
- data/lib/metronome_sdk/resources/v1/contracts.rb +69 -2
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +5 -1
- data/lib/metronome_sdk/resources/v1/packages.rb +1 -3
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +2 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +763 -4
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +0 -396
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +2 -398
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +179 -0
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_response.rbi +714 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +74 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_update_params.rbi +74 -0
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +9 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +75 -0
- data/rbi/metronome_sdk/models/v1/package_create_params.rbi +0 -56
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +792 -4
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +18 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +81 -3
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +7 -0
- data/rbi/metronome_sdk/resources/v1/packages.rbi +0 -3
- data/sig/metronome_sdk/models/contract_v2.rbs +324 -6
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +3 -1
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +0 -137
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +0 -137
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +96 -0
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_response.rbs +299 -0
- data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +3 -1
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +29 -1
- data/sig/metronome_sdk/models/v1/package_create_params.rbs +0 -20
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +319 -6
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +15 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/packages.rbs +0 -1
- metadata +8 -2
|
@@ -86,8 +86,9 @@ module MetronomeSDK
|
|
|
86
86
|
# @!attribute add_subscriptions
|
|
87
87
|
# List of subscriptions on the contract.
|
|
88
88
|
#
|
|
89
|
-
# @return [Array<MetronomeSDK::Models::
|
|
90
|
-
optional :add_subscriptions,
|
|
89
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription>, nil]
|
|
90
|
+
optional :add_subscriptions,
|
|
91
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription] }
|
|
91
92
|
|
|
92
93
|
# @!attribute add_usage_filters
|
|
93
94
|
#
|
|
@@ -234,7 +235,7 @@ module MetronomeSDK
|
|
|
234
235
|
#
|
|
235
236
|
# @param add_spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfigurationV2]
|
|
236
237
|
#
|
|
237
|
-
# @param add_subscriptions [Array<MetronomeSDK::Models::
|
|
238
|
+
# @param add_subscriptions [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription>] List of subscriptions on the contract.
|
|
238
239
|
#
|
|
239
240
|
# @param add_usage_filters [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter>]
|
|
240
241
|
#
|
|
@@ -1774,6 +1775,364 @@ module MetronomeSDK
|
|
|
1774
1775
|
end
|
|
1775
1776
|
end
|
|
1776
1777
|
|
|
1778
|
+
class AddSubscription < MetronomeSDK::Internal::Type::BaseModel
|
|
1779
|
+
# @!attribute billing_periods
|
|
1780
|
+
# Previous, current, and next billing periods for the subscription.
|
|
1781
|
+
#
|
|
1782
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods]
|
|
1783
|
+
required :billing_periods,
|
|
1784
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods }
|
|
1785
|
+
|
|
1786
|
+
# @!attribute collection_schedule
|
|
1787
|
+
#
|
|
1788
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::CollectionSchedule]
|
|
1789
|
+
required :collection_schedule,
|
|
1790
|
+
enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::CollectionSchedule }
|
|
1791
|
+
|
|
1792
|
+
# @!attribute proration
|
|
1793
|
+
#
|
|
1794
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration]
|
|
1795
|
+
required :proration,
|
|
1796
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration }
|
|
1797
|
+
|
|
1798
|
+
# @!attribute quantity_management_mode
|
|
1799
|
+
# Determines how the subscription's quantity is controlled. Defaults to
|
|
1800
|
+
# QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
1801
|
+
# directly on the subscription. `initial_quantity` must be provided with this
|
|
1802
|
+
# option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
1803
|
+
# **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
|
|
1804
|
+
# user_123) to increment and decrement a subscription quantity, rather than
|
|
1805
|
+
# directly providing the quantity. You must use a **SEAT_BASED** subscription to
|
|
1806
|
+
# use a linked recurring credit with an allocation per seat. `seat_config` must be
|
|
1807
|
+
# provided with this option.
|
|
1808
|
+
#
|
|
1809
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantityManagementMode]
|
|
1810
|
+
required :quantity_management_mode,
|
|
1811
|
+
enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantityManagementMode }
|
|
1812
|
+
|
|
1813
|
+
# @!attribute quantity_schedule
|
|
1814
|
+
# List of quantity schedule items for the subscription. Only includes the current
|
|
1815
|
+
# quantity and future quantity changes.
|
|
1816
|
+
#
|
|
1817
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantitySchedule>]
|
|
1818
|
+
required :quantity_schedule,
|
|
1819
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantitySchedule] }
|
|
1820
|
+
|
|
1821
|
+
# @!attribute starting_at
|
|
1822
|
+
#
|
|
1823
|
+
# @return [Time]
|
|
1824
|
+
required :starting_at, Time
|
|
1825
|
+
|
|
1826
|
+
# @!attribute subscription_rate
|
|
1827
|
+
#
|
|
1828
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate]
|
|
1829
|
+
required :subscription_rate,
|
|
1830
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate }
|
|
1831
|
+
|
|
1832
|
+
# @!attribute id
|
|
1833
|
+
#
|
|
1834
|
+
# @return [String, nil]
|
|
1835
|
+
optional :id, String
|
|
1836
|
+
|
|
1837
|
+
# @!attribute custom_fields
|
|
1838
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1839
|
+
#
|
|
1840
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
1841
|
+
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
|
1842
|
+
|
|
1843
|
+
# @!attribute description
|
|
1844
|
+
#
|
|
1845
|
+
# @return [String, nil]
|
|
1846
|
+
optional :description, String
|
|
1847
|
+
|
|
1848
|
+
# @!attribute ending_before
|
|
1849
|
+
#
|
|
1850
|
+
# @return [Time, nil]
|
|
1851
|
+
optional :ending_before, Time
|
|
1852
|
+
|
|
1853
|
+
# @!attribute fiat_credit_type_id
|
|
1854
|
+
#
|
|
1855
|
+
# @return [String, nil]
|
|
1856
|
+
optional :fiat_credit_type_id, String
|
|
1857
|
+
|
|
1858
|
+
# @!attribute name
|
|
1859
|
+
#
|
|
1860
|
+
# @return [String, nil]
|
|
1861
|
+
optional :name, String
|
|
1862
|
+
|
|
1863
|
+
# @!attribute seat_config
|
|
1864
|
+
#
|
|
1865
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SeatConfig, nil]
|
|
1866
|
+
optional :seat_config,
|
|
1867
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SeatConfig }
|
|
1868
|
+
|
|
1869
|
+
# @!method initialize(billing_periods:, collection_schedule:, proration:, quantity_management_mode:, quantity_schedule:, starting_at:, subscription_rate:, id: nil, custom_fields: nil, description: nil, ending_before: nil, fiat_credit_type_id: nil, name: nil, seat_config: nil)
|
|
1870
|
+
# Some parameter documentations has been truncated, see
|
|
1871
|
+
# {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription}
|
|
1872
|
+
# for more details.
|
|
1873
|
+
#
|
|
1874
|
+
# @param billing_periods [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods] Previous, current, and next billing periods for the subscription.
|
|
1875
|
+
#
|
|
1876
|
+
# @param collection_schedule [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::CollectionSchedule]
|
|
1877
|
+
#
|
|
1878
|
+
# @param proration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration]
|
|
1879
|
+
#
|
|
1880
|
+
# @param quantity_management_mode [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantityManagementMode] Determines how the subscription's quantity is controlled. Defaults to QUANTITY_O
|
|
1881
|
+
#
|
|
1882
|
+
# @param quantity_schedule [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantitySchedule>] List of quantity schedule items for the subscription. Only includes the current
|
|
1883
|
+
#
|
|
1884
|
+
# @param starting_at [Time]
|
|
1885
|
+
#
|
|
1886
|
+
# @param subscription_rate [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate]
|
|
1887
|
+
#
|
|
1888
|
+
# @param id [String]
|
|
1889
|
+
#
|
|
1890
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1891
|
+
#
|
|
1892
|
+
# @param description [String]
|
|
1893
|
+
#
|
|
1894
|
+
# @param ending_before [Time]
|
|
1895
|
+
#
|
|
1896
|
+
# @param fiat_credit_type_id [String]
|
|
1897
|
+
#
|
|
1898
|
+
# @param name [String]
|
|
1899
|
+
#
|
|
1900
|
+
# @param seat_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SeatConfig]
|
|
1901
|
+
|
|
1902
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#billing_periods
|
|
1903
|
+
class BillingPeriods < MetronomeSDK::Internal::Type::BaseModel
|
|
1904
|
+
# @!attribute current
|
|
1905
|
+
#
|
|
1906
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods::Current, nil]
|
|
1907
|
+
optional :current,
|
|
1908
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods::Current }
|
|
1909
|
+
|
|
1910
|
+
# @!attribute next_
|
|
1911
|
+
#
|
|
1912
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods::Next, nil]
|
|
1913
|
+
optional :next_,
|
|
1914
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods::Next },
|
|
1915
|
+
api_name: :next
|
|
1916
|
+
|
|
1917
|
+
# @!attribute previous
|
|
1918
|
+
#
|
|
1919
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods::Previous, nil]
|
|
1920
|
+
optional :previous,
|
|
1921
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods::Previous }
|
|
1922
|
+
|
|
1923
|
+
# @!method initialize(current: nil, next_: nil, previous: nil)
|
|
1924
|
+
# Previous, current, and next billing periods for the subscription.
|
|
1925
|
+
#
|
|
1926
|
+
# @param current [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods::Current]
|
|
1927
|
+
# @param next_ [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods::Next]
|
|
1928
|
+
# @param previous [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods::Previous]
|
|
1929
|
+
|
|
1930
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods#current
|
|
1931
|
+
class Current < MetronomeSDK::Internal::Type::BaseModel
|
|
1932
|
+
# @!attribute ending_before
|
|
1933
|
+
#
|
|
1934
|
+
# @return [Time]
|
|
1935
|
+
required :ending_before, Time
|
|
1936
|
+
|
|
1937
|
+
# @!attribute starting_at
|
|
1938
|
+
#
|
|
1939
|
+
# @return [Time]
|
|
1940
|
+
required :starting_at, Time
|
|
1941
|
+
|
|
1942
|
+
# @!method initialize(ending_before:, starting_at:)
|
|
1943
|
+
# @param ending_before [Time]
|
|
1944
|
+
# @param starting_at [Time]
|
|
1945
|
+
end
|
|
1946
|
+
|
|
1947
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods#next_
|
|
1948
|
+
class Next < MetronomeSDK::Internal::Type::BaseModel
|
|
1949
|
+
# @!attribute ending_before
|
|
1950
|
+
#
|
|
1951
|
+
# @return [Time]
|
|
1952
|
+
required :ending_before, Time
|
|
1953
|
+
|
|
1954
|
+
# @!attribute starting_at
|
|
1955
|
+
#
|
|
1956
|
+
# @return [Time]
|
|
1957
|
+
required :starting_at, Time
|
|
1958
|
+
|
|
1959
|
+
# @!method initialize(ending_before:, starting_at:)
|
|
1960
|
+
# @param ending_before [Time]
|
|
1961
|
+
# @param starting_at [Time]
|
|
1962
|
+
end
|
|
1963
|
+
|
|
1964
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::BillingPeriods#previous
|
|
1965
|
+
class Previous < MetronomeSDK::Internal::Type::BaseModel
|
|
1966
|
+
# @!attribute ending_before
|
|
1967
|
+
#
|
|
1968
|
+
# @return [Time]
|
|
1969
|
+
required :ending_before, Time
|
|
1970
|
+
|
|
1971
|
+
# @!attribute starting_at
|
|
1972
|
+
#
|
|
1973
|
+
# @return [Time]
|
|
1974
|
+
required :starting_at, Time
|
|
1975
|
+
|
|
1976
|
+
# @!method initialize(ending_before:, starting_at:)
|
|
1977
|
+
# @param ending_before [Time]
|
|
1978
|
+
# @param starting_at [Time]
|
|
1979
|
+
end
|
|
1980
|
+
end
|
|
1981
|
+
|
|
1982
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#collection_schedule
|
|
1983
|
+
module CollectionSchedule
|
|
1984
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1985
|
+
|
|
1986
|
+
ADVANCE = :ADVANCE
|
|
1987
|
+
ARREARS = :ARREARS
|
|
1988
|
+
|
|
1989
|
+
# @!method self.values
|
|
1990
|
+
# @return [Array<Symbol>]
|
|
1991
|
+
end
|
|
1992
|
+
|
|
1993
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#proration
|
|
1994
|
+
class Proration < MetronomeSDK::Internal::Type::BaseModel
|
|
1995
|
+
# @!attribute invoice_behavior
|
|
1996
|
+
#
|
|
1997
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration::InvoiceBehavior]
|
|
1998
|
+
required :invoice_behavior,
|
|
1999
|
+
enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration::InvoiceBehavior }
|
|
2000
|
+
|
|
2001
|
+
# @!attribute is_prorated
|
|
2002
|
+
#
|
|
2003
|
+
# @return [Boolean]
|
|
2004
|
+
required :is_prorated, MetronomeSDK::Internal::Type::Boolean
|
|
2005
|
+
|
|
2006
|
+
# @!method initialize(invoice_behavior:, is_prorated:)
|
|
2007
|
+
# @param invoice_behavior [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration::InvoiceBehavior]
|
|
2008
|
+
# @param is_prorated [Boolean]
|
|
2009
|
+
|
|
2010
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration#invoice_behavior
|
|
2011
|
+
module InvoiceBehavior
|
|
2012
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2013
|
+
|
|
2014
|
+
BILL_IMMEDIATELY = :BILL_IMMEDIATELY
|
|
2015
|
+
BILL_ON_NEXT_COLLECTION_DATE = :BILL_ON_NEXT_COLLECTION_DATE
|
|
2016
|
+
|
|
2017
|
+
# @!method self.values
|
|
2018
|
+
# @return [Array<Symbol>]
|
|
2019
|
+
end
|
|
2020
|
+
end
|
|
2021
|
+
|
|
2022
|
+
# Determines how the subscription's quantity is controlled. Defaults to
|
|
2023
|
+
# QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
2024
|
+
# directly on the subscription. `initial_quantity` must be provided with this
|
|
2025
|
+
# option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
2026
|
+
# **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
|
|
2027
|
+
# user_123) to increment and decrement a subscription quantity, rather than
|
|
2028
|
+
# directly providing the quantity. You must use a **SEAT_BASED** subscription to
|
|
2029
|
+
# use a linked recurring credit with an allocation per seat. `seat_config` must be
|
|
2030
|
+
# provided with this option.
|
|
2031
|
+
#
|
|
2032
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#quantity_management_mode
|
|
2033
|
+
module QuantityManagementMode
|
|
2034
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2035
|
+
|
|
2036
|
+
SEAT_BASED = :SEAT_BASED
|
|
2037
|
+
QUANTITY_ONLY = :QUANTITY_ONLY
|
|
2038
|
+
|
|
2039
|
+
# @!method self.values
|
|
2040
|
+
# @return [Array<Symbol>]
|
|
2041
|
+
end
|
|
2042
|
+
|
|
2043
|
+
class QuantitySchedule < MetronomeSDK::Internal::Type::BaseModel
|
|
2044
|
+
# @!attribute quantity
|
|
2045
|
+
#
|
|
2046
|
+
# @return [Float]
|
|
2047
|
+
required :quantity, Float
|
|
2048
|
+
|
|
2049
|
+
# @!attribute starting_at
|
|
2050
|
+
#
|
|
2051
|
+
# @return [Time]
|
|
2052
|
+
required :starting_at, Time
|
|
2053
|
+
|
|
2054
|
+
# @!attribute ending_before
|
|
2055
|
+
#
|
|
2056
|
+
# @return [Time, nil]
|
|
2057
|
+
optional :ending_before, Time
|
|
2058
|
+
|
|
2059
|
+
# @!method initialize(quantity:, starting_at:, ending_before: nil)
|
|
2060
|
+
# @param quantity [Float]
|
|
2061
|
+
# @param starting_at [Time]
|
|
2062
|
+
# @param ending_before [Time]
|
|
2063
|
+
end
|
|
2064
|
+
|
|
2065
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#subscription_rate
|
|
2066
|
+
class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
|
|
2067
|
+
# @!attribute billing_frequency
|
|
2068
|
+
#
|
|
2069
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::BillingFrequency]
|
|
2070
|
+
required :billing_frequency,
|
|
2071
|
+
enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::BillingFrequency }
|
|
2072
|
+
|
|
2073
|
+
# @!attribute product
|
|
2074
|
+
#
|
|
2075
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::Product]
|
|
2076
|
+
required :product,
|
|
2077
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::Product }
|
|
2078
|
+
|
|
2079
|
+
# @!method initialize(billing_frequency:, product:)
|
|
2080
|
+
# @param billing_frequency [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::BillingFrequency]
|
|
2081
|
+
# @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::Product]
|
|
2082
|
+
|
|
2083
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate#billing_frequency
|
|
2084
|
+
module BillingFrequency
|
|
2085
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2086
|
+
|
|
2087
|
+
MONTHLY = :MONTHLY
|
|
2088
|
+
QUARTERLY = :QUARTERLY
|
|
2089
|
+
ANNUAL = :ANNUAL
|
|
2090
|
+
WEEKLY = :WEEKLY
|
|
2091
|
+
|
|
2092
|
+
# @!method self.values
|
|
2093
|
+
# @return [Array<Symbol>]
|
|
2094
|
+
end
|
|
2095
|
+
|
|
2096
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate#product
|
|
2097
|
+
class Product < MetronomeSDK::Internal::Type::BaseModel
|
|
2098
|
+
# @!attribute id
|
|
2099
|
+
#
|
|
2100
|
+
# @return [String]
|
|
2101
|
+
required :id, String
|
|
2102
|
+
|
|
2103
|
+
# @!attribute name
|
|
2104
|
+
#
|
|
2105
|
+
# @return [String]
|
|
2106
|
+
required :name, String
|
|
2107
|
+
|
|
2108
|
+
# @!method initialize(id:, name:)
|
|
2109
|
+
# @param id [String]
|
|
2110
|
+
# @param name [String]
|
|
2111
|
+
end
|
|
2112
|
+
end
|
|
2113
|
+
|
|
2114
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#seat_config
|
|
2115
|
+
class SeatConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
2116
|
+
# @!attribute seat_group_key
|
|
2117
|
+
# The property name, sent on usage events, that identifies the seat ID associated
|
|
2118
|
+
# with the usage event. For example, the property name might be seat_id or
|
|
2119
|
+
# user_id. The property must be set as a group key on billable metrics and a
|
|
2120
|
+
# presentation/pricing group key on contract products. This allows linked
|
|
2121
|
+
# recurring credits with an allocation per seat to be consumed by only one seat's
|
|
2122
|
+
# usage.
|
|
2123
|
+
#
|
|
2124
|
+
# @return [String]
|
|
2125
|
+
required :seat_group_key, String
|
|
2126
|
+
|
|
2127
|
+
# @!method initialize(seat_group_key:)
|
|
2128
|
+
# Some parameter documentations has been truncated, see
|
|
2129
|
+
# {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SeatConfig}
|
|
2130
|
+
# for more details.
|
|
2131
|
+
#
|
|
2132
|
+
# @param seat_group_key [String] The property name, sent on usage events, that identifies the seat ID associated
|
|
2133
|
+
end
|
|
2134
|
+
end
|
|
2135
|
+
|
|
1777
2136
|
class AddUsageFilter < MetronomeSDK::Internal::Type::BaseModel
|
|
1778
2137
|
# @!attribute group_key
|
|
1779
2138
|
#
|
|
@@ -15,7 +15,7 @@ module MetronomeSDK
|
|
|
15
15
|
# an ERP system. Give the product a meaningful name as they will appear on
|
|
16
16
|
# customer invoices.
|
|
17
17
|
#
|
|
18
|
-
# @overload create(name:, type:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, custom_fields: nil, exclude_free_usage: nil, is_refundable: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {})
|
|
18
|
+
# @overload create(name:, type:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, custom_fields: nil, exclude_free_usage: nil, is_refundable: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, sql_breakdown_granularity: nil, tags: nil, request_options: {})
|
|
19
19
|
#
|
|
20
20
|
# @param name [String] displayed on invoices
|
|
21
21
|
#
|
|
@@ -45,6 +45,8 @@ module MetronomeSDK
|
|
|
45
45
|
#
|
|
46
46
|
# @param quantity_rounding [MetronomeSDK::Models::V1::Contracts::QuantityRounding, nil] Optional. Only valid for USAGE products. If provided, the quantity will be round
|
|
47
47
|
#
|
|
48
|
+
# @param sql_breakdown_granularity [Symbol, MetronomeSDK::Models::V1::Contracts::ProductCreateParams::SqlBreakdownGranularity] Defines the breakdown behavior when calculating usage from SQL Billable Metrics.
|
|
49
|
+
#
|
|
48
50
|
# @param tags [Array<String>]
|
|
49
51
|
#
|
|
50
52
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -99,7 +101,7 @@ module MetronomeSDK
|
|
|
99
101
|
# - Product type cannot be changed after creation. For incorrect product types,
|
|
100
102
|
# create a new product and archive the original instead.
|
|
101
103
|
#
|
|
102
|
-
# @overload update(product_id:, starting_at:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, exclude_free_usage: nil, is_refundable: nil, name: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {})
|
|
104
|
+
# @overload update(product_id:, starting_at:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, exclude_free_usage: nil, is_refundable: nil, name: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, sql_breakdown_granularity: nil, tags: nil, request_options: {})
|
|
103
105
|
#
|
|
104
106
|
# @param product_id [String] ID of the product to update
|
|
105
107
|
#
|
|
@@ -129,6 +131,8 @@ module MetronomeSDK
|
|
|
129
131
|
#
|
|
130
132
|
# @param quantity_rounding [MetronomeSDK::Models::V1::Contracts::QuantityRounding, nil] Optional. Only valid for USAGE products. If provided, the quantity will be round
|
|
131
133
|
#
|
|
134
|
+
# @param sql_breakdown_granularity [Symbol, MetronomeSDK::Models::V1::Contracts::ProductUpdateParams::SqlBreakdownGranularity] Defines the breakdown behavior when calculating usage from SQL Billable Metrics.
|
|
135
|
+
#
|
|
132
136
|
# @param tags [Array<String>] If not provided, defaults to product's current tags
|
|
133
137
|
#
|
|
134
138
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -22,8 +22,8 @@ module MetronomeSDK
|
|
|
22
22
|
#
|
|
23
23
|
# Contracts define a customer's products, pricing, discounts, access duration, and
|
|
24
24
|
# billing configuration. Contracts serve as the central billing agreement for both
|
|
25
|
-
# PLG and Enterprise customers
|
|
26
|
-
# products and services directly from your product or CRM.
|
|
25
|
+
# PLG and Enterprise customers. You can automatically grant customers access to
|
|
26
|
+
# your products and services directly from your product or CRM.
|
|
27
27
|
#
|
|
28
28
|
# ### Use this endpoint to:
|
|
29
29
|
#
|
|
@@ -650,6 +650,73 @@ module MetronomeSDK
|
|
|
650
650
|
)
|
|
651
651
|
end
|
|
652
652
|
|
|
653
|
+
# Some parameter documentations has been truncated, see
|
|
654
|
+
# {MetronomeSDK::Models::V1::ContractListSeatBalancesParams} for more details.
|
|
655
|
+
#
|
|
656
|
+
# Retrieve detailed balance for seat-based credits and commits from the contract's
|
|
657
|
+
# subscriptions, broken down by individual seats.
|
|
658
|
+
#
|
|
659
|
+
# ### Use this endpoint to:
|
|
660
|
+
#
|
|
661
|
+
# - Display per-seat balance information in customer dashboards
|
|
662
|
+
# - Filter balance data by subscription or specific seats
|
|
663
|
+
#
|
|
664
|
+
# ### Key response fields:
|
|
665
|
+
#
|
|
666
|
+
# An array of seat balance objects containing:
|
|
667
|
+
#
|
|
668
|
+
# - Seat id
|
|
669
|
+
# - Balance: current total balance across all commits and credits
|
|
670
|
+
#
|
|
671
|
+
# ### Usage guidelines:
|
|
672
|
+
#
|
|
673
|
+
# - Date filtering: use `covering_date` OR `starting_at`/`ending_before` to filter
|
|
674
|
+
# balance data by time range
|
|
675
|
+
# - Set `include_credits_and_commits=true` for detailed commits and credits
|
|
676
|
+
# breakdown per seat
|
|
677
|
+
# - Set `include_ledgers=true` for detailed transaction history per commit/credit
|
|
678
|
+
# per seat
|
|
679
|
+
#
|
|
680
|
+
# @overload list_seat_balances(contract_id:, customer_id:, covering_date: nil, cursor: nil, effective_before: nil, include_credits_and_commits: nil, include_ledgers: nil, limit: nil, seat_ids: nil, starting_at: nil, subscription_ids: nil, request_options: {})
|
|
681
|
+
#
|
|
682
|
+
# @param contract_id [String] The contract ID to retrieve seat balances for
|
|
683
|
+
#
|
|
684
|
+
# @param customer_id [String] The customer ID to retrieve seat balances for
|
|
685
|
+
#
|
|
686
|
+
# @param covering_date [Time] Include only commits or credits with access that cover this specific date (canno
|
|
687
|
+
#
|
|
688
|
+
# @param cursor [String] Page token from a previous response to retrieve the next page
|
|
689
|
+
#
|
|
690
|
+
# @param effective_before [Time] Include only commits or credits with access effective on or before this date (ca
|
|
691
|
+
#
|
|
692
|
+
# @param include_credits_and_commits [Boolean] Include credits and commits in the response
|
|
693
|
+
#
|
|
694
|
+
# @param include_ledgers [Boolean] Include ledger entries for each commit and commit. `include_credits_and_commits`
|
|
695
|
+
#
|
|
696
|
+
# @param limit [Integer] Maximum number of seats to return. Range: 1-100. Default: 25.
|
|
697
|
+
#
|
|
698
|
+
# @param seat_ids [Array<String>] Optional filter to only include specific seats.
|
|
699
|
+
#
|
|
700
|
+
# @param starting_at [Time] Include only commits or credits with access effective on or after this date (can
|
|
701
|
+
#
|
|
702
|
+
# @param subscription_ids [Array<String>] Optional filter to only include seats from specific subscriptions. If subscripti
|
|
703
|
+
#
|
|
704
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
705
|
+
#
|
|
706
|
+
# @return [MetronomeSDK::Models::V1::ContractListSeatBalancesResponse]
|
|
707
|
+
#
|
|
708
|
+
# @see MetronomeSDK::Models::V1::ContractListSeatBalancesParams
|
|
709
|
+
def list_seat_balances(params)
|
|
710
|
+
parsed, options = MetronomeSDK::V1::ContractListSeatBalancesParams.dump_request(params)
|
|
711
|
+
@client.request(
|
|
712
|
+
method: :post,
|
|
713
|
+
path: "v1/contracts/seatBalances/list",
|
|
714
|
+
body: parsed,
|
|
715
|
+
model: MetronomeSDK::Models::V1::ContractListSeatBalancesResponse,
|
|
716
|
+
options: options
|
|
717
|
+
)
|
|
718
|
+
end
|
|
719
|
+
|
|
653
720
|
# Some parameter documentations has been truncated, see
|
|
654
721
|
# {MetronomeSDK::Models::V1::ContractRetrieveRateScheduleParams} for more details.
|
|
655
722
|
#
|
|
@@ -136,10 +136,12 @@ module MetronomeSDK
|
|
|
136
136
|
# - Voided invoices are included in results by default unless filtered out by
|
|
137
137
|
# status
|
|
138
138
|
#
|
|
139
|
-
# @overload list(customer_id:, credit_type_id: nil, ending_before: nil, limit: nil, next_page: nil, skip_zero_qty_line_items: nil, sort: nil, starting_on: nil, status: nil, request_options: {})
|
|
139
|
+
# @overload list(customer_id:, contract_id: nil, credit_type_id: nil, ending_before: nil, limit: nil, next_page: nil, skip_zero_qty_line_items: nil, sort: nil, starting_on: nil, status: nil, type: nil, request_options: {})
|
|
140
140
|
#
|
|
141
141
|
# @param customer_id [String] Path param
|
|
142
142
|
#
|
|
143
|
+
# @param contract_id [String] Query param: Only return invoices for the specified contract
|
|
144
|
+
#
|
|
143
145
|
# @param credit_type_id [String] Query param: Only return invoices for the specified credit type
|
|
144
146
|
#
|
|
145
147
|
# @param ending_before [Time] Query param: RFC 3339 timestamp (exclusive). Invoices will only be returned for
|
|
@@ -156,6 +158,8 @@ module MetronomeSDK
|
|
|
156
158
|
#
|
|
157
159
|
# @param status [String] Query param: Invoice status, e.g. DRAFT, FINALIZED, or VOID
|
|
158
160
|
#
|
|
161
|
+
# @param type [Symbol, MetronomeSDK::Models::V1::Customers::InvoiceListParams::Type] Query param: Filter invoices by type. Defaults to returning all invoice types.
|
|
162
|
+
#
|
|
159
163
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
160
164
|
#
|
|
161
165
|
# @return [MetronomeSDK::Internal::CursorPage<MetronomeSDK::Models::V1::Customers::Invoice>]
|
|
@@ -58,14 +58,12 @@ module MetronomeSDK
|
|
|
58
58
|
# provisioning with a package. Edited contracts will still be associated with
|
|
59
59
|
# the package used during provisioning.
|
|
60
60
|
#
|
|
61
|
-
# @overload create(name:, aliases: nil,
|
|
61
|
+
# @overload create(name:, aliases: nil, billing_provider: nil, commits: nil, contract_name: nil, credits: nil, delivery_method: nil, duration: nil, multiplier_override_prioritization: nil, net_payment_terms_days: nil, overrides: nil, prepaid_balance_threshold_configuration: nil, rate_card_alias: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, scheduled_charges: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, uniqueness_key: nil, usage_statement_schedule: nil, request_options: {})
|
|
62
62
|
#
|
|
63
63
|
# @param name [String]
|
|
64
64
|
#
|
|
65
65
|
# @param aliases [Array<MetronomeSDK::Models::V1::PackageCreateParams::Alias>] Reference this alias when creating a contract. If the same alias is assigned to
|
|
66
66
|
#
|
|
67
|
-
# @param billing_anchor_date [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingAnchorDate]
|
|
68
|
-
#
|
|
69
67
|
# @param billing_provider [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingProvider]
|
|
70
68
|
#
|
|
71
69
|
# @param commits [Array<MetronomeSDK::Models::V1::PackageCreateParams::Commit>]
|
data/lib/metronome_sdk.rb
CHANGED
|
@@ -121,6 +121,8 @@ require_relative "metronome_sdk/models/v1/contract_list_balances_params"
|
|
|
121
121
|
require_relative "metronome_sdk/models/v1/contract_list_balances_response"
|
|
122
122
|
require_relative "metronome_sdk/models/v1/contract_list_params"
|
|
123
123
|
require_relative "metronome_sdk/models/v1/contract_list_response"
|
|
124
|
+
require_relative "metronome_sdk/models/v1/contract_list_seat_balances_params"
|
|
125
|
+
require_relative "metronome_sdk/models/v1/contract_list_seat_balances_response"
|
|
124
126
|
require_relative "metronome_sdk/models/v1/contract_retrieve_params"
|
|
125
127
|
require_relative "metronome_sdk/models/v1/contract_retrieve_rate_schedule_params"
|
|
126
128
|
require_relative "metronome_sdk/models/v1/contract_retrieve_rate_schedule_response"
|