orb-billing 1.0.0 → 1.1.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 +30 -0
- data/README.md +1 -1
- data/lib/orb/errors.rb +22 -0
- data/lib/orb/internal/type/array_of.rb +6 -1
- data/lib/orb/internal/type/base_model.rb +79 -25
- data/lib/orb/internal/type/boolean.rb +7 -1
- data/lib/orb/internal/type/converter.rb +42 -34
- data/lib/orb/internal/type/enum.rb +10 -2
- data/lib/orb/internal/type/file_input.rb +6 -1
- data/lib/orb/internal/type/hash_of.rb +6 -1
- data/lib/orb/internal/type/union.rb +12 -7
- data/lib/orb/internal/type/unknown.rb +7 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +4 -4
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +4 -4
- data/lib/orb/models/invoice.rb +4 -1
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +4 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +4 -1
- data/lib/orb/models/new_plan_bps_price.rb +10 -1
- data/lib/orb/models/new_plan_bulk_bps_price.rb +10 -1
- data/lib/orb/models/new_plan_bulk_price.rb +10 -1
- data/lib/orb/models/new_plan_bulk_with_proration_price.rb +10 -1
- data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +10 -1
- data/lib/orb/models/new_plan_grouped_allocation_price.rb +10 -1
- data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +10 -1
- data/lib/orb/models/new_plan_grouped_tiered_price.rb +10 -1
- data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +10 -1
- data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +10 -1
- data/lib/orb/models/new_plan_matrix_price.rb +10 -1
- data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +10 -1
- data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +10 -1
- data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +10 -1
- data/lib/orb/models/new_plan_package_price.rb +10 -1
- data/lib/orb/models/new_plan_package_with_allocation_price.rb +10 -1
- data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +10 -1
- data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +10 -1
- data/lib/orb/models/new_plan_threshold_total_amount_price.rb +10 -1
- data/lib/orb/models/new_plan_tier_with_proration_price.rb +10 -1
- data/lib/orb/models/new_plan_tiered_bps_price.rb +10 -1
- data/lib/orb/models/new_plan_tiered_package_price.rb +10 -1
- data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +10 -1
- data/lib/orb/models/new_plan_tiered_price.rb +10 -1
- data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +10 -1
- data/lib/orb/models/new_plan_unit_price.rb +10 -1
- data/lib/orb/models/new_plan_unit_with_percent_price.rb +10 -1
- data/lib/orb/models/new_plan_unit_with_proration_price.rb +10 -1
- data/lib/orb/models/plan_create_params.rb +185 -37
- data/lib/orb/resources/customers/credits/ledger.rb +6 -6
- data/lib/orb/resources/plans.rb +6 -2
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/errors.rbi +16 -0
- data/rbi/orb/internal/type/boolean.rbi +2 -0
- data/rbi/orb/internal/type/converter.rbi +15 -15
- data/rbi/orb/internal/type/union.rbi +5 -0
- data/rbi/orb/internal/type/unknown.rbi +2 -0
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +3 -3
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +3 -3
- data/rbi/orb/models/invoice.rbi +2 -0
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +2 -0
- data/rbi/orb/models/invoice_line_item_create_response.rbi +2 -0
- data/rbi/orb/models/new_plan_bps_price.rbi +13 -3
- data/rbi/orb/models/new_plan_bulk_bps_price.rbi +13 -3
- data/rbi/orb/models/new_plan_bulk_price.rbi +13 -3
- data/rbi/orb/models/new_plan_bulk_with_proration_price.rbi +13 -3
- data/rbi/orb/models/new_plan_cumulative_grouped_bulk_price.rbi +13 -3
- data/rbi/orb/models/new_plan_grouped_allocation_price.rbi +13 -3
- data/rbi/orb/models/new_plan_grouped_tiered_package_price.rbi +13 -3
- data/rbi/orb/models/new_plan_grouped_tiered_price.rbi +13 -3
- data/rbi/orb/models/new_plan_grouped_with_metered_minimum_price.rbi +13 -3
- data/rbi/orb/models/new_plan_grouped_with_prorated_minimum_price.rbi +13 -3
- data/rbi/orb/models/new_plan_matrix_price.rbi +13 -3
- data/rbi/orb/models/new_plan_matrix_with_allocation_price.rbi +13 -3
- data/rbi/orb/models/new_plan_matrix_with_display_name_price.rbi +13 -3
- data/rbi/orb/models/new_plan_max_group_tiered_package_price.rbi +13 -3
- data/rbi/orb/models/new_plan_package_price.rbi +13 -3
- data/rbi/orb/models/new_plan_package_with_allocation_price.rbi +13 -3
- data/rbi/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbi +13 -3
- data/rbi/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbi +13 -3
- data/rbi/orb/models/new_plan_threshold_total_amount_price.rbi +13 -3
- data/rbi/orb/models/new_plan_tier_with_proration_price.rbi +13 -3
- data/rbi/orb/models/new_plan_tiered_bps_price.rbi +13 -3
- data/rbi/orb/models/new_plan_tiered_package_price.rbi +13 -3
- data/rbi/orb/models/new_plan_tiered_package_with_minimum_price.rbi +13 -3
- data/rbi/orb/models/new_plan_tiered_price.rbi +13 -3
- data/rbi/orb/models/new_plan_tiered_with_minimum_price.rbi +13 -3
- data/rbi/orb/models/new_plan_unit_price.rbi +13 -3
- data/rbi/orb/models/new_plan_unit_with_percent_price.rbi +13 -3
- data/rbi/orb/models/new_plan_unit_with_proration_price.rbi +13 -3
- data/rbi/orb/models/plan_create_params.rbi +415 -135
- data/rbi/orb/resources/customers/credits/ledger.rbi +6 -6
- data/rbi/orb/resources/plans.rbi +11 -33
- data/sig/orb/errors.rbs +9 -0
- data/sig/orb/internal/type/converter.rbs +7 -1
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +1 -1
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +1 -1
- data/sig/orb/models/new_plan_bps_price.rbs +8 -3
- data/sig/orb/models/new_plan_bulk_bps_price.rbs +8 -3
- data/sig/orb/models/new_plan_bulk_price.rbs +8 -3
- data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +8 -3
- data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +8 -3
- data/sig/orb/models/new_plan_grouped_allocation_price.rbs +8 -3
- data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +8 -3
- data/sig/orb/models/new_plan_grouped_tiered_price.rbs +8 -3
- data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +8 -3
- data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +8 -3
- data/sig/orb/models/new_plan_matrix_price.rbs +8 -3
- data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +8 -3
- data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +8 -3
- data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +8 -3
- data/sig/orb/models/new_plan_package_price.rbs +8 -3
- data/sig/orb/models/new_plan_package_with_allocation_price.rbs +8 -3
- data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +8 -3
- data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +8 -3
- data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +8 -3
- data/sig/orb/models/new_plan_tier_with_proration_price.rbs +8 -3
- data/sig/orb/models/new_plan_tiered_bps_price.rbs +8 -3
- data/sig/orb/models/new_plan_tiered_package_price.rbs +8 -3
- data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +8 -3
- data/sig/orb/models/new_plan_tiered_price.rbs +8 -3
- data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +8 -3
- data/sig/orb/models/new_plan_unit_price.rbs +8 -3
- data/sig/orb/models/new_plan_unit_with_percent_price.rbs +8 -3
- data/sig/orb/models/new_plan_unit_with_proration_price.rbs +8 -3
- data/sig/orb/models/plan_create_params.rbs +156 -37
- data/sig/orb/resources/customers/credits/ledger.rbs +2 -2
- data/sig/orb/resources/plans.rbs +3 -1
- metadata +2 -2
@@ -113,7 +113,14 @@ module Orb
|
|
113
113
|
# @return [Hash{Symbol=>String, nil}, nil]
|
114
114
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
115
115
|
|
116
|
-
# @!
|
116
|
+
# @!attribute reference_id
|
117
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
118
|
+
# in the same API call.
|
119
|
+
#
|
120
|
+
# @return [String, nil]
|
121
|
+
optional :reference_id, String, nil?: true
|
122
|
+
|
123
|
+
# @!method initialize(cadence:, item_id:, model_type:, name:, tiered_bps_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, metadata: nil, reference_id: nil)
|
117
124
|
# Some parameter documentations has been truncated, see
|
118
125
|
# {Orb::Models::NewPlanTieredBPSPrice} for more details.
|
119
126
|
#
|
@@ -150,6 +157,8 @@ module Orb
|
|
150
157
|
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
151
158
|
#
|
152
159
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
160
|
+
#
|
161
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
153
162
|
|
154
163
|
# The cadence to bill for this price on.
|
155
164
|
#
|
@@ -113,7 +113,14 @@ module Orb
|
|
113
113
|
# @return [Hash{Symbol=>String, nil}, nil]
|
114
114
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
115
115
|
|
116
|
-
# @!
|
116
|
+
# @!attribute reference_id
|
117
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
118
|
+
# in the same API call.
|
119
|
+
#
|
120
|
+
# @return [String, nil]
|
121
|
+
optional :reference_id, String, nil?: true
|
122
|
+
|
123
|
+
# @!method initialize(cadence:, item_id:, model_type:, name:, tiered_package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, metadata: nil, reference_id: nil)
|
117
124
|
# Some parameter documentations has been truncated, see
|
118
125
|
# {Orb::Models::NewPlanTieredPackagePrice} for more details.
|
119
126
|
#
|
@@ -150,6 +157,8 @@ module Orb
|
|
150
157
|
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
151
158
|
#
|
152
159
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
160
|
+
#
|
161
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
153
162
|
|
154
163
|
# The cadence to bill for this price on.
|
155
164
|
#
|
@@ -113,7 +113,14 @@ module Orb
|
|
113
113
|
# @return [Hash{Symbol=>String, nil}, nil]
|
114
114
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
115
115
|
|
116
|
-
# @!
|
116
|
+
# @!attribute reference_id
|
117
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
118
|
+
# in the same API call.
|
119
|
+
#
|
120
|
+
# @return [String, nil]
|
121
|
+
optional :reference_id, String, nil?: true
|
122
|
+
|
123
|
+
# @!method initialize(cadence:, item_id:, model_type:, name:, tiered_package_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, metadata: nil, reference_id: nil)
|
117
124
|
# Some parameter documentations has been truncated, see
|
118
125
|
# {Orb::Models::NewPlanTieredPackageWithMinimumPrice} for more details.
|
119
126
|
#
|
@@ -150,6 +157,8 @@ module Orb
|
|
150
157
|
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
151
158
|
#
|
152
159
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
160
|
+
#
|
161
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
153
162
|
|
154
163
|
# The cadence to bill for this price on.
|
155
164
|
#
|
@@ -115,7 +115,14 @@ module Orb
|
|
115
115
|
# @return [Hash{Symbol=>String, nil}, nil]
|
116
116
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
117
117
|
|
118
|
-
# @!
|
118
|
+
# @!attribute reference_id
|
119
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
120
|
+
# in the same API call.
|
121
|
+
#
|
122
|
+
# @return [String, nil]
|
123
|
+
optional :reference_id, String, nil?: true
|
124
|
+
|
125
|
+
# @!method initialize(cadence:, item_id:, model_type:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, metadata: nil, reference_id: nil)
|
119
126
|
# Some parameter documentations has been truncated, see
|
120
127
|
# {Orb::Models::NewPlanTieredPrice} for more details.
|
121
128
|
#
|
@@ -152,6 +159,8 @@ module Orb
|
|
152
159
|
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
153
160
|
#
|
154
161
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
162
|
+
#
|
163
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
155
164
|
|
156
165
|
# The cadence to bill for this price on.
|
157
166
|
#
|
@@ -113,7 +113,14 @@ module Orb
|
|
113
113
|
# @return [Hash{Symbol=>String, nil}, nil]
|
114
114
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
115
115
|
|
116
|
-
# @!
|
116
|
+
# @!attribute reference_id
|
117
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
118
|
+
# in the same API call.
|
119
|
+
#
|
120
|
+
# @return [String, nil]
|
121
|
+
optional :reference_id, String, nil?: true
|
122
|
+
|
123
|
+
# @!method initialize(cadence:, item_id:, model_type:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, metadata: nil, reference_id: nil)
|
117
124
|
# Some parameter documentations has been truncated, see
|
118
125
|
# {Orb::Models::NewPlanTieredWithMinimumPrice} for more details.
|
119
126
|
#
|
@@ -150,6 +157,8 @@ module Orb
|
|
150
157
|
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
151
158
|
#
|
152
159
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
160
|
+
#
|
161
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
153
162
|
|
154
163
|
# The cadence to bill for this price on.
|
155
164
|
#
|
@@ -111,7 +111,14 @@ module Orb
|
|
111
111
|
# @return [Hash{Symbol=>String, nil}, nil]
|
112
112
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
113
113
|
|
114
|
-
# @!
|
114
|
+
# @!attribute reference_id
|
115
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
116
|
+
# in the same API call.
|
117
|
+
#
|
118
|
+
# @return [String, nil]
|
119
|
+
optional :reference_id, String, nil?: true
|
120
|
+
|
121
|
+
# @!method initialize(cadence:, item_id:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, metadata: nil, reference_id: nil)
|
115
122
|
# Some parameter documentations has been truncated, see
|
116
123
|
# {Orb::Models::NewPlanUnitPrice} for more details.
|
117
124
|
#
|
@@ -148,6 +155,8 @@ module Orb
|
|
148
155
|
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
149
156
|
#
|
150
157
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
158
|
+
#
|
159
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
151
160
|
|
152
161
|
# The cadence to bill for this price on.
|
153
162
|
#
|
@@ -113,7 +113,14 @@ module Orb
|
|
113
113
|
# @return [Hash{Symbol=>String, nil}, nil]
|
114
114
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
115
115
|
|
116
|
-
# @!
|
116
|
+
# @!attribute reference_id
|
117
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
118
|
+
# in the same API call.
|
119
|
+
#
|
120
|
+
# @return [String, nil]
|
121
|
+
optional :reference_id, String, nil?: true
|
122
|
+
|
123
|
+
# @!method initialize(cadence:, item_id:, model_type:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, metadata: nil, reference_id: nil)
|
117
124
|
# Some parameter documentations has been truncated, see
|
118
125
|
# {Orb::Models::NewPlanUnitWithPercentPrice} for more details.
|
119
126
|
#
|
@@ -150,6 +157,8 @@ module Orb
|
|
150
157
|
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
151
158
|
#
|
152
159
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
160
|
+
#
|
161
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
153
162
|
|
154
163
|
# The cadence to bill for this price on.
|
155
164
|
#
|
@@ -113,7 +113,14 @@ module Orb
|
|
113
113
|
# @return [Hash{Symbol=>String, nil}, nil]
|
114
114
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
115
115
|
|
116
|
-
# @!
|
116
|
+
# @!attribute reference_id
|
117
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
118
|
+
# in the same API call.
|
119
|
+
#
|
120
|
+
# @return [String, nil]
|
121
|
+
optional :reference_id, String, nil?: true
|
122
|
+
|
123
|
+
# @!method initialize(cadence:, item_id:, model_type:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, metadata: nil, reference_id: nil)
|
117
124
|
# Some parameter documentations has been truncated, see
|
118
125
|
# {Orb::Models::NewPlanUnitWithProrationPrice} for more details.
|
119
126
|
#
|
@@ -150,6 +157,8 @@ module Orb
|
|
150
157
|
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
151
158
|
#
|
152
159
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
160
|
+
#
|
161
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
153
162
|
|
154
163
|
# The cadence to bill for this price on.
|
155
164
|
#
|
@@ -23,8 +23,19 @@ module Orb
|
|
23
23
|
# Prices for this plan. If the plan has phases, this includes prices across all
|
24
24
|
# phases of the plan.
|
25
25
|
#
|
26
|
-
# @return [Array<Orb::Models::
|
27
|
-
required :prices, -> { Orb::Internal::Type::ArrayOf[
|
26
|
+
# @return [Array<Orb::Models::PlanCreateParams::Price>]
|
27
|
+
required :prices, -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price] }
|
28
|
+
|
29
|
+
# @!attribute adjustments
|
30
|
+
# Adjustments for this plan. If the plan has phases, this includes adjustments
|
31
|
+
# across all phases of the plan.
|
32
|
+
#
|
33
|
+
# @return [Array<Orb::Models::PlanCreateParams::Adjustment>, nil]
|
34
|
+
optional :adjustments,
|
35
|
+
-> {
|
36
|
+
Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Adjustment]
|
37
|
+
},
|
38
|
+
nil?: true
|
28
39
|
|
29
40
|
# @!attribute default_invoice_memo
|
30
41
|
# Free-form text which is available on the invoice PDF and the Orb invoice portal.
|
@@ -53,6 +64,13 @@ module Orb
|
|
53
64
|
# @return [Integer, nil]
|
54
65
|
optional :net_terms, Integer, nil?: true
|
55
66
|
|
67
|
+
# @!attribute plan_phases
|
68
|
+
# Configuration of pre-defined phases, each with their own prices and adjustments.
|
69
|
+
# Leave unspecified for plans with a single phase.
|
70
|
+
#
|
71
|
+
# @return [Array<Orb::Models::PlanCreateParams::PlanPhase>, nil]
|
72
|
+
optional :plan_phases, -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::PlanPhase] }, nil?: true
|
73
|
+
|
56
74
|
# @!attribute status
|
57
75
|
# The status of the plan to create (either active or draft). If not specified,
|
58
76
|
# this defaults to active.
|
@@ -60,7 +78,7 @@ module Orb
|
|
60
78
|
# @return [Symbol, Orb::Models::PlanCreateParams::Status, nil]
|
61
79
|
optional :status, enum: -> { Orb::PlanCreateParams::Status }
|
62
80
|
|
63
|
-
# @!method initialize(currency:, name:, prices:, default_invoice_memo: nil, external_plan_id: nil, metadata: nil, net_terms: nil, status: nil, request_options: {})
|
81
|
+
# @!method initialize(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {})
|
64
82
|
# Some parameter documentations has been truncated, see
|
65
83
|
# {Orb::Models::PlanCreateParams} for more details.
|
66
84
|
#
|
@@ -68,7 +86,9 @@ module Orb
|
|
68
86
|
#
|
69
87
|
# @param name [String]
|
70
88
|
#
|
71
|
-
# @param prices [Array<Orb::Models::
|
89
|
+
# @param prices [Array<Orb::Models::PlanCreateParams::Price>] Prices for this plan. If the plan has phases, this includes prices across all ph
|
90
|
+
#
|
91
|
+
# @param adjustments [Array<Orb::Models::PlanCreateParams::Adjustment>, nil] Adjustments for this plan. If the plan has phases, this includes adjustments acr
|
72
92
|
#
|
73
93
|
# @param default_invoice_memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal.
|
74
94
|
#
|
@@ -78,73 +98,201 @@ module Orb
|
|
78
98
|
#
|
79
99
|
# @param net_terms [Integer, nil] The net terms determines the difference between the invoice date and the issue d
|
80
100
|
#
|
101
|
+
# @param plan_phases [Array<Orb::Models::PlanCreateParams::PlanPhase>, nil] Configuration of pre-defined phases, each with their own prices and adjustments.
|
102
|
+
#
|
81
103
|
# @param status [Symbol, Orb::Models::PlanCreateParams::Status] The status of the plan to create (either active or draft). If not specified, thi
|
82
104
|
#
|
83
105
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
84
106
|
|
85
|
-
|
86
|
-
|
107
|
+
class Price < Orb::Internal::Type::BaseModel
|
108
|
+
# @!attribute allocation_price
|
109
|
+
# The allocation price to add to the plan.
|
110
|
+
#
|
111
|
+
# @return [Orb::Models::NewAllocationPrice, nil]
|
112
|
+
optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true
|
113
|
+
|
114
|
+
# @!attribute plan_phase_order
|
115
|
+
# The phase to add this price to.
|
116
|
+
#
|
117
|
+
# @return [Integer, nil]
|
118
|
+
optional :plan_phase_order, Integer, nil?: true
|
119
|
+
|
120
|
+
# @!attribute price
|
121
|
+
# The price to add to the plan
|
122
|
+
#
|
123
|
+
# @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanTieredBPSPrice, Orb::Models::NewPlanBPSPrice, Orb::Models::NewPlanBulkBPSPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanTierWithProrationPrice, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::NewPlanGroupedTieredPrice, nil]
|
124
|
+
optional :price, union: -> { Orb::PlanCreateParams::Price::Price }, nil?: true
|
125
|
+
|
126
|
+
# @!method initialize(allocation_price: nil, plan_phase_order: nil, price: nil)
|
127
|
+
# @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan.
|
128
|
+
#
|
129
|
+
# @param plan_phase_order [Integer, nil] The phase to add this price to.
|
130
|
+
#
|
131
|
+
# @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanTieredBPSPrice, Orb::Models::NewPlanBPSPrice, Orb::Models::NewPlanBulkBPSPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanTierWithProrationPrice, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::NewPlanGroupedTieredPrice, nil] The price to add to the plan
|
132
|
+
|
133
|
+
# The price to add to the plan
|
134
|
+
#
|
135
|
+
# @see Orb::Models::PlanCreateParams::Price#price
|
136
|
+
module Price
|
137
|
+
extend Orb::Internal::Type::Union
|
138
|
+
|
139
|
+
discriminator :model_type
|
140
|
+
|
141
|
+
variant :unit, -> { Orb::NewPlanUnitPrice }
|
87
142
|
|
88
|
-
|
143
|
+
variant :package, -> { Orb::NewPlanPackagePrice }
|
89
144
|
|
90
|
-
|
145
|
+
variant :matrix, -> { Orb::NewPlanMatrixPrice }
|
91
146
|
|
92
|
-
|
147
|
+
variant :tiered, -> { Orb::NewPlanTieredPrice }
|
93
148
|
|
94
|
-
|
149
|
+
variant :tiered_bps, -> { Orb::NewPlanTieredBPSPrice }
|
95
150
|
|
96
|
-
|
151
|
+
variant :bps, -> { Orb::NewPlanBPSPrice }
|
97
152
|
|
98
|
-
|
153
|
+
variant :bulk_bps, -> { Orb::NewPlanBulkBPSPrice }
|
99
154
|
|
100
|
-
|
155
|
+
variant :bulk, -> { Orb::NewPlanBulkPrice }
|
101
156
|
|
102
|
-
|
157
|
+
variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice }
|
103
158
|
|
104
|
-
|
159
|
+
variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice }
|
105
160
|
|
106
|
-
|
161
|
+
variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice }
|
107
162
|
|
108
|
-
|
163
|
+
variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice }
|
109
164
|
|
110
|
-
|
165
|
+
variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice }
|
111
166
|
|
112
|
-
|
167
|
+
variant :tiered_with_proration, -> { Orb::NewPlanTierWithProrationPrice }
|
113
168
|
|
114
|
-
|
169
|
+
variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice }
|
115
170
|
|
116
|
-
|
171
|
+
variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice }
|
117
172
|
|
118
|
-
|
173
|
+
variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice }
|
119
174
|
|
120
|
-
|
175
|
+
variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice }
|
121
176
|
|
122
|
-
|
177
|
+
variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice }
|
123
178
|
|
124
|
-
|
179
|
+
variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice }
|
125
180
|
|
126
|
-
|
181
|
+
variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice }
|
127
182
|
|
128
|
-
|
183
|
+
variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice }
|
129
184
|
|
130
|
-
|
185
|
+
variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice }
|
131
186
|
|
132
|
-
|
187
|
+
variant :scalable_matrix_with_tiered_pricing,
|
188
|
+
-> {
|
189
|
+
Orb::NewPlanScalableMatrixWithTieredPricingPrice
|
190
|
+
}
|
133
191
|
|
134
|
-
|
192
|
+
variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice }
|
135
193
|
|
136
|
-
|
194
|
+
variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice }
|
137
195
|
|
138
|
-
|
196
|
+
variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice }
|
139
197
|
|
140
|
-
|
198
|
+
variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice }
|
141
199
|
|
142
|
-
|
200
|
+
# @!method self.variants
|
201
|
+
# @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanTieredBPSPrice, Orb::Models::NewPlanBPSPrice, Orb::Models::NewPlanBulkBPSPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanTierWithProrationPrice, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::NewPlanGroupedTieredPrice)]
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
class Adjustment < Orb::Internal::Type::BaseModel
|
206
|
+
# @!attribute adjustment
|
207
|
+
# The definition of a new adjustment to create and add to the plan.
|
208
|
+
#
|
209
|
+
# @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum]
|
210
|
+
required :adjustment, union: -> { Orb::PlanCreateParams::Adjustment::Adjustment }
|
211
|
+
|
212
|
+
# @!attribute plan_phase_order
|
213
|
+
# The phase to add this adjustment to.
|
214
|
+
#
|
215
|
+
# @return [Integer, nil]
|
216
|
+
optional :plan_phase_order, Integer, nil?: true
|
217
|
+
|
218
|
+
# @!method initialize(adjustment:, plan_phase_order: nil)
|
219
|
+
# @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the plan.
|
220
|
+
#
|
221
|
+
# @param plan_phase_order [Integer, nil] The phase to add this adjustment to.
|
222
|
+
|
223
|
+
# The definition of a new adjustment to create and add to the plan.
|
224
|
+
#
|
225
|
+
# @see Orb::Models::PlanCreateParams::Adjustment#adjustment
|
226
|
+
module Adjustment
|
227
|
+
extend Orb::Internal::Type::Union
|
228
|
+
|
229
|
+
discriminator :adjustment_type
|
143
230
|
|
144
|
-
|
231
|
+
variant :percentage_discount, -> { Orb::NewPercentageDiscount }
|
232
|
+
|
233
|
+
variant :usage_discount, -> { Orb::NewUsageDiscount }
|
234
|
+
|
235
|
+
variant :amount_discount, -> { Orb::NewAmountDiscount }
|
236
|
+
|
237
|
+
variant :minimum, -> { Orb::NewMinimum }
|
238
|
+
|
239
|
+
variant :maximum, -> { Orb::NewMaximum }
|
240
|
+
|
241
|
+
# @!method self.variants
|
242
|
+
# @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)]
|
243
|
+
end
|
244
|
+
end
|
145
245
|
|
146
|
-
|
147
|
-
#
|
246
|
+
class PlanPhase < Orb::Internal::Type::BaseModel
|
247
|
+
# @!attribute order
|
248
|
+
# Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
|
249
|
+
#
|
250
|
+
# @return [Integer]
|
251
|
+
required :order, Integer
|
252
|
+
|
253
|
+
# @!attribute align_billing_with_phase_start_date
|
254
|
+
# Align billing cycle day with phase start date.
|
255
|
+
#
|
256
|
+
# @return [Boolean, nil]
|
257
|
+
optional :align_billing_with_phase_start_date, Orb::Internal::Type::Boolean, nil?: true
|
258
|
+
|
259
|
+
# @!attribute duration
|
260
|
+
# How many terms of length `duration_unit` this phase is active for. If null, this
|
261
|
+
# phase is evergreen and active indefinitely
|
262
|
+
#
|
263
|
+
# @return [Integer, nil]
|
264
|
+
optional :duration, Integer, nil?: true
|
265
|
+
|
266
|
+
# @!attribute duration_unit
|
267
|
+
#
|
268
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::PlanPhase::DurationUnit, nil]
|
269
|
+
optional :duration_unit, enum: -> { Orb::PlanCreateParams::PlanPhase::DurationUnit }, nil?: true
|
270
|
+
|
271
|
+
# @!method initialize(order:, align_billing_with_phase_start_date: nil, duration: nil, duration_unit: nil)
|
272
|
+
# Some parameter documentations has been truncated, see
|
273
|
+
# {Orb::Models::PlanCreateParams::PlanPhase} for more details.
|
274
|
+
#
|
275
|
+
# @param order [Integer] Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
|
276
|
+
#
|
277
|
+
# @param align_billing_with_phase_start_date [Boolean, nil] Align billing cycle day with phase start date.
|
278
|
+
#
|
279
|
+
# @param duration [Integer, nil] How many terms of length `duration_unit` this phase is active for. If null, this
|
280
|
+
#
|
281
|
+
# @param duration_unit [Symbol, Orb::Models::PlanCreateParams::PlanPhase::DurationUnit, nil]
|
282
|
+
|
283
|
+
# @see Orb::Models::PlanCreateParams::PlanPhase#duration_unit
|
284
|
+
module DurationUnit
|
285
|
+
extend Orb::Internal::Type::Enum
|
286
|
+
|
287
|
+
DAILY = :daily
|
288
|
+
MONTHLY = :monthly
|
289
|
+
QUARTERLY = :quarterly
|
290
|
+
SEMI_ANNUAL = :semi_annual
|
291
|
+
ANNUAL = :annual
|
292
|
+
|
293
|
+
# @!method self.values
|
294
|
+
# @return [Array<Symbol>]
|
295
|
+
end
|
148
296
|
end
|
149
297
|
|
150
298
|
# The status of the plan to create (either active or draft). If not specified,
|
@@ -250,7 +250,7 @@ module Orb
|
|
250
250
|
# that was originally decremented from, and `amount` indicates how many credits to
|
251
251
|
# return to the customer, up to the block's initial balance.
|
252
252
|
#
|
253
|
-
# @overload create_entry(customer_id, amount:, entry_type:,
|
253
|
+
# @overload create_entry(customer_id, amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
|
254
254
|
#
|
255
255
|
# @param customer_id [String]
|
256
256
|
#
|
@@ -258,8 +258,6 @@ module Orb
|
|
258
258
|
#
|
259
259
|
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType]
|
260
260
|
#
|
261
|
-
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
|
262
|
-
#
|
263
261
|
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
|
264
262
|
#
|
265
263
|
# @param block_id [String] The ID of the block to reverse a decrement from.
|
@@ -270,6 +268,8 @@ module Orb
|
|
270
268
|
#
|
271
269
|
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
|
272
270
|
#
|
271
|
+
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
|
272
|
+
#
|
273
273
|
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
|
274
274
|
#
|
275
275
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
@@ -409,7 +409,7 @@ module Orb
|
|
409
409
|
# that was originally decremented from, and `amount` indicates how many credits to
|
410
410
|
# return to the customer, up to the block's initial balance.
|
411
411
|
#
|
412
|
-
# @overload create_entry_by_external_id(external_customer_id, amount:, entry_type:,
|
412
|
+
# @overload create_entry_by_external_id(external_customer_id, amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
|
413
413
|
#
|
414
414
|
# @param external_customer_id [String]
|
415
415
|
#
|
@@ -417,8 +417,6 @@ module Orb
|
|
417
417
|
#
|
418
418
|
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType]
|
419
419
|
#
|
420
|
-
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
|
421
|
-
#
|
422
420
|
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
|
423
421
|
#
|
424
422
|
# @param block_id [String] The ID of the block to reverse a decrement from.
|
@@ -429,6 +427,8 @@ module Orb
|
|
429
427
|
#
|
430
428
|
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
|
431
429
|
#
|
430
|
+
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
|
431
|
+
#
|
432
432
|
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
|
433
433
|
#
|
434
434
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
data/lib/orb/resources/plans.rb
CHANGED
@@ -11,13 +11,15 @@ module Orb
|
|
11
11
|
#
|
12
12
|
# This endpoint allows creation of plans including their prices.
|
13
13
|
#
|
14
|
-
# @overload create(currency:, name:, prices:, default_invoice_memo: nil, external_plan_id: nil, metadata: nil, net_terms: nil, status: nil, request_options: {})
|
14
|
+
# @overload create(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {})
|
15
15
|
#
|
16
16
|
# @param currency [String] An ISO 4217 currency string for invoices generated by subscriptions on this plan
|
17
17
|
#
|
18
18
|
# @param name [String]
|
19
19
|
#
|
20
|
-
# @param prices [Array<Orb::Models::
|
20
|
+
# @param prices [Array<Orb::Models::PlanCreateParams::Price>] Prices for this plan. If the plan has phases, this includes prices across all ph
|
21
|
+
#
|
22
|
+
# @param adjustments [Array<Orb::Models::PlanCreateParams::Adjustment>, nil] Adjustments for this plan. If the plan has phases, this includes adjustments acr
|
21
23
|
#
|
22
24
|
# @param default_invoice_memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal.
|
23
25
|
#
|
@@ -27,6 +29,8 @@ module Orb
|
|
27
29
|
#
|
28
30
|
# @param net_terms [Integer, nil] The net terms determines the difference between the invoice date and the issue d
|
29
31
|
#
|
32
|
+
# @param plan_phases [Array<Orb::Models::PlanCreateParams::PlanPhase>, nil] Configuration of pre-defined phases, each with their own prices and adjustments.
|
33
|
+
#
|
30
34
|
# @param status [Symbol, Orb::Models::PlanCreateParams::Status] The status of the plan to create (either active or draft). If not specified, thi
|
31
35
|
#
|
32
36
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
data/lib/orb/version.rb
CHANGED
data/rbi/orb/errors.rbi
CHANGED
@@ -8,6 +8,22 @@ module Orb
|
|
8
8
|
end
|
9
9
|
|
10
10
|
class ConversionError < Orb::Errors::Error
|
11
|
+
sig { returns(T.nilable(StandardError)) }
|
12
|
+
def cause
|
13
|
+
end
|
14
|
+
|
15
|
+
# @api private
|
16
|
+
sig do
|
17
|
+
params(
|
18
|
+
on: T::Class[StandardError],
|
19
|
+
method: Symbol,
|
20
|
+
target: T.anything,
|
21
|
+
value: T.anything,
|
22
|
+
cause: T.nilable(StandardError)
|
23
|
+
).returns(T.attached_class)
|
24
|
+
end
|
25
|
+
def self.new(on:, method:, target:, value:, cause: nil)
|
26
|
+
end
|
11
27
|
end
|
12
28
|
|
13
29
|
class APIError < Orb::Errors::Error
|