orb-billing 0.1.3 → 0.3.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/.ignore +2 -0
- data/CHANGELOG.md +65 -0
- data/README.md +61 -51
- data/lib/orb/client.rb +7 -6
- data/lib/orb/file_part.rb +55 -0
- data/lib/orb/internal/page.rb +37 -39
- data/lib/orb/internal/transport/base_client.rb +21 -11
- data/lib/orb/internal/transport/pooled_net_requester.rb +3 -3
- data/lib/orb/internal/type/array_of.rb +28 -2
- data/lib/orb/internal/type/base_model.rb +83 -21
- data/lib/orb/internal/type/base_page.rb +10 -1
- data/lib/orb/internal/type/boolean.rb +6 -0
- data/lib/orb/internal/type/converter.rb +28 -1
- data/lib/orb/internal/type/enum.rb +28 -8
- data/lib/orb/internal/type/{io_like.rb → file_input.rb} +35 -15
- data/lib/orb/internal/type/hash_of.rb +28 -2
- data/lib/orb/internal/type/request_parameters.rb +1 -2
- data/lib/orb/internal/type/union.rb +27 -4
- data/lib/orb/internal/type/unknown.rb +6 -0
- data/lib/orb/internal/util.rb +105 -70
- data/lib/orb/internal.rb +5 -2
- data/lib/orb/models/alert.rb +68 -71
- data/lib/orb/models/alert_create_for_customer_params.rb +20 -25
- data/lib/orb/models/alert_create_for_external_customer_params.rb +20 -25
- data/lib/orb/models/alert_create_for_subscription_params.rb +20 -25
- data/lib/orb/models/alert_disable_params.rb +5 -9
- data/lib/orb/models/alert_enable_params.rb +5 -9
- data/lib/orb/models/alert_list_params.rb +26 -36
- data/lib/orb/models/alert_retrieve_params.rb +3 -8
- data/lib/orb/models/alert_update_params.rb +14 -18
- data/lib/orb/models/amount_discount.rb +14 -14
- data/lib/orb/models/billable_metric.rb +23 -20
- data/lib/orb/models/billing_cycle_relative_date.rb +2 -5
- data/lib/orb/models/coupon.rb +28 -21
- data/lib/orb/models/coupon_archive_params.rb +3 -8
- data/lib/orb/models/coupon_create_params.rb +24 -29
- data/lib/orb/models/coupon_fetch_params.rb +3 -8
- data/lib/orb/models/coupon_list_params.rb +17 -17
- data/lib/orb/models/coupons/subscription_list_params.rb +12 -15
- data/lib/orb/models/credit_note.rb +100 -166
- data/lib/orb/models/credit_note_create_params.rb +15 -23
- data/lib/orb/models/credit_note_fetch_params.rb +3 -8
- data/lib/orb/models/credit_note_list_params.rb +20 -30
- data/lib/orb/models/customer.rb +224 -271
- data/lib/orb/models/customer_create_params.rb +211 -252
- data/lib/orb/models/customer_delete_params.rb +3 -8
- data/lib/orb/models/customer_fetch_by_external_id_params.rb +3 -8
- data/lib/orb/models/customer_fetch_params.rb +3 -8
- data/lib/orb/models/customer_list_params.rb +20 -30
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +3 -8
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +3 -8
- data/lib/orb/models/customer_update_by_external_id_params.rb +207 -250
- data/lib/orb/models/customer_update_params.rb +207 -250
- data/lib/orb/models/customers/balance_transaction_create_params.rb +11 -16
- data/lib/orb/models/customers/balance_transaction_create_response.rb +33 -51
- data/lib/orb/models/customers/balance_transaction_list_params.rb +20 -30
- data/lib/orb/models/customers/balance_transaction_list_response.rb +33 -51
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +17 -17
- data/lib/orb/models/customers/cost_list_by_external_id_response.rb +22 -26
- data/lib/orb/models/customers/cost_list_params.rb +17 -17
- data/lib/orb/models/customers/cost_list_response.rb +22 -26
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +18 -22
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +10 -17
- data/lib/orb/models/customers/credit_list_params.rb +18 -22
- data/lib/orb/models/customers/credit_list_response.rb +10 -17
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +64 -66
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +300 -406
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +63 -66
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +300 -406
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +33 -48
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +300 -406
- data/lib/orb/models/customers/credits/ledger_list_params.rb +32 -48
- data/lib/orb/models/customers/credits/ledger_list_response.rb +300 -406
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +47 -50
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +43 -46
- data/lib/orb/models/customers/credits/top_up_create_params.rb +46 -50
- data/lib/orb/models/customers/credits/top_up_create_response.rb +42 -46
- data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +4 -9
- data/lib/orb/models/customers/credits/top_up_delete_params.rb +4 -9
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +12 -15
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +43 -46
- data/lib/orb/models/customers/credits/top_up_list_params.rb +12 -15
- data/lib/orb/models/customers/credits/top_up_list_response.rb +42 -46
- data/lib/orb/models/dimensional_price_group.rb +21 -15
- data/lib/orb/models/dimensional_price_group_create_params.rb +17 -23
- data/lib/orb/models/dimensional_price_group_list_params.rb +12 -15
- data/lib/orb/models/dimensional_price_group_retrieve_params.rb +3 -8
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +3 -8
- data/lib/orb/models/dimensional_price_groups.rb +3 -7
- data/lib/orb/models/discount.rb +2 -3
- data/lib/orb/models/evaluate_price_group.rb +8 -11
- data/lib/orb/models/event_deprecate_params.rb +3 -8
- data/lib/orb/models/event_deprecate_response.rb +2 -6
- data/lib/orb/models/event_ingest_params.rb +33 -27
- data/lib/orb/models/event_ingest_response.rb +23 -24
- data/lib/orb/models/event_search_params.rb +15 -11
- data/lib/orb/models/event_search_response.rb +27 -22
- data/lib/orb/models/event_update_params.rb +19 -13
- data/lib/orb/models/event_update_response.rb +2 -6
- data/lib/orb/models/events/backfill_close_params.rb +3 -8
- data/lib/orb/models/events/backfill_close_response.rb +34 -39
- data/lib/orb/models/events/backfill_create_params.rb +28 -32
- data/lib/orb/models/events/backfill_create_response.rb +34 -39
- data/lib/orb/models/events/backfill_fetch_params.rb +3 -8
- data/lib/orb/models/events/backfill_fetch_response.rb +34 -39
- data/lib/orb/models/events/backfill_list_params.rb +12 -15
- data/lib/orb/models/events/backfill_list_response.rb +34 -39
- data/lib/orb/models/events/backfill_revert_params.rb +3 -8
- data/lib/orb/models/events/backfill_revert_response.rb +34 -39
- data/lib/orb/models/events/event_volumes.rb +11 -17
- data/lib/orb/models/events/volume_list_params.rb +19 -22
- data/lib/orb/models/invoice.rb +589 -637
- data/lib/orb/models/invoice_create_params.rb +52 -61
- data/lib/orb/models/invoice_fetch_params.rb +3 -8
- data/lib/orb/models/invoice_fetch_upcoming_params.rb +4 -9
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +584 -631
- data/lib/orb/models/invoice_issue_params.rb +10 -14
- data/lib/orb/models/invoice_level_discount.rb +2 -3
- data/lib/orb/models/invoice_line_item_create_params.rb +19 -14
- data/lib/orb/models/invoice_line_item_create_response.rb +247 -269
- data/lib/orb/models/invoice_list_params.rb +51 -66
- data/lib/orb/models/invoice_mark_paid_params.rb +9 -11
- data/lib/orb/models/invoice_pay_params.rb +3 -8
- data/lib/orb/models/invoice_update_params.rb +9 -9
- data/lib/orb/models/invoice_void_params.rb +3 -8
- data/lib/orb/models/item.rb +14 -25
- data/lib/orb/models/item_create_params.rb +5 -9
- data/lib/orb/models/item_fetch_params.rb +3 -8
- data/lib/orb/models/item_list_params.rb +12 -15
- data/lib/orb/models/item_update_params.rb +10 -22
- data/lib/orb/models/metric_create_params.rb +17 -13
- data/lib/orb/models/metric_fetch_params.rb +3 -8
- data/lib/orb/models/metric_list_params.rb +20 -30
- data/lib/orb/models/metric_update_params.rb +9 -9
- data/lib/orb/models/pagination_metadata.rb +3 -7
- data/lib/orb/models/percentage_discount.rb +15 -14
- data/lib/orb/models/plan.rb +250 -279
- data/lib/orb/models/plan_create_params.rb +1623 -1984
- data/lib/orb/models/plan_fetch_params.rb +3 -8
- data/lib/orb/models/plan_list_params.rb +25 -42
- data/lib/orb/models/plan_update_params.rb +12 -10
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +3 -8
- data/lib/orb/models/plans/external_plan_id_update_params.rb +12 -10
- data/lib/orb/models/price.rb +2709 -3820
- data/lib/orb/models/price_create_params.rb +203 -244
- data/lib/orb/models/price_evaluate_params.rb +21 -30
- data/lib/orb/models/price_evaluate_response.rb +2 -6
- data/lib/orb/models/price_fetch_params.rb +3 -8
- data/lib/orb/models/price_list_params.rb +12 -15
- data/lib/orb/models/price_update_params.rb +9 -9
- data/lib/orb/models/prices/external_price_id_fetch_params.rb +3 -8
- data/lib/orb/models/prices/external_price_id_update_params.rb +9 -9
- data/lib/orb/models/subscription.rb +343 -382
- data/lib/orb/models/subscription_cancel_params.rb +16 -16
- data/lib/orb/models/subscription_cancel_response.rb +339 -377
- data/lib/orb/models/subscription_change_apply_params.rb +7 -10
- data/lib/orb/models/subscription_change_apply_response.rb +365 -398
- data/lib/orb/models/subscription_change_cancel_params.rb +3 -8
- data/lib/orb/models/subscription_change_cancel_response.rb +365 -398
- data/lib/orb/models/subscription_change_retrieve_params.rb +3 -8
- data/lib/orb/models/subscription_change_retrieve_response.rb +366 -398
- data/lib/orb/models/subscription_create_params.rb +3771 -4402
- data/lib/orb/models/subscription_create_response.rb +339 -377
- data/lib/orb/models/subscription_fetch_costs_params.rb +17 -17
- data/lib/orb/models/subscription_fetch_costs_response.rb +22 -26
- data/lib/orb/models/subscription_fetch_params.rb +3 -8
- data/lib/orb/models/subscription_fetch_schedule_params.rb +20 -30
- data/lib/orb/models/subscription_fetch_schedule_response.rb +15 -17
- data/lib/orb/models/subscription_fetch_usage_params.rb +32 -43
- data/lib/orb/models/subscription_list_params.rb +28 -41
- data/lib/orb/models/subscription_price_intervals_params.rb +2018 -2472
- data/lib/orb/models/subscription_price_intervals_response.rb +342 -377
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +3764 -4392
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +342 -377
- data/lib/orb/models/subscription_trigger_phase_params.rb +12 -10
- data/lib/orb/models/subscription_trigger_phase_response.rb +341 -377
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +3 -8
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +342 -377
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +5 -9
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +343 -377
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +3 -8
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +343 -377
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +22 -33
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +342 -377
- data/lib/orb/models/subscription_update_params.rb +21 -23
- data/lib/orb/models/subscription_update_trial_params.rb +15 -18
- data/lib/orb/models/subscription_update_trial_response.rb +341 -377
- data/lib/orb/models/subscription_usage.rb +37 -80
- data/lib/orb/models/subscriptions.rb +3 -7
- data/lib/orb/models/top_level_ping_params.rb +3 -8
- data/lib/orb/models/top_level_ping_response.rb +2 -6
- data/lib/orb/models/trial_discount.rb +16 -24
- data/lib/orb/models/usage_discount.rb +15 -14
- data/lib/orb/request_options.rb +3 -4
- data/lib/orb/resources/alerts.rb +48 -17
- data/lib/orb/resources/coupons/subscriptions.rb +9 -2
- data/lib/orb/resources/coupons.rb +25 -7
- data/lib/orb/resources/credit_notes.rb +17 -4
- data/lib/orb/resources/customers/balance_transactions.rb +18 -3
- data/lib/orb/resources/customers/costs.rb +26 -8
- data/lib/orb/resources/customers/credits/ledger.rb +108 -28
- data/lib/orb/resources/customers/credits/top_ups.rb +67 -20
- data/lib/orb/resources/customers/credits.rb +28 -8
- data/lib/orb/resources/customers.rb +135 -36
- data/lib/orb/resources/dimensional_price_groups.rb +19 -4
- data/lib/orb/resources/events/backfills.rb +32 -9
- data/lib/orb/resources/events/volume.rb +14 -4
- data/lib/orb/resources/events.rb +40 -11
- data/lib/orb/resources/invoice_line_items.rb +16 -6
- data/lib/orb/resources/invoices.rb +77 -17
- data/lib/orb/resources/items.rb +10 -3
- data/lib/orb/resources/metrics.rb +33 -8
- data/lib/orb/resources/plans/external_plan_id.rb +10 -2
- data/lib/orb/resources/plans.rb +47 -11
- data/lib/orb/resources/prices/external_price_id.rb +7 -1
- data/lib/orb/resources/prices.rb +97 -22
- data/lib/orb/resources/subscription_changes.rb +5 -2
- data/lib/orb/resources/subscriptions.rb +292 -78
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +2 -10
- data/rbi/lib/orb/client.rbi +7 -6
- data/rbi/lib/orb/file_part.rbi +34 -0
- data/rbi/lib/orb/internal/page.rbi +1 -0
- data/rbi/lib/orb/internal/transport/base_client.rbi +18 -3
- data/rbi/lib/orb/internal/type/array_of.rbi +15 -9
- data/rbi/lib/orb/internal/type/base_model.rbi +22 -0
- data/rbi/lib/orb/internal/type/base_page.rbi +2 -0
- data/rbi/lib/orb/internal/type/boolean.rbi +4 -5
- data/rbi/lib/orb/internal/type/converter.rbi +8 -0
- data/rbi/lib/orb/internal/type/enum.rbi +7 -6
- data/rbi/lib/orb/internal/type/{io_like.rbi → file_input.rbi} +9 -7
- data/rbi/lib/orb/internal/type/hash_of.rbi +15 -9
- data/rbi/lib/orb/internal/type/union.rbi +7 -0
- data/rbi/lib/orb/internal/type/unknown.rbi +4 -5
- data/rbi/lib/orb/internal/util.rbi +39 -19
- data/rbi/lib/orb/internal.rbi +1 -2
- data/rbi/lib/orb/models/alert.rbi +28 -8
- data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +16 -6
- data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +16 -6
- data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +16 -6
- data/rbi/lib/orb/models/alert_disable_params.rbi +5 -2
- data/rbi/lib/orb/models/alert_enable_params.rbi +5 -2
- data/rbi/lib/orb/models/alert_list_params.rbi +6 -0
- data/rbi/lib/orb/models/alert_update_params.rbi +11 -4
- data/rbi/lib/orb/models/amount_discount.rbi +10 -4
- data/rbi/lib/orb/models/billable_metric.rbi +16 -3
- data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -1
- data/rbi/lib/orb/models/coupon.rbi +10 -3
- data/rbi/lib/orb/models/coupon_create_params.rbi +6 -3
- data/rbi/lib/orb/models/coupon_list_params.rbi +13 -3
- data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +8 -2
- data/rbi/lib/orb/models/credit_note.rbi +44 -12
- data/rbi/lib/orb/models/credit_note_create_params.rbi +15 -6
- data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -0
- data/rbi/lib/orb/models/customer.rbi +130 -11
- data/rbi/lib/orb/models/customer_create_params.rbi +142 -8
- data/rbi/lib/orb/models/customer_list_params.rbi +3 -0
- data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +140 -8
- data/rbi/lib/orb/models/customer_update_params.rbi +140 -8
- data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +8 -4
- data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +18 -8
- data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -0
- data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +18 -8
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +9 -5
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +21 -4
- data/rbi/lib/orb/models/customers/cost_list_params.rbi +9 -5
- data/rbi/lib/orb/models/customers/cost_list_response.rbi +21 -4
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +13 -3
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +1 -2
- data/rbi/lib/orb/models/customers/credit_list_params.rbi +13 -3
- data/rbi/lib/orb/models/customers/credit_list_response.rbi +1 -2
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +40 -18
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +40 -6
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -16
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +6 -4
- data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +27 -10
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +25 -10
- data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +27 -4
- data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +25 -10
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +8 -2
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +25 -10
- data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +8 -2
- data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +25 -4
- data/rbi/lib/orb/models/dimensional_price_group.rbi +11 -3
- data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -0
- data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +8 -2
- data/rbi/lib/orb/models/evaluate_price_group.rbi +8 -2
- data/rbi/lib/orb/models/event_deprecate_response.rbi +4 -2
- data/rbi/lib/orb/models/event_ingest_params.rbi +22 -5
- data/rbi/lib/orb/models/event_ingest_response.rbi +15 -4
- data/rbi/lib/orb/models/event_search_params.rbi +14 -2
- data/rbi/lib/orb/models/event_search_response.rbi +14 -3
- data/rbi/lib/orb/models/event_update_params.rbi +10 -3
- data/rbi/lib/orb/models/event_update_response.rbi +4 -2
- data/rbi/lib/orb/models/events/backfill_close_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_create_params.rbi +18 -0
- data/rbi/lib/orb/models/events/backfill_create_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_list_params.rbi +8 -2
- data/rbi/lib/orb/models/events/backfill_list_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_revert_response.rbi +14 -2
- data/rbi/lib/orb/models/events/event_volumes.rbi +6 -2
- data/rbi/lib/orb/models/events/volume_list_params.rbi +18 -2
- data/rbi/lib/orb/models/invoice.rbi +375 -46
- data/rbi/lib/orb/models/invoice_create_params.rbi +38 -6
- data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +375 -66
- data/rbi/lib/orb/models/invoice_issue_params.rbi +9 -2
- data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +16 -2
- data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +141 -20
- data/rbi/lib/orb/models/invoice_list_params.rbi +9 -2
- data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +9 -2
- data/rbi/lib/orb/models/invoice_update_params.rbi +7 -2
- data/rbi/lib/orb/models/item.rbi +1 -2
- data/rbi/lib/orb/models/item_create_params.rbi +5 -2
- data/rbi/lib/orb/models/item_list_params.rbi +8 -2
- data/rbi/lib/orb/models/item_update_params.rbi +1 -8
- data/rbi/lib/orb/models/metric_create_params.rbi +15 -2
- data/rbi/lib/orb/models/metric_list_params.rbi +3 -0
- data/rbi/lib/orb/models/metric_update_params.rbi +7 -2
- data/rbi/lib/orb/models/percentage_discount.rbi +11 -4
- data/rbi/lib/orb/models/plan.rbi +102 -15
- data/rbi/lib/orb/models/plan_create_params.rbi +997 -679
- data/rbi/lib/orb/models/plan_list_params.rbi +5 -1
- data/rbi/lib/orb/models/plan_update_params.rbi +11 -2
- data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +11 -2
- data/rbi/lib/orb/models/price.rbi +717 -688
- data/rbi/lib/orb/models/price_create_params.rbi +137 -53
- data/rbi/lib/orb/models/price_evaluate_params.rbi +10 -0
- data/rbi/lib/orb/models/price_list_params.rbi +8 -2
- data/rbi/lib/orb/models/price_update_params.rbi +7 -2
- data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +7 -2
- data/rbi/lib/orb/models/subscription.rbi +174 -11
- data/rbi/lib/orb/models/subscription_cancel_params.rbi +8 -5
- data/rbi/lib/orb/models/subscription_cancel_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_change_apply_params.rbi +7 -2
- data/rbi/lib/orb/models/subscription_change_apply_response.rbi +199 -18
- data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +199 -18
- data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +199 -18
- data/rbi/lib/orb/models/subscription_create_params.rbi +2282 -1536
- data/rbi/lib/orb/models/subscription_create_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +9 -5
- data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +21 -4
- data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -0
- data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +8 -2
- data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +13 -4
- data/rbi/lib/orb/models/subscription_list_params.rbi +4 -2
- data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +1228 -861
- data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +2288 -1544
- data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +10 -2
- data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +5 -2
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +187 -20
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -2
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_update_params.rbi +15 -0
- data/rbi/lib/orb/models/subscription_update_trial_params.rbi +11 -5
- data/rbi/lib/orb/models/subscription_update_trial_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_usage.rbi +2 -16
- data/rbi/lib/orb/models/trial_discount.rbi +5 -1
- data/rbi/lib/orb/models/usage_discount.rbi +11 -3
- data/sig/orb/file_part.rbs +21 -0
- data/sig/orb/internal/transport/base_client.rbs +9 -3
- data/sig/orb/internal/type/array_of.rbs +4 -0
- data/sig/orb/internal/type/base_model.rbs +12 -0
- data/sig/orb/internal/type/converter.rbs +4 -0
- data/sig/orb/internal/type/enum.rbs +4 -2
- data/sig/orb/internal/type/{io_like.rbs → file_input.rbs} +1 -1
- data/sig/orb/internal/type/hash_of.rbs +4 -0
- data/sig/orb/internal/type/union.rbs +4 -0
- data/sig/orb/internal/util.rbs +16 -12
- data/sig/orb/internal.rbs +1 -1
- metadata +9 -5
@@ -248,31 +248,90 @@ module Orb
|
|
248
248
|
end
|
249
249
|
def self.new(
|
250
250
|
id:,
|
251
|
+
# The current plan phase that is active, only if the subscription's plan has
|
252
|
+
# phases.
|
251
253
|
active_plan_phase_order:,
|
254
|
+
# The adjustment intervals for this subscription sorted by the start_date of the
|
255
|
+
# adjustment interval.
|
252
256
|
adjustment_intervals:,
|
257
|
+
# Determines whether issued invoices for this subscription will automatically be
|
258
|
+
# charged with the saved payment method on the due date. This property defaults to
|
259
|
+
# the plan's behavior. If null, defaults to the customer's setting.
|
253
260
|
auto_collection:,
|
254
261
|
billing_cycle_anchor_configuration:,
|
262
|
+
# The day of the month on which the billing cycle is anchored. If the maximum
|
263
|
+
# number of days in a month is greater than this value, the last day of the month
|
264
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
265
|
+
# period begins on the 30th.
|
255
266
|
billing_cycle_day:,
|
256
267
|
created_at:,
|
268
|
+
# The end of the current billing period. This is an exclusive timestamp, such that
|
269
|
+
# the instant returned is not part of the billing period. Set to null for
|
270
|
+
# subscriptions that are not currently active.
|
257
271
|
current_billing_period_end_date:,
|
272
|
+
# The start date of the current billing period. This is an inclusive timestamp;
|
273
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
274
|
+
# if the subscription is not currently active.
|
258
275
|
current_billing_period_start_date:,
|
276
|
+
# A customer is a buyer of your products, and the other party to the billing
|
277
|
+
# relationship.
|
278
|
+
#
|
279
|
+
# In Orb, customers are assigned system generated identifiers automatically, but
|
280
|
+
# it's often desirable to have these match existing identifiers in your system. To
|
281
|
+
# avoid having to denormalize Orb ID information, you can pass in an
|
282
|
+
# `external_customer_id` with your own identifier. See
|
283
|
+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
|
284
|
+
# information about how these aliases work in Orb.
|
285
|
+
#
|
286
|
+
# In addition to having an identifier in your system, a customer may exist in a
|
287
|
+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
|
288
|
+
# `payment_provider` enum field to express this mapping.
|
289
|
+
#
|
290
|
+
# A customer also has a timezone (from the standard
|
291
|
+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
292
|
+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
293
|
+
# information on what this timezone parameter influences within Orb.
|
259
294
|
customer:,
|
295
|
+
# Determines the default memo on this subscriptions' invoices. Note that if this
|
296
|
+
# is not provided, it is determined by the plan configuration.
|
260
297
|
default_invoice_memo:,
|
298
|
+
# The discount intervals for this subscription sorted by the start_date.
|
261
299
|
discount_intervals:,
|
300
|
+
# The date Orb stops billing for this subscription.
|
262
301
|
end_date:,
|
263
302
|
fixed_fee_quantity_schedule:,
|
264
303
|
invoicing_threshold:,
|
304
|
+
# The maximum intervals for this subscription sorted by the start_date.
|
265
305
|
maximum_intervals:,
|
306
|
+
# User specified key-value pairs for the resource. If not present, this defaults
|
307
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
308
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
309
|
+
# `null`.
|
266
310
|
metadata:,
|
311
|
+
# The minimum intervals for this subscription sorted by the start_date.
|
267
312
|
minimum_intervals:,
|
313
|
+
# Determines the difference between the invoice issue date for subscription
|
314
|
+
# invoices as the date that they are due. A value of `0` here represents that the
|
315
|
+
# invoice is due on issue, whereas a value of `30` represents that the customer
|
316
|
+
# has a month to pay the invoice.
|
268
317
|
net_terms:,
|
318
|
+
# A pending subscription change if one exists on this subscription.
|
269
319
|
pending_subscription_change:,
|
320
|
+
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
321
|
+
# subscribed to by a customer. Plans define the billing behavior of the
|
322
|
+
# subscription. You can see more about how to configure prices in the
|
323
|
+
# [Price resource](/reference/price).
|
270
324
|
plan:,
|
325
|
+
# The price intervals for this subscription.
|
271
326
|
price_intervals:,
|
272
327
|
redeemed_coupon:,
|
328
|
+
# The date Orb starts billing for this subscription.
|
273
329
|
start_date:,
|
274
330
|
status:,
|
275
331
|
trial_info:,
|
332
|
+
# The resources that were changed as part of this operation. Only present when
|
333
|
+
# fetched through the subscription changes API or if the
|
334
|
+
# `include_changed_resources` parameter was passed in the request.
|
276
335
|
changed_resources: nil
|
277
336
|
); end
|
278
337
|
sig do
|
@@ -363,8 +422,16 @@ module Orb
|
|
363
422
|
)
|
364
423
|
.returns(T.attached_class)
|
365
424
|
end
|
366
|
-
def self.new(
|
367
|
-
|
425
|
+
def self.new(
|
426
|
+
id:,
|
427
|
+
adjustment:,
|
428
|
+
# The price interval IDs that this adjustment applies to.
|
429
|
+
applies_to_price_interval_ids:,
|
430
|
+
# The end date of the adjustment interval.
|
431
|
+
end_date:,
|
432
|
+
# The start date of the adjustment interval.
|
433
|
+
start_date:
|
434
|
+
); end
|
368
435
|
sig do
|
369
436
|
override
|
370
437
|
.returns(
|
@@ -431,10 +498,17 @@ module Orb
|
|
431
498
|
end
|
432
499
|
def self.new(
|
433
500
|
id:,
|
501
|
+
# The price IDs that this adjustment applies to.
|
434
502
|
applies_to_price_ids:,
|
503
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
504
|
+
# that apply to only one price.
|
435
505
|
is_invoice_level:,
|
506
|
+
# The plan phase in which this adjustment is active.
|
436
507
|
plan_phase_order:,
|
508
|
+
# The reason for the adjustment.
|
437
509
|
reason:,
|
510
|
+
# The number of usage units by which to discount the price this adjustment applies
|
511
|
+
# to in a given billing period.
|
438
512
|
usage_discount:,
|
439
513
|
adjustment_type: :usage_discount
|
440
514
|
); end
|
@@ -498,10 +572,17 @@ module Orb
|
|
498
572
|
end
|
499
573
|
def self.new(
|
500
574
|
id:,
|
575
|
+
# The amount by which to discount the prices this adjustment applies to in a given
|
576
|
+
# billing period.
|
501
577
|
amount_discount:,
|
578
|
+
# The price IDs that this adjustment applies to.
|
502
579
|
applies_to_price_ids:,
|
580
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
581
|
+
# that apply to only one price.
|
503
582
|
is_invoice_level:,
|
583
|
+
# The plan phase in which this adjustment is active.
|
504
584
|
plan_phase_order:,
|
585
|
+
# The reason for the adjustment.
|
505
586
|
reason:,
|
506
587
|
adjustment_type: :amount_discount
|
507
588
|
); end
|
@@ -565,10 +646,17 @@ module Orb
|
|
565
646
|
end
|
566
647
|
def self.new(
|
567
648
|
id:,
|
649
|
+
# The price IDs that this adjustment applies to.
|
568
650
|
applies_to_price_ids:,
|
651
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
652
|
+
# that apply to only one price.
|
569
653
|
is_invoice_level:,
|
654
|
+
# The percentage (as a value between 0 and 1) by which to discount the price
|
655
|
+
# intervals this adjustment applies to in a given billing period.
|
570
656
|
percentage_discount:,
|
657
|
+
# The plan phase in which this adjustment is active.
|
571
658
|
plan_phase_order:,
|
659
|
+
# The reason for the adjustment.
|
572
660
|
reason:,
|
573
661
|
adjustment_type: :percentage_discount
|
574
662
|
); end
|
@@ -637,11 +725,19 @@ module Orb
|
|
637
725
|
end
|
638
726
|
def self.new(
|
639
727
|
id:,
|
728
|
+
# The price IDs that this adjustment applies to.
|
640
729
|
applies_to_price_ids:,
|
730
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
731
|
+
# that apply to only one price.
|
641
732
|
is_invoice_level:,
|
733
|
+
# The item ID that revenue from this minimum will be attributed to.
|
642
734
|
item_id:,
|
735
|
+
# The minimum amount to charge in a given billing period for the prices this
|
736
|
+
# adjustment applies to.
|
643
737
|
minimum_amount:,
|
738
|
+
# The plan phase in which this adjustment is active.
|
644
739
|
plan_phase_order:,
|
740
|
+
# The reason for the adjustment.
|
645
741
|
reason:,
|
646
742
|
adjustment_type: :minimum
|
647
743
|
); end
|
@@ -706,10 +802,17 @@ module Orb
|
|
706
802
|
end
|
707
803
|
def self.new(
|
708
804
|
id:,
|
805
|
+
# The price IDs that this adjustment applies to.
|
709
806
|
applies_to_price_ids:,
|
807
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
808
|
+
# that apply to only one price.
|
710
809
|
is_invoice_level:,
|
810
|
+
# The maximum amount to charge in a given billing period for the prices this
|
811
|
+
# adjustment applies to.
|
711
812
|
maximum_amount:,
|
813
|
+
# The plan phase in which this adjustment is active.
|
712
814
|
plan_phase_order:,
|
815
|
+
# The reason for the adjustment.
|
713
816
|
reason:,
|
714
817
|
adjustment_type: :maximum
|
715
818
|
); end
|
@@ -762,8 +865,20 @@ module Orb
|
|
762
865
|
sig do
|
763
866
|
params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).returns(T.attached_class)
|
764
867
|
end
|
765
|
-
def self.new(
|
766
|
-
|
868
|
+
def self.new(
|
869
|
+
# The day of the month on which the billing cycle is anchored. If the maximum
|
870
|
+
# number of days in a month is greater than this value, the last day of the month
|
871
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
872
|
+
# period begins on the 30th.
|
873
|
+
day:,
|
874
|
+
# The month on which the billing cycle is anchored (e.g. a quarterly price
|
875
|
+
# anchored in February would have cycles starting February, May, August, and
|
876
|
+
# November).
|
877
|
+
month: nil,
|
878
|
+
# The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
|
879
|
+
# anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
|
880
|
+
year: nil
|
881
|
+
); end
|
767
882
|
sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) }
|
768
883
|
def to_hash; end
|
769
884
|
end
|
@@ -807,10 +922,15 @@ module Orb
|
|
807
922
|
.returns(T.attached_class)
|
808
923
|
end
|
809
924
|
def self.new(
|
925
|
+
# Only available if discount_type is `amount`.
|
810
926
|
amount_discount:,
|
927
|
+
# The price ids that this discount interval applies to.
|
811
928
|
applies_to_price_ids:,
|
929
|
+
# The price interval ids that this discount interval applies to.
|
812
930
|
applies_to_price_interval_ids:,
|
931
|
+
# The end date of the discount interval.
|
813
932
|
end_date:,
|
933
|
+
# The start date of the discount interval.
|
814
934
|
start_date:,
|
815
935
|
discount_type: :amount
|
816
936
|
); end
|
@@ -867,10 +987,16 @@ module Orb
|
|
867
987
|
.returns(T.attached_class)
|
868
988
|
end
|
869
989
|
def self.new(
|
990
|
+
# The price ids that this discount interval applies to.
|
870
991
|
applies_to_price_ids:,
|
992
|
+
# The price interval ids that this discount interval applies to.
|
871
993
|
applies_to_price_interval_ids:,
|
994
|
+
# The end date of the discount interval.
|
872
995
|
end_date:,
|
996
|
+
# Only available if discount_type is `percentage`.This is a number between 0
|
997
|
+
# and 1.
|
873
998
|
percentage_discount:,
|
999
|
+
# The start date of the discount interval.
|
874
1000
|
start_date:,
|
875
1001
|
discount_type: :percentage
|
876
1002
|
); end
|
@@ -927,10 +1053,16 @@ module Orb
|
|
927
1053
|
.returns(T.attached_class)
|
928
1054
|
end
|
929
1055
|
def self.new(
|
1056
|
+
# The price ids that this discount interval applies to.
|
930
1057
|
applies_to_price_ids:,
|
1058
|
+
# The price interval ids that this discount interval applies to.
|
931
1059
|
applies_to_price_interval_ids:,
|
1060
|
+
# The end date of the discount interval.
|
932
1061
|
end_date:,
|
1062
|
+
# The start date of the discount interval.
|
933
1063
|
start_date:,
|
1064
|
+
# Only available if discount_type is `usage`. Number of usage units that this
|
1065
|
+
# discount is for
|
934
1066
|
usage_discount:,
|
935
1067
|
discount_type: :usage
|
936
1068
|
); end
|
@@ -1017,14 +1149,18 @@ module Orb
|
|
1017
1149
|
.returns(T.attached_class)
|
1018
1150
|
end
|
1019
1151
|
def self.new(
|
1152
|
+
# The price ids that this maximum interval applies to.
|
1020
1153
|
applies_to_price_ids:,
|
1154
|
+
# The price interval ids that this maximum interval applies to.
|
1021
1155
|
applies_to_price_interval_ids:,
|
1156
|
+
# The end date of the maximum interval.
|
1022
1157
|
end_date:,
|
1158
|
+
# The maximum amount to charge in a given billing period for the price intervals
|
1159
|
+
# this transform applies to.
|
1023
1160
|
maximum_amount:,
|
1161
|
+
# The start date of the maximum interval.
|
1024
1162
|
start_date:
|
1025
|
-
)
|
1026
|
-
end
|
1027
|
-
|
1163
|
+
); end
|
1028
1164
|
sig do
|
1029
1165
|
override
|
1030
1166
|
.returns(
|
@@ -1073,14 +1209,18 @@ module Orb
|
|
1073
1209
|
.returns(T.attached_class)
|
1074
1210
|
end
|
1075
1211
|
def self.new(
|
1212
|
+
# The price ids that this minimum interval applies to.
|
1076
1213
|
applies_to_price_ids:,
|
1214
|
+
# The price interval ids that this minimum interval applies to.
|
1077
1215
|
applies_to_price_interval_ids:,
|
1216
|
+
# The end date of the minimum interval.
|
1078
1217
|
end_date:,
|
1218
|
+
# The minimum amount to charge in a given billing period for the price intervals
|
1219
|
+
# this minimum applies to.
|
1079
1220
|
minimum_amount:,
|
1221
|
+
# The start date of the minimum interval.
|
1080
1222
|
start_date:
|
1081
|
-
)
|
1082
|
-
end
|
1083
|
-
|
1223
|
+
); end
|
1084
1224
|
sig do
|
1085
1225
|
override
|
1086
1226
|
.returns(
|
@@ -1261,14 +1401,40 @@ module Orb
|
|
1261
1401
|
end
|
1262
1402
|
def self.new(
|
1263
1403
|
id:,
|
1404
|
+
# The day of the month that Orb bills for this price
|
1264
1405
|
billing_cycle_day:,
|
1406
|
+
# The end of the current billing period. This is an exclusive timestamp, such that
|
1407
|
+
# the instant returned is exactly the end of the billing period. Set to null if
|
1408
|
+
# this price interval is not currently active.
|
1265
1409
|
current_billing_period_end_date:,
|
1410
|
+
# The start date of the current billing period. This is an inclusive timestamp;
|
1411
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
1412
|
+
# if this price interval is not currently active.
|
1266
1413
|
current_billing_period_start_date:,
|
1414
|
+
# The end date of the price interval. This is the date that Orb stops billing for
|
1415
|
+
# this price.
|
1267
1416
|
end_date:,
|
1417
|
+
# An additional filter to apply to usage queries.
|
1268
1418
|
filter:,
|
1419
|
+
# The fixed fee quantity transitions for this price interval. This is only
|
1420
|
+
# relevant for fixed fees.
|
1269
1421
|
fixed_fee_quantity_transitions:,
|
1422
|
+
# The Price resource represents a price that can be billed on a subscription,
|
1423
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
1424
|
+
# take a quantity and determine an amount to bill.
|
1425
|
+
#
|
1426
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
1427
|
+
# is serialized differently in a given Price object. The model_type field
|
1428
|
+
# determines the key for the configuration object that is present.
|
1429
|
+
#
|
1430
|
+
# For more on the types of prices, see
|
1431
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1270
1432
|
price:,
|
1433
|
+
# The start date of the price interval. This is the date that Orb starts billing
|
1434
|
+
# for this price.
|
1271
1435
|
start_date:,
|
1436
|
+
# A list of customer IDs whose usage events will be aggregated and billed under
|
1437
|
+
# this price interval.
|
1272
1438
|
usage_customer_ids:
|
1273
1439
|
); end
|
1274
1440
|
sig do
|
@@ -1362,8 +1528,7 @@ module Orb
|
|
1362
1528
|
extend Orb::Internal::Type::Enum
|
1363
1529
|
|
1364
1530
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::SubscriptionUpdateTrialResponse::Status) }
|
1365
|
-
OrSymbol =
|
1366
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol) }
|
1531
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1367
1532
|
|
1368
1533
|
ACTIVE = T.let(:active, Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol)
|
1369
1534
|
ENDED = T.let(:ended, Orb::Models::SubscriptionUpdateTrialResponse::Status::TaggedSymbol)
|
@@ -1413,8 +1578,16 @@ module Orb
|
|
1413
1578
|
)
|
1414
1579
|
.returns(T.attached_class)
|
1415
1580
|
end
|
1416
|
-
def self.new(
|
1417
|
-
|
1581
|
+
def self.new(
|
1582
|
+
# The credit notes that were created as part of this operation.
|
1583
|
+
created_credit_notes:,
|
1584
|
+
# The invoices that were created as part of this operation.
|
1585
|
+
created_invoices:,
|
1586
|
+
# The credit notes that were voided as part of this operation.
|
1587
|
+
voided_credit_notes:,
|
1588
|
+
# The invoices that were voided as part of this operation.
|
1589
|
+
voided_invoices:
|
1590
|
+
); end
|
1418
1591
|
sig do
|
1419
1592
|
override
|
1420
1593
|
.returns(
|
@@ -104,14 +104,7 @@ module Orb
|
|
104
104
|
|
105
105
|
TaggedSymbol =
|
106
106
|
T.type_alias { T.all(Symbol, Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::ViewMode) }
|
107
|
-
OrSymbol =
|
108
|
-
T.type_alias do
|
109
|
-
T.any(
|
110
|
-
Symbol,
|
111
|
-
String,
|
112
|
-
Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::ViewMode::TaggedSymbol
|
113
|
-
)
|
114
|
-
end
|
107
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
115
108
|
|
116
109
|
PERIODIC =
|
117
110
|
T.let(:periodic, Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::ViewMode::TaggedSymbol)
|
@@ -275,14 +268,7 @@ module Orb
|
|
275
268
|
|
276
269
|
TaggedSymbol =
|
277
270
|
T.type_alias { T.all(Symbol, Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::ViewMode) }
|
278
|
-
OrSymbol =
|
279
|
-
T.type_alias do
|
280
|
-
T.any(
|
281
|
-
Symbol,
|
282
|
-
String,
|
283
|
-
Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::ViewMode::TaggedSymbol
|
284
|
-
)
|
285
|
-
end
|
271
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
286
272
|
|
287
273
|
PERIODIC =
|
288
274
|
T.let(:periodic, Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage::Data::ViewMode::TaggedSymbol)
|
@@ -33,10 +33,14 @@ module Orb
|
|
33
33
|
.returns(T.attached_class)
|
34
34
|
end
|
35
35
|
def self.new(
|
36
|
+
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
37
|
+
# this can be a subset of prices.
|
36
38
|
applies_to_price_ids:,
|
37
39
|
discount_type:,
|
38
40
|
reason: nil,
|
41
|
+
# Only available if discount_type is `trial`
|
39
42
|
trial_amount_discount: nil,
|
43
|
+
# Only available if discount_type is `trial`
|
40
44
|
trial_percentage_discount: nil
|
41
45
|
); end
|
42
46
|
sig do
|
@@ -57,7 +61,7 @@ module Orb
|
|
57
61
|
extend Orb::Internal::Type::Enum
|
58
62
|
|
59
63
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::TrialDiscount::DiscountType) }
|
60
|
-
OrSymbol = T.type_alias { T.any(Symbol, String
|
64
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
61
65
|
|
62
66
|
TRIAL = T.let(:trial, Orb::Models::TrialDiscount::DiscountType::TaggedSymbol)
|
63
67
|
|
@@ -28,8 +28,16 @@ module Orb
|
|
28
28
|
)
|
29
29
|
.returns(T.attached_class)
|
30
30
|
end
|
31
|
-
def self.new(
|
32
|
-
|
31
|
+
def self.new(
|
32
|
+
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
33
|
+
# this can be a subset of prices.
|
34
|
+
applies_to_price_ids:,
|
35
|
+
discount_type:,
|
36
|
+
# Only available if discount_type is `usage`. Number of usage units that this
|
37
|
+
# discount is for
|
38
|
+
usage_discount:,
|
39
|
+
reason: nil
|
40
|
+
); end
|
33
41
|
sig do
|
34
42
|
override
|
35
43
|
.returns(
|
@@ -47,7 +55,7 @@ module Orb
|
|
47
55
|
extend Orb::Internal::Type::Enum
|
48
56
|
|
49
57
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::UsageDiscount::DiscountType) }
|
50
|
-
OrSymbol = T.type_alias { T.any(Symbol, String
|
58
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
51
59
|
|
52
60
|
USAGE = T.let(:usage, Orb::Models::UsageDiscount::DiscountType::TaggedSymbol)
|
53
61
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Orb
|
2
|
+
class FilePart
|
3
|
+
attr_reader content: Pathname | StringIO | IO | String
|
4
|
+
|
5
|
+
attr_reader content_type: String?
|
6
|
+
|
7
|
+
attr_reader filename: String?
|
8
|
+
|
9
|
+
private def read: -> String
|
10
|
+
|
11
|
+
def to_json: (*top a) -> String
|
12
|
+
|
13
|
+
def to_yaml: (*top a) -> String
|
14
|
+
|
15
|
+
def initialize: (
|
16
|
+
Pathname | StringIO | IO | String content,
|
17
|
+
?filename: String?,
|
18
|
+
?content_type: String?
|
19
|
+
) -> void
|
20
|
+
end
|
21
|
+
end
|
@@ -11,7 +11,10 @@ module Orb
|
|
11
11
|
| Integer
|
12
12
|
| ::Array[(String | Integer)?])?]?,
|
13
13
|
body: top?,
|
14
|
-
unwrap: Symbol
|
14
|
+
unwrap: (Symbol
|
15
|
+
| Integer
|
16
|
+
| ::Array[(Symbol | Integer)]
|
17
|
+
| (^(top arg0) -> top))?,
|
15
18
|
page: Class?,
|
16
19
|
stream: Class?,
|
17
20
|
model: Orb::Internal::Type::Converter::input?,
|
@@ -53,7 +56,7 @@ module Orb
|
|
53
56
|
) -> void
|
54
57
|
|
55
58
|
# @api private
|
56
|
-
|
59
|
+
attr_reader requester: Orb::Internal::Transport::PooledNetRequester
|
57
60
|
|
58
61
|
def initialize: (
|
59
62
|
base_url: String,
|
@@ -96,7 +99,10 @@ module Orb
|
|
96
99
|
| Integer
|
97
100
|
| ::Array[(String | Integer)?])?]?,
|
98
101
|
?body: top?,
|
99
|
-
?unwrap: Symbol
|
102
|
+
?unwrap: (Symbol
|
103
|
+
| Integer
|
104
|
+
| ::Array[(Symbol | Integer)]
|
105
|
+
| (^(top arg0) -> top))?,
|
100
106
|
?page: Class?,
|
101
107
|
?stream: Class?,
|
102
108
|
?model: Orb::Internal::Type::Converter::input?,
|
@@ -15,6 +15,8 @@ module Orb
|
|
15
15
|
|
16
16
|
def ==: (top other) -> bool
|
17
17
|
|
18
|
+
def hash: -> Integer
|
19
|
+
|
18
20
|
def coerce: (
|
19
21
|
::Array[top] | top value,
|
20
22
|
state: Orb::Internal::Type::Converter::coerce_state
|
@@ -35,6 +37,8 @@ module Orb
|
|
35
37
|
| Orb::Internal::Type::Converter::input type_info,
|
36
38
|
?::Hash[Symbol, top] spec
|
37
39
|
) -> void
|
40
|
+
|
41
|
+
def inspect: (?depth: Integer) -> String
|
38
42
|
end
|
39
43
|
end
|
40
44
|
end
|
@@ -49,8 +49,12 @@ module Orb
|
|
49
49
|
|
50
50
|
def self.==: (top other) -> bool
|
51
51
|
|
52
|
+
def self.hash: -> Integer
|
53
|
+
|
52
54
|
def ==: (top other) -> bool
|
53
55
|
|
56
|
+
def hash: -> Integer
|
57
|
+
|
54
58
|
def self.coerce: (
|
55
59
|
Orb::Internal::Type::BaseModel | ::Hash[top, top] | top value,
|
56
60
|
state: Orb::Internal::Type::Converter::coerce_state
|
@@ -69,12 +73,20 @@ module Orb
|
|
69
73
|
|
70
74
|
def deconstruct_keys: (::Array[Symbol]? keys) -> ::Hash[Symbol, top]
|
71
75
|
|
76
|
+
def self.walk: (
|
77
|
+
Orb::Internal::Type::BaseModel model
|
78
|
+
) -> ::Hash[Symbol, top]
|
79
|
+
|
72
80
|
def to_json: (*top a) -> String
|
73
81
|
|
74
82
|
def to_yaml: (*top a) -> String
|
75
83
|
|
76
84
|
def initialize: (?::Hash[Symbol, top] | self data) -> void
|
77
85
|
|
86
|
+
def self.inspect: (?depth: Integer) -> String
|
87
|
+
|
88
|
+
def to_s: -> String
|
89
|
+
|
78
90
|
def inspect: -> String
|
79
91
|
end
|
80
92
|
end
|
@@ -23,6 +23,8 @@ module Orb
|
|
23
23
|
state: Orb::Internal::Type::Converter::dump_state
|
24
24
|
) -> top
|
25
25
|
|
26
|
+
def inspect: (?depth: Integer) -> String
|
27
|
+
|
26
28
|
def self.type_info: (
|
27
29
|
{
|
28
30
|
const: (nil | bool | Integer | Float | Symbol)?,
|
@@ -44,6 +46,8 @@ module Orb
|
|
44
46
|
top value,
|
45
47
|
?state: Orb::Internal::Type::Converter::dump_state
|
46
48
|
) -> top
|
49
|
+
|
50
|
+
def self.inspect: (top target, depth: Integer) -> String
|
47
51
|
end
|
48
52
|
end
|
49
53
|
end
|
@@ -6,12 +6,12 @@ module Orb
|
|
6
6
|
|
7
7
|
def self.values: -> ::Array[(nil | bool | Integer | Float | Symbol)]
|
8
8
|
|
9
|
-
private def self.finalize!: -> void
|
10
|
-
|
11
9
|
def ===: (top other) -> bool
|
12
10
|
|
13
11
|
def ==: (top other) -> bool
|
14
12
|
|
13
|
+
def hash: -> Integer
|
14
|
+
|
15
15
|
def coerce: (
|
16
16
|
String | Symbol | top value,
|
17
17
|
state: Orb::Internal::Type::Converter::coerce_state
|
@@ -21,6 +21,8 @@ module Orb
|
|
21
21
|
Symbol | top value,
|
22
22
|
state: Orb::Internal::Type::Converter::dump_state
|
23
23
|
) -> (Symbol | top)
|
24
|
+
|
25
|
+
def inspect: (?depth: Integer) -> String
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
@@ -15,6 +15,8 @@ module Orb
|
|
15
15
|
|
16
16
|
def ==: (top other) -> bool
|
17
17
|
|
18
|
+
def hash: -> Integer
|
19
|
+
|
18
20
|
def coerce: (
|
19
21
|
::Hash[top, top] | top value,
|
20
22
|
state: Orb::Internal::Type::Converter::coerce_state
|
@@ -35,6 +37,8 @@ module Orb
|
|
35
37
|
| Orb::Internal::Type::Converter::input type_info,
|
36
38
|
?::Hash[Symbol, top] spec
|
37
39
|
) -> void
|
40
|
+
|
41
|
+
def inspect: (?depth: Integer) -> String
|
38
42
|
end
|
39
43
|
end
|
40
44
|
end
|
@@ -30,6 +30,8 @@ module Orb
|
|
30
30
|
|
31
31
|
def ==: (top other) -> bool
|
32
32
|
|
33
|
+
def hash: -> Integer
|
34
|
+
|
33
35
|
def coerce: (
|
34
36
|
top value,
|
35
37
|
state: Orb::Internal::Type::Converter::coerce_state
|
@@ -39,6 +41,8 @@ module Orb
|
|
39
41
|
top value,
|
40
42
|
state: Orb::Internal::Type::Converter::dump_state
|
41
43
|
) -> top
|
44
|
+
|
45
|
+
def inspect: (?depth: Integer) -> String
|
42
46
|
end
|
43
47
|
end
|
44
48
|
end
|