cbox_billing 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +215 -0
- data/cbox_billing.gemspec +26 -0
- data/lib/cbox_billing/api/accounting_api.rb +1893 -0
- data/lib/cbox_billing/api/affiliates_api.rb +2009 -0
- data/lib/cbox_billing/api/agreements_api.rb +552 -0
- data/lib/cbox_billing/api/bank_reconciliation_api.rb +505 -0
- data/lib/cbox_billing/api/catalog_api.rb +361 -0
- data/lib/cbox_billing/api/checkout_portal_api.rb +696 -0
- data/lib/cbox_billing/api/coupons_api.rb +538 -0
- data/lib/cbox_billing/api/credit_notes_api.rb +403 -0
- data/lib/cbox_billing/api/disputes_api.rb +540 -0
- data/lib/cbox_billing/api/dunning_api.rb +902 -0
- data/lib/cbox_billing/api/enforcement_api.rb +746 -0
- data/lib/cbox_billing/api/environments_api.rb +343 -0
- data/lib/cbox_billing/api/invoices_api.rb +1662 -0
- data/lib/cbox_billing/api/licence_data_api.rb +619 -0
- data/lib/cbox_billing/api/licenses_api.rb +293 -0
- data/lib/cbox_billing/api/management_api.rb +253 -0
- data/lib/cbox_billing/api/meters_api.rb +538 -0
- data/lib/cbox_billing/api/orders_and_delivery_api.rb +1745 -0
- data/lib/cbox_billing/api/organizations_api.rb +1110 -0
- data/lib/cbox_billing/api/payment_gateways_api.rb +227 -0
- data/lib/cbox_billing/api/payment_intents_api.rb +376 -0
- data/lib/cbox_billing/api/payment_methods_api.rb +96 -0
- data/lib/cbox_billing/api/plans_api.rb +654 -0
- data/lib/cbox_billing/api/product_access_api.rb +2033 -0
- data/lib/cbox_billing/api/quotes_api.rb +1062 -0
- data/lib/cbox_billing/api/seats_api.rb +938 -0
- data/lib/cbox_billing/api/service_connections_api.rb +245 -0
- data/lib/cbox_billing/api/subscriptions_api.rb +4697 -0
- data/lib/cbox_billing/api/tax_returns_api.rb +453 -0
- data/lib/cbox_billing/api/test_mode_api.rb +96 -0
- data/lib/cbox_billing/api/usage_api.rb +1116 -0
- data/lib/cbox_billing/api/webhook_endpoints_api.rb +835 -0
- data/lib/cbox_billing/api_client.rb +441 -0
- data/lib/cbox_billing/api_error.rb +58 -0
- data/lib/cbox_billing/api_model_base.rb +88 -0
- data/lib/cbox_billing/client.rb +49 -0
- data/lib/cbox_billing/configuration.rb +408 -0
- data/lib/cbox_billing/enforcement/client.rb +665 -0
- data/lib/cbox_billing/enforcement/errors.rb +48 -0
- data/lib/cbox_billing/enforcement/stores.rb +129 -0
- data/lib/cbox_billing/enforcement/transport.rb +79 -0
- data/lib/cbox_billing/enforcement/types.rb +63 -0
- data/lib/cbox_billing/enforcement.rb +9 -0
- data/lib/cbox_billing/errors.rb +110 -0
- data/lib/cbox_billing/idempotency.rb +16 -0
- data/lib/cbox_billing/models/accept_agreement201_response.rb +177 -0
- data/lib/cbox_billing/models/accept_agreement_request.rb +294 -0
- data/lib/cbox_billing/models/accept_agreement_request_user.rb +202 -0
- data/lib/cbox_billing/models/access_balance.rb +276 -0
- data/lib/cbox_billing/models/access_balance_request.rb +309 -0
- data/lib/cbox_billing/models/access_batch.rb +321 -0
- data/lib/cbox_billing/models/access_batch_filters.rb +183 -0
- data/lib/cbox_billing/models/access_cancel_request.rb +207 -0
- data/lib/cbox_billing/models/access_commit_request.rb +207 -0
- data/lib/cbox_billing/models/access_entry.rb +383 -0
- data/lib/cbox_billing/models/access_grant.rb +287 -0
- data/lib/cbox_billing/models/access_grant_request.rb +310 -0
- data/lib/cbox_billing/models/access_invitation.rb +404 -0
- data/lib/cbox_billing/models/access_invite_request.rb +337 -0
- data/lib/cbox_billing/models/access_join_request.rb +369 -0
- data/lib/cbox_billing/models/access_program.rb +511 -0
- data/lib/cbox_billing/models/access_program_input.rb +433 -0
- data/lib/cbox_billing/models/access_redeem_request.rb +335 -0
- data/lib/cbox_billing/models/access_redemption.rb +394 -0
- data/lib/cbox_billing/models/access_report.rb +250 -0
- data/lib/cbox_billing/models/access_report_balances.rb +252 -0
- data/lib/cbox_billing/models/access_report_batches.rb +252 -0
- data/lib/cbox_billing/models/access_report_entries.rb +252 -0
- data/lib/cbox_billing/models/access_report_grants.rb +252 -0
- data/lib/cbox_billing/models/access_report_invitations.rb +252 -0
- data/lib/cbox_billing/models/access_report_redemptions.rb +252 -0
- data/lib/cbox_billing/models/access_restore_grant_request.rb +207 -0
- data/lib/cbox_billing/models/access_retry_delivery_request.rb +207 -0
- data/lib/cbox_billing/models/access_revoke_grant_request.rb +207 -0
- data/lib/cbox_billing/models/access_revoke_invitation200_response.rb +195 -0
- data/lib/cbox_billing/models/access_revoke_invitation_request.rb +207 -0
- data/lib/cbox_billing/models/access_select200_response.rb +356 -0
- data/lib/cbox_billing/models/access_select_request.rb +323 -0
- data/lib/cbox_billing/models/account_credit.rb +258 -0
- data/lib/cbox_billing/models/account_credit_movements_inner.rb +255 -0
- data/lib/cbox_billing/models/account_entitlement.rb +240 -0
- data/lib/cbox_billing/models/accounting_connection.rb +336 -0
- data/lib/cbox_billing/models/accounting_connection_company.rb +170 -0
- data/lib/cbox_billing/models/accounting_contact_conflict.rb +308 -0
- data/lib/cbox_billing/models/accounting_contact_import.rb +397 -0
- data/lib/cbox_billing/models/accounting_contact_import_counts.rb +308 -0
- data/lib/cbox_billing/models/accounting_contact_import_row.rb +363 -0
- data/lib/cbox_billing/models/accounting_contact_import_row_candidates_inner.rb +227 -0
- data/lib/cbox_billing/models/accounting_contact_sync.rb +351 -0
- data/lib/cbox_billing/models/accounting_contact_sync_failure.rb +266 -0
- data/lib/cbox_billing/models/accounting_customer_document.rb +318 -0
- data/lib/cbox_billing/models/accounting_customer_link.rb +354 -0
- data/lib/cbox_billing/models/accounting_customer_link_company.rb +180 -0
- data/lib/cbox_billing/models/accounting_customer_link_contact.rb +292 -0
- data/lib/cbox_billing/models/accounting_customer_link_contact_sync.rb +291 -0
- data/lib/cbox_billing/models/accounting_customer_link_contact_sync_conflicts_inner.rb +237 -0
- data/lib/cbox_billing/models/accounting_customer_link_several_contacts_inner.rb +227 -0
- data/lib/cbox_billing/models/accounting_customer_link_shared_with_inner.rb +203 -0
- data/lib/cbox_billing/models/accounting_invoice.rb +532 -0
- data/lib/cbox_billing/models/accounting_invoice_contact.rb +189 -0
- data/lib/cbox_billing/models/accounting_sync.rb +356 -0
- data/lib/cbox_billing/models/accounting_vendor_contact.rb +307 -0
- data/lib/cbox_billing/models/accounting_vendor_link.rb +216 -0
- data/lib/cbox_billing/models/activation_bundle.rb +293 -0
- data/lib/cbox_billing/models/add_dispute_evidence_file201_response.rb +177 -0
- data/lib/cbox_billing/models/add_dispute_evidence_file422_response.rb +104 -0
- data/lib/cbox_billing/models/add_dispute_evidence_file_request.rb +261 -0
- data/lib/cbox_billing/models/add_invoice_item201_response.rb +177 -0
- data/lib/cbox_billing/models/add_invoice_item202_response.rb +228 -0
- data/lib/cbox_billing/models/add_invoice_item_request.rb +248 -0
- data/lib/cbox_billing/models/add_on.rb +305 -0
- data/lib/cbox_billing/models/add_on_preview.rb +170 -0
- data/lib/cbox_billing/models/add_on_request.rb +434 -0
- data/lib/cbox_billing/models/add_on_result.rb +203 -0
- data/lib/cbox_billing/models/add_product_file_request1.rb +233 -0
- data/lib/cbox_billing/models/add_subscription_phase201_response.rb +177 -0
- data/lib/cbox_billing/models/adjust_affiliate_balance_request.rb +257 -0
- data/lib/cbox_billing/models/admit_service_organization200_response.rb +169 -0
- data/lib/cbox_billing/models/affiliate.rb +505 -0
- data/lib/cbox_billing/models/affiliate_commission.rb +520 -0
- data/lib/cbox_billing/models/affiliate_detail.rb +523 -0
- data/lib/cbox_billing/models/affiliate_payout.rb +443 -0
- data/lib/cbox_billing/models/affiliate_payout_run.rb +446 -0
- data/lib/cbox_billing/models/affiliate_payout_run_list.rb +229 -0
- data/lib/cbox_billing/models/affiliate_payout_settings.rb +356 -0
- data/lib/cbox_billing/models/affiliate_portal_link.rb +203 -0
- data/lib/cbox_billing/models/affiliate_program.rb +556 -0
- data/lib/cbox_billing/models/affiliate_program_commission.rb +269 -0
- data/lib/cbox_billing/models/affiliate_rate_plan.rb +273 -0
- data/lib/cbox_billing/models/affiliate_rate_plan_phases_inner.rb +316 -0
- data/lib/cbox_billing/models/affiliate_rate_rule.rb +233 -0
- data/lib/cbox_billing/models/affiliate_referral.rb +325 -0
- data/lib/cbox_billing/models/agreement_block.rb +337 -0
- data/lib/cbox_billing/models/agreement_error.rb +227 -0
- data/lib/cbox_billing/models/agreement_status.rb +453 -0
- data/lib/cbox_billing/models/agreement_status_requires_inner.rb +202 -0
- data/lib/cbox_billing/models/align_renewals_request.rb +264 -0
- data/lib/cbox_billing/models/allowance_window.rb +269 -0
- data/lib/cbox_billing/models/appendix.rb +293 -0
- data/lib/cbox_billing/models/appendix_column.rb +257 -0
- data/lib/cbox_billing/models/apply_catalog409_response.rb +369 -0
- data/lib/cbox_billing/models/apply_subscription_coupon200_response.rb +177 -0
- data/lib/cbox_billing/models/apply_subscription_coupon_request.rb +197 -0
- data/lib/cbox_billing/models/archive_affiliate_program_request.rb +162 -0
- data/lib/cbox_billing/models/auto_top_up.rb +462 -0
- data/lib/cbox_billing/models/auto_top_up_attempts_inner.rb +290 -0
- data/lib/cbox_billing/models/auto_top_up_limits.rb +230 -0
- data/lib/cbox_billing/models/bank_csv_mapping.rb +467 -0
- data/lib/cbox_billing/models/bank_import_result.rb +285 -0
- data/lib/cbox_billing/models/bank_line.rb +486 -0
- data/lib/cbox_billing/models/bank_line_detail.rb +233 -0
- data/lib/cbox_billing/models/bank_line_detail_payments_inner.rb +280 -0
- data/lib/cbox_billing/models/bank_line_detail_suggestions_inner.rb +267 -0
- data/lib/cbox_billing/models/bank_statement.rb +412 -0
- data/lib/cbox_billing/models/bank_statement_import.rb +258 -0
- data/lib/cbox_billing/models/billing_parent.rb +219 -0
- data/lib/cbox_billing/models/billing_policy.rb +299 -0
- data/lib/cbox_billing/models/billing_policy_policy.rb +228 -0
- data/lib/cbox_billing/models/billing_policy_request.rb +323 -0
- data/lib/cbox_billing/models/bundle_benefit.rb +597 -0
- data/lib/cbox_billing/models/bundle_benefit_tiers_inner.rb +230 -0
- data/lib/cbox_billing/models/bundle_consequence.rb +450 -0
- data/lib/cbox_billing/models/bundle_offer.rb +508 -0
- data/lib/cbox_billing/models/bundle_offer_plan.rb +398 -0
- data/lib/cbox_billing/models/bundle_offer_products_to_add_inner.rb +169 -0
- data/lib/cbox_billing/models/bundle_offer_saves.rb +226 -0
- data/lib/cbox_billing/models/cancel_preview.rb +264 -0
- data/lib/cbox_billing/models/cancel_request.rb +256 -0
- data/lib/cbox_billing/models/cancel_subscription200_response.rb +652 -0
- data/lib/cbox_billing/models/catalog_changes.rb +286 -0
- data/lib/cbox_billing/models/catalog_changes_changes_inner.rb +264 -0
- data/lib/cbox_billing/models/catalog_changes_diff_inner.rb +303 -0
- data/lib/cbox_billing/models/catalog_changes_diff_inner_fields_inner.rb +180 -0
- data/lib/cbox_billing/models/catalog_changes_diff_inner_fields_inner_from.rb +105 -0
- data/lib/cbox_billing/models/catalog_changes_impact.rb +215 -0
- data/lib/cbox_billing/models/catalog_changes_impact_bundle_repriced_inner.rb +224 -0
- data/lib/cbox_billing/models/catalog_changes_impact_sample_inner.rb +169 -0
- data/lib/cbox_billing/models/catalog_changes_summary.rb +178 -0
- data/lib/cbox_billing/models/catalog_manifest.rb +215 -0
- data/lib/cbox_billing/models/catalog_manifest_bundles_inner.rb +344 -0
- data/lib/cbox_billing/models/catalog_manifest_bundles_inner_applies_to.rb +199 -0
- data/lib/cbox_billing/models/catalog_manifest_bundles_inner_copy_value.rb +263 -0
- data/lib/cbox_billing/models/catalog_manifest_bundles_inner_discount.rb +286 -0
- data/lib/cbox_billing/models/catalog_manifest_bundles_inner_requires.rb +254 -0
- data/lib/cbox_billing/models/catalog_manifest_existing.rb +242 -0
- data/lib/cbox_billing/models/catalog_manifest_products_inner.rb +246 -0
- data/lib/cbox_billing/models/catalog_manifest_products_inner_features_inner.rb +269 -0
- data/lib/cbox_billing/models/catalog_manifest_products_inner_meters_inner.rb +410 -0
- data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner.rb +258 -0
- data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value.rb +356 -0
- data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value_price_value.rb +471 -0
- data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value_price_value_matrix_inner.rb +274 -0
- data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value_price_value_rates_inner.rb +216 -0
- data/lib/cbox_billing/models/change_subscription_dates200_response.rb +187 -0
- data/lib/cbox_billing/models/change_subscription_dates_request.rb +325 -0
- data/lib/cbox_billing/models/charged_invoice.rb +322 -0
- data/lib/cbox_billing/models/check_service_admission200_response.rb +178 -0
- data/lib/cbox_billing/models/checkout_session_request.rb +354 -0
- data/lib/cbox_billing/models/checkout_session_request_items_inner.rb +217 -0
- data/lib/cbox_billing/models/choose_accounting_contact_import_row200_response.rb +177 -0
- data/lib/cbox_billing/models/clear_subscription_end_date200_response.rb +162 -0
- data/lib/cbox_billing/models/commit_request.rb +214 -0
- data/lib/cbox_billing/models/commit_request_actuals_inner.rb +212 -0
- data/lib/cbox_billing/models/commitment.rb +499 -0
- data/lib/cbox_billing/models/commitment_ramp_step.rb +221 -0
- data/lib/cbox_billing/models/commitment_refusal.rb +239 -0
- data/lib/cbox_billing/models/commitment_request.rb +409 -0
- data/lib/cbox_billing/models/commitment_response.rb +203 -0
- data/lib/cbox_billing/models/commitment_term.rb +227 -0
- data/lib/cbox_billing/models/confirm_accounting_contact_import200_response.rb +177 -0
- data/lib/cbox_billing/models/confirm_accounting_contact_import_request.rb +190 -0
- data/lib/cbox_billing/models/connect_engage_service200_response.rb +212 -0
- data/lib/cbox_billing/models/connect_engage_service_request.rb +267 -0
- data/lib/cbox_billing/models/contract_cap_discount.rb +284 -0
- data/lib/cbox_billing/models/contract_price_cap.rb +332 -0
- data/lib/cbox_billing/models/contract_price_cap_basis.rb +216 -0
- data/lib/cbox_billing/models/coupon.rb +307 -0
- data/lib/cbox_billing/models/coupon_definition.rb +520 -0
- data/lib/cbox_billing/models/coupon_definition_detail.rb +555 -0
- data/lib/cbox_billing/models/coupon_definition_detail_all_of_redemptions.rb +216 -0
- data/lib/cbox_billing/models/coupon_definition_list.rb +226 -0
- data/lib/cbox_billing/models/coupon_deleted.rb +227 -0
- data/lib/cbox_billing/models/coupon_request.rb +537 -0
- data/lib/cbox_billing/models/create_affiliate_payout_request.rb +247 -0
- data/lib/cbox_billing/models/create_affiliate_program_request.rb +423 -0
- data/lib/cbox_billing/models/create_affiliate_program_request_commission.rb +348 -0
- data/lib/cbox_billing/models/create_affiliate_referral_request.rb +178 -0
- data/lib/cbox_billing/models/create_affiliate_request.rb +415 -0
- data/lib/cbox_billing/models/create_credit_purchase422_response.rb +104 -0
- data/lib/cbox_billing/models/create_customers_from_accounting_contact_import200_response.rb +207 -0
- data/lib/cbox_billing/models/create_customers_from_accounting_contact_import200_response_created_inner.rb +204 -0
- data/lib/cbox_billing/models/create_customers_from_accounting_contact_import200_response_refused_inner.rb +204 -0
- data/lib/cbox_billing/models/create_customers_from_accounting_contact_import_request.rb +197 -0
- data/lib/cbox_billing/models/create_download_grant_request.rb +248 -0
- data/lib/cbox_billing/models/create_download_links200_response.rb +205 -0
- data/lib/cbox_billing/models/create_download_links200_response_data_inner.rb +227 -0
- data/lib/cbox_billing/models/create_download_links_request.rb +190 -0
- data/lib/cbox_billing/models/create_environment_request.rb +270 -0
- data/lib/cbox_billing/models/create_license_key_request.rb +273 -0
- data/lib/cbox_billing/models/create_order_request.rb +420 -0
- data/lib/cbox_billing/models/create_order_request_lines_inner.rb +262 -0
- data/lib/cbox_billing/models/create_private_plan_request.rb +318 -0
- data/lib/cbox_billing/models/create_spend_alert_request.rb +295 -0
- data/lib/cbox_billing/models/created_access_invitation.rb +464 -0
- data/lib/cbox_billing/models/created_environment.rb +214 -0
- data/lib/cbox_billing/models/credit_adjustment_applied.rb +247 -0
- data/lib/cbox_billing/models/credit_adjustment_pending.rb +228 -0
- data/lib/cbox_billing/models/credit_adjustment_request.rb +375 -0
- data/lib/cbox_billing/models/credit_delta.rb +229 -0
- data/lib/cbox_billing/models/credit_movement.rb +364 -0
- data/lib/cbox_billing/models/credit_movement_list.rb +226 -0
- data/lib/cbox_billing/models/credit_note.rb +455 -0
- data/lib/cbox_billing/models/credit_note_detail.rb +517 -0
- data/lib/cbox_billing/models/credit_note_detail_all_of_lines.rb +294 -0
- data/lib/cbox_billing/models/credit_note_list.rb +226 -0
- data/lib/cbox_billing/models/credit_pool.rb +567 -0
- data/lib/cbox_billing/models/credit_pool_expiries_inner.rb +241 -0
- data/lib/cbox_billing/models/credit_pool_label.rb +204 -0
- data/lib/cbox_billing/models/credit_pool_list.rb +205 -0
- data/lib/cbox_billing/models/credit_pool_pay_as_you_go.rb +218 -0
- data/lib/cbox_billing/models/credit_pool_period.rb +175 -0
- data/lib/cbox_billing/models/credit_pool_scope.rb +207 -0
- data/lib/cbox_billing/models/credit_pool_scope_conditions_inner.rb +256 -0
- data/lib/cbox_billing/models/credit_purchase.rb +306 -0
- data/lib/cbox_billing/models/credit_purchase_credit.rb +203 -0
- data/lib/cbox_billing/models/customer_contract.rb +227 -0
- data/lib/cbox_billing/models/customer_overage_cap_row.rb +345 -0
- data/lib/cbox_billing/models/customer_overage_cap_row_customer.rb +202 -0
- data/lib/cbox_billing/models/date_change_preview.rb +370 -0
- data/lib/cbox_billing/models/date_change_request.rb +272 -0
- data/lib/cbox_billing/models/delete_entitlement_override200_response.rb +204 -0
- data/lib/cbox_billing/models/delete_overage_cap200_response.rb +203 -0
- data/lib/cbox_billing/models/delete_spend_alert200_response.rb +203 -0
- data/lib/cbox_billing/models/delete_webhook_endpoint200_response.rb +239 -0
- data/lib/cbox_billing/models/delivery.rb +339 -0
- data/lib/cbox_billing/models/destroy_environment200_response.rb +178 -0
- data/lib/cbox_billing/models/detach_payment_method422_response.rb +253 -0
- data/lib/cbox_billing/models/detach_payment_method422_response_errors.rb +162 -0
- data/lib/cbox_billing/models/directory_registration.rb +244 -0
- data/lib/cbox_billing/models/directory_service.rb +472 -0
- data/lib/cbox_billing/models/disable_license_key_request.rb +161 -0
- data/lib/cbox_billing/models/dispute.rb +471 -0
- data/lib/cbox_billing/models/dispute_detail.rb +229 -0
- data/lib/cbox_billing/models/dispute_detail_evidence.rb +205 -0
- data/lib/cbox_billing/models/dispute_detail_evidence_text.rb +200 -0
- data/lib/cbox_billing/models/dispute_detail_pack.rb +193 -0
- data/lib/cbox_billing/models/dispute_detail_pack_sections_inner.rb +269 -0
- data/lib/cbox_billing/models/dispute_evidence.rb +312 -0
- data/lib/cbox_billing/models/dispute_evidence_file.rb +357 -0
- data/lib/cbox_billing/models/dispute_evidence_slot.rb +43 -0
- data/lib/cbox_billing/models/dispute_refusal.rb +256 -0
- data/lib/cbox_billing/models/dispute_status.rb +46 -0
- data/lib/cbox_billing/models/download_grant.rb +401 -0
- data/lib/cbox_billing/models/dunning_hold.rb +344 -0
- data/lib/cbox_billing/models/dunning_state.rb +217 -0
- data/lib/cbox_billing/models/dunning_state_invoice.rb +281 -0
- data/lib/cbox_billing/models/dunning_state_retry.rb +232 -0
- data/lib/cbox_billing/models/e_invoice_refusal.rb +229 -0
- data/lib/cbox_billing/models/effective_billing_policy.rb +298 -0
- data/lib/cbox_billing/models/effective_entitlement.rb +271 -0
- data/lib/cbox_billing/models/effective_usage_threshold.rb +280 -0
- data/lib/cbox_billing/models/entitlement.rb +366 -0
- data/lib/cbox_billing/models/entitlement_override.rb +557 -0
- data/lib/cbox_billing/models/entitlement_override_input.rb +353 -0
- data/lib/cbox_billing/models/entitlement_override_result.rb +591 -0
- data/lib/cbox_billing/models/entitlement_terms.rb +293 -0
- data/lib/cbox_billing/models/entitlements_response.rb +200 -0
- data/lib/cbox_billing/models/environment.rb +379 -0
- data/lib/cbox_billing/models/error_body.rb +242 -0
- data/lib/cbox_billing/models/export_catalog200_response.rb +232 -0
- data/lib/cbox_billing/models/extend_invoice_due_date_request.rb +213 -0
- data/lib/cbox_billing/models/feature.rb +277 -0
- data/lib/cbox_billing/models/feature_check.rb +310 -0
- data/lib/cbox_billing/models/feature_set.rb +179 -0
- data/lib/cbox_billing/models/feature_value.rb +105 -0
- data/lib/cbox_billing/models/first_period.rb +461 -0
- data/lib/cbox_billing/models/gateway_intent.rb +254 -0
- data/lib/cbox_billing/models/get_accounting_connection200_response.rb +163 -0
- data/lib/cbox_billing/models/get_accounting_contact200_response.rb +227 -0
- data/lib/cbox_billing/models/get_accounting_contact_sync200_response.rb +229 -0
- data/lib/cbox_billing/models/get_accounting_invoice_sync200_response.rb +293 -0
- data/lib/cbox_billing/models/get_accounting_invoice_sync200_response_settings.rb +241 -0
- data/lib/cbox_billing/models/get_accounting_invoice_sync200_response_sync.rb +318 -0
- data/lib/cbox_billing/models/get_accounting_organization200_response.rb +231 -0
- data/lib/cbox_billing/models/get_bank_statement200_response.rb +205 -0
- data/lib/cbox_billing/models/get_customer_statement200_response.rb +339 -0
- data/lib/cbox_billing/models/get_customer_statement200_response_account_credit.rb +169 -0
- data/lib/cbox_billing/models/get_customer_statement200_response_activity_inner.rb +334 -0
- data/lib/cbox_billing/models/get_customer_statement200_response_balances_inner.rb +229 -0
- data/lib/cbox_billing/models/get_customer_statement200_response_subscriptions_inner.rb +281 -0
- data/lib/cbox_billing/models/get_customer_statement200_response_subscriptions_inner_next.rb +200 -0
- data/lib/cbox_billing/models/get_latest_accounting_contact_import200_response.rb +163 -0
- data/lib/cbox_billing/models/get_product_delivery200_response.rb +217 -0
- data/lib/cbox_billing/models/get_resource_limits200_response.rb +257 -0
- data/lib/cbox_billing/models/get_service_admission_policy200_response.rb +160 -0
- data/lib/cbox_billing/models/get_service_registrations200_response.rb +179 -0
- data/lib/cbox_billing/models/get_service_registrations200_response_data_inner.rb +190 -0
- data/lib/cbox_billing/models/get_service_registrations_request.rb +284 -0
- data/lib/cbox_billing/models/grandfathered_subscriber.rb +356 -0
- data/lib/cbox_billing/models/grandfathered_subscriber_contract_cap.rb +230 -0
- data/lib/cbox_billing/models/guest_waitlist_input.rb +271 -0
- data/lib/cbox_billing/models/hold_invoice_dunning_request.rb +249 -0
- data/lib/cbox_billing/models/hold_invoice_for_review200_response.rb +177 -0
- data/lib/cbox_billing/models/hosted_session.rb +204 -0
- data/lib/cbox_billing/models/import_bank_statement201_response.rb +203 -0
- data/lib/cbox_billing/models/inline_object.rb +227 -0
- data/lib/cbox_billing/models/inline_object1.rb +255 -0
- data/lib/cbox_billing/models/inline_object2.rb +255 -0
- data/lib/cbox_billing/models/invoice.rb +523 -0
- data/lib/cbox_billing/models/invoice_balance.rb +281 -0
- data/lib/cbox_billing/models/invoice_detail.rb +655 -0
- data/lib/cbox_billing/models/invoice_draft.rb +452 -0
- data/lib/cbox_billing/models/invoice_draft_lines_inner.rb +199 -0
- data/lib/cbox_billing/models/invoice_item.rb +354 -0
- data/lib/cbox_billing/models/invoice_line.rb +295 -0
- data/lib/cbox_billing/models/invoice_list.rb +226 -0
- data/lib/cbox_billing/models/invoice_payment.rb +292 -0
- data/lib/cbox_billing/models/invoice_payment_result.rb +203 -0
- data/lib/cbox_billing/models/join_service_waitlist200_response.rb +163 -0
- data/lib/cbox_billing/models/join_service_waitlist_as_guest200_response.rb +194 -0
- data/lib/cbox_billing/models/join_service_waitlist_request.rb +378 -0
- data/lib/cbox_billing/models/keep_accounting_contact200_response.rb +231 -0
- data/lib/cbox_billing/models/keep_accounting_contact_request.rb +186 -0
- data/lib/cbox_billing/models/lease.rb +266 -0
- data/lib/cbox_billing/models/lease_request.rb +341 -0
- data/lib/cbox_billing/models/leave_feature_waitlist200_response.rb +201 -0
- data/lib/cbox_billing/models/leave_feature_waitlist_request.rb +249 -0
- data/lib/cbox_billing/models/licence_period_document.rb +408 -0
- data/lib/cbox_billing/models/licence_period_document_usage_measures_inner.rb +170 -0
- data/lib/cbox_billing/models/licence_period_list.rb +230 -0
- data/lib/cbox_billing/models/licence_period_summary.rb +344 -0
- data/lib/cbox_billing/models/licence_reportable.rb +204 -0
- data/lib/cbox_billing/models/licence_row_list.rb +244 -0
- data/lib/cbox_billing/models/licence_seat_count.rb +355 -0
- data/lib/cbox_billing/models/licence_seat_ledger_entry.rb +578 -0
- data/lib/cbox_billing/models/licence_seat_ledger_list.rb +217 -0
- data/lib/cbox_billing/models/licence_seat_snapshot_list.rb +243 -0
- data/lib/cbox_billing/models/license.rb +407 -0
- data/lib/cbox_billing/models/license_issue_request.rb +232 -0
- data/lib/cbox_billing/models/license_key.rb +503 -0
- data/lib/cbox_billing/models/license_key_detail.rb +537 -0
- data/lib/cbox_billing/models/license_key_detail_all_of_instances.rb +277 -0
- data/lib/cbox_billing/models/license_renew_request.rb +160 -0
- data/lib/cbox_billing/models/license_revoke_request.rb +160 -0
- data/lib/cbox_billing/models/license_revoke_result.rb +227 -0
- data/lib/cbox_billing/models/limit_increase_decision.rb +368 -0
- data/lib/cbox_billing/models/limit_increase_input.rb +300 -0
- data/lib/cbox_billing/models/limit_increase_request.rb +516 -0
- data/lib/cbox_billing/models/link_accounting_contact200_response.rb +177 -0
- data/lib/cbox_billing/models/link_accounting_contact_request.rb +187 -0
- data/lib/cbox_billing/models/list_access_programs200_response.rb +252 -0
- data/lib/cbox_billing/models/list_accounting_contact_duplicates200_response.rb +205 -0
- data/lib/cbox_billing/models/list_accounting_contact_duplicates200_response_duplicates_inner.rb +205 -0
- data/lib/cbox_billing/models/list_accounting_contact_duplicates200_response_duplicates_inner_organizations_inner.rb +203 -0
- data/lib/cbox_billing/models/list_accounting_contact_import_rows200_response.rb +192 -0
- data/lib/cbox_billing/models/list_accounting_contact_sync_failures200_response.rb +217 -0
- data/lib/cbox_billing/models/list_accounting_contacts200_response.rb +282 -0
- data/lib/cbox_billing/models/list_accounting_organization_invoices200_response.rb +191 -0
- data/lib/cbox_billing/models/list_accounting_syncs200_response.rb +179 -0
- data/lib/cbox_billing/models/list_affiliate_commissions200_response.rb +226 -0
- data/lib/cbox_billing/models/list_affiliate_payout_runs200_response.rb +226 -0
- data/lib/cbox_billing/models/list_affiliate_payouts200_response.rb +226 -0
- data/lib/cbox_billing/models/list_affiliate_programs200_response.rb +226 -0
- data/lib/cbox_billing/models/list_affiliates200_response.rb +226 -0
- data/lib/cbox_billing/models/list_agreements200_response.rb +179 -0
- data/lib/cbox_billing/models/list_all_invoices400_response.rb +177 -0
- data/lib/cbox_billing/models/list_bank_lines200_response.rb +215 -0
- data/lib/cbox_billing/models/list_bank_statements200_response.rb +215 -0
- data/lib/cbox_billing/models/list_connected_financial_events200_response.rb +292 -0
- data/lib/cbox_billing/models/list_connected_production_environments200_response.rb +205 -0
- data/lib/cbox_billing/models/list_connected_production_environments200_response_data_inner.rb +203 -0
- data/lib/cbox_billing/models/list_customer_dunning_holds200_response.rb +179 -0
- data/lib/cbox_billing/models/list_disputes200_response.rb +217 -0
- data/lib/cbox_billing/models/list_download_grants200_response.rb +226 -0
- data/lib/cbox_billing/models/list_entitlement_overrides200_response.rb +207 -0
- data/lib/cbox_billing/models/list_environments200_response.rb +162 -0
- data/lib/cbox_billing/models/list_financial_events200_response.rb +240 -0
- data/lib/cbox_billing/models/list_financial_events200_response_data_inner.rb +342 -0
- data/lib/cbox_billing/models/list_financial_events200_response_data_inner_data.rb +408 -0
- data/lib/cbox_billing/models/list_grandfathered_subscribers200_response.rb +244 -0
- data/lib/cbox_billing/models/list_invoice_drafts200_response.rb +215 -0
- data/lib/cbox_billing/models/list_invoice_items200_response.rb +179 -0
- data/lib/cbox_billing/models/list_invoice_payments200_response.rb +205 -0
- data/lib/cbox_billing/models/list_license_keys200_response.rb +226 -0
- data/lib/cbox_billing/models/list_limit_increase_requests200_response.rb +231 -0
- data/lib/cbox_billing/models/list_one_off_products200_response.rb +179 -0
- data/lib/cbox_billing/models/list_orders200_response.rb +226 -0
- data/lib/cbox_billing/models/list_organization_purchases200_response.rb +205 -0
- data/lib/cbox_billing/models/list_organization_subscriptions200_response.rb +179 -0
- data/lib/cbox_billing/models/list_overage_caps200_response.rb +179 -0
- data/lib/cbox_billing/models/list_plan_moves200_response.rb +179 -0
- data/lib/cbox_billing/models/list_private_plans200_response.rb +179 -0
- data/lib/cbox_billing/models/list_product_files200_response.rb +179 -0
- data/lib/cbox_billing/models/list_scheduled_catalog_changes200_response.rb +179 -0
- data/lib/cbox_billing/models/list_service_directory200_response.rb +249 -0
- data/lib/cbox_billing/models/list_signed_agreements200_response.rb +226 -0
- data/lib/cbox_billing/models/list_spend_alerts200_response.rb +218 -0
- data/lib/cbox_billing/models/list_spend_alerts200_response_spend.rb +222 -0
- data/lib/cbox_billing/models/list_subscription_date_moves200_response.rb +179 -0
- data/lib/cbox_billing/models/list_subscription_schedule200_response.rb +179 -0
- data/lib/cbox_billing/models/list_tax_return_lines200_response.rb +215 -0
- data/lib/cbox_billing/models/list_tax_returns200_response.rb +215 -0
- data/lib/cbox_billing/models/list_unmatched_accounting_invoices200_response.rb +192 -0
- data/lib/cbox_billing/models/lock_subscription_price_request.rb +162 -0
- data/lib/cbox_billing/models/mark_affiliate_payout_paid_request.rb +176 -0
- data/lib/cbox_billing/models/mark_invoice_paid_request.rb +176 -0
- data/lib/cbox_billing/models/match_bank_line_request.rb +197 -0
- data/lib/cbox_billing/models/match_bank_line_request_allocations_inner.rb +221 -0
- data/lib/cbox_billing/models/meter.rb +524 -0
- data/lib/cbox_billing/models/meter_detail.rb +587 -0
- data/lib/cbox_billing/models/meter_detail_all_of_entitlements.rb +260 -0
- data/lib/cbox_billing/models/meter_list.rb +226 -0
- data/lib/cbox_billing/models/meter_request.rb +463 -0
- data/lib/cbox_billing/models/meter_request_resets.rb +237 -0
- data/lib/cbox_billing/models/meter_resets.rb +279 -0
- data/lib/cbox_billing/models/meter_staged.rb +309 -0
- data/lib/cbox_billing/models/meter_staged_changeset.rb +265 -0
- data/lib/cbox_billing/models/money.rb +222 -0
- data/lib/cbox_billing/models/money_amount.rb +203 -0
- data/lib/cbox_billing/models/move_affiliate_referral_request.rb +213 -0
- data/lib/cbox_billing/models/move_affiliate_request.rb +188 -0
- data/lib/cbox_billing/models/negotiated_price.rb +277 -0
- data/lib/cbox_billing/models/new_auto_top_up.rb +277 -0
- data/lib/cbox_billing/models/new_credit_purchase.rb +271 -0
- data/lib/cbox_billing/models/new_invoice.rb +264 -0
- data/lib/cbox_billing/models/new_invoice_line.rb +295 -0
- data/lib/cbox_billing/models/ok.rb +201 -0
- data/lib/cbox_billing/models/one_off_product.rb +359 -0
- data/lib/cbox_billing/models/one_off_purchase.rb +396 -0
- data/lib/cbox_billing/models/one_off_purchase_items_inner.rb +255 -0
- data/lib/cbox_billing/models/one_off_quote.rb +527 -0
- data/lib/cbox_billing/models/one_off_quote_organization.rb +177 -0
- data/lib/cbox_billing/models/one_off_quote_request.rb +324 -0
- data/lib/cbox_billing/models/order.rb +573 -0
- data/lib/cbox_billing/models/order_items_inner.rb +311 -0
- data/lib/cbox_billing/models/organization.rb +545 -0
- data/lib/cbox_billing/models/organization_accounting_contact.rb +255 -0
- data/lib/cbox_billing/models/organization_bundles.rb +310 -0
- data/lib/cbox_billing/models/organization_bundles_active_inner.rb +242 -0
- data/lib/cbox_billing/models/organization_response.rb +177 -0
- data/lib/cbox_billing/models/organization_upsert_request.rb +666 -0
- data/lib/cbox_billing/models/overage_cap.rb +105 -0
- data/lib/cbox_billing/models/overage_cap_binding.rb +263 -0
- data/lib/cbox_billing/models/overage_cap_one_of.rb +186 -0
- data/lib/cbox_billing/models/overage_cap_one_of1.rb +231 -0
- data/lib/cbox_billing/models/overage_cap_state.rb +380 -0
- data/lib/cbox_billing/models/page.rb +192 -0
- data/lib/cbox_billing/models/payment_gateway_failover.rb +233 -0
- data/lib/cbox_billing/models/payment_gateway_failover_failovers_inner.rb +348 -0
- data/lib/cbox_billing/models/payment_gateway_failover_failovers_inner_hops_inner.rb +190 -0
- data/lib/cbox_billing/models/payment_gateway_failover_gateways_inner.rb +230 -0
- data/lib/cbox_billing/models/payment_gateway_failover_gateways_inner_circuit.rb +288 -0
- data/lib/cbox_billing/models/payment_gateway_failover_routing.rb +235 -0
- data/lib/cbox_billing/models/payment_intent_request.rb +254 -0
- data/lib/cbox_billing/models/payment_mandate.rb +253 -0
- data/lib/cbox_billing/models/payment_method.rb +374 -0
- data/lib/cbox_billing/models/payment_method_id_request.rb +177 -0
- data/lib/cbox_billing/models/payment_method_list.rb +226 -0
- data/lib/cbox_billing/models/payment_method_set.rb +180 -0
- data/lib/cbox_billing/models/payment_terms.rb +281 -0
- data/lib/cbox_billing/models/payment_terms_request.rb +235 -0
- data/lib/cbox_billing/models/pending_approval.rb +229 -0
- data/lib/cbox_billing/models/pending_price_change.rb +257 -0
- data/lib/cbox_billing/models/per_value_entitlements.rb +206 -0
- data/lib/cbox_billing/models/per_value_entitlements_values_value.rb +263 -0
- data/lib/cbox_billing/models/plan.rb +425 -0
- data/lib/cbox_billing/models/plan_change_input.rb +224 -0
- data/lib/cbox_billing/models/plan_change_preview.rb +478 -0
- data/lib/cbox_billing/models/plan_change_preview_seat_types_inner.rb +356 -0
- data/lib/cbox_billing/models/plan_change_price_options.rb +280 -0
- data/lib/cbox_billing/models/plan_change_price_options_keep_negotiated.rb +230 -0
- data/lib/cbox_billing/models/plan_change_request.rb +256 -0
- data/lib/cbox_billing/models/plan_change_result.rb +543 -0
- data/lib/cbox_billing/models/plan_features_value.rb +105 -0
- data/lib/cbox_billing/models/plan_list.rb +253 -0
- data/lib/cbox_billing/models/plan_meter_entitlement.rb +250 -0
- data/lib/cbox_billing/models/plan_move.rb +386 -0
- data/lib/cbox_billing/models/plan_move_subscribers.rb +188 -0
- data/lib/cbox_billing/models/plan_price.rb +256 -0
- data/lib/cbox_billing/models/plan_prices_inner.rb +241 -0
- data/lib/cbox_billing/models/plane_invoice_list.rb +226 -0
- data/lib/cbox_billing/models/plane_invoice_list_all_of_data.rb +557 -0
- data/lib/cbox_billing/models/portal_session_request.rb +309 -0
- data/lib/cbox_billing/models/prepare_tax_return200_response.rb +177 -0
- data/lib/cbox_billing/models/prepare_tax_return_request.rb +237 -0
- data/lib/cbox_billing/models/preview_renewal_alignment_request.rb +201 -0
- data/lib/cbox_billing/models/preview_service_invitation200_response.rb +161 -0
- data/lib/cbox_billing/models/preview_service_invitation200_response_invitation.rb +189 -0
- data/lib/cbox_billing/models/preview_service_invitation_request.rb +186 -0
- data/lib/cbox_billing/models/preview_subscription_cancel_request.rb +216 -0
- data/lib/cbox_billing/models/preview_subscription_coupon200_response.rb +205 -0
- data/lib/cbox_billing/models/preview_subscription_coupon_request.rb +186 -0
- data/lib/cbox_billing/models/price_lock.rb +215 -0
- data/lib/cbox_billing/models/price_lock_state.rb +190 -0
- data/lib/cbox_billing/models/price_tax.rb +348 -0
- data/lib/cbox_billing/models/private_plan.rb +380 -0
- data/lib/cbox_billing/models/product_definition_manifest.rb +269 -0
- data/lib/cbox_billing/models/product_definition_manifest_features_inner.rb +333 -0
- data/lib/cbox_billing/models/product_definition_manifest_meters_inner.rb +434 -0
- data/lib/cbox_billing/models/product_file.rb +420 -0
- data/lib/cbox_billing/models/proration_line.rb +203 -0
- data/lib/cbox_billing/models/quantity_preview.rb +321 -0
- data/lib/cbox_billing/models/quantity_request.rb +196 -0
- data/lib/cbox_billing/models/quote.rb +700 -0
- data/lib/cbox_billing/models/quote_all_of_acceptance.rb +206 -0
- data/lib/cbox_billing/models/quote_all_of_approval.rb +201 -0
- data/lib/cbox_billing/models/quote_all_of_grants.rb +205 -0
- data/lib/cbox_billing/models/quote_all_of_lines.rb +284 -0
- data/lib/cbox_billing/models/quote_all_of_terms.rb +285 -0
- data/lib/cbox_billing/models/quote_all_of_terms_ramp.rb +169 -0
- data/lib/cbox_billing/models/quote_all_of_totals.rb +255 -0
- data/lib/cbox_billing/models/quote_all_of_totals_lines.rb +223 -0
- data/lib/cbox_billing/models/quote_line_grants.rb +212 -0
- data/lib/cbox_billing/models/quote_line_grants_features_inner.rb +204 -0
- data/lib/cbox_billing/models/quote_line_grants_meters_inner.rb +260 -0
- data/lib/cbox_billing/models/quote_line_request.rb +368 -0
- data/lib/cbox_billing/models/quote_list.rb +226 -0
- data/lib/cbox_billing/models/quote_request.rb +650 -0
- data/lib/cbox_billing/models/quote_request_ramp_inner.rb +221 -0
- data/lib/cbox_billing/models/quote_signer.rb +434 -0
- data/lib/cbox_billing/models/quote_signer_request.rb +247 -0
- data/lib/cbox_billing/models/quote_signer_signature.rb +296 -0
- data/lib/cbox_billing/models/quote_signing.rb +384 -0
- data/lib/cbox_billing/models/quote_signing_request.rb +278 -0
- data/lib/cbox_billing/models/quote_signing_signed_document.rb +240 -0
- data/lib/cbox_billing/models/quote_summary.rb +440 -0
- data/lib/cbox_billing/models/rate_limit_error_body.rb +177 -0
- data/lib/cbox_billing/models/reconcile_id_signals_inclusion200_response.rb +211 -0
- data/lib/cbox_billing/models/reconcile_id_signals_inclusion_request.rb +162 -0
- data/lib/cbox_billing/models/record_invoice_payment_request.rb +223 -0
- data/lib/cbox_billing/models/recurring_price.rb +230 -0
- data/lib/cbox_billing/models/refund.rb +493 -0
- data/lib/cbox_billing/models/refund_list.rb +179 -0
- data/lib/cbox_billing/models/refund_order_request.rb +223 -0
- data/lib/cbox_billing/models/refund_request.rb +227 -0
- data/lib/cbox_billing/models/refund_result.rb +239 -0
- data/lib/cbox_billing/models/refusal.rb +205 -0
- data/lib/cbox_billing/models/release_invoice_from_review200_response.rb +205 -0
- data/lib/cbox_billing/models/remove_billing_parent_request.rb +186 -0
- data/lib/cbox_billing/models/remove_subscription_coupon200_response.rb +177 -0
- data/lib/cbox_billing/models/remove_subscription_coupon_request.rb +177 -0
- data/lib/cbox_billing/models/reserve_outcome.rb +251 -0
- data/lib/cbox_billing/models/reserve_request.rb +225 -0
- data/lib/cbox_billing/models/reserve_request_meters_inner.rb +212 -0
- data/lib/cbox_billing/models/reset_environment200_response.rb +187 -0
- data/lib/cbox_billing/models/reset_environment_request.rb +162 -0
- data/lib/cbox_billing/models/reset_period.rb +247 -0
- data/lib/cbox_billing/models/resource_limit.rb +392 -0
- data/lib/cbox_billing/models/retry_accounting_sync202_response.rb +177 -0
- data/lib/cbox_billing/models/retry_invoice_dunning_request.rb +176 -0
- data/lib/cbox_billing/models/reverse_invoice_payment_request.rb +186 -0
- data/lib/cbox_billing/models/revoke_limit_increase_request.rb +195 -0
- data/lib/cbox_billing/models/schedule_phase.rb +486 -0
- data/lib/cbox_billing/models/schedule_phase_request.rb +396 -0
- data/lib/cbox_billing/models/schedule_plan_move_request.rb +231 -0
- data/lib/cbox_billing/models/scheduled_catalog_change.rb +331 -0
- data/lib/cbox_billing/models/scheduled_catalog_change_existing.rb +215 -0
- data/lib/cbox_billing/models/seat_breakdown.rb +404 -0
- data/lib/cbox_billing/models/seat_entitlement.rb +267 -0
- data/lib/cbox_billing/models/seat_ledger_entry.rb +440 -0
- data/lib/cbox_billing/models/seat_ledger_page.rb +205 -0
- data/lib/cbox_billing/models/seat_ledger_page_meta.rb +255 -0
- data/lib/cbox_billing/models/seat_reassign_request.rb +187 -0
- data/lib/cbox_billing/models/seat_subject_request.rb +178 -0
- data/lib/cbox_billing/models/seat_type_change.rb +384 -0
- data/lib/cbox_billing/models/seat_type_entitlement.rb +269 -0
- data/lib/cbox_billing/models/seat_type_quantity_request.rb +205 -0
- data/lib/cbox_billing/models/seat_type_response.rb +177 -0
- data/lib/cbox_billing/models/seat_type_state.rb +565 -0
- data/lib/cbox_billing/models/seat_type_state_holders_inner.rb +189 -0
- data/lib/cbox_billing/models/seats_set_request.rb +186 -0
- data/lib/cbox_billing/models/service_admission_identity.rb +237 -0
- data/lib/cbox_billing/models/service_admission_input.rb +388 -0
- data/lib/cbox_billing/models/set_backup_card_consent200_response.rb +189 -0
- data/lib/cbox_billing/models/set_backup_card_consent_request.rb +177 -0
- data/lib/cbox_billing/models/set_billing_parent409_response.rb +227 -0
- data/lib/cbox_billing/models/set_billing_parent_request.rb +212 -0
- data/lib/cbox_billing/models/set_customer_contract_request.rb +197 -0
- data/lib/cbox_billing/models/set_invoice_consolidation_request.rb +177 -0
- data/lib/cbox_billing/models/set_overage_cap422_response.rb +227 -0
- data/lib/cbox_billing/models/set_product_delivery_request.rb +342 -0
- data/lib/cbox_billing/models/set_subscription_purchase_order200_response.rb +189 -0
- data/lib/cbox_billing/models/set_subscription_purchase_order_request.rb +176 -0
- data/lib/cbox_billing/models/setup_intent.rb +302 -0
- data/lib/cbox_billing/models/setup_intent_request.rb +177 -0
- data/lib/cbox_billing/models/show_environment200_response.rb +160 -0
- data/lib/cbox_billing/models/signals_source200_response.rb +214 -0
- data/lib/cbox_billing/models/signals_source200_response_meta.rb +471 -0
- data/lib/cbox_billing/models/signals_source_erasures200_response.rb +214 -0
- data/lib/cbox_billing/models/signals_source_erasures200_response_meta.rb +329 -0
- data/lib/cbox_billing/models/signed_agreement.rb +498 -0
- data/lib/cbox_billing/models/signed_agreement_document.rb +252 -0
- data/lib/cbox_billing/models/skip_accounting_contact_import_rows200_response.rb +177 -0
- data/lib/cbox_billing/models/skip_accounting_contact_import_rows_request.rb +188 -0
- data/lib/cbox_billing/models/skip_invoice_dunning_step_request.rb +186 -0
- data/lib/cbox_billing/models/spend_alert.rb +395 -0
- data/lib/cbox_billing/models/start_accounting_contact_import202_response.rb +177 -0
- data/lib/cbox_billing/models/stop_invoice_dunning_request.rb +247 -0
- data/lib/cbox_billing/models/submit_dispute_evidence_request.rb +178 -0
- data/lib/cbox_billing/models/subscribe_request.rb +373 -0
- data/lib/cbox_billing/models/subscribe_result.rb +215 -0
- data/lib/cbox_billing/models/subscription.rb +617 -0
- data/lib/cbox_billing/models/subscription_bundle.rb +200 -0
- data/lib/cbox_billing/models/subscription_change.rb +505 -0
- data/lib/cbox_billing/models/subscription_change_list.rb +226 -0
- data/lib/cbox_billing/models/subscription_contract.rb +188 -0
- data/lib/cbox_billing/models/subscription_contract_term.rb +385 -0
- data/lib/cbox_billing/models/subscription_date_move.rb +295 -0
- data/lib/cbox_billing/models/subscription_discount.rb +315 -0
- data/lib/cbox_billing/models/subscription_pending_change.rb +171 -0
- data/lib/cbox_billing/models/subscription_standing.rb +230 -0
- data/lib/cbox_billing/models/subscription_terms.rb +459 -0
- data/lib/cbox_billing/models/subscription_terms_price.rb +178 -0
- data/lib/cbox_billing/models/sync_product_definitions200_response.rb +179 -0
- data/lib/cbox_billing/models/sync_product_definitions200_response_data_inner.rb +335 -0
- data/lib/cbox_billing/models/tax_return.rb +663 -0
- data/lib/cbox_billing/models/tax_return_boxes_inner.rb +307 -0
- data/lib/cbox_billing/models/tax_return_corrections_inner.rb +178 -0
- data/lib/cbox_billing/models/tax_return_issues_inner.rb +227 -0
- data/lib/cbox_billing/models/tax_return_line.rb +550 -0
- data/lib/cbox_billing/models/tax_return_line_document.rb +214 -0
- data/lib/cbox_billing/models/tax_return_line_fx.rb +212 -0
- data/lib/cbox_billing/models/tax_return_member_states_inner.rb +250 -0
- data/lib/cbox_billing/models/tax_return_not_from_billing_inner.rb +229 -0
- data/lib/cbox_billing/models/test_clock_advance_request.rb +178 -0
- data/lib/cbox_billing/models/test_clock_advance_result.rb +334 -0
- data/lib/cbox_billing/models/test_clock_advance_result_clock.rb +230 -0
- data/lib/cbox_billing/models/upcoming_invoice.rb +440 -0
- data/lib/cbox_billing/models/upcoming_invoice_first_period.rb +251 -0
- data/lib/cbox_billing/models/upcoming_invoice_interim.rb +245 -0
- data/lib/cbox_billing/models/upcoming_invoice_interim_invoices_inner.rb +286 -0
- data/lib/cbox_billing/models/upcoming_invoice_interim_reconciliation.rb +270 -0
- data/lib/cbox_billing/models/upcoming_invoice_interim_reconciliation_credit_notes_inner.rb +282 -0
- data/lib/cbox_billing/models/upcoming_invoice_lines_inner.rb +282 -0
- data/lib/cbox_billing/models/update_affiliate_program_request.rb +398 -0
- data/lib/cbox_billing/models/update_affiliate_request.rb +321 -0
- data/lib/cbox_billing/models/update_dispute_evidence_request.rb +177 -0
- data/lib/cbox_billing/models/update_dispute_evidence_request_evidence.rb +251 -0
- data/lib/cbox_billing/models/update_entitlement_override_request.rb +309 -0
- data/lib/cbox_billing/models/update_invoice_draft_request.rb +214 -0
- data/lib/cbox_billing/models/update_invoice_draft_request_lines_inner.rb +224 -0
- data/lib/cbox_billing/models/update_license_key_request.rb +186 -0
- data/lib/cbox_billing/models/update_payment_gateway_routing_request.rb +234 -0
- data/lib/cbox_billing/models/update_product_file_request.rb +208 -0
- data/lib/cbox_billing/models/update_spend_alert_request.rb +296 -0
- data/lib/cbox_billing/models/upgrade_offer.rb +189 -0
- data/lib/cbox_billing/models/usage_correction.rb +471 -0
- data/lib/cbox_billing/models/usage_correction_actor.rb +211 -0
- data/lib/cbox_billing/models/usage_correction_adjustment.rb +411 -0
- data/lib/cbox_billing/models/usage_correction_list.rb +226 -0
- data/lib/cbox_billing/models/usage_correction_list_all_of_data.rb +506 -0
- data/lib/cbox_billing/models/usage_corrections_request.rb +246 -0
- data/lib/cbox_billing/models/usage_corrections_request_corrections_inner.rb +413 -0
- data/lib/cbox_billing/models/usage_corrections_result.rb +395 -0
- data/lib/cbox_billing/models/usage_corrections_result_rejected_inner.rb +262 -0
- data/lib/cbox_billing/models/usage_event_values.rb +252 -0
- data/lib/cbox_billing/models/usage_events_request.rb +234 -0
- data/lib/cbox_billing/models/usage_events_request_events_inner.rb +385 -0
- data/lib/cbox_billing/models/usage_events_request_events_inner_dimensions_value.rb +104 -0
- data/lib/cbox_billing/models/usage_events_result.rb +301 -0
- data/lib/cbox_billing/models/usage_events_result_rejected_inner.rb +263 -0
- data/lib/cbox_billing/models/usage_ingest_request.rb +225 -0
- data/lib/cbox_billing/models/usage_ingest_request_entries_inner.rb +290 -0
- data/lib/cbox_billing/models/usage_ingest_result.rb +374 -0
- data/lib/cbox_billing/models/usage_ingest_result_unsupported_meters_inner.rb +203 -0
- data/lib/cbox_billing/models/usage_price.rb +258 -0
- data/lib/cbox_billing/models/usage_summary.rb +205 -0
- data/lib/cbox_billing/models/usage_summary_meters_value.rb +289 -0
- data/lib/cbox_billing/models/usage_summary_meters_value_breakdown_inner.rb +205 -0
- data/lib/cbox_billing/models/usage_summary_period.rb +247 -0
- data/lib/cbox_billing/models/usage_threshold.rb +275 -0
- data/lib/cbox_billing/models/usage_threshold_level.rb +217 -0
- data/lib/cbox_billing/models/usage_threshold_request.rb +248 -0
- data/lib/cbox_billing/models/usage_threshold_subscriptions_inner.rb +201 -0
- data/lib/cbox_billing/models/validation_error_body.rb +206 -0
- data/lib/cbox_billing/models/value_rule.rb +291 -0
- data/lib/cbox_billing/models/value_rules.rb +235 -0
- data/lib/cbox_billing/models/waitlist_answer.rb +105 -0
- data/lib/cbox_billing/models/waitlist_question.rb +411 -0
- data/lib/cbox_billing/models/webhook_delivery.rb +435 -0
- data/lib/cbox_billing/models/webhook_delivery_list.rb +226 -0
- data/lib/cbox_billing/models/webhook_endpoint.rb +347 -0
- data/lib/cbox_billing/models/webhook_endpoint_list.rb +226 -0
- data/lib/cbox_billing/models/webhook_endpoint_request.rb +270 -0
- data/lib/cbox_billing/models/webhook_endpoint_with_secret.rb +367 -0
- data/lib/cbox_billing/models/withdraw_agreement_request.rb +220 -0
- data/lib/cbox_billing/models/withdraw_agreement_request_user.rb +177 -0
- data/lib/cbox_billing/pagination.rb +28 -0
- data/lib/cbox_billing/retry.rb +96 -0
- data/lib/cbox_billing/version.rb +15 -0
- data/lib/cbox_billing/webhook.rb +77 -0
- data/lib/cbox_billing.rb +765 -0
- metadata +824 -0
|
@@ -0,0 +1,746 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Cbox Billing API
|
|
3
|
+
|
|
4
|
+
#The HTTP API of Cbox Billing. Reference: https://github.com/cboxdk/cbox-billing/tree/main/docs/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module CboxBilling
|
|
16
|
+
class EnforcementApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Commit a reservation to actual usage
|
|
23
|
+
# Settle a held reservation to the actual usage per meter. Returns unused allowance/lease and appends one durable usage event per bucket with non-zero usage, then drops the reservation. A missing/expired reservation is `404`; an actual that exceeds its reserved estimate is `422` from the engine's own validation.
|
|
24
|
+
# @param commit_request [CommitRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Ok]
|
|
27
|
+
def commit_reservation(commit_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = commit_reservation_with_http_info(commit_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Commit a reservation to actual usage
|
|
33
|
+
# Settle a held reservation to the actual usage per meter. Returns unused allowance/lease and appends one durable usage event per bucket with non-zero usage, then drops the reservation. A missing/expired reservation is `404`; an actual that exceeds its reserved estimate is `422` from the engine's own validation.
|
|
34
|
+
# @param commit_request [CommitRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Ok, Integer, Hash)>] Ok data, response status code and response headers
|
|
37
|
+
def commit_reservation_with_http_info(commit_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: EnforcementApi.commit_reservation ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'commit_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && commit_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'commit_request' when calling EnforcementApi.commit_reservation"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/commit'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(commit_request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'Ok'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"EnforcementApi.commit_reservation",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: EnforcementApi#commit_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Void or amend usage events
|
|
91
|
+
# Void or amend events already sent to `/events`, by the `id` they were sent with, up to 500 a request. An event can be corrected while its id is remembered (`CBOX_BILLING_DEDUP_WINDOW_DAYS`, 32 by default). - `void` takes the event out of every total. Its id stays spent: a late retry of the original is a duplicate. - `amend` changes `value`, `weight`, `unique_key` or `dimensions`; what is left out keeps the event's. Its time and meter never change. All of a request applies or none does. A correction that cannot be taken is listed under `rejected` and the rest still apply. `id` is your id for a correction: sent again, it is a duplicate and changes nothing. `dry_run: true` says what would happen and changes nothing. Each correction says where the event lands (`impact`). In a period no invoice has billed yet, the period's invoice bills the corrected usage. In a period an invoice already billed, the period is priced as a whole before and after, and the difference per subscription and meter is an adjustment: a credit note against the invoice that billed it, or a line on the next invoice. An issued invoice is never changed. `usage.corrected` fires once per request.
|
|
92
|
+
# @param usage_corrections_request [UsageCorrectionsRequest]
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @option opts [String] :idempotency_key An opaque, caller-generated key giving this write exactly-once semantics. A retry with the same key replays the first response instead of re-running the effect; reusing it with a different body is `409`.
|
|
95
|
+
# @return [UsageCorrectionsResult]
|
|
96
|
+
def correct_usage_events(usage_corrections_request, opts = {})
|
|
97
|
+
data, _status_code, _headers = correct_usage_events_with_http_info(usage_corrections_request, opts)
|
|
98
|
+
data
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Void or amend usage events
|
|
102
|
+
# Void or amend events already sent to `/events`, by the `id` they were sent with, up to 500 a request. An event can be corrected while its id is remembered (`CBOX_BILLING_DEDUP_WINDOW_DAYS`, 32 by default). - `void` takes the event out of every total. Its id stays spent: a late retry of the original is a duplicate. - `amend` changes `value`, `weight`, `unique_key` or `dimensions`; what is left out keeps the event's. Its time and meter never change. All of a request applies or none does. A correction that cannot be taken is listed under `rejected` and the rest still apply. `id` is your id for a correction: sent again, it is a duplicate and changes nothing. `dry_run: true` says what would happen and changes nothing. Each correction says where the event lands (`impact`). In a period no invoice has billed yet, the period's invoice bills the corrected usage. In a period an invoice already billed, the period is priced as a whole before and after, and the difference per subscription and meter is an adjustment: a credit note against the invoice that billed it, or a line on the next invoice. An issued invoice is never changed. `usage.corrected` fires once per request.
|
|
103
|
+
# @param usage_corrections_request [UsageCorrectionsRequest]
|
|
104
|
+
# @param [Hash] opts the optional parameters
|
|
105
|
+
# @option opts [String] :idempotency_key An opaque, caller-generated key giving this write exactly-once semantics. A retry with the same key replays the first response instead of re-running the effect; reusing it with a different body is `409`.
|
|
106
|
+
# @return [Array<(UsageCorrectionsResult, Integer, Hash)>] UsageCorrectionsResult data, response status code and response headers
|
|
107
|
+
def correct_usage_events_with_http_info(usage_corrections_request, opts = {})
|
|
108
|
+
if @api_client.config.debugging
|
|
109
|
+
@api_client.config.logger.debug 'Calling API: EnforcementApi.correct_usage_events ...'
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'usage_corrections_request' is set
|
|
112
|
+
if @api_client.config.client_side_validation && usage_corrections_request.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'usage_corrections_request' when calling EnforcementApi.correct_usage_events"
|
|
114
|
+
end
|
|
115
|
+
# resource path
|
|
116
|
+
local_var_path = '/events/corrections'
|
|
117
|
+
|
|
118
|
+
# query parameters
|
|
119
|
+
query_params = opts[:query_params] || {}
|
|
120
|
+
|
|
121
|
+
# header parameters
|
|
122
|
+
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
125
|
+
# HTTP header 'Content-Type'
|
|
126
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
127
|
+
if !content_type.nil?
|
|
128
|
+
header_params['Content-Type'] = content_type
|
|
129
|
+
end
|
|
130
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
131
|
+
|
|
132
|
+
# form parameters
|
|
133
|
+
form_params = opts[:form_params] || {}
|
|
134
|
+
|
|
135
|
+
# http body (model)
|
|
136
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(usage_corrections_request)
|
|
137
|
+
|
|
138
|
+
# return_type
|
|
139
|
+
return_type = opts[:debug_return_type] || 'UsageCorrectionsResult'
|
|
140
|
+
|
|
141
|
+
# auth_names
|
|
142
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
143
|
+
|
|
144
|
+
new_options = opts.merge(
|
|
145
|
+
:operation => :"EnforcementApi.correct_usage_events",
|
|
146
|
+
:header_params => header_params,
|
|
147
|
+
:query_params => query_params,
|
|
148
|
+
:form_params => form_params,
|
|
149
|
+
:body => post_body,
|
|
150
|
+
:auth_names => auth_names,
|
|
151
|
+
:return_type => return_type
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
155
|
+
if @api_client.config.debugging
|
|
156
|
+
@api_client.config.logger.debug "API called: EnforcementApi#correct_usage_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
157
|
+
end
|
|
158
|
+
return data, status_code, headers
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Lease a slice of an org's remaining allowance
|
|
162
|
+
# Lease up to `size` units of an org's remaining includable allowance for a meter — billing's side of the pessimistic lease the SDK refills local enforcement from. Grants fewer than requested when the allowance is nearly spent, `0` when exhausted. A lease belongs to the org's current billing period and is stored under its `lease_id` until `expires_at`. A new period starts with the full allowance. An expired lease's units return to the budget, less what reported usage shows was spent. With `seat_type` and `user_ref`, the lease is for one user of a seat-gated dataset: it is granted only while that user holds a seat of the type. Otherwise nothing is drawn and the response is `granted: 0` with `reason: seat_required`. Not idempotency-keyed: like the other enforcement hot-path calls (`usage`, `reserve`, `commit`) a lease is a fresh, short-lived grant with its own `lease_id`, and a duplicate simply over-grants briefly and self-heals at TTL expiry — so no `Idempotency-Key` is honoured here (the server runs no idempotency middleware on this route). `dimensions` names the values the work is for, such as `{country: gb}`. When the meter's entitlement has a rule for that value, the lease is of the value's own bucket: its access, its allowance (plus the credit left in the pools that cover it, for a `credits` value) and its hard stop. Without it, the lease is of the default bucket. When the value is only known after the work, lease without it and report the value with the usage: the usage still counts against the value, and the value's hard stop applies on the next lease that names it. A meter, or a named dimension value, that requires an agreement the customer has not accepted leases nothing: `granted: 0` with `blocked` (`reason: agreement_required`, the agreement and its `portal_url`). A meter that bills overage up to an overage cap leases up to its included allowance plus the cap, counted as a blocking meter's allowance is. Once that is spent the lease grants `0` and says `reason: overage_cap_reached`. Without a cap, a meter that bills overage leases the requested size, as before.
|
|
163
|
+
# @param lease_request [LeaseRequest]
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @return [Lease]
|
|
166
|
+
def create_lease(lease_request, opts = {})
|
|
167
|
+
data, _status_code, _headers = create_lease_with_http_info(lease_request, opts)
|
|
168
|
+
data
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Lease a slice of an org's remaining allowance
|
|
172
|
+
# Lease up to `size` units of an org's remaining includable allowance for a meter — billing's side of the pessimistic lease the SDK refills local enforcement from. Grants fewer than requested when the allowance is nearly spent, `0` when exhausted. A lease belongs to the org's current billing period and is stored under its `lease_id` until `expires_at`. A new period starts with the full allowance. An expired lease's units return to the budget, less what reported usage shows was spent. With `seat_type` and `user_ref`, the lease is for one user of a seat-gated dataset: it is granted only while that user holds a seat of the type. Otherwise nothing is drawn and the response is `granted: 0` with `reason: seat_required`. Not idempotency-keyed: like the other enforcement hot-path calls (`usage`, `reserve`, `commit`) a lease is a fresh, short-lived grant with its own `lease_id`, and a duplicate simply over-grants briefly and self-heals at TTL expiry — so no `Idempotency-Key` is honoured here (the server runs no idempotency middleware on this route). `dimensions` names the values the work is for, such as `{country: gb}`. When the meter's entitlement has a rule for that value, the lease is of the value's own bucket: its access, its allowance (plus the credit left in the pools that cover it, for a `credits` value) and its hard stop. Without it, the lease is of the default bucket. When the value is only known after the work, lease without it and report the value with the usage: the usage still counts against the value, and the value's hard stop applies on the next lease that names it. A meter, or a named dimension value, that requires an agreement the customer has not accepted leases nothing: `granted: 0` with `blocked` (`reason: agreement_required`, the agreement and its `portal_url`). A meter that bills overage up to an overage cap leases up to its included allowance plus the cap, counted as a blocking meter's allowance is. Once that is spent the lease grants `0` and says `reason: overage_cap_reached`. Without a cap, a meter that bills overage leases the requested size, as before.
|
|
173
|
+
# @param lease_request [LeaseRequest]
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @return [Array<(Lease, Integer, Hash)>] Lease data, response status code and response headers
|
|
176
|
+
def create_lease_with_http_info(lease_request, opts = {})
|
|
177
|
+
if @api_client.config.debugging
|
|
178
|
+
@api_client.config.logger.debug 'Calling API: EnforcementApi.create_lease ...'
|
|
179
|
+
end
|
|
180
|
+
# verify the required parameter 'lease_request' is set
|
|
181
|
+
if @api_client.config.client_side_validation && lease_request.nil?
|
|
182
|
+
fail ArgumentError, "Missing the required parameter 'lease_request' when calling EnforcementApi.create_lease"
|
|
183
|
+
end
|
|
184
|
+
# resource path
|
|
185
|
+
local_var_path = '/leases'
|
|
186
|
+
|
|
187
|
+
# query parameters
|
|
188
|
+
query_params = opts[:query_params] || {}
|
|
189
|
+
|
|
190
|
+
# header parameters
|
|
191
|
+
header_params = opts[:header_params] || {}
|
|
192
|
+
# HTTP header 'Accept' (if needed)
|
|
193
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
194
|
+
# HTTP header 'Content-Type'
|
|
195
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
196
|
+
if !content_type.nil?
|
|
197
|
+
header_params['Content-Type'] = content_type
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# form parameters
|
|
201
|
+
form_params = opts[:form_params] || {}
|
|
202
|
+
|
|
203
|
+
# http body (model)
|
|
204
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(lease_request)
|
|
205
|
+
|
|
206
|
+
# return_type
|
|
207
|
+
return_type = opts[:debug_return_type] || 'Lease'
|
|
208
|
+
|
|
209
|
+
# auth_names
|
|
210
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
211
|
+
|
|
212
|
+
new_options = opts.merge(
|
|
213
|
+
:operation => :"EnforcementApi.create_lease",
|
|
214
|
+
:header_params => header_params,
|
|
215
|
+
:query_params => query_params,
|
|
216
|
+
:form_params => form_params,
|
|
217
|
+
:body => post_body,
|
|
218
|
+
:auth_names => auth_names,
|
|
219
|
+
:return_type => return_type
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
223
|
+
if @api_client.config.debugging
|
|
224
|
+
@api_client.config.logger.debug "API called: EnforcementApi#create_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
225
|
+
end
|
|
226
|
+
return data, status_code, headers
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# An org's resolved per-meter policies
|
|
230
|
+
# The org's resolved per-meter policies — the payload the SDK caches to enforce locally, read through the same policy resolver the enforcer uses. Deny-by-default: a meter with no resolved policy is reported `enabled: false`, never omitted. A disabled meter with a reachable upgrade path also carries an `upgrade` offer. A meter whose entitlement has rules per dimension value also carries `per_value`: the dimension and each listed value's own access, allowance and overage. Values not listed follow the meter's own figures. With `dimensions[country]=gb`, each such meter is answered for that value: its own figures are the value's bucket, and `overage` is `credits` for a value that draws on credits. A meter that requires an agreement the customer has not accepted answers `enabled: false` with `blocked` (`reason: agreement_required`, the agreement's key, title, type and version in force, and `portal_url`, the page where the customer reads and accepts it). An open meter whose agreement is required only for some dimension values carries `blocked_values`, by dimension and value. Name the value with `dimensions[country]=gb` to have the meter answer for it. Meters without a required agreement answer as before. `seats` lists each seat type of the org's serving subscriptions (`default` is the plan's own seats), with the entitlement a holder gets and who holds one. A suspended account holds none. A meter that bills overage up to a cap also carries `overage_cap`: the cap in units (and the amount when it was set in money), who set it, how much overage the window used and has left, and whether it is reached. Once it is, the meter also says `reason: overage_cap_reached`: usage stops there until the window resets. A `bill` value with its own cap carries `overage_cap` under `per_value` too. Without a cap neither key is sent.
|
|
231
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @option opts [String] :reference What inside the organization the subscription is for — a Cbox Sites website id (decision D6). Exact: omitted means the organization-level subscription. Usage and allowances for a reference count under the subject `org#reference`. Also accepted in the JSON body of a `POST`.
|
|
234
|
+
# @option opts [Hash<String, String>] :dimensions The dimension values the client is about to use, as `dimensions[country]=gb`. Each value at most 128 characters.
|
|
235
|
+
# @return [EntitlementsResponse]
|
|
236
|
+
def get_entitlements(org, opts = {})
|
|
237
|
+
data, _status_code, _headers = get_entitlements_with_http_info(org, opts)
|
|
238
|
+
data
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# An org's resolved per-meter policies
|
|
242
|
+
# The org's resolved per-meter policies — the payload the SDK caches to enforce locally, read through the same policy resolver the enforcer uses. Deny-by-default: a meter with no resolved policy is reported `enabled: false`, never omitted. A disabled meter with a reachable upgrade path also carries an `upgrade` offer. A meter whose entitlement has rules per dimension value also carries `per_value`: the dimension and each listed value's own access, allowance and overage. Values not listed follow the meter's own figures. With `dimensions[country]=gb`, each such meter is answered for that value: its own figures are the value's bucket, and `overage` is `credits` for a value that draws on credits. A meter that requires an agreement the customer has not accepted answers `enabled: false` with `blocked` (`reason: agreement_required`, the agreement's key, title, type and version in force, and `portal_url`, the page where the customer reads and accepts it). An open meter whose agreement is required only for some dimension values carries `blocked_values`, by dimension and value. Name the value with `dimensions[country]=gb` to have the meter answer for it. Meters without a required agreement answer as before. `seats` lists each seat type of the org's serving subscriptions (`default` is the plan's own seats), with the entitlement a holder gets and who holds one. A suspended account holds none. A meter that bills overage up to a cap also carries `overage_cap`: the cap in units (and the amount when it was set in money), who set it, how much overage the window used and has left, and whether it is reached. Once it is, the meter also says `reason: overage_cap_reached`: usage stops there until the window resets. A `bill` value with its own cap carries `overage_cap` under `per_value` too. Without a cap neither key is sent.
|
|
243
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
244
|
+
# @param [Hash] opts the optional parameters
|
|
245
|
+
# @option opts [String] :reference What inside the organization the subscription is for — a Cbox Sites website id (decision D6). Exact: omitted means the organization-level subscription. Usage and allowances for a reference count under the subject `org#reference`. Also accepted in the JSON body of a `POST`.
|
|
246
|
+
# @option opts [Hash<String, String>] :dimensions The dimension values the client is about to use, as `dimensions[country]=gb`. Each value at most 128 characters.
|
|
247
|
+
# @return [Array<(EntitlementsResponse, Integer, Hash)>] EntitlementsResponse data, response status code and response headers
|
|
248
|
+
def get_entitlements_with_http_info(org, opts = {})
|
|
249
|
+
if @api_client.config.debugging
|
|
250
|
+
@api_client.config.logger.debug 'Calling API: EnforcementApi.get_entitlements ...'
|
|
251
|
+
end
|
|
252
|
+
# verify the required parameter 'org' is set
|
|
253
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
254
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling EnforcementApi.get_entitlements"
|
|
255
|
+
end
|
|
256
|
+
pattern = Regexp.new(/^[A-Za-z0-9._:-]{1,191}$/)
|
|
257
|
+
if @api_client.config.client_side_validation && !opts[:'reference'].nil? && opts[:'reference'] !~ pattern
|
|
258
|
+
fail ArgumentError, "invalid value for 'opts[:\"reference\"]' when calling EnforcementApi.get_entitlements, must conform to the pattern #{pattern}."
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# resource path
|
|
262
|
+
local_var_path = '/entitlements/{org}'.sub('{org}', CGI.escape(org.to_s))
|
|
263
|
+
|
|
264
|
+
# query parameters
|
|
265
|
+
query_params = opts[:query_params] || {}
|
|
266
|
+
query_params[:'reference'] = opts[:'reference'] if !opts[:'reference'].nil?
|
|
267
|
+
query_params[:'dimensions'] = opts[:'dimensions'] if !opts[:'dimensions'].nil?
|
|
268
|
+
|
|
269
|
+
# header parameters
|
|
270
|
+
header_params = opts[:header_params] || {}
|
|
271
|
+
# HTTP header 'Accept' (if needed)
|
|
272
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
273
|
+
|
|
274
|
+
# form parameters
|
|
275
|
+
form_params = opts[:form_params] || {}
|
|
276
|
+
|
|
277
|
+
# http body (model)
|
|
278
|
+
post_body = opts[:debug_body]
|
|
279
|
+
|
|
280
|
+
# return_type
|
|
281
|
+
return_type = opts[:debug_return_type] || 'EntitlementsResponse'
|
|
282
|
+
|
|
283
|
+
# auth_names
|
|
284
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
285
|
+
|
|
286
|
+
new_options = opts.merge(
|
|
287
|
+
:operation => :"EnforcementApi.get_entitlements",
|
|
288
|
+
:header_params => header_params,
|
|
289
|
+
:query_params => query_params,
|
|
290
|
+
:form_params => form_params,
|
|
291
|
+
:body => post_body,
|
|
292
|
+
:auth_names => auth_names,
|
|
293
|
+
:return_type => return_type
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
297
|
+
if @api_client.config.debugging
|
|
298
|
+
@api_client.config.logger.debug "API called: EnforcementApi#get_entitlements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
299
|
+
end
|
|
300
|
+
return data, status_code, headers
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# A single boolean/typed feature check
|
|
304
|
+
# A single feature check for the org — the boolean/typed answer a capability gates on. Deny-by-default: an unknown key resolves to `enabled: false` rather than a 404, so a client can gate on any key uniformly. A not-granted feature carries its `upgrade` offer when a reachable plan would grant it.
|
|
305
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
306
|
+
# @param key [String] The feature slug (dots allowed, e.g. `sso`, `platform.multi_tenant`).
|
|
307
|
+
# @param [Hash] opts the optional parameters
|
|
308
|
+
# @option opts [String] :actor Authenticated subject from the trusted backend session, after verifying active organization membership. Required for personal feature betas; omitted context is denied. Cache separately by organization, product, subscription reference, feature AND actor. Beta admission never overrides commercial denial or app permissions.
|
|
309
|
+
# @option opts [String] :reference What inside the organization the subscription is for — a Cbox Sites website id (decision D6). Exact: omitted means the organization-level subscription. Usage and allowances for a reference count under the subject `org#reference`. Also accepted in the JSON body of a `POST`.
|
|
310
|
+
# @return [FeatureCheck]
|
|
311
|
+
def get_feature_entitlement(org, key, opts = {})
|
|
312
|
+
data, _status_code, _headers = get_feature_entitlement_with_http_info(org, key, opts)
|
|
313
|
+
data
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# A single boolean/typed feature check
|
|
317
|
+
# A single feature check for the org — the boolean/typed answer a capability gates on. Deny-by-default: an unknown key resolves to `enabled: false` rather than a 404, so a client can gate on any key uniformly. A not-granted feature carries its `upgrade` offer when a reachable plan would grant it.
|
|
318
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
319
|
+
# @param key [String] The feature slug (dots allowed, e.g. `sso`, `platform.multi_tenant`).
|
|
320
|
+
# @param [Hash] opts the optional parameters
|
|
321
|
+
# @option opts [String] :actor Authenticated subject from the trusted backend session, after verifying active organization membership. Required for personal feature betas; omitted context is denied. Cache separately by organization, product, subscription reference, feature AND actor. Beta admission never overrides commercial denial or app permissions.
|
|
322
|
+
# @option opts [String] :reference What inside the organization the subscription is for — a Cbox Sites website id (decision D6). Exact: omitted means the organization-level subscription. Usage and allowances for a reference count under the subject `org#reference`. Also accepted in the JSON body of a `POST`.
|
|
323
|
+
# @return [Array<(FeatureCheck, Integer, Hash)>] FeatureCheck data, response status code and response headers
|
|
324
|
+
def get_feature_entitlement_with_http_info(org, key, opts = {})
|
|
325
|
+
if @api_client.config.debugging
|
|
326
|
+
@api_client.config.logger.debug 'Calling API: EnforcementApi.get_feature_entitlement ...'
|
|
327
|
+
end
|
|
328
|
+
# verify the required parameter 'org' is set
|
|
329
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
330
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling EnforcementApi.get_feature_entitlement"
|
|
331
|
+
end
|
|
332
|
+
# verify the required parameter 'key' is set
|
|
333
|
+
if @api_client.config.client_side_validation && key.nil?
|
|
334
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling EnforcementApi.get_feature_entitlement"
|
|
335
|
+
end
|
|
336
|
+
if @api_client.config.client_side_validation && !opts[:'actor'].nil? && opts[:'actor'].to_s.length > 191
|
|
337
|
+
fail ArgumentError, 'invalid value for "opts[:"actor"]" when calling EnforcementApi.get_feature_entitlement, the character length must be smaller than or equal to 191.'
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
pattern = Regexp.new(/^[A-Za-z0-9._:-]{1,191}$/)
|
|
341
|
+
if @api_client.config.client_side_validation && !opts[:'reference'].nil? && opts[:'reference'] !~ pattern
|
|
342
|
+
fail ArgumentError, "invalid value for 'opts[:\"reference\"]' when calling EnforcementApi.get_feature_entitlement, must conform to the pattern #{pattern}."
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# resource path
|
|
346
|
+
local_var_path = '/entitlements/{org}/features/{key}'.sub('{org}', CGI.escape(org.to_s)).sub('{key}', CGI.escape(key.to_s))
|
|
347
|
+
|
|
348
|
+
# query parameters
|
|
349
|
+
query_params = opts[:query_params] || {}
|
|
350
|
+
query_params[:'actor'] = opts[:'actor'] if !opts[:'actor'].nil?
|
|
351
|
+
query_params[:'reference'] = opts[:'reference'] if !opts[:'reference'].nil?
|
|
352
|
+
|
|
353
|
+
# header parameters
|
|
354
|
+
header_params = opts[:header_params] || {}
|
|
355
|
+
# HTTP header 'Accept' (if needed)
|
|
356
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
357
|
+
|
|
358
|
+
# form parameters
|
|
359
|
+
form_params = opts[:form_params] || {}
|
|
360
|
+
|
|
361
|
+
# http body (model)
|
|
362
|
+
post_body = opts[:debug_body]
|
|
363
|
+
|
|
364
|
+
# return_type
|
|
365
|
+
return_type = opts[:debug_return_type] || 'FeatureCheck'
|
|
366
|
+
|
|
367
|
+
# auth_names
|
|
368
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
369
|
+
|
|
370
|
+
new_options = opts.merge(
|
|
371
|
+
:operation => :"EnforcementApi.get_feature_entitlement",
|
|
372
|
+
:header_params => header_params,
|
|
373
|
+
:query_params => query_params,
|
|
374
|
+
:form_params => form_params,
|
|
375
|
+
:body => post_body,
|
|
376
|
+
:auth_names => auth_names,
|
|
377
|
+
:return_type => return_type
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
381
|
+
if @api_client.config.debugging
|
|
382
|
+
@api_client.config.logger.debug "API called: EnforcementApi#get_feature_entitlement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
383
|
+
end
|
|
384
|
+
return data, status_code, headers
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# An org's resolved boolean/config feature set
|
|
388
|
+
# The org's resolved feature entitlements — the boolean / non-metered sibling of `/entitlements/{org}` (product gating). Resolved from the org's serving plan's feature grants and any org-level override (the override wins over the plan). Deny-by-default: a feature nobody grants is reported `enabled: false`, never omitted; a config feature carries its typed `value`. A not-granted feature with a reachable plan also carries an `upgrade` offer.
|
|
389
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
390
|
+
# @param [Hash] opts the optional parameters
|
|
391
|
+
# @option opts [String] :reference What inside the organization the subscription is for — a Cbox Sites website id (decision D6). Exact: omitted means the organization-level subscription. Usage and allowances for a reference count under the subject `org#reference`. Also accepted in the JSON body of a `POST`.
|
|
392
|
+
# @return [FeatureSet]
|
|
393
|
+
def get_feature_entitlements(org, opts = {})
|
|
394
|
+
data, _status_code, _headers = get_feature_entitlements_with_http_info(org, opts)
|
|
395
|
+
data
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
# An org's resolved boolean/config feature set
|
|
399
|
+
# The org's resolved feature entitlements — the boolean / non-metered sibling of `/entitlements/{org}` (product gating). Resolved from the org's serving plan's feature grants and any org-level override (the override wins over the plan). Deny-by-default: a feature nobody grants is reported `enabled: false`, never omitted; a config feature carries its typed `value`. A not-granted feature with a reachable plan also carries an `upgrade` offer.
|
|
400
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
401
|
+
# @param [Hash] opts the optional parameters
|
|
402
|
+
# @option opts [String] :reference What inside the organization the subscription is for — a Cbox Sites website id (decision D6). Exact: omitted means the organization-level subscription. Usage and allowances for a reference count under the subject `org#reference`. Also accepted in the JSON body of a `POST`.
|
|
403
|
+
# @return [Array<(FeatureSet, Integer, Hash)>] FeatureSet data, response status code and response headers
|
|
404
|
+
def get_feature_entitlements_with_http_info(org, opts = {})
|
|
405
|
+
if @api_client.config.debugging
|
|
406
|
+
@api_client.config.logger.debug 'Calling API: EnforcementApi.get_feature_entitlements ...'
|
|
407
|
+
end
|
|
408
|
+
# verify the required parameter 'org' is set
|
|
409
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
410
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling EnforcementApi.get_feature_entitlements"
|
|
411
|
+
end
|
|
412
|
+
pattern = Regexp.new(/^[A-Za-z0-9._:-]{1,191}$/)
|
|
413
|
+
if @api_client.config.client_side_validation && !opts[:'reference'].nil? && opts[:'reference'] !~ pattern
|
|
414
|
+
fail ArgumentError, "invalid value for 'opts[:\"reference\"]' when calling EnforcementApi.get_feature_entitlements, must conform to the pattern #{pattern}."
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
# resource path
|
|
418
|
+
local_var_path = '/entitlements/{org}/features'.sub('{org}', CGI.escape(org.to_s))
|
|
419
|
+
|
|
420
|
+
# query parameters
|
|
421
|
+
query_params = opts[:query_params] || {}
|
|
422
|
+
query_params[:'reference'] = opts[:'reference'] if !opts[:'reference'].nil?
|
|
423
|
+
|
|
424
|
+
# header parameters
|
|
425
|
+
header_params = opts[:header_params] || {}
|
|
426
|
+
# HTTP header 'Accept' (if needed)
|
|
427
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
428
|
+
|
|
429
|
+
# form parameters
|
|
430
|
+
form_params = opts[:form_params] || {}
|
|
431
|
+
|
|
432
|
+
# http body (model)
|
|
433
|
+
post_body = opts[:debug_body]
|
|
434
|
+
|
|
435
|
+
# return_type
|
|
436
|
+
return_type = opts[:debug_return_type] || 'FeatureSet'
|
|
437
|
+
|
|
438
|
+
# auth_names
|
|
439
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
440
|
+
|
|
441
|
+
new_options = opts.merge(
|
|
442
|
+
:operation => :"EnforcementApi.get_feature_entitlements",
|
|
443
|
+
:header_params => header_params,
|
|
444
|
+
:query_params => query_params,
|
|
445
|
+
:form_params => form_params,
|
|
446
|
+
:body => post_body,
|
|
447
|
+
:auth_names => auth_names,
|
|
448
|
+
:return_type => return_type
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
452
|
+
if @api_client.config.debugging
|
|
453
|
+
@api_client.config.logger.debug "API called: EnforcementApi#get_feature_entitlements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
454
|
+
end
|
|
455
|
+
return data, status_code, headers
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
# Whether a user holds a seat of a type
|
|
459
|
+
# Whether one user holds a seat of a seat type on any of the org's serving subscriptions, with the entitlement the type unlocks. An app asks this before it serves a seat-gated dataset. Deny-by-default: an unknown type or user is `held: false`, and a suspended account holds nothing.
|
|
460
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
461
|
+
# @param type [String] A seat type key of the plan; `default` is the plan's own seats.
|
|
462
|
+
# @param user_ref [String] The app's own id for the user who holds the seat (an external id, such as an identity provider's user id).
|
|
463
|
+
# @param [Hash] opts the optional parameters
|
|
464
|
+
# @return [SeatEntitlement]
|
|
465
|
+
def get_seat_entitlement(org, type, user_ref, opts = {})
|
|
466
|
+
data, _status_code, _headers = get_seat_entitlement_with_http_info(org, type, user_ref, opts)
|
|
467
|
+
data
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Whether a user holds a seat of a type
|
|
471
|
+
# Whether one user holds a seat of a seat type on any of the org's serving subscriptions, with the entitlement the type unlocks. An app asks this before it serves a seat-gated dataset. Deny-by-default: an unknown type or user is `held: false`, and a suspended account holds nothing.
|
|
472
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
473
|
+
# @param type [String] A seat type key of the plan; `default` is the plan's own seats.
|
|
474
|
+
# @param user_ref [String] The app's own id for the user who holds the seat (an external id, such as an identity provider's user id).
|
|
475
|
+
# @param [Hash] opts the optional parameters
|
|
476
|
+
# @return [Array<(SeatEntitlement, Integer, Hash)>] SeatEntitlement data, response status code and response headers
|
|
477
|
+
def get_seat_entitlement_with_http_info(org, type, user_ref, opts = {})
|
|
478
|
+
if @api_client.config.debugging
|
|
479
|
+
@api_client.config.logger.debug 'Calling API: EnforcementApi.get_seat_entitlement ...'
|
|
480
|
+
end
|
|
481
|
+
# verify the required parameter 'org' is set
|
|
482
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
483
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling EnforcementApi.get_seat_entitlement"
|
|
484
|
+
end
|
|
485
|
+
# verify the required parameter 'type' is set
|
|
486
|
+
if @api_client.config.client_side_validation && type.nil?
|
|
487
|
+
fail ArgumentError, "Missing the required parameter 'type' when calling EnforcementApi.get_seat_entitlement"
|
|
488
|
+
end
|
|
489
|
+
pattern = Regexp.new(/^[a-z0-9][a-z0-9_-]{0,63}$/)
|
|
490
|
+
if @api_client.config.client_side_validation && type !~ pattern
|
|
491
|
+
fail ArgumentError, "invalid value for 'type' when calling EnforcementApi.get_seat_entitlement, must conform to the pattern #{pattern}."
|
|
492
|
+
end
|
|
493
|
+
|
|
494
|
+
# verify the required parameter 'user_ref' is set
|
|
495
|
+
if @api_client.config.client_side_validation && user_ref.nil?
|
|
496
|
+
fail ArgumentError, "Missing the required parameter 'user_ref' when calling EnforcementApi.get_seat_entitlement"
|
|
497
|
+
end
|
|
498
|
+
if @api_client.config.client_side_validation && user_ref.to_s.length > 191
|
|
499
|
+
fail ArgumentError, 'invalid value for "user_ref" when calling EnforcementApi.get_seat_entitlement, the character length must be smaller than or equal to 191.'
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
# resource path
|
|
503
|
+
local_var_path = '/entitlements/{org}/seats/{type}/{userRef}'.sub('{org}', CGI.escape(org.to_s)).sub('{type}', CGI.escape(type.to_s)).sub('{userRef}', CGI.escape(user_ref.to_s))
|
|
504
|
+
|
|
505
|
+
# query parameters
|
|
506
|
+
query_params = opts[:query_params] || {}
|
|
507
|
+
|
|
508
|
+
# header parameters
|
|
509
|
+
header_params = opts[:header_params] || {}
|
|
510
|
+
# HTTP header 'Accept' (if needed)
|
|
511
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
512
|
+
|
|
513
|
+
# form parameters
|
|
514
|
+
form_params = opts[:form_params] || {}
|
|
515
|
+
|
|
516
|
+
# http body (model)
|
|
517
|
+
post_body = opts[:debug_body]
|
|
518
|
+
|
|
519
|
+
# return_type
|
|
520
|
+
return_type = opts[:debug_return_type] || 'SeatEntitlement'
|
|
521
|
+
|
|
522
|
+
# auth_names
|
|
523
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
524
|
+
|
|
525
|
+
new_options = opts.merge(
|
|
526
|
+
:operation => :"EnforcementApi.get_seat_entitlement",
|
|
527
|
+
:header_params => header_params,
|
|
528
|
+
:query_params => query_params,
|
|
529
|
+
:form_params => form_params,
|
|
530
|
+
:body => post_body,
|
|
531
|
+
:auth_names => auth_names,
|
|
532
|
+
:return_type => return_type
|
|
533
|
+
)
|
|
534
|
+
|
|
535
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
536
|
+
if @api_client.config.debugging
|
|
537
|
+
@api_client.config.logger.debug "API called: EnforcementApi#get_seat_entitlement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
538
|
+
end
|
|
539
|
+
return data, status_code, headers
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
# Ingest cumulative usage readings
|
|
543
|
+
# Report usage as a **lifetime total, one writer per (org, meter)**. `cumulative` is everything that writer has counted for the meter, never a delta. Billing keeps the highest total it has accepted per (org, meter) under a row lock and stores only the rise, so retries, re-deliveries and concurrent reports never double-count. - A total equal to the one billing holds adds nothing (`ignored`). - A lower total adds nothing (`regressed`). Two writers for one meter, or a writer that lost its counter, produce these. - A writer whose counter restarted reports from 0 in a higher `epoch`; billing then bills what it counts from 0. A total from an older epoch is `ignored`. - `as_of` dates the usage when it was read rather than when it arrived. It is honoured back to the usage grace window (`CBOX_BILLING_USAGE_GRACE`, one hour by default) and never in the future; a metered period is invoiced only after that window, so a reading taken at 23:59 and delivered at 00:05 lands on the period it was read in. An entry without `epoch` or `as_of` is epoch 0, dated on arrival. Running totals reach billing as differences, so only a `sum` meter adds up. A reading for a meter with any other aggregation is still stored, and the response names that meter under `unsupported_meters`: it bills the wrong quantity. Send such a meter through `/reserve` and `/commit` instead, or feed it with `POST /events`. A `unique_count` meter always measures 0. A meter fed by raw events takes no totals. Its entries are left out, and the response names the meter under `event_fed_meters`. A meter that requires an agreement the customer has not accepted is named under `agreement_required`. Its entries are `withheld`: they move the total billing holds and add no usage, so that rise is never billed, not even after the agreement is accepted.
|
|
544
|
+
# @param usage_ingest_request [UsageIngestRequest]
|
|
545
|
+
# @param [Hash] opts the optional parameters
|
|
546
|
+
# @return [UsageIngestResult]
|
|
547
|
+
def ingest_usage(usage_ingest_request, opts = {})
|
|
548
|
+
data, _status_code, _headers = ingest_usage_with_http_info(usage_ingest_request, opts)
|
|
549
|
+
data
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
# Ingest cumulative usage readings
|
|
553
|
+
# Report usage as a **lifetime total, one writer per (org, meter)**. `cumulative` is everything that writer has counted for the meter, never a delta. Billing keeps the highest total it has accepted per (org, meter) under a row lock and stores only the rise, so retries, re-deliveries and concurrent reports never double-count. - A total equal to the one billing holds adds nothing (`ignored`). - A lower total adds nothing (`regressed`). Two writers for one meter, or a writer that lost its counter, produce these. - A writer whose counter restarted reports from 0 in a higher `epoch`; billing then bills what it counts from 0. A total from an older epoch is `ignored`. - `as_of` dates the usage when it was read rather than when it arrived. It is honoured back to the usage grace window (`CBOX_BILLING_USAGE_GRACE`, one hour by default) and never in the future; a metered period is invoiced only after that window, so a reading taken at 23:59 and delivered at 00:05 lands on the period it was read in. An entry without `epoch` or `as_of` is epoch 0, dated on arrival. Running totals reach billing as differences, so only a `sum` meter adds up. A reading for a meter with any other aggregation is still stored, and the response names that meter under `unsupported_meters`: it bills the wrong quantity. Send such a meter through `/reserve` and `/commit` instead, or feed it with `POST /events`. A `unique_count` meter always measures 0. A meter fed by raw events takes no totals. Its entries are left out, and the response names the meter under `event_fed_meters`. A meter that requires an agreement the customer has not accepted is named under `agreement_required`. Its entries are `withheld`: they move the total billing holds and add no usage, so that rise is never billed, not even after the agreement is accepted.
|
|
554
|
+
# @param usage_ingest_request [UsageIngestRequest]
|
|
555
|
+
# @param [Hash] opts the optional parameters
|
|
556
|
+
# @return [Array<(UsageIngestResult, Integer, Hash)>] UsageIngestResult data, response status code and response headers
|
|
557
|
+
def ingest_usage_with_http_info(usage_ingest_request, opts = {})
|
|
558
|
+
if @api_client.config.debugging
|
|
559
|
+
@api_client.config.logger.debug 'Calling API: EnforcementApi.ingest_usage ...'
|
|
560
|
+
end
|
|
561
|
+
# verify the required parameter 'usage_ingest_request' is set
|
|
562
|
+
if @api_client.config.client_side_validation && usage_ingest_request.nil?
|
|
563
|
+
fail ArgumentError, "Missing the required parameter 'usage_ingest_request' when calling EnforcementApi.ingest_usage"
|
|
564
|
+
end
|
|
565
|
+
# resource path
|
|
566
|
+
local_var_path = '/usage'
|
|
567
|
+
|
|
568
|
+
# query parameters
|
|
569
|
+
query_params = opts[:query_params] || {}
|
|
570
|
+
|
|
571
|
+
# header parameters
|
|
572
|
+
header_params = opts[:header_params] || {}
|
|
573
|
+
# HTTP header 'Accept' (if needed)
|
|
574
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
575
|
+
# HTTP header 'Content-Type'
|
|
576
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
577
|
+
if !content_type.nil?
|
|
578
|
+
header_params['Content-Type'] = content_type
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
# form parameters
|
|
582
|
+
form_params = opts[:form_params] || {}
|
|
583
|
+
|
|
584
|
+
# http body (model)
|
|
585
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(usage_ingest_request)
|
|
586
|
+
|
|
587
|
+
# return_type
|
|
588
|
+
return_type = opts[:debug_return_type] || 'UsageIngestResult'
|
|
589
|
+
|
|
590
|
+
# auth_names
|
|
591
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
592
|
+
|
|
593
|
+
new_options = opts.merge(
|
|
594
|
+
:operation => :"EnforcementApi.ingest_usage",
|
|
595
|
+
:header_params => header_params,
|
|
596
|
+
:query_params => query_params,
|
|
597
|
+
:form_params => form_params,
|
|
598
|
+
:body => post_body,
|
|
599
|
+
:auth_names => auth_names,
|
|
600
|
+
:return_type => return_type
|
|
601
|
+
)
|
|
602
|
+
|
|
603
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
604
|
+
if @api_client.config.debugging
|
|
605
|
+
@api_client.config.logger.debug "API called: EnforcementApi#ingest_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
606
|
+
end
|
|
607
|
+
return data, status_code, headers
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
# Ingest raw usage events
|
|
611
|
+
# Send raw events for meters fed by events (`source: events`), up to 1,000 a request. Any number of writers may send at once. - `id` is your id for the event. Within an organization it counts once, whatever time a retry carries: a repeat is reported under `duplicates`. Ids are remembered for `CBOX_BILLING_DEDUP_WINDOW_DAYS` (32 by default). - `occurred_at` dates the event, in RFC 3339. It may be as old as the usage grace window (`CBOX_BILLING_USAGE_GRACE`, one hour by default) and up to five minutes ahead. A metered period is invoiced only after that window, so a late event lands on the period it happened in. Without it the event is dated on arrival. A meter with a backfill window (`backfill_days`) takes events up to that many days old, never from before the customer's open period. Usage of an invoiced period is changed with `POST /events/corrections`. - `value` defaults to 1. - A meter that a percentage usage price charges reports an amount in minor units. Each of its events names its currency in `dimensions.currency`, as an upper-case ISO 4217 code. Without one the event is refused as `missing_currency`. When the organization has a billing currency, an event in another one is refused as `currency_mismatch`. - An event of a meter, or of a dimension value, that requires an agreement the customer has not accepted is refused as `agreement_required`, so it is never billed. A batch that does not parse is a `422` and nothing is stored. An event that parses but cannot be taken is listed under `rejected` with its position in the batch, and the rest of the batch still counts. Its id is not spent, so it can be fixed and sent again.
|
|
612
|
+
# @param usage_events_request [UsageEventsRequest]
|
|
613
|
+
# @param [Hash] opts the optional parameters
|
|
614
|
+
# @return [UsageEventsResult]
|
|
615
|
+
def ingest_usage_events(usage_events_request, opts = {})
|
|
616
|
+
data, _status_code, _headers = ingest_usage_events_with_http_info(usage_events_request, opts)
|
|
617
|
+
data
|
|
618
|
+
end
|
|
619
|
+
|
|
620
|
+
# Ingest raw usage events
|
|
621
|
+
# Send raw events for meters fed by events (`source: events`), up to 1,000 a request. Any number of writers may send at once. - `id` is your id for the event. Within an organization it counts once, whatever time a retry carries: a repeat is reported under `duplicates`. Ids are remembered for `CBOX_BILLING_DEDUP_WINDOW_DAYS` (32 by default). - `occurred_at` dates the event, in RFC 3339. It may be as old as the usage grace window (`CBOX_BILLING_USAGE_GRACE`, one hour by default) and up to five minutes ahead. A metered period is invoiced only after that window, so a late event lands on the period it happened in. Without it the event is dated on arrival. A meter with a backfill window (`backfill_days`) takes events up to that many days old, never from before the customer's open period. Usage of an invoiced period is changed with `POST /events/corrections`. - `value` defaults to 1. - A meter that a percentage usage price charges reports an amount in minor units. Each of its events names its currency in `dimensions.currency`, as an upper-case ISO 4217 code. Without one the event is refused as `missing_currency`. When the organization has a billing currency, an event in another one is refused as `currency_mismatch`. - An event of a meter, or of a dimension value, that requires an agreement the customer has not accepted is refused as `agreement_required`, so it is never billed. A batch that does not parse is a `422` and nothing is stored. An event that parses but cannot be taken is listed under `rejected` with its position in the batch, and the rest of the batch still counts. Its id is not spent, so it can be fixed and sent again.
|
|
622
|
+
# @param usage_events_request [UsageEventsRequest]
|
|
623
|
+
# @param [Hash] opts the optional parameters
|
|
624
|
+
# @return [Array<(UsageEventsResult, Integer, Hash)>] UsageEventsResult data, response status code and response headers
|
|
625
|
+
def ingest_usage_events_with_http_info(usage_events_request, opts = {})
|
|
626
|
+
if @api_client.config.debugging
|
|
627
|
+
@api_client.config.logger.debug 'Calling API: EnforcementApi.ingest_usage_events ...'
|
|
628
|
+
end
|
|
629
|
+
# verify the required parameter 'usage_events_request' is set
|
|
630
|
+
if @api_client.config.client_side_validation && usage_events_request.nil?
|
|
631
|
+
fail ArgumentError, "Missing the required parameter 'usage_events_request' when calling EnforcementApi.ingest_usage_events"
|
|
632
|
+
end
|
|
633
|
+
# resource path
|
|
634
|
+
local_var_path = '/events'
|
|
635
|
+
|
|
636
|
+
# query parameters
|
|
637
|
+
query_params = opts[:query_params] || {}
|
|
638
|
+
|
|
639
|
+
# header parameters
|
|
640
|
+
header_params = opts[:header_params] || {}
|
|
641
|
+
# HTTP header 'Accept' (if needed)
|
|
642
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
643
|
+
# HTTP header 'Content-Type'
|
|
644
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
645
|
+
if !content_type.nil?
|
|
646
|
+
header_params['Content-Type'] = content_type
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
# form parameters
|
|
650
|
+
form_params = opts[:form_params] || {}
|
|
651
|
+
|
|
652
|
+
# http body (model)
|
|
653
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(usage_events_request)
|
|
654
|
+
|
|
655
|
+
# return_type
|
|
656
|
+
return_type = opts[:debug_return_type] || 'UsageEventsResult'
|
|
657
|
+
|
|
658
|
+
# auth_names
|
|
659
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
660
|
+
|
|
661
|
+
new_options = opts.merge(
|
|
662
|
+
:operation => :"EnforcementApi.ingest_usage_events",
|
|
663
|
+
:header_params => header_params,
|
|
664
|
+
:query_params => query_params,
|
|
665
|
+
:form_params => form_params,
|
|
666
|
+
:body => post_body,
|
|
667
|
+
:auth_names => auth_names,
|
|
668
|
+
:return_type => return_type
|
|
669
|
+
)
|
|
670
|
+
|
|
671
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
672
|
+
if @api_client.config.debugging
|
|
673
|
+
@api_client.config.logger.debug "API called: EnforcementApi#ingest_usage_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
674
|
+
end
|
|
675
|
+
return data, status_code, headers
|
|
676
|
+
end
|
|
677
|
+
|
|
678
|
+
# Reserve meter buckets (all-or-nothing)
|
|
679
|
+
# Reserve a set of meter buckets in one all-or-nothing call. The engine's three-way outcome is returned verbatim: - `allowed` — the held set is persisted for the matching `/commit` and its `reservation_id` is returned. - `denied` — a semantic refusal (unknown/disabled meter, exhausted allowance/quota). Fail-closed. Carries an `upgrade` offer when a reachable plan would unblock it. A meter that bills overage up to a cap and has no room left for the estimate is denied with `overage_cap_reached`. - `indeterminate` — a dependency was down; the deployment's infra policy decided admit/refuse and the reason is surfaced. A meter that requires an agreement the customer has not accepted denies the whole set with `reason: agreement_required`, the `meter` and `blocked`. Note: the HTTP status is always `200` — the decision is in the `outcome` field.
|
|
680
|
+
# @param reserve_request [ReserveRequest]
|
|
681
|
+
# @param [Hash] opts the optional parameters
|
|
682
|
+
# @return [ReserveOutcome]
|
|
683
|
+
def reserve_buckets(reserve_request, opts = {})
|
|
684
|
+
data, _status_code, _headers = reserve_buckets_with_http_info(reserve_request, opts)
|
|
685
|
+
data
|
|
686
|
+
end
|
|
687
|
+
|
|
688
|
+
# Reserve meter buckets (all-or-nothing)
|
|
689
|
+
# Reserve a set of meter buckets in one all-or-nothing call. The engine's three-way outcome is returned verbatim: - `allowed` — the held set is persisted for the matching `/commit` and its `reservation_id` is returned. - `denied` — a semantic refusal (unknown/disabled meter, exhausted allowance/quota). Fail-closed. Carries an `upgrade` offer when a reachable plan would unblock it. A meter that bills overage up to a cap and has no room left for the estimate is denied with `overage_cap_reached`. - `indeterminate` — a dependency was down; the deployment's infra policy decided admit/refuse and the reason is surfaced. A meter that requires an agreement the customer has not accepted denies the whole set with `reason: agreement_required`, the `meter` and `blocked`. Note: the HTTP status is always `200` — the decision is in the `outcome` field.
|
|
690
|
+
# @param reserve_request [ReserveRequest]
|
|
691
|
+
# @param [Hash] opts the optional parameters
|
|
692
|
+
# @return [Array<(ReserveOutcome, Integer, Hash)>] ReserveOutcome data, response status code and response headers
|
|
693
|
+
def reserve_buckets_with_http_info(reserve_request, opts = {})
|
|
694
|
+
if @api_client.config.debugging
|
|
695
|
+
@api_client.config.logger.debug 'Calling API: EnforcementApi.reserve_buckets ...'
|
|
696
|
+
end
|
|
697
|
+
# verify the required parameter 'reserve_request' is set
|
|
698
|
+
if @api_client.config.client_side_validation && reserve_request.nil?
|
|
699
|
+
fail ArgumentError, "Missing the required parameter 'reserve_request' when calling EnforcementApi.reserve_buckets"
|
|
700
|
+
end
|
|
701
|
+
# resource path
|
|
702
|
+
local_var_path = '/reserve'
|
|
703
|
+
|
|
704
|
+
# query parameters
|
|
705
|
+
query_params = opts[:query_params] || {}
|
|
706
|
+
|
|
707
|
+
# header parameters
|
|
708
|
+
header_params = opts[:header_params] || {}
|
|
709
|
+
# HTTP header 'Accept' (if needed)
|
|
710
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
711
|
+
# HTTP header 'Content-Type'
|
|
712
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
713
|
+
if !content_type.nil?
|
|
714
|
+
header_params['Content-Type'] = content_type
|
|
715
|
+
end
|
|
716
|
+
|
|
717
|
+
# form parameters
|
|
718
|
+
form_params = opts[:form_params] || {}
|
|
719
|
+
|
|
720
|
+
# http body (model)
|
|
721
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(reserve_request)
|
|
722
|
+
|
|
723
|
+
# return_type
|
|
724
|
+
return_type = opts[:debug_return_type] || 'ReserveOutcome'
|
|
725
|
+
|
|
726
|
+
# auth_names
|
|
727
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
728
|
+
|
|
729
|
+
new_options = opts.merge(
|
|
730
|
+
:operation => :"EnforcementApi.reserve_buckets",
|
|
731
|
+
:header_params => header_params,
|
|
732
|
+
:query_params => query_params,
|
|
733
|
+
:form_params => form_params,
|
|
734
|
+
:body => post_body,
|
|
735
|
+
:auth_names => auth_names,
|
|
736
|
+
:return_type => return_type
|
|
737
|
+
)
|
|
738
|
+
|
|
739
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
740
|
+
if @api_client.config.debugging
|
|
741
|
+
@api_client.config.logger.debug "API called: EnforcementApi#reserve_buckets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
742
|
+
end
|
|
743
|
+
return data, status_code, headers
|
|
744
|
+
end
|
|
745
|
+
end
|
|
746
|
+
end
|