metronome-sdk 1.0.0 → 2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +55 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/errors.rb +25 -11
- data/lib/metronome_sdk/file_part.rb +10 -7
- data/lib/metronome_sdk/internal/body_cursor_page.rb +1 -1
- data/lib/metronome_sdk/internal/cursor_page.rb +1 -1
- data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +1 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +11 -7
- data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +7 -10
- data/lib/metronome_sdk/internal/type/base_page.rb +1 -1
- data/lib/metronome_sdk/internal/type/enum.rb +25 -0
- data/lib/metronome_sdk/internal/type/file_input.rb +7 -4
- data/lib/metronome_sdk/internal/util.rb +8 -7
- data/lib/metronome_sdk/models/contract_v2.rb +256 -6
- data/lib/metronome_sdk/models/contract_without_amendments.rb +2 -2
- data/lib/metronome_sdk/models/hierarchy_configuration.rb +99 -2
- data/lib/metronome_sdk/models/payment_gate_config.rb +1 -0
- data/lib/metronome_sdk/models/payment_gate_config_v2.rb +1 -0
- data/lib/metronome_sdk/models/subscription.rb +85 -1
- data/lib/metronome_sdk/models/v1/alert_archive_params.rb +8 -4
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +38 -36
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +101 -3
- data/lib/metronome_sdk/models/v1/customer_detail.rb +9 -1
- data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +5 -15
- data/lib/metronome_sdk/models/v1/customer_preview_events_response.rb +3 -3
- data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +3 -3
- data/lib/metronome_sdk/models/v1/customers/alert_reset_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +12 -12
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +40 -38
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +136 -18
- data/lib/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rb +30 -0
- data/lib/metronome_sdk/models/v1/payment.rb +151 -0
- data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +28 -0
- data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +28 -0
- data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/payment_list_params.rb +53 -0
- data/lib/metronome_sdk/models/v1/payment_status.rb +19 -0
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +9 -1
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +9 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +186 -3
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +195 -8
- data/lib/metronome_sdk/resources/v1/alerts.rb +57 -53
- data/lib/metronome_sdk/resources/v1/contracts.rb +4 -3
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +70 -51
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +55 -0
- data/lib/metronome_sdk/resources/v1/customers.rb +7 -4
- data/lib/metronome_sdk/resources/v1/payments.rb +102 -0
- data/lib/metronome_sdk/resources/v1/usage.rb +4 -2
- data/lib/metronome_sdk/resources/v1.rb +4 -0
- data/lib/metronome_sdk/resources/v2/contracts.rb +9 -3
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +9 -0
- data/rbi/metronome_sdk/errors.rbi +29 -2
- data/rbi/metronome_sdk/file_part.rbi +1 -1
- data/rbi/metronome_sdk/internal/transport/base_client.rbi +4 -5
- data/rbi/metronome_sdk/internal/type/base_page.rbi +1 -1
- data/rbi/metronome_sdk/internal/util.rbi +1 -1
- data/rbi/metronome_sdk/models/contract_v2.rbi +603 -10
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +2 -2
- data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +250 -6
- data/rbi/metronome_sdk/models/payment_gate_config.rbi +5 -0
- data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +5 -0
- data/rbi/metronome_sdk/models/subscription.rbi +175 -0
- data/rbi/metronome_sdk/models/v1/alert_archive_params.rbi +6 -4
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +51 -47
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +257 -4
- data/rbi/metronome_sdk/models/v1/customer_detail.rbi +8 -0
- data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +6 -21
- data/rbi/metronome_sdk/models/v1/customer_preview_events_response.rbi +10 -9
- data/rbi/metronome_sdk/models/v1/customers/alert_list_params.rbi +4 -4
- data/rbi/metronome_sdk/models/v1/customers/alert_reset_params.rbi +2 -2
- data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +14 -14
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +48 -44
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +246 -58
- data/rbi/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rbi +50 -0
- data/rbi/metronome_sdk/models/v1/payment.rbi +316 -0
- data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +48 -0
- data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +35 -0
- data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +48 -0
- data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +35 -0
- data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +91 -0
- data/rbi/metronome_sdk/models/v1/payment_status.rbi +33 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +18 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +18 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +498 -6
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +462 -14
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +68 -64
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +4 -3
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +73 -54
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +36 -0
- data/rbi/metronome_sdk/resources/v1/customers.rbi +7 -4
- data/rbi/metronome_sdk/resources/v1/payments.rbi +72 -0
- data/rbi/metronome_sdk/resources/v1/usage.rbi +4 -2
- data/rbi/metronome_sdk/resources/v1.rbi +3 -0
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +14 -0
- data/sig/metronome_sdk/errors.rbs +7 -0
- data/sig/metronome_sdk/file_part.rbs +1 -1
- data/sig/metronome_sdk/models/contract_v2.rbs +239 -12
- data/sig/metronome_sdk/models/hierarchy_configuration.rbs +87 -6
- data/sig/metronome_sdk/models/payment_gate_config.rbs +2 -1
- data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +2 -1
- data/sig/metronome_sdk/models/subscription.rbs +80 -0
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +2 -1
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +91 -5
- data/sig/metronome_sdk/models/v1/customer_detail.rbs +5 -0
- data/sig/metronome_sdk/models/v1/customer_preview_events_params.rbs +0 -7
- data/sig/metronome_sdk/models/v1/customer_preview_events_response.rbs +6 -4
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +137 -24
- data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rbs +32 -0
- data/sig/metronome_sdk/models/v1/payment.rbs +191 -0
- data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +30 -0
- data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +30 -0
- data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/payment_list_params.rbs +56 -0
- data/sig/metronome_sdk/models/v1/payment_status.rbs +19 -0
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +9 -0
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +9 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +182 -7
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +221 -18
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +6 -0
- data/sig/metronome_sdk/resources/v1/payments.rbs +30 -0
- data/sig/metronome_sdk/resources/v1.rbs +2 -0
- data/sig/metronome_sdk/resources/v2/contracts.rbs +3 -0
- metadata +29 -2
|
@@ -9,41 +9,43 @@ module MetronomeSDK
|
|
|
9
9
|
include MetronomeSDK::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
11
|
# @!attribute alert_type
|
|
12
|
-
# Type of the
|
|
12
|
+
# Type of the threshold notification
|
|
13
13
|
#
|
|
14
14
|
# @return [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType]
|
|
15
15
|
required :alert_type, enum: -> { MetronomeSDK::V1::AlertCreateParams::AlertType }
|
|
16
16
|
|
|
17
17
|
# @!attribute name
|
|
18
|
-
# Name of the
|
|
18
|
+
# Name of the threshold notification
|
|
19
19
|
#
|
|
20
20
|
# @return [String]
|
|
21
21
|
required :name, String
|
|
22
22
|
|
|
23
23
|
# @!attribute threshold
|
|
24
|
-
# Threshold value of the
|
|
25
|
-
# may represent a financial amount, the days remaining, or a
|
|
24
|
+
# Threshold value of the notification policy. Depending upon the notification
|
|
25
|
+
# type, this number may represent a financial amount, the days remaining, or a
|
|
26
|
+
# percentage reached.
|
|
26
27
|
#
|
|
27
28
|
# @return [Float]
|
|
28
29
|
required :threshold, Float
|
|
29
30
|
|
|
30
31
|
# @!attribute billable_metric_id
|
|
31
|
-
# For
|
|
32
|
-
# track the usage for.
|
|
32
|
+
# For threshold notifications of type `usage_threshold_reached`, specifies which
|
|
33
|
+
# billable metric to track the usage for.
|
|
33
34
|
#
|
|
34
35
|
# @return [String, nil]
|
|
35
36
|
optional :billable_metric_id, String
|
|
36
37
|
|
|
37
38
|
# @!attribute credit_grant_type_filters
|
|
38
|
-
# An array of strings, representing a way to filter the credit grant this
|
|
39
|
-
# applies to, by looking at the credit_grant_type field on
|
|
40
|
-
# field is only defined for CreditPercentage and
|
|
39
|
+
# An array of strings, representing a way to filter the credit grant this
|
|
40
|
+
# threshold notification applies to, by looking at the credit_grant_type field on
|
|
41
|
+
# the credit grant. This field is only defined for CreditPercentage and
|
|
42
|
+
# CreditBalance notifications
|
|
41
43
|
#
|
|
42
44
|
# @return [Array<String>, nil]
|
|
43
45
|
optional :credit_grant_type_filters, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
44
46
|
|
|
45
47
|
# @!attribute credit_type_id
|
|
46
|
-
# ID of the credit's currency, defaults to USD. If the specific
|
|
48
|
+
# ID of the credit's currency, defaults to USD. If the specific notification type
|
|
47
49
|
# requires a pricing unit/currency, find the ID in the
|
|
48
50
|
# [Metronome app](https://app.metronome.com/offering/pricing-units).
|
|
49
51
|
#
|
|
@@ -51,46 +53,46 @@ module MetronomeSDK
|
|
|
51
53
|
optional :credit_type_id, String
|
|
52
54
|
|
|
53
55
|
# @!attribute custom_field_filters
|
|
54
|
-
# A list of custom field filters for
|
|
55
|
-
# Only present for contract invoices.
|
|
56
|
+
# A list of custom field filters for threshold notification types that support
|
|
57
|
+
# advanced filtering. Only present for contract invoices.
|
|
56
58
|
#
|
|
57
59
|
# @return [Array<MetronomeSDK::Models::V1::AlertCreateParams::CustomFieldFilter>, nil]
|
|
58
60
|
optional :custom_field_filters,
|
|
59
61
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::AlertCreateParams::CustomFieldFilter] }
|
|
60
62
|
|
|
61
63
|
# @!attribute customer_id
|
|
62
|
-
# If provided, will create this
|
|
63
|
-
#
|
|
64
|
+
# If provided, will create this threshold notification for this specific customer.
|
|
65
|
+
# To create a notification for all customers, do not specify a `customer_id`.
|
|
64
66
|
#
|
|
65
67
|
# @return [String, nil]
|
|
66
68
|
optional :customer_id, String
|
|
67
69
|
|
|
68
70
|
# @!attribute evaluate_on_create
|
|
69
|
-
# If true, the
|
|
70
|
-
#
|
|
71
|
-
# trigger the
|
|
71
|
+
# If true, the threshold notification will evaluate immediately on customers that
|
|
72
|
+
# already meet the notification threshold. If false, it will only evaluate on
|
|
73
|
+
# future customers that trigger the threshold. Defaults to true.
|
|
72
74
|
#
|
|
73
75
|
# @return [Boolean, nil]
|
|
74
76
|
optional :evaluate_on_create, MetronomeSDK::Internal::Type::Boolean
|
|
75
77
|
|
|
76
78
|
# @!attribute group_values
|
|
77
|
-
# Only present for `spend_threshold_reached`
|
|
78
|
-
# group key on individual line items.
|
|
79
|
+
# Only present for `spend_threshold_reached` notifications. Scope notification to
|
|
80
|
+
# a specific group key on individual line items.
|
|
79
81
|
#
|
|
80
82
|
# @return [Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>, nil]
|
|
81
83
|
optional :group_values,
|
|
82
84
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::AlertCreateParams::GroupValue] }
|
|
83
85
|
|
|
84
86
|
# @!attribute invoice_types_filter
|
|
85
|
-
# Only supported for invoice_total_reached
|
|
86
|
-
# evaluate.
|
|
87
|
+
# Only supported for invoice_total_reached threshold notifications. A list of
|
|
88
|
+
# invoice types to evaluate.
|
|
87
89
|
#
|
|
88
90
|
# @return [Array<String>, nil]
|
|
89
91
|
optional :invoice_types_filter, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
90
92
|
|
|
91
93
|
# @!attribute plan_id
|
|
92
|
-
# If provided, will create this
|
|
93
|
-
# for all customers, do not specify a `plan_id`.
|
|
94
|
+
# If provided, will create this threshold notification for this specific plan. To
|
|
95
|
+
# create a notification for all customers, do not specify a `plan_id`.
|
|
94
96
|
#
|
|
95
97
|
# @return [String, nil]
|
|
96
98
|
optional :plan_id, String
|
|
@@ -107,35 +109,35 @@ module MetronomeSDK
|
|
|
107
109
|
# Some parameter documentations has been truncated, see
|
|
108
110
|
# {MetronomeSDK::Models::V1::AlertCreateParams} for more details.
|
|
109
111
|
#
|
|
110
|
-
# @param alert_type [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType] Type of the
|
|
112
|
+
# @param alert_type [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType] Type of the threshold notification
|
|
111
113
|
#
|
|
112
|
-
# @param name [String] Name of the
|
|
114
|
+
# @param name [String] Name of the threshold notification
|
|
113
115
|
#
|
|
114
|
-
# @param threshold [Float] Threshold value of the
|
|
116
|
+
# @param threshold [Float] Threshold value of the notification policy. Depending upon the notification typ
|
|
115
117
|
#
|
|
116
|
-
# @param billable_metric_id [String] For
|
|
118
|
+
# @param billable_metric_id [String] For threshold notifications of type `usage_threshold_reached`, specifies which b
|
|
117
119
|
#
|
|
118
|
-
# @param credit_grant_type_filters [Array<String>] An array of strings, representing a way to filter the credit grant this
|
|
120
|
+
# @param credit_grant_type_filters [Array<String>] An array of strings, representing a way to filter the credit grant this threshol
|
|
119
121
|
#
|
|
120
|
-
# @param credit_type_id [String] ID of the credit's currency, defaults to USD. If the specific
|
|
122
|
+
# @param credit_type_id [String] ID of the credit's currency, defaults to USD. If the specific notification type
|
|
121
123
|
#
|
|
122
|
-
# @param custom_field_filters [Array<MetronomeSDK::Models::V1::AlertCreateParams::CustomFieldFilter>] A list of custom field filters for
|
|
124
|
+
# @param custom_field_filters [Array<MetronomeSDK::Models::V1::AlertCreateParams::CustomFieldFilter>] A list of custom field filters for threshold notification types that support adv
|
|
123
125
|
#
|
|
124
|
-
# @param customer_id [String] If provided, will create this
|
|
126
|
+
# @param customer_id [String] If provided, will create this threshold notification for this specific customer.
|
|
125
127
|
#
|
|
126
|
-
# @param evaluate_on_create [Boolean] If true, the
|
|
128
|
+
# @param evaluate_on_create [Boolean] If true, the threshold notification will evaluate immediately on customers that
|
|
127
129
|
#
|
|
128
|
-
# @param group_values [Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>] Only present for `spend_threshold_reached`
|
|
130
|
+
# @param group_values [Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>] Only present for `spend_threshold_reached` notifications. Scope notification to
|
|
129
131
|
#
|
|
130
|
-
# @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached
|
|
132
|
+
# @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached threshold notifications. A list of invo
|
|
131
133
|
#
|
|
132
|
-
# @param plan_id [String] If provided, will create this
|
|
134
|
+
# @param plan_id [String] If provided, will create this threshold notification for this specific plan. To
|
|
133
135
|
#
|
|
134
136
|
# @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
|
|
135
137
|
#
|
|
136
138
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
137
139
|
|
|
138
|
-
# Type of the
|
|
140
|
+
# Type of the threshold notification
|
|
139
141
|
module AlertType
|
|
140
142
|
extend MetronomeSDK::Internal::Type::Enum
|
|
141
143
|
|
|
@@ -927,6 +927,7 @@ module MetronomeSDK
|
|
|
927
927
|
NONE = :NONE
|
|
928
928
|
STRIPE = :STRIPE
|
|
929
929
|
ANROK = :ANROK
|
|
930
|
+
AVALARA = :AVALARA
|
|
930
931
|
PRECALCULATED = :PRECALCULATED
|
|
931
932
|
|
|
932
933
|
# @!method self.values
|
|
@@ -1347,11 +1348,43 @@ module MetronomeSDK
|
|
|
1347
1348
|
class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
|
1348
1349
|
# @!attribute parent
|
|
1349
1350
|
#
|
|
1350
|
-
# @return [MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::Parent]
|
|
1351
|
-
|
|
1351
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::Parent, nil]
|
|
1352
|
+
optional :parent, -> { MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::Parent }
|
|
1352
1353
|
|
|
1353
|
-
# @!
|
|
1354
|
+
# @!attribute parent_behavior
|
|
1355
|
+
#
|
|
1356
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::ParentBehavior, nil]
|
|
1357
|
+
optional :parent_behavior,
|
|
1358
|
+
-> { MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::ParentBehavior }
|
|
1359
|
+
|
|
1360
|
+
# @!attribute payer
|
|
1361
|
+
# Indicates whether the parent should pay for the child's invoice charges
|
|
1362
|
+
#
|
|
1363
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::Payer, nil]
|
|
1364
|
+
optional :payer, enum: -> { MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::Payer }
|
|
1365
|
+
|
|
1366
|
+
# @!attribute usage_statement_behavior
|
|
1367
|
+
# Indicates the behavior of the child's invoice statements on the parent's
|
|
1368
|
+
# invoices **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
1369
|
+
# consolidated invoices **SEPARATE**: Child's invoice statements will appear not
|
|
1370
|
+
# appear on parent's consolidated invoices
|
|
1371
|
+
#
|
|
1372
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::UsageStatementBehavior, nil]
|
|
1373
|
+
optional :usage_statement_behavior,
|
|
1374
|
+
enum: -> { MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::UsageStatementBehavior }
|
|
1375
|
+
|
|
1376
|
+
# @!method initialize(parent: nil, parent_behavior: nil, payer: nil, usage_statement_behavior: nil)
|
|
1377
|
+
# Some parameter documentations has been truncated, see
|
|
1378
|
+
# {MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration} for
|
|
1379
|
+
# more details.
|
|
1380
|
+
#
|
|
1354
1381
|
# @param parent [MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::Parent]
|
|
1382
|
+
#
|
|
1383
|
+
# @param parent_behavior [MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::ParentBehavior]
|
|
1384
|
+
#
|
|
1385
|
+
# @param payer [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::Payer] Indicates whether the parent should pay for the child's invoice charges
|
|
1386
|
+
#
|
|
1387
|
+
# @param usage_statement_behavior [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::UsageStatementBehavior] Indicates the behavior of the child's invoice statements on the parent's invoice
|
|
1355
1388
|
|
|
1356
1389
|
# @see MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration#parent
|
|
1357
1390
|
class Parent < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -1369,6 +1402,71 @@ module MetronomeSDK
|
|
|
1369
1402
|
# @param contract_id [String]
|
|
1370
1403
|
# @param customer_id [String]
|
|
1371
1404
|
end
|
|
1405
|
+
|
|
1406
|
+
# @see MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration#parent_behavior
|
|
1407
|
+
class ParentBehavior < MetronomeSDK::Internal::Type::BaseModel
|
|
1408
|
+
# @!attribute invoice_consolidation_type
|
|
1409
|
+
# Indicates the desired behavior of consolidated invoices generated by the parent
|
|
1410
|
+
# in a customer hierarchy **CONCATENATE**: Statements on the invoices of child
|
|
1411
|
+
# customers will be appended to the consolidated invoice **NONE**: Do not generate
|
|
1412
|
+
# consolidated invoices
|
|
1413
|
+
#
|
|
1414
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::ParentBehavior::InvoiceConsolidationType, nil]
|
|
1415
|
+
optional :invoice_consolidation_type,
|
|
1416
|
+
enum: -> { MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::ParentBehavior::InvoiceConsolidationType }
|
|
1417
|
+
|
|
1418
|
+
# @!method initialize(invoice_consolidation_type: nil)
|
|
1419
|
+
# Some parameter documentations has been truncated, see
|
|
1420
|
+
# {MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::ParentBehavior}
|
|
1421
|
+
# for more details.
|
|
1422
|
+
#
|
|
1423
|
+
# @param invoice_consolidation_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::ParentBehavior::InvoiceConsolidationType] Indicates the desired behavior of consolidated invoices generated by the parent
|
|
1424
|
+
|
|
1425
|
+
# Indicates the desired behavior of consolidated invoices generated by the parent
|
|
1426
|
+
# in a customer hierarchy **CONCATENATE**: Statements on the invoices of child
|
|
1427
|
+
# customers will be appended to the consolidated invoice **NONE**: Do not generate
|
|
1428
|
+
# consolidated invoices
|
|
1429
|
+
#
|
|
1430
|
+
# @see MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration::ParentBehavior#invoice_consolidation_type
|
|
1431
|
+
module InvoiceConsolidationType
|
|
1432
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1433
|
+
|
|
1434
|
+
CONCATENATE = :CONCATENATE
|
|
1435
|
+
NONE = :NONE
|
|
1436
|
+
|
|
1437
|
+
# @!method self.values
|
|
1438
|
+
# @return [Array<Symbol>]
|
|
1439
|
+
end
|
|
1440
|
+
end
|
|
1441
|
+
|
|
1442
|
+
# Indicates whether the parent should pay for the child's invoice charges
|
|
1443
|
+
#
|
|
1444
|
+
# @see MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration#payer
|
|
1445
|
+
module Payer
|
|
1446
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1447
|
+
|
|
1448
|
+
SELF = :SELF
|
|
1449
|
+
PARENT = :PARENT
|
|
1450
|
+
|
|
1451
|
+
# @!method self.values
|
|
1452
|
+
# @return [Array<Symbol>]
|
|
1453
|
+
end
|
|
1454
|
+
|
|
1455
|
+
# Indicates the behavior of the child's invoice statements on the parent's
|
|
1456
|
+
# invoices **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
1457
|
+
# consolidated invoices **SEPARATE**: Child's invoice statements will appear not
|
|
1458
|
+
# appear on parent's consolidated invoices
|
|
1459
|
+
#
|
|
1460
|
+
# @see MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration#usage_statement_behavior
|
|
1461
|
+
module UsageStatementBehavior
|
|
1462
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1463
|
+
|
|
1464
|
+
CONSOLIDATE = :CONSOLIDATE
|
|
1465
|
+
SEPARATE = :SEPARATE
|
|
1466
|
+
|
|
1467
|
+
# @!method self.values
|
|
1468
|
+
# @return [Array<Symbol>]
|
|
1469
|
+
end
|
|
1372
1470
|
end
|
|
1373
1471
|
|
|
1374
1472
|
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
@@ -47,6 +47,12 @@ module MetronomeSDK
|
|
|
47
47
|
# @return [String]
|
|
48
48
|
required :name, String
|
|
49
49
|
|
|
50
|
+
# @!attribute updated_at
|
|
51
|
+
# RFC 3339 timestamp indicating when the customer was last updated.
|
|
52
|
+
#
|
|
53
|
+
# @return [Time]
|
|
54
|
+
required :updated_at, Time
|
|
55
|
+
|
|
50
56
|
# @!attribute archived_at
|
|
51
57
|
# RFC 3339 timestamp indicating when the customer was archived. Null if the
|
|
52
58
|
# customer is active.
|
|
@@ -60,7 +66,7 @@ module MetronomeSDK
|
|
|
60
66
|
# @return [MetronomeSDK::Models::V1::CustomerDetail::CurrentBillableStatus, nil]
|
|
61
67
|
optional :current_billable_status, -> { MetronomeSDK::V1::CustomerDetail::CurrentBillableStatus }
|
|
62
68
|
|
|
63
|
-
# @!method initialize(id:, created_at:, custom_fields:, customer_config:, external_id:, ingest_aliases:, name:, archived_at: nil, current_billable_status: nil)
|
|
69
|
+
# @!method initialize(id:, created_at:, custom_fields:, customer_config:, external_id:, ingest_aliases:, name:, updated_at:, archived_at: nil, current_billable_status: nil)
|
|
64
70
|
# Some parameter documentations has been truncated, see
|
|
65
71
|
# {MetronomeSDK::Models::V1::CustomerDetail} for more details.
|
|
66
72
|
#
|
|
@@ -78,6 +84,8 @@ module MetronomeSDK
|
|
|
78
84
|
#
|
|
79
85
|
# @param name [String]
|
|
80
86
|
#
|
|
87
|
+
# @param updated_at [Time] RFC 3339 timestamp indicating when the customer was last updated.
|
|
88
|
+
#
|
|
81
89
|
# @param archived_at [Time, nil] RFC 3339 timestamp indicating when the customer was archived. Null if the custom
|
|
82
90
|
#
|
|
83
91
|
# @param current_billable_status [MetronomeSDK::Models::V1::CustomerDetail::CurrentBillableStatus] This field's availability is dependent on your client's configuration.
|
|
@@ -53,14 +53,6 @@ module MetronomeSDK
|
|
|
53
53
|
# @return [String]
|
|
54
54
|
required :event_type, String
|
|
55
55
|
|
|
56
|
-
# @!attribute customer_id
|
|
57
|
-
# This has no effect for preview events, but may be set for consistency with Event
|
|
58
|
-
# objects. They will be processed even if they do not match the customer's ID or
|
|
59
|
-
# ingest aliases.
|
|
60
|
-
#
|
|
61
|
-
# @return [String, nil]
|
|
62
|
-
optional :customer_id, String
|
|
63
|
-
|
|
64
56
|
# @!attribute properties
|
|
65
57
|
#
|
|
66
58
|
# @return [Hash{Symbol=>Object}, nil]
|
|
@@ -73,26 +65,24 @@ module MetronomeSDK
|
|
|
73
65
|
optional :timestamp, String
|
|
74
66
|
|
|
75
67
|
# @!attribute transaction_id
|
|
76
|
-
#
|
|
77
|
-
#
|
|
78
|
-
# request.
|
|
68
|
+
# Optional unique identifier for event deduplication. When provided, preview
|
|
69
|
+
# events are automatically deduplicated against historical events from the past 34
|
|
70
|
+
# days. Duplicate transaction IDs within the same request will return an error.
|
|
79
71
|
#
|
|
80
72
|
# @return [String, nil]
|
|
81
73
|
optional :transaction_id, String
|
|
82
74
|
|
|
83
|
-
# @!method initialize(event_type:,
|
|
75
|
+
# @!method initialize(event_type:, properties: nil, timestamp: nil, transaction_id: nil)
|
|
84
76
|
# Some parameter documentations has been truncated, see
|
|
85
77
|
# {MetronomeSDK::Models::V1::CustomerPreviewEventsParams::Event} for more details.
|
|
86
78
|
#
|
|
87
79
|
# @param event_type [String]
|
|
88
80
|
#
|
|
89
|
-
# @param customer_id [String] This has no effect for preview events, but may be set for consistency with Event
|
|
90
|
-
#
|
|
91
81
|
# @param properties [Hash{Symbol=>Object}]
|
|
92
82
|
#
|
|
93
83
|
# @param timestamp [String] RFC 3339 formatted. If not provided, the current time will be used.
|
|
94
84
|
#
|
|
95
|
-
# @param transaction_id [String]
|
|
85
|
+
# @param transaction_id [String] Optional unique identifier for event deduplication. When provided, preview event
|
|
96
86
|
end
|
|
97
87
|
|
|
98
88
|
# If set to "replace", the preview will be generated as if those were the only
|
|
@@ -7,11 +7,11 @@ module MetronomeSDK
|
|
|
7
7
|
class CustomerPreviewEventsResponse < MetronomeSDK::Internal::Type::BaseModel
|
|
8
8
|
# @!attribute data
|
|
9
9
|
#
|
|
10
|
-
# @return [MetronomeSDK::Models::V1::Customers::Invoice]
|
|
11
|
-
required :data, -> { MetronomeSDK::V1::Customers::Invoice }
|
|
10
|
+
# @return [Array<MetronomeSDK::Models::V1::Customers::Invoice>]
|
|
11
|
+
required :data, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::Invoice] }
|
|
12
12
|
|
|
13
13
|
# @!method initialize(data:)
|
|
14
|
-
# @param data [MetronomeSDK::Models::V1::Customers::Invoice]
|
|
14
|
+
# @param data [Array<MetronomeSDK::Models::V1::Customers::Invoice>]
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -22,8 +22,8 @@ module MetronomeSDK
|
|
|
22
22
|
optional :next_page, String
|
|
23
23
|
|
|
24
24
|
# @!attribute alert_statuses
|
|
25
|
-
# Optionally filter by
|
|
26
|
-
# returned.
|
|
25
|
+
# Optionally filter by threshold notification status. If absent, only enabled
|
|
26
|
+
# notifications will be returned.
|
|
27
27
|
#
|
|
28
28
|
# @return [Array<Symbol, MetronomeSDK::Models::V1::Customers::AlertListParams::AlertStatus>, nil]
|
|
29
29
|
optional :alert_statuses,
|
|
@@ -37,7 +37,7 @@ module MetronomeSDK
|
|
|
37
37
|
#
|
|
38
38
|
# @param next_page [String] Cursor that indicates where the next page of results should start.
|
|
39
39
|
#
|
|
40
|
-
# @param alert_statuses [Array<Symbol, MetronomeSDK::Models::V1::Customers::AlertListParams::AlertStatus>] Optionally filter by
|
|
40
|
+
# @param alert_statuses [Array<Symbol, MetronomeSDK::Models::V1::Customers::AlertListParams::AlertStatus>] Optionally filter by threshold notification status. If absent, only enabled noti
|
|
41
41
|
#
|
|
42
42
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
43
43
|
|
|
@@ -10,7 +10,7 @@ module MetronomeSDK
|
|
|
10
10
|
include MetronomeSDK::Internal::Type::RequestParameters
|
|
11
11
|
|
|
12
12
|
# @!attribute alert_id
|
|
13
|
-
# The Metronome ID of the
|
|
13
|
+
# The Metronome ID of the threshold notification
|
|
14
14
|
#
|
|
15
15
|
# @return [String]
|
|
16
16
|
required :alert_id, String
|
|
@@ -22,7 +22,7 @@ module MetronomeSDK
|
|
|
22
22
|
required :customer_id, String
|
|
23
23
|
|
|
24
24
|
# @!method initialize(alert_id:, customer_id:, request_options: {})
|
|
25
|
-
# @param alert_id [String] The Metronome ID of the
|
|
25
|
+
# @param alert_id [String] The Metronome ID of the threshold notification
|
|
26
26
|
#
|
|
27
27
|
# @param customer_id [String] The Metronome ID of the customer
|
|
28
28
|
#
|
|
@@ -10,7 +10,7 @@ module MetronomeSDK
|
|
|
10
10
|
include MetronomeSDK::Internal::Type::RequestParameters
|
|
11
11
|
|
|
12
12
|
# @!attribute alert_id
|
|
13
|
-
# The Metronome ID of the
|
|
13
|
+
# The Metronome ID of the threshold notification
|
|
14
14
|
#
|
|
15
15
|
# @return [String]
|
|
16
16
|
required :alert_id, String
|
|
@@ -22,16 +22,16 @@ module MetronomeSDK
|
|
|
22
22
|
required :customer_id, String
|
|
23
23
|
|
|
24
24
|
# @!attribute group_values
|
|
25
|
-
# Only present for `spend_threshold_reached`
|
|
26
|
-
# specific group key-value pair.
|
|
25
|
+
# Only present for `spend_threshold_reached` notifications. Retrieve the
|
|
26
|
+
# notification for a specific group key-value pair.
|
|
27
27
|
#
|
|
28
28
|
# @return [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::GroupValue>, nil]
|
|
29
29
|
optional :group_values,
|
|
30
30
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::AlertRetrieveParams::GroupValue] }
|
|
31
31
|
|
|
32
32
|
# @!attribute plans_or_contracts
|
|
33
|
-
# When parallel
|
|
34
|
-
# fetch
|
|
33
|
+
# When parallel threshold notifications are enabled during migration, this flag
|
|
34
|
+
# denotes whether to fetch notifications for plans or contracts.
|
|
35
35
|
#
|
|
36
36
|
# @return [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts, nil]
|
|
37
37
|
optional :plans_or_contracts,
|
|
@@ -41,13 +41,13 @@ module MetronomeSDK
|
|
|
41
41
|
# Some parameter documentations has been truncated, see
|
|
42
42
|
# {MetronomeSDK::Models::V1::Customers::AlertRetrieveParams} for more details.
|
|
43
43
|
#
|
|
44
|
-
# @param alert_id [String] The Metronome ID of the
|
|
44
|
+
# @param alert_id [String] The Metronome ID of the threshold notification
|
|
45
45
|
#
|
|
46
46
|
# @param customer_id [String] The Metronome ID of the customer
|
|
47
47
|
#
|
|
48
|
-
# @param group_values [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::GroupValue>] Only present for `spend_threshold_reached`
|
|
48
|
+
# @param group_values [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::GroupValue>] Only present for `spend_threshold_reached` notifications. Retrieve the notificat
|
|
49
49
|
#
|
|
50
|
-
# @param plans_or_contracts [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts] When parallel
|
|
50
|
+
# @param plans_or_contracts [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts] When parallel threshold notifications are enabled during migration, this flag de
|
|
51
51
|
#
|
|
52
52
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
53
53
|
|
|
@@ -63,15 +63,15 @@ module MetronomeSDK
|
|
|
63
63
|
required :value, String
|
|
64
64
|
|
|
65
65
|
# @!method initialize(key:, value:)
|
|
66
|
-
# Scopes
|
|
67
|
-
# items. Only present for spend
|
|
66
|
+
# Scopes threshold notification evaluation to a specific presentation group key on
|
|
67
|
+
# individual line items. Only present for spend notifications.
|
|
68
68
|
#
|
|
69
69
|
# @param key [String]
|
|
70
70
|
# @param value [String]
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
-
# When parallel
|
|
74
|
-
# fetch
|
|
73
|
+
# When parallel threshold notifications are enabled during migration, this flag
|
|
74
|
+
# denotes whether to fetch notifications for plans or contracts.
|
|
75
75
|
module PlansOrContracts
|
|
76
76
|
extend MetronomeSDK::Internal::Type::Enum
|
|
77
77
|
|