orb-billing 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/README.md +59 -49
- data/lib/orb/client.rb +4 -4
- data/lib/orb/file_part.rb +55 -0
- data/lib/orb/internal/page.rb +4 -8
- data/lib/orb/internal/transport/base_client.rb +7 -7
- data/lib/orb/internal/transport/pooled_net_requester.rb +2 -2
- data/lib/orb/internal/type/array_of.rb +11 -0
- data/lib/orb/internal/type/base_model.rb +32 -14
- data/lib/orb/internal/type/base_page.rb +9 -1
- data/lib/orb/internal/type/boolean.rb +4 -0
- data/lib/orb/internal/type/converter.rb +4 -1
- data/lib/orb/internal/type/enum.rb +9 -5
- data/lib/orb/internal/type/{io_like.rb → file_input.rb} +33 -15
- data/lib/orb/internal/type/hash_of.rb +11 -0
- data/lib/orb/internal/type/request_parameters.rb +1 -2
- data/lib/orb/internal/type/union.rb +10 -1
- data/lib/orb/internal/type/unknown.rb +4 -0
- data/lib/orb/internal/util.rb +69 -61
- data/lib/orb/internal.rb +0 -1
- data/lib/orb/models/alert.rb +68 -71
- data/lib/orb/models/alert_create_for_customer_params.rb +20 -25
- data/lib/orb/models/alert_create_for_external_customer_params.rb +20 -25
- data/lib/orb/models/alert_create_for_subscription_params.rb +20 -25
- data/lib/orb/models/alert_disable_params.rb +5 -9
- data/lib/orb/models/alert_enable_params.rb +5 -9
- data/lib/orb/models/alert_list_params.rb +26 -36
- data/lib/orb/models/alert_retrieve_params.rb +3 -8
- data/lib/orb/models/alert_update_params.rb +14 -18
- data/lib/orb/models/amount_discount.rb +14 -14
- data/lib/orb/models/billable_metric.rb +23 -20
- data/lib/orb/models/billing_cycle_relative_date.rb +2 -5
- data/lib/orb/models/coupon.rb +28 -21
- data/lib/orb/models/coupon_archive_params.rb +3 -8
- data/lib/orb/models/coupon_create_params.rb +24 -29
- data/lib/orb/models/coupon_fetch_params.rb +3 -8
- data/lib/orb/models/coupon_list_params.rb +17 -17
- data/lib/orb/models/coupons/subscription_list_params.rb +12 -15
- data/lib/orb/models/credit_note.rb +100 -166
- data/lib/orb/models/credit_note_create_params.rb +15 -23
- data/lib/orb/models/credit_note_fetch_params.rb +3 -8
- data/lib/orb/models/credit_note_list_params.rb +20 -30
- data/lib/orb/models/customer.rb +224 -271
- data/lib/orb/models/customer_create_params.rb +211 -252
- data/lib/orb/models/customer_delete_params.rb +3 -8
- data/lib/orb/models/customer_fetch_by_external_id_params.rb +3 -8
- data/lib/orb/models/customer_fetch_params.rb +3 -8
- data/lib/orb/models/customer_list_params.rb +20 -30
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +3 -8
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +3 -8
- data/lib/orb/models/customer_update_by_external_id_params.rb +207 -250
- data/lib/orb/models/customer_update_params.rb +207 -250
- data/lib/orb/models/customers/balance_transaction_create_params.rb +11 -16
- data/lib/orb/models/customers/balance_transaction_create_response.rb +33 -51
- data/lib/orb/models/customers/balance_transaction_list_params.rb +20 -30
- data/lib/orb/models/customers/balance_transaction_list_response.rb +33 -51
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +17 -17
- data/lib/orb/models/customers/cost_list_by_external_id_response.rb +22 -26
- data/lib/orb/models/customers/cost_list_params.rb +17 -17
- data/lib/orb/models/customers/cost_list_response.rb +22 -26
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +18 -22
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +10 -17
- data/lib/orb/models/customers/credit_list_params.rb +18 -22
- data/lib/orb/models/customers/credit_list_response.rb +10 -17
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +64 -66
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +300 -406
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +63 -66
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +300 -406
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +33 -48
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +300 -406
- data/lib/orb/models/customers/credits/ledger_list_params.rb +32 -48
- data/lib/orb/models/customers/credits/ledger_list_response.rb +300 -406
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +47 -50
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +43 -46
- data/lib/orb/models/customers/credits/top_up_create_params.rb +46 -50
- data/lib/orb/models/customers/credits/top_up_create_response.rb +42 -46
- data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +4 -9
- data/lib/orb/models/customers/credits/top_up_delete_params.rb +4 -9
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +12 -15
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +43 -46
- data/lib/orb/models/customers/credits/top_up_list_params.rb +12 -15
- data/lib/orb/models/customers/credits/top_up_list_response.rb +42 -46
- data/lib/orb/models/dimensional_price_group.rb +21 -15
- data/lib/orb/models/dimensional_price_group_create_params.rb +17 -23
- data/lib/orb/models/dimensional_price_group_list_params.rb +12 -15
- data/lib/orb/models/dimensional_price_group_retrieve_params.rb +3 -8
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +3 -8
- data/lib/orb/models/dimensional_price_groups.rb +3 -7
- data/lib/orb/models/discount.rb +2 -3
- data/lib/orb/models/evaluate_price_group.rb +8 -11
- data/lib/orb/models/event_deprecate_params.rb +3 -8
- data/lib/orb/models/event_deprecate_response.rb +2 -6
- data/lib/orb/models/event_ingest_params.rb +33 -27
- data/lib/orb/models/event_ingest_response.rb +23 -24
- data/lib/orb/models/event_search_params.rb +15 -11
- data/lib/orb/models/event_search_response.rb +27 -22
- data/lib/orb/models/event_update_params.rb +19 -13
- data/lib/orb/models/event_update_response.rb +2 -6
- data/lib/orb/models/events/backfill_close_params.rb +3 -8
- data/lib/orb/models/events/backfill_close_response.rb +34 -39
- data/lib/orb/models/events/backfill_create_params.rb +28 -32
- data/lib/orb/models/events/backfill_create_response.rb +34 -39
- data/lib/orb/models/events/backfill_fetch_params.rb +3 -8
- data/lib/orb/models/events/backfill_fetch_response.rb +34 -39
- data/lib/orb/models/events/backfill_list_params.rb +12 -15
- data/lib/orb/models/events/backfill_list_response.rb +34 -39
- data/lib/orb/models/events/backfill_revert_params.rb +3 -8
- data/lib/orb/models/events/backfill_revert_response.rb +34 -39
- data/lib/orb/models/events/event_volumes.rb +11 -17
- data/lib/orb/models/events/volume_list_params.rb +19 -22
- data/lib/orb/models/invoice.rb +589 -637
- data/lib/orb/models/invoice_create_params.rb +52 -61
- data/lib/orb/models/invoice_fetch_params.rb +3 -8
- data/lib/orb/models/invoice_fetch_upcoming_params.rb +4 -9
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +584 -631
- data/lib/orb/models/invoice_issue_params.rb +10 -14
- data/lib/orb/models/invoice_level_discount.rb +2 -3
- data/lib/orb/models/invoice_line_item_create_params.rb +19 -14
- data/lib/orb/models/invoice_line_item_create_response.rb +247 -269
- data/lib/orb/models/invoice_list_params.rb +51 -66
- data/lib/orb/models/invoice_mark_paid_params.rb +9 -11
- data/lib/orb/models/invoice_pay_params.rb +3 -8
- data/lib/orb/models/invoice_update_params.rb +9 -9
- data/lib/orb/models/invoice_void_params.rb +3 -8
- data/lib/orb/models/item.rb +14 -25
- data/lib/orb/models/item_create_params.rb +5 -9
- data/lib/orb/models/item_fetch_params.rb +3 -8
- data/lib/orb/models/item_list_params.rb +12 -15
- data/lib/orb/models/item_update_params.rb +10 -22
- data/lib/orb/models/metric_create_params.rb +17 -13
- data/lib/orb/models/metric_fetch_params.rb +3 -8
- data/lib/orb/models/metric_list_params.rb +20 -30
- data/lib/orb/models/metric_update_params.rb +9 -9
- data/lib/orb/models/pagination_metadata.rb +3 -7
- data/lib/orb/models/percentage_discount.rb +15 -14
- data/lib/orb/models/plan.rb +250 -279
- data/lib/orb/models/plan_create_params.rb +1623 -1984
- data/lib/orb/models/plan_fetch_params.rb +3 -8
- data/lib/orb/models/plan_list_params.rb +25 -42
- data/lib/orb/models/plan_update_params.rb +12 -10
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +3 -8
- data/lib/orb/models/plans/external_plan_id_update_params.rb +12 -10
- data/lib/orb/models/price.rb +2709 -3820
- data/lib/orb/models/price_create_params.rb +203 -244
- data/lib/orb/models/price_evaluate_params.rb +21 -30
- data/lib/orb/models/price_evaluate_response.rb +2 -6
- data/lib/orb/models/price_fetch_params.rb +3 -8
- data/lib/orb/models/price_list_params.rb +12 -15
- data/lib/orb/models/price_update_params.rb +9 -9
- data/lib/orb/models/prices/external_price_id_fetch_params.rb +3 -8
- data/lib/orb/models/prices/external_price_id_update_params.rb +9 -9
- data/lib/orb/models/subscription.rb +343 -382
- data/lib/orb/models/subscription_cancel_params.rb +16 -16
- data/lib/orb/models/subscription_cancel_response.rb +339 -377
- data/lib/orb/models/subscription_change_apply_params.rb +7 -10
- data/lib/orb/models/subscription_change_apply_response.rb +365 -398
- data/lib/orb/models/subscription_change_cancel_params.rb +3 -8
- data/lib/orb/models/subscription_change_cancel_response.rb +365 -398
- data/lib/orb/models/subscription_change_retrieve_params.rb +3 -8
- data/lib/orb/models/subscription_change_retrieve_response.rb +366 -398
- data/lib/orb/models/subscription_create_params.rb +3771 -4402
- data/lib/orb/models/subscription_create_response.rb +339 -377
- data/lib/orb/models/subscription_fetch_costs_params.rb +17 -17
- data/lib/orb/models/subscription_fetch_costs_response.rb +22 -26
- data/lib/orb/models/subscription_fetch_params.rb +3 -8
- data/lib/orb/models/subscription_fetch_schedule_params.rb +20 -30
- data/lib/orb/models/subscription_fetch_schedule_response.rb +15 -17
- data/lib/orb/models/subscription_fetch_usage_params.rb +32 -43
- data/lib/orb/models/subscription_list_params.rb +28 -41
- data/lib/orb/models/subscription_price_intervals_params.rb +2018 -2472
- data/lib/orb/models/subscription_price_intervals_response.rb +342 -377
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +3764 -4392
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +342 -377
- data/lib/orb/models/subscription_trigger_phase_params.rb +12 -10
- data/lib/orb/models/subscription_trigger_phase_response.rb +341 -377
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +3 -8
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +342 -377
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +5 -9
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +343 -377
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +3 -8
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +343 -377
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +22 -33
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +342 -377
- data/lib/orb/models/subscription_update_params.rb +21 -23
- data/lib/orb/models/subscription_update_trial_params.rb +15 -18
- data/lib/orb/models/subscription_update_trial_response.rb +341 -377
- data/lib/orb/models/subscription_usage.rb +37 -80
- data/lib/orb/models/subscriptions.rb +3 -7
- data/lib/orb/models/top_level_ping_params.rb +3 -8
- data/lib/orb/models/top_level_ping_response.rb +2 -6
- data/lib/orb/models/trial_discount.rb +16 -24
- data/lib/orb/models/usage_discount.rb +15 -14
- data/lib/orb/request_options.rb +3 -4
- data/lib/orb/resources/alerts.rb +48 -17
- data/lib/orb/resources/coupons/subscriptions.rb +9 -2
- data/lib/orb/resources/coupons.rb +25 -7
- data/lib/orb/resources/credit_notes.rb +17 -4
- data/lib/orb/resources/customers/balance_transactions.rb +18 -3
- data/lib/orb/resources/customers/costs.rb +26 -8
- data/lib/orb/resources/customers/credits/ledger.rb +108 -28
- data/lib/orb/resources/customers/credits/top_ups.rb +67 -20
- data/lib/orb/resources/customers/credits.rb +28 -8
- data/lib/orb/resources/customers.rb +135 -36
- data/lib/orb/resources/dimensional_price_groups.rb +19 -4
- data/lib/orb/resources/events/backfills.rb +32 -9
- data/lib/orb/resources/events/volume.rb +14 -4
- data/lib/orb/resources/events.rb +40 -11
- data/lib/orb/resources/invoice_line_items.rb +16 -6
- data/lib/orb/resources/invoices.rb +77 -17
- data/lib/orb/resources/items.rb +10 -3
- data/lib/orb/resources/metrics.rb +33 -8
- data/lib/orb/resources/plans/external_plan_id.rb +10 -2
- data/lib/orb/resources/plans.rb +47 -11
- data/lib/orb/resources/prices/external_price_id.rb +7 -1
- data/lib/orb/resources/prices.rb +97 -22
- data/lib/orb/resources/subscription_changes.rb +5 -2
- data/lib/orb/resources/subscriptions.rb +292 -78
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +2 -10
- data/rbi/lib/orb/client.rbi +4 -4
- data/rbi/lib/orb/file_part.rbi +34 -0
- data/rbi/lib/orb/internal/transport/base_client.rbi +17 -3
- data/rbi/lib/orb/internal/type/array_of.rbi +3 -0
- data/rbi/lib/orb/internal/type/base_model.rbi +7 -1
- data/rbi/lib/orb/internal/type/base_page.rbi +2 -0
- data/rbi/lib/orb/internal/type/enum.rbi +3 -6
- data/rbi/lib/orb/internal/type/{io_like.rbi → file_input.rbi} +5 -2
- data/rbi/lib/orb/internal/type/hash_of.rbi +3 -0
- data/rbi/lib/orb/internal/type/union.rbi +3 -0
- data/rbi/lib/orb/internal/util.rbi +24 -19
- data/rbi/lib/orb/internal.rbi +0 -1
- data/rbi/lib/orb/models/alert.rbi +28 -8
- data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +16 -6
- data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +16 -6
- data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +16 -6
- data/rbi/lib/orb/models/alert_disable_params.rbi +5 -2
- data/rbi/lib/orb/models/alert_enable_params.rbi +5 -2
- data/rbi/lib/orb/models/alert_list_params.rbi +6 -0
- data/rbi/lib/orb/models/alert_update_params.rbi +11 -4
- data/rbi/lib/orb/models/amount_discount.rbi +10 -4
- data/rbi/lib/orb/models/billable_metric.rbi +16 -3
- data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -1
- data/rbi/lib/orb/models/coupon.rbi +10 -3
- data/rbi/lib/orb/models/coupon_create_params.rbi +6 -3
- data/rbi/lib/orb/models/coupon_list_params.rbi +13 -3
- data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +8 -2
- data/rbi/lib/orb/models/credit_note.rbi +44 -12
- data/rbi/lib/orb/models/credit_note_create_params.rbi +15 -6
- data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -0
- data/rbi/lib/orb/models/customer.rbi +130 -11
- data/rbi/lib/orb/models/customer_create_params.rbi +142 -8
- data/rbi/lib/orb/models/customer_list_params.rbi +3 -0
- data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +140 -8
- data/rbi/lib/orb/models/customer_update_params.rbi +140 -8
- data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +8 -4
- data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +18 -8
- data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -0
- data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +18 -8
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +9 -5
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +21 -4
- data/rbi/lib/orb/models/customers/cost_list_params.rbi +9 -5
- data/rbi/lib/orb/models/customers/cost_list_response.rbi +21 -4
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +13 -3
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +1 -2
- data/rbi/lib/orb/models/customers/credit_list_params.rbi +13 -3
- data/rbi/lib/orb/models/customers/credit_list_response.rbi +1 -2
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +40 -18
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +40 -6
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -16
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +6 -4
- data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +27 -10
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +25 -10
- data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +27 -4
- data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +25 -10
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +8 -2
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +25 -10
- data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +8 -2
- data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +25 -4
- data/rbi/lib/orb/models/dimensional_price_group.rbi +11 -3
- data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -0
- data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +8 -2
- data/rbi/lib/orb/models/evaluate_price_group.rbi +8 -2
- data/rbi/lib/orb/models/event_deprecate_response.rbi +4 -2
- data/rbi/lib/orb/models/event_ingest_params.rbi +22 -5
- data/rbi/lib/orb/models/event_ingest_response.rbi +15 -4
- data/rbi/lib/orb/models/event_search_params.rbi +14 -2
- data/rbi/lib/orb/models/event_search_response.rbi +14 -3
- data/rbi/lib/orb/models/event_update_params.rbi +10 -3
- data/rbi/lib/orb/models/event_update_response.rbi +4 -2
- data/rbi/lib/orb/models/events/backfill_close_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_create_params.rbi +18 -0
- data/rbi/lib/orb/models/events/backfill_create_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_list_params.rbi +8 -2
- data/rbi/lib/orb/models/events/backfill_list_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_revert_response.rbi +14 -2
- data/rbi/lib/orb/models/events/event_volumes.rbi +6 -2
- data/rbi/lib/orb/models/events/volume_list_params.rbi +18 -2
- data/rbi/lib/orb/models/invoice.rbi +375 -46
- data/rbi/lib/orb/models/invoice_create_params.rbi +38 -6
- data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +375 -66
- data/rbi/lib/orb/models/invoice_issue_params.rbi +9 -2
- data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +16 -2
- data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +141 -20
- data/rbi/lib/orb/models/invoice_list_params.rbi +9 -2
- data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +9 -2
- data/rbi/lib/orb/models/invoice_update_params.rbi +7 -2
- data/rbi/lib/orb/models/item.rbi +1 -2
- data/rbi/lib/orb/models/item_create_params.rbi +5 -2
- data/rbi/lib/orb/models/item_list_params.rbi +8 -2
- data/rbi/lib/orb/models/item_update_params.rbi +1 -8
- data/rbi/lib/orb/models/metric_create_params.rbi +15 -2
- data/rbi/lib/orb/models/metric_list_params.rbi +3 -0
- data/rbi/lib/orb/models/metric_update_params.rbi +7 -2
- data/rbi/lib/orb/models/percentage_discount.rbi +11 -4
- data/rbi/lib/orb/models/plan.rbi +102 -15
- data/rbi/lib/orb/models/plan_create_params.rbi +997 -679
- data/rbi/lib/orb/models/plan_list_params.rbi +5 -1
- data/rbi/lib/orb/models/plan_update_params.rbi +11 -2
- data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +11 -2
- data/rbi/lib/orb/models/price.rbi +717 -688
- data/rbi/lib/orb/models/price_create_params.rbi +137 -53
- data/rbi/lib/orb/models/price_evaluate_params.rbi +10 -0
- data/rbi/lib/orb/models/price_list_params.rbi +8 -2
- data/rbi/lib/orb/models/price_update_params.rbi +7 -2
- data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +7 -2
- data/rbi/lib/orb/models/subscription.rbi +174 -11
- data/rbi/lib/orb/models/subscription_cancel_params.rbi +8 -5
- data/rbi/lib/orb/models/subscription_cancel_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_change_apply_params.rbi +7 -2
- data/rbi/lib/orb/models/subscription_change_apply_response.rbi +199 -18
- data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +199 -18
- data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +199 -18
- data/rbi/lib/orb/models/subscription_create_params.rbi +2282 -1536
- data/rbi/lib/orb/models/subscription_create_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +9 -5
- data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +21 -4
- data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -0
- data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +8 -2
- data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +13 -4
- data/rbi/lib/orb/models/subscription_list_params.rbi +4 -2
- data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +1228 -861
- data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +2288 -1544
- data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +10 -2
- data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +5 -2
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +187 -20
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -2
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_update_params.rbi +15 -0
- data/rbi/lib/orb/models/subscription_update_trial_params.rbi +11 -5
- data/rbi/lib/orb/models/subscription_update_trial_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_usage.rbi +2 -16
- data/rbi/lib/orb/models/trial_discount.rbi +5 -1
- data/rbi/lib/orb/models/usage_discount.rbi +11 -3
- data/sig/orb/file_part.rbs +21 -0
- data/sig/orb/internal/transport/base_client.rbs +9 -3
- data/sig/orb/internal/type/array_of.rbs +2 -0
- data/sig/orb/internal/type/base_model.rbs +4 -0
- data/sig/orb/internal/type/enum.rbs +2 -2
- data/sig/orb/internal/type/{io_like.rbs → file_input.rbs} +1 -1
- data/sig/orb/internal/type/hash_of.rbs +2 -0
- data/sig/orb/internal/type/union.rbs +2 -0
- data/sig/orb/internal/util.rbs +14 -12
- metadata +8 -5
@@ -4,6 +4,9 @@ module Orb
|
|
4
4
|
module Resources
|
5
5
|
class Customers
|
6
6
|
class Costs
|
7
|
+
# Some parameter documentations has been truncated, see
|
8
|
+
# {Orb::Models::Customers::CostListParams} for more details.
|
9
|
+
#
|
7
10
|
# This endpoint is used to fetch a day-by-day snapshot of a customer's costs in
|
8
11
|
# Orb, calculated by applying pricing information to the underlying usage (see the
|
9
12
|
# [subscription usage endpoint](/api-reference/subscription/fetch-subscription-usage)
|
@@ -125,10 +128,16 @@ module Orb
|
|
125
128
|
# @overload list(customer_id, currency: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {})
|
126
129
|
#
|
127
130
|
# @param customer_id [String]
|
128
|
-
#
|
129
|
-
# @param
|
130
|
-
#
|
131
|
-
# @param
|
131
|
+
#
|
132
|
+
# @param currency [String, nil] The currency or custom pricing unit to use.
|
133
|
+
#
|
134
|
+
# @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`.
|
135
|
+
#
|
136
|
+
# @param timeframe_start [Time, nil] Costs returned are inclusive of `timeframe_start`.
|
137
|
+
#
|
138
|
+
# @param view_mode [Symbol, Orb::Models::Customers::CostListParams::ViewMode, nil] Controls whether Orb returns cumulative costs since the start of the billing per
|
139
|
+
# ...
|
140
|
+
#
|
132
141
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
133
142
|
#
|
134
143
|
# @return [Orb::Models::Customers::CostListResponse]
|
@@ -145,6 +154,9 @@ module Orb
|
|
145
154
|
)
|
146
155
|
end
|
147
156
|
|
157
|
+
# Some parameter documentations has been truncated, see
|
158
|
+
# {Orb::Models::Customers::CostListByExternalIDParams} for more details.
|
159
|
+
#
|
148
160
|
# This endpoint is used to fetch a day-by-day snapshot of a customer's costs in
|
149
161
|
# Orb, calculated by applying pricing information to the underlying usage (see the
|
150
162
|
# [subscription usage endpoint](/api-reference/subscription/fetch-subscription-usage)
|
@@ -266,10 +278,16 @@ module Orb
|
|
266
278
|
# @overload list_by_external_id(external_customer_id, currency: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {})
|
267
279
|
#
|
268
280
|
# @param external_customer_id [String]
|
269
|
-
#
|
270
|
-
# @param
|
271
|
-
#
|
272
|
-
# @param
|
281
|
+
#
|
282
|
+
# @param currency [String, nil] The currency or custom pricing unit to use.
|
283
|
+
#
|
284
|
+
# @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`.
|
285
|
+
#
|
286
|
+
# @param timeframe_start [Time, nil] Costs returned are inclusive of `timeframe_start`.
|
287
|
+
#
|
288
|
+
# @param view_mode [Symbol, Orb::Models::Customers::CostListByExternalIDParams::ViewMode, nil] Controls whether Orb returns cumulative costs since the start of the billing per
|
289
|
+
# ...
|
290
|
+
#
|
273
291
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
274
292
|
#
|
275
293
|
# @return [Orb::Models::Customers::CostListByExternalIDResponse]
|
@@ -5,6 +5,9 @@ module Orb
|
|
5
5
|
class Customers
|
6
6
|
class Credits
|
7
7
|
class Ledger
|
8
|
+
# Some parameter documentations has been truncated, see
|
9
|
+
# {Orb::Models::Customers::Credits::LedgerListParams} for more details.
|
10
|
+
#
|
8
11
|
# The credits ledger provides _auditing_ functionality over Orb's credits system
|
9
12
|
# with a list of actions that have taken place to modify a customer's credit
|
10
13
|
# balance. This [paginated endpoint](/api-reference/pagination) lists these
|
@@ -90,16 +93,28 @@ module Orb
|
|
90
93
|
# @overload list(customer_id, created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, currency: nil, cursor: nil, entry_status: nil, entry_type: nil, limit: nil, minimum_amount: nil, request_options: {})
|
91
94
|
#
|
92
95
|
# @param customer_id [String]
|
96
|
+
#
|
93
97
|
# @param created_at_gt [Time, nil]
|
98
|
+
#
|
94
99
|
# @param created_at_gte [Time, nil]
|
100
|
+
#
|
95
101
|
# @param created_at_lt [Time, nil]
|
102
|
+
#
|
96
103
|
# @param created_at_lte [Time, nil]
|
97
|
-
#
|
98
|
-
# @param
|
104
|
+
#
|
105
|
+
# @param currency [String, nil] The ledger currency or custom pricing unit to use.
|
106
|
+
#
|
107
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
108
|
+
# ...
|
109
|
+
#
|
99
110
|
# @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListParams::EntryStatus, nil]
|
111
|
+
#
|
100
112
|
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerListParams::EntryType, nil]
|
101
|
-
#
|
113
|
+
#
|
114
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
115
|
+
#
|
102
116
|
# @param minimum_amount [String, nil]
|
117
|
+
#
|
103
118
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
104
119
|
#
|
105
120
|
# @return [Orb::Internal::Page<Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry>]
|
@@ -122,6 +137,9 @@ module Orb
|
|
122
137
|
)
|
123
138
|
end
|
124
139
|
|
140
|
+
# Some parameter documentations has been truncated, see
|
141
|
+
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams} for more details.
|
142
|
+
#
|
125
143
|
# This endpoint allows you to create a new ledger entry for a specified customer's
|
126
144
|
# balance. This can be used to increment balance, deduct credits, and change the
|
127
145
|
# expiry date of existing credits.
|
@@ -236,18 +254,39 @@ module Orb
|
|
236
254
|
# @overload create_entry(customer_id, amount:, entry_type:, expiry_date:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
|
237
255
|
#
|
238
256
|
# @param customer_id [String]
|
239
|
-
#
|
257
|
+
#
|
258
|
+
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
|
259
|
+
# ...
|
260
|
+
#
|
240
261
|
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType]
|
241
|
-
#
|
242
|
-
# @param
|
243
|
-
#
|
244
|
-
# @param
|
245
|
-
#
|
246
|
-
#
|
247
|
-
# @param
|
248
|
-
#
|
249
|
-
# @param
|
250
|
-
#
|
262
|
+
#
|
263
|
+
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
|
264
|
+
#
|
265
|
+
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
|
266
|
+
# ...
|
267
|
+
#
|
268
|
+
# @param block_id [String] The ID of the block to reverse a decrement from.
|
269
|
+
#
|
270
|
+
# @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
|
271
|
+
# ...
|
272
|
+
#
|
273
|
+
# @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
|
274
|
+
# ...
|
275
|
+
#
|
276
|
+
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
|
277
|
+
# ...
|
278
|
+
#
|
279
|
+
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
|
280
|
+
# ...
|
281
|
+
#
|
282
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
283
|
+
# ...
|
284
|
+
#
|
285
|
+
# @param per_unit_cost_basis [String, nil] Can only be specified when entry_type=increment. How much, in the customer's cur
|
286
|
+
# ...
|
287
|
+
#
|
288
|
+
# @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void.
|
289
|
+
#
|
251
290
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
252
291
|
#
|
253
292
|
# @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry]
|
@@ -264,6 +303,10 @@ module Orb
|
|
264
303
|
)
|
265
304
|
end
|
266
305
|
|
306
|
+
# Some parameter documentations has been truncated, see
|
307
|
+
# {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams} for more
|
308
|
+
# details.
|
309
|
+
#
|
267
310
|
# This endpoint allows you to create a new ledger entry for a specified customer's
|
268
311
|
# balance. This can be used to increment balance, deduct credits, and change the
|
269
312
|
# expiry date of existing credits.
|
@@ -378,18 +421,39 @@ module Orb
|
|
378
421
|
# @overload create_entry_by_external_id(external_customer_id, amount:, entry_type:, expiry_date:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
|
379
422
|
#
|
380
423
|
# @param external_customer_id [String]
|
381
|
-
#
|
424
|
+
#
|
425
|
+
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
|
426
|
+
# ...
|
427
|
+
#
|
382
428
|
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType]
|
383
|
-
#
|
384
|
-
# @param
|
385
|
-
#
|
386
|
-
# @param
|
387
|
-
#
|
388
|
-
#
|
389
|
-
# @param
|
390
|
-
#
|
391
|
-
# @param
|
392
|
-
#
|
429
|
+
#
|
430
|
+
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
|
431
|
+
#
|
432
|
+
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
|
433
|
+
# ...
|
434
|
+
#
|
435
|
+
# @param block_id [String] The ID of the block to reverse a decrement from.
|
436
|
+
#
|
437
|
+
# @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
|
438
|
+
# ...
|
439
|
+
#
|
440
|
+
# @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
|
441
|
+
# ...
|
442
|
+
#
|
443
|
+
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
|
444
|
+
# ...
|
445
|
+
#
|
446
|
+
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
|
447
|
+
# ...
|
448
|
+
#
|
449
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
450
|
+
# ...
|
451
|
+
#
|
452
|
+
# @param per_unit_cost_basis [String, nil] Can only be specified when entry_type=increment. How much, in the customer's cur
|
453
|
+
# ...
|
454
|
+
#
|
455
|
+
# @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void.
|
456
|
+
#
|
393
457
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
394
458
|
#
|
395
459
|
# @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry]
|
@@ -407,6 +471,10 @@ module Orb
|
|
407
471
|
)
|
408
472
|
end
|
409
473
|
|
474
|
+
# Some parameter documentations has been truncated, see
|
475
|
+
# {Orb::Models::Customers::Credits::LedgerListByExternalIDParams} for more
|
476
|
+
# details.
|
477
|
+
#
|
410
478
|
# The credits ledger provides _auditing_ functionality over Orb's credits system
|
411
479
|
# with a list of actions that have taken place to modify a customer's credit
|
412
480
|
# balance. This [paginated endpoint](/api-reference/pagination) lists these
|
@@ -492,16 +560,28 @@ module Orb
|
|
492
560
|
# @overload list_by_external_id(external_customer_id, created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, currency: nil, cursor: nil, entry_status: nil, entry_type: nil, limit: nil, minimum_amount: nil, request_options: {})
|
493
561
|
#
|
494
562
|
# @param external_customer_id [String]
|
563
|
+
#
|
495
564
|
# @param created_at_gt [Time, nil]
|
565
|
+
#
|
496
566
|
# @param created_at_gte [Time, nil]
|
567
|
+
#
|
497
568
|
# @param created_at_lt [Time, nil]
|
569
|
+
#
|
498
570
|
# @param created_at_lte [Time, nil]
|
499
|
-
#
|
500
|
-
# @param
|
571
|
+
#
|
572
|
+
# @param currency [String, nil] The ledger currency or custom pricing unit to use.
|
573
|
+
#
|
574
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
575
|
+
# ...
|
576
|
+
#
|
501
577
|
# @param entry_status [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDParams::EntryStatus, nil]
|
578
|
+
#
|
502
579
|
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDParams::EntryType, nil]
|
503
|
-
#
|
580
|
+
#
|
581
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
582
|
+
#
|
504
583
|
# @param minimum_amount [String, nil]
|
584
|
+
#
|
505
585
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
506
586
|
#
|
507
587
|
# @return [Orb::Internal::Page<Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry>]
|
@@ -5,6 +5,9 @@ module Orb
|
|
5
5
|
class Customers
|
6
6
|
class Credits
|
7
7
|
class TopUps
|
8
|
+
# Some parameter documentations has been truncated, see
|
9
|
+
# {Orb::Models::Customers::Credits::TopUpCreateParams} for more details.
|
10
|
+
#
|
8
11
|
# This endpoint allows you to create a new top-up for a specified customer's
|
9
12
|
# balance. While this top-up is active, the customer's balance will added in
|
10
13
|
# increments of the specified amount whenever the balance reaches the specified
|
@@ -16,14 +19,27 @@ module Orb
|
|
16
19
|
# @overload create(customer_id, amount:, currency:, invoice_settings:, per_unit_cost_basis:, threshold:, active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {})
|
17
20
|
#
|
18
21
|
# @param customer_id [String]
|
19
|
-
#
|
20
|
-
# @param
|
21
|
-
#
|
22
|
-
# @param
|
23
|
-
#
|
24
|
-
#
|
25
|
-
# @param
|
26
|
-
#
|
22
|
+
#
|
23
|
+
# @param amount [String] The amount to increment when the threshold is reached.
|
24
|
+
#
|
25
|
+
# @param currency [String] The currency or custom pricing unit to use for this top-up. If this is a real-wo
|
26
|
+
# ...
|
27
|
+
#
|
28
|
+
# @param invoice_settings [Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings] Settings for invoices generated by triggered top-ups.
|
29
|
+
#
|
30
|
+
# @param per_unit_cost_basis [String] How much, in the customer's currency, to charge for each unit.
|
31
|
+
#
|
32
|
+
# @param threshold [String] The threshold at which to trigger the top-up. If the balance is at or below this
|
33
|
+
# ...
|
34
|
+
#
|
35
|
+
# @param active_from [Time, nil] The date from which the top-up is active. If unspecified, the top-up is active i
|
36
|
+
# ...
|
37
|
+
#
|
38
|
+
# @param expires_after [Integer, nil] The number of days or months after which the top-up expires. If unspecified, it
|
39
|
+
# ...
|
40
|
+
#
|
41
|
+
# @param expires_after_unit [Symbol, Orb::Models::Customers::Credits::TopUpCreateParams::ExpiresAfterUnit, nil] The unit of expires_after.
|
42
|
+
#
|
27
43
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
28
44
|
#
|
29
45
|
# @return [Orb::Models::Customers::Credits::TopUpCreateResponse]
|
@@ -40,13 +56,20 @@ module Orb
|
|
40
56
|
)
|
41
57
|
end
|
42
58
|
|
59
|
+
# Some parameter documentations has been truncated, see
|
60
|
+
# {Orb::Models::Customers::Credits::TopUpListParams} for more details.
|
61
|
+
#
|
43
62
|
# List top-ups
|
44
63
|
#
|
45
64
|
# @overload list(customer_id, cursor: nil, limit: nil, request_options: {})
|
46
65
|
#
|
47
66
|
# @param customer_id [String]
|
48
|
-
#
|
49
|
-
# @param
|
67
|
+
#
|
68
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
69
|
+
# ...
|
70
|
+
#
|
71
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
72
|
+
#
|
50
73
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
51
74
|
#
|
52
75
|
# @return [Orb::Internal::Page<Orb::Models::Customers::Credits::TopUpListResponse>]
|
@@ -90,6 +113,10 @@ module Orb
|
|
90
113
|
)
|
91
114
|
end
|
92
115
|
|
116
|
+
# Some parameter documentations has been truncated, see
|
117
|
+
# {Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams} for more
|
118
|
+
# details.
|
119
|
+
#
|
93
120
|
# This endpoint allows you to create a new top-up for a specified customer's
|
94
121
|
# balance. While this top-up is active, the customer's balance will added in
|
95
122
|
# increments of the specified amount whenever the balance reaches the specified
|
@@ -101,14 +128,27 @@ module Orb
|
|
101
128
|
# @overload create_by_external_id(external_customer_id, amount:, currency:, invoice_settings:, per_unit_cost_basis:, threshold:, active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {})
|
102
129
|
#
|
103
130
|
# @param external_customer_id [String]
|
104
|
-
#
|
105
|
-
# @param
|
106
|
-
#
|
107
|
-
# @param
|
108
|
-
#
|
109
|
-
#
|
110
|
-
# @param
|
111
|
-
#
|
131
|
+
#
|
132
|
+
# @param amount [String] The amount to increment when the threshold is reached.
|
133
|
+
#
|
134
|
+
# @param currency [String] The currency or custom pricing unit to use for this top-up. If this is a real-wo
|
135
|
+
# ...
|
136
|
+
#
|
137
|
+
# @param invoice_settings [Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings] Settings for invoices generated by triggered top-ups.
|
138
|
+
#
|
139
|
+
# @param per_unit_cost_basis [String] How much, in the customer's currency, to charge for each unit.
|
140
|
+
#
|
141
|
+
# @param threshold [String] The threshold at which to trigger the top-up. If the balance is at or below this
|
142
|
+
# ...
|
143
|
+
#
|
144
|
+
# @param active_from [Time, nil] The date from which the top-up is active. If unspecified, the top-up is active i
|
145
|
+
# ...
|
146
|
+
#
|
147
|
+
# @param expires_after [Integer, nil] The number of days or months after which the top-up expires. If unspecified, it
|
148
|
+
# ...
|
149
|
+
#
|
150
|
+
# @param expires_after_unit [Symbol, Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::ExpiresAfterUnit, nil] The unit of expires_after.
|
151
|
+
#
|
112
152
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
113
153
|
#
|
114
154
|
# @return [Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse]
|
@@ -155,13 +195,20 @@ module Orb
|
|
155
195
|
)
|
156
196
|
end
|
157
197
|
|
198
|
+
# Some parameter documentations has been truncated, see
|
199
|
+
# {Orb::Models::Customers::Credits::TopUpListByExternalIDParams} for more details.
|
200
|
+
#
|
158
201
|
# List top-ups by external ID
|
159
202
|
#
|
160
203
|
# @overload list_by_external_id(external_customer_id, cursor: nil, limit: nil, request_options: {})
|
161
204
|
#
|
162
205
|
# @param external_customer_id [String]
|
163
|
-
#
|
164
|
-
# @param
|
206
|
+
#
|
207
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
208
|
+
# ...
|
209
|
+
#
|
210
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
211
|
+
#
|
165
212
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
166
213
|
#
|
167
214
|
# @return [Orb::Internal::Page<Orb::Models::Customers::Credits::TopUpListByExternalIDResponse>]
|
@@ -10,6 +10,9 @@ module Orb
|
|
10
10
|
# @return [Orb::Resources::Customers::Credits::TopUps]
|
11
11
|
attr_reader :top_ups
|
12
12
|
|
13
|
+
# Some parameter documentations has been truncated, see
|
14
|
+
# {Orb::Models::Customers::CreditListParams} for more details.
|
15
|
+
#
|
13
16
|
# Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
14
17
|
#
|
15
18
|
# If `include_all_blocks` is set to `true`, all credit blocks (including expired
|
@@ -21,10 +24,17 @@ module Orb
|
|
21
24
|
# @overload list(customer_id, currency: nil, cursor: nil, include_all_blocks: nil, limit: nil, request_options: {})
|
22
25
|
#
|
23
26
|
# @param customer_id [String]
|
24
|
-
#
|
25
|
-
# @param
|
26
|
-
#
|
27
|
-
# @param
|
27
|
+
#
|
28
|
+
# @param currency [String, nil] The ledger currency or custom pricing unit to use.
|
29
|
+
#
|
30
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
31
|
+
# ...
|
32
|
+
#
|
33
|
+
# @param include_all_blocks [Boolean] If set to True, all expired and depleted blocks, as well as active block will be
|
34
|
+
# ...
|
35
|
+
#
|
36
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
37
|
+
#
|
28
38
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
29
39
|
#
|
30
40
|
# @return [Orb::Internal::Page<Orb::Models::Customers::CreditListResponse>]
|
@@ -42,6 +52,9 @@ module Orb
|
|
42
52
|
)
|
43
53
|
end
|
44
54
|
|
55
|
+
# Some parameter documentations has been truncated, see
|
56
|
+
# {Orb::Models::Customers::CreditListByExternalIDParams} for more details.
|
57
|
+
#
|
45
58
|
# Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
46
59
|
#
|
47
60
|
# If `include_all_blocks` is set to `true`, all credit blocks (including expired
|
@@ -53,10 +66,17 @@ module Orb
|
|
53
66
|
# @overload list_by_external_id(external_customer_id, currency: nil, cursor: nil, include_all_blocks: nil, limit: nil, request_options: {})
|
54
67
|
#
|
55
68
|
# @param external_customer_id [String]
|
56
|
-
#
|
57
|
-
# @param
|
58
|
-
#
|
59
|
-
# @param
|
69
|
+
#
|
70
|
+
# @param currency [String, nil] The ledger currency or custom pricing unit to use.
|
71
|
+
#
|
72
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
73
|
+
# ...
|
74
|
+
#
|
75
|
+
# @param include_all_blocks [Boolean] If set to True, all expired and depleted blocks, as well as active block will be
|
76
|
+
# ...
|
77
|
+
#
|
78
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
79
|
+
#
|
60
80
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
61
81
|
#
|
62
82
|
# @return [Orb::Internal::Page<Orb::Models::Customers::CreditListByExternalIDResponse>]
|