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
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see MetronomeSDK::Resources::V1::Payments#cancel
|
|
7
|
+
class PaymentCancelParams < MetronomeSDK::Internal::Type::BaseModel
|
|
8
|
+
extend MetronomeSDK::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include MetronomeSDK::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute customer_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :customer_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute invoice_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :invoice_id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(customer_id:, invoice_id:, request_options: {})
|
|
22
|
+
# @param customer_id [String]
|
|
23
|
+
# @param invoice_id [String]
|
|
24
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see MetronomeSDK::Resources::V1::Payments#cancel
|
|
7
|
+
class PaymentCancelResponse < MetronomeSDK::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
#
|
|
10
|
+
# @return [MetronomeSDK::Models::V1::Payment]
|
|
11
|
+
required :data, -> { MetronomeSDK::V1::Payment }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(data:)
|
|
14
|
+
# @param data [MetronomeSDK::Models::V1::Payment]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see MetronomeSDK::Resources::V1::Payments#list
|
|
7
|
+
class PaymentListParams < MetronomeSDK::Internal::Type::BaseModel
|
|
8
|
+
extend MetronomeSDK::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include MetronomeSDK::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute customer_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :customer_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute invoice_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :invoice_id, String
|
|
20
|
+
|
|
21
|
+
# @!attribute limit
|
|
22
|
+
# The maximum number of payments to return. Defaults to 25.
|
|
23
|
+
#
|
|
24
|
+
# @return [Integer, nil]
|
|
25
|
+
optional :limit, Integer
|
|
26
|
+
|
|
27
|
+
# @!attribute next_page
|
|
28
|
+
# The next page token from a previous response.
|
|
29
|
+
#
|
|
30
|
+
# @return [String, nil]
|
|
31
|
+
optional :next_page, String
|
|
32
|
+
|
|
33
|
+
# @!attribute statuses
|
|
34
|
+
#
|
|
35
|
+
# @return [Array<Symbol, MetronomeSDK::Models::V1::PaymentStatus>, nil]
|
|
36
|
+
optional :statuses, -> { MetronomeSDK::Internal::Type::ArrayOf[enum: MetronomeSDK::V1::PaymentStatus] }
|
|
37
|
+
|
|
38
|
+
# @!method initialize(customer_id:, invoice_id:, limit: nil, next_page: nil, statuses: nil, request_options: {})
|
|
39
|
+
# @param customer_id [String]
|
|
40
|
+
#
|
|
41
|
+
# @param invoice_id [String]
|
|
42
|
+
#
|
|
43
|
+
# @param limit [Integer] The maximum number of payments to return. Defaults to 25.
|
|
44
|
+
#
|
|
45
|
+
# @param next_page [String] The next page token from a previous response.
|
|
46
|
+
#
|
|
47
|
+
# @param statuses [Array<Symbol, MetronomeSDK::Models::V1::PaymentStatus>]
|
|
48
|
+
#
|
|
49
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
module PaymentStatus
|
|
7
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
PENDING = :pending
|
|
10
|
+
REQUIRES_INTERVENTION = :requires_intervention
|
|
11
|
+
PAID = :paid
|
|
12
|
+
CANCELED = :canceled
|
|
13
|
+
|
|
14
|
+
# @!method self.values
|
|
15
|
+
# @return [Array<Symbol>]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -41,6 +41,12 @@ module MetronomeSDK
|
|
|
41
41
|
# @return [Array<String>, nil]
|
|
42
42
|
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
|
|
43
43
|
|
|
44
|
+
# @!attribute hierarchy_configuration
|
|
45
|
+
# Optional configuration for commit hierarchy access control
|
|
46
|
+
#
|
|
47
|
+
# @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
|
|
48
|
+
optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
|
|
49
|
+
|
|
44
50
|
# @!attribute invoice_contract_id
|
|
45
51
|
# ID of contract to use for invoicing
|
|
46
52
|
#
|
|
@@ -85,7 +91,7 @@ module MetronomeSDK
|
|
|
85
91
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
|
|
86
92
|
nil?: true
|
|
87
93
|
|
|
88
|
-
# @!method initialize(commit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, invoice_contract_id: nil, invoice_schedule: nil, priority: nil, product_id: nil, rate_type: nil, specifiers: nil, request_options: {})
|
|
94
|
+
# @!method initialize(commit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, invoice_contract_id: nil, invoice_schedule: nil, priority: nil, product_id: nil, rate_type: nil, specifiers: nil, request_options: {})
|
|
89
95
|
# Some parameter documentations has been truncated, see
|
|
90
96
|
# {MetronomeSDK::Models::V2::ContractEditCommitParams} for more details.
|
|
91
97
|
#
|
|
@@ -99,6 +105,8 @@ module MetronomeSDK
|
|
|
99
105
|
#
|
|
100
106
|
# @param applicable_product_tags [Array<String>, nil] Which tags the commit applies to. If applicable*product_ids, applicable_product*
|
|
101
107
|
#
|
|
108
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
|
|
109
|
+
#
|
|
102
110
|
# @param invoice_contract_id [String] ID of contract to use for invoicing
|
|
103
111
|
#
|
|
104
112
|
# @param invoice_schedule [MetronomeSDK::Models::V2::ContractEditCommitParams::InvoiceSchedule]
|
|
@@ -39,6 +39,12 @@ module MetronomeSDK
|
|
|
39
39
|
# @return [Array<String>, nil]
|
|
40
40
|
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
|
|
41
41
|
|
|
42
|
+
# @!attribute hierarchy_configuration
|
|
43
|
+
# Optional configuration for credit hierarchy access control
|
|
44
|
+
#
|
|
45
|
+
# @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
|
|
46
|
+
optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
|
|
47
|
+
|
|
42
48
|
# @!attribute priority
|
|
43
49
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
44
50
|
# first.
|
|
@@ -72,7 +78,7 @@ module MetronomeSDK
|
|
|
72
78
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
|
|
73
79
|
nil?: true
|
|
74
80
|
|
|
75
|
-
# @!method initialize(credit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, priority: nil, product_id: nil, rate_type: nil, specifiers: nil, request_options: {})
|
|
81
|
+
# @!method initialize(credit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, priority: nil, product_id: nil, rate_type: nil, specifiers: nil, request_options: {})
|
|
76
82
|
# Some parameter documentations has been truncated, see
|
|
77
83
|
# {MetronomeSDK::Models::V2::ContractEditCreditParams} for more details.
|
|
78
84
|
#
|
|
@@ -86,6 +92,8 @@ module MetronomeSDK
|
|
|
86
92
|
#
|
|
87
93
|
# @param applicable_product_tags [Array<String>, nil] Which tags the credit applies to. If both applicable*product_ids and applicable*
|
|
88
94
|
#
|
|
95
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for credit hierarchy access control
|
|
96
|
+
#
|
|
89
97
|
# @param priority [Float, nil] If multiple commits are applicable, the one with the lower priority will apply f
|
|
90
98
|
#
|
|
91
99
|
# @param product_id [String]
|
|
@@ -20,6 +20,15 @@ module MetronomeSDK
|
|
|
20
20
|
# @return [String]
|
|
21
21
|
required :customer_id, String
|
|
22
22
|
|
|
23
|
+
# @!attribute add_billing_provider_configuration_update
|
|
24
|
+
# Update the billing provider configuration on the contract. Currently only
|
|
25
|
+
# supports adding a billing provider configuration to a contract that does not
|
|
26
|
+
# already have one.
|
|
27
|
+
#
|
|
28
|
+
# @return [MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate, nil]
|
|
29
|
+
optional :add_billing_provider_configuration_update,
|
|
30
|
+
-> { MetronomeSDK::V2::ContractEditParams::AddBillingProviderConfigurationUpdate }
|
|
31
|
+
|
|
23
32
|
# @!attribute add_commits
|
|
24
33
|
#
|
|
25
34
|
# @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCommit>, nil]
|
|
@@ -206,7 +215,7 @@ module MetronomeSDK
|
|
|
206
215
|
optional :update_subscriptions,
|
|
207
216
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateSubscription] }
|
|
208
217
|
|
|
209
|
-
# @!method initialize(contract_id:, customer_id:, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_prepaid_balance_threshold_configuration: nil, add_professional_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_scheduled_charges: nil, add_spend_threshold_configuration: nil, add_subscriptions: nil, allow_contract_ending_before_finalized_invoice: nil, archive_commits: nil, archive_credits: nil, archive_scheduled_charges: nil, remove_overrides: nil, uniqueness_key: nil, update_commits: nil, update_contract_end_date: nil, update_contract_name: nil, update_credits: nil, update_prepaid_balance_threshold_configuration: nil, update_recurring_commits: nil, update_recurring_credits: nil, update_scheduled_charges: nil, update_spend_threshold_configuration: nil, update_subscriptions: nil, request_options: {})
|
|
218
|
+
# @!method initialize(contract_id:, customer_id:, add_billing_provider_configuration_update: nil, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_prepaid_balance_threshold_configuration: nil, add_professional_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_scheduled_charges: nil, add_spend_threshold_configuration: nil, add_subscriptions: nil, allow_contract_ending_before_finalized_invoice: nil, archive_commits: nil, archive_credits: nil, archive_scheduled_charges: nil, remove_overrides: nil, uniqueness_key: nil, update_commits: nil, update_contract_end_date: nil, update_contract_name: nil, update_credits: nil, update_prepaid_balance_threshold_configuration: nil, update_recurring_commits: nil, update_recurring_credits: nil, update_scheduled_charges: nil, update_spend_threshold_configuration: nil, update_subscriptions: nil, request_options: {})
|
|
210
219
|
# Some parameter documentations has been truncated, see
|
|
211
220
|
# {MetronomeSDK::Models::V2::ContractEditParams} for more details.
|
|
212
221
|
#
|
|
@@ -214,6 +223,8 @@ module MetronomeSDK
|
|
|
214
223
|
#
|
|
215
224
|
# @param customer_id [String] ID of the customer whose contract is being edited
|
|
216
225
|
#
|
|
226
|
+
# @param add_billing_provider_configuration_update [MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate] Update the billing provider configuration on the contract. Currently only suppor
|
|
227
|
+
#
|
|
217
228
|
# @param add_commits [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCommit>]
|
|
218
229
|
#
|
|
219
230
|
# @param add_credits [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCredit>]
|
|
@@ -272,6 +283,118 @@ module MetronomeSDK
|
|
|
272
283
|
#
|
|
273
284
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
274
285
|
|
|
286
|
+
class AddBillingProviderConfigurationUpdate < MetronomeSDK::Internal::Type::BaseModel
|
|
287
|
+
# @!attribute billing_provider_configuration
|
|
288
|
+
#
|
|
289
|
+
# @return [MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration]
|
|
290
|
+
required :billing_provider_configuration,
|
|
291
|
+
-> { MetronomeSDK::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration }
|
|
292
|
+
|
|
293
|
+
# @!attribute schedule
|
|
294
|
+
# Indicates when the billing provider will be active on the contract. Any charges
|
|
295
|
+
# accrued during the schedule will be billed to the indicated billing provider.
|
|
296
|
+
#
|
|
297
|
+
# @return [MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::Schedule]
|
|
298
|
+
required :schedule,
|
|
299
|
+
-> { MetronomeSDK::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::Schedule }
|
|
300
|
+
|
|
301
|
+
# @!method initialize(billing_provider_configuration:, schedule:)
|
|
302
|
+
# Some parameter documentations has been truncated, see
|
|
303
|
+
# {MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate}
|
|
304
|
+
# for more details.
|
|
305
|
+
#
|
|
306
|
+
# Update the billing provider configuration on the contract. Currently only
|
|
307
|
+
# supports adding a billing provider configuration to a contract that does not
|
|
308
|
+
# already have one.
|
|
309
|
+
#
|
|
310
|
+
# @param billing_provider_configuration [MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration]
|
|
311
|
+
#
|
|
312
|
+
# @param schedule [MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::Schedule] Indicates when the billing provider will be active on the contract. Any charges
|
|
313
|
+
|
|
314
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate#billing_provider_configuration
|
|
315
|
+
class BillingProviderConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
|
316
|
+
# @!attribute billing_provider
|
|
317
|
+
#
|
|
318
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration::BillingProvider, nil]
|
|
319
|
+
optional :billing_provider,
|
|
320
|
+
enum: -> { MetronomeSDK::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration::BillingProvider }
|
|
321
|
+
|
|
322
|
+
# @!attribute billing_provider_configuration_id
|
|
323
|
+
#
|
|
324
|
+
# @return [String, nil]
|
|
325
|
+
optional :billing_provider_configuration_id, String
|
|
326
|
+
|
|
327
|
+
# @!attribute delivery_method
|
|
328
|
+
#
|
|
329
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration::DeliveryMethod, nil]
|
|
330
|
+
optional :delivery_method,
|
|
331
|
+
enum: -> { MetronomeSDK::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration::DeliveryMethod }
|
|
332
|
+
|
|
333
|
+
# @!method initialize(billing_provider: nil, billing_provider_configuration_id: nil, delivery_method: nil)
|
|
334
|
+
# @param billing_provider [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration::BillingProvider]
|
|
335
|
+
# @param billing_provider_configuration_id [String]
|
|
336
|
+
# @param delivery_method [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration::DeliveryMethod]
|
|
337
|
+
|
|
338
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration#billing_provider
|
|
339
|
+
module BillingProvider
|
|
340
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
341
|
+
|
|
342
|
+
AWS_MARKETPLACE = :aws_marketplace
|
|
343
|
+
STRIPE = :stripe
|
|
344
|
+
NETSUITE = :netsuite
|
|
345
|
+
CUSTOM = :custom
|
|
346
|
+
AZURE_MARKETPLACE = :azure_marketplace
|
|
347
|
+
QUICKBOOKS_ONLINE = :quickbooks_online
|
|
348
|
+
WORKDAY = :workday
|
|
349
|
+
GCP_MARKETPLACE = :gcp_marketplace
|
|
350
|
+
|
|
351
|
+
# @!method self.values
|
|
352
|
+
# @return [Array<Symbol>]
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration#delivery_method
|
|
356
|
+
module DeliveryMethod
|
|
357
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
358
|
+
|
|
359
|
+
DIRECT_TO_BILLING_PROVIDER = :direct_to_billing_provider
|
|
360
|
+
AWS_SQS = :aws_sqs
|
|
361
|
+
TACKLE = :tackle
|
|
362
|
+
AWS_SNS = :aws_sns
|
|
363
|
+
|
|
364
|
+
# @!method self.values
|
|
365
|
+
# @return [Array<Symbol>]
|
|
366
|
+
end
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate#schedule
|
|
370
|
+
class Schedule < MetronomeSDK::Internal::Type::BaseModel
|
|
371
|
+
# @!attribute effective_at
|
|
372
|
+
# When the billing provider update will take effect.
|
|
373
|
+
#
|
|
374
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::Schedule::EffectiveAt]
|
|
375
|
+
required :effective_at,
|
|
376
|
+
enum: -> { MetronomeSDK::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::Schedule::EffectiveAt }
|
|
377
|
+
|
|
378
|
+
# @!method initialize(effective_at:)
|
|
379
|
+
# Indicates when the billing provider will be active on the contract. Any charges
|
|
380
|
+
# accrued during the schedule will be billed to the indicated billing provider.
|
|
381
|
+
#
|
|
382
|
+
# @param effective_at [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::Schedule::EffectiveAt] When the billing provider update will take effect.
|
|
383
|
+
|
|
384
|
+
# When the billing provider update will take effect.
|
|
385
|
+
#
|
|
386
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::Schedule#effective_at
|
|
387
|
+
module EffectiveAt
|
|
388
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
389
|
+
|
|
390
|
+
START_OF_CURRENT_PERIOD = :START_OF_CURRENT_PERIOD
|
|
391
|
+
|
|
392
|
+
# @!method self.values
|
|
393
|
+
# @return [Array<Symbol>]
|
|
394
|
+
end
|
|
395
|
+
end
|
|
396
|
+
end
|
|
397
|
+
|
|
275
398
|
class AddCommit < MetronomeSDK::Internal::Type::BaseModel
|
|
276
399
|
# @!attribute product_id
|
|
277
400
|
#
|
|
@@ -850,6 +973,7 @@ module MetronomeSDK
|
|
|
850
973
|
NONE = :NONE
|
|
851
974
|
STRIPE = :STRIPE
|
|
852
975
|
ANROK = :ANROK
|
|
976
|
+
AVALARA = :AVALARA
|
|
853
977
|
PRECALCULATED = :PRECALCULATED
|
|
854
978
|
|
|
855
979
|
# @!method self.values
|
|
@@ -3607,11 +3731,27 @@ module MetronomeSDK
|
|
|
3607
3731
|
optional :invoice_amount,
|
|
3608
3732
|
-> { MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::InvoiceAmount }
|
|
3609
3733
|
|
|
3610
|
-
# @!
|
|
3734
|
+
# @!attribute rate_type
|
|
3735
|
+
# If provided, updates the recurring commit to use the specified rate type when
|
|
3736
|
+
# generating future commits.
|
|
3737
|
+
#
|
|
3738
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCommit::RateType, nil]
|
|
3739
|
+
optional :rate_type, enum: -> { MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::RateType }
|
|
3740
|
+
|
|
3741
|
+
# @!method initialize(recurring_commit_id:, access_amount: nil, ending_before: nil, invoice_amount: nil, rate_type: nil)
|
|
3742
|
+
# Some parameter documentations has been truncated, see
|
|
3743
|
+
# {MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCommit} for more
|
|
3744
|
+
# details.
|
|
3745
|
+
#
|
|
3611
3746
|
# @param recurring_commit_id [String]
|
|
3747
|
+
#
|
|
3612
3748
|
# @param access_amount [MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCommit::AccessAmount]
|
|
3749
|
+
#
|
|
3613
3750
|
# @param ending_before [Time, nil]
|
|
3751
|
+
#
|
|
3614
3752
|
# @param invoice_amount [MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCommit::InvoiceAmount]
|
|
3753
|
+
#
|
|
3754
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCommit::RateType] If provided, updates the recurring commit to use the specified rate type when ge
|
|
3615
3755
|
|
|
3616
3756
|
# @see MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCommit#access_amount
|
|
3617
3757
|
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -3646,6 +3786,20 @@ module MetronomeSDK
|
|
|
3646
3786
|
# @param quantity [Float]
|
|
3647
3787
|
# @param unit_price [Float]
|
|
3648
3788
|
end
|
|
3789
|
+
|
|
3790
|
+
# If provided, updates the recurring commit to use the specified rate type when
|
|
3791
|
+
# generating future commits.
|
|
3792
|
+
#
|
|
3793
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCommit#rate_type
|
|
3794
|
+
module RateType
|
|
3795
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3796
|
+
|
|
3797
|
+
LIST_RATE = :LIST_RATE
|
|
3798
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
3799
|
+
|
|
3800
|
+
# @!method self.values
|
|
3801
|
+
# @return [Array<Symbol>]
|
|
3802
|
+
end
|
|
3649
3803
|
end
|
|
3650
3804
|
|
|
3651
3805
|
class UpdateRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -3664,10 +3818,25 @@ module MetronomeSDK
|
|
|
3664
3818
|
# @return [Time, nil]
|
|
3665
3819
|
optional :ending_before, Time, nil?: true
|
|
3666
3820
|
|
|
3667
|
-
# @!
|
|
3821
|
+
# @!attribute rate_type
|
|
3822
|
+
# If provided, updates the recurring credit to use the specified rate type when
|
|
3823
|
+
# generating future credits.
|
|
3824
|
+
#
|
|
3825
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCredit::RateType, nil]
|
|
3826
|
+
optional :rate_type, enum: -> { MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::RateType }
|
|
3827
|
+
|
|
3828
|
+
# @!method initialize(recurring_credit_id:, access_amount: nil, ending_before: nil, rate_type: nil)
|
|
3829
|
+
# Some parameter documentations has been truncated, see
|
|
3830
|
+
# {MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCredit} for more
|
|
3831
|
+
# details.
|
|
3832
|
+
#
|
|
3668
3833
|
# @param recurring_credit_id [String]
|
|
3834
|
+
#
|
|
3669
3835
|
# @param access_amount [MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCredit::AccessAmount]
|
|
3836
|
+
#
|
|
3670
3837
|
# @param ending_before [Time, nil]
|
|
3838
|
+
#
|
|
3839
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCredit::RateType] If provided, updates the recurring credit to use the specified rate type when ge
|
|
3671
3840
|
|
|
3672
3841
|
# @see MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCredit#access_amount
|
|
3673
3842
|
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -3685,6 +3854,20 @@ module MetronomeSDK
|
|
|
3685
3854
|
# @param quantity [Float]
|
|
3686
3855
|
# @param unit_price [Float]
|
|
3687
3856
|
end
|
|
3857
|
+
|
|
3858
|
+
# If provided, updates the recurring credit to use the specified rate type when
|
|
3859
|
+
# generating future credits.
|
|
3860
|
+
#
|
|
3861
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCredit#rate_type
|
|
3862
|
+
module RateType
|
|
3863
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3864
|
+
|
|
3865
|
+
LIST_RATE = :LIST_RATE
|
|
3866
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
3867
|
+
|
|
3868
|
+
# @!method self.values
|
|
3869
|
+
# @return [Array<Symbol>]
|
|
3870
|
+
end
|
|
3688
3871
|
end
|
|
3689
3872
|
|
|
3690
3873
|
class UpdateScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
|