orb-billing 1.13.0 → 1.14.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 +43 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +7 -0
- data/lib/orb/internal/util.rb +22 -7
- data/lib/orb/models/alert.rb +10 -1
- data/lib/orb/models/alert_create_for_customer_params.rb +8 -1
- data/lib/orb/models/alert_create_for_external_customer_params.rb +8 -1
- data/lib/orb/models/alert_create_for_subscription_params.rb +29 -1
- data/lib/orb/models/alert_disable_params.rb +8 -1
- data/lib/orb/models/alert_enable_params.rb +8 -1
- data/lib/orb/models/alert_retrieve_params.rb +7 -1
- data/lib/orb/models/alert_update_params.rb +8 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +17769 -414
- data/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb +7 -1
- data/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb +8 -1
- data/lib/orb/models/beta_create_plan_version_params.rb +17633 -406
- data/lib/orb/models/beta_fetch_plan_version_params.rb +7 -1
- data/lib/orb/models/beta_set_default_plan_version_params.rb +8 -1
- data/lib/orb/models/coupon_archive_params.rb +7 -1
- data/lib/orb/models/coupon_fetch_params.rb +7 -1
- data/lib/orb/models/coupons/subscription_list_params.rb +8 -1
- data/lib/orb/models/credit_block_delete_params.rb +7 -1
- data/lib/orb/models/credit_block_list_invoices_params.rb +7 -1
- data/lib/orb/models/credit_block_retrieve_params.rb +7 -1
- data/lib/orb/models/credit_note_fetch_params.rb +7 -1
- data/lib/orb/models/customer.rb +13 -1
- data/lib/orb/models/customer_create_params.rb +12 -1
- data/lib/orb/models/customer_delete_params.rb +7 -1
- data/lib/orb/models/customer_fetch_by_external_id_params.rb +7 -1
- data/lib/orb/models/customer_fetch_params.rb +7 -1
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +7 -1
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +7 -1
- data/lib/orb/models/customer_update_by_external_id_params.rb +25 -5
- data/lib/orb/models/customer_update_params.rb +25 -5
- data/lib/orb/models/customers/balance_transaction_create_params.rb +8 -1
- data/lib/orb/models/customers/balance_transaction_list_params.rb +8 -1
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/cost_list_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_params.rb +8 -1
- data/lib/orb/models/customers/credits/decrement_ledger_entry.rb +5 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +582 -315
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +580 -313
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +7 -1
- data/lib/orb/models/customers/credits/top_up_delete_params.rb +7 -1
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_list_params.rb +8 -1
- data/lib/orb/models/dimensional_price_group_retrieve_params.rb +7 -1
- data/lib/orb/models/dimensional_price_group_update_params.rb +8 -1
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +7 -1
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb +8 -1
- data/lib/orb/models/event_deprecate_params.rb +7 -1
- data/lib/orb/models/event_update_params.rb +8 -1
- data/lib/orb/models/events/backfill_close_params.rb +7 -1
- data/lib/orb/models/events/backfill_fetch_params.rb +7 -1
- data/lib/orb/models/events/backfill_revert_params.rb +7 -1
- data/lib/orb/models/invoice_delete_line_item_params.rb +7 -1
- data/lib/orb/models/invoice_fetch_params.rb +7 -1
- data/lib/orb/models/invoice_issue_params.rb +8 -1
- data/lib/orb/models/invoice_issue_summary_params.rb +8 -1
- data/lib/orb/models/invoice_mark_paid_params.rb +8 -1
- data/lib/orb/models/invoice_pay_params.rb +16 -1
- data/lib/orb/models/invoice_update_params.rb +8 -1
- data/lib/orb/models/invoice_void_params.rb +7 -1
- data/lib/orb/models/item_archive_params.rb +7 -1
- data/lib/orb/models/item_fetch_params.rb +7 -1
- data/lib/orb/models/item_update_params.rb +8 -1
- data/lib/orb/models/license_deactivate_params.rb +8 -1
- data/lib/orb/models/license_retrieve_by_external_id_params.rb +8 -1
- data/lib/orb/models/license_retrieve_params.rb +7 -1
- data/lib/orb/models/license_type_retrieve_params.rb +7 -1
- data/lib/orb/models/licenses/external_license_get_usage_params.rb +8 -1
- data/lib/orb/models/licenses/usage_get_usage_params.rb +8 -1
- data/lib/orb/models/metric_fetch_params.rb +7 -1
- data/lib/orb/models/metric_update_params.rb +8 -1
- data/lib/orb/models/plan_create_params.rb +8502 -1
- data/lib/orb/models/plan_fetch_params.rb +7 -1
- data/lib/orb/models/plan_update_params.rb +8 -1
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +7 -1
- data/lib/orb/models/plans/external_plan_id_update_params.rb +8 -1
- data/lib/orb/models/plans/migration_cancel_params.rb +7 -1
- data/lib/orb/models/plans/migration_list_params.rb +8 -1
- data/lib/orb/models/plans/migration_retrieve_params.rb +7 -1
- data/lib/orb/models/price.rb +248 -31
- data/lib/orb/models/price_create_params.rb +949 -1321
- data/lib/orb/models/price_evaluate_params.rb +8 -1
- data/lib/orb/models/price_fetch_params.rb +7 -1
- data/lib/orb/models/price_update_params.rb +8 -1
- data/lib/orb/models/prices/external_price_id_fetch_params.rb +7 -1
- data/lib/orb/models/prices/external_price_id_update_params.rb +8 -1
- data/lib/orb/models/subscription_cancel_params.rb +8 -1
- data/lib/orb/models/subscription_change_apply_params.rb +8 -1
- data/lib/orb/models/subscription_change_cancel_params.rb +7 -1
- data/lib/orb/models/subscription_change_retrieve_params.rb +7 -1
- data/lib/orb/models/subscription_fetch_costs_params.rb +8 -1
- data/lib/orb/models/subscription_fetch_params.rb +7 -1
- data/lib/orb/models/subscription_fetch_schedule_params.rb +8 -1
- data/lib/orb/models/subscription_fetch_usage_params.rb +8 -1
- data/lib/orb/models/subscription_price_intervals_params.rb +8 -1
- data/lib/orb/models/subscription_redeem_coupon_params.rb +8 -1
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +8 -1
- data/lib/orb/models/subscription_trigger_phase_params.rb +8 -1
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +7 -1
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +8 -1
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +7 -1
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -1
- data/lib/orb/models/subscription_update_params.rb +8 -1
- data/lib/orb/models/subscription_update_trial_params.rb +8 -1
- data/lib/orb/resources/alerts.rb +8 -1
- data/lib/orb/resources/coupons.rb +1 -2
- data/lib/orb/resources/credit_blocks.rb +11 -8
- data/lib/orb/resources/customers/credits/ledger.rb +12 -67
- data/lib/orb/resources/customers.rb +6 -5
- data/lib/orb/resources/events/backfills.rb +3 -4
- data/lib/orb/resources/invoices.rb +12 -5
- data/lib/orb/resources/prices.rb +9 -100
- data/lib/orb/resources/subscriptions.rb +4 -4
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/client.rbi +6 -0
- data/rbi/orb/internal/util.rbi +8 -0
- data/rbi/orb/models/alert.rbi +10 -0
- data/rbi/orb/models/alert_create_for_customer_params.rbi +6 -0
- data/rbi/orb/models/alert_create_for_external_customer_params.rbi +6 -0
- data/rbi/orb/models/alert_create_for_subscription_params.rbi +26 -0
- data/rbi/orb/models/alert_disable_params.rbi +6 -0
- data/rbi/orb/models/alert_enable_params.rbi +6 -0
- data/rbi/orb/models/alert_retrieve_params.rbi +13 -5
- data/rbi/orb/models/alert_update_params.rbi +6 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +30163 -889
- data/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi +10 -2
- data/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi +10 -1
- data/rbi/orb/models/beta_create_plan_version_params.rbi +30126 -884
- data/rbi/orb/models/beta_fetch_plan_version_params.rbi +10 -2
- data/rbi/orb/models/beta_set_default_plan_version_params.rbi +10 -1
- data/rbi/orb/models/coupon_archive_params.rbi +13 -5
- data/rbi/orb/models/coupon_fetch_params.rbi +13 -5
- data/rbi/orb/models/coupons/subscription_list_params.rbi +6 -0
- data/rbi/orb/models/credit_block_delete_params.rbi +13 -5
- data/rbi/orb/models/credit_block_list_invoices_params.rbi +13 -5
- data/rbi/orb/models/credit_block_retrieve_params.rbi +13 -5
- data/rbi/orb/models/credit_note_fetch_params.rbi +13 -5
- data/rbi/orb/models/customer.rbi +22 -0
- data/rbi/orb/models/customer_create_params.rbi +17 -0
- data/rbi/orb/models/customer_delete_params.rbi +13 -5
- data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -5
- data/rbi/orb/models/customer_fetch_params.rbi +13 -5
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +13 -5
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +13 -5
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +31 -4
- data/rbi/orb/models/customer_update_params.rbi +31 -4
- data/rbi/orb/models/customers/balance_transaction_create_params.rbi +6 -0
- data/rbi/orb/models/customers/balance_transaction_list_params.rbi +6 -0
- data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/cost_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/decrement_ledger_entry.rbi +4 -0
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +861 -478
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +861 -478
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/ledger_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +6 -1
- data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +10 -2
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_list_params.rbi +6 -0
- data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -5
- data/rbi/orb/models/dimensional_price_group_update_params.rbi +6 -0
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +16 -5
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi +6 -0
- data/rbi/orb/models/event_deprecate_params.rbi +13 -5
- data/rbi/orb/models/event_update_params.rbi +6 -0
- data/rbi/orb/models/events/backfill_close_params.rbi +13 -5
- data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -5
- data/rbi/orb/models/events/backfill_revert_params.rbi +13 -5
- data/rbi/orb/models/invoice_delete_line_item_params.rbi +10 -2
- data/rbi/orb/models/invoice_fetch_params.rbi +13 -5
- data/rbi/orb/models/invoice_issue_params.rbi +10 -1
- data/rbi/orb/models/invoice_issue_summary_params.rbi +10 -1
- data/rbi/orb/models/invoice_mark_paid_params.rbi +6 -0
- data/rbi/orb/models/invoice_pay_params.rbi +27 -5
- data/rbi/orb/models/invoice_update_params.rbi +6 -0
- data/rbi/orb/models/invoice_void_params.rbi +13 -5
- data/rbi/orb/models/item_archive_params.rbi +13 -5
- data/rbi/orb/models/item_fetch_params.rbi +13 -5
- data/rbi/orb/models/item_update_params.rbi +6 -0
- data/rbi/orb/models/license_deactivate_params.rbi +10 -1
- data/rbi/orb/models/license_retrieve_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/license_retrieve_params.rbi +13 -5
- data/rbi/orb/models/license_type_retrieve_params.rbi +13 -5
- data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +6 -0
- data/rbi/orb/models/licenses/usage_get_usage_params.rbi +6 -0
- data/rbi/orb/models/metric_fetch_params.rbi +13 -5
- data/rbi/orb/models/metric_update_params.rbi +6 -0
- data/rbi/orb/models/plan_create_params.rbi +14618 -0
- data/rbi/orb/models/plan_fetch_params.rbi +13 -5
- data/rbi/orb/models/plan_update_params.rbi +6 -0
- data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -5
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +6 -0
- data/rbi/orb/models/plans/migration_cancel_params.rbi +10 -2
- data/rbi/orb/models/plans/migration_list_params.rbi +6 -0
- data/rbi/orb/models/plans/migration_retrieve_params.rbi +10 -2
- data/rbi/orb/models/price.rbi +186 -0
- data/rbi/orb/models/price_create_params.rbi +1778 -2590
- data/rbi/orb/models/price_evaluate_params.rbi +6 -0
- data/rbi/orb/models/price_fetch_params.rbi +13 -5
- data/rbi/orb/models/price_update_params.rbi +6 -0
- data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +13 -5
- data/rbi/orb/models/prices/external_price_id_update_params.rbi +6 -0
- data/rbi/orb/models/subscription_cancel_params.rbi +6 -0
- data/rbi/orb/models/subscription_change_apply_params.rbi +6 -0
- data/rbi/orb/models/subscription_change_cancel_params.rbi +16 -5
- data/rbi/orb/models/subscription_change_retrieve_params.rbi +16 -5
- data/rbi/orb/models/subscription_fetch_costs_params.rbi +6 -0
- data/rbi/orb/models/subscription_fetch_params.rbi +13 -5
- data/rbi/orb/models/subscription_fetch_schedule_params.rbi +6 -0
- data/rbi/orb/models/subscription_fetch_usage_params.rbi +6 -0
- data/rbi/orb/models/subscription_price_intervals_params.rbi +6 -0
- data/rbi/orb/models/subscription_redeem_coupon_params.rbi +6 -0
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6 -0
- data/rbi/orb/models/subscription_trigger_phase_params.rbi +6 -0
- data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +13 -5
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +10 -1
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +13 -5
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +6 -0
- data/rbi/orb/models/subscription_update_params.rbi +6 -0
- data/rbi/orb/models/subscription_update_trial_params.rbi +6 -0
- data/rbi/orb/resources/alerts.rbi +8 -0
- data/rbi/orb/resources/coupons.rbi +1 -2
- data/rbi/orb/resources/credit_blocks.rbi +10 -7
- data/rbi/orb/resources/customers/credits/ledger.rbi +22 -132
- data/rbi/orb/resources/customers.rbi +12 -7
- data/rbi/orb/resources/events/backfills.rbi +3 -4
- data/rbi/orb/resources/invoices.rbi +11 -3
- data/rbi/orb/resources/prices.rbi +35 -184
- data/rbi/orb/resources/subscriptions.rbi +4 -4
- data/sig/orb/client.rbs +3 -0
- data/sig/orb/internal/util.rbs +4 -0
- data/sig/orb/models/alert.rbs +5 -0
- data/sig/orb/models/alert_create_for_customer_params.rbs +5 -0
- data/sig/orb/models/alert_create_for_external_customer_params.rbs +5 -0
- data/sig/orb/models/alert_create_for_subscription_params.rbs +16 -1
- data/sig/orb/models/alert_disable_params.rbs +6 -1
- data/sig/orb/models/alert_enable_params.rbs +6 -1
- data/sig/orb/models/alert_retrieve_params.rbs +9 -3
- data/sig/orb/models/alert_update_params.rbs +5 -1
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +12092 -373
- data/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs +6 -1
- data/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs +6 -1
- data/sig/orb/models/beta_create_plan_version_params.rbs +12075 -370
- data/sig/orb/models/beta_fetch_plan_version_params.rbs +10 -2
- data/sig/orb/models/beta_set_default_plan_version_params.rbs +10 -2
- data/sig/orb/models/coupon_archive_params.rbs +12 -3
- data/sig/orb/models/coupon_fetch_params.rbs +12 -3
- data/sig/orb/models/coupons/subscription_list_params.rbs +5 -1
- data/sig/orb/models/credit_block_delete_params.rbs +8 -3
- data/sig/orb/models/credit_block_list_invoices_params.rbs +8 -3
- data/sig/orb/models/credit_block_retrieve_params.rbs +8 -3
- data/sig/orb/models/credit_note_fetch_params.rbs +11 -3
- data/sig/orb/models/customer.rbs +14 -2
- data/sig/orb/models/customer_create_params.rbs +12 -1
- data/sig/orb/models/customer_delete_params.rbs +12 -3
- data/sig/orb/models/customer_fetch_by_external_id_params.rbs +11 -3
- data/sig/orb/models/customer_fetch_params.rbs +12 -3
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +11 -3
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +11 -3
- data/sig/orb/models/customer_update_by_external_id_params.rbs +17 -1
- data/sig/orb/models/customer_update_params.rbs +17 -1
- data/sig/orb/models/customers/balance_transaction_create_params.rbs +5 -0
- data/sig/orb/models/customers/balance_transaction_list_params.rbs +5 -0
- data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/cost_list_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_params.rbs +5 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +345 -157
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +345 -157
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credits/ledger_list_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_create_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +5 -1
- data/sig/orb/models/customers/credits/top_up_delete_params.rbs +6 -1
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +5 -1
- data/sig/orb/models/customers/credits/top_up_list_params.rbs +5 -1
- data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +12 -3
- data/sig/orb/models/dimensional_price_group_update_params.rbs +5 -0
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +12 -3
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs +5 -0
- data/sig/orb/models/event_deprecate_params.rbs +9 -3
- data/sig/orb/models/event_update_params.rbs +5 -0
- data/sig/orb/models/events/backfill_close_params.rbs +11 -3
- data/sig/orb/models/events/backfill_fetch_params.rbs +11 -3
- data/sig/orb/models/events/backfill_revert_params.rbs +11 -3
- data/sig/orb/models/invoice_delete_line_item_params.rbs +6 -1
- data/sig/orb/models/invoice_fetch_params.rbs +12 -3
- data/sig/orb/models/invoice_issue_params.rbs +6 -1
- data/sig/orb/models/invoice_issue_summary_params.rbs +6 -1
- data/sig/orb/models/invoice_mark_paid_params.rbs +10 -1
- data/sig/orb/models/invoice_pay_params.rbs +17 -3
- data/sig/orb/models/invoice_update_params.rbs +5 -0
- data/sig/orb/models/invoice_void_params.rbs +12 -3
- data/sig/orb/models/item_archive_params.rbs +9 -3
- data/sig/orb/models/item_fetch_params.rbs +9 -3
- data/sig/orb/models/item_update_params.rbs +5 -0
- data/sig/orb/models/license_deactivate_params.rbs +10 -2
- data/sig/orb/models/license_retrieve_by_external_id_params.rbs +9 -1
- data/sig/orb/models/license_retrieve_params.rbs +11 -3
- data/sig/orb/models/license_type_retrieve_params.rbs +11 -3
- data/sig/orb/models/licenses/external_license_get_usage_params.rbs +5 -0
- data/sig/orb/models/licenses/usage_get_usage_params.rbs +5 -0
- data/sig/orb/models/metric_fetch_params.rbs +12 -3
- data/sig/orb/models/metric_update_params.rbs +5 -1
- data/sig/orb/models/plan_create_params.rbs +5850 -0
- data/sig/orb/models/plan_fetch_params.rbs +9 -3
- data/sig/orb/models/plan_update_params.rbs +9 -1
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +11 -3
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +9 -1
- data/sig/orb/models/plans/migration_cancel_params.rbs +6 -1
- data/sig/orb/models/plans/migration_list_params.rbs +5 -1
- data/sig/orb/models/plans/migration_retrieve_params.rbs +6 -1
- data/sig/orb/models/price.rbs +155 -0
- data/sig/orb/models/price_create_params.rbs +616 -1011
- data/sig/orb/models/price_evaluate_params.rbs +5 -0
- data/sig/orb/models/price_fetch_params.rbs +9 -3
- data/sig/orb/models/price_update_params.rbs +5 -1
- data/sig/orb/models/prices/external_price_id_fetch_params.rbs +11 -3
- data/sig/orb/models/prices/external_price_id_update_params.rbs +5 -1
- data/sig/orb/models/subscription_cancel_params.rbs +5 -0
- data/sig/orb/models/subscription_change_apply_params.rbs +5 -0
- data/sig/orb/models/subscription_change_cancel_params.rbs +12 -3
- data/sig/orb/models/subscription_change_retrieve_params.rbs +12 -3
- data/sig/orb/models/subscription_fetch_costs_params.rbs +5 -0
- data/sig/orb/models/subscription_fetch_params.rbs +11 -3
- data/sig/orb/models/subscription_fetch_schedule_params.rbs +5 -0
- data/sig/orb/models/subscription_fetch_usage_params.rbs +5 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +5 -0
- data/sig/orb/models/subscription_redeem_coupon_params.rbs +5 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +5 -0
- data/sig/orb/models/subscription_trigger_phase_params.rbs +9 -1
- data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +11 -3
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +10 -2
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +11 -3
- data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +5 -0
- data/sig/orb/models/subscription_update_params.rbs +5 -0
- data/sig/orb/models/subscription_update_trial_params.rbs +5 -0
- data/sig/orb/resources/alerts.rbs +2 -0
- data/sig/orb/resources/customers/credits/ledger.rbs +2 -26
- data/sig/orb/resources/invoices.rbs +1 -0
- data/sig/orb/resources/prices.rbs +1 -48
- metadata +2 -2
|
@@ -9,334 +9,601 @@ module Orb
|
|
|
9
9
|
extend Orb::Internal::Type::RequestParameters::Converter
|
|
10
10
|
include Orb::Internal::Type::RequestParameters
|
|
11
11
|
|
|
12
|
-
# @!attribute
|
|
13
|
-
# The number of credits to effect. Note that this is required for increment,
|
|
14
|
-
# decrement or void operations.
|
|
15
|
-
#
|
|
16
|
-
# @return [Float]
|
|
17
|
-
required :amount, Float
|
|
18
|
-
|
|
19
|
-
# @!attribute entry_type
|
|
20
|
-
#
|
|
21
|
-
# @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType]
|
|
22
|
-
required :entry_type, enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::EntryType }
|
|
23
|
-
|
|
24
|
-
# @!attribute currency
|
|
25
|
-
# The currency or custom pricing unit to use for this ledger entry. If this is a
|
|
26
|
-
# real-world currency, it must match the customer's invoicing currency.
|
|
27
|
-
#
|
|
28
|
-
# @return [String, nil]
|
|
29
|
-
optional :currency, String, nil?: true
|
|
30
|
-
|
|
31
|
-
# @!attribute description
|
|
32
|
-
# Optional metadata that can be specified when adding ledger results via the API.
|
|
33
|
-
# For example, this can be used to note an increment refers to trial credits, or
|
|
34
|
-
# for noting corrections as a result of an incident, etc.
|
|
35
|
-
#
|
|
36
|
-
# @return [String, nil]
|
|
37
|
-
optional :description, String, nil?: true
|
|
38
|
-
|
|
39
|
-
# @!attribute effective_date
|
|
40
|
-
# An ISO 8601 format date that denotes when this credit balance should become
|
|
41
|
-
# available for use.
|
|
42
|
-
#
|
|
43
|
-
# @return [Time, nil]
|
|
44
|
-
optional :effective_date, Time, nil?: true
|
|
45
|
-
|
|
46
|
-
# @!attribute expiry_date
|
|
47
|
-
# An ISO 8601 format date that identifies the origination credit block to expire
|
|
48
|
-
#
|
|
49
|
-
# @return [Time, nil]
|
|
50
|
-
optional :expiry_date, Time, nil?: true
|
|
51
|
-
|
|
52
|
-
# @!attribute filters
|
|
53
|
-
# Optional filter to specify which items this credit block applies to. If not
|
|
54
|
-
# specified, the block will apply to all items for the pricing unit.
|
|
55
|
-
#
|
|
56
|
-
# @return [Array<Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter>, nil]
|
|
57
|
-
optional :filters,
|
|
58
|
-
-> {
|
|
59
|
-
Orb::Internal::Type::ArrayOf[Orb::Customers::Credits::LedgerCreateEntryParams::Filter]
|
|
60
|
-
},
|
|
61
|
-
nil?: true
|
|
62
|
-
|
|
63
|
-
# @!attribute invoice_settings
|
|
64
|
-
# Passing `invoice_settings` automatically generates an invoice for the newly
|
|
65
|
-
# added credits. If `invoice_settings` is passed, you must specify
|
|
66
|
-
# per_unit_cost_basis, as the calculation of the invoice total is done on that
|
|
67
|
-
# basis.
|
|
68
|
-
#
|
|
69
|
-
# @return [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil]
|
|
70
|
-
optional :invoice_settings,
|
|
71
|
-
-> { Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings },
|
|
72
|
-
nil?: true
|
|
73
|
-
|
|
74
|
-
# @!attribute metadata
|
|
75
|
-
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
76
|
-
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
77
|
-
# by setting `metadata` to `null`.
|
|
78
|
-
#
|
|
79
|
-
# @return [Hash{Symbol=>String, nil}, nil]
|
|
80
|
-
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
|
81
|
-
|
|
82
|
-
# @!attribute per_unit_cost_basis
|
|
83
|
-
# Can only be specified when entry_type=increment. How much, in the customer's
|
|
84
|
-
# currency, a customer paid for a single credit in this block
|
|
85
|
-
#
|
|
86
|
-
# @return [String, nil]
|
|
87
|
-
optional :per_unit_cost_basis, String, nil?: true
|
|
88
|
-
|
|
89
|
-
# @!attribute target_expiry_date
|
|
90
|
-
# A future date (specified in YYYY-MM-DD format) used for expiration change,
|
|
91
|
-
# denoting when credits transferred (as part of a partial block expiration) should
|
|
92
|
-
# expire.
|
|
93
|
-
#
|
|
94
|
-
# @return [Date]
|
|
95
|
-
required :target_expiry_date, Date
|
|
96
|
-
|
|
97
|
-
# @!attribute block_id
|
|
98
|
-
# The ID of the block to reverse a decrement from.
|
|
12
|
+
# @!attribute customer_id
|
|
99
13
|
#
|
|
100
14
|
# @return [String]
|
|
101
|
-
required :
|
|
15
|
+
required :customer_id, String
|
|
102
16
|
|
|
103
|
-
# @!attribute
|
|
104
|
-
# Can only be specified when `entry_type=void`. The reason for the void.
|
|
105
|
-
#
|
|
106
|
-
# @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::VoidReason, nil]
|
|
107
|
-
optional :void_reason,
|
|
108
|
-
enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason },
|
|
109
|
-
nil?: true
|
|
110
|
-
|
|
111
|
-
# @!method initialize(amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, filters: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
|
|
112
|
-
# Some parameter documentations has been truncated, see
|
|
113
|
-
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams} for more details.
|
|
114
|
-
#
|
|
115
|
-
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
|
|
116
|
-
#
|
|
117
|
-
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType]
|
|
118
|
-
#
|
|
119
|
-
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
|
|
17
|
+
# @!attribute body
|
|
120
18
|
#
|
|
121
|
-
# @
|
|
122
|
-
|
|
123
|
-
# @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
|
|
124
|
-
#
|
|
125
|
-
# @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
|
|
126
|
-
#
|
|
127
|
-
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
|
|
128
|
-
#
|
|
129
|
-
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
|
|
130
|
-
#
|
|
131
|
-
# @param filters [Array<Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter>, nil] Optional filter to specify which items this credit block applies to. If not spec
|
|
132
|
-
#
|
|
133
|
-
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
|
|
134
|
-
#
|
|
135
|
-
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
136
|
-
#
|
|
137
|
-
# @param per_unit_cost_basis [String, nil] Can only be specified when entry_type=increment. How much, in the customer's cur
|
|
138
|
-
#
|
|
139
|
-
# @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void.
|
|
140
|
-
#
|
|
141
|
-
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
142
|
-
|
|
143
|
-
module EntryType
|
|
144
|
-
extend Orb::Internal::Type::Enum
|
|
19
|
+
# @return [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment]
|
|
20
|
+
required :body, union: -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body }
|
|
145
21
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
end
|
|
22
|
+
# @!method initialize(customer_id:, body:, request_options: {})
|
|
23
|
+
# @param customer_id [String]
|
|
24
|
+
# @param body [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment]
|
|
25
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
151
26
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
# @!
|
|
189
|
-
#
|
|
27
|
+
module Body
|
|
28
|
+
extend Orb::Internal::Type::Union
|
|
29
|
+
|
|
30
|
+
discriminator :entry_type
|
|
31
|
+
|
|
32
|
+
variant :increment, -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment }
|
|
33
|
+
|
|
34
|
+
variant :decrement, -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Decrement }
|
|
35
|
+
|
|
36
|
+
variant :expiration_change,
|
|
37
|
+
-> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange }
|
|
38
|
+
|
|
39
|
+
variant :void, -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void }
|
|
40
|
+
|
|
41
|
+
variant :amendment, -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Amendment }
|
|
42
|
+
|
|
43
|
+
class Increment < Orb::Internal::Type::BaseModel
|
|
44
|
+
# @!attribute amount
|
|
45
|
+
# The number of credits to effect. Note that this is required for increment,
|
|
46
|
+
# decrement, void, or undo operations.
|
|
47
|
+
#
|
|
48
|
+
# @return [Float]
|
|
49
|
+
required :amount, Float
|
|
50
|
+
|
|
51
|
+
# @!attribute entry_type
|
|
52
|
+
#
|
|
53
|
+
# @return [Symbol, :increment]
|
|
54
|
+
required :entry_type, const: :increment
|
|
55
|
+
|
|
56
|
+
# @!attribute currency
|
|
57
|
+
# The currency or custom pricing unit to use for this ledger entry. If this is a
|
|
58
|
+
# real-world currency, it must match the customer's invoicing currency.
|
|
59
|
+
#
|
|
60
|
+
# @return [String, nil]
|
|
61
|
+
optional :currency, String, nil?: true
|
|
62
|
+
|
|
63
|
+
# @!attribute description
|
|
64
|
+
# Optional metadata that can be specified when adding ledger results via the API.
|
|
65
|
+
# For example, this can be used to note an increment refers to trial credits, or
|
|
66
|
+
# for noting corrections as a result of an incident, etc.
|
|
67
|
+
#
|
|
68
|
+
# @return [String, nil]
|
|
69
|
+
optional :description, String, nil?: true
|
|
70
|
+
|
|
71
|
+
# @!attribute effective_date
|
|
72
|
+
# An ISO 8601 format date that denotes when this credit balance should become
|
|
73
|
+
# available for use.
|
|
74
|
+
#
|
|
75
|
+
# @return [Time, nil]
|
|
76
|
+
optional :effective_date, Time, nil?: true
|
|
77
|
+
|
|
78
|
+
# @!attribute expiry_date
|
|
79
|
+
# An ISO 8601 format date that denotes when this credit balance should expire.
|
|
80
|
+
#
|
|
81
|
+
# @return [Time, nil]
|
|
82
|
+
optional :expiry_date, Time, nil?: true
|
|
83
|
+
|
|
84
|
+
# @!attribute filters
|
|
85
|
+
# Optional filter to specify which items this credit block applies to. If not
|
|
86
|
+
# specified, the block will apply to all items for the pricing unit.
|
|
87
|
+
#
|
|
88
|
+
# @return [Array<Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter>, nil]
|
|
89
|
+
optional :filters,
|
|
90
|
+
-> {
|
|
91
|
+
Orb::Internal::Type::ArrayOf[Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter]
|
|
92
|
+
},
|
|
93
|
+
nil?: true
|
|
94
|
+
|
|
95
|
+
# @!attribute invoice_settings
|
|
96
|
+
# Passing `invoice_settings` automatically generates an invoice for the newly
|
|
97
|
+
# added credits. If `invoice_settings` is passed, you must specify
|
|
98
|
+
# per_unit_cost_basis, as the calculation of the invoice total is done on that
|
|
99
|
+
# basis.
|
|
100
|
+
#
|
|
101
|
+
# @return [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings, nil]
|
|
102
|
+
optional :invoice_settings,
|
|
103
|
+
-> {
|
|
104
|
+
Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings
|
|
105
|
+
},
|
|
106
|
+
nil?: true
|
|
107
|
+
|
|
108
|
+
# @!attribute metadata
|
|
109
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
110
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
111
|
+
# by setting `metadata` to `null`.
|
|
112
|
+
#
|
|
113
|
+
# @return [Hash{Symbol=>String, nil}, nil]
|
|
114
|
+
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
|
115
|
+
|
|
116
|
+
# @!attribute per_unit_cost_basis
|
|
117
|
+
# Can only be specified when entry_type=increment. How much, in the customer's
|
|
118
|
+
# currency, a customer paid for a single credit in this block
|
|
119
|
+
#
|
|
120
|
+
# @return [String, nil]
|
|
121
|
+
optional :per_unit_cost_basis, String, nil?: true
|
|
122
|
+
|
|
123
|
+
# @!method initialize(amount:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, filters: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, entry_type: :increment)
|
|
124
|
+
# Some parameter documentations has been truncated, see
|
|
125
|
+
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment} for
|
|
126
|
+
# more details.
|
|
127
|
+
#
|
|
128
|
+
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
|
|
129
|
+
#
|
|
130
|
+
# @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
|
|
131
|
+
#
|
|
132
|
+
# @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
|
|
133
|
+
#
|
|
134
|
+
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
|
|
135
|
+
#
|
|
136
|
+
# @param expiry_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should expire.
|
|
137
|
+
#
|
|
138
|
+
# @param filters [Array<Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter>, nil] Optional filter to specify which items this credit block applies to. If not spec
|
|
139
|
+
#
|
|
140
|
+
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
|
|
141
|
+
#
|
|
142
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
143
|
+
#
|
|
144
|
+
# @param per_unit_cost_basis [String, nil] Can only be specified when entry_type=increment. How much, in the customer's cur
|
|
145
|
+
#
|
|
146
|
+
# @param entry_type [Symbol, :increment]
|
|
147
|
+
|
|
148
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
149
|
+
# @!attribute field
|
|
150
|
+
# The property of the price the block applies to. Only item_id is supported.
|
|
151
|
+
#
|
|
152
|
+
# @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field]
|
|
153
|
+
required :field,
|
|
154
|
+
enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field }
|
|
155
|
+
|
|
156
|
+
# @!attribute operator
|
|
157
|
+
# Should prices that match the filter be included or excluded.
|
|
158
|
+
#
|
|
159
|
+
# @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator]
|
|
160
|
+
required :operator,
|
|
161
|
+
enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator }
|
|
162
|
+
|
|
163
|
+
# @!attribute values
|
|
164
|
+
# The IDs or values that match this filter.
|
|
165
|
+
#
|
|
166
|
+
# @return [Array<String>]
|
|
167
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
168
|
+
|
|
169
|
+
# @!method initialize(field:, operator:, values:)
|
|
170
|
+
# A PriceFilter that only allows item_id field for block filters.
|
|
171
|
+
#
|
|
172
|
+
# @param field [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field] The property of the price the block applies to. Only item_id is supported.
|
|
173
|
+
#
|
|
174
|
+
# @param operator [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator] Should prices that match the filter be included or excluded.
|
|
175
|
+
#
|
|
176
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
177
|
+
|
|
178
|
+
# The property of the price the block applies to. Only item_id is supported.
|
|
179
|
+
#
|
|
180
|
+
# @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter#field
|
|
181
|
+
module Field
|
|
182
|
+
extend Orb::Internal::Type::Enum
|
|
183
|
+
|
|
184
|
+
ITEM_ID = :item_id
|
|
185
|
+
|
|
186
|
+
# @!method self.values
|
|
187
|
+
# @return [Array<Symbol>]
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Should prices that match the filter be included or excluded.
|
|
191
|
+
#
|
|
192
|
+
# @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter#operator
|
|
193
|
+
module Operator
|
|
194
|
+
extend Orb::Internal::Type::Enum
|
|
195
|
+
|
|
196
|
+
INCLUDES = :includes
|
|
197
|
+
EXCLUDES = :excludes
|
|
198
|
+
|
|
199
|
+
# @!method self.values
|
|
200
|
+
# @return [Array<Symbol>]
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment#invoice_settings
|
|
205
|
+
class InvoiceSettings < Orb::Internal::Type::BaseModel
|
|
206
|
+
# @!attribute auto_collection
|
|
207
|
+
# Whether the credits purchase invoice should auto collect with the customer's
|
|
208
|
+
# saved payment method.
|
|
209
|
+
#
|
|
210
|
+
# @return [Boolean]
|
|
211
|
+
required :auto_collection, Orb::Internal::Type::Boolean
|
|
212
|
+
|
|
213
|
+
# @!attribute custom_due_date
|
|
214
|
+
# An optional custom due date for the invoice. If not set, the due date will be
|
|
215
|
+
# calculated based on the `net_terms` value.
|
|
216
|
+
#
|
|
217
|
+
# @return [Date, Time, nil]
|
|
218
|
+
optional :custom_due_date,
|
|
219
|
+
union: -> {
|
|
220
|
+
Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::CustomDueDate
|
|
221
|
+
},
|
|
222
|
+
nil?: true
|
|
223
|
+
|
|
224
|
+
# @!attribute invoice_date
|
|
225
|
+
# An ISO 8601 format date that denotes when this invoice should be dated in the
|
|
226
|
+
# customer's timezone. If not provided, the invoice date will default to the
|
|
227
|
+
# credit block's effective date.
|
|
228
|
+
#
|
|
229
|
+
# @return [Date, Time, nil]
|
|
230
|
+
optional :invoice_date,
|
|
231
|
+
union: -> {
|
|
232
|
+
Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::InvoiceDate
|
|
233
|
+
},
|
|
234
|
+
nil?: true
|
|
235
|
+
|
|
236
|
+
# @!attribute item_id
|
|
237
|
+
# The ID of the Item to be used for the invoice line item. If not provided, a
|
|
238
|
+
# default 'Credits' item will be used.
|
|
239
|
+
#
|
|
240
|
+
# @return [String, nil]
|
|
241
|
+
optional :item_id, String, nil?: true
|
|
242
|
+
|
|
243
|
+
# @!attribute mark_as_paid
|
|
244
|
+
# If true, the new credits purchase invoice will be marked as paid.
|
|
245
|
+
#
|
|
246
|
+
# @return [Boolean, nil]
|
|
247
|
+
optional :mark_as_paid, Orb::Internal::Type::Boolean
|
|
248
|
+
|
|
249
|
+
# @!attribute memo
|
|
250
|
+
# An optional memo to display on the invoice.
|
|
251
|
+
#
|
|
252
|
+
# @return [String, nil]
|
|
253
|
+
optional :memo, String, nil?: true
|
|
254
|
+
|
|
255
|
+
# @!attribute net_terms
|
|
256
|
+
# The net terms determines the due date of the invoice. Due date is calculated
|
|
257
|
+
# based on the invoice or issuance date, depending on the account's configured due
|
|
258
|
+
# date calculation method. A value of '0' here represents that the invoice is due
|
|
259
|
+
# on issue, whereas a value of '30' represents that the customer has 30 days to
|
|
260
|
+
# pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
|
|
261
|
+
# both.
|
|
262
|
+
#
|
|
263
|
+
# @return [Integer, nil]
|
|
264
|
+
optional :net_terms, Integer, nil?: true
|
|
265
|
+
|
|
266
|
+
# @!attribute require_successful_payment
|
|
267
|
+
# If true, the new credit block will require that the corresponding invoice is
|
|
268
|
+
# paid before it can be drawn down from.
|
|
269
|
+
#
|
|
270
|
+
# @return [Boolean, nil]
|
|
271
|
+
optional :require_successful_payment, Orb::Internal::Type::Boolean
|
|
272
|
+
|
|
273
|
+
# @!method initialize(auto_collection:, custom_due_date: nil, invoice_date: nil, item_id: nil, mark_as_paid: nil, memo: nil, net_terms: nil, require_successful_payment: nil)
|
|
274
|
+
# Some parameter documentations has been truncated, see
|
|
275
|
+
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings}
|
|
276
|
+
# for more details.
|
|
277
|
+
#
|
|
278
|
+
# Passing `invoice_settings` automatically generates an invoice for the newly
|
|
279
|
+
# added credits. If `invoice_settings` is passed, you must specify
|
|
280
|
+
# per_unit_cost_basis, as the calculation of the invoice total is done on that
|
|
281
|
+
# basis.
|
|
282
|
+
#
|
|
283
|
+
# @param auto_collection [Boolean] Whether the credits purchase invoice should auto collect with the customer's sav
|
|
284
|
+
#
|
|
285
|
+
# @param custom_due_date [Date, Time, nil] An optional custom due date for the invoice. If not set, the due date will be ca
|
|
286
|
+
#
|
|
287
|
+
# @param invoice_date [Date, Time, nil] An ISO 8601 format date that denotes when this invoice should be dated in the cu
|
|
288
|
+
#
|
|
289
|
+
# @param item_id [String, nil] The ID of the Item to be used for the invoice line item. If not provided, a defa
|
|
290
|
+
#
|
|
291
|
+
# @param mark_as_paid [Boolean] If true, the new credits purchase invoice will be marked as paid.
|
|
292
|
+
#
|
|
293
|
+
# @param memo [String, nil] An optional memo to display on the invoice.
|
|
294
|
+
#
|
|
295
|
+
# @param net_terms [Integer, nil] The net terms determines the due date of the invoice. Due date is calculated bas
|
|
296
|
+
#
|
|
297
|
+
# @param require_successful_payment [Boolean] If true, the new credit block will require that the corresponding invoice is pai
|
|
298
|
+
|
|
299
|
+
# An optional custom due date for the invoice. If not set, the due date will be
|
|
300
|
+
# calculated based on the `net_terms` value.
|
|
301
|
+
#
|
|
302
|
+
# @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings#custom_due_date
|
|
303
|
+
module CustomDueDate
|
|
304
|
+
extend Orb::Internal::Type::Union
|
|
305
|
+
|
|
306
|
+
variant Date
|
|
307
|
+
|
|
308
|
+
variant Time
|
|
309
|
+
|
|
310
|
+
# @!method self.variants
|
|
311
|
+
# @return [Array(Date, Time)]
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# An ISO 8601 format date that denotes when this invoice should be dated in the
|
|
315
|
+
# customer's timezone. If not provided, the invoice date will default to the
|
|
316
|
+
# credit block's effective date.
|
|
317
|
+
#
|
|
318
|
+
# @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings#invoice_date
|
|
319
|
+
module InvoiceDate
|
|
320
|
+
extend Orb::Internal::Type::Union
|
|
321
|
+
|
|
322
|
+
variant Date
|
|
323
|
+
|
|
324
|
+
variant Time
|
|
325
|
+
|
|
326
|
+
# @!method self.variants
|
|
327
|
+
# @return [Array(Date, Time)]
|
|
328
|
+
end
|
|
329
|
+
end
|
|
190
330
|
end
|
|
191
331
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
#
|
|
202
|
-
# @return [
|
|
332
|
+
class Decrement < Orb::Internal::Type::BaseModel
|
|
333
|
+
# @!attribute amount
|
|
334
|
+
# The number of credits to effect. Note that this is required for increment,
|
|
335
|
+
# decrement, void, or undo operations.
|
|
336
|
+
#
|
|
337
|
+
# @return [Float]
|
|
338
|
+
required :amount, Float
|
|
339
|
+
|
|
340
|
+
# @!attribute entry_type
|
|
341
|
+
#
|
|
342
|
+
# @return [Symbol, :decrement]
|
|
343
|
+
required :entry_type, const: :decrement
|
|
344
|
+
|
|
345
|
+
# @!attribute currency
|
|
346
|
+
# The currency or custom pricing unit to use for this ledger entry. If this is a
|
|
347
|
+
# real-world currency, it must match the customer's invoicing currency.
|
|
348
|
+
#
|
|
349
|
+
# @return [String, nil]
|
|
350
|
+
optional :currency, String, nil?: true
|
|
351
|
+
|
|
352
|
+
# @!attribute description
|
|
353
|
+
# Optional metadata that can be specified when adding ledger results via the API.
|
|
354
|
+
# For example, this can be used to note an increment refers to trial credits, or
|
|
355
|
+
# for noting corrections as a result of an incident, etc.
|
|
356
|
+
#
|
|
357
|
+
# @return [String, nil]
|
|
358
|
+
optional :description, String, nil?: true
|
|
359
|
+
|
|
360
|
+
# @!attribute metadata
|
|
361
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
362
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
363
|
+
# by setting `metadata` to `null`.
|
|
364
|
+
#
|
|
365
|
+
# @return [Hash{Symbol=>String, nil}, nil]
|
|
366
|
+
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
|
367
|
+
|
|
368
|
+
# @!method initialize(amount:, currency: nil, description: nil, metadata: nil, entry_type: :decrement)
|
|
369
|
+
# Some parameter documentations has been truncated, see
|
|
370
|
+
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement} for
|
|
371
|
+
# more details.
|
|
372
|
+
#
|
|
373
|
+
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
|
|
374
|
+
#
|
|
375
|
+
# @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
|
|
376
|
+
#
|
|
377
|
+
# @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
|
|
378
|
+
#
|
|
379
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
380
|
+
#
|
|
381
|
+
# @param entry_type [Symbol, :decrement]
|
|
203
382
|
end
|
|
204
|
-
end
|
|
205
383
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
#
|
|
284
|
-
# @param auto_collection [Boolean] Whether the credits purchase invoice should auto collect with the customer's sav
|
|
285
|
-
#
|
|
286
|
-
# @param custom_due_date [Date, Time, nil] An optional custom due date for the invoice. If not set, the due date will be ca
|
|
287
|
-
#
|
|
288
|
-
# @param invoice_date [Date, Time, nil] An ISO 8601 format date that denotes when this invoice should be dated in the cu
|
|
289
|
-
#
|
|
290
|
-
# @param item_id [String, nil] The ID of the Item to be used for the invoice line item. If not provided, a defa
|
|
291
|
-
#
|
|
292
|
-
# @param mark_as_paid [Boolean] If true, the new credits purchase invoice will be marked as paid.
|
|
293
|
-
#
|
|
294
|
-
# @param memo [String, nil] An optional memo to display on the invoice.
|
|
295
|
-
#
|
|
296
|
-
# @param net_terms [Integer, nil] The net terms determines the due date of the invoice. Due date is calculated bas
|
|
297
|
-
#
|
|
298
|
-
# @param require_successful_payment [Boolean] If true, the new credit block will require that the corresponding invoice is pai
|
|
299
|
-
|
|
300
|
-
# An optional custom due date for the invoice. If not set, the due date will be
|
|
301
|
-
# calculated based on the `net_terms` value.
|
|
302
|
-
#
|
|
303
|
-
# @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings#custom_due_date
|
|
304
|
-
module CustomDueDate
|
|
305
|
-
extend Orb::Internal::Type::Union
|
|
306
|
-
|
|
307
|
-
variant Date
|
|
308
|
-
|
|
309
|
-
variant Time
|
|
310
|
-
|
|
311
|
-
# @!method self.variants
|
|
312
|
-
# @return [Array(Date, Time)]
|
|
384
|
+
class ExpirationChange < Orb::Internal::Type::BaseModel
|
|
385
|
+
# @!attribute entry_type
|
|
386
|
+
#
|
|
387
|
+
# @return [Symbol, :expiration_change]
|
|
388
|
+
required :entry_type, const: :expiration_change
|
|
389
|
+
|
|
390
|
+
# @!attribute target_expiry_date
|
|
391
|
+
# A future date (specified in YYYY-MM-DD format) used for expiration change,
|
|
392
|
+
# denoting when credits transferred (as part of a partial block expiration) should
|
|
393
|
+
# expire.
|
|
394
|
+
#
|
|
395
|
+
# @return [Date]
|
|
396
|
+
required :target_expiry_date, Date
|
|
397
|
+
|
|
398
|
+
# @!attribute amount
|
|
399
|
+
# The number of credits to effect. Note that this is required for increment,
|
|
400
|
+
# decrement, void, or undo operations.
|
|
401
|
+
#
|
|
402
|
+
# @return [Float, nil]
|
|
403
|
+
optional :amount, Float, nil?: true
|
|
404
|
+
|
|
405
|
+
# @!attribute block_id
|
|
406
|
+
# The ID of the block affected by an expiration_change, used to differentiate
|
|
407
|
+
# between multiple blocks with the same `expiry_date`.
|
|
408
|
+
#
|
|
409
|
+
# @return [String, nil]
|
|
410
|
+
optional :block_id, String, nil?: true
|
|
411
|
+
|
|
412
|
+
# @!attribute currency
|
|
413
|
+
# The currency or custom pricing unit to use for this ledger entry. If this is a
|
|
414
|
+
# real-world currency, it must match the customer's invoicing currency.
|
|
415
|
+
#
|
|
416
|
+
# @return [String, nil]
|
|
417
|
+
optional :currency, String, nil?: true
|
|
418
|
+
|
|
419
|
+
# @!attribute description
|
|
420
|
+
# Optional metadata that can be specified when adding ledger results via the API.
|
|
421
|
+
# For example, this can be used to note an increment refers to trial credits, or
|
|
422
|
+
# for noting corrections as a result of an incident, etc.
|
|
423
|
+
#
|
|
424
|
+
# @return [String, nil]
|
|
425
|
+
optional :description, String, nil?: true
|
|
426
|
+
|
|
427
|
+
# @!attribute expiry_date
|
|
428
|
+
# An ISO 8601 format date that identifies the origination credit block to expire
|
|
429
|
+
#
|
|
430
|
+
# @return [Time, nil]
|
|
431
|
+
optional :expiry_date, Time, nil?: true
|
|
432
|
+
|
|
433
|
+
# @!attribute metadata
|
|
434
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
435
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
436
|
+
# by setting `metadata` to `null`.
|
|
437
|
+
#
|
|
438
|
+
# @return [Hash{Symbol=>String, nil}, nil]
|
|
439
|
+
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
|
440
|
+
|
|
441
|
+
# @!method initialize(target_expiry_date:, amount: nil, block_id: nil, currency: nil, description: nil, expiry_date: nil, metadata: nil, entry_type: :expiration_change)
|
|
442
|
+
# Some parameter documentations has been truncated, see
|
|
443
|
+
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange}
|
|
444
|
+
# for more details.
|
|
445
|
+
#
|
|
446
|
+
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
|
|
447
|
+
#
|
|
448
|
+
# @param amount [Float, nil] The number of credits to effect. Note that this is required for increment, decre
|
|
449
|
+
#
|
|
450
|
+
# @param block_id [String, nil] The ID of the block affected by an expiration_change, used to differentiate betw
|
|
451
|
+
#
|
|
452
|
+
# @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
|
|
453
|
+
#
|
|
454
|
+
# @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
|
|
455
|
+
#
|
|
456
|
+
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
|
|
457
|
+
#
|
|
458
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
459
|
+
#
|
|
460
|
+
# @param entry_type [Symbol, :expiration_change]
|
|
313
461
|
end
|
|
314
462
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
463
|
+
class Void < Orb::Internal::Type::BaseModel
|
|
464
|
+
# @!attribute amount
|
|
465
|
+
# The number of credits to effect. Note that this is required for increment,
|
|
466
|
+
# decrement, void, or undo operations.
|
|
467
|
+
#
|
|
468
|
+
# @return [Float]
|
|
469
|
+
required :amount, Float
|
|
470
|
+
|
|
471
|
+
# @!attribute block_id
|
|
472
|
+
# The ID of the block to void.
|
|
473
|
+
#
|
|
474
|
+
# @return [String]
|
|
475
|
+
required :block_id, String
|
|
476
|
+
|
|
477
|
+
# @!attribute entry_type
|
|
478
|
+
#
|
|
479
|
+
# @return [Symbol, :void]
|
|
480
|
+
required :entry_type, const: :void
|
|
481
|
+
|
|
482
|
+
# @!attribute currency
|
|
483
|
+
# The currency or custom pricing unit to use for this ledger entry. If this is a
|
|
484
|
+
# real-world currency, it must match the customer's invoicing currency.
|
|
485
|
+
#
|
|
486
|
+
# @return [String, nil]
|
|
487
|
+
optional :currency, String, nil?: true
|
|
488
|
+
|
|
489
|
+
# @!attribute description
|
|
490
|
+
# Optional metadata that can be specified when adding ledger results via the API.
|
|
491
|
+
# For example, this can be used to note an increment refers to trial credits, or
|
|
492
|
+
# for noting corrections as a result of an incident, etc.
|
|
493
|
+
#
|
|
494
|
+
# @return [String, nil]
|
|
495
|
+
optional :description, String, nil?: true
|
|
496
|
+
|
|
497
|
+
# @!attribute metadata
|
|
498
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
499
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
500
|
+
# by setting `metadata` to `null`.
|
|
501
|
+
#
|
|
502
|
+
# @return [Hash{Symbol=>String, nil}, nil]
|
|
503
|
+
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
|
504
|
+
|
|
505
|
+
# @!attribute void_reason
|
|
506
|
+
# Can only be specified when `entry_type=void`. The reason for the void.
|
|
507
|
+
#
|
|
508
|
+
# @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason, nil]
|
|
509
|
+
optional :void_reason,
|
|
510
|
+
enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason },
|
|
511
|
+
nil?: true
|
|
512
|
+
|
|
513
|
+
# @!method initialize(amount:, block_id:, currency: nil, description: nil, metadata: nil, void_reason: nil, entry_type: :void)
|
|
514
|
+
# Some parameter documentations has been truncated, see
|
|
515
|
+
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void} for more
|
|
516
|
+
# details.
|
|
517
|
+
#
|
|
518
|
+
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
|
|
519
|
+
#
|
|
520
|
+
# @param block_id [String] The ID of the block to void.
|
|
521
|
+
#
|
|
522
|
+
# @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
|
|
523
|
+
#
|
|
524
|
+
# @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
|
|
525
|
+
#
|
|
526
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
527
|
+
#
|
|
528
|
+
# @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void.
|
|
529
|
+
#
|
|
530
|
+
# @param entry_type [Symbol, :void]
|
|
531
|
+
|
|
532
|
+
# Can only be specified when `entry_type=void`. The reason for the void.
|
|
533
|
+
#
|
|
534
|
+
# @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void#void_reason
|
|
535
|
+
module VoidReason
|
|
536
|
+
extend Orb::Internal::Type::Enum
|
|
537
|
+
|
|
538
|
+
REFUND = :refund
|
|
539
|
+
|
|
540
|
+
# @!method self.values
|
|
541
|
+
# @return [Array<Symbol>]
|
|
542
|
+
end
|
|
329
543
|
end
|
|
330
|
-
end
|
|
331
|
-
|
|
332
|
-
# Can only be specified when `entry_type=void`. The reason for the void.
|
|
333
|
-
module VoidReason
|
|
334
|
-
extend Orb::Internal::Type::Enum
|
|
335
544
|
|
|
336
|
-
|
|
545
|
+
class Amendment < Orb::Internal::Type::BaseModel
|
|
546
|
+
# @!attribute amount
|
|
547
|
+
# The number of credits to effect. Note that this is required for increment,
|
|
548
|
+
# decrement or void operations.
|
|
549
|
+
#
|
|
550
|
+
# @return [Float]
|
|
551
|
+
required :amount, Float
|
|
552
|
+
|
|
553
|
+
# @!attribute block_id
|
|
554
|
+
# The ID of the block to reverse a decrement from.
|
|
555
|
+
#
|
|
556
|
+
# @return [String]
|
|
557
|
+
required :block_id, String
|
|
558
|
+
|
|
559
|
+
# @!attribute entry_type
|
|
560
|
+
#
|
|
561
|
+
# @return [Symbol, :amendment]
|
|
562
|
+
required :entry_type, const: :amendment
|
|
563
|
+
|
|
564
|
+
# @!attribute currency
|
|
565
|
+
# The currency or custom pricing unit to use for this ledger entry. If this is a
|
|
566
|
+
# real-world currency, it must match the customer's invoicing currency.
|
|
567
|
+
#
|
|
568
|
+
# @return [String, nil]
|
|
569
|
+
optional :currency, String, nil?: true
|
|
570
|
+
|
|
571
|
+
# @!attribute description
|
|
572
|
+
# Optional metadata that can be specified when adding ledger results via the API.
|
|
573
|
+
# For example, this can be used to note an increment refers to trial credits, or
|
|
574
|
+
# for noting corrections as a result of an incident, etc.
|
|
575
|
+
#
|
|
576
|
+
# @return [String, nil]
|
|
577
|
+
optional :description, String, nil?: true
|
|
578
|
+
|
|
579
|
+
# @!attribute metadata
|
|
580
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
581
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
582
|
+
# by setting `metadata` to `null`.
|
|
583
|
+
#
|
|
584
|
+
# @return [Hash{Symbol=>String, nil}, nil]
|
|
585
|
+
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
|
586
|
+
|
|
587
|
+
# @!method initialize(amount:, block_id:, currency: nil, description: nil, metadata: nil, entry_type: :amendment)
|
|
588
|
+
# Some parameter documentations has been truncated, see
|
|
589
|
+
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment} for
|
|
590
|
+
# more details.
|
|
591
|
+
#
|
|
592
|
+
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
|
|
593
|
+
#
|
|
594
|
+
# @param block_id [String] The ID of the block to reverse a decrement from.
|
|
595
|
+
#
|
|
596
|
+
# @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
|
|
597
|
+
#
|
|
598
|
+
# @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
|
|
599
|
+
#
|
|
600
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
601
|
+
#
|
|
602
|
+
# @param entry_type [Symbol, :amendment]
|
|
603
|
+
end
|
|
337
604
|
|
|
338
|
-
# @!method self.
|
|
339
|
-
# @return [Array
|
|
605
|
+
# @!method self.variants
|
|
606
|
+
# @return [Array(Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment)]
|
|
340
607
|
end
|
|
341
608
|
end
|
|
342
609
|
end
|