metronome-sdk 2.1.0 → 3.0.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.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +65 -0
  3. data/README.md +10 -1
  4. data/lib/metronome_sdk/internal/transport/base_client.rb +7 -1
  5. data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +18 -12
  6. data/lib/metronome_sdk/internal/util.rb +7 -2
  7. data/lib/metronome_sdk/models/commit.rb +69 -1
  8. data/lib/metronome_sdk/models/contract_v2.rb +45 -2
  9. data/lib/metronome_sdk/models/credit.rb +69 -1
  10. data/lib/metronome_sdk/models/rate.rb +1 -11
  11. data/lib/metronome_sdk/models/subscription.rb +32 -5
  12. data/lib/metronome_sdk/models/v1/alert_create_params.rb +33 -1
  13. data/lib/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rb +10 -1
  14. data/lib/metronome_sdk/models/v1/contract_create_params.rb +136 -20
  15. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +1 -11
  16. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +1 -11
  17. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +1 -11
  18. data/lib/metronome_sdk/models/v1/custom_field_add_key_params.rb +4 -0
  19. data/lib/metronome_sdk/models/v1/custom_field_delete_values_params.rb +4 -0
  20. data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +4 -0
  21. data/lib/metronome_sdk/models/v1/custom_field_list_keys_response.rb +4 -0
  22. data/lib/metronome_sdk/models/v1/custom_field_remove_key_params.rb +4 -0
  23. data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +4 -0
  24. data/lib/metronome_sdk/models/v1/customer_create_params.rb +94 -2
  25. data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_response.rb +111 -0
  26. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +32 -1
  27. data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +15 -1
  28. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +15 -1
  29. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +33 -1
  30. data/lib/metronome_sdk/models/v1/customers/invoice.rb +71 -3
  31. data/lib/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rb +8 -1
  32. data/lib/metronome_sdk/models/v1/payment.rb +40 -1
  33. data/lib/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rb +10 -1
  34. data/lib/metronome_sdk/models/v1/settings/billing_provider_create_params.rb +1 -0
  35. data/lib/metronome_sdk/models/v1/usage_search_response.rb +6 -3
  36. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +17 -1
  37. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +17 -1
  38. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +285 -22
  39. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +177 -3
  40. data/lib/metronome_sdk/resources/v1/alerts.rb +3 -1
  41. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +1 -3
  42. data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +1 -1
  43. data/lib/metronome_sdk/resources/v1/contracts.rb +6 -2
  44. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +3 -1
  45. data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +8 -4
  46. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +7 -7
  47. data/lib/metronome_sdk/resources/v1/customers/plans.rb +5 -5
  48. data/lib/metronome_sdk/resources/v1/customers.rb +12 -10
  49. data/lib/metronome_sdk/resources/v1/plans.rb +2 -2
  50. data/lib/metronome_sdk/resources/v1/settings.rb +3 -1
  51. data/lib/metronome_sdk/resources/v1/usage.rb +7 -7
  52. data/lib/metronome_sdk/resources/v2/contracts.rb +10 -2
  53. data/lib/metronome_sdk/version.rb +1 -1
  54. data/lib/metronome_sdk.rb +3 -0
  55. data/manifest.yaml +2 -0
  56. data/rbi/metronome_sdk/internal/transport/base_client.rbi +5 -0
  57. data/rbi/metronome_sdk/internal/transport/pooled_net_requester.rbi +6 -2
  58. data/rbi/metronome_sdk/internal/type/base_model.rbi +8 -4
  59. data/rbi/metronome_sdk/models/commit.rbi +171 -0
  60. data/rbi/metronome_sdk/models/contract_v2.rbi +85 -6
  61. data/rbi/metronome_sdk/models/credit.rbi +171 -0
  62. data/rbi/metronome_sdk/models/rate.rbi +3 -18
  63. data/rbi/metronome_sdk/models/subscription.rbi +55 -9
  64. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +69 -0
  65. data/rbi/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rbi +13 -0
  66. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +288 -24
  67. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +3 -18
  68. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +0 -15
  69. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +3 -18
  70. data/rbi/metronome_sdk/models/v1/custom_field_add_key_params.rbi +20 -0
  71. data/rbi/metronome_sdk/models/v1/custom_field_delete_values_params.rbi +20 -0
  72. data/rbi/metronome_sdk/models/v1/custom_field_list_keys_params.rbi +20 -0
  73. data/rbi/metronome_sdk/models/v1/custom_field_list_keys_response.rbi +20 -0
  74. data/rbi/metronome_sdk/models/v1/custom_field_remove_key_params.rbi +20 -0
  75. data/rbi/metronome_sdk/models/v1/custom_field_set_values_params.rbi +20 -0
  76. data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +204 -0
  77. data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_response.rbi +281 -0
  78. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +67 -0
  79. data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +18 -0
  80. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +18 -0
  81. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +71 -0
  82. data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +121 -0
  83. data/rbi/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rbi +9 -0
  84. data/rbi/metronome_sdk/models/v1/payment.rbi +79 -0
  85. data/rbi/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rbi +13 -0
  86. data/rbi/metronome_sdk/models/v1/settings/billing_provider_create_params.rbi +5 -0
  87. data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +11 -3
  88. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +22 -0
  89. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +22 -0
  90. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +616 -27
  91. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +367 -3
  92. data/rbi/metronome_sdk/resources/v1/alerts.rbi +5 -0
  93. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +0 -5
  94. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +1 -1
  95. data/rbi/metronome_sdk/resources/v1/contracts.rbi +9 -0
  96. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +5 -0
  97. data/rbi/metronome_sdk/resources/v1/customers/billing_config.rbi +9 -3
  98. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +7 -7
  99. data/rbi/metronome_sdk/resources/v1/customers/plans.rbi +5 -5
  100. data/rbi/metronome_sdk/resources/v1/customers.rbi +15 -8
  101. data/rbi/metronome_sdk/resources/v1/plans.rbi +2 -2
  102. data/rbi/metronome_sdk/resources/v1/settings.rbi +4 -0
  103. data/rbi/metronome_sdk/resources/v1/usage.rbi +7 -7
  104. data/rbi/metronome_sdk/resources/v2/contracts.rbi +12 -0
  105. data/sig/metronome_sdk/internal/transport/base_client.rbs +2 -0
  106. data/sig/metronome_sdk/internal/transport/pooled_net_requester.rbs +4 -1
  107. data/sig/metronome_sdk/models/commit.rbs +74 -0
  108. data/sig/metronome_sdk/models/contract_v2.rbs +45 -6
  109. data/sig/metronome_sdk/models/credit.rbs +74 -0
  110. data/sig/metronome_sdk/models/rate.rbs +3 -10
  111. data/sig/metronome_sdk/models/subscription.rbs +22 -3
  112. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +28 -0
  113. data/sig/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rbs +7 -0
  114. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +104 -0
  115. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +3 -10
  116. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +1 -8
  117. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +3 -10
  118. data/sig/metronome_sdk/models/v1/custom_field_add_key_params.rbs +8 -0
  119. data/sig/metronome_sdk/models/v1/custom_field_delete_values_params.rbs +8 -0
  120. data/sig/metronome_sdk/models/v1/custom_field_list_keys_params.rbs +8 -0
  121. data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +8 -0
  122. data/sig/metronome_sdk/models/v1/custom_field_remove_key_params.rbs +8 -0
  123. data/sig/metronome_sdk/models/v1/custom_field_set_values_params.rbs +8 -0
  124. data/sig/metronome_sdk/models/v1/customer_create_params.rbs +83 -0
  125. data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_response.rbs +119 -0
  126. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +26 -1
  127. data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +14 -0
  128. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +14 -0
  129. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +30 -0
  130. data/sig/metronome_sdk/models/v1/customers/invoice.rbs +64 -0
  131. data/sig/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rbs +7 -0
  132. data/sig/metronome_sdk/models/v1/payment.rbs +45 -0
  133. data/sig/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rbs +8 -1
  134. data/sig/metronome_sdk/models/v1/settings/billing_provider_create_params.rbs +3 -1
  135. data/sig/metronome_sdk/models/v1/usage_search_response.rbs +3 -1
  136. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +14 -0
  137. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +14 -0
  138. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +232 -3
  139. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +131 -3
  140. data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
  141. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +0 -1
  142. data/sig/metronome_sdk/resources/v1/contracts.rbs +2 -0
  143. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
  144. data/sig/metronome_sdk/resources/v1/customers/billing_config.rbs +2 -0
  145. data/sig/metronome_sdk/resources/v1/customers.rbs +2 -1
  146. data/sig/metronome_sdk/resources/v1/settings.rbs +1 -0
  147. data/sig/metronome_sdk/resources/v2/contracts.rbs +4 -0
  148. metadata +19 -2
@@ -31,6 +31,12 @@ module MetronomeSDK
31
31
  optional :customer_billing_provider_configurations,
32
32
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::CustomerCreateParams::CustomerBillingProviderConfiguration] }
33
33
 
34
+ # @!attribute customer_revenue_system_configurations
35
+ #
36
+ # @return [Array<MetronomeSDK::Models::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration>, nil]
37
+ optional :customer_revenue_system_configurations,
38
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration] }
39
+
34
40
  # @!attribute external_id
35
41
  # (deprecated, use ingest_aliases instead) an alias that can be used to refer to
36
42
  # this customer in usage events
@@ -44,7 +50,7 @@ module MetronomeSDK
44
50
  # @return [Array<String>, nil]
45
51
  optional :ingest_aliases, MetronomeSDK::Internal::Type::ArrayOf[String]
46
52
 
47
- # @!method initialize(name:, billing_config: nil, custom_fields: nil, customer_billing_provider_configurations: nil, external_id: nil, ingest_aliases: nil, request_options: {})
53
+ # @!method initialize(name:, billing_config: nil, custom_fields: nil, customer_billing_provider_configurations: nil, customer_revenue_system_configurations: nil, external_id: nil, ingest_aliases: nil, request_options: {})
48
54
  # Some parameter documentations has been truncated, see
49
55
  # {MetronomeSDK::Models::V1::CustomerCreateParams} for more details.
50
56
  #
@@ -56,6 +62,8 @@ module MetronomeSDK
56
62
  #
57
63
  # @param customer_billing_provider_configurations [Array<MetronomeSDK::Models::V1::CustomerCreateParams::CustomerBillingProviderConfiguration>]
58
64
  #
65
+ # @param customer_revenue_system_configurations [Array<MetronomeSDK::Models::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration>]
66
+ #
59
67
  # @param external_id [String] (deprecated, use ingest_aliases instead) an alias that can be used to refer to t
60
68
  #
61
69
  # @param ingest_aliases [Array<String>] Aliases that can be used to refer to this customer in usage events
@@ -74,6 +82,16 @@ module MetronomeSDK
74
82
  required :billing_provider_type,
75
83
  enum: -> { MetronomeSDK::V1::CustomerCreateParams::BillingConfig::BillingProviderType }
76
84
 
85
+ # @!attribute aws_customer_account_id
86
+ #
87
+ # @return [String, nil]
88
+ optional :aws_customer_account_id, String
89
+
90
+ # @!attribute aws_customer_id
91
+ #
92
+ # @return [String, nil]
93
+ optional :aws_customer_id, String
94
+
77
95
  # @!attribute aws_is_subscription_product
78
96
  # True if the aws_product_code is a SAAS subscription product, false otherwise.
79
97
  #
@@ -98,7 +116,7 @@ module MetronomeSDK
98
116
  optional :stripe_collection_method,
99
117
  enum: -> { MetronomeSDK::V1::CustomerCreateParams::BillingConfig::StripeCollectionMethod }
100
118
 
101
- # @!method initialize(billing_provider_customer_id:, billing_provider_type:, aws_is_subscription_product: nil, aws_product_code: nil, aws_region: nil, stripe_collection_method: nil)
119
+ # @!method initialize(billing_provider_customer_id:, billing_provider_type:, aws_customer_account_id: nil, aws_customer_id: nil, aws_is_subscription_product: nil, aws_product_code: nil, aws_region: nil, stripe_collection_method: nil)
102
120
  # Some parameter documentations has been truncated, see
103
121
  # {MetronomeSDK::Models::V1::CustomerCreateParams::BillingConfig} for more
104
122
  # details.
@@ -107,6 +125,10 @@ module MetronomeSDK
107
125
  #
108
126
  # @param billing_provider_type [Symbol, MetronomeSDK::Models::V1::CustomerCreateParams::BillingConfig::BillingProviderType]
109
127
  #
128
+ # @param aws_customer_account_id [String]
129
+ #
130
+ # @param aws_customer_id [String]
131
+ #
110
132
  # @param aws_is_subscription_product [Boolean] True if the aws_product_code is a SAAS subscription product, false otherwise.
111
133
  #
112
134
  # @param aws_product_code [String]
@@ -290,6 +312,76 @@ module MetronomeSDK
290
312
  # @return [Array<Symbol>]
291
313
  end
292
314
  end
315
+
316
+ class CustomerRevenueSystemConfiguration < MetronomeSDK::Internal::Type::BaseModel
317
+ # @!attribute provider
318
+ # The revenue system provider set for this configuration.
319
+ #
320
+ # @return [Symbol, MetronomeSDK::Models::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration::Provider]
321
+ required :provider,
322
+ enum: -> { MetronomeSDK::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration::Provider }
323
+
324
+ # @!attribute configuration
325
+ # Configuration for the revenue system provider. The structure of this object is
326
+ # specific to the revenue system provider. For NetSuite, this should contain
327
+ # `netsuite_customer_id`.
328
+ #
329
+ # @return [Hash{Symbol=>Object}, nil]
330
+ optional :configuration, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]
331
+
332
+ # @!attribute delivery_method
333
+ # The method to use for delivering invoices to this customer. If not provided, the
334
+ # `delivery_method_id` must be provided.
335
+ #
336
+ # @return [Symbol, MetronomeSDK::Models::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration::DeliveryMethod, nil]
337
+ optional :delivery_method,
338
+ enum: -> { MetronomeSDK::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration::DeliveryMethod }
339
+
340
+ # @!attribute delivery_method_id
341
+ # ID of the delivery method to use for this customer. If not provided, the
342
+ # `delivery_method` must be provided.
343
+ #
344
+ # @return [String, nil]
345
+ optional :delivery_method_id, String
346
+
347
+ # @!method initialize(provider:, configuration: nil, delivery_method: nil, delivery_method_id: nil)
348
+ # Some parameter documentations has been truncated, see
349
+ # {MetronomeSDK::Models::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration}
350
+ # for more details.
351
+ #
352
+ # @param provider [Symbol, MetronomeSDK::Models::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration::Provider] The revenue system provider set for this configuration.
353
+ #
354
+ # @param configuration [Hash{Symbol=>Object}] Configuration for the revenue system provider. The structure of this object is s
355
+ #
356
+ # @param delivery_method [Symbol, MetronomeSDK::Models::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration::DeliveryMethod] The method to use for delivering invoices to this customer. If not provided, the
357
+ #
358
+ # @param delivery_method_id [String] ID of the delivery method to use for this customer. If not provided, the `delive
359
+
360
+ # The revenue system provider set for this configuration.
361
+ #
362
+ # @see MetronomeSDK::Models::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration#provider
363
+ module Provider
364
+ extend MetronomeSDK::Internal::Type::Enum
365
+
366
+ NETSUITE = :netsuite
367
+
368
+ # @!method self.values
369
+ # @return [Array<Symbol>]
370
+ end
371
+
372
+ # The method to use for delivering invoices to this customer. If not provided, the
373
+ # `delivery_method_id` must be provided.
374
+ #
375
+ # @see MetronomeSDK::Models::V1::CustomerCreateParams::CustomerRevenueSystemConfiguration#delivery_method
376
+ module DeliveryMethod
377
+ extend MetronomeSDK::Internal::Type::Enum
378
+
379
+ DIRECT_TO_BILLING_PROVIDER = :direct_to_billing_provider
380
+
381
+ # @!method self.values
382
+ # @return [Array<Symbol>]
383
+ end
384
+ end
293
385
  end
294
386
  end
295
387
  end
@@ -0,0 +1,111 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MetronomeSDK
4
+ module Models
5
+ module V1
6
+ # @see MetronomeSDK::Resources::V1::Customers#set_billing_configurations
7
+ class CustomerSetBillingConfigurationsResponse < MetronomeSDK::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ #
10
+ # @return [Array<MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data>]
11
+ required :data,
12
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data] }
13
+
14
+ # @!method initialize(data:)
15
+ # @param data [Array<MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data>]
16
+
17
+ class Data < MetronomeSDK::Internal::Type::BaseModel
18
+ # @!attribute id
19
+ # ID of the created configuration
20
+ #
21
+ # @return [String, nil]
22
+ optional :id, String
23
+
24
+ # @!attribute billing_provider
25
+ # The billing provider set for this configuration.
26
+ #
27
+ # @return [Symbol, MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data::BillingProvider, nil]
28
+ optional :billing_provider,
29
+ enum: -> { MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data::BillingProvider }
30
+
31
+ # @!attribute configuration
32
+ # Configuration for the billing provider. The structure of this object is specific
33
+ # to the billing provider and delivery method combination.
34
+ #
35
+ # @return [Hash{Symbol=>Object}, nil]
36
+ optional :configuration, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]
37
+
38
+ # @!attribute customer_id
39
+ # ID of the customer this configuration is associated with.
40
+ #
41
+ # @return [String, nil]
42
+ optional :customer_id, String
43
+
44
+ # @!attribute delivery_method_id
45
+ # ID of the delivery method used for this customer configuration.
46
+ #
47
+ # @return [String, nil]
48
+ optional :delivery_method_id, String
49
+
50
+ # @!attribute tax_provider
51
+ # The tax provider set for this configuration.
52
+ #
53
+ # @return [Symbol, MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data::TaxProvider, nil]
54
+ optional :tax_provider,
55
+ enum: -> { MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data::TaxProvider }
56
+
57
+ # @!method initialize(id: nil, billing_provider: nil, configuration: nil, customer_id: nil, delivery_method_id: nil, tax_provider: nil)
58
+ # Some parameter documentations has been truncated, see
59
+ # {MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data} for
60
+ # more details.
61
+ #
62
+ # @param id [String] ID of the created configuration
63
+ #
64
+ # @param billing_provider [Symbol, MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data::BillingProvider] The billing provider set for this configuration.
65
+ #
66
+ # @param configuration [Hash{Symbol=>Object}] Configuration for the billing provider. The structure of this object is specific
67
+ #
68
+ # @param customer_id [String] ID of the customer this configuration is associated with.
69
+ #
70
+ # @param delivery_method_id [String] ID of the delivery method used for this customer configuration.
71
+ #
72
+ # @param tax_provider [Symbol, MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data::TaxProvider] The tax provider set for this configuration.
73
+
74
+ # The billing provider set for this configuration.
75
+ #
76
+ # @see MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data#billing_provider
77
+ module BillingProvider
78
+ extend MetronomeSDK::Internal::Type::Enum
79
+
80
+ AWS_MARKETPLACE = :aws_marketplace
81
+ STRIPE = :stripe
82
+ NETSUITE = :netsuite
83
+ CUSTOM = :custom
84
+ AZURE_MARKETPLACE = :azure_marketplace
85
+ QUICKBOOKS_ONLINE = :quickbooks_online
86
+ WORKDAY = :workday
87
+ GCP_MARKETPLACE = :gcp_marketplace
88
+ METRONOME = :metronome
89
+
90
+ # @!method self.values
91
+ # @return [Array<Symbol>]
92
+ end
93
+
94
+ # The tax provider set for this configuration.
95
+ #
96
+ # @see MetronomeSDK::Models::V1::CustomerSetBillingConfigurationsResponse::Data#tax_provider
97
+ module TaxProvider
98
+ extend MetronomeSDK::Internal::Type::Enum
99
+
100
+ ANROK = :anrok
101
+ AVALARA = :avalara
102
+ STRIPE = :stripe
103
+
104
+ # @!method self.values
105
+ # @return [Array<Symbol>]
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
@@ -37,7 +37,14 @@ module MetronomeSDK
37
37
  optional :plans_or_contracts,
38
38
  enum: -> { MetronomeSDK::V1::Customers::AlertRetrieveParams::PlansOrContracts }
39
39
 
40
- # @!method initialize(alert_id:, customer_id:, group_values: nil, plans_or_contracts: nil, request_options: {})
40
+ # @!attribute seat_filter
41
+ # Only allowed for `low_remaining_seat_balance_reached` notifications. This
42
+ # filters alerts by the seat group key-value pair.
43
+ #
44
+ # @return [MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::SeatFilter, nil]
45
+ optional :seat_filter, -> { MetronomeSDK::V1::Customers::AlertRetrieveParams::SeatFilter }
46
+
47
+ # @!method initialize(alert_id:, customer_id:, group_values: nil, plans_or_contracts: nil, seat_filter: nil, request_options: {})
41
48
  # Some parameter documentations has been truncated, see
42
49
  # {MetronomeSDK::Models::V1::Customers::AlertRetrieveParams} for more details.
43
50
  #
@@ -49,6 +56,8 @@ module MetronomeSDK
49
56
  #
50
57
  # @param plans_or_contracts [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts] When parallel threshold notifications are enabled during migration, this flag de
51
58
  #
59
+ # @param seat_filter [MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::SeatFilter] Only allowed for `low_remaining_seat_balance_reached` notifications. This filter
60
+ #
52
61
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
53
62
 
54
63
  class GroupValue < MetronomeSDK::Internal::Type::BaseModel
@@ -81,6 +90,28 @@ module MetronomeSDK
81
90
  # @!method self.values
82
91
  # @return [Array<Symbol>]
83
92
  end
93
+
94
+ class SeatFilter < MetronomeSDK::Internal::Type::BaseModel
95
+ # @!attribute seat_group_key
96
+ # The seat group key (e.g., "seat_id", "user_id")
97
+ #
98
+ # @return [String]
99
+ required :seat_group_key, String
100
+
101
+ # @!attribute seat_group_value
102
+ # The specific seat identifier to filter by
103
+ #
104
+ # @return [String]
105
+ required :seat_group_value, String
106
+
107
+ # @!method initialize(seat_group_key:, seat_group_value:)
108
+ # Only allowed for `low_remaining_seat_balance_reached` notifications. This
109
+ # filters alerts by the seat group key-value pair.
110
+ #
111
+ # @param seat_group_key [String] The seat group key (e.g., "seat_id", "user_id")
112
+ #
113
+ # @param seat_group_value [String] The specific seat identifier to filter by
114
+ end
84
115
  end
85
116
  end
86
117
  end
@@ -27,6 +27,16 @@ module MetronomeSDK
27
27
  # @return [String]
28
28
  required :billing_provider_customer_id, String
29
29
 
30
+ # @!attribute aws_customer_account_id
31
+ #
32
+ # @return [String, nil]
33
+ optional :aws_customer_account_id, String
34
+
35
+ # @!attribute aws_customer_id
36
+ #
37
+ # @return [String, nil]
38
+ optional :aws_customer_id, String
39
+
30
40
  # @!attribute aws_product_code
31
41
  #
32
42
  # @return [String, nil]
@@ -45,7 +55,7 @@ module MetronomeSDK
45
55
  optional :stripe_collection_method,
46
56
  enum: -> { MetronomeSDK::V1::Customers::BillingConfigCreateParams::StripeCollectionMethod }
47
57
 
48
- # @!method initialize(customer_id:, billing_provider_type:, billing_provider_customer_id:, aws_product_code: nil, aws_region: nil, stripe_collection_method: nil, request_options: {})
58
+ # @!method initialize(customer_id:, billing_provider_type:, billing_provider_customer_id:, aws_customer_account_id: nil, aws_customer_id: nil, aws_product_code: nil, aws_region: nil, stripe_collection_method: nil, request_options: {})
49
59
  # Some parameter documentations has been truncated, see
50
60
  # {MetronomeSDK::Models::V1::Customers::BillingConfigCreateParams} for more
51
61
  # details.
@@ -56,6 +66,10 @@ module MetronomeSDK
56
66
  #
57
67
  # @param billing_provider_customer_id [String] The customer ID in the billing provider's system. For Azure, this is the subscri
58
68
  #
69
+ # @param aws_customer_account_id [String]
70
+ #
71
+ # @param aws_customer_id [String]
72
+ #
59
73
  # @param aws_product_code [String]
60
74
  #
61
75
  # @param aws_region [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigCreateParams::AwsRegion]
@@ -16,6 +16,16 @@ module MetronomeSDK
16
16
 
17
17
  # @see MetronomeSDK::Models::V1::Customers::BillingConfigRetrieveResponse#data
18
18
  class Data < MetronomeSDK::Internal::Type::BaseModel
19
+ # @!attribute aws_customer_account_id
20
+ #
21
+ # @return [String, nil]
22
+ optional :aws_customer_account_id, String
23
+
24
+ # @!attribute aws_customer_id
25
+ #
26
+ # @return [String, nil]
27
+ optional :aws_customer_id, String
28
+
19
29
  # @!attribute aws_expiration_date
20
30
  # Contract expiration date for the customer. The expected format is RFC 3339 and
21
31
  # can be retrieved from
@@ -81,11 +91,15 @@ module MetronomeSDK
81
91
  optional :stripe_collection_method,
82
92
  enum: -> { MetronomeSDK::Models::V1::Customers::BillingConfigRetrieveResponse::Data::StripeCollectionMethod }
83
93
 
84
- # @!method initialize(aws_expiration_date: nil, aws_is_subscription_product: nil, aws_product_code: nil, aws_region: nil, azure_expiration_date: nil, azure_plan_id: nil, azure_start_date: nil, azure_subscription_status: nil, billing_provider_customer_id: nil, stripe_collection_method: nil)
94
+ # @!method initialize(aws_customer_account_id: nil, aws_customer_id: nil, aws_expiration_date: nil, aws_is_subscription_product: nil, aws_product_code: nil, aws_region: nil, azure_expiration_date: nil, azure_plan_id: nil, azure_start_date: nil, azure_subscription_status: nil, billing_provider_customer_id: nil, stripe_collection_method: nil)
85
95
  # Some parameter documentations has been truncated, see
86
96
  # {MetronomeSDK::Models::V1::Customers::BillingConfigRetrieveResponse::Data} for
87
97
  # more details.
88
98
  #
99
+ # @param aws_customer_account_id [String]
100
+ #
101
+ # @param aws_customer_id [String]
102
+ #
89
103
  # @param aws_expiration_date [Time] Contract expiration date for the customer. The expected format is RFC 3339 and c
90
104
  #
91
105
  # @param aws_is_subscription_product [Boolean] True if the aws_product_code is a SAAS subscription product, false otherwise.
@@ -118,6 +118,13 @@ module MetronomeSDK
118
118
  # @return [Array<String>, nil]
119
119
  optional :invoice_types_filter, MetronomeSDK::Internal::Type::ArrayOf[String]
120
120
 
121
+ # @!attribute seat_filter
122
+ # Only present for low_remaining_seat_balance_reached notifications. The seat
123
+ # group key or seat group key-value pair the alert is scoped to.
124
+ #
125
+ # @return [MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::SeatFilter, nil]
126
+ optional :seat_filter, -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::SeatFilter }
127
+
121
128
  # @!attribute uniqueness_key
122
129
  # Prevents the creation of duplicates. If a request to create a record is made
123
130
  # with a previously used uniqueness key, a new record will not be created and the
@@ -126,7 +133,7 @@ module MetronomeSDK
126
133
  # @return [String, nil]
127
134
  optional :uniqueness_key, String
128
135
 
129
- # @!method initialize(id:, name:, status:, threshold:, type:, updated_at:, credit_grant_type_filters: nil, credit_type: nil, custom_field_filters: nil, group_key_filter: nil, group_values: nil, invoice_types_filter: nil, uniqueness_key: nil)
136
+ # @!method initialize(id:, name:, status:, threshold:, type:, updated_at:, credit_grant_type_filters: nil, credit_type: nil, custom_field_filters: nil, group_key_filter: nil, group_values: nil, invoice_types_filter: nil, seat_filter: nil, uniqueness_key: nil)
130
137
  # Some parameter documentations has been truncated, see
131
138
  # {MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert} for more details.
132
139
  #
@@ -154,6 +161,8 @@ module MetronomeSDK
154
161
  #
155
162
  # @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached threshold notifications. A list of invo
156
163
  #
164
+ # @param seat_filter [MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::SeatFilter] Only present for low_remaining_seat_balance_reached notifications. The seat grou
165
+ #
157
166
  # @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
158
167
 
159
168
  # Status of the threshold notification
@@ -268,6 +277,29 @@ module MetronomeSDK
268
277
  # @param key [String]
269
278
  # @param value [String]
270
279
  end
280
+
281
+ # @see MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert#seat_filter
282
+ class SeatFilter < MetronomeSDK::Internal::Type::BaseModel
283
+ # @!attribute seat_group_key
284
+ # The seat group key (e.g., "seat_id", "user_id") that the alert is scoped to.
285
+ #
286
+ # @return [String]
287
+ required :seat_group_key, String
288
+
289
+ # @!attribute seat_group_value
290
+ # The seat group value that the alert is scoped to.
291
+ #
292
+ # @return [String, nil]
293
+ optional :seat_group_value, String
294
+
295
+ # @!method initialize(seat_group_key:, seat_group_value: nil)
296
+ # Only present for low_remaining_seat_balance_reached notifications. The seat
297
+ # group key or seat group key-value pair the alert is scoped to.
298
+ #
299
+ # @param seat_group_key [String] The seat group key (e.g., "seat_id", "user_id") that the alert is scoped to.
300
+ #
301
+ # @param seat_group_value [String] The seat group value that the alert is scoped to.
302
+ end
271
303
  end
272
304
 
273
305
  # The status of the threshold notification. If the notification is archived, null
@@ -158,6 +158,15 @@ module MetronomeSDK
158
158
  # @return [MetronomeSDK::Models::V1::Customers::Invoice::ResellerRoyalty, nil]
159
159
  optional :reseller_royalty, -> { MetronomeSDK::V1::Customers::Invoice::ResellerRoyalty }
160
160
 
161
+ # @!attribute revenue_system_invoices
162
+ #
163
+ # @return [Array<MetronomeSDK::Models::V1::Customers::Invoice::RevenueSystemInvoice>, nil]
164
+ optional :revenue_system_invoices,
165
+ -> {
166
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::Invoice::RevenueSystemInvoice]
167
+ },
168
+ nil?: true
169
+
161
170
  # @!attribute salesforce_opportunity_id
162
171
  # This field's availability is dependent on your client's configuration.
163
172
  #
@@ -175,7 +184,7 @@ module MetronomeSDK
175
184
  # @return [Float, nil]
176
185
  optional :subtotal, Float
177
186
 
178
- # @!method initialize(id:, credit_type:, customer_id:, line_items:, status:, total:, type:, amendment_id: nil, billable_status: nil, constituent_invoices: nil, contract_custom_fields: nil, contract_id: nil, correction_record: nil, created_at: nil, custom_fields: nil, customer_custom_fields: nil, end_timestamp: nil, external_invoice: nil, invoice_adjustments: nil, issued_at: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, payer: nil, plan_custom_fields: nil, plan_id: nil, plan_name: nil, reseller_royalty: nil, salesforce_opportunity_id: nil, start_timestamp: nil, subtotal: nil)
187
+ # @!method initialize(id:, credit_type:, customer_id:, line_items:, status:, total:, type:, amendment_id: nil, billable_status: nil, constituent_invoices: nil, contract_custom_fields: nil, contract_id: nil, correction_record: nil, created_at: nil, custom_fields: nil, customer_custom_fields: nil, end_timestamp: nil, external_invoice: nil, invoice_adjustments: nil, issued_at: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, payer: nil, plan_custom_fields: nil, plan_id: nil, plan_name: nil, reseller_royalty: nil, revenue_system_invoices: nil, salesforce_opportunity_id: nil, start_timestamp: nil, subtotal: nil)
179
188
  # Some parameter documentations has been truncated, see
180
189
  # {MetronomeSDK::Models::V1::Customers::Invoice} for more details.
181
190
  #
@@ -233,6 +242,8 @@ module MetronomeSDK
233
242
  #
234
243
  # @param reseller_royalty [MetronomeSDK::Models::V1::Customers::Invoice::ResellerRoyalty] Only present for contract invoices with reseller royalties.
235
244
  #
245
+ # @param revenue_system_invoices [Array<MetronomeSDK::Models::V1::Customers::Invoice::RevenueSystemInvoice>, nil]
246
+ #
236
247
  # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
237
248
  #
238
249
  # @param start_timestamp [Time] Beginning of the usage period this invoice covers (UTC)
@@ -932,6 +943,12 @@ module MetronomeSDK
932
943
  # @return [String, nil]
933
944
  optional :billing_provider_error, String
934
945
 
946
+ # @!attribute external_payment_id
947
+ # The ID of the payment in the external system, if available.
948
+ #
949
+ # @return [String, nil]
950
+ optional :external_payment_id, String
951
+
935
952
  # @!attribute external_status
936
953
  #
937
954
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::ExternalStatus, nil]
@@ -973,11 +990,13 @@ module MetronomeSDK
973
990
  optional :tax,
974
991
  -> { MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::Tax }
975
992
 
976
- # @!method initialize(billing_provider_type:, billing_provider_error: nil, external_status: nil, invoice_id: nil, invoiced_sub_total: nil, invoiced_total: nil, issued_at_timestamp: nil, pdf_url: nil, tax: nil)
993
+ # @!method initialize(billing_provider_type:, billing_provider_error: nil, external_payment_id: nil, external_status: nil, invoice_id: nil, invoiced_sub_total: nil, invoiced_total: nil, issued_at_timestamp: nil, pdf_url: nil, tax: nil)
977
994
  # @param billing_provider_type [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::BillingProviderType]
978
995
  #
979
996
  # @param billing_provider_error [String] Error message from the billing provider, if available.
980
997
  #
998
+ # @param external_payment_id [String] The ID of the payment in the external system, if available.
999
+ #
981
1000
  # @param external_status [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::ExternalStatus]
982
1001
  #
983
1002
  # @param invoice_id [String]
@@ -1017,6 +1036,7 @@ module MetronomeSDK
1017
1036
  DRAFT = :DRAFT
1018
1037
  FINALIZED = :FINALIZED
1019
1038
  PAID = :PAID
1039
+ PARTIALLY_PAID = :PARTIALLY_PAID
1020
1040
  UNCOLLECTIBLE = :UNCOLLECTIBLE
1021
1041
  VOID = :VOID
1022
1042
  DELETED = :DELETED
@@ -1076,6 +1096,12 @@ module MetronomeSDK
1076
1096
  # @return [String, nil]
1077
1097
  optional :billing_provider_error, String
1078
1098
 
1099
+ # @!attribute external_payment_id
1100
+ # The ID of the payment in the external system, if available.
1101
+ #
1102
+ # @return [String, nil]
1103
+ optional :external_payment_id, String
1104
+
1079
1105
  # @!attribute external_status
1080
1106
  #
1081
1107
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice::ExternalStatus, nil]
@@ -1116,11 +1142,13 @@ module MetronomeSDK
1116
1142
  # @return [MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice::Tax, nil]
1117
1143
  optional :tax, -> { MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::Tax }
1118
1144
 
1119
- # @!method initialize(billing_provider_type:, billing_provider_error: nil, external_status: nil, invoice_id: nil, invoiced_sub_total: nil, invoiced_total: nil, issued_at_timestamp: nil, pdf_url: nil, tax: nil)
1145
+ # @!method initialize(billing_provider_type:, billing_provider_error: nil, external_payment_id: nil, external_status: nil, invoice_id: nil, invoiced_sub_total: nil, invoiced_total: nil, issued_at_timestamp: nil, pdf_url: nil, tax: nil)
1120
1146
  # @param billing_provider_type [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice::BillingProviderType]
1121
1147
  #
1122
1148
  # @param billing_provider_error [String] Error message from the billing provider, if available.
1123
1149
  #
1150
+ # @param external_payment_id [String] The ID of the payment in the external system, if available.
1151
+ #
1124
1152
  # @param external_status [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice::ExternalStatus]
1125
1153
  #
1126
1154
  # @param invoice_id [String]
@@ -1160,6 +1188,7 @@ module MetronomeSDK
1160
1188
  DRAFT = :DRAFT
1161
1189
  FINALIZED = :FINALIZED
1162
1190
  PAID = :PAID
1191
+ PARTIALLY_PAID = :PARTIALLY_PAID
1163
1192
  UNCOLLECTIBLE = :UNCOLLECTIBLE
1164
1193
  VOID = :VOID
1165
1194
  DELETED = :DELETED
@@ -1352,6 +1381,45 @@ module MetronomeSDK
1352
1381
  # @param gcp_offer_id [String]
1353
1382
  end
1354
1383
  end
1384
+
1385
+ class RevenueSystemInvoice < MetronomeSDK::Internal::Type::BaseModel
1386
+ # @!attribute revenue_system_external_entity_type
1387
+ #
1388
+ # @return [String]
1389
+ required :revenue_system_external_entity_type, String
1390
+
1391
+ # @!attribute revenue_system_provider
1392
+ #
1393
+ # @return [String]
1394
+ required :revenue_system_provider, String
1395
+
1396
+ # @!attribute sync_status
1397
+ #
1398
+ # @return [String]
1399
+ required :sync_status, String
1400
+
1401
+ # @!attribute error_message
1402
+ # The error message from the revenue system, if available.
1403
+ #
1404
+ # @return [String, nil]
1405
+ optional :error_message, String
1406
+
1407
+ # @!attribute revenue_system_external_entity_id
1408
+ #
1409
+ # @return [String, nil]
1410
+ optional :revenue_system_external_entity_id, String
1411
+
1412
+ # @!method initialize(revenue_system_external_entity_type:, revenue_system_provider:, sync_status:, error_message: nil, revenue_system_external_entity_id: nil)
1413
+ # @param revenue_system_external_entity_type [String]
1414
+ #
1415
+ # @param revenue_system_provider [String]
1416
+ #
1417
+ # @param sync_status [String]
1418
+ #
1419
+ # @param error_message [String] The error message from the revenue system, if available.
1420
+ #
1421
+ # @param revenue_system_external_entity_id [String]
1422
+ end
1355
1423
  end
1356
1424
  end
1357
1425
  end
@@ -62,6 +62,11 @@ module MetronomeSDK
62
62
  required :adjustment_type,
63
63
  enum: -> { MetronomeSDK::Models::V1::Customers::PlanListPriceAdjustmentsResponse::Price::AdjustmentType }
64
64
 
65
+ # @!attribute quantity
66
+ #
67
+ # @return [Float, nil]
68
+ optional :quantity, Float
69
+
65
70
  # @!attribute tier
66
71
  # Used in pricing tiers. Indicates at what metric value the price applies.
67
72
  #
@@ -73,9 +78,11 @@ module MetronomeSDK
73
78
  # @return [Float, nil]
74
79
  optional :value, Float
75
80
 
76
- # @!method initialize(adjustment_type:, tier: nil, value: nil)
81
+ # @!method initialize(adjustment_type:, quantity: nil, tier: nil, value: nil)
77
82
  # @param adjustment_type [Symbol, MetronomeSDK::Models::V1::Customers::PlanListPriceAdjustmentsResponse::Price::AdjustmentType] Determines how the value will be applied.
78
83
  #
84
+ # @param quantity [Float]
85
+ #
79
86
  # @param tier [Float] Used in pricing tiers. Indicates at what metric value the price applies.
80
87
  #
81
88
  # @param value [Float]