orb-billing 0.1.0.pre.alpha.38 → 0.1.1
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/README.md +10 -2
- data/lib/orb/client.rb +4 -0
- data/lib/orb/internal/transport/base_client.rb +2 -2
- data/lib/orb/internal/transport/pooled_net_requester.rb +15 -6
- data/lib/orb/internal/type/array_of.rb +12 -2
- data/lib/orb/internal/type/base_model.rb +23 -22
- data/lib/orb/internal/type/boolean.rb +5 -1
- data/lib/orb/internal/type/converter.rb +62 -39
- data/lib/orb/internal/type/enum.rb +13 -9
- data/lib/orb/internal/type/hash_of.rb +6 -2
- data/lib/orb/internal/type/io_like.rb +75 -0
- data/lib/orb/internal/type/request_parameters.rb +11 -2
- data/lib/orb/internal/type/union.rb +7 -3
- data/lib/orb/internal/type/unknown.rb +5 -1
- data/lib/orb/internal/util.rb +81 -26
- data/lib/orb/models/alert.rb +9 -9
- data/lib/orb/models/alert_create_for_customer_params.rb +3 -3
- data/lib/orb/models/alert_create_for_external_customer_params.rb +3 -3
- data/lib/orb/models/alert_create_for_subscription_params.rb +3 -3
- data/lib/orb/models/alert_list_params.rb +5 -5
- data/lib/orb/models/alert_update_params.rb +3 -3
- data/lib/orb/models/amount_discount.rb +1 -1
- data/lib/orb/models/billable_metric.rb +7 -7
- data/lib/orb/models/coupon.rb +7 -7
- data/lib/orb/models/coupon_create_params.rb +2 -2
- data/lib/orb/models/coupon_list_params.rb +2 -2
- data/lib/orb/models/coupons/subscription_list_params.rb +1 -1
- data/lib/orb/models/credit_note.rb +1 -1
- data/lib/orb/models/credit_note_list_params.rb +5 -5
- data/lib/orb/models/customer.rb +232 -232
- data/lib/orb/models/customer_create_params.rb +223 -223
- data/lib/orb/models/customer_list_params.rb +5 -5
- data/lib/orb/models/customer_update_by_external_id_params.rb +224 -224
- data/lib/orb/models/customer_update_params.rb +224 -224
- data/lib/orb/models/customers/balance_transaction_create_response.rb +2 -2
- data/lib/orb/models/customers/balance_transaction_list_params.rb +5 -5
- data/lib/orb/models/customers/balance_transaction_list_response.rb +2 -2
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +6 -6
- data/lib/orb/models/customers/cost_list_params.rb +6 -6
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +2 -2
- data/lib/orb/models/customers/credit_list_params.rb +2 -2
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +20 -20
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +22 -22
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +20 -20
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +22 -22
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +5 -5
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +22 -22
- data/lib/orb/models/customers/credits/ledger_list_params.rb +5 -5
- data/lib/orb/models/customers/credits/ledger_list_response.rb +22 -22
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -8
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +7 -7
- data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -8
- data/lib/orb/models/customers/credits/top_up_create_response.rb +7 -7
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +1 -1
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +7 -7
- data/lib/orb/models/customers/credits/top_up_list_params.rb +1 -1
- data/lib/orb/models/customers/credits/top_up_list_response.rb +7 -7
- data/lib/orb/models/dimensional_price_group.rb +7 -7
- data/lib/orb/models/dimensional_price_group_create_params.rb +2 -2
- data/lib/orb/models/dimensional_price_group_list_params.rb +1 -1
- data/lib/orb/models/event_ingest_params.rb +7 -7
- data/lib/orb/models/event_ingest_response.rb +4 -4
- data/lib/orb/models/event_search_params.rb +5 -5
- data/lib/orb/models/event_search_response.rb +8 -8
- data/lib/orb/models/event_update_params.rb +4 -4
- data/lib/orb/models/events/backfill_close_response.rb +7 -7
- data/lib/orb/models/events/backfill_create_params.rb +11 -11
- data/lib/orb/models/events/backfill_create_response.rb +7 -7
- data/lib/orb/models/events/backfill_fetch_response.rb +7 -7
- data/lib/orb/models/events/backfill_list_params.rb +1 -1
- data/lib/orb/models/events/backfill_list_response.rb +7 -7
- data/lib/orb/models/events/backfill_revert_response.rb +7 -7
- data/lib/orb/models/events/event_volumes.rb +1 -1
- data/lib/orb/models/events/volume_list_params.rb +7 -7
- data/lib/orb/models/invoice.rb +270 -270
- data/lib/orb/models/invoice_create_params.rb +12 -11
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +266 -266
- data/lib/orb/models/invoice_issue_params.rb +4 -4
- data/lib/orb/models/invoice_line_item_create_params.rb +1 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +27 -27
- data/lib/orb/models/invoice_list_params.rb +12 -12
- data/lib/orb/models/invoice_update_params.rb +2 -2
- data/lib/orb/models/item.rb +2 -2
- data/lib/orb/models/item_list_params.rb +1 -1
- data/lib/orb/models/metric_create_params.rb +2 -2
- data/lib/orb/models/metric_list_params.rb +5 -5
- data/lib/orb/models/metric_update_params.rb +2 -2
- data/lib/orb/models/percentage_discount.rb +2 -2
- data/lib/orb/models/plan.rb +35 -35
- data/lib/orb/models/plan_create_params.rb +267 -267
- data/lib/orb/models/plan_list_params.rb +5 -5
- data/lib/orb/models/plan_update_params.rb +4 -4
- data/lib/orb/models/plans/external_plan_id_update_params.rb +4 -4
- data/lib/orb/models/price.rb +158 -158
- data/lib/orb/models/price_create_params.rb +20 -20
- data/lib/orb/models/price_evaluate_params.rb +4 -4
- data/lib/orb/models/price_list_params.rb +1 -1
- data/lib/orb/models/price_update_params.rb +2 -2
- data/lib/orb/models/prices/external_price_id_update_params.rb +2 -2
- data/lib/orb/models/subscription.rb +114 -87
- data/lib/orb/models/subscription_cancel_params.rb +3 -3
- data/lib/orb/models/subscription_cancel_response.rb +150 -72
- data/lib/orb/models/subscription_change_apply_params.rb +33 -0
- data/lib/orb/models/subscription_change_apply_response.rb +1372 -0
- data/lib/orb/models/subscription_change_cancel_params.rb +19 -0
- data/lib/orb/models/subscription_change_cancel_response.rb +1372 -0
- data/lib/orb/models/subscription_change_retrieve_params.rb +19 -0
- data/lib/orb/models/subscription_change_retrieve_response.rb +1372 -0
- data/lib/orb/models/subscription_create_params.rb +641 -641
- data/lib/orb/models/subscription_create_response.rb +150 -72
- data/lib/orb/models/subscription_fetch_costs_params.rb +6 -6
- data/lib/orb/models/subscription_fetch_schedule_params.rb +5 -5
- data/lib/orb/models/subscription_fetch_schedule_response.rb +2 -2
- data/lib/orb/models/subscription_fetch_usage_params.rb +8 -8
- data/lib/orb/models/subscription_list_params.rb +5 -5
- data/lib/orb/models/subscription_price_intervals_params.rb +323 -323
- data/lib/orb/models/subscription_price_intervals_response.rb +152 -72
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +651 -651
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +152 -72
- data/lib/orb/models/subscription_trigger_phase_params.rb +3 -3
- data/lib/orb/models/subscription_trigger_phase_response.rb +152 -72
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +152 -72
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +153 -73
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +152 -72
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -8
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +152 -72
- data/lib/orb/models/subscription_update_params.rb +10 -10
- data/lib/orb/models/subscription_update_trial_params.rb +3 -3
- data/lib/orb/models/subscription_update_trial_response.rb +152 -72
- data/lib/orb/models/trial_discount.rb +1 -1
- data/lib/orb/models/usage_discount.rb +2 -2
- data/lib/orb/request_options.rb +7 -7
- data/lib/orb/resources/alerts.rb +38 -38
- data/lib/orb/resources/coupons/subscriptions.rb +3 -3
- data/lib/orb/resources/coupons.rb +9 -9
- data/lib/orb/resources/credit_notes.rb +8 -8
- data/lib/orb/resources/customers/balance_transactions.rb +26 -26
- data/lib/orb/resources/customers/costs.rb +232 -232
- data/lib/orb/resources/customers/credits/ledger.rb +344 -344
- data/lib/orb/resources/customers/credits/top_ups.rb +12 -12
- data/lib/orb/resources/customers/credits.rb +8 -8
- data/lib/orb/resources/customers.rb +59 -59
- data/lib/orb/resources/dimensional_price_groups.rb +6 -6
- data/lib/orb/resources/events/backfills.rb +49 -49
- data/lib/orb/resources/events/volume.rb +10 -10
- data/lib/orb/resources/events.rb +295 -295
- data/lib/orb/resources/invoice_line_items.rb +1 -1
- data/lib/orb/resources/invoices.rb +38 -38
- data/lib/orb/resources/items.rb +1 -1
- data/lib/orb/resources/metrics.rb +11 -11
- data/lib/orb/resources/plans/external_plan_id.rb +14 -14
- data/lib/orb/resources/plans.rb +22 -22
- data/lib/orb/resources/prices/external_price_id.rb +4 -4
- data/lib/orb/resources/prices.rb +30 -30
- data/lib/orb/resources/subscription_changes.rb +87 -0
- data/lib/orb/resources/subscriptions.rb +813 -813
- data/lib/orb/resources/top_level.rb +4 -4
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +8 -0
- data/rbi/lib/orb/client.rbi +5 -4
- data/rbi/lib/orb/errors.rbi +3 -6
- data/rbi/lib/orb/internal/page.rbi +3 -6
- data/rbi/lib/orb/internal/transport/base_client.rbi +13 -27
- data/rbi/lib/orb/internal/transport/pooled_net_requester.rbi +8 -14
- data/rbi/lib/orb/internal/type/array_of.rbi +14 -18
- data/rbi/lib/orb/internal/type/base_model.rbi +51 -66
- data/rbi/lib/orb/internal/type/base_page.rbi +5 -10
- data/rbi/lib/orb/internal/type/boolean.rbi +12 -10
- data/rbi/lib/orb/internal/type/converter.rbi +44 -37
- data/rbi/lib/orb/internal/type/enum.rbi +24 -21
- data/rbi/lib/orb/internal/type/hash_of.rbi +13 -18
- data/rbi/lib/orb/internal/type/io_like.rbi +49 -0
- data/rbi/lib/orb/internal/type/request_parameters.rbi +1 -2
- data/rbi/lib/orb/internal/type/union.rbi +19 -21
- data/rbi/lib/orb/internal/type/unknown.rbi +10 -9
- data/rbi/lib/orb/internal/util.rbi +67 -70
- data/rbi/lib/orb/internal.rbi +1 -1
- data/rbi/lib/orb/models/alert.rbi +21 -33
- data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +8 -13
- data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +8 -13
- data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +8 -13
- data/rbi/lib/orb/models/alert_disable_params.rbi +2 -4
- data/rbi/lib/orb/models/alert_enable_params.rbi +2 -4
- data/rbi/lib/orb/models/alert_list_params.rbi +3 -6
- data/rbi/lib/orb/models/alert_retrieve_params.rbi +2 -4
- data/rbi/lib/orb/models/alert_update_params.rbi +7 -11
- data/rbi/lib/orb/models/amount_discount.rbi +4 -7
- data/rbi/lib/orb/models/billable_metric.rbi +10 -13
- data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -2
- data/rbi/lib/orb/models/coupon.rbi +9 -11
- data/rbi/lib/orb/models/coupon_archive_params.rbi +2 -4
- data/rbi/lib/orb/models/coupon_create_params.rbi +8 -14
- data/rbi/lib/orb/models/coupon_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/coupon_list_params.rbi +3 -4
- data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +3 -5
- data/rbi/lib/orb/models/credit_note.rbi +22 -45
- data/rbi/lib/orb/models/credit_note_create_params.rbi +5 -10
- data/rbi/lib/orb/models/credit_note_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -6
- data/rbi/lib/orb/models/customer.rbi +256 -281
- data/rbi/lib/orb/models/customer_create_params.rbi +251 -276
- data/rbi/lib/orb/models/customer_delete_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_fetch_by_external_id_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_list_params.rbi +3 -6
- data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +252 -277
- data/rbi/lib/orb/models/customer_update_params.rbi +252 -277
- data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +3 -6
- data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +10 -19
- data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -6
- data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +10 -19
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +8 -10
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +6 -12
- data/rbi/lib/orb/models/customers/cost_list_params.rbi +8 -10
- data/rbi/lib/orb/models/customers/cost_list_response.rbi +6 -12
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +3 -4
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +2 -4
- data/rbi/lib/orb/models/customers/credit_list_params.rbi +3 -4
- data/rbi/lib/orb/models/customers/credit_list_response.rbi +2 -4
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +26 -33
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +79 -136
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +26 -33
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +78 -135
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +5 -10
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +79 -136
- data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +5 -10
- data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +74 -131
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +13 -19
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +12 -18
- data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +13 -19
- data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +12 -18
- data/rbi/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +2 -4
- data/rbi/lib/orb/models/customers/credits/top_up_delete_params.rbi +2 -4
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +3 -5
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +12 -18
- data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +3 -5
- data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +12 -18
- data/rbi/lib/orb/models/dimensional_price_group.rbi +8 -9
- data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -7
- data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +3 -5
- data/rbi/lib/orb/models/dimensional_price_group_retrieve_params.rbi +2 -4
- data/rbi/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +2 -4
- data/rbi/lib/orb/models/dimensional_price_groups.rbi +2 -4
- data/rbi/lib/orb/models/discount.rbi +1 -2
- data/rbi/lib/orb/models/evaluate_price_group.rbi +3 -6
- data/rbi/lib/orb/models/event_deprecate_params.rbi +2 -4
- data/rbi/lib/orb/models/event_deprecate_response.rbi +2 -4
- data/rbi/lib/orb/models/event_ingest_params.rbi +10 -13
- data/rbi/lib/orb/models/event_ingest_response.rbi +10 -16
- data/rbi/lib/orb/models/event_search_params.rbi +7 -9
- data/rbi/lib/orb/models/event_search_response.rbi +11 -14
- data/rbi/lib/orb/models/event_update_params.rbi +5 -6
- data/rbi/lib/orb/models/event_update_response.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_close_params.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_close_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_create_params.rbi +13 -16
- data/rbi/lib/orb/models/events/backfill_create_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_list_params.rbi +3 -5
- data/rbi/lib/orb/models/events/backfill_list_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_revert_params.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_revert_response.rbi +10 -14
- data/rbi/lib/orb/models/events/event_volumes.rbi +5 -9
- data/rbi/lib/orb/models/events/volume_list_params.rbi +9 -11
- data/rbi/lib/orb/models/invoice.rbi +388 -465
- data/rbi/lib/orb/models/invoice_create_params.rbi +19 -26
- data/rbi/lib/orb/models/invoice_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_fetch_upcoming_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +381 -460
- data/rbi/lib/orb/models/invoice_issue_params.rbi +6 -8
- data/rbi/lib/orb/models/invoice_level_discount.rbi +1 -2
- data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +3 -5
- data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +101 -143
- data/rbi/lib/orb/models/invoice_list_params.rbi +8 -13
- data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_pay_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_update_params.rbi +4 -6
- data/rbi/lib/orb/models/invoice_void_params.rbi +2 -4
- data/rbi/lib/orb/models/item.rbi +7 -12
- data/rbi/lib/orb/models/item_create_params.rbi +2 -4
- data/rbi/lib/orb/models/item_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/item_list_params.rbi +3 -5
- data/rbi/lib/orb/models/item_update_params.rbi +5 -10
- data/rbi/lib/orb/models/metric_create_params.rbi +4 -6
- data/rbi/lib/orb/models/metric_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/metric_list_params.rbi +3 -6
- data/rbi/lib/orb/models/metric_update_params.rbi +4 -6
- data/rbi/lib/orb/models/pagination_metadata.rbi +2 -4
- data/rbi/lib/orb/models/percentage_discount.rbi +5 -8
- data/rbi/lib/orb/models/plan.rbi +180 -219
- data/rbi/lib/orb/models/plan_create_params.rbi +670 -951
- data/rbi/lib/orb/models/plan_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/plan_list_params.rbi +4 -8
- data/rbi/lib/orb/models/plan_update_params.rbi +6 -8
- data/rbi/lib/orb/models/plans/external_plan_id_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +6 -8
- data/rbi/lib/orb/models/price.rbi +827 -1494
- data/rbi/lib/orb/models/price_create_params.rbi +60 -101
- data/rbi/lib/orb/models/price_evaluate_params.rbi +6 -9
- data/rbi/lib/orb/models/price_evaluate_response.rbi +2 -4
- data/rbi/lib/orb/models/price_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/price_list_params.rbi +3 -5
- data/rbi/lib/orb/models/price_update_params.rbi +4 -6
- data/rbi/lib/orb/models/prices/external_price_id_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +4 -6
- data/rbi/lib/orb/models/subscription.rbi +167 -187
- data/rbi/lib/orb/models/subscription_cancel_params.rbi +5 -7
- data/rbi/lib/orb/models/subscription_cancel_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_change_apply_params.rbi +40 -0
- data/rbi/lib/orb/models/subscription_change_apply_response.rbi +1554 -0
- data/rbi/lib/orb/models/subscription_change_cancel_params.rbi +18 -0
- data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +1565 -0
- data/rbi/lib/orb/models/subscription_change_retrieve_params.rbi +18 -0
- data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +1581 -0
- data/rbi/lib/orb/models/subscription_create_params.rbi +1372 -1968
- data/rbi/lib/orb/models/subscription_create_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +8 -10
- data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +6 -12
- data/rbi/lib/orb/models/subscription_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -6
- data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +6 -10
- data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +12 -17
- data/rbi/lib/orb/models/subscription_list_params.rbi +4 -8
- data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +772 -1124
- data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +228 -178
- data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +1396 -1993
- data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +238 -182
- data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +5 -7
- data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +238 -182
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +265 -199
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +264 -198
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -15
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +238 -182
- data/rbi/lib/orb/models/subscription_update_params.rbi +12 -15
- data/rbi/lib/orb/models/subscription_update_trial_params.rbi +6 -9
- data/rbi/lib/orb/models/subscription_update_trial_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_usage.rbi +24 -43
- data/rbi/lib/orb/models/subscriptions.rbi +2 -4
- data/rbi/lib/orb/models/top_level_ping_params.rbi +2 -4
- data/rbi/lib/orb/models/top_level_ping_response.rbi +2 -4
- data/rbi/lib/orb/models/trial_discount.rbi +4 -8
- data/rbi/lib/orb/models/usage_discount.rbi +5 -8
- data/rbi/lib/orb/request_options.rbi +9 -11
- data/rbi/lib/orb/resources/alerts.rbi +44 -60
- data/rbi/lib/orb/resources/coupons/subscriptions.rbi +6 -9
- data/rbi/lib/orb/resources/coupons.rbi +18 -25
- data/rbi/lib/orb/resources/credit_notes.rbi +9 -15
- data/rbi/lib/orb/resources/customers/balance_transactions.rbi +26 -31
- data/rbi/lib/orb/resources/customers/costs.rbi +241 -246
- data/rbi/lib/orb/resources/customers/credits/ledger.rbi +387 -396
- data/rbi/lib/orb/resources/customers/credits/top_ups.rbi +29 -40
- data/rbi/lib/orb/resources/customers/credits.rbi +15 -20
- data/rbi/lib/orb/resources/customers.rbi +407 -417
- data/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +2 -4
- data/rbi/lib/orb/resources/dimensional_price_groups.rbi +13 -19
- data/rbi/lib/orb/resources/events/backfills.rbi +61 -69
- data/rbi/lib/orb/resources/events/volume.rbi +19 -22
- data/rbi/lib/orb/resources/events.rbi +311 -319
- data/rbi/lib/orb/resources/invoice_line_items.rbi +4 -7
- data/rbi/lib/orb/resources/invoices.rbi +62 -76
- data/rbi/lib/orb/resources/items.rbi +7 -14
- data/rbi/lib/orb/resources/metrics.rbi +17 -25
- data/rbi/lib/orb/resources/plans/external_plan_id.rbi +21 -25
- data/rbi/lib/orb/resources/plans.rbi +63 -71
- data/rbi/lib/orb/resources/prices/external_price_id.rbi +9 -13
- data/rbi/lib/orb/resources/prices.rbi +77 -87
- data/rbi/lib/orb/resources/subscription_changes.rbi +61 -0
- data/rbi/lib/orb/resources/subscriptions.rbi +933 -963
- data/rbi/lib/orb/resources/top_level.rbi +6 -8
- data/sig/orb/client.rbs +2 -0
- data/sig/orb/internal/transport/pooled_net_requester.rbs +1 -1
- data/sig/orb/internal/type/array_of.rbs +5 -2
- data/sig/orb/internal/type/base_model.rbs +5 -2
- data/sig/orb/internal/type/boolean.rbs +5 -2
- data/sig/orb/internal/type/converter.rbs +11 -5
- data/sig/orb/internal/type/enum.rbs +5 -2
- data/sig/orb/internal/type/hash_of.rbs +5 -2
- data/sig/orb/internal/type/io_like.rbs +23 -0
- data/sig/orb/internal/type/union.rbs +5 -2
- data/sig/orb/internal/type/unknown.rbs +5 -2
- data/sig/orb/internal/util.rbs +17 -2
- data/sig/orb/models/subscription.rbs +14 -0
- data/sig/orb/models/subscription_cancel_response.rbs +47 -2
- data/sig/orb/models/subscription_change_apply_params.rbs +24 -0
- data/sig/orb/models/subscription_change_apply_response.rbs +784 -0
- data/sig/orb/models/subscription_change_cancel_params.rbs +15 -0
- data/sig/orb/models/subscription_change_cancel_response.rbs +784 -0
- data/sig/orb/models/subscription_change_retrieve_params.rbs +15 -0
- data/sig/orb/models/subscription_change_retrieve_response.rbs +784 -0
- data/sig/orb/models/subscription_create_response.rbs +47 -2
- data/sig/orb/models/subscription_price_intervals_response.rbs +47 -2
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +47 -2
- data/sig/orb/models/subscription_trigger_phase_response.rbs +47 -2
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +47 -2
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +47 -2
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +47 -2
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +47 -2
- data/sig/orb/models/subscription_update_trial_response.rbs +47 -2
- data/sig/orb/resources/customers.rbs +2 -2
- data/sig/orb/resources/subscription_changes.rbs +24 -0
- metadata +28 -4
@@ -11,14 +11,14 @@ module Orb
|
|
11
11
|
|
12
12
|
# @!attribute active_plan_phase_order
|
13
13
|
# The current plan phase that is active, only if the subscription's plan has
|
14
|
-
#
|
14
|
+
# phases.
|
15
15
|
#
|
16
16
|
# @return [Integer, nil]
|
17
17
|
required :active_plan_phase_order, Integer, nil?: true
|
18
18
|
|
19
19
|
# @!attribute adjustment_intervals
|
20
20
|
# The adjustment intervals for this subscription sorted by the start_date of the
|
21
|
-
#
|
21
|
+
# adjustment interval.
|
22
22
|
#
|
23
23
|
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval>]
|
24
24
|
required :adjustment_intervals,
|
@@ -26,8 +26,8 @@ module Orb
|
|
26
26
|
|
27
27
|
# @!attribute auto_collection
|
28
28
|
# Determines whether issued invoices for this subscription will automatically be
|
29
|
-
#
|
30
|
-
#
|
29
|
+
# charged with the saved payment method on the due date. This property defaults to
|
30
|
+
# the plan's behavior. If null, defaults to the customer's setting.
|
31
31
|
#
|
32
32
|
# @return [Boolean, nil]
|
33
33
|
required :auto_collection, Orb::Internal::Type::Boolean, nil?: true
|
@@ -40,9 +40,9 @@ module Orb
|
|
40
40
|
|
41
41
|
# @!attribute billing_cycle_day
|
42
42
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
43
|
+
# number of days in a month is greater than this value, the last day of the month
|
44
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
45
|
+
# period begins on the 30th.
|
46
46
|
#
|
47
47
|
# @return [Integer]
|
48
48
|
required :billing_cycle_day, Integer
|
@@ -54,46 +54,46 @@ module Orb
|
|
54
54
|
|
55
55
|
# @!attribute current_billing_period_end_date
|
56
56
|
# The end of the current billing period. This is an exclusive timestamp, such that
|
57
|
-
#
|
58
|
-
#
|
57
|
+
# the instant returned is not part of the billing period. Set to null for
|
58
|
+
# subscriptions that are not currently active.
|
59
59
|
#
|
60
60
|
# @return [Time, nil]
|
61
61
|
required :current_billing_period_end_date, Time, nil?: true
|
62
62
|
|
63
63
|
# @!attribute current_billing_period_start_date
|
64
64
|
# The start date of the current billing period. This is an inclusive timestamp;
|
65
|
-
#
|
66
|
-
#
|
65
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
66
|
+
# if the subscription is not currently active.
|
67
67
|
#
|
68
68
|
# @return [Time, nil]
|
69
69
|
required :current_billing_period_start_date, Time, nil?: true
|
70
70
|
|
71
71
|
# @!attribute customer
|
72
72
|
# A customer is a buyer of your products, and the other party to the billing
|
73
|
-
#
|
73
|
+
# relationship.
|
74
74
|
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
75
|
+
# In Orb, customers are assigned system generated identifiers automatically, but
|
76
|
+
# it's often desirable to have these match existing identifiers in your system. To
|
77
|
+
# avoid having to denormalize Orb ID information, you can pass in an
|
78
|
+
# `external_customer_id` with your own identifier. See
|
79
|
+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
|
80
|
+
# information about how these aliases work in Orb.
|
81
81
|
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
82
|
+
# In addition to having an identifier in your system, a customer may exist in a
|
83
|
+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
|
84
|
+
# `payment_provider` enum field to express this mapping.
|
85
85
|
#
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#
|
86
|
+
# A customer also has a timezone (from the standard
|
87
|
+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
88
|
+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
89
|
+
# information on what this timezone parameter influences within Orb.
|
90
90
|
#
|
91
91
|
# @return [Orb::Models::Customer]
|
92
92
|
required :customer, -> { Orb::Models::Customer }
|
93
93
|
|
94
94
|
# @!attribute default_invoice_memo
|
95
95
|
# Determines the default memo on this subscriptions' invoices. Note that if this
|
96
|
-
#
|
96
|
+
# is not provided, it is determined by the plan configuration.
|
97
97
|
#
|
98
98
|
# @return [String, nil]
|
99
99
|
required :default_invoice_memo, String, nil?: true
|
@@ -131,9 +131,9 @@ module Orb
|
|
131
131
|
|
132
132
|
# @!attribute metadata
|
133
133
|
# User specified key-value pairs for the resource. If not present, this defaults
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
134
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
135
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
136
|
+
# `null`.
|
137
137
|
#
|
138
138
|
# @return [Hash{Symbol=>String}]
|
139
139
|
required :metadata, Orb::Internal::Type::HashOf[String]
|
@@ -147,18 +147,26 @@ module Orb
|
|
147
147
|
|
148
148
|
# @!attribute net_terms
|
149
149
|
# Determines the difference between the invoice issue date for subscription
|
150
|
-
#
|
151
|
-
#
|
152
|
-
#
|
150
|
+
# invoices as the date that they are due. A value of `0` here represents that the
|
151
|
+
# invoice is due on issue, whereas a value of `30` represents that the customer
|
152
|
+
# has a month to pay the invoice.
|
153
153
|
#
|
154
154
|
# @return [Integer]
|
155
155
|
required :net_terms, Integer
|
156
156
|
|
157
|
+
# @!attribute pending_subscription_change
|
158
|
+
# A pending subscription change if one exists on this subscription.
|
159
|
+
#
|
160
|
+
# @return [Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange, nil]
|
161
|
+
required :pending_subscription_change,
|
162
|
+
-> { Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange },
|
163
|
+
nil?: true
|
164
|
+
|
157
165
|
# @!attribute plan
|
158
166
|
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
159
|
-
#
|
160
|
-
#
|
161
|
-
#
|
167
|
+
# subscribed to by a customer. Plans define the billing behavior of the
|
168
|
+
# subscription. You can see more about how to configure prices in the
|
169
|
+
# [Price resource](/reference/price).
|
162
170
|
#
|
163
171
|
# @return [Orb::Models::Plan]
|
164
172
|
required :plan, -> { Orb::Models::Plan }
|
@@ -191,6 +199,16 @@ module Orb
|
|
191
199
|
# @return [Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo]
|
192
200
|
required :trial_info, -> { Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo }
|
193
201
|
|
202
|
+
# @!attribute changed_resources
|
203
|
+
# The resources that were changed as part of this operation. Only present when
|
204
|
+
# fetched through the subscription changes API or if the
|
205
|
+
# `include_changed_resources` parameter was passed in the request.
|
206
|
+
#
|
207
|
+
# @return [Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources, nil]
|
208
|
+
optional :changed_resources,
|
209
|
+
-> { Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources },
|
210
|
+
nil?: true
|
211
|
+
|
194
212
|
# @!parse
|
195
213
|
# # @param id [String]
|
196
214
|
# # @param active_plan_phase_order [Integer, nil]
|
@@ -211,12 +229,14 @@ module Orb
|
|
211
229
|
# # @param metadata [Hash{Symbol=>String}]
|
212
230
|
# # @param minimum_intervals [Array<Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval>]
|
213
231
|
# # @param net_terms [Integer]
|
232
|
+
# # @param pending_subscription_change [Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange, nil]
|
214
233
|
# # @param plan [Orb::Models::Plan]
|
215
234
|
# # @param price_intervals [Array<Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval>]
|
216
235
|
# # @param redeemed_coupon [Orb::Models::SubscriptionUpdateTrialResponse::RedeemedCoupon, nil]
|
217
236
|
# # @param start_date [Time]
|
218
237
|
# # @param status [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::Status]
|
219
238
|
# # @param trial_info [Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo]
|
239
|
+
# # @param changed_resources [Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources, nil]
|
220
240
|
# #
|
221
241
|
# def initialize(
|
222
242
|
# id:,
|
@@ -238,12 +258,14 @@ module Orb
|
|
238
258
|
# metadata:,
|
239
259
|
# minimum_intervals:,
|
240
260
|
# net_terms:,
|
261
|
+
# pending_subscription_change:,
|
241
262
|
# plan:,
|
242
263
|
# price_intervals:,
|
243
264
|
# redeemed_coupon:,
|
244
265
|
# start_date:,
|
245
266
|
# status:,
|
246
267
|
# trial_info:,
|
268
|
+
# changed_resources: nil,
|
247
269
|
# **
|
248
270
|
# )
|
249
271
|
# super
|
@@ -332,7 +354,7 @@ module Orb
|
|
332
354
|
|
333
355
|
# @!attribute is_invoice_level
|
334
356
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
335
|
-
#
|
357
|
+
# that apply to only one price.
|
336
358
|
#
|
337
359
|
# @return [Boolean]
|
338
360
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
@@ -351,7 +373,7 @@ module Orb
|
|
351
373
|
|
352
374
|
# @!attribute usage_discount
|
353
375
|
# The number of usage units by which to discount the price this adjustment applies
|
354
|
-
#
|
376
|
+
# to in a given billing period.
|
355
377
|
#
|
356
378
|
# @return [Float]
|
357
379
|
required :usage_discount, Float
|
@@ -394,7 +416,7 @@ module Orb
|
|
394
416
|
|
395
417
|
# @!attribute amount_discount
|
396
418
|
# The amount by which to discount the prices this adjustment applies to in a given
|
397
|
-
#
|
419
|
+
# billing period.
|
398
420
|
#
|
399
421
|
# @return [String]
|
400
422
|
required :amount_discount, String
|
@@ -407,7 +429,7 @@ module Orb
|
|
407
429
|
|
408
430
|
# @!attribute is_invoice_level
|
409
431
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
410
|
-
#
|
432
|
+
# that apply to only one price.
|
411
433
|
#
|
412
434
|
# @return [Boolean]
|
413
435
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
@@ -468,14 +490,14 @@ module Orb
|
|
468
490
|
|
469
491
|
# @!attribute is_invoice_level
|
470
492
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
471
|
-
#
|
493
|
+
# that apply to only one price.
|
472
494
|
#
|
473
495
|
# @return [Boolean]
|
474
496
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
475
497
|
|
476
498
|
# @!attribute percentage_discount
|
477
499
|
# The percentage (as a value between 0 and 1) by which to discount the price
|
478
|
-
#
|
500
|
+
# intervals this adjustment applies to in a given billing period.
|
479
501
|
#
|
480
502
|
# @return [Float]
|
481
503
|
required :percentage_discount, Float
|
@@ -536,7 +558,7 @@ module Orb
|
|
536
558
|
|
537
559
|
# @!attribute is_invoice_level
|
538
560
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
539
|
-
#
|
561
|
+
# that apply to only one price.
|
540
562
|
#
|
541
563
|
# @return [Boolean]
|
542
564
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
@@ -549,7 +571,7 @@ module Orb
|
|
549
571
|
|
550
572
|
# @!attribute minimum_amount
|
551
573
|
# The minimum amount to charge in a given billing period for the prices this
|
552
|
-
#
|
574
|
+
# adjustment applies to.
|
553
575
|
#
|
554
576
|
# @return [String]
|
555
577
|
required :minimum_amount, String
|
@@ -612,14 +634,14 @@ module Orb
|
|
612
634
|
|
613
635
|
# @!attribute is_invoice_level
|
614
636
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
615
|
-
#
|
637
|
+
# that apply to only one price.
|
616
638
|
#
|
617
639
|
# @return [Boolean]
|
618
640
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
619
641
|
|
620
642
|
# @!attribute maximum_amount
|
621
643
|
# The maximum amount to charge in a given billing period for the prices this
|
622
|
-
#
|
644
|
+
# adjustment applies to.
|
623
645
|
#
|
624
646
|
# @return [String]
|
625
647
|
required :maximum_amount, String
|
@@ -671,24 +693,24 @@ module Orb
|
|
671
693
|
class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
|
672
694
|
# @!attribute day
|
673
695
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
674
|
-
#
|
675
|
-
#
|
676
|
-
#
|
696
|
+
# number of days in a month is greater than this value, the last day of the month
|
697
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
698
|
+
# period begins on the 30th.
|
677
699
|
#
|
678
700
|
# @return [Integer]
|
679
701
|
required :day, Integer
|
680
702
|
|
681
703
|
# @!attribute month
|
682
704
|
# The month on which the billing cycle is anchored (e.g. a quarterly price
|
683
|
-
#
|
684
|
-
#
|
705
|
+
# anchored in February would have cycles starting February, May, August, and
|
706
|
+
# November).
|
685
707
|
#
|
686
708
|
# @return [Integer, nil]
|
687
709
|
optional :month, Integer, nil?: true
|
688
710
|
|
689
711
|
# @!attribute year
|
690
712
|
# The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
|
691
|
-
#
|
713
|
+
# anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
|
692
714
|
#
|
693
715
|
# @return [Integer, nil]
|
694
716
|
optional :year, Integer, nil?: true
|
@@ -802,7 +824,7 @@ module Orb
|
|
802
824
|
|
803
825
|
# @!attribute percentage_discount
|
804
826
|
# Only available if discount_type is `percentage`.This is a number between 0
|
805
|
-
#
|
827
|
+
# and 1.
|
806
828
|
#
|
807
829
|
# @return [Float]
|
808
830
|
required :percentage_discount, Float
|
@@ -868,7 +890,7 @@ module Orb
|
|
868
890
|
|
869
891
|
# @!attribute usage_discount
|
870
892
|
# Only available if discount_type is `usage`. Number of usage units that this
|
871
|
-
#
|
893
|
+
# discount is for
|
872
894
|
#
|
873
895
|
# @return [Float]
|
874
896
|
required :usage_discount, Float
|
@@ -954,7 +976,7 @@ module Orb
|
|
954
976
|
|
955
977
|
# @!attribute maximum_amount
|
956
978
|
# The maximum amount to charge in a given billing period for the price intervals
|
957
|
-
#
|
979
|
+
# this transform applies to.
|
958
980
|
#
|
959
981
|
# @return [String]
|
960
982
|
required :maximum_amount, String
|
@@ -998,7 +1020,7 @@ module Orb
|
|
998
1020
|
|
999
1021
|
# @!attribute minimum_amount
|
1000
1022
|
# The minimum amount to charge in a given billing period for the price intervals
|
1001
|
-
#
|
1023
|
+
# this minimum applies to.
|
1002
1024
|
#
|
1003
1025
|
# @return [String]
|
1004
1026
|
required :minimum_amount, String
|
@@ -1021,6 +1043,23 @@ module Orb
|
|
1021
1043
|
# def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
|
1022
1044
|
end
|
1023
1045
|
|
1046
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse#pending_subscription_change
|
1047
|
+
class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
|
1048
|
+
# @!attribute id
|
1049
|
+
#
|
1050
|
+
# @return [String]
|
1051
|
+
required :id, String
|
1052
|
+
|
1053
|
+
# @!parse
|
1054
|
+
# # A pending subscription change if one exists on this subscription.
|
1055
|
+
# #
|
1056
|
+
# # @param id [String]
|
1057
|
+
# #
|
1058
|
+
# def initialize(id:, **) = super
|
1059
|
+
|
1060
|
+
# def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
|
1061
|
+
end
|
1062
|
+
|
1024
1063
|
class PriceInterval < Orb::Internal::Type::BaseModel
|
1025
1064
|
# @!attribute id
|
1026
1065
|
#
|
@@ -1035,23 +1074,23 @@ module Orb
|
|
1035
1074
|
|
1036
1075
|
# @!attribute current_billing_period_end_date
|
1037
1076
|
# The end of the current billing period. This is an exclusive timestamp, such that
|
1038
|
-
#
|
1039
|
-
#
|
1077
|
+
# the instant returned is exactly the end of the billing period. Set to null if
|
1078
|
+
# this price interval is not currently active.
|
1040
1079
|
#
|
1041
1080
|
# @return [Time, nil]
|
1042
1081
|
required :current_billing_period_end_date, Time, nil?: true
|
1043
1082
|
|
1044
1083
|
# @!attribute current_billing_period_start_date
|
1045
1084
|
# The start date of the current billing period. This is an inclusive timestamp;
|
1046
|
-
#
|
1047
|
-
#
|
1085
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
1086
|
+
# if this price interval is not currently active.
|
1048
1087
|
#
|
1049
1088
|
# @return [Time, nil]
|
1050
1089
|
required :current_billing_period_start_date, Time, nil?: true
|
1051
1090
|
|
1052
1091
|
# @!attribute end_date
|
1053
1092
|
# The end date of the price interval. This is the date that Orb stops billing for
|
1054
|
-
#
|
1093
|
+
# this price.
|
1055
1094
|
#
|
1056
1095
|
# @return [Time, nil]
|
1057
1096
|
required :end_date, Time, nil?: true
|
@@ -1064,7 +1103,7 @@ module Orb
|
|
1064
1103
|
|
1065
1104
|
# @!attribute fixed_fee_quantity_transitions
|
1066
1105
|
# The fixed fee quantity transitions for this price interval. This is only
|
1067
|
-
#
|
1106
|
+
# relevant for fixed fees.
|
1068
1107
|
#
|
1069
1108
|
# @return [Array<Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition>, nil]
|
1070
1109
|
required :fixed_fee_quantity_transitions,
|
@@ -1073,37 +1112,37 @@ module Orb
|
|
1073
1112
|
|
1074
1113
|
# @!attribute price
|
1075
1114
|
# The Price resource represents a price that can be billed on a subscription,
|
1076
|
-
#
|
1077
|
-
#
|
1115
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
1116
|
+
# take a quantity and determine an amount to bill.
|
1078
1117
|
#
|
1079
|
-
#
|
1080
|
-
#
|
1081
|
-
#
|
1118
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
1119
|
+
# is serialized differently in a given Price object. The model_type field
|
1120
|
+
# determines the key for the configuration object that is present.
|
1082
1121
|
#
|
1083
|
-
#
|
1084
|
-
#
|
1122
|
+
# For more on the types of prices, see
|
1123
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1085
1124
|
#
|
1086
1125
|
# @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice]
|
1087
1126
|
required :price, union: -> { Orb::Models::Price }
|
1088
1127
|
|
1089
1128
|
# @!attribute start_date
|
1090
1129
|
# The start date of the price interval. This is the date that Orb starts billing
|
1091
|
-
#
|
1130
|
+
# for this price.
|
1092
1131
|
#
|
1093
1132
|
# @return [Time]
|
1094
1133
|
required :start_date, Time
|
1095
1134
|
|
1096
1135
|
# @!attribute usage_customer_ids
|
1097
1136
|
# A list of customer IDs whose usage events will be aggregated and billed under
|
1098
|
-
#
|
1137
|
+
# this price interval.
|
1099
1138
|
#
|
1100
1139
|
# @return [Array<String>, nil]
|
1101
1140
|
required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
1102
1141
|
|
1103
1142
|
# @!parse
|
1104
1143
|
# # The Price Interval resource represents a period of time for which a price will
|
1105
|
-
# #
|
1106
|
-
# #
|
1144
|
+
# # bill on a subscription. A subscription’s price intervals define its billing
|
1145
|
+
# # behavior.
|
1107
1146
|
# #
|
1108
1147
|
# # @param id [String]
|
1109
1148
|
# # @param billing_cycle_day [Integer]
|
@@ -1217,6 +1256,47 @@ module Orb
|
|
1217
1256
|
|
1218
1257
|
# def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
|
1219
1258
|
end
|
1259
|
+
|
1260
|
+
# @see Orb::Models::SubscriptionUpdateTrialResponse#changed_resources
|
1261
|
+
class ChangedResources < Orb::Internal::Type::BaseModel
|
1262
|
+
# @!attribute created_credit_notes
|
1263
|
+
# The credit notes that were created as part of this operation.
|
1264
|
+
#
|
1265
|
+
# @return [Array<Orb::Models::CreditNote>]
|
1266
|
+
required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::Models::CreditNote] }
|
1267
|
+
|
1268
|
+
# @!attribute created_invoices
|
1269
|
+
# The invoices that were created as part of this operation.
|
1270
|
+
#
|
1271
|
+
# @return [Array<Orb::Models::Invoice>]
|
1272
|
+
required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Models::Invoice] }
|
1273
|
+
|
1274
|
+
# @!attribute voided_credit_notes
|
1275
|
+
# The credit notes that were voided as part of this operation.
|
1276
|
+
#
|
1277
|
+
# @return [Array<Orb::Models::CreditNote>]
|
1278
|
+
required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::Models::CreditNote] }
|
1279
|
+
|
1280
|
+
# @!attribute voided_invoices
|
1281
|
+
# The invoices that were voided as part of this operation.
|
1282
|
+
#
|
1283
|
+
# @return [Array<Orb::Models::Invoice>]
|
1284
|
+
required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Models::Invoice] }
|
1285
|
+
|
1286
|
+
# @!parse
|
1287
|
+
# # The resources that were changed as part of this operation. Only present when
|
1288
|
+
# # fetched through the subscription changes API or if the
|
1289
|
+
# # `include_changed_resources` parameter was passed in the request.
|
1290
|
+
# #
|
1291
|
+
# # @param created_credit_notes [Array<Orb::Models::CreditNote>]
|
1292
|
+
# # @param created_invoices [Array<Orb::Models::Invoice>]
|
1293
|
+
# # @param voided_credit_notes [Array<Orb::Models::CreditNote>]
|
1294
|
+
# # @param voided_invoices [Array<Orb::Models::Invoice>]
|
1295
|
+
# #
|
1296
|
+
# def initialize(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:, **) = super
|
1297
|
+
|
1298
|
+
# def initialize: (Hash | Orb::Internal::Type::BaseModel) -> void
|
1299
|
+
end
|
1220
1300
|
end
|
1221
1301
|
end
|
1222
1302
|
end
|
@@ -5,7 +5,7 @@ module Orb
|
|
5
5
|
class TrialDiscount < Orb::Internal::Type::BaseModel
|
6
6
|
# @!attribute applies_to_price_ids
|
7
7
|
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
8
|
-
#
|
8
|
+
# this can be a subset of prices.
|
9
9
|
#
|
10
10
|
# @return [Array<String>]
|
11
11
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
@@ -5,7 +5,7 @@ module Orb
|
|
5
5
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
6
6
|
# @!attribute applies_to_price_ids
|
7
7
|
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
8
|
-
#
|
8
|
+
# this can be a subset of prices.
|
9
9
|
#
|
10
10
|
# @return [Array<String>]
|
11
11
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
@@ -17,7 +17,7 @@ module Orb
|
|
17
17
|
|
18
18
|
# @!attribute usage_discount
|
19
19
|
# Only available if discount_type is `usage`. Number of usage units that this
|
20
|
-
#
|
20
|
+
# discount is for
|
21
21
|
#
|
22
22
|
# @return [Float]
|
23
23
|
required :usage_discount, Float
|
data/lib/orb/request_options.rb
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
module Orb
|
4
4
|
# Specify HTTP behaviour to use for a specific request. These options supplement
|
5
|
-
#
|
5
|
+
# or override those provided at the client level.
|
6
6
|
#
|
7
|
-
#
|
8
|
-
#
|
7
|
+
# When making a request, you can pass an actual {RequestOptions} instance, or
|
8
|
+
# simply pass a Hash with symbol keys matching the attributes on this class.
|
9
9
|
class RequestOptions < Orb::Internal::Type::BaseModel
|
10
10
|
# @api private
|
11
11
|
#
|
@@ -27,28 +27,28 @@ module Orb
|
|
27
27
|
|
28
28
|
# @!attribute idempotency_key
|
29
29
|
# Idempotency key to send with request and all associated retries. Will only be
|
30
|
-
#
|
30
|
+
# sent for write requests.
|
31
31
|
#
|
32
32
|
# @return [String, nil]
|
33
33
|
optional :idempotency_key, String
|
34
34
|
|
35
35
|
# @!attribute extra_query
|
36
36
|
# Extra query params to send with the request. These are `.merge`’d into any
|
37
|
-
#
|
37
|
+
# `query` given at the client level.
|
38
38
|
#
|
39
39
|
# @return [Hash{String=>Array<String>, String, nil}, nil]
|
40
40
|
optional :extra_query, Orb::Internal::Type::HashOf[Orb::Internal::Type::ArrayOf[String]]
|
41
41
|
|
42
42
|
# @!attribute extra_headers
|
43
43
|
# Extra headers to send with the request. These are `.merged`’d into any
|
44
|
-
#
|
44
|
+
# `extra_headers` given at the client level.
|
45
45
|
#
|
46
46
|
# @return [Hash{String=>String, nil}, nil]
|
47
47
|
optional :extra_headers, Orb::Internal::Type::HashOf[String, nil?: true]
|
48
48
|
|
49
49
|
# @!attribute extra_body
|
50
50
|
# Extra data to send with the request. These are deep merged into any data
|
51
|
-
#
|
51
|
+
# generated as part of the normal request.
|
52
52
|
#
|
53
53
|
# @return [Object, nil]
|
54
54
|
optional :extra_body, Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown]
|