orb-billing 0.1.0.pre.alpha.33
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 +7 -0
- data/README.md +169 -0
- data/lib/orb/client.rb +129 -0
- data/lib/orb/errors.rb +317 -0
- data/lib/orb/models/alert.rb +225 -0
- data/lib/orb/models/alert_create_for_customer_params.rb +77 -0
- data/lib/orb/models/alert_create_for_external_customer_params.rb +77 -0
- data/lib/orb/models/alert_create_for_subscription_params.rb +74 -0
- data/lib/orb/models/alert_disable_params.rb +26 -0
- data/lib/orb/models/alert_enable_params.rb +26 -0
- data/lib/orb/models/alert_list_params.rb +97 -0
- data/lib/orb/models/alert_retrieve_params.rb +19 -0
- data/lib/orb/models/alert_update_params.rb +46 -0
- data/lib/orb/models/amount_discount.rb +53 -0
- data/lib/orb/models/billable_metric.rb +76 -0
- data/lib/orb/models/billing_cycle_relative_date.rb +18 -0
- data/lib/orb/models/coupon.rb +86 -0
- data/lib/orb/models/coupon_archive_params.rb +19 -0
- data/lib/orb/models/coupon_create_params.rb +102 -0
- data/lib/orb/models/coupon_fetch_params.rb +19 -0
- data/lib/orb/models/coupon_list_params.rb +53 -0
- data/lib/orb/models/coupons/subscription_list_params.rb +40 -0
- data/lib/orb/models/credit_note.rb +522 -0
- data/lib/orb/models/credit_note_create_params.rb +77 -0
- data/lib/orb/models/credit_note_fetch_params.rb +19 -0
- data/lib/orb/models/credit_note_list_params.rb +73 -0
- data/lib/orb/models/customer.rb +872 -0
- data/lib/orb/models/customer_create_params.rb +843 -0
- data/lib/orb/models/customer_delete_params.rb +19 -0
- data/lib/orb/models/customer_fetch_by_external_id_params.rb +19 -0
- data/lib/orb/models/customer_fetch_params.rb +19 -0
- data/lib/orb/models/customer_list_params.rb +73 -0
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +19 -0
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +19 -0
- data/lib/orb/models/customer_update_by_external_id_params.rb +848 -0
- data/lib/orb/models/customer_update_params.rb +838 -0
- data/lib/orb/models/customers/balance_transaction_create_params.rb +53 -0
- data/lib/orb/models/customers/balance_transaction_create_response.rb +167 -0
- data/lib/orb/models/customers/balance_transaction_list_params.rb +75 -0
- data/lib/orb/models/customers/balance_transaction_list_response.rb +167 -0
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +69 -0
- data/lib/orb/models/customers/cost_list_by_external_id_response.rb +106 -0
- data/lib/orb/models/customers/cost_list_params.rb +69 -0
- data/lib/orb/models/customers/cost_list_response.rb +106 -0
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +59 -0
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +72 -0
- data/lib/orb/models/customers/credit_list_params.rb +59 -0
- data/lib/orb/models/customers/credit_list_response.rb +72 -0
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +215 -0
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +1311 -0
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +214 -0
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +1310 -0
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +141 -0
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +1310 -0
- data/lib/orb/models/customers/credits/ledger_list_params.rb +141 -0
- data/lib/orb/models/customers/credits/ledger_list_response.rb +1306 -0
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +159 -0
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +154 -0
- data/lib/orb/models/customers/credits/top_up_create_params.rb +158 -0
- data/lib/orb/models/customers/credits/top_up_create_response.rb +153 -0
- data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +29 -0
- data/lib/orb/models/customers/credits/top_up_delete_params.rb +29 -0
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +42 -0
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +154 -0
- data/lib/orb/models/customers/credits/top_up_list_params.rb +42 -0
- data/lib/orb/models/customers/credits/top_up_list_response.rb +153 -0
- data/lib/orb/models/dimensional_price_group.rb +64 -0
- data/lib/orb/models/dimensional_price_group_create_params.rb +63 -0
- data/lib/orb/models/dimensional_price_group_list_params.rb +38 -0
- data/lib/orb/models/dimensional_price_group_retrieve_params.rb +19 -0
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +21 -0
- data/lib/orb/models/dimensional_price_groups.rb +25 -0
- data/lib/orb/models/discount.rb +23 -0
- data/lib/orb/models/evaluate_price_group.rb +48 -0
- data/lib/orb/models/event_deprecate_params.rb +19 -0
- data/lib/orb/models/event_deprecate_response.rb +21 -0
- data/lib/orb/models/event_ingest_params.rb +100 -0
- data/lib/orb/models/event_ingest_response.rb +77 -0
- data/lib/orb/models/event_search_params.rb +45 -0
- data/lib/orb/models/event_search_response.rb +87 -0
- data/lib/orb/models/event_update_params.rb +58 -0
- data/lib/orb/models/event_update_response.rb +21 -0
- data/lib/orb/models/events/backfill_close_params.rb +21 -0
- data/lib/orb/models/events/backfill_close_response.rb +131 -0
- data/lib/orb/models/events/backfill_create_params.rb +97 -0
- data/lib/orb/models/events/backfill_create_response.rb +131 -0
- data/lib/orb/models/events/backfill_fetch_params.rb +21 -0
- data/lib/orb/models/events/backfill_fetch_response.rb +131 -0
- data/lib/orb/models/events/backfill_list_params.rb +40 -0
- data/lib/orb/models/events/backfill_list_response.rb +131 -0
- data/lib/orb/models/events/backfill_revert_params.rb +21 -0
- data/lib/orb/models/events/backfill_revert_response.rb +131 -0
- data/lib/orb/models/events/event_volumes.rb +54 -0
- data/lib/orb/models/events/volume_list_params.rb +64 -0
- data/lib/orb/models/invoice.rb +2218 -0
- data/lib/orb/models/invoice_create_params.rb +200 -0
- data/lib/orb/models/invoice_fetch_params.rb +19 -0
- data/lib/orb/models/invoice_fetch_upcoming_params.rb +25 -0
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +2226 -0
- data/lib/orb/models/invoice_issue_params.rb +34 -0
- data/lib/orb/models/invoice_level_discount.rb +21 -0
- data/lib/orb/models/invoice_line_item_create_params.rb +62 -0
- data/lib/orb/models/invoice_line_item_create_response.rb +929 -0
- data/lib/orb/models/invoice_list_params.rb +197 -0
- data/lib/orb/models/invoice_mark_paid_params.rb +40 -0
- data/lib/orb/models/invoice_pay_params.rb +19 -0
- data/lib/orb/models/invoice_update_params.rb +28 -0
- data/lib/orb/models/invoice_void_params.rb +19 -0
- data/lib/orb/models/item.rb +82 -0
- data/lib/orb/models/item_create_params.rb +26 -0
- data/lib/orb/models/item_fetch_params.rb +19 -0
- data/lib/orb/models/item_list_params.rb +38 -0
- data/lib/orb/models/item_update_params.rb +73 -0
- data/lib/orb/models/metric_create_params.rb +56 -0
- data/lib/orb/models/metric_fetch_params.rb +19 -0
- data/lib/orb/models/metric_list_params.rb +73 -0
- data/lib/orb/models/metric_update_params.rb +28 -0
- data/lib/orb/models/pagination_metadata.rb +25 -0
- data/lib/orb/models/percentage_discount.rb +54 -0
- data/lib/orb/models/plan.rb +894 -0
- data/lib/orb/models/plan_create_params.rb +6702 -0
- data/lib/orb/models/plan_fetch_params.rb +19 -0
- data/lib/orb/models/plan_list_params.rb +100 -0
- data/lib/orb/models/plan_update_params.rb +37 -0
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +21 -0
- data/lib/orb/models/plans/external_plan_id_update_params.rb +39 -0
- data/lib/orb/models/price.rb +12229 -0
- data/lib/orb/models/price_create_params.rb +808 -0
- data/lib/orb/models/price_evaluate_params.rb +80 -0
- data/lib/orb/models/price_evaluate_response.rb +20 -0
- data/lib/orb/models/price_fetch_params.rb +19 -0
- data/lib/orb/models/price_list_params.rb +38 -0
- data/lib/orb/models/price_update_params.rb +28 -0
- data/lib/orb/models/prices/external_price_id_fetch_params.rb +21 -0
- data/lib/orb/models/prices/external_price_id_update_params.rb +30 -0
- data/lib/orb/models/subscription.rb +1233 -0
- data/lib/orb/models/subscription_cancel_params.rb +58 -0
- data/lib/orb/models/subscription_cancel_response.rb +1217 -0
- data/lib/orb/models/subscription_create_params.rb +15065 -0
- data/lib/orb/models/subscription_create_response.rb +1217 -0
- data/lib/orb/models/subscription_fetch_costs_params.rb +67 -0
- data/lib/orb/models/subscription_fetch_costs_response.rb +104 -0
- data/lib/orb/models/subscription_fetch_params.rb +19 -0
- data/lib/orb/models/subscription_fetch_schedule_params.rb +73 -0
- data/lib/orb/models/subscription_fetch_schedule_response.rb +68 -0
- data/lib/orb/models/subscription_fetch_usage_params.rb +135 -0
- data/lib/orb/models/subscription_list_params.rb +108 -0
- data/lib/orb/models/subscription_price_intervals_params.rb +8358 -0
- data/lib/orb/models/subscription_price_intervals_response.rb +1224 -0
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +15088 -0
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +1224 -0
- data/lib/orb/models/subscription_trigger_phase_params.rb +36 -0
- data/lib/orb/models/subscription_trigger_phase_response.rb +1224 -0
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +19 -0
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +1224 -0
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +26 -0
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +1228 -0
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +19 -0
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +1224 -0
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +90 -0
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +1224 -0
- data/lib/orb/models/subscription_update_params.rb +74 -0
- data/lib/orb/models/subscription_update_trial_params.rb +59 -0
- data/lib/orb/models/subscription_update_trial_response.rb +1222 -0
- data/lib/orb/models/subscription_usage.rb +258 -0
- data/lib/orb/models/subscriptions.rb +25 -0
- data/lib/orb/models/top_level_ping_params.rb +19 -0
- data/lib/orb/models/top_level_ping_response.rb +20 -0
- data/lib/orb/models/trial_discount.rb +69 -0
- data/lib/orb/models/usage_discount.rb +54 -0
- data/lib/orb/page.rb +114 -0
- data/lib/orb/request_options.rb +75 -0
- data/lib/orb/resources/alerts.rb +239 -0
- data/lib/orb/resources/coupons/subscriptions.rb +43 -0
- data/lib/orb/resources/coupons.rb +115 -0
- data/lib/orb/resources/credit_notes.rb +87 -0
- data/lib/orb/resources/customers/balance_transactions.rb +96 -0
- data/lib/orb/resources/customers/costs.rb +298 -0
- data/lib/orb/resources/customers/credits/ledger.rb +527 -0
- data/lib/orb/resources/customers/credits/top_ups.rb +192 -0
- data/lib/orb/resources/customers/credits.rb +88 -0
- data/lib/orb/resources/customers.rb +321 -0
- data/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +38 -0
- data/lib/orb/resources/dimensional_price_groups.rb +93 -0
- data/lib/orb/resources/events/backfills.rb +174 -0
- data/lib/orb/resources/events/volume.rb +52 -0
- data/lib/orb/resources/events.rb +415 -0
- data/lib/orb/resources/invoice_line_items.rb +41 -0
- data/lib/orb/resources/invoices.rb +266 -0
- data/lib/orb/resources/items.rb +95 -0
- data/lib/orb/resources/metrics.rb +114 -0
- data/lib/orb/resources/plans/external_plan_id.rb +76 -0
- data/lib/orb/resources/plans.rb +133 -0
- data/lib/orb/resources/prices/external_price_id.rb +61 -0
- data/lib/orb/resources/prices.rb +197 -0
- data/lib/orb/resources/subscriptions.rb +1278 -0
- data/lib/orb/resources/top_level.rb +37 -0
- data/lib/orb/transport/base_client.rb +459 -0
- data/lib/orb/transport/pooled_net_requester.rb +182 -0
- data/lib/orb/type/array_of.rb +112 -0
- data/lib/orb/type/base_model.rb +367 -0
- data/lib/orb/type/base_page.rb +61 -0
- data/lib/orb/type/boolean_model.rb +52 -0
- data/lib/orb/type/converter.rb +217 -0
- data/lib/orb/type/enum.rb +101 -0
- data/lib/orb/type/hash_of.rb +132 -0
- data/lib/orb/type/request_parameters.rb +38 -0
- data/lib/orb/type/union.rb +225 -0
- data/lib/orb/type/unknown.rb +56 -0
- data/lib/orb/type.rb +23 -0
- data/lib/orb/util.rb +722 -0
- data/lib/orb/version.rb +5 -0
- data/lib/orb.rb +247 -0
- data/manifest.yaml +15 -0
- data/rbi/lib/orb/client.rbi +90 -0
- data/rbi/lib/orb/errors.rbi +246 -0
- data/rbi/lib/orb/models/alert.rbi +239 -0
- data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +86 -0
- data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +88 -0
- data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +83 -0
- data/rbi/lib/orb/models/alert_disable_params.rbi +28 -0
- data/rbi/lib/orb/models/alert_enable_params.rbi +28 -0
- data/rbi/lib/orb/models/alert_list_params.rbi +95 -0
- data/rbi/lib/orb/models/alert_retrieve_params.rbi +20 -0
- data/rbi/lib/orb/models/alert_update_params.rbi +51 -0
- data/rbi/lib/orb/models/amount_discount.rbi +62 -0
- data/rbi/lib/orb/models/billable_metric.rbi +83 -0
- data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +19 -0
- data/rbi/lib/orb/models/coupon.rbi +90 -0
- data/rbi/lib/orb/models/coupon_archive_params.rbi +20 -0
- data/rbi/lib/orb/models/coupon_create_params.rbi +120 -0
- data/rbi/lib/orb/models/coupon_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/coupon_list_params.rbi +59 -0
- data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +41 -0
- data/rbi/lib/orb/models/credit_note.rbi +546 -0
- data/rbi/lib/orb/models/credit_note_create_params.rbi +84 -0
- data/rbi/lib/orb/models/credit_note_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/credit_note_list_params.rbi +74 -0
- data/rbi/lib/orb/models/customer.rbi +941 -0
- data/rbi/lib/orb/models/customer_create_params.rbi +923 -0
- data/rbi/lib/orb/models/customer_delete_params.rbi +20 -0
- data/rbi/lib/orb/models/customer_fetch_by_external_id_params.rbi +20 -0
- data/rbi/lib/orb/models/customer_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/customer_list_params.rbi +74 -0
- data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +20 -0
- data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +20 -0
- data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +945 -0
- data/rbi/lib/orb/models/customer_update_params.rbi +919 -0
- data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +64 -0
- data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +199 -0
- data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +76 -0
- data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +191 -0
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +86 -0
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +214 -0
- data/rbi/lib/orb/models/customers/cost_list_params.rbi +84 -0
- data/rbi/lib/orb/models/customers/cost_list_response.rbi +212 -0
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +64 -0
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +87 -0
- data/rbi/lib/orb/models/customers/credit_list_params.rbi +64 -0
- data/rbi/lib/orb/models/customers/credit_list_response.rbi +86 -0
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +270 -0
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +1670 -0
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +238 -0
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +1626 -0
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +181 -0
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +1654 -0
- data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +144 -0
- data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +1588 -0
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +196 -0
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +198 -0
- data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +176 -0
- data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +175 -0
- data/rbi/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +31 -0
- data/rbi/lib/orb/models/customers/credits/top_up_delete_params.rbi +28 -0
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +49 -0
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +188 -0
- data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +49 -0
- data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +168 -0
- data/rbi/lib/orb/models/dimensional_price_group.rbi +75 -0
- data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +66 -0
- data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +39 -0
- data/rbi/lib/orb/models/dimensional_price_group_retrieve_params.rbi +20 -0
- data/rbi/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +22 -0
- data/rbi/lib/orb/models/dimensional_price_groups.rbi +35 -0
- data/rbi/lib/orb/models/discount.rbi +18 -0
- data/rbi/lib/orb/models/evaluate_price_group.rbi +45 -0
- data/rbi/lib/orb/models/event_deprecate_params.rbi +20 -0
- data/rbi/lib/orb/models/event_deprecate_response.rbi +19 -0
- data/rbi/lib/orb/models/event_ingest_params.rbi +120 -0
- data/rbi/lib/orb/models/event_ingest_response.rbi +79 -0
- data/rbi/lib/orb/models/event_search_params.rbi +53 -0
- data/rbi/lib/orb/models/event_search_response.rbi +100 -0
- data/rbi/lib/orb/models/event_update_params.rbi +71 -0
- data/rbi/lib/orb/models/event_update_response.rbi +19 -0
- data/rbi/lib/orb/models/events/backfill_close_params.rbi +22 -0
- data/rbi/lib/orb/models/events/backfill_close_response.rbi +127 -0
- data/rbi/lib/orb/models/events/backfill_create_params.rbi +97 -0
- data/rbi/lib/orb/models/events/backfill_create_response.rbi +128 -0
- data/rbi/lib/orb/models/events/backfill_fetch_params.rbi +22 -0
- data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +127 -0
- data/rbi/lib/orb/models/events/backfill_list_params.rbi +41 -0
- data/rbi/lib/orb/models/events/backfill_list_response.rbi +127 -0
- data/rbi/lib/orb/models/events/backfill_revert_params.rbi +22 -0
- data/rbi/lib/orb/models/events/backfill_revert_response.rbi +128 -0
- data/rbi/lib/orb/models/events/event_volumes.rbi +47 -0
- data/rbi/lib/orb/models/events/volume_list_params.rbi +69 -0
- data/rbi/lib/orb/models/invoice.rbi +2466 -0
- data/rbi/lib/orb/models/invoice_create_params.rbi +230 -0
- data/rbi/lib/orb/models/invoice_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/invoice_fetch_upcoming_params.rbi +24 -0
- data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +2646 -0
- data/rbi/lib/orb/models/invoice_issue_params.rbi +32 -0
- data/rbi/lib/orb/models/invoice_level_discount.rbi +16 -0
- data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +67 -0
- data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +1164 -0
- data/rbi/lib/orb/models/invoice_list_params.rbi +187 -0
- data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +48 -0
- data/rbi/lib/orb/models/invoice_pay_params.rbi +20 -0
- data/rbi/lib/orb/models/invoice_update_params.rbi +36 -0
- data/rbi/lib/orb/models/invoice_void_params.rbi +20 -0
- data/rbi/lib/orb/models/item.rbi +101 -0
- data/rbi/lib/orb/models/item_create_params.rbi +25 -0
- data/rbi/lib/orb/models/item_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/item_list_params.rbi +39 -0
- data/rbi/lib/orb/models/item_update_params.rbi +113 -0
- data/rbi/lib/orb/models/metric_create_params.rbi +62 -0
- data/rbi/lib/orb/models/metric_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/metric_list_params.rbi +74 -0
- data/rbi/lib/orb/models/metric_update_params.rbi +36 -0
- data/rbi/lib/orb/models/pagination_metadata.rbi +21 -0
- data/rbi/lib/orb/models/percentage_discount.rbi +63 -0
- data/rbi/lib/orb/models/plan.rbi +1071 -0
- data/rbi/lib/orb/models/plan_create_params.rbi +10069 -0
- data/rbi/lib/orb/models/plan_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/plan_list_params.rbi +100 -0
- data/rbi/lib/orb/models/plan_update_params.rbi +46 -0
- data/rbi/lib/orb/models/plans/external_plan_id_fetch_params.rbi +22 -0
- data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +48 -0
- data/rbi/lib/orb/models/price.rbi +15341 -0
- data/rbi/lib/orb/models/price_create_params.rbi +885 -0
- data/rbi/lib/orb/models/price_evaluate_params.rbi +81 -0
- data/rbi/lib/orb/models/price_evaluate_response.rbi +21 -0
- data/rbi/lib/orb/models/price_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/price_list_params.rbi +39 -0
- data/rbi/lib/orb/models/price_update_params.rbi +36 -0
- data/rbi/lib/orb/models/prices/external_price_id_fetch_params.rbi +22 -0
- data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +38 -0
- data/rbi/lib/orb/models/subscription.rbi +1381 -0
- data/rbi/lib/orb/models/subscription_cancel_params.rbi +75 -0
- data/rbi/lib/orb/models/subscription_cancel_response.rbi +1374 -0
- data/rbi/lib/orb/models/subscription_create_params.rbi +23422 -0
- data/rbi/lib/orb/models/subscription_create_response.rbi +1374 -0
- data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +82 -0
- data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +210 -0
- data/rbi/lib/orb/models/subscription_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +74 -0
- data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +81 -0
- data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +137 -0
- data/rbi/lib/orb/models/subscription_list_params.rbi +108 -0
- data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +12991 -0
- data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +1387 -0
- data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +23589 -0
- data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +1390 -0
- data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +45 -0
- data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +1381 -0
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_params.rbi +20 -0
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +1400 -0
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +25 -0
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1451 -0
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +20 -0
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1410 -0
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +104 -0
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1400 -0
- data/rbi/lib/orb/models/subscription_update_params.rbi +77 -0
- data/rbi/lib/orb/models/subscription_update_trial_params.rbi +63 -0
- data/rbi/lib/orb/models/subscription_update_trial_response.rbi +1378 -0
- data/rbi/lib/orb/models/subscription_usage.rbi +323 -0
- data/rbi/lib/orb/models/subscriptions.rbi +33 -0
- data/rbi/lib/orb/models/top_level_ping_params.rbi +20 -0
- data/rbi/lib/orb/models/top_level_ping_response.rbi +18 -0
- data/rbi/lib/orb/models/trial_discount.rbi +73 -0
- data/rbi/lib/orb/models/usage_discount.rbi +62 -0
- data/rbi/lib/orb/page.rbi +35 -0
- data/rbi/lib/orb/request_options.rbi +48 -0
- data/rbi/lib/orb/resources/alerts.rbi +216 -0
- data/rbi/lib/orb/resources/coupons/subscriptions.rbi +38 -0
- data/rbi/lib/orb/resources/coupons.rbi +96 -0
- data/rbi/lib/orb/resources/credit_notes.rbi +74 -0
- data/rbi/lib/orb/resources/customers/balance_transactions.rbi +92 -0
- data/rbi/lib/orb/resources/customers/costs.rbi +304 -0
- data/rbi/lib/orb/resources/customers/credits/ledger.rbi +645 -0
- data/rbi/lib/orb/resources/customers/credits/top_ups.rbi +180 -0
- data/rbi/lib/orb/resources/customers/credits.rbi +88 -0
- data/rbi/lib/orb/resources/customers.rbi +714 -0
- data/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +25 -0
- data/rbi/lib/orb/resources/dimensional_price_groups.rbi +78 -0
- data/rbi/lib/orb/resources/events/backfills.rbi +161 -0
- data/rbi/lib/orb/resources/events/volume.rbi +57 -0
- data/rbi/lib/orb/resources/events.rbi +408 -0
- data/rbi/lib/orb/resources/invoice_line_items.rbi +44 -0
- data/rbi/lib/orb/resources/invoices.rbi +262 -0
- data/rbi/lib/orb/resources/items.rbi +65 -0
- data/rbi/lib/orb/resources/metrics.rbi +102 -0
- data/rbi/lib/orb/resources/plans/external_plan_id.rbi +67 -0
- data/rbi/lib/orb/resources/plans.rbi +170 -0
- data/rbi/lib/orb/resources/prices/external_price_id.rbi +110 -0
- data/rbi/lib/orb/resources/prices.rbi +371 -0
- data/rbi/lib/orb/resources/subscriptions.rbi +1469 -0
- data/rbi/lib/orb/resources/top_level.rbi +25 -0
- data/rbi/lib/orb/transport/base_client.rbi +205 -0
- data/rbi/lib/orb/transport/pooled_net_requester.rbi +64 -0
- data/rbi/lib/orb/type/array_of.rbi +82 -0
- data/rbi/lib/orb/type/base_model.rbi +197 -0
- data/rbi/lib/orb/type/base_page.rbi +38 -0
- data/rbi/lib/orb/type/boolean_model.rbi +41 -0
- data/rbi/lib/orb/type/converter.rbi +95 -0
- data/rbi/lib/orb/type/enum.rbi +58 -0
- data/rbi/lib/orb/type/hash_of.rbi +86 -0
- data/rbi/lib/orb/type/request_parameters.rbi +20 -0
- data/rbi/lib/orb/type/union.rbi +66 -0
- data/rbi/lib/orb/type/unknown.rbi +37 -0
- data/rbi/lib/orb/type.rbi +23 -0
- data/rbi/lib/orb/util.rbi +278 -0
- data/rbi/lib/orb/version.rbi +5 -0
- data/sig/orb/client.rbs +53 -0
- data/sig/orb/errors.rbs +201 -0
- data/sig/orb/models/alert.rbs +142 -0
- data/sig/orb/models/alert_create_for_customer_params.rbs +56 -0
- data/sig/orb/models/alert_create_for_external_customer_params.rbs +56 -0
- data/sig/orb/models/alert_create_for_subscription_params.rbs +52 -0
- data/sig/orb/models/alert_disable_params.rbs +20 -0
- data/sig/orb/models/alert_enable_params.rbs +20 -0
- data/sig/orb/models/alert_list_params.rbs +57 -0
- data/sig/orb/models/alert_retrieve_params.rbs +14 -0
- data/sig/orb/models/alert_update_params.rbs +31 -0
- data/sig/orb/models/amount_discount.rbs +40 -0
- data/sig/orb/models/billable_metric.rbs +50 -0
- data/sig/orb/models/billing_cycle_relative_date.rbs +14 -0
- data/sig/orb/models/coupon.rbs +51 -0
- data/sig/orb/models/coupon_archive_params.rbs +14 -0
- data/sig/orb/models/coupon_create_params.rbs +77 -0
- data/sig/orb/models/coupon_fetch_params.rbs +14 -0
- data/sig/orb/models/coupon_list_params.rbs +37 -0
- data/sig/orb/models/coupons/subscription_list_params.rbs +27 -0
- data/sig/orb/models/credit_note.rbs +345 -0
- data/sig/orb/models/credit_note_create_params.rbs +57 -0
- data/sig/orb/models/credit_note_fetch_params.rbs +14 -0
- data/sig/orb/models/credit_note_list_params.rbs +45 -0
- data/sig/orb/models/customer.rbs +628 -0
- data/sig/orb/models/customer_create_params.rbs +624 -0
- data/sig/orb/models/customer_delete_params.rbs +14 -0
- data/sig/orb/models/customer_fetch_by_external_id_params.rbs +14 -0
- data/sig/orb/models/customer_fetch_params.rbs +14 -0
- data/sig/orb/models/customer_list_params.rbs +45 -0
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +15 -0
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +15 -0
- data/sig/orb/models/customer_update_by_external_id_params.rbs +620 -0
- data/sig/orb/models/customer_update_params.rbs +620 -0
- data/sig/orb/models/customers/balance_transaction_create_params.rbs +44 -0
- data/sig/orb/models/customers/balance_transaction_create_response.rbs +114 -0
- data/sig/orb/models/customers/balance_transaction_list_params.rbs +47 -0
- data/sig/orb/models/customers/balance_transaction_list_response.rbs +114 -0
- data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +48 -0
- data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +82 -0
- data/sig/orb/models/customers/cost_list_params.rbs +48 -0
- data/sig/orb/models/customers/cost_list_response.rbs +80 -0
- data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +41 -0
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +55 -0
- data/sig/orb/models/customers/credit_list_params.rbs +41 -0
- data/sig/orb/models/customers/credit_list_response.rbs +55 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +120 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +814 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +120 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +814 -0
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +99 -0
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +814 -0
- data/sig/orb/models/customers/credits/ledger_list_params.rbs +99 -0
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +814 -0
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +95 -0
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +90 -0
- data/sig/orb/models/customers/credits/top_up_create_params.rbs +95 -0
- data/sig/orb/models/customers/credits/top_up_create_response.rbs +90 -0
- data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +24 -0
- data/sig/orb/models/customers/credits/top_up_delete_params.rbs +24 -0
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +29 -0
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +90 -0
- data/sig/orb/models/customers/credits/top_up_list_params.rbs +29 -0
- data/sig/orb/models/customers/credits/top_up_list_response.rbs +90 -0
- data/sig/orb/models/dimensional_price_group.rbs +38 -0
- data/sig/orb/models/dimensional_price_group_create_params.rbs +39 -0
- data/sig/orb/models/dimensional_price_group_list_params.rbs +25 -0
- data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +15 -0
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +17 -0
- data/sig/orb/models/dimensional_price_groups.rbs +22 -0
- data/sig/orb/models/discount.rbs +15 -0
- data/sig/orb/models/evaluate_price_group.rbs +34 -0
- data/sig/orb/models/event_deprecate_params.rbs +14 -0
- data/sig/orb/models/event_deprecate_response.rbs +13 -0
- data/sig/orb/models/event_ingest_params.rbs +68 -0
- data/sig/orb/models/event_ingest_response.rbs +53 -0
- data/sig/orb/models/event_search_params.rbs +31 -0
- data/sig/orb/models/event_search_response.rbs +55 -0
- data/sig/orb/models/event_update_params.rbs +39 -0
- data/sig/orb/models/event_update_response.rbs +13 -0
- data/sig/orb/models/events/backfill_close_params.rbs +16 -0
- data/sig/orb/models/events/backfill_close_response.rbs +73 -0
- data/sig/orb/models/events/backfill_create_params.rbs +51 -0
- data/sig/orb/models/events/backfill_create_response.rbs +73 -0
- data/sig/orb/models/events/backfill_fetch_params.rbs +16 -0
- data/sig/orb/models/events/backfill_fetch_response.rbs +73 -0
- data/sig/orb/models/events/backfill_list_params.rbs +27 -0
- data/sig/orb/models/events/backfill_list_response.rbs +73 -0
- data/sig/orb/models/events/backfill_revert_params.rbs +16 -0
- data/sig/orb/models/events/backfill_revert_response.rbs +73 -0
- data/sig/orb/models/events/event_volumes.rbs +39 -0
- data/sig/orb/models/events/volume_list_params.rbs +41 -0
- data/sig/orb/models/invoice.rbs +1430 -0
- data/sig/orb/models/invoice_create_params.rbs +120 -0
- data/sig/orb/models/invoice_fetch_params.rbs +14 -0
- data/sig/orb/models/invoice_fetch_upcoming_params.rbs +20 -0
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +1430 -0
- data/sig/orb/models/invoice_issue_params.rbs +21 -0
- data/sig/orb/models/invoice_level_discount.rbs +14 -0
- data/sig/orb/models/invoice_line_item_create_params.rbs +43 -0
- data/sig/orb/models/invoice_line_item_create_response.rbs +546 -0
- data/sig/orb/models/invoice_list_params.rbs +122 -0
- data/sig/orb/models/invoice_mark_paid_params.rbs +27 -0
- data/sig/orb/models/invoice_pay_params.rbs +14 -0
- data/sig/orb/models/invoice_update_params.rbs +20 -0
- data/sig/orb/models/invoice_void_params.rbs +14 -0
- data/sig/orb/models/item.rbs +72 -0
- data/sig/orb/models/item_create_params.rbs +19 -0
- data/sig/orb/models/item_fetch_params.rbs +14 -0
- data/sig/orb/models/item_list_params.rbs +25 -0
- data/sig/orb/models/item_update_params.rbs +69 -0
- data/sig/orb/models/metric_create_params.rbs +39 -0
- data/sig/orb/models/metric_fetch_params.rbs +14 -0
- data/sig/orb/models/metric_list_params.rbs +45 -0
- data/sig/orb/models/metric_update_params.rbs +20 -0
- data/sig/orb/models/pagination_metadata.rbs +15 -0
- data/sig/orb/models/percentage_discount.rbs +40 -0
- data/sig/orb/models/plan.rbs +529 -0
- data/sig/orb/models/plan_create_params.rbs +3991 -0
- data/sig/orb/models/plan_fetch_params.rbs +14 -0
- data/sig/orb/models/plan_list_params.rbs +65 -0
- data/sig/orb/models/plan_update_params.rbs +24 -0
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +16 -0
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +26 -0
- data/sig/orb/models/price.rbs +8108 -0
- data/sig/orb/models/price_create_params.rbs +520 -0
- data/sig/orb/models/price_evaluate_params.rbs +45 -0
- data/sig/orb/models/price_evaluate_response.rbs +14 -0
- data/sig/orb/models/price_fetch_params.rbs +14 -0
- data/sig/orb/models/price_list_params.rbs +25 -0
- data/sig/orb/models/price_update_params.rbs +20 -0
- data/sig/orb/models/prices/external_price_id_fetch_params.rbs +16 -0
- data/sig/orb/models/prices/external_price_id_update_params.rbs +22 -0
- data/sig/orb/models/subscription.rbs +687 -0
- data/sig/orb/models/subscription_cancel_params.rbs +44 -0
- data/sig/orb/models/subscription_cancel_response.rbs +687 -0
- data/sig/orb/models/subscription_create_params.rbs +9141 -0
- data/sig/orb/models/subscription_create_response.rbs +687 -0
- data/sig/orb/models/subscription_fetch_costs_params.rbs +46 -0
- data/sig/orb/models/subscription_fetch_costs_response.rbs +78 -0
- data/sig/orb/models/subscription_fetch_params.rbs +14 -0
- data/sig/orb/models/subscription_fetch_schedule_params.rbs +45 -0
- data/sig/orb/models/subscription_fetch_schedule_response.rbs +48 -0
- data/sig/orb/models/subscription_fetch_usage_params.rbs +80 -0
- data/sig/orb/models/subscription_list_params.rbs +69 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +5117 -0
- data/sig/orb/models/subscription_price_intervals_response.rbs +687 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +9133 -0
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +687 -0
- data/sig/orb/models/subscription_trigger_phase_params.rbs +24 -0
- data/sig/orb/models/subscription_trigger_phase_response.rbs +687 -0
- data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +15 -0
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +687 -0
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +20 -0
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +687 -0
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +15 -0
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +687 -0
- data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +55 -0
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +687 -0
- data/sig/orb/models/subscription_update_params.rbs +39 -0
- data/sig/orb/models/subscription_update_trial_params.rbs +39 -0
- data/sig/orb/models/subscription_update_trial_response.rbs +687 -0
- data/sig/orb/models/subscription_usage.rbs +196 -0
- data/sig/orb/models/subscriptions.rbs +22 -0
- data/sig/orb/models/top_level_ping_params.rbs +14 -0
- data/sig/orb/models/top_level_ping_response.rbs +13 -0
- data/sig/orb/models/trial_discount.rbs +44 -0
- data/sig/orb/models/usage_discount.rbs +40 -0
- data/sig/orb/page.rbs +22 -0
- data/sig/orb/request_options.rbs +32 -0
- data/sig/orb/resources/alerts.rbs +67 -0
- data/sig/orb/resources/coupons/subscriptions.rbs +16 -0
- data/sig/orb/resources/coupons.rbs +35 -0
- data/sig/orb/resources/credit_notes.rbs +29 -0
- data/sig/orb/resources/customers/balance_transactions.rbs +28 -0
- data/sig/orb/resources/customers/costs.rbs +27 -0
- data/sig/orb/resources/customers/credits/ledger.rbs +75 -0
- data/sig/orb/resources/customers/credits/top_ups.rbs +63 -0
- data/sig/orb/resources/customers/credits.rbs +31 -0
- data/sig/orb/resources/customers.rbs +114 -0
- data/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs +14 -0
- data/sig/orb/resources/dimensional_price_groups.rbs +29 -0
- data/sig/orb/resources/events/backfills.rbs +41 -0
- data/sig/orb/resources/events/volume.rbs +17 -0
- data/sig/orb/resources/events.rbs +40 -0
- data/sig/orb/resources/invoice_line_items.rbs +17 -0
- data/sig/orb/resources/invoices.rbs +84 -0
- data/sig/orb/resources/items.rbs +30 -0
- data/sig/orb/resources/metrics.rbs +37 -0
- data/sig/orb/resources/plans/external_plan_id.rbs +21 -0
- data/sig/orb/resources/plans.rbs +44 -0
- data/sig/orb/resources/prices/external_price_id.rbs +20 -0
- data/sig/orb/resources/prices.rbs +83 -0
- data/sig/orb/resources/subscriptions.rbs +194 -0
- data/sig/orb/resources/top_level.rbs +11 -0
- data/sig/orb/transport/base_client.rbs +110 -0
- data/sig/orb/transport/pooled_net_requester.rbs +39 -0
- data/sig/orb/type/array_of.rbs +36 -0
- data/sig/orb/type/base_model.rbs +77 -0
- data/sig/orb/type/base_page.rbs +22 -0
- data/sig/orb/type/boolean_model.rbs +18 -0
- data/sig/orb/type/converter.rbs +36 -0
- data/sig/orb/type/enum.rbs +22 -0
- data/sig/orb/type/hash_of.rbs +36 -0
- data/sig/orb/type/request_parameters.rbs +13 -0
- data/sig/orb/type/union.rbs +37 -0
- data/sig/orb/type/unknown.rbs +15 -0
- data/sig/orb/type.rbs +22 -0
- data/sig/orb/util.rbs +132 -0
- data/sig/orb/version.rbs +3 -0
- metadata +692 -0
@@ -0,0 +1,2218 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Orb
|
4
|
+
module Models
|
5
|
+
# @see Orb::Resources::Invoices#create
|
6
|
+
class Invoice < Orb::BaseModel
|
7
|
+
# @!attribute id
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
required :id, String
|
11
|
+
|
12
|
+
# @!attribute amount_due
|
13
|
+
# This is the final amount required to be charged to the customer and reflects the
|
14
|
+
# application of the customer balance to the `total` of the invoice.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
required :amount_due, String
|
18
|
+
|
19
|
+
# @!attribute auto_collection
|
20
|
+
#
|
21
|
+
# @return [Orb::Models::Invoice::AutoCollection]
|
22
|
+
required :auto_collection, -> { Orb::Models::Invoice::AutoCollection }
|
23
|
+
|
24
|
+
# @!attribute billing_address
|
25
|
+
#
|
26
|
+
# @return [Orb::Models::Invoice::BillingAddress, nil]
|
27
|
+
required :billing_address, -> { Orb::Models::Invoice::BillingAddress }, nil?: true
|
28
|
+
|
29
|
+
# @!attribute created_at
|
30
|
+
# The creation time of the resource in Orb.
|
31
|
+
#
|
32
|
+
# @return [Time]
|
33
|
+
required :created_at, Time
|
34
|
+
|
35
|
+
# @!attribute credit_notes
|
36
|
+
# A list of credit notes associated with the invoice
|
37
|
+
#
|
38
|
+
# @return [Array<Orb::Models::Invoice::CreditNote>]
|
39
|
+
required :credit_notes, -> { Orb::ArrayOf[Orb::Models::Invoice::CreditNote] }
|
40
|
+
|
41
|
+
# @!attribute currency
|
42
|
+
# An ISO 4217 currency string or `credits`
|
43
|
+
#
|
44
|
+
# @return [String]
|
45
|
+
required :currency, String
|
46
|
+
|
47
|
+
# @!attribute customer
|
48
|
+
#
|
49
|
+
# @return [Orb::Models::Invoice::Customer]
|
50
|
+
required :customer, -> { Orb::Models::Invoice::Customer }
|
51
|
+
|
52
|
+
# @!attribute customer_balance_transactions
|
53
|
+
#
|
54
|
+
# @return [Array<Orb::Models::Invoice::CustomerBalanceTransaction>]
|
55
|
+
required :customer_balance_transactions,
|
56
|
+
-> { Orb::ArrayOf[Orb::Models::Invoice::CustomerBalanceTransaction] }
|
57
|
+
|
58
|
+
# @!attribute customer_tax_id
|
59
|
+
# Tax IDs are commonly required to be displayed on customer invoices, which are
|
60
|
+
# added to the headers of invoices.
|
61
|
+
#
|
62
|
+
# ### Supported Tax ID Countries and Types
|
63
|
+
#
|
64
|
+
# | Country | Type | Description |
|
65
|
+
# | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
|
66
|
+
# | Andorra | `ad_nrt` | Andorran NRT Number |
|
67
|
+
# | Argentina | `ar_cuit` | Argentinian Tax ID Number |
|
68
|
+
# | Australia | `au_abn` | Australian Business Number (AU ABN) |
|
69
|
+
# | Australia | `au_arn` | Australian Taxation Office Reference Number |
|
70
|
+
# | Austria | `eu_vat` | European VAT Number |
|
71
|
+
# | Bahrain | `bh_vat` | Bahraini VAT Number |
|
72
|
+
# | Belgium | `eu_vat` | European VAT Number |
|
73
|
+
# | Bolivia | `bo_tin` | Bolivian Tax ID |
|
74
|
+
# | Brazil | `br_cnpj` | Brazilian CNPJ Number |
|
75
|
+
# | Brazil | `br_cpf` | Brazilian CPF Number |
|
76
|
+
# | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
|
77
|
+
# | Bulgaria | `eu_vat` | European VAT Number |
|
78
|
+
# | Canada | `ca_bn` | Canadian BN |
|
79
|
+
# | Canada | `ca_gst_hst` | Canadian GST/HST Number |
|
80
|
+
# | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
|
81
|
+
# | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
|
82
|
+
# | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
|
83
|
+
# | Canada | `ca_qst` | Canadian QST Number (Québec) |
|
84
|
+
# | Chile | `cl_tin` | Chilean TIN |
|
85
|
+
# | China | `cn_tin` | Chinese Tax ID |
|
86
|
+
# | Colombia | `co_nit` | Colombian NIT Number |
|
87
|
+
# | Costa Rica | `cr_tin` | Costa Rican Tax ID |
|
88
|
+
# | Croatia | `eu_vat` | European VAT Number |
|
89
|
+
# | Cyprus | `eu_vat` | European VAT Number |
|
90
|
+
# | Czech Republic | `eu_vat` | European VAT Number |
|
91
|
+
# | Denmark | `eu_vat` | European VAT Number |
|
92
|
+
# | Dominican Republic | `do_rcn` | Dominican RCN Number |
|
93
|
+
# | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
|
94
|
+
# | Egypt | `eg_tin` | Egyptian Tax Identification Number |
|
95
|
+
# | El Salvador | `sv_nit` | El Salvadorian NIT Number |
|
96
|
+
# | Estonia | `eu_vat` | European VAT Number |
|
97
|
+
# | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
98
|
+
# | Finland | `eu_vat` | European VAT Number |
|
99
|
+
# | France | `eu_vat` | European VAT Number |
|
100
|
+
# | Georgia | `ge_vat` | Georgian VAT |
|
101
|
+
# | Germany | `eu_vat` | European VAT Number |
|
102
|
+
# | Greece | `eu_vat` | European VAT Number |
|
103
|
+
# | Hong Kong | `hk_br` | Hong Kong BR Number |
|
104
|
+
# | Hungary | `eu_vat` | European VAT Number |
|
105
|
+
# | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
|
106
|
+
# | Iceland | `is_vat` | Icelandic VAT |
|
107
|
+
# | India | `in_gst` | Indian GST Number |
|
108
|
+
# | Indonesia | `id_npwp` | Indonesian NPWP Number |
|
109
|
+
# | Ireland | `eu_vat` | European VAT Number |
|
110
|
+
# | Israel | `il_vat` | Israel VAT |
|
111
|
+
# | Italy | `eu_vat` | European VAT Number |
|
112
|
+
# | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
113
|
+
# | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
114
|
+
# | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
115
|
+
# | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
|
116
|
+
# | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
|
117
|
+
# | Latvia | `eu_vat` | European VAT Number |
|
118
|
+
# | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
|
119
|
+
# | Lithuania | `eu_vat` | European VAT Number |
|
120
|
+
# | Luxembourg | `eu_vat` | European VAT Number |
|
121
|
+
# | Malaysia | `my_frp` | Malaysian FRP Number |
|
122
|
+
# | Malaysia | `my_itn` | Malaysian ITN |
|
123
|
+
# | Malaysia | `my_sst` | Malaysian SST Number |
|
124
|
+
# | Malta | `eu_vat ` | European VAT Number |
|
125
|
+
# | Mexico | `mx_rfc` | Mexican RFC Number |
|
126
|
+
# | Netherlands | `eu_vat` | European VAT Number |
|
127
|
+
# | New Zealand | `nz_gst` | New Zealand GST Number |
|
128
|
+
# | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
|
129
|
+
# | Norway | `no_vat` | Norwegian VAT Number |
|
130
|
+
# | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
131
|
+
# | Oman | `om_vat` | Omani VAT Number |
|
132
|
+
# | Peru | `pe_ruc` | Peruvian RUC Number |
|
133
|
+
# | Philippines | `ph_tin ` | Philippines Tax Identification Number |
|
134
|
+
# | Poland | `eu_vat` | European VAT Number |
|
135
|
+
# | Portugal | `eu_vat` | European VAT Number |
|
136
|
+
# | Romania | `eu_vat` | European VAT Number |
|
137
|
+
# | Romania | `ro_tin` | Romanian Tax ID Number |
|
138
|
+
# | Russia | `ru_inn` | Russian INN |
|
139
|
+
# | Russia | `ru_kpp` | Russian KPP |
|
140
|
+
# | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
|
141
|
+
# | Serbia | `rs_pib` | Serbian PIB Number |
|
142
|
+
# | Singapore | `sg_gst` | Singaporean GST |
|
143
|
+
# | Singapore | `sg_uen` | Singaporean UEN |
|
144
|
+
# | Slovakia | `eu_vat` | European VAT Number |
|
145
|
+
# | Slovenia | `eu_vat` | European VAT Number |
|
146
|
+
# | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
|
147
|
+
# | South Africa | `za_vat` | South African VAT Number |
|
148
|
+
# | South Korea | `kr_brn` | Korean BRN |
|
149
|
+
# | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
150
|
+
# | Spain | `eu_vat` | European VAT Number |
|
151
|
+
# | Sweden | `eu_vat` | European VAT Number |
|
152
|
+
# | Switzerland | `ch_vat` | Switzerland VAT Number |
|
153
|
+
# | Taiwan | `tw_vat` | Taiwanese VAT |
|
154
|
+
# | Thailand | `th_vat` | Thai VAT |
|
155
|
+
# | Turkey | `tr_tin` | Turkish Tax Identification Number |
|
156
|
+
# | Ukraine | `ua_vat` | Ukrainian VAT |
|
157
|
+
# | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
|
158
|
+
# | United Kingdom | `eu_vat` | Northern Ireland VAT Number |
|
159
|
+
# | United Kingdom | `gb_vat` | United Kingdom VAT Number |
|
160
|
+
# | United States | `us_ein` | United States EIN |
|
161
|
+
# | Uruguay | `uy_ruc` | Uruguayan RUC Number |
|
162
|
+
# | Venezuela | `ve_rif` | Venezuelan RIF Number |
|
163
|
+
# | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
|
164
|
+
#
|
165
|
+
# @return [Orb::Models::Invoice::CustomerTaxID, nil]
|
166
|
+
required :customer_tax_id, -> { Orb::Models::Invoice::CustomerTaxID }, nil?: true
|
167
|
+
|
168
|
+
# @!attribute discount
|
169
|
+
# This field is deprecated in favor of `discounts`. If a `discounts` list is
|
170
|
+
# provided, the first discount in the list will be returned. If the list is empty,
|
171
|
+
# `None` will be returned.
|
172
|
+
#
|
173
|
+
# @return [Object]
|
174
|
+
required :discount, Orb::Unknown
|
175
|
+
|
176
|
+
# @!attribute discounts
|
177
|
+
#
|
178
|
+
# @return [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount>]
|
179
|
+
required :discounts, -> { Orb::ArrayOf[union: Orb::Models::InvoiceLevelDiscount] }
|
180
|
+
|
181
|
+
# @!attribute due_date
|
182
|
+
# When the invoice payment is due. The due date is null if the invoice is not yet
|
183
|
+
# finalized.
|
184
|
+
#
|
185
|
+
# @return [Time, nil]
|
186
|
+
required :due_date, Time, nil?: true
|
187
|
+
|
188
|
+
# @!attribute eligible_to_issue_at
|
189
|
+
# If the invoice has a status of `draft`, this will be the time that the invoice
|
190
|
+
# will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
|
191
|
+
# true, the invoice will automatically begin issuing at this time.
|
192
|
+
#
|
193
|
+
# @return [Time, nil]
|
194
|
+
required :eligible_to_issue_at, Time, nil?: true
|
195
|
+
|
196
|
+
# @!attribute hosted_invoice_url
|
197
|
+
# A URL for the customer-facing invoice portal. This URL expires 30 days after the
|
198
|
+
# invoice's due date, or 60 days after being re-generated through the UI.
|
199
|
+
#
|
200
|
+
# @return [String, nil]
|
201
|
+
required :hosted_invoice_url, String, nil?: true
|
202
|
+
|
203
|
+
# @!attribute invoice_date
|
204
|
+
# The scheduled date of the invoice
|
205
|
+
#
|
206
|
+
# @return [Time]
|
207
|
+
required :invoice_date, Time
|
208
|
+
|
209
|
+
# @!attribute invoice_number
|
210
|
+
# Automatically generated invoice number to help track and reconcile invoices.
|
211
|
+
# Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
|
212
|
+
# account or customer.
|
213
|
+
#
|
214
|
+
# @return [String]
|
215
|
+
required :invoice_number, String
|
216
|
+
|
217
|
+
# @!attribute invoice_pdf
|
218
|
+
# The link to download the PDF representation of the `Invoice`.
|
219
|
+
#
|
220
|
+
# @return [String, nil]
|
221
|
+
required :invoice_pdf, String, nil?: true
|
222
|
+
|
223
|
+
# @!attribute invoice_source
|
224
|
+
#
|
225
|
+
# @return [Symbol, Orb::Models::Invoice::InvoiceSource]
|
226
|
+
required :invoice_source, enum: -> { Orb::Models::Invoice::InvoiceSource }
|
227
|
+
|
228
|
+
# @!attribute issue_failed_at
|
229
|
+
# If the invoice failed to issue, this will be the last time it failed to issue
|
230
|
+
# (even if it is now in a different state.)
|
231
|
+
#
|
232
|
+
# @return [Time, nil]
|
233
|
+
required :issue_failed_at, Time, nil?: true
|
234
|
+
|
235
|
+
# @!attribute issued_at
|
236
|
+
# If the invoice has been issued, this will be the time it transitioned to
|
237
|
+
# `issued` (even if it is now in a different state.)
|
238
|
+
#
|
239
|
+
# @return [Time, nil]
|
240
|
+
required :issued_at, Time, nil?: true
|
241
|
+
|
242
|
+
# @!attribute line_items
|
243
|
+
# The breakdown of prices in this invoice.
|
244
|
+
#
|
245
|
+
# @return [Array<Orb::Models::Invoice::LineItem>]
|
246
|
+
required :line_items, -> { Orb::ArrayOf[Orb::Models::Invoice::LineItem] }
|
247
|
+
|
248
|
+
# @!attribute maximum
|
249
|
+
#
|
250
|
+
# @return [Orb::Models::Invoice::Maximum, nil]
|
251
|
+
required :maximum, -> { Orb::Models::Invoice::Maximum }, nil?: true
|
252
|
+
|
253
|
+
# @!attribute maximum_amount
|
254
|
+
#
|
255
|
+
# @return [String, nil]
|
256
|
+
required :maximum_amount, String, nil?: true
|
257
|
+
|
258
|
+
# @!attribute memo
|
259
|
+
# Free-form text which is available on the invoice PDF and the Orb invoice portal.
|
260
|
+
#
|
261
|
+
# @return [String, nil]
|
262
|
+
required :memo, String, nil?: true
|
263
|
+
|
264
|
+
# @!attribute metadata
|
265
|
+
# User specified key-value pairs for the resource. If not present, this defaults
|
266
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
267
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
268
|
+
# `null`.
|
269
|
+
#
|
270
|
+
# @return [Hash{Symbol=>String}]
|
271
|
+
required :metadata, Orb::HashOf[String]
|
272
|
+
|
273
|
+
# @!attribute minimum
|
274
|
+
#
|
275
|
+
# @return [Orb::Models::Invoice::Minimum, nil]
|
276
|
+
required :minimum, -> { Orb::Models::Invoice::Minimum }, nil?: true
|
277
|
+
|
278
|
+
# @!attribute minimum_amount
|
279
|
+
#
|
280
|
+
# @return [String, nil]
|
281
|
+
required :minimum_amount, String, nil?: true
|
282
|
+
|
283
|
+
# @!attribute paid_at
|
284
|
+
# If the invoice has a status of `paid`, this gives a timestamp when the invoice
|
285
|
+
# was paid.
|
286
|
+
#
|
287
|
+
# @return [Time, nil]
|
288
|
+
required :paid_at, Time, nil?: true
|
289
|
+
|
290
|
+
# @!attribute payment_attempts
|
291
|
+
# A list of payment attempts associated with the invoice
|
292
|
+
#
|
293
|
+
# @return [Array<Orb::Models::Invoice::PaymentAttempt>]
|
294
|
+
required :payment_attempts, -> { Orb::ArrayOf[Orb::Models::Invoice::PaymentAttempt] }
|
295
|
+
|
296
|
+
# @!attribute payment_failed_at
|
297
|
+
# If payment was attempted on this invoice but failed, this will be the time of
|
298
|
+
# the most recent attempt.
|
299
|
+
#
|
300
|
+
# @return [Time, nil]
|
301
|
+
required :payment_failed_at, Time, nil?: true
|
302
|
+
|
303
|
+
# @!attribute payment_started_at
|
304
|
+
# If payment was attempted on this invoice, this will be the start time of the
|
305
|
+
# most recent attempt. This field is especially useful for delayed-notification
|
306
|
+
# payment mechanisms (like bank transfers), where payment can take 3 days or more.
|
307
|
+
#
|
308
|
+
# @return [Time, nil]
|
309
|
+
required :payment_started_at, Time, nil?: true
|
310
|
+
|
311
|
+
# @!attribute scheduled_issue_at
|
312
|
+
# If the invoice is in draft, this timestamp will reflect when the invoice is
|
313
|
+
# scheduled to be issued.
|
314
|
+
#
|
315
|
+
# @return [Time, nil]
|
316
|
+
required :scheduled_issue_at, Time, nil?: true
|
317
|
+
|
318
|
+
# @!attribute shipping_address
|
319
|
+
#
|
320
|
+
# @return [Orb::Models::Invoice::ShippingAddress, nil]
|
321
|
+
required :shipping_address, -> { Orb::Models::Invoice::ShippingAddress }, nil?: true
|
322
|
+
|
323
|
+
# @!attribute status
|
324
|
+
#
|
325
|
+
# @return [Symbol, Orb::Models::Invoice::Status]
|
326
|
+
required :status, enum: -> { Orb::Models::Invoice::Status }
|
327
|
+
|
328
|
+
# @!attribute subscription
|
329
|
+
#
|
330
|
+
# @return [Orb::Models::Invoice::Subscription, nil]
|
331
|
+
required :subscription, -> { Orb::Models::Invoice::Subscription }, nil?: true
|
332
|
+
|
333
|
+
# @!attribute subtotal
|
334
|
+
# The total before any discounts and minimums are applied.
|
335
|
+
#
|
336
|
+
# @return [String]
|
337
|
+
required :subtotal, String
|
338
|
+
|
339
|
+
# @!attribute sync_failed_at
|
340
|
+
# If the invoice failed to sync, this will be the last time an external invoicing
|
341
|
+
# provider sync was attempted. This field will always be `null` for invoices using
|
342
|
+
# Orb Invoicing.
|
343
|
+
#
|
344
|
+
# @return [Time, nil]
|
345
|
+
required :sync_failed_at, Time, nil?: true
|
346
|
+
|
347
|
+
# @!attribute total
|
348
|
+
# The total after any minimums and discounts have been applied.
|
349
|
+
#
|
350
|
+
# @return [String]
|
351
|
+
required :total, String
|
352
|
+
|
353
|
+
# @!attribute voided_at
|
354
|
+
# If the invoice has a status of `void`, this gives a timestamp when the invoice
|
355
|
+
# was voided.
|
356
|
+
#
|
357
|
+
# @return [Time, nil]
|
358
|
+
required :voided_at, Time, nil?: true
|
359
|
+
|
360
|
+
# @!attribute will_auto_issue
|
361
|
+
# This is true if the invoice will be automatically issued in the future, and
|
362
|
+
# false otherwise.
|
363
|
+
#
|
364
|
+
# @return [Boolean]
|
365
|
+
required :will_auto_issue, Orb::BooleanModel
|
366
|
+
|
367
|
+
# @!parse
|
368
|
+
# # An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity,
|
369
|
+
# # representing the request for payment for a single subscription. This includes a
|
370
|
+
# # set of line items, which correspond to prices in the subscription's plan and can
|
371
|
+
# # represent fixed recurring fees or usage-based fees. They are generated at the
|
372
|
+
# # end of a billing period, or as the result of an action, such as a cancellation.
|
373
|
+
# #
|
374
|
+
# # @param id [String]
|
375
|
+
# # @param amount_due [String]
|
376
|
+
# # @param auto_collection [Orb::Models::Invoice::AutoCollection]
|
377
|
+
# # @param billing_address [Orb::Models::Invoice::BillingAddress, nil]
|
378
|
+
# # @param created_at [Time]
|
379
|
+
# # @param credit_notes [Array<Orb::Models::Invoice::CreditNote>]
|
380
|
+
# # @param currency [String]
|
381
|
+
# # @param customer [Orb::Models::Invoice::Customer]
|
382
|
+
# # @param customer_balance_transactions [Array<Orb::Models::Invoice::CustomerBalanceTransaction>]
|
383
|
+
# # @param customer_tax_id [Orb::Models::Invoice::CustomerTaxID, nil]
|
384
|
+
# # @param discount [Object]
|
385
|
+
# # @param discounts [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount>]
|
386
|
+
# # @param due_date [Time, nil]
|
387
|
+
# # @param eligible_to_issue_at [Time, nil]
|
388
|
+
# # @param hosted_invoice_url [String, nil]
|
389
|
+
# # @param invoice_date [Time]
|
390
|
+
# # @param invoice_number [String]
|
391
|
+
# # @param invoice_pdf [String, nil]
|
392
|
+
# # @param invoice_source [Symbol, Orb::Models::Invoice::InvoiceSource]
|
393
|
+
# # @param issue_failed_at [Time, nil]
|
394
|
+
# # @param issued_at [Time, nil]
|
395
|
+
# # @param line_items [Array<Orb::Models::Invoice::LineItem>]
|
396
|
+
# # @param maximum [Orb::Models::Invoice::Maximum, nil]
|
397
|
+
# # @param maximum_amount [String, nil]
|
398
|
+
# # @param memo [String, nil]
|
399
|
+
# # @param metadata [Hash{Symbol=>String}]
|
400
|
+
# # @param minimum [Orb::Models::Invoice::Minimum, nil]
|
401
|
+
# # @param minimum_amount [String, nil]
|
402
|
+
# # @param paid_at [Time, nil]
|
403
|
+
# # @param payment_attempts [Array<Orb::Models::Invoice::PaymentAttempt>]
|
404
|
+
# # @param payment_failed_at [Time, nil]
|
405
|
+
# # @param payment_started_at [Time, nil]
|
406
|
+
# # @param scheduled_issue_at [Time, nil]
|
407
|
+
# # @param shipping_address [Orb::Models::Invoice::ShippingAddress, nil]
|
408
|
+
# # @param status [Symbol, Orb::Models::Invoice::Status]
|
409
|
+
# # @param subscription [Orb::Models::Invoice::Subscription, nil]
|
410
|
+
# # @param subtotal [String]
|
411
|
+
# # @param sync_failed_at [Time, nil]
|
412
|
+
# # @param total [String]
|
413
|
+
# # @param voided_at [Time, nil]
|
414
|
+
# # @param will_auto_issue [Boolean]
|
415
|
+
# #
|
416
|
+
# def initialize(
|
417
|
+
# id:,
|
418
|
+
# amount_due:,
|
419
|
+
# auto_collection:,
|
420
|
+
# billing_address:,
|
421
|
+
# created_at:,
|
422
|
+
# credit_notes:,
|
423
|
+
# currency:,
|
424
|
+
# customer:,
|
425
|
+
# customer_balance_transactions:,
|
426
|
+
# customer_tax_id:,
|
427
|
+
# discount:,
|
428
|
+
# discounts:,
|
429
|
+
# due_date:,
|
430
|
+
# eligible_to_issue_at:,
|
431
|
+
# hosted_invoice_url:,
|
432
|
+
# invoice_date:,
|
433
|
+
# invoice_number:,
|
434
|
+
# invoice_pdf:,
|
435
|
+
# invoice_source:,
|
436
|
+
# issue_failed_at:,
|
437
|
+
# issued_at:,
|
438
|
+
# line_items:,
|
439
|
+
# maximum:,
|
440
|
+
# maximum_amount:,
|
441
|
+
# memo:,
|
442
|
+
# metadata:,
|
443
|
+
# minimum:,
|
444
|
+
# minimum_amount:,
|
445
|
+
# paid_at:,
|
446
|
+
# payment_attempts:,
|
447
|
+
# payment_failed_at:,
|
448
|
+
# payment_started_at:,
|
449
|
+
# scheduled_issue_at:,
|
450
|
+
# shipping_address:,
|
451
|
+
# status:,
|
452
|
+
# subscription:,
|
453
|
+
# subtotal:,
|
454
|
+
# sync_failed_at:,
|
455
|
+
# total:,
|
456
|
+
# voided_at:,
|
457
|
+
# will_auto_issue:,
|
458
|
+
# **
|
459
|
+
# )
|
460
|
+
# super
|
461
|
+
# end
|
462
|
+
|
463
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
464
|
+
|
465
|
+
# @see Orb::Models::Invoice#auto_collection
|
466
|
+
class AutoCollection < Orb::BaseModel
|
467
|
+
# @!attribute enabled
|
468
|
+
# True only if auto-collection is enabled for this invoice.
|
469
|
+
#
|
470
|
+
# @return [Boolean, nil]
|
471
|
+
required :enabled, Orb::BooleanModel, nil?: true
|
472
|
+
|
473
|
+
# @!attribute next_attempt_at
|
474
|
+
# If the invoice is scheduled for auto-collection, this field will reflect when
|
475
|
+
# the next attempt will occur. If dunning has been exhausted, or auto-collection
|
476
|
+
# is not enabled for this invoice, this field will be `null`.
|
477
|
+
#
|
478
|
+
# @return [Time, nil]
|
479
|
+
required :next_attempt_at, Time, nil?: true
|
480
|
+
|
481
|
+
# @!attribute num_attempts
|
482
|
+
# Number of auto-collection payment attempts.
|
483
|
+
#
|
484
|
+
# @return [Integer, nil]
|
485
|
+
required :num_attempts, Integer, nil?: true
|
486
|
+
|
487
|
+
# @!attribute previously_attempted_at
|
488
|
+
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
489
|
+
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
490
|
+
# this can be used to tell whether the invoice is currently in dunning (that is,
|
491
|
+
# `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or
|
492
|
+
# if dunning has been exhausted (`previously_attempted_at` is non-null, but
|
493
|
+
# `next_attempt_time` is null).
|
494
|
+
#
|
495
|
+
# @return [Time, nil]
|
496
|
+
required :previously_attempted_at, Time, nil?: true
|
497
|
+
|
498
|
+
# @!parse
|
499
|
+
# # @param enabled [Boolean, nil]
|
500
|
+
# # @param next_attempt_at [Time, nil]
|
501
|
+
# # @param num_attempts [Integer, nil]
|
502
|
+
# # @param previously_attempted_at [Time, nil]
|
503
|
+
# #
|
504
|
+
# def initialize(enabled:, next_attempt_at:, num_attempts:, previously_attempted_at:, **) = super
|
505
|
+
|
506
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
507
|
+
end
|
508
|
+
|
509
|
+
# @see Orb::Models::Invoice#billing_address
|
510
|
+
class BillingAddress < Orb::BaseModel
|
511
|
+
# @!attribute city
|
512
|
+
#
|
513
|
+
# @return [String, nil]
|
514
|
+
required :city, String, nil?: true
|
515
|
+
|
516
|
+
# @!attribute country
|
517
|
+
#
|
518
|
+
# @return [String, nil]
|
519
|
+
required :country, String, nil?: true
|
520
|
+
|
521
|
+
# @!attribute line1
|
522
|
+
#
|
523
|
+
# @return [String, nil]
|
524
|
+
required :line1, String, nil?: true
|
525
|
+
|
526
|
+
# @!attribute line2
|
527
|
+
#
|
528
|
+
# @return [String, nil]
|
529
|
+
required :line2, String, nil?: true
|
530
|
+
|
531
|
+
# @!attribute postal_code
|
532
|
+
#
|
533
|
+
# @return [String, nil]
|
534
|
+
required :postal_code, String, nil?: true
|
535
|
+
|
536
|
+
# @!attribute state
|
537
|
+
#
|
538
|
+
# @return [String, nil]
|
539
|
+
required :state, String, nil?: true
|
540
|
+
|
541
|
+
# @!parse
|
542
|
+
# # @param city [String, nil]
|
543
|
+
# # @param country [String, nil]
|
544
|
+
# # @param line1 [String, nil]
|
545
|
+
# # @param line2 [String, nil]
|
546
|
+
# # @param postal_code [String, nil]
|
547
|
+
# # @param state [String, nil]
|
548
|
+
# #
|
549
|
+
# def initialize(city:, country:, line1:, line2:, postal_code:, state:, **) = super
|
550
|
+
|
551
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
552
|
+
end
|
553
|
+
|
554
|
+
class CreditNote < Orb::BaseModel
|
555
|
+
# @!attribute id
|
556
|
+
#
|
557
|
+
# @return [String]
|
558
|
+
required :id, String
|
559
|
+
|
560
|
+
# @!attribute credit_note_number
|
561
|
+
#
|
562
|
+
# @return [String]
|
563
|
+
required :credit_note_number, String
|
564
|
+
|
565
|
+
# @!attribute memo
|
566
|
+
# An optional memo supplied on the credit note.
|
567
|
+
#
|
568
|
+
# @return [String, nil]
|
569
|
+
required :memo, String, nil?: true
|
570
|
+
|
571
|
+
# @!attribute reason
|
572
|
+
#
|
573
|
+
# @return [String]
|
574
|
+
required :reason, String
|
575
|
+
|
576
|
+
# @!attribute total
|
577
|
+
#
|
578
|
+
# @return [String]
|
579
|
+
required :total, String
|
580
|
+
|
581
|
+
# @!attribute type
|
582
|
+
#
|
583
|
+
# @return [String]
|
584
|
+
required :type, String
|
585
|
+
|
586
|
+
# @!attribute voided_at
|
587
|
+
# If the credit note has a status of `void`, this gives a timestamp when the
|
588
|
+
# credit note was voided.
|
589
|
+
#
|
590
|
+
# @return [Time, nil]
|
591
|
+
required :voided_at, Time, nil?: true
|
592
|
+
|
593
|
+
# @!parse
|
594
|
+
# # @param id [String]
|
595
|
+
# # @param credit_note_number [String]
|
596
|
+
# # @param memo [String, nil]
|
597
|
+
# # @param reason [String]
|
598
|
+
# # @param total [String]
|
599
|
+
# # @param type [String]
|
600
|
+
# # @param voided_at [Time, nil]
|
601
|
+
# #
|
602
|
+
# def initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:, **) = super
|
603
|
+
|
604
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
605
|
+
end
|
606
|
+
|
607
|
+
# @see Orb::Models::Invoice#customer
|
608
|
+
class Customer < Orb::BaseModel
|
609
|
+
# @!attribute id
|
610
|
+
#
|
611
|
+
# @return [String]
|
612
|
+
required :id, String
|
613
|
+
|
614
|
+
# @!attribute external_customer_id
|
615
|
+
#
|
616
|
+
# @return [String, nil]
|
617
|
+
required :external_customer_id, String, nil?: true
|
618
|
+
|
619
|
+
# @!parse
|
620
|
+
# # @param id [String]
|
621
|
+
# # @param external_customer_id [String, nil]
|
622
|
+
# #
|
623
|
+
# def initialize(id:, external_customer_id:, **) = super
|
624
|
+
|
625
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
626
|
+
end
|
627
|
+
|
628
|
+
class CustomerBalanceTransaction < Orb::BaseModel
|
629
|
+
# @!attribute id
|
630
|
+
# A unique id for this transaction.
|
631
|
+
#
|
632
|
+
# @return [String]
|
633
|
+
required :id, String
|
634
|
+
|
635
|
+
# @!attribute action
|
636
|
+
#
|
637
|
+
# @return [Symbol, Orb::Models::Invoice::CustomerBalanceTransaction::Action]
|
638
|
+
required :action, enum: -> { Orb::Models::Invoice::CustomerBalanceTransaction::Action }
|
639
|
+
|
640
|
+
# @!attribute amount
|
641
|
+
# The value of the amount changed in the transaction.
|
642
|
+
#
|
643
|
+
# @return [String]
|
644
|
+
required :amount, String
|
645
|
+
|
646
|
+
# @!attribute created_at
|
647
|
+
# The creation time of this transaction.
|
648
|
+
#
|
649
|
+
# @return [Time]
|
650
|
+
required :created_at, Time
|
651
|
+
|
652
|
+
# @!attribute credit_note
|
653
|
+
#
|
654
|
+
# @return [Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote, nil]
|
655
|
+
required :credit_note, -> { Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote }, nil?: true
|
656
|
+
|
657
|
+
# @!attribute description
|
658
|
+
# An optional description provided for manual customer balance adjustments.
|
659
|
+
#
|
660
|
+
# @return [String, nil]
|
661
|
+
required :description, String, nil?: true
|
662
|
+
|
663
|
+
# @!attribute ending_balance
|
664
|
+
# The new value of the customer's balance prior to the transaction, in the
|
665
|
+
# customer's currency.
|
666
|
+
#
|
667
|
+
# @return [String]
|
668
|
+
required :ending_balance, String
|
669
|
+
|
670
|
+
# @!attribute invoice
|
671
|
+
#
|
672
|
+
# @return [Orb::Models::Invoice::CustomerBalanceTransaction::Invoice, nil]
|
673
|
+
required :invoice, -> { Orb::Models::Invoice::CustomerBalanceTransaction::Invoice }, nil?: true
|
674
|
+
|
675
|
+
# @!attribute starting_balance
|
676
|
+
# The original value of the customer's balance prior to the transaction, in the
|
677
|
+
# customer's currency.
|
678
|
+
#
|
679
|
+
# @return [String]
|
680
|
+
required :starting_balance, String
|
681
|
+
|
682
|
+
# @!attribute type
|
683
|
+
#
|
684
|
+
# @return [Symbol, Orb::Models::Invoice::CustomerBalanceTransaction::Type]
|
685
|
+
required :type, enum: -> { Orb::Models::Invoice::CustomerBalanceTransaction::Type }
|
686
|
+
|
687
|
+
# @!parse
|
688
|
+
# # @param id [String]
|
689
|
+
# # @param action [Symbol, Orb::Models::Invoice::CustomerBalanceTransaction::Action]
|
690
|
+
# # @param amount [String]
|
691
|
+
# # @param created_at [Time]
|
692
|
+
# # @param credit_note [Orb::Models::Invoice::CustomerBalanceTransaction::CreditNote, nil]
|
693
|
+
# # @param description [String, nil]
|
694
|
+
# # @param ending_balance [String]
|
695
|
+
# # @param invoice [Orb::Models::Invoice::CustomerBalanceTransaction::Invoice, nil]
|
696
|
+
# # @param starting_balance [String]
|
697
|
+
# # @param type [Symbol, Orb::Models::Invoice::CustomerBalanceTransaction::Type]
|
698
|
+
# #
|
699
|
+
# def initialize(
|
700
|
+
# id:,
|
701
|
+
# action:,
|
702
|
+
# amount:,
|
703
|
+
# created_at:,
|
704
|
+
# credit_note:,
|
705
|
+
# description:,
|
706
|
+
# ending_balance:,
|
707
|
+
# invoice:,
|
708
|
+
# starting_balance:,
|
709
|
+
# type:,
|
710
|
+
# **
|
711
|
+
# )
|
712
|
+
# super
|
713
|
+
# end
|
714
|
+
|
715
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
716
|
+
|
717
|
+
# @see Orb::Models::Invoice::CustomerBalanceTransaction#action
|
718
|
+
module Action
|
719
|
+
extend Orb::Enum
|
720
|
+
|
721
|
+
APPLIED_TO_INVOICE = :applied_to_invoice
|
722
|
+
MANUAL_ADJUSTMENT = :manual_adjustment
|
723
|
+
PRORATED_REFUND = :prorated_refund
|
724
|
+
REVERT_PRORATED_REFUND = :revert_prorated_refund
|
725
|
+
RETURN_FROM_VOIDING = :return_from_voiding
|
726
|
+
CREDIT_NOTE_APPLIED = :credit_note_applied
|
727
|
+
CREDIT_NOTE_VOIDED = :credit_note_voided
|
728
|
+
OVERPAYMENT_REFUND = :overpayment_refund
|
729
|
+
EXTERNAL_PAYMENT = :external_payment
|
730
|
+
|
731
|
+
finalize!
|
732
|
+
|
733
|
+
# @!parse
|
734
|
+
# # @return [Array<Symbol>]
|
735
|
+
# def self.values; end
|
736
|
+
end
|
737
|
+
|
738
|
+
# @see Orb::Models::Invoice::CustomerBalanceTransaction#credit_note
|
739
|
+
class CreditNote < Orb::BaseModel
|
740
|
+
# @!attribute id
|
741
|
+
# The id of the Credit note
|
742
|
+
#
|
743
|
+
# @return [String]
|
744
|
+
required :id, String
|
745
|
+
|
746
|
+
# @!parse
|
747
|
+
# # @param id [String]
|
748
|
+
# #
|
749
|
+
# def initialize(id:, **) = super
|
750
|
+
|
751
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
752
|
+
end
|
753
|
+
|
754
|
+
# @see Orb::Models::Invoice::CustomerBalanceTransaction#invoice
|
755
|
+
class Invoice < Orb::BaseModel
|
756
|
+
# @!attribute id
|
757
|
+
# The Invoice id
|
758
|
+
#
|
759
|
+
# @return [String]
|
760
|
+
required :id, String
|
761
|
+
|
762
|
+
# @!parse
|
763
|
+
# # @param id [String]
|
764
|
+
# #
|
765
|
+
# def initialize(id:, **) = super
|
766
|
+
|
767
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
768
|
+
end
|
769
|
+
|
770
|
+
# @see Orb::Models::Invoice::CustomerBalanceTransaction#type
|
771
|
+
module Type
|
772
|
+
extend Orb::Enum
|
773
|
+
|
774
|
+
INCREMENT = :increment
|
775
|
+
DECREMENT = :decrement
|
776
|
+
|
777
|
+
finalize!
|
778
|
+
|
779
|
+
# @!parse
|
780
|
+
# # @return [Array<Symbol>]
|
781
|
+
# def self.values; end
|
782
|
+
end
|
783
|
+
end
|
784
|
+
|
785
|
+
# @see Orb::Models::Invoice#customer_tax_id
|
786
|
+
class CustomerTaxID < Orb::BaseModel
|
787
|
+
# @!attribute country
|
788
|
+
#
|
789
|
+
# @return [Symbol, Orb::Models::Invoice::CustomerTaxID::Country]
|
790
|
+
required :country, enum: -> { Orb::Models::Invoice::CustomerTaxID::Country }
|
791
|
+
|
792
|
+
# @!attribute type
|
793
|
+
#
|
794
|
+
# @return [Symbol, Orb::Models::Invoice::CustomerTaxID::Type]
|
795
|
+
required :type, enum: -> { Orb::Models::Invoice::CustomerTaxID::Type }
|
796
|
+
|
797
|
+
# @!attribute value
|
798
|
+
#
|
799
|
+
# @return [String]
|
800
|
+
required :value, String
|
801
|
+
|
802
|
+
# @!parse
|
803
|
+
# # Tax IDs are commonly required to be displayed on customer invoices, which are
|
804
|
+
# # added to the headers of invoices.
|
805
|
+
# #
|
806
|
+
# # ### Supported Tax ID Countries and Types
|
807
|
+
# #
|
808
|
+
# # | Country | Type | Description |
|
809
|
+
# # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
|
810
|
+
# # | Andorra | `ad_nrt` | Andorran NRT Number |
|
811
|
+
# # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
|
812
|
+
# # | Australia | `au_abn` | Australian Business Number (AU ABN) |
|
813
|
+
# # | Australia | `au_arn` | Australian Taxation Office Reference Number |
|
814
|
+
# # | Austria | `eu_vat` | European VAT Number |
|
815
|
+
# # | Bahrain | `bh_vat` | Bahraini VAT Number |
|
816
|
+
# # | Belgium | `eu_vat` | European VAT Number |
|
817
|
+
# # | Bolivia | `bo_tin` | Bolivian Tax ID |
|
818
|
+
# # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
|
819
|
+
# # | Brazil | `br_cpf` | Brazilian CPF Number |
|
820
|
+
# # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
|
821
|
+
# # | Bulgaria | `eu_vat` | European VAT Number |
|
822
|
+
# # | Canada | `ca_bn` | Canadian BN |
|
823
|
+
# # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
|
824
|
+
# # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
|
825
|
+
# # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
|
826
|
+
# # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
|
827
|
+
# # | Canada | `ca_qst` | Canadian QST Number (Québec) |
|
828
|
+
# # | Chile | `cl_tin` | Chilean TIN |
|
829
|
+
# # | China | `cn_tin` | Chinese Tax ID |
|
830
|
+
# # | Colombia | `co_nit` | Colombian NIT Number |
|
831
|
+
# # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
|
832
|
+
# # | Croatia | `eu_vat` | European VAT Number |
|
833
|
+
# # | Cyprus | `eu_vat` | European VAT Number |
|
834
|
+
# # | Czech Republic | `eu_vat` | European VAT Number |
|
835
|
+
# # | Denmark | `eu_vat` | European VAT Number |
|
836
|
+
# # | Dominican Republic | `do_rcn` | Dominican RCN Number |
|
837
|
+
# # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
|
838
|
+
# # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
|
839
|
+
# # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
|
840
|
+
# # | Estonia | `eu_vat` | European VAT Number |
|
841
|
+
# # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
842
|
+
# # | Finland | `eu_vat` | European VAT Number |
|
843
|
+
# # | France | `eu_vat` | European VAT Number |
|
844
|
+
# # | Georgia | `ge_vat` | Georgian VAT |
|
845
|
+
# # | Germany | `eu_vat` | European VAT Number |
|
846
|
+
# # | Greece | `eu_vat` | European VAT Number |
|
847
|
+
# # | Hong Kong | `hk_br` | Hong Kong BR Number |
|
848
|
+
# # | Hungary | `eu_vat` | European VAT Number |
|
849
|
+
# # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
|
850
|
+
# # | Iceland | `is_vat` | Icelandic VAT |
|
851
|
+
# # | India | `in_gst` | Indian GST Number |
|
852
|
+
# # | Indonesia | `id_npwp` | Indonesian NPWP Number |
|
853
|
+
# # | Ireland | `eu_vat` | European VAT Number |
|
854
|
+
# # | Israel | `il_vat` | Israel VAT |
|
855
|
+
# # | Italy | `eu_vat` | European VAT Number |
|
856
|
+
# # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
857
|
+
# # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
858
|
+
# # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
859
|
+
# # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
|
860
|
+
# # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
|
861
|
+
# # | Latvia | `eu_vat` | European VAT Number |
|
862
|
+
# # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
|
863
|
+
# # | Lithuania | `eu_vat` | European VAT Number |
|
864
|
+
# # | Luxembourg | `eu_vat` | European VAT Number |
|
865
|
+
# # | Malaysia | `my_frp` | Malaysian FRP Number |
|
866
|
+
# # | Malaysia | `my_itn` | Malaysian ITN |
|
867
|
+
# # | Malaysia | `my_sst` | Malaysian SST Number |
|
868
|
+
# # | Malta | `eu_vat ` | European VAT Number |
|
869
|
+
# # | Mexico | `mx_rfc` | Mexican RFC Number |
|
870
|
+
# # | Netherlands | `eu_vat` | European VAT Number |
|
871
|
+
# # | New Zealand | `nz_gst` | New Zealand GST Number |
|
872
|
+
# # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
|
873
|
+
# # | Norway | `no_vat` | Norwegian VAT Number |
|
874
|
+
# # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
875
|
+
# # | Oman | `om_vat` | Omani VAT Number |
|
876
|
+
# # | Peru | `pe_ruc` | Peruvian RUC Number |
|
877
|
+
# # | Philippines | `ph_tin ` | Philippines Tax Identification Number |
|
878
|
+
# # | Poland | `eu_vat` | European VAT Number |
|
879
|
+
# # | Portugal | `eu_vat` | European VAT Number |
|
880
|
+
# # | Romania | `eu_vat` | European VAT Number |
|
881
|
+
# # | Romania | `ro_tin` | Romanian Tax ID Number |
|
882
|
+
# # | Russia | `ru_inn` | Russian INN |
|
883
|
+
# # | Russia | `ru_kpp` | Russian KPP |
|
884
|
+
# # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
|
885
|
+
# # | Serbia | `rs_pib` | Serbian PIB Number |
|
886
|
+
# # | Singapore | `sg_gst` | Singaporean GST |
|
887
|
+
# # | Singapore | `sg_uen` | Singaporean UEN |
|
888
|
+
# # | Slovakia | `eu_vat` | European VAT Number |
|
889
|
+
# # | Slovenia | `eu_vat` | European VAT Number |
|
890
|
+
# # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
|
891
|
+
# # | South Africa | `za_vat` | South African VAT Number |
|
892
|
+
# # | South Korea | `kr_brn` | Korean BRN |
|
893
|
+
# # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
894
|
+
# # | Spain | `eu_vat` | European VAT Number |
|
895
|
+
# # | Sweden | `eu_vat` | European VAT Number |
|
896
|
+
# # | Switzerland | `ch_vat` | Switzerland VAT Number |
|
897
|
+
# # | Taiwan | `tw_vat` | Taiwanese VAT |
|
898
|
+
# # | Thailand | `th_vat` | Thai VAT |
|
899
|
+
# # | Turkey | `tr_tin` | Turkish Tax Identification Number |
|
900
|
+
# # | Ukraine | `ua_vat` | Ukrainian VAT |
|
901
|
+
# # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
|
902
|
+
# # | United Kingdom | `eu_vat` | Northern Ireland VAT Number |
|
903
|
+
# # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
|
904
|
+
# # | United States | `us_ein` | United States EIN |
|
905
|
+
# # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
|
906
|
+
# # | Venezuela | `ve_rif` | Venezuelan RIF Number |
|
907
|
+
# # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
|
908
|
+
# #
|
909
|
+
# # @param country [Symbol, Orb::Models::Invoice::CustomerTaxID::Country]
|
910
|
+
# # @param type [Symbol, Orb::Models::Invoice::CustomerTaxID::Type]
|
911
|
+
# # @param value [String]
|
912
|
+
# #
|
913
|
+
# def initialize(country:, type:, value:, **) = super
|
914
|
+
|
915
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
916
|
+
|
917
|
+
# @see Orb::Models::Invoice::CustomerTaxID#country
|
918
|
+
module Country
|
919
|
+
extend Orb::Enum
|
920
|
+
|
921
|
+
AD = :AD
|
922
|
+
AE = :AE
|
923
|
+
AR = :AR
|
924
|
+
AT = :AT
|
925
|
+
AU = :AU
|
926
|
+
BE = :BE
|
927
|
+
BG = :BG
|
928
|
+
BH = :BH
|
929
|
+
BO = :BO
|
930
|
+
BR = :BR
|
931
|
+
CA = :CA
|
932
|
+
CH = :CH
|
933
|
+
CL = :CL
|
934
|
+
CN = :CN
|
935
|
+
CO = :CO
|
936
|
+
CR = :CR
|
937
|
+
CY = :CY
|
938
|
+
CZ = :CZ
|
939
|
+
DE = :DE
|
940
|
+
DK = :DK
|
941
|
+
EE = :EE
|
942
|
+
DO = :DO
|
943
|
+
EC = :EC
|
944
|
+
EG = :EG
|
945
|
+
ES = :ES
|
946
|
+
EU = :EU
|
947
|
+
FI = :FI
|
948
|
+
FR = :FR
|
949
|
+
GB = :GB
|
950
|
+
GE = :GE
|
951
|
+
GR = :GR
|
952
|
+
HK = :HK
|
953
|
+
HR = :HR
|
954
|
+
HU = :HU
|
955
|
+
ID = :ID
|
956
|
+
IE = :IE
|
957
|
+
IL = :IL
|
958
|
+
IN = :IN
|
959
|
+
IS = :IS
|
960
|
+
IT = :IT
|
961
|
+
JP = :JP
|
962
|
+
KE = :KE
|
963
|
+
KR = :KR
|
964
|
+
KZ = :KZ
|
965
|
+
LI = :LI
|
966
|
+
LT = :LT
|
967
|
+
LU = :LU
|
968
|
+
LV = :LV
|
969
|
+
MT = :MT
|
970
|
+
MX = :MX
|
971
|
+
MY = :MY
|
972
|
+
NG = :NG
|
973
|
+
NL = :NL
|
974
|
+
NO = :NO
|
975
|
+
NZ = :NZ
|
976
|
+
OM = :OM
|
977
|
+
PE = :PE
|
978
|
+
PH = :PH
|
979
|
+
PL = :PL
|
980
|
+
PT = :PT
|
981
|
+
RO = :RO
|
982
|
+
RS = :RS
|
983
|
+
RU = :RU
|
984
|
+
SA = :SA
|
985
|
+
SE = :SE
|
986
|
+
SG = :SG
|
987
|
+
SI = :SI
|
988
|
+
SK = :SK
|
989
|
+
SV = :SV
|
990
|
+
TH = :TH
|
991
|
+
TR = :TR
|
992
|
+
TW = :TW
|
993
|
+
UA = :UA
|
994
|
+
US = :US
|
995
|
+
UY = :UY
|
996
|
+
VE = :VE
|
997
|
+
VN = :VN
|
998
|
+
ZA = :ZA
|
999
|
+
|
1000
|
+
finalize!
|
1001
|
+
|
1002
|
+
# @!parse
|
1003
|
+
# # @return [Array<Symbol>]
|
1004
|
+
# def self.values; end
|
1005
|
+
end
|
1006
|
+
|
1007
|
+
# @see Orb::Models::Invoice::CustomerTaxID#type
|
1008
|
+
module Type
|
1009
|
+
extend Orb::Enum
|
1010
|
+
|
1011
|
+
AD_NRT = :ad_nrt
|
1012
|
+
AE_TRN = :ae_trn
|
1013
|
+
AR_CUIT = :ar_cuit
|
1014
|
+
EU_VAT = :eu_vat
|
1015
|
+
AU_ABN = :au_abn
|
1016
|
+
AU_ARN = :au_arn
|
1017
|
+
BG_UIC = :bg_uic
|
1018
|
+
BH_VAT = :bh_vat
|
1019
|
+
BO_TIN = :bo_tin
|
1020
|
+
BR_CNPJ = :br_cnpj
|
1021
|
+
BR_CPF = :br_cpf
|
1022
|
+
CA_BN = :ca_bn
|
1023
|
+
CA_GST_HST = :ca_gst_hst
|
1024
|
+
CA_PST_BC = :ca_pst_bc
|
1025
|
+
CA_PST_MB = :ca_pst_mb
|
1026
|
+
CA_PST_SK = :ca_pst_sk
|
1027
|
+
CA_QST = :ca_qst
|
1028
|
+
CH_VAT = :ch_vat
|
1029
|
+
CL_TIN = :cl_tin
|
1030
|
+
CN_TIN = :cn_tin
|
1031
|
+
CO_NIT = :co_nit
|
1032
|
+
CR_TIN = :cr_tin
|
1033
|
+
DO_RCN = :do_rcn
|
1034
|
+
EC_RUC = :ec_ruc
|
1035
|
+
EG_TIN = :eg_tin
|
1036
|
+
ES_CIF = :es_cif
|
1037
|
+
EU_OSS_VAT = :eu_oss_vat
|
1038
|
+
GB_VAT = :gb_vat
|
1039
|
+
GE_VAT = :ge_vat
|
1040
|
+
HK_BR = :hk_br
|
1041
|
+
HU_TIN = :hu_tin
|
1042
|
+
ID_NPWP = :id_npwp
|
1043
|
+
IL_VAT = :il_vat
|
1044
|
+
IN_GST = :in_gst
|
1045
|
+
IS_VAT = :is_vat
|
1046
|
+
JP_CN = :jp_cn
|
1047
|
+
JP_RN = :jp_rn
|
1048
|
+
JP_TRN = :jp_trn
|
1049
|
+
KE_PIN = :ke_pin
|
1050
|
+
KR_BRN = :kr_brn
|
1051
|
+
KZ_BIN = :kz_bin
|
1052
|
+
LI_UID = :li_uid
|
1053
|
+
MX_RFC = :mx_rfc
|
1054
|
+
MY_FRP = :my_frp
|
1055
|
+
MY_ITN = :my_itn
|
1056
|
+
MY_SST = :my_sst
|
1057
|
+
NG_TIN = :ng_tin
|
1058
|
+
NO_VAT = :no_vat
|
1059
|
+
NO_VOEC = :no_voec
|
1060
|
+
NZ_GST = :nz_gst
|
1061
|
+
OM_VAT = :om_vat
|
1062
|
+
PE_RUC = :pe_ruc
|
1063
|
+
PH_TIN = :ph_tin
|
1064
|
+
RO_TIN = :ro_tin
|
1065
|
+
RS_PIB = :rs_pib
|
1066
|
+
RU_INN = :ru_inn
|
1067
|
+
RU_KPP = :ru_kpp
|
1068
|
+
SA_VAT = :sa_vat
|
1069
|
+
SG_GST = :sg_gst
|
1070
|
+
SG_UEN = :sg_uen
|
1071
|
+
SI_TIN = :si_tin
|
1072
|
+
SV_NIT = :sv_nit
|
1073
|
+
TH_VAT = :th_vat
|
1074
|
+
TR_TIN = :tr_tin
|
1075
|
+
TW_VAT = :tw_vat
|
1076
|
+
UA_VAT = :ua_vat
|
1077
|
+
US_EIN = :us_ein
|
1078
|
+
UY_RUC = :uy_ruc
|
1079
|
+
VE_RIF = :ve_rif
|
1080
|
+
VN_TIN = :vn_tin
|
1081
|
+
ZA_VAT = :za_vat
|
1082
|
+
|
1083
|
+
finalize!
|
1084
|
+
|
1085
|
+
# @!parse
|
1086
|
+
# # @return [Array<Symbol>]
|
1087
|
+
# def self.values; end
|
1088
|
+
end
|
1089
|
+
end
|
1090
|
+
|
1091
|
+
# @see Orb::Models::Invoice#invoice_source
|
1092
|
+
module InvoiceSource
|
1093
|
+
extend Orb::Enum
|
1094
|
+
|
1095
|
+
SUBSCRIPTION = :subscription
|
1096
|
+
PARTIAL = :partial
|
1097
|
+
ONE_OFF = :one_off
|
1098
|
+
|
1099
|
+
finalize!
|
1100
|
+
|
1101
|
+
# @!parse
|
1102
|
+
# # @return [Array<Symbol>]
|
1103
|
+
# def self.values; end
|
1104
|
+
end
|
1105
|
+
|
1106
|
+
class LineItem < Orb::BaseModel
|
1107
|
+
# @!attribute id
|
1108
|
+
# A unique ID for this line item.
|
1109
|
+
#
|
1110
|
+
# @return [String]
|
1111
|
+
required :id, String
|
1112
|
+
|
1113
|
+
# @!attribute adjusted_subtotal
|
1114
|
+
# The line amount after any adjustments and before overage conversion, credits and
|
1115
|
+
# partial invoicing.
|
1116
|
+
#
|
1117
|
+
# @return [String]
|
1118
|
+
required :adjusted_subtotal, String
|
1119
|
+
|
1120
|
+
# @!attribute adjustments
|
1121
|
+
# All adjustments applied to the line item in the order they were applied based on
|
1122
|
+
# invoice calculations (ie. usage discounts -> amount discounts -> percentage
|
1123
|
+
# discounts -> minimums -> maximums).
|
1124
|
+
#
|
1125
|
+
# @return [Array<Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment>]
|
1126
|
+
required :adjustments, -> { Orb::ArrayOf[union: Orb::Models::Invoice::LineItem::Adjustment] }
|
1127
|
+
|
1128
|
+
# @!attribute amount
|
1129
|
+
# The final amount for a line item after all adjustments and pre paid credits have
|
1130
|
+
# been applied.
|
1131
|
+
#
|
1132
|
+
# @return [String]
|
1133
|
+
required :amount, String
|
1134
|
+
|
1135
|
+
# @!attribute credits_applied
|
1136
|
+
# The number of prepaid credits applied.
|
1137
|
+
#
|
1138
|
+
# @return [String]
|
1139
|
+
required :credits_applied, String
|
1140
|
+
|
1141
|
+
# @!attribute discount
|
1142
|
+
#
|
1143
|
+
# @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil]
|
1144
|
+
required :discount, union: -> { Orb::Models::Discount }, nil?: true
|
1145
|
+
|
1146
|
+
# @!attribute end_date
|
1147
|
+
# The end date of the range of time applied for this line item's price.
|
1148
|
+
#
|
1149
|
+
# @return [Time]
|
1150
|
+
required :end_date, Time
|
1151
|
+
|
1152
|
+
# @!attribute filter
|
1153
|
+
# An additional filter that was used to calculate the usage for this line item.
|
1154
|
+
#
|
1155
|
+
# @return [String, nil]
|
1156
|
+
required :filter, String, nil?: true
|
1157
|
+
|
1158
|
+
# @!attribute grouping
|
1159
|
+
# [DEPRECATED] For configured prices that are split by a grouping key, this will
|
1160
|
+
# be populated with the key and a value. The `amount` and `subtotal` will be the
|
1161
|
+
# values for this particular grouping.
|
1162
|
+
#
|
1163
|
+
# @return [String, nil]
|
1164
|
+
required :grouping, String, nil?: true
|
1165
|
+
|
1166
|
+
# @!attribute maximum
|
1167
|
+
# This field is deprecated in favor of `adjustments`.
|
1168
|
+
#
|
1169
|
+
# @return [Orb::Models::Invoice::LineItem::Maximum, nil]
|
1170
|
+
required :maximum, -> { Orb::Models::Invoice::LineItem::Maximum }, nil?: true
|
1171
|
+
|
1172
|
+
# @!attribute maximum_amount
|
1173
|
+
# This field is deprecated in favor of `adjustments`.
|
1174
|
+
#
|
1175
|
+
# @return [String, nil]
|
1176
|
+
required :maximum_amount, String, nil?: true
|
1177
|
+
|
1178
|
+
# @!attribute minimum
|
1179
|
+
# This field is deprecated in favor of `adjustments`.
|
1180
|
+
#
|
1181
|
+
# @return [Orb::Models::Invoice::LineItem::Minimum, nil]
|
1182
|
+
required :minimum, -> { Orb::Models::Invoice::LineItem::Minimum }, nil?: true
|
1183
|
+
|
1184
|
+
# @!attribute minimum_amount
|
1185
|
+
# This field is deprecated in favor of `adjustments`.
|
1186
|
+
#
|
1187
|
+
# @return [String, nil]
|
1188
|
+
required :minimum_amount, String, nil?: true
|
1189
|
+
|
1190
|
+
# @!attribute name
|
1191
|
+
# The name of the price associated with this line item.
|
1192
|
+
#
|
1193
|
+
# @return [String]
|
1194
|
+
required :name, String
|
1195
|
+
|
1196
|
+
# @!attribute partially_invoiced_amount
|
1197
|
+
# Any amount applied from a partial invoice
|
1198
|
+
#
|
1199
|
+
# @return [String]
|
1200
|
+
required :partially_invoiced_amount, String
|
1201
|
+
|
1202
|
+
# @!attribute price
|
1203
|
+
# The Price resource represents a price that can be billed on a subscription,
|
1204
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
1205
|
+
# take a quantity and determine an amount to bill.
|
1206
|
+
#
|
1207
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
1208
|
+
# is serialized differently in a given Price object. The model_type field
|
1209
|
+
# determines the key for the configuration object that is present.
|
1210
|
+
#
|
1211
|
+
# For more on the types of prices, see
|
1212
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1213
|
+
#
|
1214
|
+
# @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice, nil]
|
1215
|
+
required :price, union: -> { Orb::Models::Price }, nil?: true
|
1216
|
+
|
1217
|
+
# @!attribute quantity
|
1218
|
+
# Either the fixed fee quantity or the usage during the service period.
|
1219
|
+
#
|
1220
|
+
# @return [Float]
|
1221
|
+
required :quantity, Float
|
1222
|
+
|
1223
|
+
# @!attribute start_date
|
1224
|
+
# The start date of the range of time applied for this line item's price.
|
1225
|
+
#
|
1226
|
+
# @return [Time]
|
1227
|
+
required :start_date, Time
|
1228
|
+
|
1229
|
+
# @!attribute sub_line_items
|
1230
|
+
# For complex pricing structures, the line item can be broken down further in
|
1231
|
+
# `sub_line_items`.
|
1232
|
+
#
|
1233
|
+
# @return [Array<Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem>]
|
1234
|
+
required :sub_line_items, -> { Orb::ArrayOf[union: Orb::Models::Invoice::LineItem::SubLineItem] }
|
1235
|
+
|
1236
|
+
# @!attribute subtotal
|
1237
|
+
# The line amount before before any adjustments.
|
1238
|
+
#
|
1239
|
+
# @return [String]
|
1240
|
+
required :subtotal, String
|
1241
|
+
|
1242
|
+
# @!attribute tax_amounts
|
1243
|
+
# An array of tax rates and their incurred tax amounts. Empty if no tax
|
1244
|
+
# integration is configured.
|
1245
|
+
#
|
1246
|
+
# @return [Array<Orb::Models::Invoice::LineItem::TaxAmount>]
|
1247
|
+
required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::Invoice::LineItem::TaxAmount] }
|
1248
|
+
|
1249
|
+
# @!attribute usage_customer_ids
|
1250
|
+
# A list of customer ids that were used to calculate the usage for this line item.
|
1251
|
+
#
|
1252
|
+
# @return [Array<String>, nil]
|
1253
|
+
required :usage_customer_ids, Orb::ArrayOf[String], nil?: true
|
1254
|
+
|
1255
|
+
# @!parse
|
1256
|
+
# # @param id [String]
|
1257
|
+
# # @param adjusted_subtotal [String]
|
1258
|
+
# # @param adjustments [Array<Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment>]
|
1259
|
+
# # @param amount [String]
|
1260
|
+
# # @param credits_applied [String]
|
1261
|
+
# # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil]
|
1262
|
+
# # @param end_date [Time]
|
1263
|
+
# # @param filter [String, nil]
|
1264
|
+
# # @param grouping [String, nil]
|
1265
|
+
# # @param maximum [Orb::Models::Invoice::LineItem::Maximum, nil]
|
1266
|
+
# # @param maximum_amount [String, nil]
|
1267
|
+
# # @param minimum [Orb::Models::Invoice::LineItem::Minimum, nil]
|
1268
|
+
# # @param minimum_amount [String, nil]
|
1269
|
+
# # @param name [String]
|
1270
|
+
# # @param partially_invoiced_amount [String]
|
1271
|
+
# # @param price [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice, nil]
|
1272
|
+
# # @param quantity [Float]
|
1273
|
+
# # @param start_date [Time]
|
1274
|
+
# # @param sub_line_items [Array<Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem>]
|
1275
|
+
# # @param subtotal [String]
|
1276
|
+
# # @param tax_amounts [Array<Orb::Models::Invoice::LineItem::TaxAmount>]
|
1277
|
+
# # @param usage_customer_ids [Array<String>, nil]
|
1278
|
+
# #
|
1279
|
+
# def initialize(
|
1280
|
+
# id:,
|
1281
|
+
# adjusted_subtotal:,
|
1282
|
+
# adjustments:,
|
1283
|
+
# amount:,
|
1284
|
+
# credits_applied:,
|
1285
|
+
# discount:,
|
1286
|
+
# end_date:,
|
1287
|
+
# filter:,
|
1288
|
+
# grouping:,
|
1289
|
+
# maximum:,
|
1290
|
+
# maximum_amount:,
|
1291
|
+
# minimum:,
|
1292
|
+
# minimum_amount:,
|
1293
|
+
# name:,
|
1294
|
+
# partially_invoiced_amount:,
|
1295
|
+
# price:,
|
1296
|
+
# quantity:,
|
1297
|
+
# start_date:,
|
1298
|
+
# sub_line_items:,
|
1299
|
+
# subtotal:,
|
1300
|
+
# tax_amounts:,
|
1301
|
+
# usage_customer_ids:,
|
1302
|
+
# **
|
1303
|
+
# )
|
1304
|
+
# super
|
1305
|
+
# end
|
1306
|
+
|
1307
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1308
|
+
|
1309
|
+
module Adjustment
|
1310
|
+
extend Orb::Union
|
1311
|
+
|
1312
|
+
discriminator :adjustment_type
|
1313
|
+
|
1314
|
+
variant :usage_discount,
|
1315
|
+
-> { Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment }
|
1316
|
+
|
1317
|
+
variant :amount_discount,
|
1318
|
+
-> { Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment }
|
1319
|
+
|
1320
|
+
variant :percentage_discount,
|
1321
|
+
-> { Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment }
|
1322
|
+
|
1323
|
+
variant :minimum, -> { Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment }
|
1324
|
+
|
1325
|
+
variant :maximum, -> { Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment }
|
1326
|
+
|
1327
|
+
class MonetaryUsageDiscountAdjustment < Orb::BaseModel
|
1328
|
+
# @!attribute id
|
1329
|
+
#
|
1330
|
+
# @return [String]
|
1331
|
+
required :id, String
|
1332
|
+
|
1333
|
+
# @!attribute adjustment_type
|
1334
|
+
#
|
1335
|
+
# @return [Symbol, :usage_discount]
|
1336
|
+
required :adjustment_type, const: :usage_discount
|
1337
|
+
|
1338
|
+
# @!attribute amount
|
1339
|
+
# The value applied by an adjustment.
|
1340
|
+
#
|
1341
|
+
# @return [String]
|
1342
|
+
required :amount, String
|
1343
|
+
|
1344
|
+
# @!attribute applies_to_price_ids
|
1345
|
+
# The price IDs that this adjustment applies to.
|
1346
|
+
#
|
1347
|
+
# @return [Array<String>]
|
1348
|
+
required :applies_to_price_ids, Orb::ArrayOf[String]
|
1349
|
+
|
1350
|
+
# @!attribute is_invoice_level
|
1351
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
1352
|
+
# that apply to only one price.
|
1353
|
+
#
|
1354
|
+
# @return [Boolean]
|
1355
|
+
required :is_invoice_level, Orb::BooleanModel
|
1356
|
+
|
1357
|
+
# @!attribute reason
|
1358
|
+
# The reason for the adjustment.
|
1359
|
+
#
|
1360
|
+
# @return [String, nil]
|
1361
|
+
required :reason, String, nil?: true
|
1362
|
+
|
1363
|
+
# @!attribute usage_discount
|
1364
|
+
# The number of usage units by which to discount the price this adjustment applies
|
1365
|
+
# to in a given billing period.
|
1366
|
+
#
|
1367
|
+
# @return [Float]
|
1368
|
+
required :usage_discount, Float
|
1369
|
+
|
1370
|
+
# @!parse
|
1371
|
+
# # @param id [String]
|
1372
|
+
# # @param amount [String]
|
1373
|
+
# # @param applies_to_price_ids [Array<String>]
|
1374
|
+
# # @param is_invoice_level [Boolean]
|
1375
|
+
# # @param reason [String, nil]
|
1376
|
+
# # @param usage_discount [Float]
|
1377
|
+
# # @param adjustment_type [Symbol, :usage_discount]
|
1378
|
+
# #
|
1379
|
+
# def initialize(
|
1380
|
+
# id:,
|
1381
|
+
# amount:,
|
1382
|
+
# applies_to_price_ids:,
|
1383
|
+
# is_invoice_level:,
|
1384
|
+
# reason:,
|
1385
|
+
# usage_discount:,
|
1386
|
+
# adjustment_type: :usage_discount,
|
1387
|
+
# **
|
1388
|
+
# )
|
1389
|
+
# super
|
1390
|
+
# end
|
1391
|
+
|
1392
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1393
|
+
end
|
1394
|
+
|
1395
|
+
class MonetaryAmountDiscountAdjustment < Orb::BaseModel
|
1396
|
+
# @!attribute id
|
1397
|
+
#
|
1398
|
+
# @return [String]
|
1399
|
+
required :id, String
|
1400
|
+
|
1401
|
+
# @!attribute adjustment_type
|
1402
|
+
#
|
1403
|
+
# @return [Symbol, :amount_discount]
|
1404
|
+
required :adjustment_type, const: :amount_discount
|
1405
|
+
|
1406
|
+
# @!attribute amount
|
1407
|
+
# The value applied by an adjustment.
|
1408
|
+
#
|
1409
|
+
# @return [String]
|
1410
|
+
required :amount, String
|
1411
|
+
|
1412
|
+
# @!attribute amount_discount
|
1413
|
+
# The amount by which to discount the prices this adjustment applies to in a given
|
1414
|
+
# billing period.
|
1415
|
+
#
|
1416
|
+
# @return [String]
|
1417
|
+
required :amount_discount, String
|
1418
|
+
|
1419
|
+
# @!attribute applies_to_price_ids
|
1420
|
+
# The price IDs that this adjustment applies to.
|
1421
|
+
#
|
1422
|
+
# @return [Array<String>]
|
1423
|
+
required :applies_to_price_ids, Orb::ArrayOf[String]
|
1424
|
+
|
1425
|
+
# @!attribute is_invoice_level
|
1426
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
1427
|
+
# that apply to only one price.
|
1428
|
+
#
|
1429
|
+
# @return [Boolean]
|
1430
|
+
required :is_invoice_level, Orb::BooleanModel
|
1431
|
+
|
1432
|
+
# @!attribute reason
|
1433
|
+
# The reason for the adjustment.
|
1434
|
+
#
|
1435
|
+
# @return [String, nil]
|
1436
|
+
required :reason, String, nil?: true
|
1437
|
+
|
1438
|
+
# @!parse
|
1439
|
+
# # @param id [String]
|
1440
|
+
# # @param amount [String]
|
1441
|
+
# # @param amount_discount [String]
|
1442
|
+
# # @param applies_to_price_ids [Array<String>]
|
1443
|
+
# # @param is_invoice_level [Boolean]
|
1444
|
+
# # @param reason [String, nil]
|
1445
|
+
# # @param adjustment_type [Symbol, :amount_discount]
|
1446
|
+
# #
|
1447
|
+
# def initialize(
|
1448
|
+
# id:,
|
1449
|
+
# amount:,
|
1450
|
+
# amount_discount:,
|
1451
|
+
# applies_to_price_ids:,
|
1452
|
+
# is_invoice_level:,
|
1453
|
+
# reason:,
|
1454
|
+
# adjustment_type: :amount_discount,
|
1455
|
+
# **
|
1456
|
+
# )
|
1457
|
+
# super
|
1458
|
+
# end
|
1459
|
+
|
1460
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1461
|
+
end
|
1462
|
+
|
1463
|
+
class MonetaryPercentageDiscountAdjustment < Orb::BaseModel
|
1464
|
+
# @!attribute id
|
1465
|
+
#
|
1466
|
+
# @return [String]
|
1467
|
+
required :id, String
|
1468
|
+
|
1469
|
+
# @!attribute adjustment_type
|
1470
|
+
#
|
1471
|
+
# @return [Symbol, :percentage_discount]
|
1472
|
+
required :adjustment_type, const: :percentage_discount
|
1473
|
+
|
1474
|
+
# @!attribute amount
|
1475
|
+
# The value applied by an adjustment.
|
1476
|
+
#
|
1477
|
+
# @return [String]
|
1478
|
+
required :amount, String
|
1479
|
+
|
1480
|
+
# @!attribute applies_to_price_ids
|
1481
|
+
# The price IDs that this adjustment applies to.
|
1482
|
+
#
|
1483
|
+
# @return [Array<String>]
|
1484
|
+
required :applies_to_price_ids, Orb::ArrayOf[String]
|
1485
|
+
|
1486
|
+
# @!attribute is_invoice_level
|
1487
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
1488
|
+
# that apply to only one price.
|
1489
|
+
#
|
1490
|
+
# @return [Boolean]
|
1491
|
+
required :is_invoice_level, Orb::BooleanModel
|
1492
|
+
|
1493
|
+
# @!attribute percentage_discount
|
1494
|
+
# The percentage (as a value between 0 and 1) by which to discount the price
|
1495
|
+
# intervals this adjustment applies to in a given billing period.
|
1496
|
+
#
|
1497
|
+
# @return [Float]
|
1498
|
+
required :percentage_discount, Float
|
1499
|
+
|
1500
|
+
# @!attribute reason
|
1501
|
+
# The reason for the adjustment.
|
1502
|
+
#
|
1503
|
+
# @return [String, nil]
|
1504
|
+
required :reason, String, nil?: true
|
1505
|
+
|
1506
|
+
# @!parse
|
1507
|
+
# # @param id [String]
|
1508
|
+
# # @param amount [String]
|
1509
|
+
# # @param applies_to_price_ids [Array<String>]
|
1510
|
+
# # @param is_invoice_level [Boolean]
|
1511
|
+
# # @param percentage_discount [Float]
|
1512
|
+
# # @param reason [String, nil]
|
1513
|
+
# # @param adjustment_type [Symbol, :percentage_discount]
|
1514
|
+
# #
|
1515
|
+
# def initialize(
|
1516
|
+
# id:,
|
1517
|
+
# amount:,
|
1518
|
+
# applies_to_price_ids:,
|
1519
|
+
# is_invoice_level:,
|
1520
|
+
# percentage_discount:,
|
1521
|
+
# reason:,
|
1522
|
+
# adjustment_type: :percentage_discount,
|
1523
|
+
# **
|
1524
|
+
# )
|
1525
|
+
# super
|
1526
|
+
# end
|
1527
|
+
|
1528
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1529
|
+
end
|
1530
|
+
|
1531
|
+
class MonetaryMinimumAdjustment < Orb::BaseModel
|
1532
|
+
# @!attribute id
|
1533
|
+
#
|
1534
|
+
# @return [String]
|
1535
|
+
required :id, String
|
1536
|
+
|
1537
|
+
# @!attribute adjustment_type
|
1538
|
+
#
|
1539
|
+
# @return [Symbol, :minimum]
|
1540
|
+
required :adjustment_type, const: :minimum
|
1541
|
+
|
1542
|
+
# @!attribute amount
|
1543
|
+
# The value applied by an adjustment.
|
1544
|
+
#
|
1545
|
+
# @return [String]
|
1546
|
+
required :amount, String
|
1547
|
+
|
1548
|
+
# @!attribute applies_to_price_ids
|
1549
|
+
# The price IDs that this adjustment applies to.
|
1550
|
+
#
|
1551
|
+
# @return [Array<String>]
|
1552
|
+
required :applies_to_price_ids, Orb::ArrayOf[String]
|
1553
|
+
|
1554
|
+
# @!attribute is_invoice_level
|
1555
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
1556
|
+
# that apply to only one price.
|
1557
|
+
#
|
1558
|
+
# @return [Boolean]
|
1559
|
+
required :is_invoice_level, Orb::BooleanModel
|
1560
|
+
|
1561
|
+
# @!attribute item_id
|
1562
|
+
# The item ID that revenue from this minimum will be attributed to.
|
1563
|
+
#
|
1564
|
+
# @return [String]
|
1565
|
+
required :item_id, String
|
1566
|
+
|
1567
|
+
# @!attribute minimum_amount
|
1568
|
+
# The minimum amount to charge in a given billing period for the prices this
|
1569
|
+
# adjustment applies to.
|
1570
|
+
#
|
1571
|
+
# @return [String]
|
1572
|
+
required :minimum_amount, String
|
1573
|
+
|
1574
|
+
# @!attribute reason
|
1575
|
+
# The reason for the adjustment.
|
1576
|
+
#
|
1577
|
+
# @return [String, nil]
|
1578
|
+
required :reason, String, nil?: true
|
1579
|
+
|
1580
|
+
# @!parse
|
1581
|
+
# # @param id [String]
|
1582
|
+
# # @param amount [String]
|
1583
|
+
# # @param applies_to_price_ids [Array<String>]
|
1584
|
+
# # @param is_invoice_level [Boolean]
|
1585
|
+
# # @param item_id [String]
|
1586
|
+
# # @param minimum_amount [String]
|
1587
|
+
# # @param reason [String, nil]
|
1588
|
+
# # @param adjustment_type [Symbol, :minimum]
|
1589
|
+
# #
|
1590
|
+
# def initialize(
|
1591
|
+
# id:,
|
1592
|
+
# amount:,
|
1593
|
+
# applies_to_price_ids:,
|
1594
|
+
# is_invoice_level:,
|
1595
|
+
# item_id:,
|
1596
|
+
# minimum_amount:,
|
1597
|
+
# reason:,
|
1598
|
+
# adjustment_type: :minimum,
|
1599
|
+
# **
|
1600
|
+
# )
|
1601
|
+
# super
|
1602
|
+
# end
|
1603
|
+
|
1604
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
class MonetaryMaximumAdjustment < Orb::BaseModel
|
1608
|
+
# @!attribute id
|
1609
|
+
#
|
1610
|
+
# @return [String]
|
1611
|
+
required :id, String
|
1612
|
+
|
1613
|
+
# @!attribute adjustment_type
|
1614
|
+
#
|
1615
|
+
# @return [Symbol, :maximum]
|
1616
|
+
required :adjustment_type, const: :maximum
|
1617
|
+
|
1618
|
+
# @!attribute amount
|
1619
|
+
# The value applied by an adjustment.
|
1620
|
+
#
|
1621
|
+
# @return [String]
|
1622
|
+
required :amount, String
|
1623
|
+
|
1624
|
+
# @!attribute applies_to_price_ids
|
1625
|
+
# The price IDs that this adjustment applies to.
|
1626
|
+
#
|
1627
|
+
# @return [Array<String>]
|
1628
|
+
required :applies_to_price_ids, Orb::ArrayOf[String]
|
1629
|
+
|
1630
|
+
# @!attribute is_invoice_level
|
1631
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
1632
|
+
# that apply to only one price.
|
1633
|
+
#
|
1634
|
+
# @return [Boolean]
|
1635
|
+
required :is_invoice_level, Orb::BooleanModel
|
1636
|
+
|
1637
|
+
# @!attribute maximum_amount
|
1638
|
+
# The maximum amount to charge in a given billing period for the prices this
|
1639
|
+
# adjustment applies to.
|
1640
|
+
#
|
1641
|
+
# @return [String]
|
1642
|
+
required :maximum_amount, String
|
1643
|
+
|
1644
|
+
# @!attribute reason
|
1645
|
+
# The reason for the adjustment.
|
1646
|
+
#
|
1647
|
+
# @return [String, nil]
|
1648
|
+
required :reason, String, nil?: true
|
1649
|
+
|
1650
|
+
# @!parse
|
1651
|
+
# # @param id [String]
|
1652
|
+
# # @param amount [String]
|
1653
|
+
# # @param applies_to_price_ids [Array<String>]
|
1654
|
+
# # @param is_invoice_level [Boolean]
|
1655
|
+
# # @param maximum_amount [String]
|
1656
|
+
# # @param reason [String, nil]
|
1657
|
+
# # @param adjustment_type [Symbol, :maximum]
|
1658
|
+
# #
|
1659
|
+
# def initialize(
|
1660
|
+
# id:,
|
1661
|
+
# amount:,
|
1662
|
+
# applies_to_price_ids:,
|
1663
|
+
# is_invoice_level:,
|
1664
|
+
# maximum_amount:,
|
1665
|
+
# reason:,
|
1666
|
+
# adjustment_type: :maximum,
|
1667
|
+
# **
|
1668
|
+
# )
|
1669
|
+
# super
|
1670
|
+
# end
|
1671
|
+
|
1672
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1673
|
+
end
|
1674
|
+
|
1675
|
+
# @!parse
|
1676
|
+
# # @return [Array(Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment)]
|
1677
|
+
# def self.variants; end
|
1678
|
+
end
|
1679
|
+
|
1680
|
+
# @deprecated
|
1681
|
+
#
|
1682
|
+
# @see Orb::Models::Invoice::LineItem#maximum
|
1683
|
+
class Maximum < Orb::BaseModel
|
1684
|
+
# @!attribute applies_to_price_ids
|
1685
|
+
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
1686
|
+
# maximums, this can be a subset of prices.
|
1687
|
+
#
|
1688
|
+
# @return [Array<String>]
|
1689
|
+
required :applies_to_price_ids, Orb::ArrayOf[String]
|
1690
|
+
|
1691
|
+
# @!attribute maximum_amount
|
1692
|
+
# Maximum amount applied
|
1693
|
+
#
|
1694
|
+
# @return [String]
|
1695
|
+
required :maximum_amount, String
|
1696
|
+
|
1697
|
+
# @!parse
|
1698
|
+
# # This field is deprecated in favor of `adjustments`.
|
1699
|
+
# #
|
1700
|
+
# # @param applies_to_price_ids [Array<String>]
|
1701
|
+
# # @param maximum_amount [String]
|
1702
|
+
# #
|
1703
|
+
# def initialize(applies_to_price_ids:, maximum_amount:, **) = super
|
1704
|
+
|
1705
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1706
|
+
end
|
1707
|
+
|
1708
|
+
# @deprecated
|
1709
|
+
#
|
1710
|
+
# @see Orb::Models::Invoice::LineItem#minimum
|
1711
|
+
class Minimum < Orb::BaseModel
|
1712
|
+
# @!attribute applies_to_price_ids
|
1713
|
+
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
1714
|
+
# minimums, this can be a subset of prices.
|
1715
|
+
#
|
1716
|
+
# @return [Array<String>]
|
1717
|
+
required :applies_to_price_ids, Orb::ArrayOf[String]
|
1718
|
+
|
1719
|
+
# @!attribute minimum_amount
|
1720
|
+
# Minimum amount applied
|
1721
|
+
#
|
1722
|
+
# @return [String]
|
1723
|
+
required :minimum_amount, String
|
1724
|
+
|
1725
|
+
# @!parse
|
1726
|
+
# # This field is deprecated in favor of `adjustments`.
|
1727
|
+
# #
|
1728
|
+
# # @param applies_to_price_ids [Array<String>]
|
1729
|
+
# # @param minimum_amount [String]
|
1730
|
+
# #
|
1731
|
+
# def initialize(applies_to_price_ids:, minimum_amount:, **) = super
|
1732
|
+
|
1733
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1734
|
+
end
|
1735
|
+
|
1736
|
+
module SubLineItem
|
1737
|
+
extend Orb::Union
|
1738
|
+
|
1739
|
+
discriminator :type
|
1740
|
+
|
1741
|
+
variant :matrix, -> { Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem }
|
1742
|
+
|
1743
|
+
variant :tier, -> { Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem }
|
1744
|
+
|
1745
|
+
variant :"'null'", -> { Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem }
|
1746
|
+
|
1747
|
+
class MatrixSubLineItem < Orb::BaseModel
|
1748
|
+
# @!attribute amount
|
1749
|
+
# The total amount for this sub line item.
|
1750
|
+
#
|
1751
|
+
# @return [String]
|
1752
|
+
required :amount, String
|
1753
|
+
|
1754
|
+
# @!attribute grouping
|
1755
|
+
#
|
1756
|
+
# @return [Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping, nil]
|
1757
|
+
required :grouping,
|
1758
|
+
-> { Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping },
|
1759
|
+
nil?: true
|
1760
|
+
|
1761
|
+
# @!attribute matrix_config
|
1762
|
+
#
|
1763
|
+
# @return [Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig]
|
1764
|
+
required :matrix_config,
|
1765
|
+
-> { Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig }
|
1766
|
+
|
1767
|
+
# @!attribute name
|
1768
|
+
#
|
1769
|
+
# @return [String]
|
1770
|
+
required :name, String
|
1771
|
+
|
1772
|
+
# @!attribute quantity
|
1773
|
+
#
|
1774
|
+
# @return [Float]
|
1775
|
+
required :quantity, Float
|
1776
|
+
|
1777
|
+
# @!attribute type
|
1778
|
+
#
|
1779
|
+
# @return [Symbol, :matrix]
|
1780
|
+
required :type, const: :matrix
|
1781
|
+
|
1782
|
+
# @!parse
|
1783
|
+
# # @param amount [String]
|
1784
|
+
# # @param grouping [Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping, nil]
|
1785
|
+
# # @param matrix_config [Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig]
|
1786
|
+
# # @param name [String]
|
1787
|
+
# # @param quantity [Float]
|
1788
|
+
# # @param type [Symbol, :matrix]
|
1789
|
+
# #
|
1790
|
+
# def initialize(amount:, grouping:, matrix_config:, name:, quantity:, type: :matrix, **) = super
|
1791
|
+
|
1792
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1793
|
+
|
1794
|
+
# @see Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem#grouping
|
1795
|
+
class Grouping < Orb::BaseModel
|
1796
|
+
# @!attribute key
|
1797
|
+
#
|
1798
|
+
# @return [String]
|
1799
|
+
required :key, String
|
1800
|
+
|
1801
|
+
# @!attribute value
|
1802
|
+
# No value indicates the default group
|
1803
|
+
#
|
1804
|
+
# @return [String, nil]
|
1805
|
+
required :value, String, nil?: true
|
1806
|
+
|
1807
|
+
# @!parse
|
1808
|
+
# # @param key [String]
|
1809
|
+
# # @param value [String, nil]
|
1810
|
+
# #
|
1811
|
+
# def initialize(key:, value:, **) = super
|
1812
|
+
|
1813
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1814
|
+
end
|
1815
|
+
|
1816
|
+
# @see Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem#matrix_config
|
1817
|
+
class MatrixConfig < Orb::BaseModel
|
1818
|
+
# @!attribute dimension_values
|
1819
|
+
# The ordered dimension values for this line item.
|
1820
|
+
#
|
1821
|
+
# @return [Array<String, nil>]
|
1822
|
+
required :dimension_values, Orb::ArrayOf[String, nil?: true]
|
1823
|
+
|
1824
|
+
# @!parse
|
1825
|
+
# # @param dimension_values [Array<String, nil>]
|
1826
|
+
# #
|
1827
|
+
# def initialize(dimension_values:, **) = super
|
1828
|
+
|
1829
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1830
|
+
end
|
1831
|
+
end
|
1832
|
+
|
1833
|
+
class TierSubLineItem < Orb::BaseModel
|
1834
|
+
# @!attribute amount
|
1835
|
+
# The total amount for this sub line item.
|
1836
|
+
#
|
1837
|
+
# @return [String]
|
1838
|
+
required :amount, String
|
1839
|
+
|
1840
|
+
# @!attribute grouping
|
1841
|
+
#
|
1842
|
+
# @return [Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping, nil]
|
1843
|
+
required :grouping,
|
1844
|
+
-> { Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping },
|
1845
|
+
nil?: true
|
1846
|
+
|
1847
|
+
# @!attribute name
|
1848
|
+
#
|
1849
|
+
# @return [String]
|
1850
|
+
required :name, String
|
1851
|
+
|
1852
|
+
# @!attribute quantity
|
1853
|
+
#
|
1854
|
+
# @return [Float]
|
1855
|
+
required :quantity, Float
|
1856
|
+
|
1857
|
+
# @!attribute tier_config
|
1858
|
+
#
|
1859
|
+
# @return [Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig]
|
1860
|
+
required :tier_config, -> { Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig }
|
1861
|
+
|
1862
|
+
# @!attribute type
|
1863
|
+
#
|
1864
|
+
# @return [Symbol, :tier]
|
1865
|
+
required :type, const: :tier
|
1866
|
+
|
1867
|
+
# @!parse
|
1868
|
+
# # @param amount [String]
|
1869
|
+
# # @param grouping [Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping, nil]
|
1870
|
+
# # @param name [String]
|
1871
|
+
# # @param quantity [Float]
|
1872
|
+
# # @param tier_config [Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::TierConfig]
|
1873
|
+
# # @param type [Symbol, :tier]
|
1874
|
+
# #
|
1875
|
+
# def initialize(amount:, grouping:, name:, quantity:, tier_config:, type: :tier, **) = super
|
1876
|
+
|
1877
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1878
|
+
|
1879
|
+
# @see Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem#grouping
|
1880
|
+
class Grouping < Orb::BaseModel
|
1881
|
+
# @!attribute key
|
1882
|
+
#
|
1883
|
+
# @return [String]
|
1884
|
+
required :key, String
|
1885
|
+
|
1886
|
+
# @!attribute value
|
1887
|
+
# No value indicates the default group
|
1888
|
+
#
|
1889
|
+
# @return [String, nil]
|
1890
|
+
required :value, String, nil?: true
|
1891
|
+
|
1892
|
+
# @!parse
|
1893
|
+
# # @param key [String]
|
1894
|
+
# # @param value [String, nil]
|
1895
|
+
# #
|
1896
|
+
# def initialize(key:, value:, **) = super
|
1897
|
+
|
1898
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1899
|
+
end
|
1900
|
+
|
1901
|
+
# @see Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem#tier_config
|
1902
|
+
class TierConfig < Orb::BaseModel
|
1903
|
+
# @!attribute first_unit
|
1904
|
+
#
|
1905
|
+
# @return [Float]
|
1906
|
+
required :first_unit, Float
|
1907
|
+
|
1908
|
+
# @!attribute last_unit
|
1909
|
+
#
|
1910
|
+
# @return [Float, nil]
|
1911
|
+
required :last_unit, Float, nil?: true
|
1912
|
+
|
1913
|
+
# @!attribute unit_amount
|
1914
|
+
#
|
1915
|
+
# @return [String]
|
1916
|
+
required :unit_amount, String
|
1917
|
+
|
1918
|
+
# @!parse
|
1919
|
+
# # @param first_unit [Float]
|
1920
|
+
# # @param last_unit [Float, nil]
|
1921
|
+
# # @param unit_amount [String]
|
1922
|
+
# #
|
1923
|
+
# def initialize(first_unit:, last_unit:, unit_amount:, **) = super
|
1924
|
+
|
1925
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1926
|
+
end
|
1927
|
+
end
|
1928
|
+
|
1929
|
+
class OtherSubLineItem < Orb::BaseModel
|
1930
|
+
# @!attribute amount
|
1931
|
+
# The total amount for this sub line item.
|
1932
|
+
#
|
1933
|
+
# @return [String]
|
1934
|
+
required :amount, String
|
1935
|
+
|
1936
|
+
# @!attribute grouping
|
1937
|
+
#
|
1938
|
+
# @return [Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping, nil]
|
1939
|
+
required :grouping,
|
1940
|
+
-> { Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping },
|
1941
|
+
nil?: true
|
1942
|
+
|
1943
|
+
# @!attribute name
|
1944
|
+
#
|
1945
|
+
# @return [String]
|
1946
|
+
required :name, String
|
1947
|
+
|
1948
|
+
# @!attribute quantity
|
1949
|
+
#
|
1950
|
+
# @return [Float]
|
1951
|
+
required :quantity, Float
|
1952
|
+
|
1953
|
+
# @!attribute type
|
1954
|
+
#
|
1955
|
+
# @return [Symbol, :"'null'"]
|
1956
|
+
required :type, const: :"'null'"
|
1957
|
+
|
1958
|
+
# @!parse
|
1959
|
+
# # @param amount [String]
|
1960
|
+
# # @param grouping [Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping, nil]
|
1961
|
+
# # @param name [String]
|
1962
|
+
# # @param quantity [Float]
|
1963
|
+
# # @param type [Symbol, :"'null'"]
|
1964
|
+
# #
|
1965
|
+
# def initialize(amount:, grouping:, name:, quantity:, type: :"'null'", **) = super
|
1966
|
+
|
1967
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1968
|
+
|
1969
|
+
# @see Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem#grouping
|
1970
|
+
class Grouping < Orb::BaseModel
|
1971
|
+
# @!attribute key
|
1972
|
+
#
|
1973
|
+
# @return [String]
|
1974
|
+
required :key, String
|
1975
|
+
|
1976
|
+
# @!attribute value
|
1977
|
+
# No value indicates the default group
|
1978
|
+
#
|
1979
|
+
# @return [String, nil]
|
1980
|
+
required :value, String, nil?: true
|
1981
|
+
|
1982
|
+
# @!parse
|
1983
|
+
# # @param key [String]
|
1984
|
+
# # @param value [String, nil]
|
1985
|
+
# #
|
1986
|
+
# def initialize(key:, value:, **) = super
|
1987
|
+
|
1988
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
1989
|
+
end
|
1990
|
+
end
|
1991
|
+
|
1992
|
+
# @!parse
|
1993
|
+
# # @return [Array(Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem)]
|
1994
|
+
# def self.variants; end
|
1995
|
+
end
|
1996
|
+
|
1997
|
+
class TaxAmount < Orb::BaseModel
|
1998
|
+
# @!attribute amount
|
1999
|
+
# The amount of additional tax incurred by this tax rate.
|
2000
|
+
#
|
2001
|
+
# @return [String]
|
2002
|
+
required :amount, String
|
2003
|
+
|
2004
|
+
# @!attribute tax_rate_description
|
2005
|
+
# The human-readable description of the applied tax rate.
|
2006
|
+
#
|
2007
|
+
# @return [String]
|
2008
|
+
required :tax_rate_description, String
|
2009
|
+
|
2010
|
+
# @!attribute tax_rate_percentage
|
2011
|
+
# The tax rate percentage, out of 100.
|
2012
|
+
#
|
2013
|
+
# @return [String, nil]
|
2014
|
+
required :tax_rate_percentage, String, nil?: true
|
2015
|
+
|
2016
|
+
# @!parse
|
2017
|
+
# # @param amount [String]
|
2018
|
+
# # @param tax_rate_description [String]
|
2019
|
+
# # @param tax_rate_percentage [String, nil]
|
2020
|
+
# #
|
2021
|
+
# def initialize(amount:, tax_rate_description:, tax_rate_percentage:, **) = super
|
2022
|
+
|
2023
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
2024
|
+
end
|
2025
|
+
end
|
2026
|
+
|
2027
|
+
# @see Orb::Models::Invoice#maximum
|
2028
|
+
class Maximum < Orb::BaseModel
|
2029
|
+
# @!attribute applies_to_price_ids
|
2030
|
+
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
2031
|
+
# maximums, this can be a subset of prices.
|
2032
|
+
#
|
2033
|
+
# @return [Array<String>]
|
2034
|
+
required :applies_to_price_ids, Orb::ArrayOf[String]
|
2035
|
+
|
2036
|
+
# @!attribute maximum_amount
|
2037
|
+
# Maximum amount applied
|
2038
|
+
#
|
2039
|
+
# @return [String]
|
2040
|
+
required :maximum_amount, String
|
2041
|
+
|
2042
|
+
# @!parse
|
2043
|
+
# # @param applies_to_price_ids [Array<String>]
|
2044
|
+
# # @param maximum_amount [String]
|
2045
|
+
# #
|
2046
|
+
# def initialize(applies_to_price_ids:, maximum_amount:, **) = super
|
2047
|
+
|
2048
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
2049
|
+
end
|
2050
|
+
|
2051
|
+
# @see Orb::Models::Invoice#minimum
|
2052
|
+
class Minimum < Orb::BaseModel
|
2053
|
+
# @!attribute applies_to_price_ids
|
2054
|
+
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
2055
|
+
# minimums, this can be a subset of prices.
|
2056
|
+
#
|
2057
|
+
# @return [Array<String>]
|
2058
|
+
required :applies_to_price_ids, Orb::ArrayOf[String]
|
2059
|
+
|
2060
|
+
# @!attribute minimum_amount
|
2061
|
+
# Minimum amount applied
|
2062
|
+
#
|
2063
|
+
# @return [String]
|
2064
|
+
required :minimum_amount, String
|
2065
|
+
|
2066
|
+
# @!parse
|
2067
|
+
# # @param applies_to_price_ids [Array<String>]
|
2068
|
+
# # @param minimum_amount [String]
|
2069
|
+
# #
|
2070
|
+
# def initialize(applies_to_price_ids:, minimum_amount:, **) = super
|
2071
|
+
|
2072
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
2073
|
+
end
|
2074
|
+
|
2075
|
+
class PaymentAttempt < Orb::BaseModel
|
2076
|
+
# @!attribute id
|
2077
|
+
# The ID of the payment attempt.
|
2078
|
+
#
|
2079
|
+
# @return [String]
|
2080
|
+
required :id, String
|
2081
|
+
|
2082
|
+
# @!attribute amount
|
2083
|
+
# The amount of the payment attempt.
|
2084
|
+
#
|
2085
|
+
# @return [String]
|
2086
|
+
required :amount, String
|
2087
|
+
|
2088
|
+
# @!attribute created_at
|
2089
|
+
# The time at which the payment attempt was created.
|
2090
|
+
#
|
2091
|
+
# @return [Time]
|
2092
|
+
required :created_at, Time
|
2093
|
+
|
2094
|
+
# @!attribute payment_provider
|
2095
|
+
# The payment provider that attempted to collect the payment.
|
2096
|
+
#
|
2097
|
+
# @return [Symbol, Orb::Models::Invoice::PaymentAttempt::PaymentProvider, nil]
|
2098
|
+
required :payment_provider, enum: -> { Orb::Models::Invoice::PaymentAttempt::PaymentProvider }, nil?: true
|
2099
|
+
|
2100
|
+
# @!attribute payment_provider_id
|
2101
|
+
# The ID of the payment attempt in the payment provider.
|
2102
|
+
#
|
2103
|
+
# @return [String, nil]
|
2104
|
+
required :payment_provider_id, String, nil?: true
|
2105
|
+
|
2106
|
+
# @!attribute succeeded
|
2107
|
+
# Whether the payment attempt succeeded.
|
2108
|
+
#
|
2109
|
+
# @return [Boolean]
|
2110
|
+
required :succeeded, Orb::BooleanModel
|
2111
|
+
|
2112
|
+
# @!parse
|
2113
|
+
# # @param id [String]
|
2114
|
+
# # @param amount [String]
|
2115
|
+
# # @param created_at [Time]
|
2116
|
+
# # @param payment_provider [Symbol, Orb::Models::Invoice::PaymentAttempt::PaymentProvider, nil]
|
2117
|
+
# # @param payment_provider_id [String, nil]
|
2118
|
+
# # @param succeeded [Boolean]
|
2119
|
+
# #
|
2120
|
+
# def initialize(id:, amount:, created_at:, payment_provider:, payment_provider_id:, succeeded:, **) = super
|
2121
|
+
|
2122
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
2123
|
+
|
2124
|
+
# The payment provider that attempted to collect the payment.
|
2125
|
+
#
|
2126
|
+
# @see Orb::Models::Invoice::PaymentAttempt#payment_provider
|
2127
|
+
module PaymentProvider
|
2128
|
+
extend Orb::Enum
|
2129
|
+
|
2130
|
+
STRIPE = :stripe
|
2131
|
+
|
2132
|
+
finalize!
|
2133
|
+
|
2134
|
+
# @!parse
|
2135
|
+
# # @return [Array<Symbol>]
|
2136
|
+
# def self.values; end
|
2137
|
+
end
|
2138
|
+
end
|
2139
|
+
|
2140
|
+
# @see Orb::Models::Invoice#shipping_address
|
2141
|
+
class ShippingAddress < Orb::BaseModel
|
2142
|
+
# @!attribute city
|
2143
|
+
#
|
2144
|
+
# @return [String, nil]
|
2145
|
+
required :city, String, nil?: true
|
2146
|
+
|
2147
|
+
# @!attribute country
|
2148
|
+
#
|
2149
|
+
# @return [String, nil]
|
2150
|
+
required :country, String, nil?: true
|
2151
|
+
|
2152
|
+
# @!attribute line1
|
2153
|
+
#
|
2154
|
+
# @return [String, nil]
|
2155
|
+
required :line1, String, nil?: true
|
2156
|
+
|
2157
|
+
# @!attribute line2
|
2158
|
+
#
|
2159
|
+
# @return [String, nil]
|
2160
|
+
required :line2, String, nil?: true
|
2161
|
+
|
2162
|
+
# @!attribute postal_code
|
2163
|
+
#
|
2164
|
+
# @return [String, nil]
|
2165
|
+
required :postal_code, String, nil?: true
|
2166
|
+
|
2167
|
+
# @!attribute state
|
2168
|
+
#
|
2169
|
+
# @return [String, nil]
|
2170
|
+
required :state, String, nil?: true
|
2171
|
+
|
2172
|
+
# @!parse
|
2173
|
+
# # @param city [String, nil]
|
2174
|
+
# # @param country [String, nil]
|
2175
|
+
# # @param line1 [String, nil]
|
2176
|
+
# # @param line2 [String, nil]
|
2177
|
+
# # @param postal_code [String, nil]
|
2178
|
+
# # @param state [String, nil]
|
2179
|
+
# #
|
2180
|
+
# def initialize(city:, country:, line1:, line2:, postal_code:, state:, **) = super
|
2181
|
+
|
2182
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
2183
|
+
end
|
2184
|
+
|
2185
|
+
# @see Orb::Models::Invoice#status
|
2186
|
+
module Status
|
2187
|
+
extend Orb::Enum
|
2188
|
+
|
2189
|
+
ISSUED = :issued
|
2190
|
+
PAID = :paid
|
2191
|
+
SYNCED = :synced
|
2192
|
+
VOID = :void
|
2193
|
+
DRAFT = :draft
|
2194
|
+
|
2195
|
+
finalize!
|
2196
|
+
|
2197
|
+
# @!parse
|
2198
|
+
# # @return [Array<Symbol>]
|
2199
|
+
# def self.values; end
|
2200
|
+
end
|
2201
|
+
|
2202
|
+
# @see Orb::Models::Invoice#subscription
|
2203
|
+
class Subscription < Orb::BaseModel
|
2204
|
+
# @!attribute id
|
2205
|
+
#
|
2206
|
+
# @return [String]
|
2207
|
+
required :id, String
|
2208
|
+
|
2209
|
+
# @!parse
|
2210
|
+
# # @param id [String]
|
2211
|
+
# #
|
2212
|
+
# def initialize(id:, **) = super
|
2213
|
+
|
2214
|
+
# def initialize: (Hash | Orb::BaseModel) -> void
|
2215
|
+
end
|
2216
|
+
end
|
2217
|
+
end
|
2218
|
+
end
|