metronome-sdk 3.7.0 → 3.9.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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +46 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/internal/transport/base_client.rb +4 -1
  5. data/lib/metronome_sdk/models/commit.rb +10 -1
  6. data/lib/metronome_sdk/models/contract.rb +46 -16
  7. data/lib/metronome_sdk/models/contract_v2.rb +645 -16
  8. data/lib/metronome_sdk/models/contract_without_amendments.rb +178 -4
  9. data/lib/metronome_sdk/models/credit.rb +10 -1
  10. data/lib/metronome_sdk/models/override.rb +7 -1
  11. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +10 -2
  12. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +3 -1
  13. data/lib/metronome_sdk/models/subscription.rb +90 -2
  14. data/lib/metronome_sdk/models/v1/alert_create_params.rb +127 -1
  15. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +17 -4
  16. data/lib/metronome_sdk/models/v1/contract_create_params.rb +290 -10
  17. data/lib/metronome_sdk/models/v1/contract_create_response.rb +243 -17
  18. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rb +88 -0
  19. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rb +62 -0
  20. data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +10 -1
  21. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +127 -1
  22. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +130 -3
  23. data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +10 -1
  24. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +2 -0
  25. data/lib/metronome_sdk/models/v1/package_create_params.rb +279 -10
  26. data/lib/metronome_sdk/models/v1/package_list_response.rb +264 -7
  27. data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +264 -7
  28. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +517 -9
  29. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +456 -8
  30. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +456 -8
  31. data/lib/metronome_sdk/resources/v1/alerts.rb +3 -1
  32. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +4 -0
  33. data/lib/metronome_sdk/resources/v1/contracts.rb +68 -1
  34. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +4 -2
  35. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +3 -1
  36. data/lib/metronome_sdk/resources/v1/dashboards.rb +7 -2
  37. data/lib/metronome_sdk/version.rb +1 -1
  38. data/lib/metronome_sdk.rb +2 -0
  39. data/rbi/metronome_sdk/models/commit.rbi +13 -0
  40. data/rbi/metronome_sdk/models/contract.rbi +47 -22
  41. data/rbi/metronome_sdk/models/contract_v2.rbi +1472 -96
  42. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +463 -0
  43. data/rbi/metronome_sdk/models/credit.rbi +13 -0
  44. data/rbi/metronome_sdk/models/override.rbi +9 -0
  45. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +11 -1
  46. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +4 -0
  47. data/rbi/metronome_sdk/models/subscription.rbi +212 -3
  48. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +373 -0
  49. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +27 -6
  50. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +719 -9
  51. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +523 -32
  52. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbi +112 -0
  53. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbi +119 -0
  54. data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +13 -0
  55. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +360 -0
  56. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +379 -2
  57. data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +13 -0
  58. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +10 -0
  59. data/rbi/metronome_sdk/models/v1/package_create_params.rbi +706 -9
  60. data/rbi/metronome_sdk/models/v1/package_list_response.rbi +693 -3
  61. data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +693 -3
  62. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +1372 -69
  63. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +1204 -67
  64. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1204 -67
  65. data/rbi/metronome_sdk/resources/v1/alerts.rbi +8 -0
  66. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +4 -0
  67. data/rbi/metronome_sdk/resources/v1/contracts.rbi +70 -0
  68. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +8 -1
  69. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +4 -0
  70. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +7 -2
  71. data/sig/metronome_sdk/models/commit.rbs +7 -0
  72. data/sig/metronome_sdk/models/contract.rbs +22 -11
  73. data/sig/metronome_sdk/models/contract_v2.rbs +559 -8
  74. data/sig/metronome_sdk/models/contract_without_amendments.rbs +169 -2
  75. data/sig/metronome_sdk/models/credit.rbs +7 -0
  76. data/sig/metronome_sdk/models/override.rbs +7 -0
  77. data/sig/metronome_sdk/models/subscription.rbs +88 -3
  78. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +144 -0
  79. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +7 -0
  80. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +278 -5
  81. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +197 -17
  82. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbs +63 -0
  83. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbs +59 -0
  84. data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +7 -0
  85. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +141 -0
  86. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +150 -0
  87. data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +8 -1
  88. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
  89. data/sig/metronome_sdk/models/v1/package_create_params.rbs +271 -5
  90. data/sig/metronome_sdk/models/v1/package_list_response.rbs +265 -5
  91. data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +263 -5
  92. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +472 -7
  93. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +428 -5
  94. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +427 -5
  95. data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
  96. data/sig/metronome_sdk/resources/v1/contracts.rbs +13 -0
  97. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
  98. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -0
  99. metadata +8 -2
@@ -58,7 +58,7 @@ module MetronomeSDK
58
58
  # threshold notification evaluations in real-time as usage events stream in,
59
59
  # unlike competitors who rely on periodic polling or batch evaluation cycles
60
60
  #
61
- # @overload create(alert_type:, name:, threshold:, billable_metric_id: nil, credit_grant_type_filters: nil, credit_type_id: nil, custom_field_filters: nil, customer_id: nil, evaluate_on_create: nil, group_values: nil, invoice_types_filter: nil, plan_id: nil, seat_filter: nil, uniqueness_key: nil, request_options: {})
61
+ # @overload create(alert_type:, name:, threshold:, alert_specifiers: nil, billable_metric_id: nil, credit_grant_type_filters: nil, credit_type_id: nil, custom_field_filters: nil, customer_id: nil, evaluate_on_create: nil, group_values: nil, invoice_types_filter: nil, plan_id: nil, seat_filter: nil, uniqueness_key: nil, request_options: {})
62
62
  #
63
63
  # @param alert_type [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType] Type of the threshold notification
64
64
  #
@@ -66,6 +66,8 @@ module MetronomeSDK
66
66
  #
67
67
  # @param threshold [Float] Threshold value of the notification policy. Depending upon the notification typ
68
68
  #
69
+ # @param alert_specifiers [Array<MetronomeSDK::Models::V1::AlertCreateParams::AlertSpecifier>] Can be used with only `low_remaining_contract_credit_and_commit_balance_reached`
70
+ #
69
71
  # @param billable_metric_id [String] For threshold notifications of type `usage_threshold_reached`, specifies which b
70
72
  #
71
73
  # @param credit_grant_type_filters [Array<String>] An array of strings, representing a way to filter the credit grant this threshol
@@ -59,6 +59,10 @@ module MetronomeSDK
59
59
  #
60
60
  # Add a new rate
61
61
  #
62
+ # This endpoint is heavily rate limited. For adding multiple rates, using the
63
+ # [addRates](https://docs.metronome.com/api-reference/rate-cards/add-rates)
64
+ # endpoint is strongly encouraged.
65
+ #
62
66
  # @overload add(entitled:, product_id:, rate_card_id:, rate_type:, starting_at:, billing_frequency: nil, commit_rate: nil, credit_type_id: nil, custom_rate: nil, ending_before: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil, request_options: {})
63
67
  #
64
68
  # @param entitled [Boolean]
@@ -568,6 +568,71 @@ module MetronomeSDK
568
568
  )
569
569
  end
570
570
 
571
+ # Some parameter documentations has been truncated, see
572
+ # {MetronomeSDK::Models::V1::ContractGetSubscriptionSeatsHistoryParams} for more
573
+ # details.
574
+ #
575
+ # Get the history of subscription seats schedule over time for a given
576
+ # `subscription_id`. This endpoint provides information about seat assignments and
577
+ # total quantities for different time periods, allowing you to track how seat
578
+ # assignments have changed over time.
579
+ #
580
+ # ### Use this endpoint to:
581
+ #
582
+ # - Track changes to seat assignments over time
583
+ # - Get seat schedule for a specific date using the `covering_date` parameter
584
+ # - Get seat schedule history with optional date range filtering using
585
+ # `starting_at` and `ending_before`
586
+ #
587
+ # ### Key response fields:
588
+ #
589
+ # - data: array of seat schedule entries with time periods, quantity, and
590
+ # assignments
591
+ # - next_page: cursor for pagination to retrieve additional results
592
+ #
593
+ # ### Usage guidelines:
594
+ #
595
+ # - Use `covering_date` to get the active seats for a specific point in time.
596
+ # `covering_date` cannot be used with `starting_at` or `ending_before`.
597
+ # - Use `starting_at` and `ending_before` to filter results by time range.
598
+ # `starting_at` and `ending_before` cannot be used with `covering_date`.
599
+ # - Maximum limit is 10 seat schedule entries per request
600
+ # - Results are ordered by `starting_at` timestamp
601
+ #
602
+ # @overload get_subscription_seats_history(contract_id:, customer_id:, subscription_id:, covering_date: nil, cursor: nil, ending_before: nil, limit: nil, starting_at: nil, request_options: {})
603
+ #
604
+ # @param contract_id [String]
605
+ #
606
+ # @param customer_id [String]
607
+ #
608
+ # @param subscription_id [String]
609
+ #
610
+ # @param covering_date [Time, nil] Get the seats history segment for the covering date. Cannot be used with `starti
611
+ #
612
+ # @param cursor [String, nil] Cursor for pagination. Use the value from the `next_page` field of the previous
613
+ #
614
+ # @param ending_before [Time, nil] Include seats history segments that are active at or before this timestamp. Use
615
+ #
616
+ # @param limit [Integer, nil] Maximum number of seat schedule entries to return. Defaults to 10. Required rang
617
+ #
618
+ # @param starting_at [Time, nil] Include seats history segments that are active at or after this timestamp. Use w
619
+ #
620
+ # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
621
+ #
622
+ # @return [MetronomeSDK::Models::V1::ContractGetSubscriptionSeatsHistoryResponse]
623
+ #
624
+ # @see MetronomeSDK::Models::V1::ContractGetSubscriptionSeatsHistoryParams
625
+ def get_subscription_seats_history(params)
626
+ parsed, options = MetronomeSDK::V1::ContractGetSubscriptionSeatsHistoryParams.dump_request(params)
627
+ @client.request(
628
+ method: :post,
629
+ path: "v1/contracts/getSubscriptionSeatsHistory",
630
+ body: parsed,
631
+ model: MetronomeSDK::Models::V1::ContractGetSubscriptionSeatsHistoryResponse,
632
+ options: options
633
+ )
634
+ end
635
+
571
636
  # Some parameter documentations has been truncated, see
572
637
  # {MetronomeSDK::Models::V1::ContractListBalancesParams} for more details.
573
638
  #
@@ -679,7 +744,7 @@ module MetronomeSDK
679
744
  # - Set `include_ledgers=true` for detailed transaction history per commit/credit
680
745
  # per seat
681
746
  #
682
- # @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: {})
747
+ # @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, skip_missing_seat_ids: nil, starting_at: nil, subscription_ids: nil, request_options: {})
683
748
  #
684
749
  # @param contract_id [String] The contract ID to retrieve seat balances for
685
750
  #
@@ -699,6 +764,8 @@ module MetronomeSDK
699
764
  #
700
765
  # @param seat_ids [Array<String>] Optional filter to only include specific seats.
701
766
  #
767
+ # @param skip_missing_seat_ids [Boolean] When true, any seat_ids not found in contract subscriptions will be silently omi
768
+ #
702
769
  # @param starting_at [Time] Include only commits or credits with access effective on or after this date (can
703
770
  #
704
771
  # @param subscription_ids [Array<String>] Optional filter to only include seats from specific subscriptions. If subscripti
@@ -47,11 +47,11 @@ module MetronomeSDK
47
47
  # - `null` - Notification has been archived
48
48
  # - `triggered_by`: Additional context about what caused the notification to
49
49
  # trigger (when applicable)
50
+ # - `updated_at`: Timestamp of when the `customer_status` was last updated
50
51
  # - alert: Complete threshold notification configuration including:
51
52
  # - Notification ID, name, and type
52
53
  # - Current threshold values and credit type information
53
54
  # - Notification status (enabled, disabled, or archived)
54
- # - Last update timestamp
55
55
  # - Any applied filters (credit grant types, custom fields, group values)
56
56
  #
57
57
  # ### Usage guidelines:
@@ -69,12 +69,14 @@ module MetronomeSDK
69
69
  # - Error handling: Returns 404 if either the customer or alert_id doesn't exist
70
70
  # or isn't accessible to your organization
71
71
  #
72
- # @overload retrieve(alert_id:, customer_id:, group_values: nil, plans_or_contracts: nil, seat_filter: nil, request_options: {})
72
+ # @overload retrieve(alert_id:, customer_id:, alert_specifiers: nil, group_values: nil, plans_or_contracts: nil, seat_filter: nil, request_options: {})
73
73
  #
74
74
  # @param alert_id [String] The Metronome ID of the threshold notification
75
75
  #
76
76
  # @param customer_id [String] The Metronome ID of the customer
77
77
  #
78
+ # @param alert_specifiers [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier>] Can be used with only `low_remaining_contract_credit_and_commit_balance_reached`
79
+ #
78
80
  # @param group_values [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::GroupValue>] Only present for `spend_threshold_reached` notifications. Retrieve the notificat
79
81
  #
80
82
  # @param plans_or_contracts [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts] When parallel threshold notifications are enabled during migration, this flag de
@@ -136,7 +136,7 @@ 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:, 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: {})
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, webhook_notification_id: nil, request_options: {})
140
140
  #
141
141
  # @param customer_id [String] Path param
142
142
  #
@@ -160,6 +160,8 @@ module MetronomeSDK
160
160
  #
161
161
  # @param type [Symbol, MetronomeSDK::Models::V1::Customers::InvoiceListParams::Type] Query param: Filter invoices by type. Defaults to returning all invoice types.
162
162
  #
163
+ # @param webhook_notification_id [String] Query param: Indicates that this API request was triggered by a webhook notifica
164
+ #
163
165
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
164
166
  #
165
167
  # @return [MetronomeSDK::Internal::CursorPage<MetronomeSDK::Models::V1::Customers::Invoice>]
@@ -30,8 +30,13 @@ module MetronomeSDK
30
30
  #
31
31
  # - Dashboard types: Choose from `invoices`, `usage`, or `commits_and_credits`
32
32
  # - Customization options:
33
- # - `dashboard_options`: Configure whether you want invoices to show zero usage
34
- # line items
33
+ # - `dashboard_options`: Configure dashboard behavior. For the invoices
34
+ # dashboard, supported keys include: `show_zero_usage_line_items`
35
+ # ("true"/"false"), `hide_voided_invoices` ("true"/"false"), `contract_id`
36
+ # (UUID, filters invoices by contract), `invoice_type` ("USAGE" or
37
+ # "SCHEDULED", filters by invoice type), `invoice_status_filter` ("VOID",
38
+ # "FINALIZED", "DRAFT", "FINALIZED_AND_DRAFT", or "ALL"), and
39
+ # `billable_status_filter` ("BILLABLE", "UNBILLABLE", or "ALL")
35
40
  # - `color_overrides`: Match your brand's color palette
36
41
  # - `bm_group_key_overrides`: Customize how dimensions are displayed (for the
37
42
  # usage embeddable dashboard)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MetronomeSDK
4
- VERSION = "3.7.0"
4
+ VERSION = "3.9.0"
5
5
  end
data/lib/metronome_sdk.rb CHANGED
@@ -117,6 +117,8 @@ require_relative "metronome_sdk/models/v1/contract_create_params"
117
117
  require_relative "metronome_sdk/models/v1/contract_create_response"
118
118
  require_relative "metronome_sdk/models/v1/contract_get_net_balance_params"
119
119
  require_relative "metronome_sdk/models/v1/contract_get_net_balance_response"
120
+ require_relative "metronome_sdk/models/v1/contract_get_subscription_seats_history_params"
121
+ require_relative "metronome_sdk/models/v1/contract_get_subscription_seats_history_response"
120
122
  require_relative "metronome_sdk/models/v1/contract_list_balances_params"
121
123
  require_relative "metronome_sdk/models/v1/contract_list_balances_response"
122
124
  require_relative "metronome_sdk/models/v1/contract_list_params"
@@ -91,6 +91,14 @@ module MetronomeSDK
91
91
  sig { params(contract: MetronomeSDK::Commit::Contract::OrHash).void }
92
92
  attr_writer :contract
93
93
 
94
+ # The actor who created this commit. Omitted for system-generated commits such as
95
+ # recurring commits, rollover commits, and threshold commits.
96
+ sig { returns(T.nilable(String)) }
97
+ attr_reader :created_by
98
+
99
+ sig { params(created_by: String).void }
100
+ attr_writer :created_by
101
+
94
102
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
95
103
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
96
104
  attr_reader :custom_fields
@@ -285,6 +293,7 @@ module MetronomeSDK
285
293
  archived_at: Time,
286
294
  balance: Float,
287
295
  contract: MetronomeSDK::Commit::Contract::OrHash,
296
+ created_by: String,
288
297
  custom_fields: T::Hash[Symbol, String],
289
298
  description: String,
290
299
  hierarchy_configuration:
@@ -356,6 +365,9 @@ module MetronomeSDK
356
365
  # included in the balance, including future-dated manual ledger entries.
357
366
  balance: nil,
358
367
  contract: nil,
368
+ # The actor who created this commit. Omitted for system-generated commits such as
369
+ # recurring commits, rollover commits, and threshold commits.
370
+ created_by: nil,
359
371
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
360
372
  custom_fields: nil,
361
373
  description: nil,
@@ -414,6 +426,7 @@ module MetronomeSDK
414
426
  archived_at: Time,
415
427
  balance: Float,
416
428
  contract: MetronomeSDK::Commit::Contract,
429
+ created_by: String,
417
430
  custom_fields: T::Hash[Symbol, String],
418
431
  description: String,
419
432
  hierarchy_configuration: MetronomeSDK::CommitHierarchyConfiguration,
@@ -48,7 +48,6 @@ module MetronomeSDK
48
48
  sig { params(custom_fields: T::Hash[Symbol, String]).void }
49
49
  attr_writer :custom_fields
50
50
 
51
- # The billing provider configuration associated with a contract.
52
51
  sig do
53
52
  returns(
54
53
  T.nilable(
@@ -183,7 +182,6 @@ module MetronomeSDK
183
182
  archived_at: nil,
184
183
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
185
184
  custom_fields: nil,
186
- # The billing provider configuration associated with a contract.
187
185
  customer_billing_provider_configuration: nil,
188
186
  # ID of the package this contract was created from, if applicable.
189
187
  package_id: nil,
@@ -567,9 +565,15 @@ module MetronomeSDK
567
565
  )
568
566
  end
569
567
 
568
+ # ID of this configuration; can be provided as the
569
+ # billing_provider_configuration_id when creating a contract.
570
+ sig { returns(String) }
571
+ attr_accessor :id
572
+
570
573
  sig { returns(T.nilable(Time)) }
571
574
  attr_accessor :archived_at
572
575
 
576
+ # The billing provider set for this configuration.
573
577
  sig do
574
578
  returns(
575
579
  MetronomeSDK::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
@@ -577,6 +581,15 @@ module MetronomeSDK
577
581
  end
578
582
  attr_accessor :billing_provider
579
583
 
584
+ # Configuration for the billing provider. The structure of this object is specific
585
+ # to the billing provider.
586
+ sig { returns(T::Hash[Symbol, T.anything]) }
587
+ attr_accessor :configuration
588
+
589
+ sig { returns(String) }
590
+ attr_accessor :customer_id
591
+
592
+ # The method to use for delivering invoices to this customer.
580
593
  sig do
581
594
  returns(
582
595
  MetronomeSDK::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
@@ -584,59 +597,70 @@ module MetronomeSDK
584
597
  end
585
598
  attr_accessor :delivery_method
586
599
 
587
- sig { returns(T.nilable(String)) }
588
- attr_reader :id
589
-
590
- sig { params(id: String).void }
591
- attr_writer :id
592
-
593
- # Configuration for the billing provider. The structure of this object is specific
594
- # to the billing provider.
595
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
596
- attr_reader :configuration
600
+ # Configuration for the delivery method. The structure of this object is specific
601
+ # to the delivery method.
602
+ sig { returns(T::Hash[Symbol, T.anything]) }
603
+ attr_accessor :delivery_method_configuration
597
604
 
598
- sig { params(configuration: T::Hash[Symbol, T.anything]).void }
599
- attr_writer :configuration
605
+ # ID of the delivery method to use for this customer.
606
+ sig { returns(String) }
607
+ attr_accessor :delivery_method_id
600
608
 
601
- # The billing provider configuration associated with a contract.
602
609
  sig do
603
610
  params(
611
+ id: String,
604
612
  archived_at: T.nilable(Time),
605
613
  billing_provider:
606
614
  MetronomeSDK::Contract::CustomerBillingProviderConfiguration::BillingProvider::OrSymbol,
615
+ configuration: T::Hash[Symbol, T.anything],
616
+ customer_id: String,
607
617
  delivery_method:
608
618
  MetronomeSDK::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::OrSymbol,
609
- id: String,
610
- configuration: T::Hash[Symbol, T.anything]
619
+ delivery_method_configuration: T::Hash[Symbol, T.anything],
620
+ delivery_method_id: String
611
621
  ).returns(T.attached_class)
612
622
  end
613
623
  def self.new(
624
+ # ID of this configuration; can be provided as the
625
+ # billing_provider_configuration_id when creating a contract.
626
+ id:,
614
627
  archived_at:,
628
+ # The billing provider set for this configuration.
615
629
  billing_provider:,
616
- delivery_method:,
617
- id: nil,
618
630
  # Configuration for the billing provider. The structure of this object is specific
619
631
  # to the billing provider.
620
- configuration: nil
632
+ configuration:,
633
+ customer_id:,
634
+ # The method to use for delivering invoices to this customer.
635
+ delivery_method:,
636
+ # Configuration for the delivery method. The structure of this object is specific
637
+ # to the delivery method.
638
+ delivery_method_configuration:,
639
+ # ID of the delivery method to use for this customer.
640
+ delivery_method_id:
621
641
  )
622
642
  end
623
643
 
624
644
  sig do
625
645
  override.returns(
626
646
  {
647
+ id: String,
627
648
  archived_at: T.nilable(Time),
628
649
  billing_provider:
629
650
  MetronomeSDK::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol,
651
+ configuration: T::Hash[Symbol, T.anything],
652
+ customer_id: String,
630
653
  delivery_method:
631
654
  MetronomeSDK::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol,
632
- id: String,
633
- configuration: T::Hash[Symbol, T.anything]
655
+ delivery_method_configuration: T::Hash[Symbol, T.anything],
656
+ delivery_method_id: String
634
657
  }
635
658
  )
636
659
  end
637
660
  def to_hash
638
661
  end
639
662
 
663
+ # The billing provider set for this configuration.
640
664
  module BillingProvider
641
665
  extend MetronomeSDK::Internal::Type::Enum
642
666
 
@@ -706,6 +730,7 @@ module MetronomeSDK
706
730
  end
707
731
  end
708
732
 
733
+ # The method to use for delivering invoices to this customer.
709
734
  module DeliveryMethod
710
735
  extend MetronomeSDK::Internal::Type::Enum
711
736