orb-billing 1.11.2 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +98 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +12 -0
- data/lib/orb/errors.rb +25 -11
- data/lib/orb/file_part.rb +10 -7
- data/lib/orb/internal/page.rb +1 -1
- data/lib/orb/internal/transport/base_client.rb +18 -8
- data/lib/orb/internal/transport/pooled_net_requester.rb +43 -34
- data/lib/orb/internal/type/base_page.rb +1 -1
- data/lib/orb/internal/type/file_input.rb +7 -4
- data/lib/orb/internal/util.rb +16 -10
- data/lib/orb/models/alert.rb +23 -1
- data/lib/orb/models/allocation.rb +69 -1
- data/lib/orb/models/amount_discount.rb +59 -3
- data/lib/orb/models/amount_discount_interval.rb +59 -3
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +2898 -44
- data/lib/orb/models/beta_create_plan_version_params.rb +2870 -44
- data/lib/orb/models/bulk_config.rb +2 -0
- data/lib/orb/models/bulk_tier.rb +2 -0
- data/lib/orb/models/changed_subscription_resources.rb +1030 -3
- data/lib/orb/models/credit_block_delete_params.rb +14 -0
- data/lib/orb/models/credit_block_list_invoices_params.rb +14 -0
- data/lib/orb/models/credit_block_list_invoices_response.rb +217 -0
- data/lib/orb/models/credit_block_retrieve_params.rb +14 -0
- data/lib/orb/models/credit_block_retrieve_response.rb +148 -0
- data/lib/orb/models/customer.rb +84 -1
- data/lib/orb/models/customer_create_params.rb +175 -5
- data/lib/orb/models/customer_tax_id.rb +2 -0
- data/lib/orb/models/customer_update_by_external_id_params.rb +180 -5
- data/lib/orb/models/customer_update_params.rb +175 -5
- data/lib/orb/models/customers/balance_transaction_create_response.rb +1 -0
- data/lib/orb/models/customers/balance_transaction_list_response.rb +1 -0
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +29 -1
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +83 -1
- data/lib/orb/models/customers/credit_list_params.rb +29 -1
- data/lib/orb/models/customers/credit_list_response.rb +82 -1
- data/lib/orb/models/customers/credits/affected_block.rb +63 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +116 -9
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +115 -9
- data/lib/orb/models/invoice.rb +20 -56
- data/lib/orb/models/invoice_create_params.rb +34 -9
- data/lib/orb/models/invoice_delete_line_item_params.rb +20 -0
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +20 -56
- data/lib/orb/models/invoice_issue_summary_params.rb +29 -0
- data/lib/orb/models/invoice_issue_summary_response.rb +760 -0
- data/lib/orb/models/invoice_line_item_create_params.rb +25 -10
- data/lib/orb/models/invoice_line_item_create_response.rb +5 -55
- data/lib/orb/models/invoice_list_summary_params.rb +180 -0
- data/lib/orb/models/invoice_list_summary_response.rb +759 -0
- data/lib/orb/models/invoice_update_params.rb +55 -1
- data/lib/orb/models/item.rb +29 -7
- data/lib/orb/models/item_slim.rb +8 -2
- data/lib/orb/models/item_update_params.rb +11 -2
- data/lib/orb/models/license_create_params.rb +57 -0
- data/lib/orb/models/license_create_response.rb +63 -0
- data/lib/orb/models/license_deactivate_params.rb +26 -0
- data/lib/orb/models/license_deactivate_response.rb +63 -0
- data/lib/orb/models/license_list_params.rb +72 -0
- data/lib/orb/models/license_list_response.rb +63 -0
- data/lib/orb/models/license_retrieve_by_external_id_params.rb +30 -0
- data/lib/orb/models/license_retrieve_by_external_id_response.rb +63 -0
- data/lib/orb/models/license_retrieve_params.rb +14 -0
- data/lib/orb/models/license_retrieve_response.rb +63 -0
- data/lib/orb/models/license_type_create_params.rb +34 -0
- data/lib/orb/models/license_type_create_response.rb +41 -0
- data/lib/orb/models/license_type_list_params.rb +34 -0
- data/lib/orb/models/license_type_list_response.rb +41 -0
- data/lib/orb/models/license_type_retrieve_params.rb +14 -0
- data/lib/orb/models/license_type_retrieve_response.rb +41 -0
- data/lib/orb/models/licenses/external_license_get_usage_params.rb +78 -0
- data/lib/orb/models/licenses/external_license_get_usage_response.rb +135 -0
- data/lib/orb/models/licenses/usage_get_all_usage_params.rb +78 -0
- data/lib/orb/models/licenses/usage_get_all_usage_response.rb +134 -0
- data/lib/orb/models/licenses/usage_get_usage_params.rb +62 -0
- data/lib/orb/models/licenses/usage_get_usage_response.rb +134 -0
- data/lib/orb/models/matrix_config.rb +4 -2
- data/lib/orb/models/matrix_sub_line_item.rb +9 -1
- data/lib/orb/models/matrix_value.rb +3 -6
- data/lib/orb/models/matrix_with_allocation_config.rb +36 -8
- data/lib/orb/models/maximum.rb +59 -3
- data/lib/orb/models/maximum_interval.rb +59 -3
- data/lib/orb/models/minimum.rb +59 -3
- data/lib/orb/models/minimum_interval.rb +59 -3
- data/lib/orb/models/monetary_amount_discount_adjustment.rb +62 -6
- data/lib/orb/models/monetary_maximum_adjustment.rb +62 -6
- data/lib/orb/models/monetary_minimum_adjustment.rb +62 -6
- data/lib/orb/models/monetary_percentage_discount_adjustment.rb +62 -6
- data/lib/orb/models/monetary_usage_discount_adjustment.rb +62 -6
- data/lib/orb/models/new_allocation_price.rb +91 -1
- data/lib/orb/models/new_amount_discount.rb +59 -3
- data/lib/orb/models/new_avalara_tax_configuration.rb +15 -1
- data/lib/orb/models/new_floating_bulk_price.rb +15 -19
- data/lib/orb/models/new_floating_bulk_with_proration_price.rb +54 -21
- data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +69 -21
- data/lib/orb/models/new_floating_grouped_allocation_price.rb +48 -21
- data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +73 -21
- data/lib/orb/models/new_floating_grouped_tiered_price.rb +65 -21
- data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +118 -21
- data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +48 -21
- data/lib/orb/models/new_floating_matrix_price.rb +15 -19
- data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +15 -19
- data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +70 -21
- data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +72 -21
- data/lib/orb/models/{new_floating_bps_price.rb → new_floating_minimum_composite_price.rb} +54 -38
- data/lib/orb/models/new_floating_package_price.rb +15 -19
- data/lib/orb/models/new_floating_package_with_allocation_price.rb +41 -19
- data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +96 -15
- data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +86 -15
- data/lib/orb/models/new_floating_threshold_total_amount_price.rb +64 -19
- data/lib/orb/models/new_floating_tiered_package_price.rb +64 -19
- data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +67 -19
- data/lib/orb/models/new_floating_tiered_price.rb +15 -19
- data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +75 -15
- data/lib/orb/models/new_floating_tiered_with_proration_price.rb +57 -19
- data/lib/orb/models/new_floating_unit_price.rb +15 -19
- data/lib/orb/models/new_floating_unit_with_percent_price.rb +37 -19
- data/lib/orb/models/new_floating_unit_with_proration_price.rb +30 -19
- data/lib/orb/models/new_maximum.rb +59 -3
- data/lib/orb/models/new_minimum.rb +59 -3
- data/lib/orb/models/new_percentage_discount.rb +59 -3
- data/lib/orb/models/new_plan_bulk_price.rb +15 -19
- data/lib/orb/models/new_plan_bulk_with_proration_price.rb +53 -21
- data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +69 -21
- data/lib/orb/models/new_plan_grouped_allocation_price.rb +47 -21
- data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +73 -21
- data/lib/orb/models/new_plan_grouped_tiered_price.rb +64 -21
- data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +118 -21
- data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +48 -21
- data/lib/orb/models/new_plan_matrix_price.rb +15 -19
- data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +15 -19
- data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +70 -21
- data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +72 -21
- data/lib/orb/models/{new_plan_bulk_bps_price.rb → new_plan_minimum_composite_price.rb} +54 -38
- data/lib/orb/models/new_plan_package_price.rb +15 -19
- data/lib/orb/models/new_plan_package_with_allocation_price.rb +41 -19
- data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +96 -15
- data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +82 -15
- data/lib/orb/models/new_plan_threshold_total_amount_price.rb +64 -19
- data/lib/orb/models/new_plan_tiered_package_price.rb +63 -19
- data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +67 -19
- data/lib/orb/models/new_plan_tiered_price.rb +15 -19
- data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +74 -15
- data/lib/orb/models/new_plan_unit_price.rb +15 -19
- data/lib/orb/models/new_plan_unit_with_percent_price.rb +37 -19
- data/lib/orb/models/new_plan_unit_with_proration_price.rb +29 -19
- data/lib/orb/models/new_sphere_configuration.rb +14 -1
- data/lib/orb/models/new_subscription_bulk_price.rb +15 -19
- data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +54 -21
- data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +69 -21
- data/lib/orb/models/new_subscription_grouped_allocation_price.rb +48 -21
- data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +73 -21
- data/lib/orb/models/new_subscription_grouped_tiered_price.rb +65 -21
- data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +118 -21
- data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +48 -21
- data/lib/orb/models/new_subscription_matrix_price.rb +15 -19
- data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +15 -19
- data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +70 -21
- data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +72 -21
- data/lib/orb/models/{new_subscription_bulk_bps_price.rb → new_subscription_minimum_composite_price.rb} +55 -36
- data/lib/orb/models/new_subscription_package_price.rb +15 -19
- data/lib/orb/models/new_subscription_package_with_allocation_price.rb +41 -19
- data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +96 -15
- data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +86 -15
- data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +64 -19
- data/lib/orb/models/new_subscription_tiered_package_price.rb +64 -19
- data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +67 -19
- data/lib/orb/models/new_subscription_tiered_price.rb +15 -19
- data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +75 -15
- data/lib/orb/models/new_subscription_unit_price.rb +15 -19
- data/lib/orb/models/new_subscription_unit_with_percent_price.rb +37 -19
- data/lib/orb/models/new_subscription_unit_with_proration_price.rb +30 -19
- data/lib/orb/models/new_tax_jar_configuration.rb +14 -1
- data/lib/orb/models/new_usage_discount.rb +59 -3
- data/lib/orb/models/package_config.rb +2 -0
- data/lib/orb/models/per_price_cost.rb +2 -2
- data/lib/orb/models/percentage_discount.rb +59 -3
- data/lib/orb/models/percentage_discount_interval.rb +59 -3
- data/lib/orb/models/plan.rb +17 -6
- data/lib/orb/models/plan_create_params.rb +1417 -22
- data/lib/orb/models/plan_phase_amount_discount_adjustment.rb +62 -6
- data/lib/orb/models/plan_phase_maximum_adjustment.rb +62 -6
- data/lib/orb/models/plan_phase_minimum_adjustment.rb +62 -6
- data/lib/orb/models/plan_phase_percentage_discount_adjustment.rb +62 -6
- data/lib/orb/models/plan_phase_usage_discount_adjustment.rb +62 -6
- data/lib/orb/models/plan_version.rb +2 -2
- data/lib/orb/models/plans/migration_cancel_params.rb +22 -0
- data/lib/orb/models/plans/migration_cancel_response.rb +76 -0
- data/lib/orb/models/plans/migration_list_params.rb +36 -0
- data/lib/orb/models/plans/migration_list_response.rb +76 -0
- data/lib/orb/models/plans/migration_retrieve_params.rb +22 -0
- data/lib/orb/models/plans/migration_retrieve_response.rb +76 -0
- data/lib/orb/models/price.rb +6352 -986
- data/lib/orb/models/price_create_params.rb +1264 -111
- data/lib/orb/models/price_evaluate_multiple_params.rb +1148 -24
- data/lib/orb/models/price_evaluate_preview_events_params.rb +1157 -24
- data/lib/orb/models/price_interval.rb +13 -3
- data/lib/orb/models/subscription_change_apply_params.rb +42 -3
- data/lib/orb/models/subscription_change_apply_response.rb +42 -1
- data/lib/orb/models/subscription_change_cancel_response.rb +42 -1
- data/lib/orb/models/subscription_change_list_params.rb +66 -0
- data/lib/orb/models/subscription_change_list_response.rb +69 -0
- data/lib/orb/models/subscription_change_retrieve_response.rb +42 -1
- data/lib/orb/models/subscription_create_params.rb +2875 -56
- data/lib/orb/models/subscription_list_params.rb +15 -1
- data/lib/orb/models/subscription_price_intervals_params.rb +1215 -51
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +2900 -56
- data/lib/orb/models/tier.rb +8 -2
- data/lib/orb/models/tier_sub_line_item.rb +26 -3
- data/lib/orb/models/tiered_config.rb +11 -1
- data/lib/orb/models/trial_discount.rb +59 -3
- data/lib/orb/models/unit_config.rb +11 -1
- data/lib/orb/models/usage_discount.rb +59 -3
- data/lib/orb/models/usage_discount_interval.rb +59 -3
- data/lib/orb/models.rb +38 -36
- data/lib/orb/resources/alerts.rb +1 -1
- data/lib/orb/resources/beta/external_plan_id.rb +0 -9
- data/lib/orb/resources/beta.rb +0 -9
- data/lib/orb/resources/credit_blocks.rb +98 -0
- data/lib/orb/resources/customers/credits/ledger.rb +18 -16
- data/lib/orb/resources/customers/credits.rb +40 -4
- data/lib/orb/resources/customers.rb +18 -6
- data/lib/orb/resources/dimensional_price_groups.rb +1 -1
- data/lib/orb/resources/events/backfills.rb +5 -2
- data/lib/orb/resources/events.rb +1 -1
- data/lib/orb/resources/invoice_line_items.rb +16 -3
- data/lib/orb/resources/invoices.rb +172 -13
- data/lib/orb/resources/license_types.rb +100 -0
- data/lib/orb/resources/licenses/external_licenses.rb +58 -0
- data/lib/orb/resources/licenses/usage.rb +93 -0
- data/lib/orb/resources/licenses.rb +171 -0
- data/lib/orb/resources/plans/migrations.rb +99 -0
- data/lib/orb/resources/plans.rb +4 -0
- data/lib/orb/resources/prices/external_price_id.rb +2 -2
- data/lib/orb/resources/prices.rb +42 -34
- data/lib/orb/resources/subscription_changes.rb +49 -2
- data/lib/orb/resources/subscriptions.rb +13 -3
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +51 -18
- data/manifest.yaml +2 -0
- data/rbi/orb/client.rbi +9 -0
- data/rbi/orb/errors.rbi +29 -2
- data/rbi/orb/file_part.rbi +1 -1
- data/rbi/orb/internal/transport/base_client.rbi +9 -5
- data/rbi/orb/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/orb/internal/type/base_model.rbi +5 -4
- data/rbi/orb/internal/type/base_page.rbi +1 -1
- data/rbi/orb/internal/util.rbi +2 -2
- data/rbi/orb/models/alert.rbi +40 -3
- data/rbi/orb/models/allocation.rbi +123 -3
- data/rbi/orb/models/amount_discount.rbi +112 -3
- data/rbi/orb/models/amount_discount_interval.rbi +133 -3
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +5192 -396
- data/rbi/orb/models/beta_create_plan_version_params.rbi +5182 -396
- data/rbi/orb/models/bulk_config.rbi +1 -0
- data/rbi/orb/models/bulk_tier.rbi +1 -0
- data/rbi/orb/models/changed_subscription_resources.rbi +1690 -3
- data/rbi/orb/models/credit_block_delete_params.rbi +27 -0
- data/rbi/orb/models/credit_block_list_invoices_params.rbi +27 -0
- data/rbi/orb/models/credit_block_list_invoices_response.rbi +465 -0
- data/rbi/orb/models/credit_block_retrieve_params.rbi +27 -0
- data/rbi/orb/models/credit_block_retrieve_response.rbi +280 -0
- data/rbi/orb/models/customer.rbi +188 -0
- data/rbi/orb/models/customer_create_params.rbi +356 -6
- data/rbi/orb/models/customer_tax_id.rbi +2 -0
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +364 -6
- data/rbi/orb/models/customer_update_params.rbi +356 -6
- data/rbi/orb/models/customers/balance_transaction_create_response.rbi +5 -0
- data/rbi/orb/models/customers/balance_transaction_list_response.rbi +5 -0
- data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +24 -0
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +161 -0
- data/rbi/orb/models/customers/credit_list_params.rbi +24 -0
- data/rbi/orb/models/customers/credit_list_response.rbi +155 -0
- data/rbi/orb/models/customers/credits/affected_block.rbi +160 -1
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +222 -11
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +222 -11
- data/rbi/orb/models/invoice.rbi +29 -64
- data/rbi/orb/models/invoice_create_params.rbi +42 -10
- data/rbi/orb/models/invoice_delete_line_item_params.rbi +35 -0
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +29 -64
- data/rbi/orb/models/invoice_issue_summary_params.rbi +51 -0
- data/rbi/orb/models/invoice_issue_summary_response.rbi +1264 -0
- data/rbi/orb/models/invoice_line_item_create_params.rbi +32 -10
- data/rbi/orb/models/invoice_line_item_create_response.rbi +12 -64
- data/rbi/orb/models/invoice_list_summary_params.rbi +226 -0
- data/rbi/orb/models/invoice_list_summary_response.rbi +1259 -0
- data/rbi/orb/models/invoice_update_params.rbi +69 -0
- data/rbi/orb/models/item.rbi +37 -4
- data/rbi/orb/models/item_slim.rbi +10 -1
- data/rbi/orb/models/item_update_params.rbi +16 -1
- data/rbi/orb/models/license_create_params.rbi +73 -0
- data/rbi/orb/models/license_create_response.rbi +100 -0
- data/rbi/orb/models/license_deactivate_params.rbi +42 -0
- data/rbi/orb/models/license_deactivate_response.rbi +105 -0
- data/rbi/orb/models/license_list_params.rbi +98 -0
- data/rbi/orb/models/license_list_response.rbi +97 -0
- data/rbi/orb/models/license_retrieve_by_external_id_params.rbi +51 -0
- data/rbi/orb/models/license_retrieve_by_external_id_response.rbi +114 -0
- data/rbi/orb/models/license_retrieve_params.rbi +27 -0
- data/rbi/orb/models/license_retrieve_response.rbi +102 -0
- data/rbi/orb/models/license_type_create_params.rbi +53 -0
- data/rbi/orb/models/license_type_create_response.rbi +50 -0
- data/rbi/orb/models/license_type_list_params.rbi +56 -0
- data/rbi/orb/models/license_type_list_response.rbi +50 -0
- data/rbi/orb/models/license_type_retrieve_params.rbi +27 -0
- data/rbi/orb/models/license_type_retrieve_response.rbi +53 -0
- data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +105 -0
- data/rbi/orb/models/licenses/external_license_get_usage_response.rbi +192 -0
- data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +102 -0
- data/rbi/orb/models/licenses/usage_get_all_usage_response.rbi +188 -0
- data/rbi/orb/models/licenses/usage_get_usage_params.rbi +86 -0
- data/rbi/orb/models/licenses/usage_get_usage_response.rbi +186 -0
- data/rbi/orb/models/matrix_config.rbi +3 -2
- data/rbi/orb/models/matrix_sub_line_item.rbi +11 -3
- data/rbi/orb/models/matrix_value.rbi +3 -6
- data/rbi/orb/models/matrix_with_allocation_config.rbi +61 -10
- data/rbi/orb/models/maximum.rbi +96 -3
- data/rbi/orb/models/maximum_interval.rbi +115 -3
- data/rbi/orb/models/minimum.rbi +96 -3
- data/rbi/orb/models/minimum_interval.rbi +115 -3
- data/rbi/orb/models/monetary_amount_discount_adjustment.rbi +156 -7
- data/rbi/orb/models/monetary_maximum_adjustment.rbi +146 -7
- data/rbi/orb/models/monetary_minimum_adjustment.rbi +146 -7
- data/rbi/orb/models/monetary_percentage_discount_adjustment.rbi +159 -7
- data/rbi/orb/models/monetary_usage_discount_adjustment.rbi +153 -7
- data/rbi/orb/models/new_allocation_price.rbi +150 -3
- data/rbi/orb/models/new_amount_discount.rbi +123 -3
- data/rbi/orb/models/new_avalara_tax_configuration.rbi +15 -1
- data/rbi/orb/models/new_floating_bulk_price.rbi +13 -21
- data/rbi/orb/models/new_floating_bulk_with_proration_price.rbi +118 -27
- data/rbi/orb/models/new_floating_cumulative_grouped_bulk_price.rbi +137 -27
- data/rbi/orb/models/new_floating_grouped_allocation_price.rbi +81 -27
- data/rbi/orb/models/new_floating_grouped_tiered_package_price.rbi +131 -27
- data/rbi/orb/models/new_floating_grouped_tiered_price.rbi +121 -27
- data/rbi/orb/models/new_floating_grouped_with_metered_minimum_price.rbi +202 -27
- data/rbi/orb/models/new_floating_grouped_with_prorated_minimum_price.rbi +79 -27
- data/rbi/orb/models/new_floating_matrix_price.rbi +13 -23
- data/rbi/orb/models/new_floating_matrix_with_allocation_price.rbi +13 -23
- data/rbi/orb/models/new_floating_matrix_with_display_name_price.rbi +139 -27
- data/rbi/orb/models/new_floating_max_group_tiered_package_price.rbi +129 -27
- data/rbi/orb/models/{new_floating_tiered_bps_price.rbi → new_floating_minimum_composite_price.rbi} +106 -49
- data/rbi/orb/models/new_floating_package_price.rbi +13 -23
- data/rbi/orb/models/new_floating_package_with_allocation_price.rbi +57 -15
- data/rbi/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbi +175 -14
- data/rbi/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbi +143 -14
- data/rbi/orb/models/new_floating_threshold_total_amount_price.rbi +110 -14
- data/rbi/orb/models/new_floating_tiered_package_price.rbi +110 -14
- data/rbi/orb/models/new_floating_tiered_package_with_minimum_price.rbi +116 -14
- data/rbi/orb/models/new_floating_tiered_price.rbi +13 -23
- data/rbi/orb/models/new_floating_tiered_with_minimum_price.rbi +136 -14
- data/rbi/orb/models/new_floating_tiered_with_proration_price.rbi +106 -14
- data/rbi/orb/models/new_floating_unit_price.rbi +13 -21
- data/rbi/orb/models/new_floating_unit_with_percent_price.rbi +53 -17
- data/rbi/orb/models/new_floating_unit_with_proration_price.rbi +46 -18
- data/rbi/orb/models/new_maximum.rbi +104 -3
- data/rbi/orb/models/new_minimum.rbi +104 -3
- data/rbi/orb/models/new_percentage_discount.rbi +129 -3
- data/rbi/orb/models/new_plan_bulk_price.rbi +13 -21
- data/rbi/orb/models/new_plan_bulk_with_proration_price.rbi +118 -27
- data/rbi/orb/models/new_plan_cumulative_grouped_bulk_price.rbi +137 -27
- data/rbi/orb/models/new_plan_grouped_allocation_price.rbi +81 -27
- data/rbi/orb/models/new_plan_grouped_tiered_package_price.rbi +131 -27
- data/rbi/orb/models/new_plan_grouped_tiered_price.rbi +119 -27
- data/rbi/orb/models/new_plan_grouped_with_metered_minimum_price.rbi +202 -27
- data/rbi/orb/models/new_plan_grouped_with_prorated_minimum_price.rbi +79 -27
- data/rbi/orb/models/new_plan_matrix_price.rbi +13 -21
- data/rbi/orb/models/new_plan_matrix_with_allocation_price.rbi +13 -23
- data/rbi/orb/models/new_plan_matrix_with_display_name_price.rbi +139 -27
- data/rbi/orb/models/new_plan_max_group_tiered_package_price.rbi +129 -27
- data/rbi/orb/models/{new_subscription_tier_with_proration_price.rbi → new_plan_minimum_composite_price.rbi} +87 -61
- data/rbi/orb/models/new_plan_package_price.rbi +13 -21
- data/rbi/orb/models/new_plan_package_with_allocation_price.rbi +57 -15
- data/rbi/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbi +175 -14
- data/rbi/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbi +143 -14
- data/rbi/orb/models/new_plan_threshold_total_amount_price.rbi +110 -14
- data/rbi/orb/models/new_plan_tiered_package_price.rbi +109 -15
- data/rbi/orb/models/new_plan_tiered_package_with_minimum_price.rbi +116 -14
- data/rbi/orb/models/new_plan_tiered_price.rbi +13 -21
- data/rbi/orb/models/new_plan_tiered_with_minimum_price.rbi +136 -14
- data/rbi/orb/models/new_plan_unit_price.rbi +13 -21
- data/rbi/orb/models/new_plan_unit_with_percent_price.rbi +51 -17
- data/rbi/orb/models/new_plan_unit_with_proration_price.rbi +46 -18
- data/rbi/orb/models/new_sphere_configuration.rbi +16 -3
- data/rbi/orb/models/new_subscription_bulk_price.rbi +13 -23
- data/rbi/orb/models/new_subscription_bulk_with_proration_price.rbi +120 -27
- data/rbi/orb/models/new_subscription_cumulative_grouped_bulk_price.rbi +137 -27
- data/rbi/orb/models/new_subscription_grouped_allocation_price.rbi +83 -27
- data/rbi/orb/models/new_subscription_grouped_tiered_package_price.rbi +131 -27
- data/rbi/orb/models/new_subscription_grouped_tiered_price.rbi +123 -27
- data/rbi/orb/models/new_subscription_grouped_with_metered_minimum_price.rbi +202 -27
- data/rbi/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbi +79 -27
- data/rbi/orb/models/new_subscription_matrix_price.rbi +13 -23
- data/rbi/orb/models/new_subscription_matrix_with_allocation_price.rbi +13 -23
- data/rbi/orb/models/new_subscription_matrix_with_display_name_price.rbi +139 -27
- data/rbi/orb/models/new_subscription_max_group_tiered_package_price.rbi +129 -27
- data/rbi/orb/models/{new_subscription_tiered_bps_price.rbi → new_subscription_minimum_composite_price.rbi} +105 -51
- data/rbi/orb/models/new_subscription_package_price.rbi +13 -23
- data/rbi/orb/models/new_subscription_package_with_allocation_price.rbi +57 -15
- data/rbi/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbi +175 -14
- data/rbi/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbi +143 -14
- data/rbi/orb/models/new_subscription_threshold_total_amount_price.rbi +110 -14
- data/rbi/orb/models/new_subscription_tiered_package_price.rbi +112 -14
- data/rbi/orb/models/new_subscription_tiered_package_with_minimum_price.rbi +116 -14
- data/rbi/orb/models/new_subscription_tiered_price.rbi +13 -23
- data/rbi/orb/models/new_subscription_tiered_with_minimum_price.rbi +138 -14
- data/rbi/orb/models/new_subscription_unit_price.rbi +13 -23
- data/rbi/orb/models/new_subscription_unit_with_percent_price.rbi +53 -17
- data/rbi/orb/models/new_subscription_unit_with_proration_price.rbi +48 -18
- data/rbi/orb/models/new_tax_jar_configuration.rbi +16 -3
- data/rbi/orb/models/new_usage_discount.rbi +115 -3
- data/rbi/orb/models/package_config.rbi +1 -0
- data/rbi/orb/models/per_price_cost.rbi +10 -8
- data/rbi/orb/models/percentage_discount.rbi +126 -3
- data/rbi/orb/models/percentage_discount_interval.rbi +142 -3
- data/rbi/orb/models/plan.rbi +20 -12
- data/rbi/orb/models/plan_create_params.rbi +2440 -47
- data/rbi/orb/models/plan_phase_amount_discount_adjustment.rbi +156 -7
- data/rbi/orb/models/plan_phase_maximum_adjustment.rbi +146 -7
- data/rbi/orb/models/plan_phase_minimum_adjustment.rbi +146 -7
- data/rbi/orb/models/plan_phase_percentage_discount_adjustment.rbi +161 -7
- data/rbi/orb/models/plan_phase_usage_discount_adjustment.rbi +156 -7
- data/rbi/orb/models/plan_version.rbi +10 -8
- data/rbi/orb/models/plans/migration_cancel_params.rbi +37 -0
- data/rbi/orb/models/plans/migration_cancel_response.rbi +159 -0
- data/rbi/orb/models/plans/migration_list_params.rbi +58 -0
- data/rbi/orb/models/plans/migration_list_response.rbi +158 -0
- data/rbi/orb/models/plans/migration_retrieve_params.rbi +37 -0
- data/rbi/orb/models/plans/migration_retrieve_response.rbi +162 -0
- data/rbi/orb/models/price.rbi +12908 -1450
- data/rbi/orb/models/price_create_params.rbi +2525 -129
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +1967 -50
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1967 -50
- data/rbi/orb/models/price_interval.rbi +22 -8
- data/rbi/orb/models/subscription_change_apply_params.rbi +42 -2
- data/rbi/orb/models/subscription_change_apply_response.rbi +45 -3
- data/rbi/orb/models/subscription_change_cancel_response.rbi +45 -3
- data/rbi/orb/models/subscription_change_list_params.rbi +112 -0
- data/rbi/orb/models/subscription_change_list_response.rbi +115 -0
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +45 -3
- data/rbi/orb/models/subscription_create_params.rbi +5256 -470
- data/rbi/orb/models/subscription_list_params.rbi +12 -0
- data/rbi/orb/models/subscription_price_intervals_params.rbi +2188 -216
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +5260 -474
- data/rbi/orb/models/tier.rbi +5 -2
- data/rbi/orb/models/tier_sub_line_item.rbi +42 -4
- data/rbi/orb/models/tiered_config.rbi +18 -3
- data/rbi/orb/models/trial_discount.rbi +104 -3
- data/rbi/orb/models/unit_config.rbi +17 -3
- data/rbi/orb/models/usage_discount.rbi +104 -3
- data/rbi/orb/models/usage_discount_interval.rbi +131 -3
- data/rbi/orb/models.rbi +41 -37
- data/rbi/orb/resources/alerts.rbi +1 -1
- data/rbi/orb/resources/beta/external_plan_id.rbi +0 -9
- data/rbi/orb/resources/beta.rbi +0 -9
- data/rbi/orb/resources/credit_blocks.rbi +69 -0
- data/rbi/orb/resources/customers/credits/ledger.rbi +30 -14
- data/rbi/orb/resources/customers/credits.rbi +26 -0
- data/rbi/orb/resources/customers.rbi +56 -6
- data/rbi/orb/resources/dimensional_price_groups.rbi +1 -1
- data/rbi/orb/resources/events/backfills.rbi +5 -2
- data/rbi/orb/resources/events.rbi +1 -1
- data/rbi/orb/resources/invoice_line_items.rbi +25 -4
- data/rbi/orb/resources/invoices.rbi +151 -14
- data/rbi/orb/resources/license_types.rbi +70 -0
- data/rbi/orb/resources/licenses/external_licenses.rbi +54 -0
- data/rbi/orb/resources/licenses/usage.rbi +85 -0
- data/rbi/orb/resources/licenses.rbi +124 -0
- data/rbi/orb/resources/plans/migrations.rbi +61 -0
- data/rbi/orb/resources/plans.rbi +3 -0
- data/rbi/orb/resources/prices.rbi +98 -34
- data/rbi/orb/resources/subscription_changes.rbi +46 -1
- data/rbi/orb/resources/subscriptions.rbi +13 -1
- data/sig/orb/client.rbs +6 -0
- data/sig/orb/errors.rbs +7 -0
- data/sig/orb/file_part.rbs +1 -1
- data/sig/orb/internal/transport/base_client.rbs +2 -0
- data/sig/orb/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/orb/models/alert.rbs +20 -3
- data/sig/orb/models/allocation.rbs +70 -3
- data/sig/orb/models/amount_discount.rbs +57 -4
- data/sig/orb/models/amount_discount_interval.rbs +57 -4
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1952 -22
- data/sig/orb/models/beta_create_plan_version_params.rbs +1946 -22
- data/sig/orb/models/changed_subscription_resources.rbs +611 -4
- data/sig/orb/models/credit_block_delete_params.rbs +15 -0
- data/sig/orb/models/credit_block_list_invoices_params.rbs +15 -0
- data/sig/orb/models/credit_block_list_invoices_response.rbs +197 -0
- data/sig/orb/models/credit_block_retrieve_params.rbs +15 -0
- data/sig/orb/models/credit_block_retrieve_response.rbs +124 -0
- data/sig/orb/models/customer.rbs +72 -0
- data/sig/orb/models/customer_create_params.rbs +151 -0
- data/sig/orb/models/customer_tax_id.rbs +2 -0
- data/sig/orb/models/customer_update_by_external_id_params.rbs +151 -0
- data/sig/orb/models/customer_update_params.rbs +151 -0
- data/sig/orb/models/customers/balance_transaction_create_response.rbs +2 -0
- data/sig/orb/models/customers/balance_transaction_list_response.rbs +2 -0
- data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +20 -0
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +58 -0
- data/sig/orb/models/customers/credit_list_params.rbs +20 -0
- data/sig/orb/models/customers/credit_list_response.rbs +58 -0
- data/sig/orb/models/customers/credits/affected_block.rbs +63 -1
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +75 -4
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +75 -4
- data/sig/orb/models/invoice.rbs +7 -25
- data/sig/orb/models/invoice_create_params.rbs +13 -0
- data/sig/orb/models/invoice_delete_line_item_params.rbs +23 -0
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +7 -25
- data/sig/orb/models/invoice_issue_summary_params.rbs +25 -0
- data/sig/orb/models/invoice_issue_summary_response.rbs +444 -0
- data/sig/orb/models/invoice_line_item_create_params.rbs +11 -6
- data/sig/orb/models/invoice_line_item_create_response.rbs +0 -25
- data/sig/orb/models/invoice_list_summary_params.rbs +143 -0
- data/sig/orb/models/invoice_list_summary_response.rbs +444 -0
- data/sig/orb/models/invoice_update_params.rbs +34 -1
- data/sig/orb/models/item.rbs +10 -3
- data/sig/orb/models/item_update_params.rbs +2 -0
- data/sig/orb/models/license_create_params.rbs +46 -0
- data/sig/orb/models/license_create_response.rbs +61 -0
- data/sig/orb/models/license_deactivate_params.rbs +20 -0
- data/sig/orb/models/license_deactivate_response.rbs +61 -0
- data/sig/orb/models/license_list_params.rbs +64 -0
- data/sig/orb/models/license_list_response.rbs +61 -0
- data/sig/orb/models/license_retrieve_by_external_id_params.rbs +28 -0
- data/sig/orb/models/license_retrieve_by_external_id_response.rbs +61 -0
- data/sig/orb/models/license_retrieve_params.rbs +15 -0
- data/sig/orb/models/license_retrieve_response.rbs +61 -0
- data/sig/orb/models/license_type_create_params.rbs +28 -0
- data/sig/orb/models/license_type_create_response.rbs +18 -0
- data/sig/orb/models/license_type_list_params.rbs +30 -0
- data/sig/orb/models/license_type_list_response.rbs +18 -0
- data/sig/orb/models/license_type_retrieve_params.rbs +15 -0
- data/sig/orb/models/license_type_retrieve_response.rbs +18 -0
- data/sig/orb/models/licenses/external_license_get_usage_params.rbs +60 -0
- data/sig/orb/models/licenses/external_license_get_usage_response.rbs +99 -0
- data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +60 -0
- data/sig/orb/models/licenses/usage_get_all_usage_response.rbs +99 -0
- data/sig/orb/models/licenses/usage_get_usage_params.rbs +50 -0
- data/sig/orb/models/licenses/usage_get_usage_response.rbs +99 -0
- data/sig/orb/models/matrix_sub_line_item.rbs +8 -3
- data/sig/orb/models/matrix_with_allocation_config.rbs +27 -8
- data/sig/orb/models/maximum.rbs +57 -4
- data/sig/orb/models/maximum_interval.rbs +57 -4
- data/sig/orb/models/minimum.rbs +57 -4
- data/sig/orb/models/minimum_interval.rbs +57 -4
- data/sig/orb/models/monetary_amount_discount_adjustment.rbs +57 -4
- data/sig/orb/models/monetary_maximum_adjustment.rbs +57 -4
- data/sig/orb/models/monetary_minimum_adjustment.rbs +57 -4
- data/sig/orb/models/monetary_percentage_discount_adjustment.rbs +57 -4
- data/sig/orb/models/monetary_usage_discount_adjustment.rbs +57 -4
- data/sig/orb/models/new_allocation_price.rbs +73 -3
- data/sig/orb/models/new_amount_discount.rbs +57 -4
- data/sig/orb/models/new_avalara_tax_configuration.rbs +5 -0
- data/sig/orb/models/new_floating_bulk_price.rbs +5 -9
- data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +41 -13
- data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +58 -13
- data/sig/orb/models/new_floating_grouped_allocation_price.rbs +32 -13
- data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +48 -13
- data/sig/orb/models/new_floating_grouped_tiered_price.rbs +46 -13
- data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +78 -13
- data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +32 -13
- data/sig/orb/models/new_floating_matrix_price.rbs +5 -9
- data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +5 -9
- data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +54 -13
- data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +51 -13
- data/sig/orb/models/{new_floating_bulk_bps_price.rbs → new_floating_minimum_composite_price.rbs} +40 -30
- data/sig/orb/models/new_floating_package_price.rbs +5 -9
- data/sig/orb/models/new_floating_package_with_allocation_price.rbs +28 -9
- data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +79 -9
- data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +71 -11
- data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +39 -9
- data/sig/orb/models/new_floating_tiered_package_price.rbs +39 -9
- data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +50 -9
- data/sig/orb/models/new_floating_tiered_price.rbs +5 -9
- data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +63 -9
- data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +37 -9
- data/sig/orb/models/new_floating_unit_price.rbs +5 -9
- data/sig/orb/models/new_floating_unit_with_percent_price.rbs +17 -9
- data/sig/orb/models/new_floating_unit_with_proration_price.rbs +15 -9
- data/sig/orb/models/new_maximum.rbs +57 -4
- data/sig/orb/models/new_minimum.rbs +57 -4
- data/sig/orb/models/new_percentage_discount.rbs +57 -4
- data/sig/orb/models/new_plan_bulk_price.rbs +5 -9
- data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +41 -13
- data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +58 -13
- data/sig/orb/models/new_plan_grouped_allocation_price.rbs +32 -13
- data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +48 -13
- data/sig/orb/models/new_plan_grouped_tiered_price.rbs +46 -13
- data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +78 -13
- data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +32 -13
- data/sig/orb/models/new_plan_matrix_price.rbs +5 -9
- data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +5 -9
- data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +54 -13
- data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +51 -13
- data/sig/orb/models/{new_plan_tiered_bps_price.rbs → new_plan_minimum_composite_price.rbs} +40 -30
- data/sig/orb/models/new_plan_package_price.rbs +5 -9
- data/sig/orb/models/new_plan_package_with_allocation_price.rbs +28 -9
- data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +79 -9
- data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +71 -11
- data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +39 -9
- data/sig/orb/models/new_plan_tiered_package_price.rbs +39 -9
- data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +50 -9
- data/sig/orb/models/new_plan_tiered_price.rbs +5 -9
- data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +63 -9
- data/sig/orb/models/new_plan_unit_price.rbs +5 -9
- data/sig/orb/models/new_plan_unit_with_percent_price.rbs +17 -9
- data/sig/orb/models/new_plan_unit_with_proration_price.rbs +15 -9
- data/sig/orb/models/new_sphere_configuration.rbs +8 -3
- data/sig/orb/models/new_subscription_bulk_price.rbs +5 -9
- data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +41 -13
- data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +58 -13
- data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +32 -13
- data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +48 -13
- data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +46 -13
- data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +78 -13
- data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +32 -13
- data/sig/orb/models/new_subscription_matrix_price.rbs +5 -9
- data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +5 -9
- data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +54 -13
- data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +51 -13
- data/sig/orb/models/{new_subscription_bps_price.rbs → new_subscription_minimum_composite_price.rbs} +40 -30
- data/sig/orb/models/new_subscription_package_price.rbs +5 -9
- data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +28 -9
- data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +79 -9
- data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +71 -11
- data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +39 -9
- data/sig/orb/models/new_subscription_tiered_package_price.rbs +39 -9
- data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +50 -9
- data/sig/orb/models/new_subscription_tiered_price.rbs +5 -9
- data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +63 -9
- data/sig/orb/models/new_subscription_unit_price.rbs +5 -9
- data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +17 -9
- data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +15 -9
- data/sig/orb/models/new_tax_jar_configuration.rbs +8 -3
- data/sig/orb/models/new_usage_discount.rbs +57 -4
- data/sig/orb/models/percentage_discount.rbs +57 -4
- data/sig/orb/models/percentage_discount_interval.rbs +57 -4
- data/sig/orb/models/plan_create_params.rbs +973 -11
- data/sig/orb/models/plan_phase_amount_discount_adjustment.rbs +57 -4
- data/sig/orb/models/plan_phase_maximum_adjustment.rbs +57 -4
- data/sig/orb/models/plan_phase_minimum_adjustment.rbs +57 -4
- data/sig/orb/models/plan_phase_percentage_discount_adjustment.rbs +57 -4
- data/sig/orb/models/plan_phase_usage_discount_adjustment.rbs +57 -4
- data/sig/orb/models/plans/migration_cancel_params.rbs +25 -0
- data/sig/orb/models/plans/migration_cancel_response.rbs +62 -0
- data/sig/orb/models/plans/migration_list_params.rbs +32 -0
- data/sig/orb/models/plans/migration_list_response.rbs +62 -0
- data/sig/orb/models/plans/migration_retrieve_params.rbs +25 -0
- data/sig/orb/models/plans/migration_retrieve_response.rbs +62 -0
- data/sig/orb/models/price.rbs +4977 -934
- data/sig/orb/models/price_create_params.rbs +1024 -104
- data/sig/orb/models/price_evaluate_multiple_params.rbs +784 -10
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +784 -10
- data/sig/orb/models/price_interval.rbs +5 -0
- data/sig/orb/models/subscription_change_apply_params.rbs +24 -1
- data/sig/orb/models/subscription_change_apply_response.rbs +28 -3
- data/sig/orb/models/subscription_change_cancel_response.rbs +28 -3
- data/sig/orb/models/subscription_change_list_params.rbs +60 -0
- data/sig/orb/models/subscription_change_list_response.rbs +57 -0
- data/sig/orb/models/subscription_change_retrieve_response.rbs +28 -3
- data/sig/orb/models/subscription_create_params.rbs +1954 -30
- data/sig/orb/models/subscription_list_params.rbs +10 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +817 -23
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1954 -30
- data/sig/orb/models/tier_sub_line_item.rbs +27 -4
- data/sig/orb/models/tiered_config.rbs +7 -3
- data/sig/orb/models/trial_discount.rbs +57 -4
- data/sig/orb/models/unit_config.rbs +7 -3
- data/sig/orb/models/usage_discount.rbs +57 -4
- data/sig/orb/models/usage_discount_interval.rbs +57 -4
- data/sig/orb/models.rbs +38 -36
- data/sig/orb/resources/credit_blocks.rbs +19 -0
- data/sig/orb/resources/customers/credits/ledger.rbs +2 -0
- data/sig/orb/resources/customers/credits.rbs +8 -0
- data/sig/orb/resources/customers.rbs +6 -0
- data/sig/orb/resources/invoice_line_items.rbs +2 -1
- data/sig/orb/resources/invoices.rbs +39 -0
- data/sig/orb/resources/license_types.rbs +24 -0
- data/sig/orb/resources/licenses/external_licenses.rbs +21 -0
- data/sig/orb/resources/licenses/usage.rbs +30 -0
- data/sig/orb/resources/licenses.rbs +48 -0
- data/sig/orb/resources/plans/migrations.rbs +28 -0
- data/sig/orb/resources/plans.rbs +2 -0
- data/sig/orb/resources/prices.rbs +28 -24
- data/sig/orb/resources/subscription_changes.rbs +13 -0
- data/sig/orb/resources/subscriptions.rbs +3 -0
- metadata +163 -56
- data/lib/orb/models/bps_config.rb +0 -24
- data/lib/orb/models/bps_tier.rb +0 -40
- data/lib/orb/models/bulk_bps_config.rb +0 -20
- data/lib/orb/models/bulk_bps_tier.rb +0 -32
- data/lib/orb/models/new_floating_bulk_bps_price.rb +0 -197
- data/lib/orb/models/new_floating_tiered_bps_price.rb +0 -197
- data/lib/orb/models/new_plan_bps_price.rb +0 -205
- data/lib/orb/models/new_plan_tier_with_proration_price.rb +0 -207
- data/lib/orb/models/new_plan_tiered_bps_price.rb +0 -207
- data/lib/orb/models/new_subscription_bps_price.rb +0 -207
- data/lib/orb/models/new_subscription_tier_with_proration_price.rb +0 -207
- data/lib/orb/models/new_subscription_tiered_bps_price.rb +0 -207
- data/lib/orb/models/tier_config.rb +0 -27
- data/lib/orb/models/tiered_bps_config.rb +0 -20
- data/lib/orb/models/transform_price_filter.rb +0 -61
- data/rbi/orb/models/bps_config.rbi +0 -36
- data/rbi/orb/models/bps_tier.rbi +0 -58
- data/rbi/orb/models/bulk_bps_config.rbi +0 -31
- data/rbi/orb/models/bulk_bps_tier.rbi +0 -50
- data/rbi/orb/models/new_floating_bps_price.rbi +0 -294
- data/rbi/orb/models/new_floating_bulk_bps_price.rbi +0 -309
- data/rbi/orb/models/new_plan_bps_price.rbi +0 -304
- data/rbi/orb/models/new_plan_bulk_bps_price.rbi +0 -307
- data/rbi/orb/models/new_plan_tier_with_proration_price.rbi +0 -337
- data/rbi/orb/models/new_plan_tiered_bps_price.rbi +0 -314
- data/rbi/orb/models/new_subscription_bps_price.rbi +0 -317
- data/rbi/orb/models/new_subscription_bulk_bps_price.rbi +0 -338
- data/rbi/orb/models/tier_config.rbi +0 -40
- data/rbi/orb/models/tiered_bps_config.rbi +0 -29
- data/rbi/orb/models/transform_price_filter.rbi +0 -106
- data/sig/orb/models/bps_config.rbs +0 -15
- data/sig/orb/models/bps_tier.rbs +0 -35
- data/sig/orb/models/bulk_bps_config.rbs +0 -13
- data/sig/orb/models/bulk_bps_tier.rbs +0 -26
- data/sig/orb/models/new_floating_bps_price.rbs +0 -135
- data/sig/orb/models/new_floating_tiered_bps_price.rbs +0 -135
- data/sig/orb/models/new_plan_bps_price.rbs +0 -140
- data/sig/orb/models/new_plan_bulk_bps_price.rbs +0 -140
- data/sig/orb/models/new_plan_tier_with_proration_price.rbs +0 -140
- data/sig/orb/models/new_subscription_bulk_bps_price.rbs +0 -140
- data/sig/orb/models/new_subscription_tier_with_proration_price.rbs +0 -140
- data/sig/orb/models/new_subscription_tiered_bps_price.rbs +0 -140
- data/sig/orb/models/tier_config.rbs +0 -26
- data/sig/orb/models/tiered_bps_config.rbs +0 -13
- data/sig/orb/models/transform_price_filter.rbs +0 -56
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 00424b4ad5313d78c7d0bdc5030c16fd1d69407bca56b2e21f08f23ef71d020a
|
|
4
|
+
data.tar.gz: 6d6701aa83c11d7bd3b0dd7c0acdb6ebba1c16abc9459611e20aee18e5c02bc8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78db60c44706650e85b0f51648f9451473c0a8ce4df080ffff020d47e29031b99e2689de610a8e0e4afe91aac33989836fcb43b6508e4b768aec662e26bb28a6
|
|
7
|
+
data.tar.gz: d34e236c1be08805668e64e147e028db88e3b635ac592204e7d800eceab334bef7cf05491c83ec9835ff415eff126d172fc1db5fbb956e3b4b933d3a96853e89
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,103 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.12.0 (2026-02-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.11.2...v1.12.0](https://github.com/orbcorp/orb-ruby/compare/v1.11.2...v1.12.0)
|
|
6
|
+
|
|
7
|
+
### ⚠ BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
* **api:** define shared model ConversionRateConfig
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **api:** api update ([25dea19](https://github.com/orbcorp/orb-ruby/commit/25dea196cdd20a1099d54e7f7872037cc76de888))
|
|
14
|
+
* **api:** api update ([065b4c0](https://github.com/orbcorp/orb-ruby/commit/065b4c072106c25518386f10483230ce3b8369bf))
|
|
15
|
+
* **api:** api update ([1cae097](https://github.com/orbcorp/orb-ruby/commit/1cae0970ef281a06ac1004bae27c2870d4015834))
|
|
16
|
+
* **api:** api update ([20be312](https://github.com/orbcorp/orb-ruby/commit/20be31255b3b157e64bcee41c530767ebae7ae46))
|
|
17
|
+
* **api:** api update ([82a95e1](https://github.com/orbcorp/orb-ruby/commit/82a95e16b9a27835527f87601e8017029dbb6adf))
|
|
18
|
+
* **api:** api update ([b28aaa6](https://github.com/orbcorp/orb-ruby/commit/b28aaa6a7b47420b5006876f407e81da69da2960))
|
|
19
|
+
* **api:** api update ([99c34e5](https://github.com/orbcorp/orb-ruby/commit/99c34e5534e553bb0d1371029ebb187a4996d8a0))
|
|
20
|
+
* **api:** api update ([06f2f3a](https://github.com/orbcorp/orb-ruby/commit/06f2f3a630bebb897c6d8179d26b874d57aa5170))
|
|
21
|
+
* **api:** api update ([becbbfb](https://github.com/orbcorp/orb-ruby/commit/becbbfbda376e7262edc85e8b62033c900802aa3))
|
|
22
|
+
* **api:** api update ([b6cd2e4](https://github.com/orbcorp/orb-ruby/commit/b6cd2e48e6f93bd9c35a03370bf2bcaec81dfe40))
|
|
23
|
+
* **api:** api update ([87a0726](https://github.com/orbcorp/orb-ruby/commit/87a07260f66116747a5e9fc1fef8b04e2ed2ce73))
|
|
24
|
+
* **api:** api update ([be086a4](https://github.com/orbcorp/orb-ruby/commit/be086a41778e92515daa377fd87f6f0abfca72ae))
|
|
25
|
+
* **api:** api update ([9f52897](https://github.com/orbcorp/orb-ruby/commit/9f528979375caa801a1cf91f8bf5d3918a09c4ef))
|
|
26
|
+
* **api:** api update ([98aaf7c](https://github.com/orbcorp/orb-ruby/commit/98aaf7c01983329fe7900895b91f79192b38e15e))
|
|
27
|
+
* **api:** api update ([921d3c6](https://github.com/orbcorp/orb-ruby/commit/921d3c6a87d758ce6a1cc3fcfd7f4b81e0482d86))
|
|
28
|
+
* **api:** api update ([88e3262](https://github.com/orbcorp/orb-ruby/commit/88e32624c94e7de29738f086c90e41b07dcdd760))
|
|
29
|
+
* **api:** api update ([4de7f17](https://github.com/orbcorp/orb-ruby/commit/4de7f17ac1c5fe9b440348e06529528ef41a317e))
|
|
30
|
+
* **api:** api update ([6ada340](https://github.com/orbcorp/orb-ruby/commit/6ada3406fbcb73e97da781bffaa5c0dcc81d3ad1))
|
|
31
|
+
* **api:** api update ([455c9c1](https://github.com/orbcorp/orb-ruby/commit/455c9c18b77ee41a6b9c27fc791cc622553b83f8))
|
|
32
|
+
* **api:** api update ([024cfe9](https://github.com/orbcorp/orb-ruby/commit/024cfe9ce8ec66066224003fd8476cde441dfcba))
|
|
33
|
+
* **api:** api update ([d677c86](https://github.com/orbcorp/orb-ruby/commit/d677c8652f13f00ab40e63799223f64807d4d624))
|
|
34
|
+
* **api:** api update ([97803ff](https://github.com/orbcorp/orb-ruby/commit/97803ffbb43d1730ebb2f23386b241a3e9f99ee4))
|
|
35
|
+
* **api:** api update ([e883731](https://github.com/orbcorp/orb-ruby/commit/e8837312b28020f32d984bc83003be7c5d0bbe58))
|
|
36
|
+
* **api:** api update ([c82723f](https://github.com/orbcorp/orb-ruby/commit/c82723f6b075de5b8b806f4523437c31bc3f4d36))
|
|
37
|
+
* **api:** api update ([b3fa16d](https://github.com/orbcorp/orb-ruby/commit/b3fa16d2ae0fa06ed8c04f7c10634d240152e8b5))
|
|
38
|
+
* **api:** api update ([863a72d](https://github.com/orbcorp/orb-ruby/commit/863a72d5bc1ed22405334019d51e987daadedff4))
|
|
39
|
+
* **api:** api update ([6df80f0](https://github.com/orbcorp/orb-ruby/commit/6df80f039a079ed7c9c15201e6693ac88e64ee12))
|
|
40
|
+
* **api:** api update ([34d9e85](https://github.com/orbcorp/orb-ruby/commit/34d9e857f7863e718aaa844dcf0c299e234e9ab7))
|
|
41
|
+
* **api:** api update ([21271b0](https://github.com/orbcorp/orb-ruby/commit/21271b04f2b4b3af856b02dd156542770683f6d8))
|
|
42
|
+
* **api:** api update ([182e255](https://github.com/orbcorp/orb-ruby/commit/182e255a2ed9a39f774afb700320ff762da40e6d))
|
|
43
|
+
* **api:** api update ([87ab4bb](https://github.com/orbcorp/orb-ruby/commit/87ab4bb08910a9c6e5a7995ca307e8a80c737c39))
|
|
44
|
+
* **api:** api update ([dbeafc7](https://github.com/orbcorp/orb-ruby/commit/dbeafc76cc391a10d8cb21f5db2ef8bb825aee1c))
|
|
45
|
+
* **api:** api update ([f8b2792](https://github.com/orbcorp/orb-ruby/commit/f8b27927f181b45c2196de229a35b5eae6122f46))
|
|
46
|
+
* **api:** api update ([f8c9f2c](https://github.com/orbcorp/orb-ruby/commit/f8c9f2c57e94d09130d68b080b0adc5ae38bbd30))
|
|
47
|
+
* **api:** api update ([d1fc414](https://github.com/orbcorp/orb-ruby/commit/d1fc414cb976afe6bb19dc284dceb7ed7bfa38c2))
|
|
48
|
+
* **api:** api update ([83a6ffd](https://github.com/orbcorp/orb-ruby/commit/83a6ffda9613b6571029f01235d673d179294c94))
|
|
49
|
+
* **api:** api update ([343fa0b](https://github.com/orbcorp/orb-ruby/commit/343fa0b8a9a724b73f8abe5e9de34795f232e065))
|
|
50
|
+
* **api:** api update ([b89ea6d](https://github.com/orbcorp/orb-ruby/commit/b89ea6d10a12909e77c76617d11068ade5cf6fc8))
|
|
51
|
+
* **api:** api update ([be80854](https://github.com/orbcorp/orb-ruby/commit/be80854305b7dd24350c0a955de536d37233bc35))
|
|
52
|
+
* **api:** api update ([8e3ac4b](https://github.com/orbcorp/orb-ruby/commit/8e3ac4b248b2aca6ac6d5360f34be8521b05bc83))
|
|
53
|
+
* **api:** api update ([246283d](https://github.com/orbcorp/orb-ruby/commit/246283dc41fd3d9b128ac44ccd8550ae7b987578))
|
|
54
|
+
* **api:** api update ([bc6c8f9](https://github.com/orbcorp/orb-ruby/commit/bc6c8f9914220783adeb80fa6a9eb87d009fa58d))
|
|
55
|
+
* **api:** api update ([394af82](https://github.com/orbcorp/orb-ruby/commit/394af826a5ba3cd462447304c8ec659038e67617))
|
|
56
|
+
* **api:** define shared model ConversionRateConfig ([aa669fe](https://github.com/orbcorp/orb-ruby/commit/aa669fef9079dbac856be83d56cabd826e3c47c0))
|
|
57
|
+
* **api:** manual updates ([85ded24](https://github.com/orbcorp/orb-ruby/commit/85ded24125953bfdaac7a5f862633929c07b0546))
|
|
58
|
+
* **api:** manual updates ([45682e2](https://github.com/orbcorp/orb-ruby/commit/45682e2e4835f5575b9efc9c5d0bd307f5610baa))
|
|
59
|
+
* expose response headers for both streams and errors ([cafba93](https://github.com/orbcorp/orb-ruby/commit/cafba93f8798a84815c9c9d1183327e498cb6b95))
|
|
60
|
+
* extract minimum composite to type ([3bd8a47](https://github.com/orbcorp/orb-ruby/commit/3bd8a47a7c0601ccb9c43b472131562319a59e51))
|
|
61
|
+
* handle thread interrupts in the core HTTP client ([bd23d78](https://github.com/orbcorp/orb-ruby/commit/bd23d789ed205441ea6f6d76324278867eaf59eb))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
* absolutely qualified uris should always override the default ([22b2593](https://github.com/orbcorp/orb-ruby/commit/22b25937df7cf77dbf1e1a9836e5cd822087d338))
|
|
67
|
+
* always send `filename=...` for multipart requests where a file is expected ([aefe58f](https://github.com/orbcorp/orb-ruby/commit/aefe58f92b1296aa30172ce8206f84723a3a326c))
|
|
68
|
+
* better thread safety via early initializing SSL store during HTTP client creation ([89f6a24](https://github.com/orbcorp/orb-ruby/commit/89f6a24e6ed1147c45a583c91ac368932cf37ddb))
|
|
69
|
+
* calling `break` out of streams should be instantaneous ([c7f51d6](https://github.com/orbcorp/orb-ruby/commit/c7f51d6d47678f33015fdffc78e6cff826a90a2c))
|
|
70
|
+
* **client:** always add content-length to post body, even when empty ([59f4f8b](https://github.com/orbcorp/orb-ruby/commit/59f4f8b2416b68c556f75e8f4e89d647cd93a1fe))
|
|
71
|
+
* **client:** loosen json header parsing ([60bf3f3](https://github.com/orbcorp/orb-ruby/commit/60bf3f3bfda9caa36269e75ccb5d5df6c4811bd0))
|
|
72
|
+
* coroutine leaks from connection pool ([a4faf55](https://github.com/orbcorp/orb-ruby/commit/a4faf55a381bcdaae01f0a22cd8922038af38f69))
|
|
73
|
+
* **internal:** use null byte as file separator in the fast formatting script ([58f092f](https://github.com/orbcorp/orb-ruby/commit/58f092f32214ae8deb17db5e002f10fafd60378e))
|
|
74
|
+
* issue where json.parse errors when receiving HTTP 204 with nobody ([ecbf9f1](https://github.com/orbcorp/orb-ruby/commit/ecbf9f18b8229cb9d9c729a346a5f00dc1be2427))
|
|
75
|
+
* shorten multipart boundary sep to less than RFC specificed max length ([984b6ad](https://github.com/orbcorp/orb-ruby/commit/984b6ad403302ab97275136e145dce322ce82e9b))
|
|
76
|
+
* should not reuse buffers for `IO.copy_stream` interop ([11db4b2](https://github.com/orbcorp/orb-ruby/commit/11db4b2e6edf33581a21c6eacfbdaf347af418ea))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Performance Improvements
|
|
80
|
+
|
|
81
|
+
* faster code formatting ([9538971](https://github.com/orbcorp/orb-ruby/commit/95389713d7c3b97ec3cf0963b86211d5fba72fe4))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Chores
|
|
85
|
+
|
|
86
|
+
* allow fast-format to use bsd sed as well ([6566897](https://github.com/orbcorp/orb-ruby/commit/6566897b0797bdbad69e21ed05d97f4ce1509f07))
|
|
87
|
+
* bump dependency version and update sorbet types ([26ac9ce](https://github.com/orbcorp/orb-ruby/commit/26ac9ce1b4ae0315417ece34fc02b63b569db0c6))
|
|
88
|
+
* **client:** send user-agent header ([ed62aa3](https://github.com/orbcorp/orb-ruby/commit/ed62aa37562af4ddca14635d87bc44fe049df745))
|
|
89
|
+
* do not install brew dependencies in ./scripts/bootstrap by default ([c7d1331](https://github.com/orbcorp/orb-ruby/commit/c7d13317194914b406f35048eb198c715e3645da))
|
|
90
|
+
* **docs:** remove www prefix ([fd0b56a](https://github.com/orbcorp/orb-ruby/commit/fd0b56a55df0ae699a00fa168c3cf1524bff5a23))
|
|
91
|
+
* explicitly require "base64" gem ([2dc59bc](https://github.com/orbcorp/orb-ruby/commit/2dc59bc83506fbb02785f784023a217e0472513e))
|
|
92
|
+
* fix typo in descriptions ([ebb72da](https://github.com/orbcorp/orb-ruby/commit/ebb72daa8a4a736d1c4a68c44bf346d3fc93c45d))
|
|
93
|
+
* ignore linter error for tests having large collections ([717bc2e](https://github.com/orbcorp/orb-ruby/commit/717bc2e5e09f3c6cea641189a2a9eb516dcbf0ec))
|
|
94
|
+
* **internal:** codegen related update ([fced85a](https://github.com/orbcorp/orb-ruby/commit/fced85ad0524759c290f1a5afaad4e7baaa1525e))
|
|
95
|
+
* **internal:** codegen related update ([01a2d5d](https://github.com/orbcorp/orb-ruby/commit/01a2d5dbfe250eab0597658dd7156ba234bf6424))
|
|
96
|
+
* **internal:** codegen related update ([88e7ca5](https://github.com/orbcorp/orb-ruby/commit/88e7ca54ee9a3aeed69433c775638765f2838514))
|
|
97
|
+
* **internal:** codegen related update ([d7dd0b8](https://github.com/orbcorp/orb-ruby/commit/d7dd0b8380fd9ec066388c3327ed16fdba9f7fa6))
|
|
98
|
+
* **internal:** update `actions/checkout` version ([03524b6](https://github.com/orbcorp/orb-ruby/commit/03524b6b0a9252b46637bde590b46a98f67ec497))
|
|
99
|
+
* move `cgi` into dependencies for ruby 4 ([09ae2b0](https://github.com/orbcorp/orb-ruby/commit/09ae2b03acf7b359b387b682250cd412e0834057))
|
|
100
|
+
|
|
3
101
|
## 1.11.2 (2025-08-29)
|
|
4
102
|
|
|
5
103
|
Full Changelog: [v1.11.1...v1.11.2](https://github.com/orbcorp/orb-ruby/compare/v1.11.1...v1.11.2)
|
data/README.md
CHANGED
data/lib/orb/client.rb
CHANGED
|
@@ -66,6 +66,15 @@ module Orb
|
|
|
66
66
|
# @return [Orb::Resources::SubscriptionChanges]
|
|
67
67
|
attr_reader :subscription_changes
|
|
68
68
|
|
|
69
|
+
# @return [Orb::Resources::CreditBlocks]
|
|
70
|
+
attr_reader :credit_blocks
|
|
71
|
+
|
|
72
|
+
# @return [Orb::Resources::LicenseTypes]
|
|
73
|
+
attr_reader :license_types
|
|
74
|
+
|
|
75
|
+
# @return [Orb::Resources::Licenses]
|
|
76
|
+
attr_reader :licenses
|
|
77
|
+
|
|
69
78
|
# @api private
|
|
70
79
|
#
|
|
71
80
|
# @return [Hash{String=>String}]
|
|
@@ -133,6 +142,9 @@ module Orb
|
|
|
133
142
|
@alerts = Orb::Resources::Alerts.new(client: self)
|
|
134
143
|
@dimensional_price_groups = Orb::Resources::DimensionalPriceGroups.new(client: self)
|
|
135
144
|
@subscription_changes = Orb::Resources::SubscriptionChanges.new(client: self)
|
|
145
|
+
@credit_blocks = Orb::Resources::CreditBlocks.new(client: self)
|
|
146
|
+
@license_types = Orb::Resources::LicenseTypes.new(client: self)
|
|
147
|
+
@licenses = Orb::Resources::Licenses.new(client: self)
|
|
136
148
|
end
|
|
137
149
|
end
|
|
138
150
|
end
|
data/lib/orb/errors.rb
CHANGED
|
@@ -40,6 +40,9 @@ module Orb
|
|
|
40
40
|
# @return [Integer, nil]
|
|
41
41
|
attr_accessor :status
|
|
42
42
|
|
|
43
|
+
# @return [Hash{String=>String}, nil]
|
|
44
|
+
attr_accessor :headers
|
|
45
|
+
|
|
43
46
|
# @return [Object, nil]
|
|
44
47
|
attr_accessor :body
|
|
45
48
|
|
|
@@ -47,13 +50,15 @@ module Orb
|
|
|
47
50
|
#
|
|
48
51
|
# @param url [URI::Generic]
|
|
49
52
|
# @param status [Integer, nil]
|
|
53
|
+
# @param headers [Hash{String=>String}, nil]
|
|
50
54
|
# @param body [Object, nil]
|
|
51
55
|
# @param request [nil]
|
|
52
56
|
# @param response [nil]
|
|
53
57
|
# @param message [String, nil]
|
|
54
|
-
def initialize(url:, status: nil, body: nil, request: nil, response: nil, message: nil)
|
|
58
|
+
def initialize(url:, status: nil, headers: nil, body: nil, request: nil, response: nil, message: nil)
|
|
55
59
|
@url = url
|
|
56
60
|
@status = status
|
|
61
|
+
@headers = headers
|
|
57
62
|
@body = body
|
|
58
63
|
@request = request
|
|
59
64
|
@response = response
|
|
@@ -74,6 +79,7 @@ module Orb
|
|
|
74
79
|
#
|
|
75
80
|
# @param url [URI::Generic]
|
|
76
81
|
# @param status [nil]
|
|
82
|
+
# @param headers [Hash{String=>String}, nil]
|
|
77
83
|
# @param body [nil]
|
|
78
84
|
# @param request [nil]
|
|
79
85
|
# @param response [nil]
|
|
@@ -81,6 +87,7 @@ module Orb
|
|
|
81
87
|
def initialize(
|
|
82
88
|
url:,
|
|
83
89
|
status: nil,
|
|
90
|
+
headers: nil,
|
|
84
91
|
body: nil,
|
|
85
92
|
request: nil,
|
|
86
93
|
response: nil,
|
|
@@ -95,6 +102,7 @@ module Orb
|
|
|
95
102
|
#
|
|
96
103
|
# @param url [URI::Generic]
|
|
97
104
|
# @param status [nil]
|
|
105
|
+
# @param headers [Hash{String=>String}, nil]
|
|
98
106
|
# @param body [nil]
|
|
99
107
|
# @param request [nil]
|
|
100
108
|
# @param response [nil]
|
|
@@ -102,6 +110,7 @@ module Orb
|
|
|
102
110
|
def initialize(
|
|
103
111
|
url:,
|
|
104
112
|
status: nil,
|
|
113
|
+
headers: nil,
|
|
105
114
|
body: nil,
|
|
106
115
|
request: nil,
|
|
107
116
|
response: nil,
|
|
@@ -116,22 +125,25 @@ module Orb
|
|
|
116
125
|
#
|
|
117
126
|
# @param url [URI::Generic]
|
|
118
127
|
# @param status [Integer]
|
|
128
|
+
# @param headers [Hash{String=>String}, nil]
|
|
119
129
|
# @param body [Object, nil]
|
|
120
130
|
# @param request [nil]
|
|
121
131
|
# @param response [nil]
|
|
122
132
|
# @param message [String, nil]
|
|
123
133
|
#
|
|
124
134
|
# @return [self]
|
|
125
|
-
def self.for(url:, status:, body:, request:, response:, message: nil)
|
|
135
|
+
def self.for(url:, status:, headers:, body:, request:, response:, message: nil)
|
|
126
136
|
key = Orb::Internal::Util.dig(body, :type)
|
|
127
|
-
kwargs =
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
kwargs =
|
|
138
|
+
{
|
|
139
|
+
url: url,
|
|
140
|
+
status: status,
|
|
141
|
+
headers: headers,
|
|
142
|
+
body: body,
|
|
143
|
+
request: request,
|
|
144
|
+
response: response,
|
|
145
|
+
message: message
|
|
146
|
+
}
|
|
135
147
|
|
|
136
148
|
case [status, key]
|
|
137
149
|
in [400, Orb::Errors::ConstraintViolation::TYPE]
|
|
@@ -187,15 +199,17 @@ module Orb
|
|
|
187
199
|
#
|
|
188
200
|
# @param url [URI::Generic]
|
|
189
201
|
# @param status [Integer]
|
|
202
|
+
# @param headers [Hash{String=>String}, nil]
|
|
190
203
|
# @param body [Object, nil]
|
|
191
204
|
# @param request [nil]
|
|
192
205
|
# @param response [nil]
|
|
193
206
|
# @param message [String, nil]
|
|
194
|
-
def initialize(url:, status:, body:, request:, response:, message: nil)
|
|
207
|
+
def initialize(url:, status:, headers:, body:, request:, response:, message: nil)
|
|
195
208
|
message ||= {url: url.to_s, status: status, body: body}
|
|
196
209
|
super(
|
|
197
210
|
url: url,
|
|
198
211
|
status: status,
|
|
212
|
+
headers: headers,
|
|
199
213
|
body: body,
|
|
200
214
|
request: request,
|
|
201
215
|
response: response,
|
data/lib/orb/file_part.rb
CHANGED
|
@@ -38,18 +38,21 @@ module Orb
|
|
|
38
38
|
def to_yaml(*a) = read.to_yaml(*a)
|
|
39
39
|
|
|
40
40
|
# @param content [Pathname, StringIO, IO, String]
|
|
41
|
-
# @param filename [String, nil]
|
|
41
|
+
# @param filename [Pathname, String, nil]
|
|
42
42
|
# @param content_type [String, nil]
|
|
43
43
|
def initialize(content, filename: nil, content_type: nil)
|
|
44
|
-
@
|
|
44
|
+
@content_type = content_type
|
|
45
45
|
@filename =
|
|
46
|
-
case content
|
|
47
|
-
in Pathname
|
|
48
|
-
|
|
46
|
+
case [filename, (@content = content)]
|
|
47
|
+
in [String | Pathname, _]
|
|
48
|
+
::File.basename(filename)
|
|
49
|
+
in [nil, Pathname]
|
|
50
|
+
content.basename.to_path
|
|
51
|
+
in [nil, IO]
|
|
52
|
+
content.to_path
|
|
49
53
|
else
|
|
50
|
-
filename
|
|
54
|
+
filename
|
|
51
55
|
end
|
|
52
|
-
@content_type = content_type
|
|
53
56
|
end
|
|
54
57
|
end
|
|
55
58
|
end
|
data/lib/orb/internal/page.rb
CHANGED
|
@@ -60,7 +60,7 @@ module Orb
|
|
|
60
60
|
#
|
|
61
61
|
# @param client [Orb::Internal::Transport::BaseClient]
|
|
62
62
|
# @param req [Hash{Symbol=>Object}]
|
|
63
|
-
# @param headers [Hash{String=>String}
|
|
63
|
+
# @param headers [Hash{String=>String}]
|
|
64
64
|
# @param page_data [Hash{Symbol=>Object}]
|
|
65
65
|
def initialize(client:, req:, headers:, page_data:)
|
|
66
66
|
super
|
|
@@ -47,7 +47,7 @@ module Orb
|
|
|
47
47
|
# @api private
|
|
48
48
|
#
|
|
49
49
|
# @param status [Integer]
|
|
50
|
-
# @param headers [Hash{String=>String}
|
|
50
|
+
# @param headers [Hash{String=>String}]
|
|
51
51
|
#
|
|
52
52
|
# @return [Boolean]
|
|
53
53
|
def should_retry?(status, headers:)
|
|
@@ -85,7 +85,7 @@ module Orb
|
|
|
85
85
|
#
|
|
86
86
|
# @param status [Integer]
|
|
87
87
|
#
|
|
88
|
-
# @param response_headers [Hash{String=>String}
|
|
88
|
+
# @param response_headers [Hash{String=>String}]
|
|
89
89
|
#
|
|
90
90
|
# @return [Hash{Symbol=>Object}]
|
|
91
91
|
def follow_redirect(request, status:, response_headers:)
|
|
@@ -201,7 +201,8 @@ module Orb
|
|
|
201
201
|
self.class::PLATFORM_HEADERS,
|
|
202
202
|
{
|
|
203
203
|
"accept" => "application/json",
|
|
204
|
-
"content-type" => "application/json"
|
|
204
|
+
"content-type" => "application/json",
|
|
205
|
+
"user-agent" => user_agent
|
|
205
206
|
},
|
|
206
207
|
headers
|
|
207
208
|
)
|
|
@@ -219,6 +220,11 @@ module Orb
|
|
|
219
220
|
# @return [Hash{String=>String}]
|
|
220
221
|
private def auth_headers = {}
|
|
221
222
|
|
|
223
|
+
# @api private
|
|
224
|
+
#
|
|
225
|
+
# @return [String]
|
|
226
|
+
private def user_agent = "#{self.class.name}/Ruby #{Orb::VERSION}"
|
|
227
|
+
|
|
222
228
|
# @api private
|
|
223
229
|
#
|
|
224
230
|
# @return [String]
|
|
@@ -375,6 +381,7 @@ module Orb
|
|
|
375
381
|
rescue Orb::Errors::APIConnectionError => e
|
|
376
382
|
status = e
|
|
377
383
|
end
|
|
384
|
+
headers = Orb::Internal::Util.normalized_headers(response&.each_header&.to_h)
|
|
378
385
|
|
|
379
386
|
case status
|
|
380
387
|
in ..299
|
|
@@ -387,7 +394,7 @@ module Orb
|
|
|
387
394
|
in 300..399
|
|
388
395
|
self.class.reap_connection!(status, stream: stream)
|
|
389
396
|
|
|
390
|
-
request = self.class.follow_redirect(request, status: status, response_headers:
|
|
397
|
+
request = self.class.follow_redirect(request, status: status, response_headers: headers)
|
|
391
398
|
send_request(
|
|
392
399
|
request,
|
|
393
400
|
redirect_count: redirect_count + 1,
|
|
@@ -396,9 +403,9 @@ module Orb
|
|
|
396
403
|
)
|
|
397
404
|
in Orb::Errors::APIConnectionError if retry_count >= max_retries
|
|
398
405
|
raise status
|
|
399
|
-
in (400..) if retry_count >= max_retries || !self.class.should_retry?(status, headers:
|
|
406
|
+
in (400..) if retry_count >= max_retries || !self.class.should_retry?(status, headers: headers)
|
|
400
407
|
decoded = Kernel.then do
|
|
401
|
-
Orb::Internal::Util.decode_content(
|
|
408
|
+
Orb::Internal::Util.decode_content(headers, stream: stream, suppress_error: true)
|
|
402
409
|
ensure
|
|
403
410
|
self.class.reap_connection!(status, stream: stream)
|
|
404
411
|
end
|
|
@@ -406,6 +413,7 @@ module Orb
|
|
|
406
413
|
raise Orb::Errors::APIStatusError.for(
|
|
407
414
|
url: url,
|
|
408
415
|
status: status,
|
|
416
|
+
headers: headers,
|
|
409
417
|
body: decoded,
|
|
410
418
|
request: nil,
|
|
411
419
|
response: response
|
|
@@ -482,19 +490,21 @@ module Orb
|
|
|
482
490
|
send_retry_header: send_retry_header
|
|
483
491
|
)
|
|
484
492
|
|
|
485
|
-
|
|
493
|
+
headers = Orb::Internal::Util.normalized_headers(response.each_header.to_h)
|
|
494
|
+
decoded = Orb::Internal::Util.decode_content(headers, stream: stream)
|
|
486
495
|
case req
|
|
487
496
|
in {stream: Class => st}
|
|
488
497
|
st.new(
|
|
489
498
|
model: model,
|
|
490
499
|
url: url,
|
|
491
500
|
status: status,
|
|
501
|
+
headers: headers,
|
|
492
502
|
response: response,
|
|
493
503
|
unwrap: unwrap,
|
|
494
504
|
stream: decoded
|
|
495
505
|
)
|
|
496
506
|
in {page: Class => page}
|
|
497
|
-
page.new(client: self, req: req, headers:
|
|
507
|
+
page.new(client: self, req: req, headers: headers, page_data: decoded)
|
|
498
508
|
else
|
|
499
509
|
unwrapped = Orb::Internal::Util.dig(decoded, unwrap)
|
|
500
510
|
Orb::Internal::Type::Converter.coerce(model, unwrapped)
|
|
@@ -16,10 +16,11 @@ module Orb
|
|
|
16
16
|
class << self
|
|
17
17
|
# @api private
|
|
18
18
|
#
|
|
19
|
+
# @param cert_store [OpenSSL::X509::Store]
|
|
19
20
|
# @param url [URI::Generic]
|
|
20
21
|
#
|
|
21
22
|
# @return [Net::HTTP]
|
|
22
|
-
def connect(url)
|
|
23
|
+
def connect(cert_store:, url:)
|
|
23
24
|
port =
|
|
24
25
|
case [url.port, url.scheme]
|
|
25
26
|
in [Integer, _]
|
|
@@ -33,6 +34,8 @@ module Orb
|
|
|
33
34
|
Net::HTTP.new(url.host, port).tap do
|
|
34
35
|
_1.use_ssl = %w[https wss].include?(url.scheme)
|
|
35
36
|
_1.max_retries = 0
|
|
37
|
+
|
|
38
|
+
(_1.cert_store = cert_store) if _1.use_ssl?
|
|
36
39
|
end
|
|
37
40
|
end
|
|
38
41
|
|
|
@@ -72,7 +75,7 @@ module Orb
|
|
|
72
75
|
|
|
73
76
|
case body
|
|
74
77
|
in nil
|
|
75
|
-
|
|
78
|
+
req["content-length"] ||= 0 unless req["transfer-encoding"]
|
|
76
79
|
in String
|
|
77
80
|
req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
|
|
78
81
|
req.body_stream = Orb::Internal::Util::ReadIOAdapter.new(body, &blk)
|
|
@@ -102,7 +105,7 @@ module Orb
|
|
|
102
105
|
pool =
|
|
103
106
|
@mutex.synchronize do
|
|
104
107
|
@pools[origin] ||= ConnectionPool.new(size: @size) do
|
|
105
|
-
self.class.connect(url)
|
|
108
|
+
self.class.connect(cert_store: @cert_store, url: url)
|
|
106
109
|
end
|
|
107
110
|
end
|
|
108
111
|
|
|
@@ -128,37 +131,49 @@ module Orb
|
|
|
128
131
|
url, deadline = request.fetch_values(:url, :deadline)
|
|
129
132
|
|
|
130
133
|
req = nil
|
|
131
|
-
eof = false
|
|
132
134
|
finished = false
|
|
133
|
-
closing = nil
|
|
134
135
|
|
|
135
136
|
# rubocop:disable Metrics/BlockLength
|
|
136
137
|
enum = Enumerator.new do |y|
|
|
137
|
-
|
|
138
|
-
next if finished
|
|
139
|
-
|
|
140
|
-
req, closing = self.class.build_request(request) do
|
|
141
|
-
self.class.calibrate_socket_timeout(conn, deadline)
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
self.class.calibrate_socket_timeout(conn, deadline)
|
|
145
|
-
unless conn.started?
|
|
146
|
-
conn.keep_alive_timeout = self.class::KEEP_ALIVE_TIMEOUT
|
|
147
|
-
conn.start
|
|
148
|
-
end
|
|
138
|
+
next if finished
|
|
149
139
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
140
|
+
with_pool(url, deadline: deadline) do |conn|
|
|
141
|
+
eof = false
|
|
142
|
+
closing = nil
|
|
143
|
+
::Thread.handle_interrupt(Object => :never) do
|
|
144
|
+
::Thread.handle_interrupt(Object => :immediate) do
|
|
145
|
+
req, closing = self.class.build_request(request) do
|
|
146
|
+
self.class.calibrate_socket_timeout(conn, deadline)
|
|
147
|
+
end
|
|
154
148
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
149
|
+
self.class.calibrate_socket_timeout(conn, deadline)
|
|
150
|
+
unless conn.started?
|
|
151
|
+
conn.keep_alive_timeout = self.class::KEEP_ALIVE_TIMEOUT
|
|
152
|
+
conn.start
|
|
153
|
+
end
|
|
158
154
|
|
|
159
155
|
self.class.calibrate_socket_timeout(conn, deadline)
|
|
156
|
+
::Kernel.catch(:jump) do
|
|
157
|
+
conn.request(req) do |rsp|
|
|
158
|
+
y << [req, rsp]
|
|
159
|
+
::Kernel.throw(:jump) if finished
|
|
160
|
+
|
|
161
|
+
rsp.read_body do |bytes|
|
|
162
|
+
y << bytes.force_encoding(Encoding::BINARY)
|
|
163
|
+
::Kernel.throw(:jump) if finished
|
|
164
|
+
|
|
165
|
+
self.class.calibrate_socket_timeout(conn, deadline)
|
|
166
|
+
end
|
|
167
|
+
eof = true
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
ensure
|
|
172
|
+
begin
|
|
173
|
+
conn.finish if !eof && conn&.started?
|
|
174
|
+
ensure
|
|
175
|
+
closing&.call
|
|
160
176
|
end
|
|
161
|
-
eof = true
|
|
162
177
|
end
|
|
163
178
|
end
|
|
164
179
|
rescue Timeout::Error
|
|
@@ -168,17 +183,10 @@ module Orb
|
|
|
168
183
|
end
|
|
169
184
|
# rubocop:enable Metrics/BlockLength
|
|
170
185
|
|
|
171
|
-
|
|
186
|
+
_, response = enum.next
|
|
172
187
|
body = Orb::Internal::Util.fused_enum(enum, external: true) do
|
|
173
188
|
finished = true
|
|
174
|
-
|
|
175
|
-
enum.next
|
|
176
|
-
rescue StopIteration
|
|
177
|
-
nil
|
|
178
|
-
end
|
|
179
|
-
ensure
|
|
180
|
-
conn.finish if !eof && conn&.started?
|
|
181
|
-
closing&.call
|
|
189
|
+
loop { enum.next }
|
|
182
190
|
end
|
|
183
191
|
[Integer(response.code), response, body]
|
|
184
192
|
end
|
|
@@ -189,6 +197,7 @@ module Orb
|
|
|
189
197
|
def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS)
|
|
190
198
|
@mutex = Mutex.new
|
|
191
199
|
@size = size
|
|
200
|
+
@cert_store = OpenSSL::X509::Store.new.tap(&:set_default_paths)
|
|
192
201
|
@pools = {}
|
|
193
202
|
end
|
|
194
203
|
|
|
@@ -39,7 +39,7 @@ module Orb
|
|
|
39
39
|
#
|
|
40
40
|
# @param client [Orb::Internal::Transport::BaseClient]
|
|
41
41
|
# @param req [Hash{Symbol=>Object}]
|
|
42
|
-
# @param headers [Hash{String=>String}
|
|
42
|
+
# @param headers [Hash{String=>String}]
|
|
43
43
|
# @param page_data [Object]
|
|
44
44
|
def initialize(client:, req:, headers:, page_data:)
|
|
45
45
|
@client = client
|
|
@@ -81,17 +81,20 @@ module Orb
|
|
|
81
81
|
#
|
|
82
82
|
# @return [Pathname, StringIO, IO, String, Object]
|
|
83
83
|
def dump(value, state:)
|
|
84
|
-
# rubocop:disable Lint/DuplicateBranch
|
|
85
84
|
case value
|
|
85
|
+
in StringIO | String
|
|
86
|
+
# https://datatracker.ietf.org/doc/html/rfc7578#section-4.2
|
|
87
|
+
# while not required, a filename is recommended, and in practice many servers do expect this
|
|
88
|
+
Orb::FilePart.new(value, filename: "upload")
|
|
86
89
|
in IO
|
|
87
90
|
state[:can_retry] = false
|
|
91
|
+
value.to_path.nil? ? Orb::FilePart.new(value, filename: "upload") : value
|
|
88
92
|
in Orb::FilePart if value.content.is_a?(IO)
|
|
89
93
|
state[:can_retry] = false
|
|
94
|
+
value
|
|
90
95
|
else
|
|
96
|
+
value
|
|
91
97
|
end
|
|
92
|
-
# rubocop:enable Lint/DuplicateBranch
|
|
93
|
-
|
|
94
|
-
value
|
|
95
98
|
end
|
|
96
99
|
|
|
97
100
|
# @api private
|
data/lib/orb/internal/util.rb
CHANGED
|
@@ -346,8 +346,9 @@ module Orb
|
|
|
346
346
|
base_path, base_query = lhs.fetch_values(:path, :query)
|
|
347
347
|
slashed = base_path.end_with?("/") ? base_path : "#{base_path}/"
|
|
348
348
|
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
merged = {**parse_uri(rhs.fetch(:path)), **rhs.except(:path, :query)}
|
|
350
|
+
parsed_path, parsed_query = merged.fetch_values(:path, :query)
|
|
351
|
+
override = URI::Generic.build(**merged.slice(:scheme, :host, :port), path: parsed_path)
|
|
351
352
|
|
|
352
353
|
joined = URI.join(URI::Generic.build(lhs.except(:path, :query)), slashed, override)
|
|
353
354
|
query = deep_merge(
|
|
@@ -473,10 +474,9 @@ module Orb
|
|
|
473
474
|
# @return [Enumerable<String>]
|
|
474
475
|
def writable_enum(&blk)
|
|
475
476
|
Enumerator.new do |y|
|
|
476
|
-
buf = String.new
|
|
477
477
|
y.define_singleton_method(:write) do
|
|
478
|
-
self <<
|
|
479
|
-
|
|
478
|
+
self << _1.dup
|
|
479
|
+
_1.bytesize
|
|
480
480
|
end
|
|
481
481
|
|
|
482
482
|
blk.call(y)
|
|
@@ -485,7 +485,7 @@ module Orb
|
|
|
485
485
|
end
|
|
486
486
|
|
|
487
487
|
# @type [Regexp]
|
|
488
|
-
JSON_CONTENT = %r{^application/(?:
|
|
488
|
+
JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}
|
|
489
489
|
# @type [Regexp]
|
|
490
490
|
JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
|
|
491
491
|
|
|
@@ -566,7 +566,8 @@ module Orb
|
|
|
566
566
|
#
|
|
567
567
|
# @return [Array(String, Enumerable<String>)]
|
|
568
568
|
private def encode_multipart_streaming(body)
|
|
569
|
-
|
|
569
|
+
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
|
|
570
|
+
boundary = SecureRandom.urlsafe_base64(46)
|
|
570
571
|
|
|
571
572
|
closing = []
|
|
572
573
|
strio = writable_enum do |y|
|
|
@@ -645,7 +646,7 @@ module Orb
|
|
|
645
646
|
#
|
|
646
647
|
# Assumes each chunk in stream has `Encoding::BINARY`.
|
|
647
648
|
#
|
|
648
|
-
# @param headers [Hash{String=>String}
|
|
649
|
+
# @param headers [Hash{String=>String}]
|
|
649
650
|
# @param stream [Enumerable<String>]
|
|
650
651
|
# @param suppress_error [Boolean]
|
|
651
652
|
#
|
|
@@ -654,7 +655,8 @@ module Orb
|
|
|
654
655
|
def decode_content(headers, stream:, suppress_error: false)
|
|
655
656
|
case (content_type = headers["content-type"])
|
|
656
657
|
in Orb::Internal::Util::JSON_CONTENT
|
|
657
|
-
json = stream.to_a.join
|
|
658
|
+
return nil if (json = stream.to_a.join).empty?
|
|
659
|
+
|
|
658
660
|
begin
|
|
659
661
|
JSON.parse(json, symbolize_names: true)
|
|
660
662
|
rescue JSON::ParserError => e
|
|
@@ -664,7 +666,11 @@ module Orb
|
|
|
664
666
|
in Orb::Internal::Util::JSONL_CONTENT
|
|
665
667
|
lines = decode_lines(stream)
|
|
666
668
|
chain_fused(lines) do |y|
|
|
667
|
-
lines.each
|
|
669
|
+
lines.each do
|
|
670
|
+
next if _1.empty?
|
|
671
|
+
|
|
672
|
+
y << JSON.parse(_1, symbolize_names: true)
|
|
673
|
+
end
|
|
668
674
|
end
|
|
669
675
|
in %r{^text/event-stream}
|
|
670
676
|
lines = decode_lines(stream)
|