metronome-sdk 3.5.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +53 -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/internal/type/enum.rb +0 -25
- data/lib/metronome_sdk/models/commit.rb +27 -1
- data/lib/metronome_sdk/models/contract.rb +140 -1
- data/lib/metronome_sdk/models/contract_v2.rb +530 -6
- data/lib/metronome_sdk/models/contract_without_amendments.rb +142 -1
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +105 -2
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +103 -2
- data/lib/metronome_sdk/models/spend_threshold_configuration.rb +33 -1
- data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +33 -1
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +29 -177
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +147 -180
- data/lib/metronome_sdk/models/v1/contract_create_response.rb +1134 -3
- 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 +115 -18
- data/lib/metronome_sdk/models/v1/package_list_response.rb +110 -1
- data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +114 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +303 -5
- data/lib/metronome_sdk/models/v2/contract_edit_response.rb +3862 -3
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +507 -6
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +6 -2
- data/lib/metronome_sdk/resources/v1/contracts.rb +72 -3
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +5 -1
- data/lib/metronome_sdk/resources/v1/packages.rb +6 -7
- data/lib/metronome_sdk/resources/v1.rb +0 -4
- data/lib/metronome_sdk/resources/v2/contracts.rb +5 -1
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +2 -8
- data/rbi/metronome_sdk/models/commit.rbi +48 -0
- data/rbi/metronome_sdk/models/contract.rbi +354 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +1172 -4
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +368 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +289 -6
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +283 -6
- data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +78 -3
- data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -3
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +54 -396
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +370 -398
- data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +2448 -4
- 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 +310 -56
- data/rbi/metronome_sdk/models/v1/package_list_response.rbi +307 -0
- data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +307 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +734 -11
- data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +8612 -4
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1355 -219
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +18 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +88 -3
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +7 -0
- data/rbi/metronome_sdk/resources/v1/packages.rbi +8 -7
- data/rbi/metronome_sdk/resources/v1.rbi +0 -3
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +10 -0
- data/sig/metronome_sdk/models/commit.rbs +19 -0
- data/sig/metronome_sdk/models/contract.rbs +151 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +494 -6
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +151 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +116 -6
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +116 -6
- data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +31 -3
- data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +31 -3
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +3 -1
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +19 -137
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +134 -137
- data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1045 -4
- 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 +115 -20
- data/sig/metronome_sdk/models/v1/package_list_response.rbs +115 -0
- data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +115 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +283 -9
- data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +3792 -4
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +461 -15
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +16 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/packages.rbs +1 -1
- data/sig/metronome_sdk/resources/v1.rbs +0 -2
- data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
- metadata +8 -26
- data/lib/metronome_sdk/models/v1/payment.rb +0 -196
- data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +0 -28
- data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +0 -18
- data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +0 -28
- data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +0 -18
- data/lib/metronome_sdk/models/v1/payment_list_params.rb +0 -53
- data/lib/metronome_sdk/models/v1/payment_status.rb +0 -19
- data/lib/metronome_sdk/resources/v1/payments.rb +0 -102
- data/rbi/metronome_sdk/models/v1/payment.rbi +0 -403
- data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +0 -48
- data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +0 -35
- data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +0 -48
- data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +0 -35
- data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +0 -91
- data/rbi/metronome_sdk/models/v1/payment_status.rbi +0 -33
- data/rbi/metronome_sdk/resources/v1/payments.rbi +0 -72
- data/sig/metronome_sdk/models/v1/payment.rbs +0 -243
- data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +0 -30
- data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +0 -15
- data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +0 -30
- data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +0 -15
- data/sig/metronome_sdk/models/v1/payment_list_params.rbs +0 -56
- data/sig/metronome_sdk/models/v1/payment_status.rbs +0 -19
- data/sig/metronome_sdk/resources/v1/payments.rbs +0 -30
|
@@ -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
|
#
|
|
@@ -2728,7 +3087,18 @@ module MetronomeSDK
|
|
|
2728
3087
|
# @return [Float, nil]
|
|
2729
3088
|
optional :threshold_amount, Float
|
|
2730
3089
|
|
|
2731
|
-
# @!
|
|
3090
|
+
# @!attribute threshold_balance_specifiers
|
|
3091
|
+
#
|
|
3092
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier>, nil]
|
|
3093
|
+
optional :threshold_balance_specifiers,
|
|
3094
|
+
-> do
|
|
3095
|
+
MetronomeSDK::Internal::Type::ArrayOf[
|
|
3096
|
+
MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier
|
|
3097
|
+
]
|
|
3098
|
+
end,
|
|
3099
|
+
nil?: true
|
|
3100
|
+
|
|
3101
|
+
# @!method initialize(commit: nil, custom_credit_type_id: nil, discount_configuration: nil, is_enabled: nil, payment_gate_config: nil, recharge_to_amount: nil, threshold_amount: nil, threshold_balance_specifiers: nil)
|
|
2732
3102
|
# Some parameter documentations has been truncated, see
|
|
2733
3103
|
# {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration}
|
|
2734
3104
|
# for more details.
|
|
@@ -2746,6 +3116,8 @@ module MetronomeSDK
|
|
|
2746
3116
|
# @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
|
|
2747
3117
|
#
|
|
2748
3118
|
# @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
|
|
3119
|
+
#
|
|
3120
|
+
# @param threshold_balance_specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier>, nil]
|
|
2749
3121
|
|
|
2750
3122
|
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration#commit
|
|
2751
3123
|
class Commit < MetronomeSDK::Models::UpdateBaseThresholdCommit
|
|
@@ -2791,6 +3163,14 @@ module MetronomeSDK
|
|
|
2791
3163
|
|
|
2792
3164
|
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration#discount_configuration
|
|
2793
3165
|
class DiscountConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
|
3166
|
+
# @!attribute cap
|
|
3167
|
+
# Update the discount cap. Set to null to remove an existing cap.
|
|
3168
|
+
#
|
|
3169
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap, nil]
|
|
3170
|
+
optional :cap,
|
|
3171
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap },
|
|
3172
|
+
nil?: true
|
|
3173
|
+
|
|
2794
3174
|
# @!attribute payment_fraction
|
|
2795
3175
|
# The fraction of the original amount that the customer pays after applying the
|
|
2796
3176
|
# discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
@@ -2799,12 +3179,101 @@ module MetronomeSDK
|
|
|
2799
3179
|
# @return [Float, nil]
|
|
2800
3180
|
optional :payment_fraction, Float, nil?: true
|
|
2801
3181
|
|
|
2802
|
-
# @!method initialize(payment_fraction: nil)
|
|
3182
|
+
# @!method initialize(cap: nil, payment_fraction: nil)
|
|
2803
3183
|
# Some parameter documentations has been truncated, see
|
|
2804
3184
|
# {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration}
|
|
2805
3185
|
# for more details.
|
|
2806
3186
|
#
|
|
3187
|
+
# @param cap [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap, nil] Update the discount cap. Set to null to remove an existing cap.
|
|
3188
|
+
#
|
|
2807
3189
|
# @param payment_fraction [Float, nil] The fraction of the original amount that the customer pays after applying the di
|
|
3190
|
+
|
|
3191
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration#cap
|
|
3192
|
+
class Cap < MetronomeSDK::Internal::Type::BaseModel
|
|
3193
|
+
# @!attribute amount
|
|
3194
|
+
# Accumulated spend ceiling above which the discount stops applying.
|
|
3195
|
+
#
|
|
3196
|
+
# @return [Float]
|
|
3197
|
+
required :amount, Float
|
|
3198
|
+
|
|
3199
|
+
# @!attribute spend_tracker_alias
|
|
3200
|
+
# Alias of the spend tracker this cap is measured against.
|
|
3201
|
+
#
|
|
3202
|
+
# @return [String]
|
|
3203
|
+
required :spend_tracker_alias, String
|
|
3204
|
+
|
|
3205
|
+
# @!method initialize(amount:, spend_tracker_alias:)
|
|
3206
|
+
# Update the discount cap. Set to null to remove an existing cap.
|
|
3207
|
+
#
|
|
3208
|
+
# @param amount [Float] Accumulated spend ceiling above which the discount stops applying.
|
|
3209
|
+
#
|
|
3210
|
+
# @param spend_tracker_alias [String] Alias of the spend tracker this cap is measured against.
|
|
3211
|
+
end
|
|
3212
|
+
end
|
|
3213
|
+
|
|
3214
|
+
class ThresholdBalanceSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
3215
|
+
# @!attribute exclude
|
|
3216
|
+
#
|
|
3217
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude>]
|
|
3218
|
+
required :exclude,
|
|
3219
|
+
-> do
|
|
3220
|
+
MetronomeSDK::Internal::Type::ArrayOf[
|
|
3221
|
+
MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude
|
|
3222
|
+
]
|
|
3223
|
+
end
|
|
3224
|
+
|
|
3225
|
+
# @!method initialize(exclude:)
|
|
3226
|
+
# @param exclude [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude>]
|
|
3227
|
+
|
|
3228
|
+
class Exclude < MetronomeSDK::Internal::Type::BaseModel
|
|
3229
|
+
# @!attribute custom_field_filters
|
|
3230
|
+
#
|
|
3231
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter>]
|
|
3232
|
+
required :custom_field_filters,
|
|
3233
|
+
-> do
|
|
3234
|
+
MetronomeSDK::Internal::Type::ArrayOf[
|
|
3235
|
+
MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter
|
|
3236
|
+
]
|
|
3237
|
+
end
|
|
3238
|
+
|
|
3239
|
+
# @!method initialize(custom_field_filters:)
|
|
3240
|
+
# @param custom_field_filters [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter>]
|
|
3241
|
+
|
|
3242
|
+
class CustomFieldFilter < MetronomeSDK::Internal::Type::BaseModel
|
|
3243
|
+
# @!attribute entity
|
|
3244
|
+
#
|
|
3245
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity]
|
|
3246
|
+
required :entity,
|
|
3247
|
+
enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity }
|
|
3248
|
+
|
|
3249
|
+
# @!attribute key
|
|
3250
|
+
#
|
|
3251
|
+
# @return [String]
|
|
3252
|
+
required :key, String
|
|
3253
|
+
|
|
3254
|
+
# @!attribute value
|
|
3255
|
+
#
|
|
3256
|
+
# @return [String]
|
|
3257
|
+
required :value, String
|
|
3258
|
+
|
|
3259
|
+
# @!method initialize(entity:, key:, value:)
|
|
3260
|
+
# @param entity [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity]
|
|
3261
|
+
# @param key [String]
|
|
3262
|
+
# @param value [String]
|
|
3263
|
+
|
|
3264
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter#entity
|
|
3265
|
+
module Entity
|
|
3266
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3267
|
+
|
|
3268
|
+
COMMIT = :Commit
|
|
3269
|
+
CONTRACT_CREDIT = :ContractCredit
|
|
3270
|
+
CONTRACT_CREDIT_OR_COMMIT = :ContractCreditOrCommit
|
|
3271
|
+
|
|
3272
|
+
# @!method self.values
|
|
3273
|
+
# @return [Array<Symbol>]
|
|
3274
|
+
end
|
|
3275
|
+
end
|
|
3276
|
+
end
|
|
2808
3277
|
end
|
|
2809
3278
|
end
|
|
2810
3279
|
|
|
@@ -3154,6 +3623,14 @@ module MetronomeSDK
|
|
|
3154
3623
|
|
|
3155
3624
|
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration#discount_configuration
|
|
3156
3625
|
class DiscountConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
|
3626
|
+
# @!attribute cap
|
|
3627
|
+
# Update the discount cap. Set to null to remove an existing cap.
|
|
3628
|
+
#
|
|
3629
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::DiscountConfiguration::Cap, nil]
|
|
3630
|
+
optional :cap,
|
|
3631
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::DiscountConfiguration::Cap },
|
|
3632
|
+
nil?: true
|
|
3633
|
+
|
|
3157
3634
|
# @!attribute payment_fraction
|
|
3158
3635
|
# The fraction of the original amount that the customer pays after applying the
|
|
3159
3636
|
# discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
@@ -3162,12 +3639,36 @@ module MetronomeSDK
|
|
|
3162
3639
|
# @return [Float, nil]
|
|
3163
3640
|
optional :payment_fraction, Float, nil?: true
|
|
3164
3641
|
|
|
3165
|
-
# @!method initialize(payment_fraction: nil)
|
|
3642
|
+
# @!method initialize(cap: nil, payment_fraction: nil)
|
|
3166
3643
|
# Some parameter documentations has been truncated, see
|
|
3167
3644
|
# {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::DiscountConfiguration}
|
|
3168
3645
|
# for more details.
|
|
3169
3646
|
#
|
|
3647
|
+
# @param cap [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::DiscountConfiguration::Cap, nil] Update the discount cap. Set to null to remove an existing cap.
|
|
3648
|
+
#
|
|
3170
3649
|
# @param payment_fraction [Float, nil] The fraction of the original amount that the customer pays after applying the di
|
|
3650
|
+
|
|
3651
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::DiscountConfiguration#cap
|
|
3652
|
+
class Cap < MetronomeSDK::Internal::Type::BaseModel
|
|
3653
|
+
# @!attribute amount
|
|
3654
|
+
# Accumulated spend ceiling above which the discount stops applying.
|
|
3655
|
+
#
|
|
3656
|
+
# @return [Float]
|
|
3657
|
+
required :amount, Float
|
|
3658
|
+
|
|
3659
|
+
# @!attribute spend_tracker_alias
|
|
3660
|
+
# Alias of the spend tracker this cap is measured against.
|
|
3661
|
+
#
|
|
3662
|
+
# @return [String]
|
|
3663
|
+
required :spend_tracker_alias, String
|
|
3664
|
+
|
|
3665
|
+
# @!method initialize(amount:, spend_tracker_alias:)
|
|
3666
|
+
# Update the discount cap. Set to null to remove an existing cap.
|
|
3667
|
+
#
|
|
3668
|
+
# @param amount [Float] Accumulated spend ceiling above which the discount stops applying.
|
|
3669
|
+
#
|
|
3670
|
+
# @param spend_tracker_alias [String] Alias of the spend tracker this cap is measured against.
|
|
3671
|
+
end
|
|
3171
3672
|
end
|
|
3172
3673
|
end
|
|
3173
3674
|
|
|
@@ -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]
|