orb-billing 0.5.4 → 0.6.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 +26 -0
- data/README.md +1 -1
- data/lib/orb/internal/type/base_model.rb +2 -2
- data/lib/orb/internal/type/union.rb +6 -6
- data/lib/orb/internal/util.rb +5 -1
- data/lib/orb/models/alert.rb +33 -1
- data/lib/orb/models/amount_discount.rb +10 -10
- data/lib/orb/models/credit_note_create_params.rb +9 -9
- data/lib/orb/models/customer_create_params.rb +21 -3
- data/lib/orb/models/customer_update_by_external_id_params.rb +21 -3
- data/lib/orb/models/customer_update_params.rb +21 -3
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_list_response.rb +9 -1
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +1 -1
- data/lib/orb/models/customers/credits/top_up_create_params.rb +1 -1
- data/lib/orb/models/invoice.rb +626 -9
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +624 -9
- data/lib/orb/models/invoice_line_item_create_response.rb +486 -7
- data/lib/orb/models/item.rb +18 -1
- data/lib/orb/models/item_archive_params.rb +14 -0
- data/lib/orb/models/item_create_params.rb +14 -1
- data/lib/orb/models/item_update_params.rb +16 -1
- data/lib/orb/models/percentage_discount.rb +10 -10
- data/lib/orb/models/plan.rb +618 -9
- data/lib/orb/models/plan_create_params.rb +2066 -30
- data/lib/orb/models/plan_set_default_version_params.rb +22 -0
- data/lib/orb/models/plans/external_plan_id/version_create_params.rb +17948 -0
- data/lib/orb/models/plans/external_plan_id/version_create_response.rb +819 -0
- data/lib/orb/models/plans/external_plan_id/version_retrieve_params.rb +24 -0
- data/lib/orb/models/plans/external_plan_id/version_retrieve_response.rb +819 -0
- data/lib/orb/models/plans/external_plan_id_set_default_version_params.rb +24 -0
- data/lib/orb/models/plans/version_create_params.rb +17794 -0
- data/lib/orb/models/plans/version_create_response.rb +814 -0
- data/lib/orb/models/plans/version_retrieve_params.rb +22 -0
- data/lib/orb/models/plans/version_retrieve_response.rb +814 -0
- data/lib/orb/models/price.rb +4124 -70
- data/lib/orb/models/price_create_params.rb +45 -1
- data/lib/orb/models/price_evaluate_params.rb +8529 -21
- data/lib/orb/models/price_evaluate_response.rb +38 -3
- data/lib/orb/models/subscription.rb +730 -54
- data/lib/orb/models/subscription_cancel_response.rb +706 -54
- data/lib/orb/models/subscription_change_apply_response.rb +728 -54
- data/lib/orb/models/subscription_change_cancel_response.rb +728 -54
- data/lib/orb/models/subscription_change_retrieve_response.rb +728 -54
- data/lib/orb/models/subscription_create_params.rb +5992 -1698
- data/lib/orb/models/subscription_create_response.rb +706 -54
- data/lib/orb/models/subscription_fetch_schedule_response.rb +3 -3
- data/lib/orb/models/subscription_price_intervals_params.rb +1392 -76
- data/lib/orb/models/subscription_price_intervals_response.rb +712 -54
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +6005 -1723
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +716 -54
- data/lib/orb/models/subscription_trigger_phase_response.rb +708 -54
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +720 -54
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +728 -54
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +728 -54
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +1 -1
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +720 -54
- data/lib/orb/models/subscription_update_trial_response.rb +706 -54
- data/lib/orb/models/trial_discount.rb +10 -10
- data/lib/orb/models/usage_discount.rb +10 -10
- data/lib/orb/models.rb +4 -0
- data/lib/orb/resources/credit_notes.rb +3 -3
- data/lib/orb/resources/customers/balance_transactions.rb +0 -7
- data/lib/orb/resources/customers.rb +4 -7
- data/lib/orb/resources/dimensional_price_groups.rb +1 -1
- data/lib/orb/resources/items.rb +34 -2
- data/lib/orb/resources/plans/external_plan_id/versions.rb +88 -0
- data/lib/orb/resources/plans/external_plan_id.rb +32 -1
- data/lib/orb/resources/plans/versions.rb +86 -0
- data/lib/orb/resources/plans.rb +33 -2
- data/lib/orb/resources/prices.rb +23 -17
- data/lib/orb/resources/subscriptions.rb +5 -1
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +16 -1
- data/rbi/orb/models/alert.rbi +50 -3
- data/rbi/orb/models/amount_discount.rbi +8 -8
- data/rbi/orb/models/credit_note_create_params.rbi +8 -8
- data/rbi/orb/models/customer_create_params.rbi +38 -4
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +38 -4
- data/rbi/orb/models/customer_update_params.rbi +38 -4
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_list_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +2 -2
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +2 -2
- data/rbi/orb/models/invoice.rbi +1451 -35
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1524 -4
- data/rbi/orb/models/invoice_line_item_create_response.rbi +1184 -2
- data/rbi/orb/models/item.rbi +20 -1
- data/rbi/orb/models/item_archive_params.rbi +25 -0
- data/rbi/orb/models/item_create_params.rbi +18 -1
- data/rbi/orb/models/item_update_params.rbi +17 -1
- data/rbi/orb/models/percentage_discount.rbi +10 -10
- data/rbi/orb/models/plan.rbi +1339 -4
- data/rbi/orb/models/plan_create_params.rbi +3833 -29
- data/rbi/orb/models/plan_set_default_version_params.rbi +40 -0
- data/rbi/orb/models/plans/external_plan_id/version_create_params.rbi +32668 -0
- data/rbi/orb/models/plans/external_plan_id/version_create_response.rbi +1562 -0
- data/rbi/orb/models/plans/external_plan_id/version_retrieve_params.rbi +42 -0
- data/rbi/orb/models/plans/external_plan_id/version_retrieve_response.rbi +1562 -0
- data/rbi/orb/models/plans/external_plan_id_set_default_version_params.rbi +45 -0
- data/rbi/orb/models/plans/version_create_params.rbi +32607 -0
- data/rbi/orb/models/plans/version_create_response.rbi +1556 -0
- data/rbi/orb/models/plans/version_retrieve_params.rbi +37 -0
- data/rbi/orb/models/plans/version_retrieve_response.rbi +1558 -0
- data/rbi/orb/models/price.rbi +9447 -441
- data/rbi/orb/models/price_create_params.rbi +80 -0
- data/rbi/orb/models/price_evaluate_params.rbi +15684 -25
- data/rbi/orb/models/price_evaluate_response.rbi +68 -5
- data/rbi/orb/models/subscription.rbi +1654 -44
- data/rbi/orb/models/subscription_cancel_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_apply_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_cancel_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +1692 -44
- data/rbi/orb/models/subscription_create_params.rbi +10400 -2710
- data/rbi/orb/models/subscription_create_response.rbi +1692 -44
- data/rbi/orb/models/subscription_fetch_schedule_response.rbi +13 -4
- data/rbi/orb/models/subscription_price_intervals_params.rbi +2401 -49
- data/rbi/orb/models/subscription_price_intervals_response.rbi +1692 -44
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +10423 -2753
- data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +1692 -44
- data/rbi/orb/models/subscription_trigger_phase_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1692 -44
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +2 -2
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1692 -44
- data/rbi/orb/models/subscription_update_trial_response.rbi +1692 -44
- data/rbi/orb/models/trial_discount.rbi +8 -8
- data/rbi/orb/models/usage_discount.rbi +10 -10
- data/rbi/orb/models.rbi +4 -0
- data/rbi/orb/resources/credit_notes.rbi +3 -3
- data/rbi/orb/resources/customers/balance_transactions.rbi +0 -7
- data/rbi/orb/resources/customers/credits/top_ups.rbi +2 -2
- data/rbi/orb/resources/customers.rbi +7 -7
- data/rbi/orb/resources/dimensional_price_groups.rbi +1 -1
- data/rbi/orb/resources/items.rbi +20 -0
- data/rbi/orb/resources/plans/external_plan_id/versions.rbi +103 -0
- data/rbi/orb/resources/plans/external_plan_id.rbi +23 -1
- data/rbi/orb/resources/plans/versions.rbi +91 -0
- data/rbi/orb/resources/plans.rbi +27 -2
- data/rbi/orb/resources/prices.rbi +27 -17
- data/rbi/orb/resources/subscriptions.rbi +9 -1
- data/sig/orb/models/alert.rbs +20 -3
- data/sig/orb/models/amount_discount.rbs +5 -5
- data/sig/orb/models/credit_note_create_params.rbs +6 -6
- data/sig/orb/models/customer_create_params.rbs +13 -0
- data/sig/orb/models/customer_update_by_external_id_params.rbs +13 -0
- data/sig/orb/models/customer_update_params.rbs +13 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +7 -2
- data/sig/orb/models/invoice.rbs +558 -4
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +558 -4
- data/sig/orb/models/invoice_line_item_create_response.rbs +414 -2
- data/sig/orb/models/item.rbs +5 -0
- data/sig/orb/models/item_archive_params.rbs +14 -0
- data/sig/orb/models/item_create_params.rbs +10 -2
- data/sig/orb/models/item_update_params.rbs +5 -0
- data/sig/orb/models/percentage_discount.rbs +5 -5
- data/sig/orb/models/plan.rbs +538 -4
- data/sig/orb/models/plan_create_params.rbs +1460 -3
- data/sig/orb/models/plan_set_default_version_params.rbs +20 -0
- data/sig/orb/models/plans/external_plan_id/version_create_params.rbs +12923 -0
- data/sig/orb/models/plans/external_plan_id/version_create_response.rbs +664 -0
- data/sig/orb/models/plans/external_plan_id/version_retrieve_params.rbs +27 -0
- data/sig/orb/models/plans/external_plan_id/version_retrieve_response.rbs +664 -0
- data/sig/orb/models/plans/external_plan_id_set_default_version_params.rbs +25 -0
- data/sig/orb/models/plans/version_create_params.rbs +12898 -0
- data/sig/orb/models/plans/version_create_response.rbs +662 -0
- data/sig/orb/models/plans/version_retrieve_params.rbs +25 -0
- data/sig/orb/models/plans/version_retrieve_response.rbs +662 -0
- data/sig/orb/models/price.rbs +3512 -96
- data/sig/orb/models/price_create_params.rbs +32 -0
- data/sig/orb/models/price_evaluate_params.rbs +6187 -10
- data/sig/orb/models/price_evaluate_response.rbs +41 -4
- data/sig/orb/models/subscription.rbs +609 -29
- data/sig/orb/models/subscription_cancel_response.rbs +609 -29
- data/sig/orb/models/subscription_change_apply_response.rbs +621 -29
- data/sig/orb/models/subscription_change_cancel_response.rbs +621 -29
- data/sig/orb/models/subscription_change_retrieve_response.rbs +621 -29
- data/sig/orb/models/subscription_create_params.rbs +4450 -1466
- data/sig/orb/models/subscription_create_response.rbs +609 -29
- data/sig/orb/models/subscription_fetch_schedule_response.rbs +4 -4
- data/sig/orb/models/subscription_price_intervals_params.rbs +920 -24
- data/sig/orb/models/subscription_price_intervals_response.rbs +609 -29
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +4440 -1466
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +609 -29
- data/sig/orb/models/subscription_trigger_phase_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +609 -29
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +609 -29
- data/sig/orb/models/subscription_update_trial_response.rbs +609 -29
- data/sig/orb/models/trial_discount.rbs +5 -5
- data/sig/orb/models/usage_discount.rbs +5 -5
- data/sig/orb/models.rbs +4 -0
- data/sig/orb/resources/credit_notes.rbs +1 -1
- data/sig/orb/resources/items.rbs +7 -0
- data/sig/orb/resources/plans/external_plan_id/versions.rbs +30 -0
- data/sig/orb/resources/plans/external_plan_id.rbs +8 -0
- data/sig/orb/resources/plans/versions.rbs +28 -0
- data/sig/orb/resources/plans.rbs +8 -0
- data/sig/orb/resources/prices.rbs +3 -3
- data/sig/orb/resources/subscriptions.rbs +2 -0
- metadata +41 -2
data/lib/orb/models/invoice.rb
CHANGED
@@ -1306,11 +1306,22 @@ module Orb
|
|
1306
1306
|
required :amount, String
|
1307
1307
|
|
1308
1308
|
# @!attribute applies_to_price_ids
|
1309
|
+
# @deprecated
|
1310
|
+
#
|
1309
1311
|
# The price IDs that this adjustment applies to.
|
1310
1312
|
#
|
1311
1313
|
# @return [Array<String>]
|
1312
1314
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
1313
1315
|
|
1316
|
+
# @!attribute filters
|
1317
|
+
# The filters that determine which prices to apply this adjustment to.
|
1318
|
+
#
|
1319
|
+
# @return [Array<Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount::Filter>]
|
1320
|
+
required :filters,
|
1321
|
+
-> {
|
1322
|
+
Orb::Internal::Type::ArrayOf[Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter]
|
1323
|
+
}
|
1324
|
+
|
1314
1325
|
# @!attribute is_invoice_level
|
1315
1326
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
1316
1327
|
# that apply to only one price.
|
@@ -1331,7 +1342,7 @@ module Orb
|
|
1331
1342
|
# @return [Float]
|
1332
1343
|
required :usage_discount, Float
|
1333
1344
|
|
1334
|
-
# @!method initialize(id:, amount:, applies_to_price_ids:, is_invoice_level:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
1345
|
+
# @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
1335
1346
|
# Some parameter documentations has been truncated, see
|
1336
1347
|
# {Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount} for more details.
|
1337
1348
|
#
|
@@ -1341,6 +1352,8 @@ module Orb
|
|
1341
1352
|
#
|
1342
1353
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
1343
1354
|
#
|
1355
|
+
# @param filters [Array<Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
1356
|
+
#
|
1344
1357
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
1345
1358
|
#
|
1346
1359
|
# @param reason [String, nil] The reason for the adjustment.
|
@@ -1348,6 +1361,65 @@ module Orb
|
|
1348
1361
|
# @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
|
1349
1362
|
#
|
1350
1363
|
# @param adjustment_type [Symbol, :usage_discount]
|
1364
|
+
|
1365
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1366
|
+
# @!attribute field
|
1367
|
+
# The property of the price to filter on.
|
1368
|
+
#
|
1369
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field]
|
1370
|
+
required :field, enum: -> { Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field }
|
1371
|
+
|
1372
|
+
# @!attribute operator
|
1373
|
+
# Should prices that match the filter be included or excluded.
|
1374
|
+
#
|
1375
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Operator]
|
1376
|
+
required :operator,
|
1377
|
+
enum: -> {
|
1378
|
+
Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Operator
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
# @!attribute values
|
1382
|
+
# The IDs or values that match this filter.
|
1383
|
+
#
|
1384
|
+
# @return [Array<String>]
|
1385
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1386
|
+
|
1387
|
+
# @!method initialize(field:, operator:, values:)
|
1388
|
+
# @param field [Symbol, Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field] The property of the price to filter on.
|
1389
|
+
#
|
1390
|
+
# @param operator [Symbol, Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
1391
|
+
#
|
1392
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1393
|
+
|
1394
|
+
# The property of the price to filter on.
|
1395
|
+
#
|
1396
|
+
# @see Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount::Filter#field
|
1397
|
+
module Field
|
1398
|
+
extend Orb::Internal::Type::Enum
|
1399
|
+
|
1400
|
+
PRICE_ID = :price_id
|
1401
|
+
ITEM_ID = :item_id
|
1402
|
+
PRICE_TYPE = :price_type
|
1403
|
+
CURRENCY = :currency
|
1404
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1405
|
+
|
1406
|
+
# @!method self.values
|
1407
|
+
# @return [Array<Symbol>]
|
1408
|
+
end
|
1409
|
+
|
1410
|
+
# Should prices that match the filter be included or excluded.
|
1411
|
+
#
|
1412
|
+
# @see Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount::Filter#operator
|
1413
|
+
module Operator
|
1414
|
+
extend Orb::Internal::Type::Enum
|
1415
|
+
|
1416
|
+
INCLUDES = :includes
|
1417
|
+
EXCLUDES = :excludes
|
1418
|
+
|
1419
|
+
# @!method self.values
|
1420
|
+
# @return [Array<Symbol>]
|
1421
|
+
end
|
1422
|
+
end
|
1351
1423
|
end
|
1352
1424
|
|
1353
1425
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
@@ -1375,11 +1447,22 @@ module Orb
|
|
1375
1447
|
required :amount_discount, String
|
1376
1448
|
|
1377
1449
|
# @!attribute applies_to_price_ids
|
1450
|
+
# @deprecated
|
1451
|
+
#
|
1378
1452
|
# The price IDs that this adjustment applies to.
|
1379
1453
|
#
|
1380
1454
|
# @return [Array<String>]
|
1381
1455
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
1382
1456
|
|
1457
|
+
# @!attribute filters
|
1458
|
+
# The filters that determine which prices to apply this adjustment to.
|
1459
|
+
#
|
1460
|
+
# @return [Array<Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount::Filter>]
|
1461
|
+
required :filters,
|
1462
|
+
-> {
|
1463
|
+
Orb::Internal::Type::ArrayOf[Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter]
|
1464
|
+
}
|
1465
|
+
|
1383
1466
|
# @!attribute is_invoice_level
|
1384
1467
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
1385
1468
|
# that apply to only one price.
|
@@ -1393,7 +1476,7 @@ module Orb
|
|
1393
1476
|
# @return [String, nil]
|
1394
1477
|
required :reason, String, nil?: true
|
1395
1478
|
|
1396
|
-
# @!method initialize(id:, amount:, amount_discount:, applies_to_price_ids:, is_invoice_level:, reason:, adjustment_type: :amount_discount)
|
1479
|
+
# @!method initialize(id:, amount:, amount_discount:, applies_to_price_ids:, filters:, is_invoice_level:, reason:, adjustment_type: :amount_discount)
|
1397
1480
|
# Some parameter documentations has been truncated, see
|
1398
1481
|
# {Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount} for more details.
|
1399
1482
|
#
|
@@ -1405,11 +1488,72 @@ module Orb
|
|
1405
1488
|
#
|
1406
1489
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
1407
1490
|
#
|
1491
|
+
# @param filters [Array<Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
1492
|
+
#
|
1408
1493
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
1409
1494
|
#
|
1410
1495
|
# @param reason [String, nil] The reason for the adjustment.
|
1411
1496
|
#
|
1412
1497
|
# @param adjustment_type [Symbol, :amount_discount]
|
1498
|
+
|
1499
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1500
|
+
# @!attribute field
|
1501
|
+
# The property of the price to filter on.
|
1502
|
+
#
|
1503
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field]
|
1504
|
+
required :field, enum: -> { Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field }
|
1505
|
+
|
1506
|
+
# @!attribute operator
|
1507
|
+
# Should prices that match the filter be included or excluded.
|
1508
|
+
#
|
1509
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Operator]
|
1510
|
+
required :operator,
|
1511
|
+
enum: -> {
|
1512
|
+
Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Operator
|
1513
|
+
}
|
1514
|
+
|
1515
|
+
# @!attribute values
|
1516
|
+
# The IDs or values that match this filter.
|
1517
|
+
#
|
1518
|
+
# @return [Array<String>]
|
1519
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1520
|
+
|
1521
|
+
# @!method initialize(field:, operator:, values:)
|
1522
|
+
# @param field [Symbol, Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field] The property of the price to filter on.
|
1523
|
+
#
|
1524
|
+
# @param operator [Symbol, Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
1525
|
+
#
|
1526
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1527
|
+
|
1528
|
+
# The property of the price to filter on.
|
1529
|
+
#
|
1530
|
+
# @see Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount::Filter#field
|
1531
|
+
module Field
|
1532
|
+
extend Orb::Internal::Type::Enum
|
1533
|
+
|
1534
|
+
PRICE_ID = :price_id
|
1535
|
+
ITEM_ID = :item_id
|
1536
|
+
PRICE_TYPE = :price_type
|
1537
|
+
CURRENCY = :currency
|
1538
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1539
|
+
|
1540
|
+
# @!method self.values
|
1541
|
+
# @return [Array<Symbol>]
|
1542
|
+
end
|
1543
|
+
|
1544
|
+
# Should prices that match the filter be included or excluded.
|
1545
|
+
#
|
1546
|
+
# @see Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount::Filter#operator
|
1547
|
+
module Operator
|
1548
|
+
extend Orb::Internal::Type::Enum
|
1549
|
+
|
1550
|
+
INCLUDES = :includes
|
1551
|
+
EXCLUDES = :excludes
|
1552
|
+
|
1553
|
+
# @!method self.values
|
1554
|
+
# @return [Array<Symbol>]
|
1555
|
+
end
|
1556
|
+
end
|
1413
1557
|
end
|
1414
1558
|
|
1415
1559
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
@@ -1430,11 +1574,22 @@ module Orb
|
|
1430
1574
|
required :amount, String
|
1431
1575
|
|
1432
1576
|
# @!attribute applies_to_price_ids
|
1577
|
+
# @deprecated
|
1578
|
+
#
|
1433
1579
|
# The price IDs that this adjustment applies to.
|
1434
1580
|
#
|
1435
1581
|
# @return [Array<String>]
|
1436
1582
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
1437
1583
|
|
1584
|
+
# @!attribute filters
|
1585
|
+
# The filters that determine which prices to apply this adjustment to.
|
1586
|
+
#
|
1587
|
+
# @return [Array<Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount::Filter>]
|
1588
|
+
required :filters,
|
1589
|
+
-> {
|
1590
|
+
Orb::Internal::Type::ArrayOf[Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter]
|
1591
|
+
}
|
1592
|
+
|
1438
1593
|
# @!attribute is_invoice_level
|
1439
1594
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
1440
1595
|
# that apply to only one price.
|
@@ -1455,7 +1610,7 @@ module Orb
|
|
1455
1610
|
# @return [String, nil]
|
1456
1611
|
required :reason, String, nil?: true
|
1457
1612
|
|
1458
|
-
# @!method initialize(id:, amount:, applies_to_price_ids:, is_invoice_level:, percentage_discount:, reason:, adjustment_type: :percentage_discount)
|
1613
|
+
# @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, percentage_discount:, reason:, adjustment_type: :percentage_discount)
|
1459
1614
|
# Some parameter documentations has been truncated, see
|
1460
1615
|
# {Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount} for more
|
1461
1616
|
# details.
|
@@ -1466,6 +1621,8 @@ module Orb
|
|
1466
1621
|
#
|
1467
1622
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
1468
1623
|
#
|
1624
|
+
# @param filters [Array<Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
1625
|
+
#
|
1469
1626
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
1470
1627
|
#
|
1471
1628
|
# @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
|
@@ -1473,6 +1630,68 @@ module Orb
|
|
1473
1630
|
# @param reason [String, nil] The reason for the adjustment.
|
1474
1631
|
#
|
1475
1632
|
# @param adjustment_type [Symbol, :percentage_discount]
|
1633
|
+
|
1634
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1635
|
+
# @!attribute field
|
1636
|
+
# The property of the price to filter on.
|
1637
|
+
#
|
1638
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field]
|
1639
|
+
required :field,
|
1640
|
+
enum: -> {
|
1641
|
+
Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field
|
1642
|
+
}
|
1643
|
+
|
1644
|
+
# @!attribute operator
|
1645
|
+
# Should prices that match the filter be included or excluded.
|
1646
|
+
#
|
1647
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Operator]
|
1648
|
+
required :operator,
|
1649
|
+
enum: -> {
|
1650
|
+
Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Operator
|
1651
|
+
}
|
1652
|
+
|
1653
|
+
# @!attribute values
|
1654
|
+
# The IDs or values that match this filter.
|
1655
|
+
#
|
1656
|
+
# @return [Array<String>]
|
1657
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1658
|
+
|
1659
|
+
# @!method initialize(field:, operator:, values:)
|
1660
|
+
# @param field [Symbol, Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field] The property of the price to filter on.
|
1661
|
+
#
|
1662
|
+
# @param operator [Symbol, Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
1663
|
+
#
|
1664
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1665
|
+
|
1666
|
+
# The property of the price to filter on.
|
1667
|
+
#
|
1668
|
+
# @see Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount::Filter#field
|
1669
|
+
module Field
|
1670
|
+
extend Orb::Internal::Type::Enum
|
1671
|
+
|
1672
|
+
PRICE_ID = :price_id
|
1673
|
+
ITEM_ID = :item_id
|
1674
|
+
PRICE_TYPE = :price_type
|
1675
|
+
CURRENCY = :currency
|
1676
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1677
|
+
|
1678
|
+
# @!method self.values
|
1679
|
+
# @return [Array<Symbol>]
|
1680
|
+
end
|
1681
|
+
|
1682
|
+
# Should prices that match the filter be included or excluded.
|
1683
|
+
#
|
1684
|
+
# @see Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount::Filter#operator
|
1685
|
+
module Operator
|
1686
|
+
extend Orb::Internal::Type::Enum
|
1687
|
+
|
1688
|
+
INCLUDES = :includes
|
1689
|
+
EXCLUDES = :excludes
|
1690
|
+
|
1691
|
+
# @!method self.values
|
1692
|
+
# @return [Array<Symbol>]
|
1693
|
+
end
|
1694
|
+
end
|
1476
1695
|
end
|
1477
1696
|
|
1478
1697
|
class Minimum < Orb::Internal::Type::BaseModel
|
@@ -1493,11 +1712,20 @@ module Orb
|
|
1493
1712
|
required :amount, String
|
1494
1713
|
|
1495
1714
|
# @!attribute applies_to_price_ids
|
1715
|
+
# @deprecated
|
1716
|
+
#
|
1496
1717
|
# The price IDs that this adjustment applies to.
|
1497
1718
|
#
|
1498
1719
|
# @return [Array<String>]
|
1499
1720
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
1500
1721
|
|
1722
|
+
# @!attribute filters
|
1723
|
+
# The filters that determine which prices to apply this adjustment to.
|
1724
|
+
#
|
1725
|
+
# @return [Array<Orb::Models::Invoice::LineItem::Adjustment::Minimum::Filter>]
|
1726
|
+
required :filters,
|
1727
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Invoice::LineItem::Adjustment::Minimum::Filter] }
|
1728
|
+
|
1501
1729
|
# @!attribute is_invoice_level
|
1502
1730
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
1503
1731
|
# that apply to only one price.
|
@@ -1524,7 +1752,7 @@ module Orb
|
|
1524
1752
|
# @return [String, nil]
|
1525
1753
|
required :reason, String, nil?: true
|
1526
1754
|
|
1527
|
-
# @!method initialize(id:, amount:, applies_to_price_ids:, is_invoice_level:, item_id:, minimum_amount:, reason:, adjustment_type: :minimum)
|
1755
|
+
# @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, item_id:, minimum_amount:, reason:, adjustment_type: :minimum)
|
1528
1756
|
# Some parameter documentations has been truncated, see
|
1529
1757
|
# {Orb::Models::Invoice::LineItem::Adjustment::Minimum} for more details.
|
1530
1758
|
#
|
@@ -1534,6 +1762,8 @@ module Orb
|
|
1534
1762
|
#
|
1535
1763
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
1536
1764
|
#
|
1765
|
+
# @param filters [Array<Orb::Models::Invoice::LineItem::Adjustment::Minimum::Filter>] The filters that determine which prices to apply this adjustment to.
|
1766
|
+
#
|
1537
1767
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
1538
1768
|
#
|
1539
1769
|
# @param item_id [String] The item ID that revenue from this minimum will be attributed to.
|
@@ -1543,6 +1773,62 @@ module Orb
|
|
1543
1773
|
# @param reason [String, nil] The reason for the adjustment.
|
1544
1774
|
#
|
1545
1775
|
# @param adjustment_type [Symbol, :minimum]
|
1776
|
+
|
1777
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1778
|
+
# @!attribute field
|
1779
|
+
# The property of the price to filter on.
|
1780
|
+
#
|
1781
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Adjustment::Minimum::Filter::Field]
|
1782
|
+
required :field, enum: -> { Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field }
|
1783
|
+
|
1784
|
+
# @!attribute operator
|
1785
|
+
# Should prices that match the filter be included or excluded.
|
1786
|
+
#
|
1787
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Adjustment::Minimum::Filter::Operator]
|
1788
|
+
required :operator, enum: -> { Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Operator }
|
1789
|
+
|
1790
|
+
# @!attribute values
|
1791
|
+
# The IDs or values that match this filter.
|
1792
|
+
#
|
1793
|
+
# @return [Array<String>]
|
1794
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1795
|
+
|
1796
|
+
# @!method initialize(field:, operator:, values:)
|
1797
|
+
# @param field [Symbol, Orb::Models::Invoice::LineItem::Adjustment::Minimum::Filter::Field] The property of the price to filter on.
|
1798
|
+
#
|
1799
|
+
# @param operator [Symbol, Orb::Models::Invoice::LineItem::Adjustment::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
1800
|
+
#
|
1801
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1802
|
+
|
1803
|
+
# The property of the price to filter on.
|
1804
|
+
#
|
1805
|
+
# @see Orb::Models::Invoice::LineItem::Adjustment::Minimum::Filter#field
|
1806
|
+
module Field
|
1807
|
+
extend Orb::Internal::Type::Enum
|
1808
|
+
|
1809
|
+
PRICE_ID = :price_id
|
1810
|
+
ITEM_ID = :item_id
|
1811
|
+
PRICE_TYPE = :price_type
|
1812
|
+
CURRENCY = :currency
|
1813
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1814
|
+
|
1815
|
+
# @!method self.values
|
1816
|
+
# @return [Array<Symbol>]
|
1817
|
+
end
|
1818
|
+
|
1819
|
+
# Should prices that match the filter be included or excluded.
|
1820
|
+
#
|
1821
|
+
# @see Orb::Models::Invoice::LineItem::Adjustment::Minimum::Filter#operator
|
1822
|
+
module Operator
|
1823
|
+
extend Orb::Internal::Type::Enum
|
1824
|
+
|
1825
|
+
INCLUDES = :includes
|
1826
|
+
EXCLUDES = :excludes
|
1827
|
+
|
1828
|
+
# @!method self.values
|
1829
|
+
# @return [Array<Symbol>]
|
1830
|
+
end
|
1831
|
+
end
|
1546
1832
|
end
|
1547
1833
|
|
1548
1834
|
class Maximum < Orb::Internal::Type::BaseModel
|
@@ -1563,11 +1849,20 @@ module Orb
|
|
1563
1849
|
required :amount, String
|
1564
1850
|
|
1565
1851
|
# @!attribute applies_to_price_ids
|
1852
|
+
# @deprecated
|
1853
|
+
#
|
1566
1854
|
# The price IDs that this adjustment applies to.
|
1567
1855
|
#
|
1568
1856
|
# @return [Array<String>]
|
1569
1857
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
1570
1858
|
|
1859
|
+
# @!attribute filters
|
1860
|
+
# The filters that determine which prices to apply this adjustment to.
|
1861
|
+
#
|
1862
|
+
# @return [Array<Orb::Models::Invoice::LineItem::Adjustment::Maximum::Filter>]
|
1863
|
+
required :filters,
|
1864
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Invoice::LineItem::Adjustment::Maximum::Filter] }
|
1865
|
+
|
1571
1866
|
# @!attribute is_invoice_level
|
1572
1867
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
1573
1868
|
# that apply to only one price.
|
@@ -1588,7 +1883,7 @@ module Orb
|
|
1588
1883
|
# @return [String, nil]
|
1589
1884
|
required :reason, String, nil?: true
|
1590
1885
|
|
1591
|
-
# @!method initialize(id:, amount:, applies_to_price_ids:, is_invoice_level:, maximum_amount:, reason:, adjustment_type: :maximum)
|
1886
|
+
# @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, maximum_amount:, reason:, adjustment_type: :maximum)
|
1592
1887
|
# Some parameter documentations has been truncated, see
|
1593
1888
|
# {Orb::Models::Invoice::LineItem::Adjustment::Maximum} for more details.
|
1594
1889
|
#
|
@@ -1598,6 +1893,8 @@ module Orb
|
|
1598
1893
|
#
|
1599
1894
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
1600
1895
|
#
|
1896
|
+
# @param filters [Array<Orb::Models::Invoice::LineItem::Adjustment::Maximum::Filter>] The filters that determine which prices to apply this adjustment to.
|
1897
|
+
#
|
1601
1898
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
1602
1899
|
#
|
1603
1900
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
|
@@ -1605,6 +1902,62 @@ module Orb
|
|
1605
1902
|
# @param reason [String, nil] The reason for the adjustment.
|
1606
1903
|
#
|
1607
1904
|
# @param adjustment_type [Symbol, :maximum]
|
1905
|
+
|
1906
|
+
class Filter < Orb::Internal::Type::BaseModel
|
1907
|
+
# @!attribute field
|
1908
|
+
# The property of the price to filter on.
|
1909
|
+
#
|
1910
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Adjustment::Maximum::Filter::Field]
|
1911
|
+
required :field, enum: -> { Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field }
|
1912
|
+
|
1913
|
+
# @!attribute operator
|
1914
|
+
# Should prices that match the filter be included or excluded.
|
1915
|
+
#
|
1916
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Adjustment::Maximum::Filter::Operator]
|
1917
|
+
required :operator, enum: -> { Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Operator }
|
1918
|
+
|
1919
|
+
# @!attribute values
|
1920
|
+
# The IDs or values that match this filter.
|
1921
|
+
#
|
1922
|
+
# @return [Array<String>]
|
1923
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
1924
|
+
|
1925
|
+
# @!method initialize(field:, operator:, values:)
|
1926
|
+
# @param field [Symbol, Orb::Models::Invoice::LineItem::Adjustment::Maximum::Filter::Field] The property of the price to filter on.
|
1927
|
+
#
|
1928
|
+
# @param operator [Symbol, Orb::Models::Invoice::LineItem::Adjustment::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
1929
|
+
#
|
1930
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
1931
|
+
|
1932
|
+
# The property of the price to filter on.
|
1933
|
+
#
|
1934
|
+
# @see Orb::Models::Invoice::LineItem::Adjustment::Maximum::Filter#field
|
1935
|
+
module Field
|
1936
|
+
extend Orb::Internal::Type::Enum
|
1937
|
+
|
1938
|
+
PRICE_ID = :price_id
|
1939
|
+
ITEM_ID = :item_id
|
1940
|
+
PRICE_TYPE = :price_type
|
1941
|
+
CURRENCY = :currency
|
1942
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
1943
|
+
|
1944
|
+
# @!method self.values
|
1945
|
+
# @return [Array<Symbol>]
|
1946
|
+
end
|
1947
|
+
|
1948
|
+
# Should prices that match the filter be included or excluded.
|
1949
|
+
#
|
1950
|
+
# @see Orb::Models::Invoice::LineItem::Adjustment::Maximum::Filter#operator
|
1951
|
+
module Operator
|
1952
|
+
extend Orb::Internal::Type::Enum
|
1953
|
+
|
1954
|
+
INCLUDES = :includes
|
1955
|
+
EXCLUDES = :excludes
|
1956
|
+
|
1957
|
+
# @!method self.values
|
1958
|
+
# @return [Array<Symbol>]
|
1959
|
+
end
|
1960
|
+
end
|
1608
1961
|
end
|
1609
1962
|
|
1610
1963
|
# @!method self.variants
|
@@ -1616,19 +1969,27 @@ module Orb
|
|
1616
1969
|
# @see Orb::Models::Invoice::LineItem#maximum
|
1617
1970
|
class Maximum < Orb::Internal::Type::BaseModel
|
1618
1971
|
# @!attribute applies_to_price_ids
|
1972
|
+
# @deprecated
|
1973
|
+
#
|
1619
1974
|
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
1620
1975
|
# maximums, this can be a subset of prices.
|
1621
1976
|
#
|
1622
1977
|
# @return [Array<String>]
|
1623
1978
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
1624
1979
|
|
1980
|
+
# @!attribute filters
|
1981
|
+
# The filters that determine which prices to apply this maximum to.
|
1982
|
+
#
|
1983
|
+
# @return [Array<Orb::Models::Invoice::LineItem::Maximum::Filter>]
|
1984
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice::LineItem::Maximum::Filter] }
|
1985
|
+
|
1625
1986
|
# @!attribute maximum_amount
|
1626
1987
|
# Maximum amount applied
|
1627
1988
|
#
|
1628
1989
|
# @return [String]
|
1629
1990
|
required :maximum_amount, String
|
1630
1991
|
|
1631
|
-
# @!method initialize(applies_to_price_ids:, maximum_amount:)
|
1992
|
+
# @!method initialize(applies_to_price_ids:, filters:, maximum_amount:)
|
1632
1993
|
# Some parameter documentations has been truncated, see
|
1633
1994
|
# {Orb::Models::Invoice::LineItem::Maximum} for more details.
|
1634
1995
|
#
|
@@ -1636,7 +1997,65 @@ module Orb
|
|
1636
1997
|
#
|
1637
1998
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this maximum amount applies to. For plan/plan phase maxim
|
1638
1999
|
#
|
2000
|
+
# @param filters [Array<Orb::Models::Invoice::LineItem::Maximum::Filter>] The filters that determine which prices to apply this maximum to.
|
2001
|
+
#
|
1639
2002
|
# @param maximum_amount [String] Maximum amount applied
|
2003
|
+
|
2004
|
+
class Filter < Orb::Internal::Type::BaseModel
|
2005
|
+
# @!attribute field
|
2006
|
+
# The property of the price to filter on.
|
2007
|
+
#
|
2008
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Maximum::Filter::Field]
|
2009
|
+
required :field, enum: -> { Orb::Invoice::LineItem::Maximum::Filter::Field }
|
2010
|
+
|
2011
|
+
# @!attribute operator
|
2012
|
+
# Should prices that match the filter be included or excluded.
|
2013
|
+
#
|
2014
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Maximum::Filter::Operator]
|
2015
|
+
required :operator, enum: -> { Orb::Invoice::LineItem::Maximum::Filter::Operator }
|
2016
|
+
|
2017
|
+
# @!attribute values
|
2018
|
+
# The IDs or values that match this filter.
|
2019
|
+
#
|
2020
|
+
# @return [Array<String>]
|
2021
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
2022
|
+
|
2023
|
+
# @!method initialize(field:, operator:, values:)
|
2024
|
+
# @param field [Symbol, Orb::Models::Invoice::LineItem::Maximum::Filter::Field] The property of the price to filter on.
|
2025
|
+
#
|
2026
|
+
# @param operator [Symbol, Orb::Models::Invoice::LineItem::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
2027
|
+
#
|
2028
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
2029
|
+
|
2030
|
+
# The property of the price to filter on.
|
2031
|
+
#
|
2032
|
+
# @see Orb::Models::Invoice::LineItem::Maximum::Filter#field
|
2033
|
+
module Field
|
2034
|
+
extend Orb::Internal::Type::Enum
|
2035
|
+
|
2036
|
+
PRICE_ID = :price_id
|
2037
|
+
ITEM_ID = :item_id
|
2038
|
+
PRICE_TYPE = :price_type
|
2039
|
+
CURRENCY = :currency
|
2040
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
2041
|
+
|
2042
|
+
# @!method self.values
|
2043
|
+
# @return [Array<Symbol>]
|
2044
|
+
end
|
2045
|
+
|
2046
|
+
# Should prices that match the filter be included or excluded.
|
2047
|
+
#
|
2048
|
+
# @see Orb::Models::Invoice::LineItem::Maximum::Filter#operator
|
2049
|
+
module Operator
|
2050
|
+
extend Orb::Internal::Type::Enum
|
2051
|
+
|
2052
|
+
INCLUDES = :includes
|
2053
|
+
EXCLUDES = :excludes
|
2054
|
+
|
2055
|
+
# @!method self.values
|
2056
|
+
# @return [Array<Symbol>]
|
2057
|
+
end
|
2058
|
+
end
|
1640
2059
|
end
|
1641
2060
|
|
1642
2061
|
# @deprecated
|
@@ -1644,19 +2063,27 @@ module Orb
|
|
1644
2063
|
# @see Orb::Models::Invoice::LineItem#minimum
|
1645
2064
|
class Minimum < Orb::Internal::Type::BaseModel
|
1646
2065
|
# @!attribute applies_to_price_ids
|
2066
|
+
# @deprecated
|
2067
|
+
#
|
1647
2068
|
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
1648
2069
|
# minimums, this can be a subset of prices.
|
1649
2070
|
#
|
1650
2071
|
# @return [Array<String>]
|
1651
2072
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
1652
2073
|
|
2074
|
+
# @!attribute filters
|
2075
|
+
# The filters that determine which prices to apply this minimum to.
|
2076
|
+
#
|
2077
|
+
# @return [Array<Orb::Models::Invoice::LineItem::Minimum::Filter>]
|
2078
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice::LineItem::Minimum::Filter] }
|
2079
|
+
|
1653
2080
|
# @!attribute minimum_amount
|
1654
2081
|
# Minimum amount applied
|
1655
2082
|
#
|
1656
2083
|
# @return [String]
|
1657
2084
|
required :minimum_amount, String
|
1658
2085
|
|
1659
|
-
# @!method initialize(applies_to_price_ids:, minimum_amount:)
|
2086
|
+
# @!method initialize(applies_to_price_ids:, filters:, minimum_amount:)
|
1660
2087
|
# Some parameter documentations has been truncated, see
|
1661
2088
|
# {Orb::Models::Invoice::LineItem::Minimum} for more details.
|
1662
2089
|
#
|
@@ -1664,7 +2091,65 @@ module Orb
|
|
1664
2091
|
#
|
1665
2092
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this minimum amount applies to. For plan/plan phase minim
|
1666
2093
|
#
|
2094
|
+
# @param filters [Array<Orb::Models::Invoice::LineItem::Minimum::Filter>] The filters that determine which prices to apply this minimum to.
|
2095
|
+
#
|
1667
2096
|
# @param minimum_amount [String] Minimum amount applied
|
2097
|
+
|
2098
|
+
class Filter < Orb::Internal::Type::BaseModel
|
2099
|
+
# @!attribute field
|
2100
|
+
# The property of the price to filter on.
|
2101
|
+
#
|
2102
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Minimum::Filter::Field]
|
2103
|
+
required :field, enum: -> { Orb::Invoice::LineItem::Minimum::Filter::Field }
|
2104
|
+
|
2105
|
+
# @!attribute operator
|
2106
|
+
# Should prices that match the filter be included or excluded.
|
2107
|
+
#
|
2108
|
+
# @return [Symbol, Orb::Models::Invoice::LineItem::Minimum::Filter::Operator]
|
2109
|
+
required :operator, enum: -> { Orb::Invoice::LineItem::Minimum::Filter::Operator }
|
2110
|
+
|
2111
|
+
# @!attribute values
|
2112
|
+
# The IDs or values that match this filter.
|
2113
|
+
#
|
2114
|
+
# @return [Array<String>]
|
2115
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
2116
|
+
|
2117
|
+
# @!method initialize(field:, operator:, values:)
|
2118
|
+
# @param field [Symbol, Orb::Models::Invoice::LineItem::Minimum::Filter::Field] The property of the price to filter on.
|
2119
|
+
#
|
2120
|
+
# @param operator [Symbol, Orb::Models::Invoice::LineItem::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
2121
|
+
#
|
2122
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
2123
|
+
|
2124
|
+
# The property of the price to filter on.
|
2125
|
+
#
|
2126
|
+
# @see Orb::Models::Invoice::LineItem::Minimum::Filter#field
|
2127
|
+
module Field
|
2128
|
+
extend Orb::Internal::Type::Enum
|
2129
|
+
|
2130
|
+
PRICE_ID = :price_id
|
2131
|
+
ITEM_ID = :item_id
|
2132
|
+
PRICE_TYPE = :price_type
|
2133
|
+
CURRENCY = :currency
|
2134
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
2135
|
+
|
2136
|
+
# @!method self.values
|
2137
|
+
# @return [Array<Symbol>]
|
2138
|
+
end
|
2139
|
+
|
2140
|
+
# Should prices that match the filter be included or excluded.
|
2141
|
+
#
|
2142
|
+
# @see Orb::Models::Invoice::LineItem::Minimum::Filter#operator
|
2143
|
+
module Operator
|
2144
|
+
extend Orb::Internal::Type::Enum
|
2145
|
+
|
2146
|
+
INCLUDES = :includes
|
2147
|
+
EXCLUDES = :excludes
|
2148
|
+
|
2149
|
+
# @!method self.values
|
2150
|
+
# @return [Array<Symbol>]
|
2151
|
+
end
|
2152
|
+
end
|
1668
2153
|
end
|
1669
2154
|
|
1670
2155
|
module SubLineItem
|
@@ -1936,49 +2421,181 @@ module Orb
|
|
1936
2421
|
# @see Orb::Models::Invoice#maximum
|
1937
2422
|
class Maximum < Orb::Internal::Type::BaseModel
|
1938
2423
|
# @!attribute applies_to_price_ids
|
2424
|
+
# @deprecated
|
2425
|
+
#
|
1939
2426
|
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
1940
2427
|
# maximums, this can be a subset of prices.
|
1941
2428
|
#
|
1942
2429
|
# @return [Array<String>]
|
1943
2430
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
1944
2431
|
|
2432
|
+
# @!attribute filters
|
2433
|
+
# The filters that determine which prices to apply this maximum to.
|
2434
|
+
#
|
2435
|
+
# @return [Array<Orb::Models::Invoice::Maximum::Filter>]
|
2436
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice::Maximum::Filter] }
|
2437
|
+
|
1945
2438
|
# @!attribute maximum_amount
|
1946
2439
|
# Maximum amount applied
|
1947
2440
|
#
|
1948
2441
|
# @return [String]
|
1949
2442
|
required :maximum_amount, String
|
1950
2443
|
|
1951
|
-
# @!method initialize(applies_to_price_ids:, maximum_amount:)
|
2444
|
+
# @!method initialize(applies_to_price_ids:, filters:, maximum_amount:)
|
1952
2445
|
# Some parameter documentations has been truncated, see
|
1953
2446
|
# {Orb::Models::Invoice::Maximum} for more details.
|
1954
2447
|
#
|
1955
2448
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this maximum amount applies to. For plan/plan phase maxim
|
1956
2449
|
#
|
2450
|
+
# @param filters [Array<Orb::Models::Invoice::Maximum::Filter>] The filters that determine which prices to apply this maximum to.
|
2451
|
+
#
|
1957
2452
|
# @param maximum_amount [String] Maximum amount applied
|
2453
|
+
|
2454
|
+
class Filter < Orb::Internal::Type::BaseModel
|
2455
|
+
# @!attribute field
|
2456
|
+
# The property of the price to filter on.
|
2457
|
+
#
|
2458
|
+
# @return [Symbol, Orb::Models::Invoice::Maximum::Filter::Field]
|
2459
|
+
required :field, enum: -> { Orb::Invoice::Maximum::Filter::Field }
|
2460
|
+
|
2461
|
+
# @!attribute operator
|
2462
|
+
# Should prices that match the filter be included or excluded.
|
2463
|
+
#
|
2464
|
+
# @return [Symbol, Orb::Models::Invoice::Maximum::Filter::Operator]
|
2465
|
+
required :operator, enum: -> { Orb::Invoice::Maximum::Filter::Operator }
|
2466
|
+
|
2467
|
+
# @!attribute values
|
2468
|
+
# The IDs or values that match this filter.
|
2469
|
+
#
|
2470
|
+
# @return [Array<String>]
|
2471
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
2472
|
+
|
2473
|
+
# @!method initialize(field:, operator:, values:)
|
2474
|
+
# @param field [Symbol, Orb::Models::Invoice::Maximum::Filter::Field] The property of the price to filter on.
|
2475
|
+
#
|
2476
|
+
# @param operator [Symbol, Orb::Models::Invoice::Maximum::Filter::Operator] Should prices that match the filter be included or excluded.
|
2477
|
+
#
|
2478
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
2479
|
+
|
2480
|
+
# The property of the price to filter on.
|
2481
|
+
#
|
2482
|
+
# @see Orb::Models::Invoice::Maximum::Filter#field
|
2483
|
+
module Field
|
2484
|
+
extend Orb::Internal::Type::Enum
|
2485
|
+
|
2486
|
+
PRICE_ID = :price_id
|
2487
|
+
ITEM_ID = :item_id
|
2488
|
+
PRICE_TYPE = :price_type
|
2489
|
+
CURRENCY = :currency
|
2490
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
2491
|
+
|
2492
|
+
# @!method self.values
|
2493
|
+
# @return [Array<Symbol>]
|
2494
|
+
end
|
2495
|
+
|
2496
|
+
# Should prices that match the filter be included or excluded.
|
2497
|
+
#
|
2498
|
+
# @see Orb::Models::Invoice::Maximum::Filter#operator
|
2499
|
+
module Operator
|
2500
|
+
extend Orb::Internal::Type::Enum
|
2501
|
+
|
2502
|
+
INCLUDES = :includes
|
2503
|
+
EXCLUDES = :excludes
|
2504
|
+
|
2505
|
+
# @!method self.values
|
2506
|
+
# @return [Array<Symbol>]
|
2507
|
+
end
|
2508
|
+
end
|
1958
2509
|
end
|
1959
2510
|
|
1960
2511
|
# @see Orb::Models::Invoice#minimum
|
1961
2512
|
class Minimum < Orb::Internal::Type::BaseModel
|
1962
2513
|
# @!attribute applies_to_price_ids
|
2514
|
+
# @deprecated
|
2515
|
+
#
|
1963
2516
|
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
1964
2517
|
# minimums, this can be a subset of prices.
|
1965
2518
|
#
|
1966
2519
|
# @return [Array<String>]
|
1967
2520
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
1968
2521
|
|
2522
|
+
# @!attribute filters
|
2523
|
+
# The filters that determine which prices to apply this minimum to.
|
2524
|
+
#
|
2525
|
+
# @return [Array<Orb::Models::Invoice::Minimum::Filter>]
|
2526
|
+
required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice::Minimum::Filter] }
|
2527
|
+
|
1969
2528
|
# @!attribute minimum_amount
|
1970
2529
|
# Minimum amount applied
|
1971
2530
|
#
|
1972
2531
|
# @return [String]
|
1973
2532
|
required :minimum_amount, String
|
1974
2533
|
|
1975
|
-
# @!method initialize(applies_to_price_ids:, minimum_amount:)
|
2534
|
+
# @!method initialize(applies_to_price_ids:, filters:, minimum_amount:)
|
1976
2535
|
# Some parameter documentations has been truncated, see
|
1977
2536
|
# {Orb::Models::Invoice::Minimum} for more details.
|
1978
2537
|
#
|
1979
2538
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this minimum amount applies to. For plan/plan phase minim
|
1980
2539
|
#
|
2540
|
+
# @param filters [Array<Orb::Models::Invoice::Minimum::Filter>] The filters that determine which prices to apply this minimum to.
|
2541
|
+
#
|
1981
2542
|
# @param minimum_amount [String] Minimum amount applied
|
2543
|
+
|
2544
|
+
class Filter < Orb::Internal::Type::BaseModel
|
2545
|
+
# @!attribute field
|
2546
|
+
# The property of the price to filter on.
|
2547
|
+
#
|
2548
|
+
# @return [Symbol, Orb::Models::Invoice::Minimum::Filter::Field]
|
2549
|
+
required :field, enum: -> { Orb::Invoice::Minimum::Filter::Field }
|
2550
|
+
|
2551
|
+
# @!attribute operator
|
2552
|
+
# Should prices that match the filter be included or excluded.
|
2553
|
+
#
|
2554
|
+
# @return [Symbol, Orb::Models::Invoice::Minimum::Filter::Operator]
|
2555
|
+
required :operator, enum: -> { Orb::Invoice::Minimum::Filter::Operator }
|
2556
|
+
|
2557
|
+
# @!attribute values
|
2558
|
+
# The IDs or values that match this filter.
|
2559
|
+
#
|
2560
|
+
# @return [Array<String>]
|
2561
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
2562
|
+
|
2563
|
+
# @!method initialize(field:, operator:, values:)
|
2564
|
+
# @param field [Symbol, Orb::Models::Invoice::Minimum::Filter::Field] The property of the price to filter on.
|
2565
|
+
#
|
2566
|
+
# @param operator [Symbol, Orb::Models::Invoice::Minimum::Filter::Operator] Should prices that match the filter be included or excluded.
|
2567
|
+
#
|
2568
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
2569
|
+
|
2570
|
+
# The property of the price to filter on.
|
2571
|
+
#
|
2572
|
+
# @see Orb::Models::Invoice::Minimum::Filter#field
|
2573
|
+
module Field
|
2574
|
+
extend Orb::Internal::Type::Enum
|
2575
|
+
|
2576
|
+
PRICE_ID = :price_id
|
2577
|
+
ITEM_ID = :item_id
|
2578
|
+
PRICE_TYPE = :price_type
|
2579
|
+
CURRENCY = :currency
|
2580
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
2581
|
+
|
2582
|
+
# @!method self.values
|
2583
|
+
# @return [Array<Symbol>]
|
2584
|
+
end
|
2585
|
+
|
2586
|
+
# Should prices that match the filter be included or excluded.
|
2587
|
+
#
|
2588
|
+
# @see Orb::Models::Invoice::Minimum::Filter#operator
|
2589
|
+
module Operator
|
2590
|
+
extend Orb::Internal::Type::Enum
|
2591
|
+
|
2592
|
+
INCLUDES = :includes
|
2593
|
+
EXCLUDES = :excludes
|
2594
|
+
|
2595
|
+
# @!method self.values
|
2596
|
+
# @return [Array<Symbol>]
|
2597
|
+
end
|
2598
|
+
end
|
1982
2599
|
end
|
1983
2600
|
|
1984
2601
|
class PaymentAttempt < Orb::Internal::Type::BaseModel
|