orb-billing 1.43.0 → 1.44.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 +8 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +6 -0
- data/lib/orb/models/alert_create_for_plan_params.rb +156 -0
- data/lib/orb/models/dimensional_price_groups/price_create_params.rb +147 -0
- data/lib/orb/models/dimensional_price_groups/price_create_response.rb +19 -0
- data/lib/orb/models/dimensional_price_groups/price_list_params.rb +65 -0
- data/lib/orb/models/plan_created_webhook_event.rb +91 -0
- data/lib/orb/models/plan_edited_webhook_event.rb +131 -0
- data/lib/orb/models/tax_amount.rb +32 -1
- data/lib/orb/models/unwrap_webhook_event.rb +7 -1
- data/lib/orb/models/webhook_endpoint.rb +56 -0
- data/lib/orb/models/webhook_endpoint_create_params.rb +34 -0
- data/lib/orb/models/webhook_endpoint_delete_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_disable_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_enable_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_list_params.rb +34 -0
- data/lib/orb/models/webhook_endpoint_retrieve_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_update_params.rb +41 -0
- data/lib/orb/models/webhook_endpoint_with_secret.rb +65 -0
- data/lib/orb/models.rb +24 -0
- data/lib/orb/resources/alerts.rb +55 -0
- data/lib/orb/resources/dimensional_price_groups/prices.rb +87 -0
- data/lib/orb/resources/dimensional_price_groups.rb +4 -0
- data/lib/orb/resources/webhook_endpoints.rb +183 -0
- data/lib/orb/resources/webhooks.rb +1 -1
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +17 -0
- data/rbi/orb/client.rbi +5 -0
- data/rbi/orb/models/alert_create_for_plan_params.rbi +290 -0
- data/rbi/orb/models/dimensional_price_groups/price_create_params.rbi +298 -0
- data/rbi/orb/models/dimensional_price_groups/price_create_response.rbi +76 -0
- data/rbi/orb/models/dimensional_price_groups/price_list_params.rbi +134 -0
- data/rbi/orb/models/plan_created_webhook_event.rbi +140 -0
- data/rbi/orb/models/plan_edited_webhook_event.rbi +259 -0
- data/rbi/orb/models/tax_amount.rbi +41 -3
- data/rbi/orb/models/unwrap_webhook_event.rbi +2 -0
- data/rbi/orb/models/webhook_endpoint.rbi +71 -0
- data/rbi/orb/models/webhook_endpoint_create_params.rbi +53 -0
- data/rbi/orb/models/webhook_endpoint_delete_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_disable_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_enable_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_list_params.rbi +56 -0
- data/rbi/orb/models/webhook_endpoint_retrieve_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_update_params.rbi +59 -0
- data/rbi/orb/models/webhook_endpoint_with_secret.rbi +83 -0
- data/rbi/orb/models.rbi +24 -0
- data/rbi/orb/resources/alerts.rbi +59 -0
- data/rbi/orb/resources/dimensional_price_groups/prices.rbi +82 -0
- data/rbi/orb/resources/dimensional_price_groups.rbi +3 -0
- data/rbi/orb/resources/webhook_endpoints.rbi +116 -0
- data/rbi/orb/resources/webhooks.rbi +2 -0
- data/sig/orb/client.rbs +2 -0
- data/sig/orb/models/alert_create_for_plan_params.rbs +126 -0
- data/sig/orb/models/dimensional_price_groups/price_create_params.rbs +123 -0
- data/sig/orb/models/dimensional_price_groups/price_create_response.rbs +15 -0
- data/sig/orb/models/dimensional_price_groups/price_list_params.rbs +61 -0
- data/sig/orb/models/plan_created_webhook_event.rbs +72 -0
- data/sig/orb/models/plan_edited_webhook_event.rbs +116 -0
- data/sig/orb/models/tax_amount.rbs +31 -3
- data/sig/orb/models/unwrap_webhook_event.rbs +2 -0
- data/sig/orb/models/webhook_endpoint.rbs +40 -0
- data/sig/orb/models/webhook_endpoint_create_params.rbs +28 -0
- data/sig/orb/models/webhook_endpoint_delete_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_disable_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_enable_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_list_params.rbs +30 -0
- data/sig/orb/models/webhook_endpoint_retrieve_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_update_params.rbs +36 -0
- data/sig/orb/models/webhook_endpoint_with_secret.rbs +45 -0
- data/sig/orb/models.rbs +24 -0
- data/sig/orb/resources/alerts.rbs +12 -0
- data/sig/orb/resources/dimensional_price_groups/prices.rbs +28 -0
- data/sig/orb/resources/dimensional_price_groups.rbs +2 -0
- data/sig/orb/resources/webhook_endpoints.rbs +46 -0
- data/sig/orb/resources/webhooks.rbs +2 -0
- metadata +52 -1
|
@@ -21,12 +21,43 @@ module Orb
|
|
|
21
21
|
# @return [String, nil]
|
|
22
22
|
required :tax_rate_percentage, String, nil?: true
|
|
23
23
|
|
|
24
|
-
# @!
|
|
24
|
+
# @!attribute tax_reason
|
|
25
|
+
# Why this tax was or was not charged, such as reverse_charge or customer_exempt.
|
|
26
|
+
# Null on tax calculated before reasons were recorded.
|
|
27
|
+
#
|
|
28
|
+
# @return [Symbol, Orb::Models::TaxAmount::TaxReason, nil]
|
|
29
|
+
optional :tax_reason, enum: -> { Orb::TaxAmount::TaxReason }, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!method initialize(amount:, tax_rate_description:, tax_rate_percentage:, tax_reason: nil)
|
|
32
|
+
# Some parameter documentations has been truncated, see {Orb::Models::TaxAmount}
|
|
33
|
+
# for more details.
|
|
34
|
+
#
|
|
25
35
|
# @param amount [String] The amount of additional tax incurred by this tax rate.
|
|
26
36
|
#
|
|
27
37
|
# @param tax_rate_description [String] The human-readable description of the applied tax rate.
|
|
28
38
|
#
|
|
29
39
|
# @param tax_rate_percentage [String, nil] The tax rate percentage, out of 100.
|
|
40
|
+
#
|
|
41
|
+
# @param tax_reason [Symbol, Orb::Models::TaxAmount::TaxReason, nil] Why this tax was or was not charged, such as reverse_charge or customer_exempt.
|
|
42
|
+
|
|
43
|
+
# Why this tax was or was not charged, such as reverse_charge or customer_exempt.
|
|
44
|
+
# Null on tax calculated before reasons were recorded.
|
|
45
|
+
#
|
|
46
|
+
# @see Orb::Models::TaxAmount#tax_reason
|
|
47
|
+
module TaxReason
|
|
48
|
+
extend Orb::Internal::Type::Enum
|
|
49
|
+
|
|
50
|
+
TAXED = :taxed
|
|
51
|
+
REVERSE_CHARGE = :reverse_charge
|
|
52
|
+
CUSTOMER_EXEMPT = :customer_exempt
|
|
53
|
+
PRODUCT_EXEMPT = :product_exempt
|
|
54
|
+
NOT_REGISTERED = :not_registered
|
|
55
|
+
ZERO_RATED = :zero_rated
|
|
56
|
+
NOT_TAXED_OTHER = :not_taxed_other
|
|
57
|
+
|
|
58
|
+
# @!method self.values
|
|
59
|
+
# @return [Array<Symbol>]
|
|
60
|
+
end
|
|
30
61
|
end
|
|
31
62
|
end
|
|
32
63
|
end
|
|
@@ -153,9 +153,15 @@ module Orb
|
|
|
153
153
|
# Issued when a payment method is deleted.
|
|
154
154
|
variant -> { Orb::PaymentMethodDeletedWebhookEvent }
|
|
155
155
|
|
|
156
|
+
# Issued when a plan is created, or when a draft plan is published.
|
|
157
|
+
variant -> { Orb::PlanCreatedWebhookEvent }
|
|
158
|
+
|
|
156
159
|
# Issued when a plan's default version is set.
|
|
157
160
|
variant -> { Orb::PlanDefaultVersionSetWebhookEvent }
|
|
158
161
|
|
|
162
|
+
# Issued when a plan's name, description, external plan ID, metadata or status is edited.
|
|
163
|
+
variant -> { Orb::PlanEditedWebhookEvent }
|
|
164
|
+
|
|
159
165
|
# Issued when a new plan version is created.
|
|
160
166
|
variant -> { Orb::PlanVersionCreatedWebhookEvent }
|
|
161
167
|
|
|
@@ -244,7 +250,7 @@ module Orb
|
|
|
244
250
|
variant -> { Orb::TransactionAccountingSyncSucceededWebhookEvent }
|
|
245
251
|
|
|
246
252
|
# @!method self.variants
|
|
247
|
-
# @return [Array(Orb::Models::BackfillReflectedWebhookEvent, Orb::Models::BackfillRevertedWebhookEvent, Orb::Models::BillableMetricEditedWebhookEvent, Orb::Models::CreditBlockAccountingSyncFailedWebhookEvent, Orb::Models::CreditBlockAccountingSyncSucceededWebhookEvent, Orb::Models::CreditNoteAccountingSyncFailedWebhookEvent, Orb::Models::CreditNoteAccountingSyncSucceededWebhookEvent, Orb::Models::CreditNoteIssuedWebhookEvent, Orb::Models::CreditNoteMarkedAsVoidWebhookEvent, Orb::Models::CustomerAccountingSyncFailedWebhookEvent, Orb::Models::CustomerAccountingSyncSucceededWebhookEvent, Orb::Models::CustomerBalanceTransactionCreatedWebhookEvent, Orb::Models::CustomerCreatedWebhookEvent, Orb::Models::CustomerCreditBalanceDepletedWebhookEvent, Orb::Models::CustomerCreditBalanceDroppedWebhookEvent, Orb::Models::CustomerCreditBalanceRecoveredWebhookEvent, Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent, Orb::Models::CustomerEditedWebhookEvent, Orb::Models::DataExportsTransferErrorWebhookEvent, Orb::Models::DataExportsTransferSuccessWebhookEvent, Orb::Models::EventUnmatchedEventWebhookEvent, Orb::Models::IngestionUnmatchedCustomerIDsWebhookEvent, Orb::Models::InvoiceAccountingSyncFailedWebhookEvent, Orb::Models::InvoiceAccountingSyncSucceededWebhookEvent, Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent, Orb::Models::InvoiceCostDataExportedWebhookEvent, Orb::Models::InvoiceDunningScheduleCreatedWebhookEvent, Orb::Models::InvoiceDunningScheduleEndedWebhookEvent, Orb::Models::InvoiceDunningScheduleResetWebhookEvent, Orb::Models::InvoiceDunningScheduleStepExecutedWebhookEvent, Orb::Models::InvoiceEditedWebhookEvent, Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent, Orb::Models::InvoiceIssueFailedWebhookEvent, Orb::Models::InvoiceIssuedWebhookEvent, Orb::Models::InvoiceIssuedSummaryWebhookEvent, Orb::Models::InvoiceManuallyMarkedAsPaidWebhookEvent, Orb::Models::InvoiceManuallyMarkedAsVoidWebhookEvent, Orb::Models::InvoicePaymentFailedWebhookEvent, Orb::Models::InvoicePaymentProcessingWebhookEvent, Orb::Models::InvoicePaymentSucceededWebhookEvent, Orb::Models::InvoiceSyncFailedWebhookEvent, Orb::Models::InvoiceSyncSucceededWebhookEvent, Orb::Models::InvoiceUndoMarkAsPaidWebhookEvent, Orb::Models::InvoiceDueDateRecalculationCanceledWebhookEvent, Orb::Models::InvoiceDueDateRecalculationCompletedWebhookEvent, Orb::Models::InvoiceDueDateRecalculationStartedWebhookEvent, Orb::Models::MetricEventsDroppedByWatermarkWebhookEvent, Orb::Models::PaymentMethodCreatedWebhookEvent, Orb::Models::PaymentMethodDeletedWebhookEvent, Orb::Models::PlanDefaultVersionSetWebhookEvent, Orb::Models::PlanVersionCreatedWebhookEvent, Orb::Models::PriceEditedWebhookEvent, Orb::Models::ResourceEventTestWebhookEvent, Orb::Models::SalesOrderAccountingSyncFailedWebhookEvent, Orb::Models::SalesOrderAccountingSyncSucceededWebhookEvent, Orb::Models::SubscriptionAccountingSyncFailedWebhookEvent, Orb::Models::SubscriptionAccountingSyncSucceededWebhookEvent, Orb::Models::SubscriptionAlertDisabledWebhookEvent, Orb::Models::SubscriptionCancellationScheduledWebhookEvent, Orb::Models::SubscriptionCancellationUnscheduledWebhookEvent, Orb::Models::SubscriptionCostExceededWebhookEvent, Orb::Models::SubscriptionCreatedWebhookEvent, Orb::Models::SubscriptionEditedWebhookEvent, Orb::Models::SubscriptionEndedWebhookEvent, Orb::Models::SubscriptionFixedFeeQuantityUpdatedWebhookEvent, Orb::Models::SubscriptionGroupedCostExceededWebhookEvent, Orb::Models::SubscriptionInvoicingThresholdExceededWebhookEvent, Orb::Models::SubscriptionLicenseAllocationResetWebhookEvent, Orb::Models::SubscriptionLicenseBalanceThresholdReachedWebhookEvent, Orb::Models::SubscriptionPlanChangeScheduledWebhookEvent, Orb::Models::SubscriptionPlanChangedWebhookEvent, Orb::Models::SubscriptionPlanVersionChangeScheduledWebhookEvent, Orb::Models::SubscriptionPlanVersionChangedWebhookEvent, Orb::Models::SubscriptionSpendExceededWebhookEvent, Orb::Models::SubscriptionStartedWebhookEvent, Orb::Models::SubscriptionTrialEndedWebhookEvent, Orb::Models::SubscriptionUsageExceededWebhookEvent, Orb::Models::TransactionAccountingSyncFailedWebhookEvent, Orb::Models::TransactionAccountingSyncSucceededWebhookEvent)]
|
|
253
|
+
# @return [Array(Orb::Models::BackfillReflectedWebhookEvent, Orb::Models::BackfillRevertedWebhookEvent, Orb::Models::BillableMetricEditedWebhookEvent, Orb::Models::CreditBlockAccountingSyncFailedWebhookEvent, Orb::Models::CreditBlockAccountingSyncSucceededWebhookEvent, Orb::Models::CreditNoteAccountingSyncFailedWebhookEvent, Orb::Models::CreditNoteAccountingSyncSucceededWebhookEvent, Orb::Models::CreditNoteIssuedWebhookEvent, Orb::Models::CreditNoteMarkedAsVoidWebhookEvent, Orb::Models::CustomerAccountingSyncFailedWebhookEvent, Orb::Models::CustomerAccountingSyncSucceededWebhookEvent, Orb::Models::CustomerBalanceTransactionCreatedWebhookEvent, Orb::Models::CustomerCreatedWebhookEvent, Orb::Models::CustomerCreditBalanceDepletedWebhookEvent, Orb::Models::CustomerCreditBalanceDroppedWebhookEvent, Orb::Models::CustomerCreditBalanceRecoveredWebhookEvent, Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent, Orb::Models::CustomerEditedWebhookEvent, Orb::Models::DataExportsTransferErrorWebhookEvent, Orb::Models::DataExportsTransferSuccessWebhookEvent, Orb::Models::EventUnmatchedEventWebhookEvent, Orb::Models::IngestionUnmatchedCustomerIDsWebhookEvent, Orb::Models::InvoiceAccountingSyncFailedWebhookEvent, Orb::Models::InvoiceAccountingSyncSucceededWebhookEvent, Orb::Models::InvoiceAutomationScheduleStepExecutedWebhookEvent, Orb::Models::InvoiceCostDataExportedWebhookEvent, Orb::Models::InvoiceDunningScheduleCreatedWebhookEvent, Orb::Models::InvoiceDunningScheduleEndedWebhookEvent, Orb::Models::InvoiceDunningScheduleResetWebhookEvent, Orb::Models::InvoiceDunningScheduleStepExecutedWebhookEvent, Orb::Models::InvoiceEditedWebhookEvent, Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent, Orb::Models::InvoiceIssueFailedWebhookEvent, Orb::Models::InvoiceIssuedWebhookEvent, Orb::Models::InvoiceIssuedSummaryWebhookEvent, Orb::Models::InvoiceManuallyMarkedAsPaidWebhookEvent, Orb::Models::InvoiceManuallyMarkedAsVoidWebhookEvent, Orb::Models::InvoicePaymentFailedWebhookEvent, Orb::Models::InvoicePaymentProcessingWebhookEvent, Orb::Models::InvoicePaymentSucceededWebhookEvent, Orb::Models::InvoiceSyncFailedWebhookEvent, Orb::Models::InvoiceSyncSucceededWebhookEvent, Orb::Models::InvoiceUndoMarkAsPaidWebhookEvent, Orb::Models::InvoiceDueDateRecalculationCanceledWebhookEvent, Orb::Models::InvoiceDueDateRecalculationCompletedWebhookEvent, Orb::Models::InvoiceDueDateRecalculationStartedWebhookEvent, Orb::Models::MetricEventsDroppedByWatermarkWebhookEvent, Orb::Models::PaymentMethodCreatedWebhookEvent, Orb::Models::PaymentMethodDeletedWebhookEvent, Orb::Models::PlanCreatedWebhookEvent, Orb::Models::PlanDefaultVersionSetWebhookEvent, Orb::Models::PlanEditedWebhookEvent, Orb::Models::PlanVersionCreatedWebhookEvent, Orb::Models::PriceEditedWebhookEvent, Orb::Models::ResourceEventTestWebhookEvent, Orb::Models::SalesOrderAccountingSyncFailedWebhookEvent, Orb::Models::SalesOrderAccountingSyncSucceededWebhookEvent, Orb::Models::SubscriptionAccountingSyncFailedWebhookEvent, Orb::Models::SubscriptionAccountingSyncSucceededWebhookEvent, Orb::Models::SubscriptionAlertDisabledWebhookEvent, Orb::Models::SubscriptionCancellationScheduledWebhookEvent, Orb::Models::SubscriptionCancellationUnscheduledWebhookEvent, Orb::Models::SubscriptionCostExceededWebhookEvent, Orb::Models::SubscriptionCreatedWebhookEvent, Orb::Models::SubscriptionEditedWebhookEvent, Orb::Models::SubscriptionEndedWebhookEvent, Orb::Models::SubscriptionFixedFeeQuantityUpdatedWebhookEvent, Orb::Models::SubscriptionGroupedCostExceededWebhookEvent, Orb::Models::SubscriptionInvoicingThresholdExceededWebhookEvent, Orb::Models::SubscriptionLicenseAllocationResetWebhookEvent, Orb::Models::SubscriptionLicenseBalanceThresholdReachedWebhookEvent, Orb::Models::SubscriptionPlanChangeScheduledWebhookEvent, Orb::Models::SubscriptionPlanChangedWebhookEvent, Orb::Models::SubscriptionPlanVersionChangeScheduledWebhookEvent, Orb::Models::SubscriptionPlanVersionChangedWebhookEvent, Orb::Models::SubscriptionSpendExceededWebhookEvent, Orb::Models::SubscriptionStartedWebhookEvent, Orb::Models::SubscriptionTrialEndedWebhookEvent, Orb::Models::SubscriptionUsageExceededWebhookEvent, Orb::Models::TransactionAccountingSyncFailedWebhookEvent, Orb::Models::TransactionAccountingSyncSucceededWebhookEvent)]
|
|
248
254
|
end
|
|
249
255
|
end
|
|
250
256
|
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::WebhookEndpoints#retrieve
|
|
6
|
+
class WebhookEndpoint < Orb::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The Orb-assigned unique identifier for the webhook endpoint.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute created_at
|
|
14
|
+
# The time the webhook endpoint was created.
|
|
15
|
+
#
|
|
16
|
+
# @return [Time]
|
|
17
|
+
required :created_at, Time
|
|
18
|
+
|
|
19
|
+
# @!attribute enabled
|
|
20
|
+
# Whether Orb sends webhook events to this endpoint.
|
|
21
|
+
#
|
|
22
|
+
# @return [Boolean]
|
|
23
|
+
required :enabled, Orb::Internal::Type::Boolean
|
|
24
|
+
|
|
25
|
+
# @!attribute enabled_event_types
|
|
26
|
+
# The webhook event types sent to this endpoint. If null, all event types are
|
|
27
|
+
# sent.
|
|
28
|
+
#
|
|
29
|
+
# @return [Array<String>, nil]
|
|
30
|
+
required :enabled_event_types, Orb::Internal::Type::ArrayOf[String], nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute url
|
|
33
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
34
|
+
#
|
|
35
|
+
# @return [String]
|
|
36
|
+
required :url, String
|
|
37
|
+
|
|
38
|
+
# @!method initialize(id:, created_at:, enabled:, enabled_event_types:, url:)
|
|
39
|
+
# Some parameter documentations has been truncated, see
|
|
40
|
+
# {Orb::Models::WebhookEndpoint} for more details.
|
|
41
|
+
#
|
|
42
|
+
# A webhook endpoint is an HTTPS URL that Orb sends
|
|
43
|
+
# [webhook events](/integrations-and-exports/webhooks) to.
|
|
44
|
+
#
|
|
45
|
+
# @param id [String] The Orb-assigned unique identifier for the webhook endpoint.
|
|
46
|
+
#
|
|
47
|
+
# @param created_at [Time] The time the webhook endpoint was created.
|
|
48
|
+
#
|
|
49
|
+
# @param enabled [Boolean] Whether Orb sends webhook events to this endpoint.
|
|
50
|
+
#
|
|
51
|
+
# @param enabled_event_types [Array<String>, nil] The webhook event types sent to this endpoint. If null, all event types are sent
|
|
52
|
+
#
|
|
53
|
+
# @param url [String] The HTTPS URL that Orb sends webhook events to.
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::WebhookEndpoints#create
|
|
6
|
+
class WebhookEndpointCreateParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute url
|
|
11
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :url, String
|
|
15
|
+
|
|
16
|
+
# @!attribute enabled_event_types
|
|
17
|
+
# The webhook event types to send to this endpoint. If omitted or null, all event
|
|
18
|
+
# types are sent.
|
|
19
|
+
#
|
|
20
|
+
# @return [Array<String>, nil]
|
|
21
|
+
optional :enabled_event_types, Orb::Internal::Type::ArrayOf[String], nil?: true
|
|
22
|
+
|
|
23
|
+
# @!method initialize(url:, enabled_event_types: nil, request_options: {})
|
|
24
|
+
# Some parameter documentations has been truncated, see
|
|
25
|
+
# {Orb::Models::WebhookEndpointCreateParams} for more details.
|
|
26
|
+
#
|
|
27
|
+
# @param url [String] The HTTPS URL that Orb sends webhook events to.
|
|
28
|
+
#
|
|
29
|
+
# @param enabled_event_types [Array<String>, nil] The webhook event types to send to this endpoint. If omitted or null, all event
|
|
30
|
+
#
|
|
31
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::WebhookEndpoints#delete
|
|
6
|
+
class WebhookEndpointDeleteParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute webhook_endpoint_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_endpoint_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(webhook_endpoint_id:, request_options: {})
|
|
16
|
+
# @param webhook_endpoint_id [String]
|
|
17
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::WebhookEndpoints#disable
|
|
6
|
+
class WebhookEndpointDisableParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute webhook_endpoint_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_endpoint_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(webhook_endpoint_id:, request_options: {})
|
|
16
|
+
# @param webhook_endpoint_id [String]
|
|
17
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::WebhookEndpoints#enable
|
|
6
|
+
class WebhookEndpointEnableParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute webhook_endpoint_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_endpoint_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(webhook_endpoint_id:, request_options: {})
|
|
16
|
+
# @param webhook_endpoint_id [String]
|
|
17
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::WebhookEndpoints#list
|
|
6
|
+
class WebhookEndpointListParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute cursor
|
|
11
|
+
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
12
|
+
# from the initial request.
|
|
13
|
+
#
|
|
14
|
+
# @return [String, nil]
|
|
15
|
+
optional :cursor, String, nil?: true
|
|
16
|
+
|
|
17
|
+
# @!attribute limit
|
|
18
|
+
# The number of items to fetch. Defaults to 20.
|
|
19
|
+
#
|
|
20
|
+
# @return [Integer, nil]
|
|
21
|
+
optional :limit, Integer
|
|
22
|
+
|
|
23
|
+
# @!method initialize(cursor: nil, limit: nil, request_options: {})
|
|
24
|
+
# Some parameter documentations has been truncated, see
|
|
25
|
+
# {Orb::Models::WebhookEndpointListParams} for more details.
|
|
26
|
+
#
|
|
27
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
28
|
+
#
|
|
29
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
|
30
|
+
#
|
|
31
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::WebhookEndpoints#retrieve
|
|
6
|
+
class WebhookEndpointRetrieveParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute webhook_endpoint_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_endpoint_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(webhook_endpoint_id:, request_options: {})
|
|
16
|
+
# @param webhook_endpoint_id [String]
|
|
17
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::WebhookEndpoints#update
|
|
6
|
+
class WebhookEndpointUpdateParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute webhook_endpoint_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_endpoint_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute enabled_event_types
|
|
16
|
+
# The webhook event types to send to this endpoint. Null sends all event types;
|
|
17
|
+
# omit to leave them unchanged.
|
|
18
|
+
#
|
|
19
|
+
# @return [Array<String>, nil]
|
|
20
|
+
optional :enabled_event_types, Orb::Internal::Type::ArrayOf[String], nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute url
|
|
23
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :url, String, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!method initialize(webhook_endpoint_id:, enabled_event_types: nil, url: nil, request_options: {})
|
|
29
|
+
# Some parameter documentations has been truncated, see
|
|
30
|
+
# {Orb::Models::WebhookEndpointUpdateParams} for more details.
|
|
31
|
+
#
|
|
32
|
+
# @param webhook_endpoint_id [String]
|
|
33
|
+
#
|
|
34
|
+
# @param enabled_event_types [Array<String>, nil] The webhook event types to send to this endpoint. Null sends all event types; om
|
|
35
|
+
#
|
|
36
|
+
# @param url [String, nil] The HTTPS URL that Orb sends webhook events to.
|
|
37
|
+
#
|
|
38
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::WebhookEndpoints#create
|
|
6
|
+
class WebhookEndpointWithSecret < Orb::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The Orb-assigned unique identifier for the webhook endpoint.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute created_at
|
|
14
|
+
# The time the webhook endpoint was created.
|
|
15
|
+
#
|
|
16
|
+
# @return [Time]
|
|
17
|
+
required :created_at, Time
|
|
18
|
+
|
|
19
|
+
# @!attribute enabled
|
|
20
|
+
# Whether Orb sends webhook events to this endpoint.
|
|
21
|
+
#
|
|
22
|
+
# @return [Boolean]
|
|
23
|
+
required :enabled, Orb::Internal::Type::Boolean
|
|
24
|
+
|
|
25
|
+
# @!attribute enabled_event_types
|
|
26
|
+
# The webhook event types sent to this endpoint. If null, all event types are
|
|
27
|
+
# sent.
|
|
28
|
+
#
|
|
29
|
+
# @return [Array<String>, nil]
|
|
30
|
+
required :enabled_event_types, Orb::Internal::Type::ArrayOf[String], nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute secret
|
|
33
|
+
# The secret used to sign the webhook events sent to this endpoint. Only returned
|
|
34
|
+
# when the endpoint is created.
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
required :secret, String
|
|
38
|
+
|
|
39
|
+
# @!attribute url
|
|
40
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
41
|
+
#
|
|
42
|
+
# @return [String]
|
|
43
|
+
required :url, String
|
|
44
|
+
|
|
45
|
+
# @!method initialize(id:, created_at:, enabled:, enabled_event_types:, secret:, url:)
|
|
46
|
+
# Some parameter documentations has been truncated, see
|
|
47
|
+
# {Orb::Models::WebhookEndpointWithSecret} for more details.
|
|
48
|
+
#
|
|
49
|
+
# A newly created webhook endpoint, along with the secret used to sign its webhook
|
|
50
|
+
# events.
|
|
51
|
+
#
|
|
52
|
+
# @param id [String] The Orb-assigned unique identifier for the webhook endpoint.
|
|
53
|
+
#
|
|
54
|
+
# @param created_at [Time] The time the webhook endpoint was created.
|
|
55
|
+
#
|
|
56
|
+
# @param enabled [Boolean] Whether Orb sends webhook events to this endpoint.
|
|
57
|
+
#
|
|
58
|
+
# @param enabled_event_types [Array<String>, nil] The webhook event types sent to this endpoint. If null, all event types are sent
|
|
59
|
+
#
|
|
60
|
+
# @param secret [String] The secret used to sign the webhook events sent to this endpoint. Only returned
|
|
61
|
+
#
|
|
62
|
+
# @param url [String] The HTTPS URL that Orb sends webhook events to.
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
data/lib/orb/models.rb
CHANGED
|
@@ -55,6 +55,8 @@ module Orb
|
|
|
55
55
|
|
|
56
56
|
AlertCreateForExternalCustomerParams = Orb::Models::AlertCreateForExternalCustomerParams
|
|
57
57
|
|
|
58
|
+
AlertCreateForPlanParams = Orb::Models::AlertCreateForPlanParams
|
|
59
|
+
|
|
58
60
|
AlertCreateForSubscriptionParams = Orb::Models::AlertCreateForSubscriptionParams
|
|
59
61
|
|
|
60
62
|
AlertDeleteParams = Orb::Models::AlertDeleteParams
|
|
@@ -617,10 +619,14 @@ module Orb
|
|
|
617
619
|
|
|
618
620
|
Plan = Orb::Models::Plan
|
|
619
621
|
|
|
622
|
+
PlanCreatedWebhookEvent = Orb::Models::PlanCreatedWebhookEvent
|
|
623
|
+
|
|
620
624
|
PlanCreateParams = Orb::Models::PlanCreateParams
|
|
621
625
|
|
|
622
626
|
PlanDefaultVersionSetWebhookEvent = Orb::Models::PlanDefaultVersionSetWebhookEvent
|
|
623
627
|
|
|
628
|
+
PlanEditedWebhookEvent = Orb::Models::PlanEditedWebhookEvent
|
|
629
|
+
|
|
624
630
|
PlanFetchParams = Orb::Models::PlanFetchParams
|
|
625
631
|
|
|
626
632
|
PlanListParams = Orb::Models::PlanListParams
|
|
@@ -817,5 +823,23 @@ module Orb
|
|
|
817
823
|
|
|
818
824
|
UsageDiscountInterval = Orb::Models::UsageDiscountInterval
|
|
819
825
|
|
|
826
|
+
WebhookEndpoint = Orb::Models::WebhookEndpoint
|
|
827
|
+
|
|
828
|
+
WebhookEndpointCreateParams = Orb::Models::WebhookEndpointCreateParams
|
|
829
|
+
|
|
830
|
+
WebhookEndpointDeleteParams = Orb::Models::WebhookEndpointDeleteParams
|
|
831
|
+
|
|
832
|
+
WebhookEndpointDisableParams = Orb::Models::WebhookEndpointDisableParams
|
|
833
|
+
|
|
834
|
+
WebhookEndpointEnableParams = Orb::Models::WebhookEndpointEnableParams
|
|
835
|
+
|
|
836
|
+
WebhookEndpointListParams = Orb::Models::WebhookEndpointListParams
|
|
837
|
+
|
|
838
|
+
WebhookEndpointRetrieveParams = Orb::Models::WebhookEndpointRetrieveParams
|
|
839
|
+
|
|
840
|
+
WebhookEndpointUpdateParams = Orb::Models::WebhookEndpointUpdateParams
|
|
841
|
+
|
|
842
|
+
WebhookEndpointWithSecret = Orb::Models::WebhookEndpointWithSecret
|
|
843
|
+
|
|
820
844
|
WebhookUnwrapParams = Orb::Models::WebhookUnwrapParams
|
|
821
845
|
end
|
data/lib/orb/resources/alerts.rb
CHANGED
|
@@ -215,6 +215,61 @@ module Orb
|
|
|
215
215
|
)
|
|
216
216
|
end
|
|
217
217
|
|
|
218
|
+
# Some parameter documentations has been truncated, see
|
|
219
|
+
# {Orb::Models::AlertCreateForPlanParams} for more details.
|
|
220
|
+
#
|
|
221
|
+
# This endpoint is used to create alerts at the plan level. Plan level alerts are
|
|
222
|
+
# automatically propagated to all subscriptions associated with the plan. These
|
|
223
|
+
# alerts are scoped to a specific plan version; if no version is specified, the
|
|
224
|
+
# active plan version is used.
|
|
225
|
+
#
|
|
226
|
+
# Plan level alerts can be of three types: `usage_exceeded`, `cost_exceeded`, or
|
|
227
|
+
# `spend_exceeded`. A `usage_exceeded` alert is scoped to a particular metric and
|
|
228
|
+
# is triggered when the usage of that metric exceeds predefined thresholds during
|
|
229
|
+
# the current billing cycle. A `cost_exceeded` alert is triggered when the total
|
|
230
|
+
# amount due during the current billing cycle surpasses predefined thresholds.
|
|
231
|
+
# `cost_exceeded` alerts do not include burndown of pre-purchase credits. A
|
|
232
|
+
# `spend_exceeded` alert is triggered when the rated spend (the pricing subtotal,
|
|
233
|
+
# before invoice-level adjustments and credits) denominated in the alert's
|
|
234
|
+
# currency exceeds predefined thresholds during the current billing cycle;
|
|
235
|
+
# `price_filters` can scope which prices contribute. Each plan can have one
|
|
236
|
+
# `cost_exceeded` alert and one `usage_exceeded` alert per metric that is a part
|
|
237
|
+
# of the plan.
|
|
238
|
+
#
|
|
239
|
+
# @overload create_for_plan(plan_id, thresholds:, type:, currency: nil, grouping_keys: nil, metric_id: nil, plan_version: nil, price_filters: nil, request_options: {})
|
|
240
|
+
#
|
|
241
|
+
# @param plan_id [String]
|
|
242
|
+
#
|
|
243
|
+
# @param thresholds [Array<Orb::Models::Threshold>] The thresholds that define the values at which the alert will be triggered.
|
|
244
|
+
#
|
|
245
|
+
# @param type [Symbol, Orb::Models::AlertCreateForPlanParams::Type] The type of alert to create. This must be a valid alert type.
|
|
246
|
+
#
|
|
247
|
+
# @param currency [String, nil] The case sensitive currency or custom pricing unit the alert is denominated in.
|
|
248
|
+
#
|
|
249
|
+
# @param grouping_keys [Array<String>, nil] The property keys to group cost alerts by. Only applicable for cost_exceeded ale
|
|
250
|
+
#
|
|
251
|
+
# @param metric_id [String, nil] The metric to track usage for.
|
|
252
|
+
#
|
|
253
|
+
# @param plan_version [Integer, nil] The plan version to create alerts for. If not specified, the default will be the
|
|
254
|
+
#
|
|
255
|
+
# @param price_filters [Array<Orb::Models::AlertCreateForPlanParams::PriceFilter>, nil] Filters to scope which prices are included in alert evaluation. Supports filteri
|
|
256
|
+
#
|
|
257
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
258
|
+
#
|
|
259
|
+
# @return [Orb::Models::Alert]
|
|
260
|
+
#
|
|
261
|
+
# @see Orb::Models::AlertCreateForPlanParams
|
|
262
|
+
def create_for_plan(plan_id, params)
|
|
263
|
+
parsed, options = Orb::AlertCreateForPlanParams.dump_request(params)
|
|
264
|
+
@client.request(
|
|
265
|
+
method: :post,
|
|
266
|
+
path: ["alerts/plan_id/%1$s", plan_id],
|
|
267
|
+
body: parsed,
|
|
268
|
+
model: Orb::Alert,
|
|
269
|
+
options: options
|
|
270
|
+
)
|
|
271
|
+
end
|
|
272
|
+
|
|
218
273
|
# Some parameter documentations has been truncated, see
|
|
219
274
|
# {Orb::Models::AlertCreateForSubscriptionParams} for more details.
|
|
220
275
|
#
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Resources
|
|
5
|
+
class DimensionalPriceGroups
|
|
6
|
+
class Prices
|
|
7
|
+
# Create prices in a dimensional price group. Every price shares `item_id`,
|
|
8
|
+
# `cadence`, `currency`, and `model_type`. Tiered prices also share tier
|
|
9
|
+
# boundaries; each row supplies its own amounts. The request is one transaction.
|
|
10
|
+
#
|
|
11
|
+
# @overload create(dimensional_price_group_id, cadence:, currency:, item_id:, model_type:, prices:, tiers: nil, request_options: {})
|
|
12
|
+
#
|
|
13
|
+
# @param dimensional_price_group_id [String]
|
|
14
|
+
#
|
|
15
|
+
# @param cadence [Symbol, Orb::Models::DimensionalPriceGroups::PriceCreateParams::Cadence] Billing cadence for every price
|
|
16
|
+
#
|
|
17
|
+
# @param currency [String] An ISO 4217 currency string for every price.
|
|
18
|
+
#
|
|
19
|
+
# @param item_id [String] The item for every price. Must be the group's billable metric item.
|
|
20
|
+
#
|
|
21
|
+
# @param model_type [Symbol, Orb::Models::DimensionalPriceGroups::PriceCreateParams::ModelType]
|
|
22
|
+
#
|
|
23
|
+
# @param prices [Array<Orb::Models::DimensionalPriceGroups::PriceCreateParams::Price>]
|
|
24
|
+
#
|
|
25
|
+
# @param tiers [Array<Orb::Models::DimensionalPriceGroups::PriceCreateParams::Tier>, nil] Shared tier boundaries. Required for tiered prices and omitted for unit prices.
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
28
|
+
#
|
|
29
|
+
# @return [Orb::Models::DimensionalPriceGroups::PriceCreateResponse]
|
|
30
|
+
#
|
|
31
|
+
# @see Orb::Models::DimensionalPriceGroups::PriceCreateParams
|
|
32
|
+
def create(dimensional_price_group_id, params)
|
|
33
|
+
parsed, options = Orb::DimensionalPriceGroups::PriceCreateParams.dump_request(params)
|
|
34
|
+
@client.request(
|
|
35
|
+
method: :post,
|
|
36
|
+
path: ["dimensional_price_groups/%1$s/prices", dimensional_price_group_id],
|
|
37
|
+
body: parsed,
|
|
38
|
+
model: Orb::Models::DimensionalPriceGroups::PriceCreateResponse,
|
|
39
|
+
options: options
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Some parameter documentations has been truncated, see
|
|
44
|
+
# {Orb::Models::DimensionalPriceGroups::PriceListParams} for more details.
|
|
45
|
+
#
|
|
46
|
+
# This endpoint returns the prices in a dimensional price group. Subscription
|
|
47
|
+
# overrides are omitted. Archived prices are omitted unless `status` is `archived`
|
|
48
|
+
# or `all`.
|
|
49
|
+
#
|
|
50
|
+
# @overload list(dimensional_price_group_id, cursor: nil, limit: nil, status: nil, request_options: {})
|
|
51
|
+
#
|
|
52
|
+
# @param dimensional_price_group_id [String]
|
|
53
|
+
#
|
|
54
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
55
|
+
#
|
|
56
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
|
57
|
+
#
|
|
58
|
+
# @param status [Symbol, Orb::Models::DimensionalPriceGroups::PriceListParams::Status] active omits archived prices. archived returns only archived prices. all returns
|
|
59
|
+
#
|
|
60
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
61
|
+
#
|
|
62
|
+
# @return [Orb::Internal::Page<Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput>]
|
|
63
|
+
#
|
|
64
|
+
# @see Orb::Models::DimensionalPriceGroups::PriceListParams
|
|
65
|
+
def list(dimensional_price_group_id, params = {})
|
|
66
|
+
parsed, options = Orb::DimensionalPriceGroups::PriceListParams.dump_request(params)
|
|
67
|
+
query = Orb::Internal::Util.encode_query_params(parsed)
|
|
68
|
+
@client.request(
|
|
69
|
+
method: :get,
|
|
70
|
+
path: ["dimensional_price_groups/%1$s/prices", dimensional_price_group_id],
|
|
71
|
+
query: query,
|
|
72
|
+
page: Orb::Internal::Page,
|
|
73
|
+
model: Orb::Price,
|
|
74
|
+
options: options
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# @api private
|
|
79
|
+
#
|
|
80
|
+
# @param client [Orb::Client]
|
|
81
|
+
def initialize(client:)
|
|
82
|
+
@client = client
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -6,6 +6,9 @@ module Orb
|
|
|
6
6
|
# @return [Orb::Resources::DimensionalPriceGroups::ExternalDimensionalPriceGroupID]
|
|
7
7
|
attr_reader :external_dimensional_price_group_id
|
|
8
8
|
|
|
9
|
+
# @return [Orb::Resources::DimensionalPriceGroups::Prices]
|
|
10
|
+
attr_reader :prices
|
|
11
|
+
|
|
9
12
|
# Some parameter documentations has been truncated, see
|
|
10
13
|
# {Orb::Models::DimensionalPriceGroupCreateParams} for more details.
|
|
11
14
|
#
|
|
@@ -146,6 +149,7 @@ module Orb
|
|
|
146
149
|
@client = client
|
|
147
150
|
@external_dimensional_price_group_id =
|
|
148
151
|
Orb::Resources::DimensionalPriceGroups::ExternalDimensionalPriceGroupID.new(client: client)
|
|
152
|
+
@prices = Orb::Resources::DimensionalPriceGroups::Prices.new(client: client)
|
|
149
153
|
end
|
|
150
154
|
end
|
|
151
155
|
end
|