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,1116 @@
|
|
|
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 UsageApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Set a spend alert
|
|
23
|
+
# Tell the billing contact by mail, and every endpoint subscribed to `usage.spend_alert`, when this period's usage spend reaches a threshold. `amount` needs `amount_minor`, `percent_of_amount` needs `amount_minor` and `percent` (a budget and a share of it), and `percent_of_last_period` needs `percent`. Amounts are in the customer's billing currency. Each alert fires at most once a period and re-arms when the period starts. It never limits usage. A 422 with `error: limit` means the customer has as many alerts as the environment allows.
|
|
24
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
25
|
+
# @param create_spend_alert_request [CreateSpendAlertRequest]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @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`.
|
|
28
|
+
# @return [SpendAlert]
|
|
29
|
+
def create_spend_alert(org, create_spend_alert_request, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_spend_alert_with_http_info(org, create_spend_alert_request, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Set a spend alert
|
|
35
|
+
# Tell the billing contact by mail, and every endpoint subscribed to `usage.spend_alert`, when this period's usage spend reaches a threshold. `amount` needs `amount_minor`, `percent_of_amount` needs `amount_minor` and `percent` (a budget and a share of it), and `percent_of_last_period` needs `percent`. Amounts are in the customer's billing currency. Each alert fires at most once a period and re-arms when the period starts. It never limits usage. A 422 with `error: limit` means the customer has as many alerts as the environment allows.
|
|
36
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
37
|
+
# @param create_spend_alert_request [CreateSpendAlertRequest]
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @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`.
|
|
40
|
+
# @return [Array<(SpendAlert, Integer, Hash)>] SpendAlert data, response status code and response headers
|
|
41
|
+
def create_spend_alert_with_http_info(org, create_spend_alert_request, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.create_spend_alert ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'org' is set
|
|
46
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.create_spend_alert"
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'create_spend_alert_request' is set
|
|
50
|
+
if @api_client.config.client_side_validation && create_spend_alert_request.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'create_spend_alert_request' when calling UsageApi.create_spend_alert"
|
|
52
|
+
end
|
|
53
|
+
# resource path
|
|
54
|
+
local_var_path = '/organizations/{org}/spend-alerts'.sub('{org}', CGI.escape(org.to_s))
|
|
55
|
+
|
|
56
|
+
# query parameters
|
|
57
|
+
query_params = opts[:query_params] || {}
|
|
58
|
+
|
|
59
|
+
# header parameters
|
|
60
|
+
header_params = opts[:header_params] || {}
|
|
61
|
+
# HTTP header 'Accept' (if needed)
|
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
63
|
+
# HTTP header 'Content-Type'
|
|
64
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
65
|
+
if !content_type.nil?
|
|
66
|
+
header_params['Content-Type'] = content_type
|
|
67
|
+
end
|
|
68
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
69
|
+
|
|
70
|
+
# form parameters
|
|
71
|
+
form_params = opts[:form_params] || {}
|
|
72
|
+
|
|
73
|
+
# http body (model)
|
|
74
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_spend_alert_request)
|
|
75
|
+
|
|
76
|
+
# return_type
|
|
77
|
+
return_type = opts[:debug_return_type] || 'SpendAlert'
|
|
78
|
+
|
|
79
|
+
# auth_names
|
|
80
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
81
|
+
|
|
82
|
+
new_options = opts.merge(
|
|
83
|
+
:operation => :"UsageApi.create_spend_alert",
|
|
84
|
+
:header_params => header_params,
|
|
85
|
+
:query_params => query_params,
|
|
86
|
+
:form_params => form_params,
|
|
87
|
+
:body => post_body,
|
|
88
|
+
:auth_names => auth_names,
|
|
89
|
+
:return_type => return_type
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug "API called: UsageApi#create_spend_alert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Remove the customer's own overage cap on a meter
|
|
100
|
+
# The operator's cap decides again. `deleted` is false when there was none. Audited.
|
|
101
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
102
|
+
# @param meter [String]
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @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`.
|
|
105
|
+
# @return [DeleteOverageCap200Response]
|
|
106
|
+
def delete_overage_cap(org, meter, opts = {})
|
|
107
|
+
data, _status_code, _headers = delete_overage_cap_with_http_info(org, meter, opts)
|
|
108
|
+
data
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Remove the customer's own overage cap on a meter
|
|
112
|
+
# The operator's cap decides again. `deleted` is false when there was none. Audited.
|
|
113
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
114
|
+
# @param meter [String]
|
|
115
|
+
# @param [Hash] opts the optional parameters
|
|
116
|
+
# @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`.
|
|
117
|
+
# @return [Array<(DeleteOverageCap200Response, Integer, Hash)>] DeleteOverageCap200Response data, response status code and response headers
|
|
118
|
+
def delete_overage_cap_with_http_info(org, meter, opts = {})
|
|
119
|
+
if @api_client.config.debugging
|
|
120
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.delete_overage_cap ...'
|
|
121
|
+
end
|
|
122
|
+
# verify the required parameter 'org' is set
|
|
123
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
124
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.delete_overage_cap"
|
|
125
|
+
end
|
|
126
|
+
# verify the required parameter 'meter' is set
|
|
127
|
+
if @api_client.config.client_side_validation && meter.nil?
|
|
128
|
+
fail ArgumentError, "Missing the required parameter 'meter' when calling UsageApi.delete_overage_cap"
|
|
129
|
+
end
|
|
130
|
+
# resource path
|
|
131
|
+
local_var_path = '/organizations/{org}/overage-caps/{meter}'.sub('{org}', CGI.escape(org.to_s)).sub('{meter}', CGI.escape(meter.to_s))
|
|
132
|
+
|
|
133
|
+
# query parameters
|
|
134
|
+
query_params = opts[:query_params] || {}
|
|
135
|
+
|
|
136
|
+
# header parameters
|
|
137
|
+
header_params = opts[:header_params] || {}
|
|
138
|
+
# HTTP header 'Accept' (if needed)
|
|
139
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
140
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
141
|
+
|
|
142
|
+
# form parameters
|
|
143
|
+
form_params = opts[:form_params] || {}
|
|
144
|
+
|
|
145
|
+
# http body (model)
|
|
146
|
+
post_body = opts[:debug_body]
|
|
147
|
+
|
|
148
|
+
# return_type
|
|
149
|
+
return_type = opts[:debug_return_type] || 'DeleteOverageCap200Response'
|
|
150
|
+
|
|
151
|
+
# auth_names
|
|
152
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
153
|
+
|
|
154
|
+
new_options = opts.merge(
|
|
155
|
+
:operation => :"UsageApi.delete_overage_cap",
|
|
156
|
+
:header_params => header_params,
|
|
157
|
+
:query_params => query_params,
|
|
158
|
+
:form_params => form_params,
|
|
159
|
+
:body => post_body,
|
|
160
|
+
:auth_names => auth_names,
|
|
161
|
+
:return_type => return_type
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
165
|
+
if @api_client.config.debugging
|
|
166
|
+
@api_client.config.logger.debug "API called: UsageApi#delete_overage_cap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
167
|
+
end
|
|
168
|
+
return data, status_code, headers
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Remove a spend alert
|
|
172
|
+
# Alerts already sent stay sent.
|
|
173
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
174
|
+
# @param id [String] The alert's public id (`sal_…`).
|
|
175
|
+
# @param [Hash] opts the optional parameters
|
|
176
|
+
# @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`.
|
|
177
|
+
# @return [DeleteSpendAlert200Response]
|
|
178
|
+
def delete_spend_alert(org, id, opts = {})
|
|
179
|
+
data, _status_code, _headers = delete_spend_alert_with_http_info(org, id, opts)
|
|
180
|
+
data
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Remove a spend alert
|
|
184
|
+
# Alerts already sent stay sent.
|
|
185
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
186
|
+
# @param id [String] The alert's public id (`sal_…`).
|
|
187
|
+
# @param [Hash] opts the optional parameters
|
|
188
|
+
# @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`.
|
|
189
|
+
# @return [Array<(DeleteSpendAlert200Response, Integer, Hash)>] DeleteSpendAlert200Response data, response status code and response headers
|
|
190
|
+
def delete_spend_alert_with_http_info(org, id, opts = {})
|
|
191
|
+
if @api_client.config.debugging
|
|
192
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.delete_spend_alert ...'
|
|
193
|
+
end
|
|
194
|
+
# verify the required parameter 'org' is set
|
|
195
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
196
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.delete_spend_alert"
|
|
197
|
+
end
|
|
198
|
+
# verify the required parameter 'id' is set
|
|
199
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
200
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsageApi.delete_spend_alert"
|
|
201
|
+
end
|
|
202
|
+
# resource path
|
|
203
|
+
local_var_path = '/organizations/{org}/spend-alerts/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{id}', CGI.escape(id.to_s))
|
|
204
|
+
|
|
205
|
+
# query parameters
|
|
206
|
+
query_params = opts[:query_params] || {}
|
|
207
|
+
|
|
208
|
+
# header parameters
|
|
209
|
+
header_params = opts[:header_params] || {}
|
|
210
|
+
# HTTP header 'Accept' (if needed)
|
|
211
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
212
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
213
|
+
|
|
214
|
+
# form parameters
|
|
215
|
+
form_params = opts[:form_params] || {}
|
|
216
|
+
|
|
217
|
+
# http body (model)
|
|
218
|
+
post_body = opts[:debug_body]
|
|
219
|
+
|
|
220
|
+
# return_type
|
|
221
|
+
return_type = opts[:debug_return_type] || 'DeleteSpendAlert200Response'
|
|
222
|
+
|
|
223
|
+
# auth_names
|
|
224
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
225
|
+
|
|
226
|
+
new_options = opts.merge(
|
|
227
|
+
:operation => :"UsageApi.delete_spend_alert",
|
|
228
|
+
:header_params => header_params,
|
|
229
|
+
:query_params => query_params,
|
|
230
|
+
:form_params => form_params,
|
|
231
|
+
:body => post_body,
|
|
232
|
+
:auth_names => auth_names,
|
|
233
|
+
:return_type => return_type
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
237
|
+
if @api_client.config.debugging
|
|
238
|
+
@api_client.config.logger.debug "API called: UsageApi#delete_spend_alert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
239
|
+
end
|
|
240
|
+
return data, status_code, headers
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# A customer's usage threshold
|
|
244
|
+
# The customer's own setting, in the currency it is billed in, and what applies to each of its subscriptions with its plan's setting included.
|
|
245
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
246
|
+
# @param [Hash] opts the optional parameters
|
|
247
|
+
# @return [UsageThreshold]
|
|
248
|
+
def get_organization_usage_threshold(org, opts = {})
|
|
249
|
+
data, _status_code, _headers = get_organization_usage_threshold_with_http_info(org, opts)
|
|
250
|
+
data
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# A customer's usage threshold
|
|
254
|
+
# The customer's own setting, in the currency it is billed in, and what applies to each of its subscriptions with its plan's setting included.
|
|
255
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
256
|
+
# @param [Hash] opts the optional parameters
|
|
257
|
+
# @return [Array<(UsageThreshold, Integer, Hash)>] UsageThreshold data, response status code and response headers
|
|
258
|
+
def get_organization_usage_threshold_with_http_info(org, opts = {})
|
|
259
|
+
if @api_client.config.debugging
|
|
260
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_organization_usage_threshold ...'
|
|
261
|
+
end
|
|
262
|
+
# verify the required parameter 'org' is set
|
|
263
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
264
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.get_organization_usage_threshold"
|
|
265
|
+
end
|
|
266
|
+
# resource path
|
|
267
|
+
local_var_path = '/organizations/{org}/usage-threshold'.sub('{org}', CGI.escape(org.to_s))
|
|
268
|
+
|
|
269
|
+
# query parameters
|
|
270
|
+
query_params = opts[:query_params] || {}
|
|
271
|
+
|
|
272
|
+
# header parameters
|
|
273
|
+
header_params = opts[:header_params] || {}
|
|
274
|
+
# HTTP header 'Accept' (if needed)
|
|
275
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
276
|
+
|
|
277
|
+
# form parameters
|
|
278
|
+
form_params = opts[:form_params] || {}
|
|
279
|
+
|
|
280
|
+
# http body (model)
|
|
281
|
+
post_body = opts[:debug_body]
|
|
282
|
+
|
|
283
|
+
# return_type
|
|
284
|
+
return_type = opts[:debug_return_type] || 'UsageThreshold'
|
|
285
|
+
|
|
286
|
+
# auth_names
|
|
287
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
288
|
+
|
|
289
|
+
new_options = opts.merge(
|
|
290
|
+
:operation => :"UsageApi.get_organization_usage_threshold",
|
|
291
|
+
:header_params => header_params,
|
|
292
|
+
:query_params => query_params,
|
|
293
|
+
:form_params => form_params,
|
|
294
|
+
:body => post_body,
|
|
295
|
+
:auth_names => auth_names,
|
|
296
|
+
:return_type => return_type
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
300
|
+
if @api_client.config.debugging
|
|
301
|
+
@api_client.config.logger.debug "API called: UsageApi#get_organization_usage_threshold\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
302
|
+
end
|
|
303
|
+
return data, status_code, headers
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# A plan's usage threshold
|
|
307
|
+
# The plan's own setting, and what applies to its customers that set none.
|
|
308
|
+
# @param key [String] The plan key.
|
|
309
|
+
# @param [Hash] opts the optional parameters
|
|
310
|
+
# @return [UsageThreshold]
|
|
311
|
+
def get_plan_usage_threshold(key, opts = {})
|
|
312
|
+
data, _status_code, _headers = get_plan_usage_threshold_with_http_info(key, opts)
|
|
313
|
+
data
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# A plan's usage threshold
|
|
317
|
+
# The plan's own setting, and what applies to its customers that set none.
|
|
318
|
+
# @param key [String] The plan key.
|
|
319
|
+
# @param [Hash] opts the optional parameters
|
|
320
|
+
# @return [Array<(UsageThreshold, Integer, Hash)>] UsageThreshold data, response status code and response headers
|
|
321
|
+
def get_plan_usage_threshold_with_http_info(key, opts = {})
|
|
322
|
+
if @api_client.config.debugging
|
|
323
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_plan_usage_threshold ...'
|
|
324
|
+
end
|
|
325
|
+
# verify the required parameter 'key' is set
|
|
326
|
+
if @api_client.config.client_side_validation && key.nil?
|
|
327
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling UsageApi.get_plan_usage_threshold"
|
|
328
|
+
end
|
|
329
|
+
# resource path
|
|
330
|
+
local_var_path = '/plans/{key}/usage-threshold'.sub('{key}', CGI.escape(key.to_s))
|
|
331
|
+
|
|
332
|
+
# query parameters
|
|
333
|
+
query_params = opts[:query_params] || {}
|
|
334
|
+
|
|
335
|
+
# header parameters
|
|
336
|
+
header_params = opts[:header_params] || {}
|
|
337
|
+
# HTTP header 'Accept' (if needed)
|
|
338
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
339
|
+
|
|
340
|
+
# form parameters
|
|
341
|
+
form_params = opts[:form_params] || {}
|
|
342
|
+
|
|
343
|
+
# http body (model)
|
|
344
|
+
post_body = opts[:debug_body]
|
|
345
|
+
|
|
346
|
+
# return_type
|
|
347
|
+
return_type = opts[:debug_return_type] || 'UsageThreshold'
|
|
348
|
+
|
|
349
|
+
# auth_names
|
|
350
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
351
|
+
|
|
352
|
+
new_options = opts.merge(
|
|
353
|
+
:operation => :"UsageApi.get_plan_usage_threshold",
|
|
354
|
+
:header_params => header_params,
|
|
355
|
+
:query_params => query_params,
|
|
356
|
+
:form_params => form_params,
|
|
357
|
+
:body => post_body,
|
|
358
|
+
:auth_names => auth_names,
|
|
359
|
+
:return_type => return_type
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
363
|
+
if @api_client.config.debugging
|
|
364
|
+
@api_client.config.logger.debug "API called: UsageApi#get_plan_usage_threshold\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
365
|
+
end
|
|
366
|
+
return data, status_code, headers
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# Per-meter usage-against-allowance for the current period
|
|
370
|
+
# The org's per-meter usage for the current billing period: `used` reconciled from the durable event log, the plan `allowance`, `overage` already run past it, and a straight-line `projected` end-of-period figure. A meter with an unlimited (null) allowance carries no overage.
|
|
371
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
372
|
+
# @param [Hash] opts the optional parameters
|
|
373
|
+
# @option opts [String] :product The product key whose subscription to address (INT-2). A product-bound token is always confined to its own product; naming another is a `404`. An unbound token without it addresses the organization's newest serving subscription for the reference.
|
|
374
|
+
# @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`.
|
|
375
|
+
# @return [UsageSummary]
|
|
376
|
+
def get_usage_summary(org, opts = {})
|
|
377
|
+
data, _status_code, _headers = get_usage_summary_with_http_info(org, opts)
|
|
378
|
+
data
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# Per-meter usage-against-allowance for the current period
|
|
382
|
+
# The org's per-meter usage for the current billing period: `used` reconciled from the durable event log, the plan `allowance`, `overage` already run past it, and a straight-line `projected` end-of-period figure. A meter with an unlimited (null) allowance carries no overage.
|
|
383
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
384
|
+
# @param [Hash] opts the optional parameters
|
|
385
|
+
# @option opts [String] :product The product key whose subscription to address (INT-2). A product-bound token is always confined to its own product; naming another is a `404`. An unbound token without it addresses the organization's newest serving subscription for the reference.
|
|
386
|
+
# @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`.
|
|
387
|
+
# @return [Array<(UsageSummary, Integer, Hash)>] UsageSummary data, response status code and response headers
|
|
388
|
+
def get_usage_summary_with_http_info(org, opts = {})
|
|
389
|
+
if @api_client.config.debugging
|
|
390
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_usage_summary ...'
|
|
391
|
+
end
|
|
392
|
+
# verify the required parameter 'org' is set
|
|
393
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
394
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.get_usage_summary"
|
|
395
|
+
end
|
|
396
|
+
pattern = Regexp.new(/^[A-Za-z0-9._:-]{1,191}$/)
|
|
397
|
+
if @api_client.config.client_side_validation && !opts[:'reference'].nil? && opts[:'reference'] !~ pattern
|
|
398
|
+
fail ArgumentError, "invalid value for 'opts[:\"reference\"]' when calling UsageApi.get_usage_summary, must conform to the pattern #{pattern}."
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# resource path
|
|
402
|
+
local_var_path = '/usage/{org}'.sub('{org}', CGI.escape(org.to_s))
|
|
403
|
+
|
|
404
|
+
# query parameters
|
|
405
|
+
query_params = opts[:query_params] || {}
|
|
406
|
+
query_params[:'product'] = opts[:'product'] if !opts[:'product'].nil?
|
|
407
|
+
query_params[:'reference'] = opts[:'reference'] if !opts[:'reference'].nil?
|
|
408
|
+
|
|
409
|
+
# header parameters
|
|
410
|
+
header_params = opts[:header_params] || {}
|
|
411
|
+
# HTTP header 'Accept' (if needed)
|
|
412
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
413
|
+
|
|
414
|
+
# form parameters
|
|
415
|
+
form_params = opts[:form_params] || {}
|
|
416
|
+
|
|
417
|
+
# http body (model)
|
|
418
|
+
post_body = opts[:debug_body]
|
|
419
|
+
|
|
420
|
+
# return_type
|
|
421
|
+
return_type = opts[:debug_return_type] || 'UsageSummary'
|
|
422
|
+
|
|
423
|
+
# auth_names
|
|
424
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
425
|
+
|
|
426
|
+
new_options = opts.merge(
|
|
427
|
+
:operation => :"UsageApi.get_usage_summary",
|
|
428
|
+
:header_params => header_params,
|
|
429
|
+
:query_params => query_params,
|
|
430
|
+
:form_params => form_params,
|
|
431
|
+
:body => post_body,
|
|
432
|
+
:auth_names => auth_names,
|
|
433
|
+
:return_type => return_type
|
|
434
|
+
)
|
|
435
|
+
|
|
436
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
437
|
+
if @api_client.config.debugging
|
|
438
|
+
@api_client.config.logger.debug "API called: UsageApi#get_usage_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
439
|
+
end
|
|
440
|
+
return data, status_code, headers
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# The environment's default usage threshold
|
|
444
|
+
# The default for every plan and customer in this environment. `effective` is what applies with no plan or customer setting.
|
|
445
|
+
# @param [Hash] opts the optional parameters
|
|
446
|
+
# @return [UsageThreshold]
|
|
447
|
+
def get_usage_threshold(opts = {})
|
|
448
|
+
data, _status_code, _headers = get_usage_threshold_with_http_info(opts)
|
|
449
|
+
data
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
# The environment's default usage threshold
|
|
453
|
+
# The default for every plan and customer in this environment. `effective` is what applies with no plan or customer setting.
|
|
454
|
+
# @param [Hash] opts the optional parameters
|
|
455
|
+
# @return [Array<(UsageThreshold, Integer, Hash)>] UsageThreshold data, response status code and response headers
|
|
456
|
+
def get_usage_threshold_with_http_info(opts = {})
|
|
457
|
+
if @api_client.config.debugging
|
|
458
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_usage_threshold ...'
|
|
459
|
+
end
|
|
460
|
+
# resource path
|
|
461
|
+
local_var_path = '/usage-threshold'
|
|
462
|
+
|
|
463
|
+
# query parameters
|
|
464
|
+
query_params = opts[:query_params] || {}
|
|
465
|
+
|
|
466
|
+
# header parameters
|
|
467
|
+
header_params = opts[:header_params] || {}
|
|
468
|
+
# HTTP header 'Accept' (if needed)
|
|
469
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
470
|
+
|
|
471
|
+
# form parameters
|
|
472
|
+
form_params = opts[:form_params] || {}
|
|
473
|
+
|
|
474
|
+
# http body (model)
|
|
475
|
+
post_body = opts[:debug_body]
|
|
476
|
+
|
|
477
|
+
# return_type
|
|
478
|
+
return_type = opts[:debug_return_type] || 'UsageThreshold'
|
|
479
|
+
|
|
480
|
+
# auth_names
|
|
481
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
482
|
+
|
|
483
|
+
new_options = opts.merge(
|
|
484
|
+
:operation => :"UsageApi.get_usage_threshold",
|
|
485
|
+
:header_params => header_params,
|
|
486
|
+
:query_params => query_params,
|
|
487
|
+
:form_params => form_params,
|
|
488
|
+
:body => post_body,
|
|
489
|
+
:auth_names => auth_names,
|
|
490
|
+
:return_type => return_type
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
494
|
+
if @api_client.config.debugging
|
|
495
|
+
@api_client.config.logger.debug "API called: UsageApi#get_usage_threshold\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
496
|
+
end
|
|
497
|
+
return data, status_code, headers
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
# The overage caps on the customer's meters
|
|
501
|
+
# Every meter one of the customer's serving subscriptions bills overage on: the operator's cap (plan, a value's rule, or an override), the customer's own, the one that binds, and how much overage the current window used. Usage stops at the included allowance plus the cap, with `overage_cap_reached`, and nothing beyond the cap is billed. At 80% and at 100% of the cap the billing contact gets a mail and `usage.overage_cap_warning` or `usage.overage_cap_reached` fires, once per window each.
|
|
502
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
503
|
+
# @param [Hash] opts the optional parameters
|
|
504
|
+
# @return [ListOverageCaps200Response]
|
|
505
|
+
def list_overage_caps(org, opts = {})
|
|
506
|
+
data, _status_code, _headers = list_overage_caps_with_http_info(org, opts)
|
|
507
|
+
data
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
# The overage caps on the customer's meters
|
|
511
|
+
# Every meter one of the customer's serving subscriptions bills overage on: the operator's cap (plan, a value's rule, or an override), the customer's own, the one that binds, and how much overage the current window used. Usage stops at the included allowance plus the cap, with `overage_cap_reached`, and nothing beyond the cap is billed. At 80% and at 100% of the cap the billing contact gets a mail and `usage.overage_cap_warning` or `usage.overage_cap_reached` fires, once per window each.
|
|
512
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
513
|
+
# @param [Hash] opts the optional parameters
|
|
514
|
+
# @return [Array<(ListOverageCaps200Response, Integer, Hash)>] ListOverageCaps200Response data, response status code and response headers
|
|
515
|
+
def list_overage_caps_with_http_info(org, opts = {})
|
|
516
|
+
if @api_client.config.debugging
|
|
517
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.list_overage_caps ...'
|
|
518
|
+
end
|
|
519
|
+
# verify the required parameter 'org' is set
|
|
520
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
521
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.list_overage_caps"
|
|
522
|
+
end
|
|
523
|
+
# resource path
|
|
524
|
+
local_var_path = '/organizations/{org}/overage-caps'.sub('{org}', CGI.escape(org.to_s))
|
|
525
|
+
|
|
526
|
+
# query parameters
|
|
527
|
+
query_params = opts[:query_params] || {}
|
|
528
|
+
|
|
529
|
+
# header parameters
|
|
530
|
+
header_params = opts[:header_params] || {}
|
|
531
|
+
# HTTP header 'Accept' (if needed)
|
|
532
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
533
|
+
|
|
534
|
+
# form parameters
|
|
535
|
+
form_params = opts[:form_params] || {}
|
|
536
|
+
|
|
537
|
+
# http body (model)
|
|
538
|
+
post_body = opts[:debug_body]
|
|
539
|
+
|
|
540
|
+
# return_type
|
|
541
|
+
return_type = opts[:debug_return_type] || 'ListOverageCaps200Response'
|
|
542
|
+
|
|
543
|
+
# auth_names
|
|
544
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
545
|
+
|
|
546
|
+
new_options = opts.merge(
|
|
547
|
+
:operation => :"UsageApi.list_overage_caps",
|
|
548
|
+
:header_params => header_params,
|
|
549
|
+
:query_params => query_params,
|
|
550
|
+
:form_params => form_params,
|
|
551
|
+
:body => post_body,
|
|
552
|
+
:auth_names => auth_names,
|
|
553
|
+
:return_type => return_type
|
|
554
|
+
)
|
|
555
|
+
|
|
556
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
557
|
+
if @api_client.config.debugging
|
|
558
|
+
@api_client.config.logger.debug "API called: UsageApi#list_overage_caps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
559
|
+
end
|
|
560
|
+
return data, status_code, headers
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
# The customer's spend alerts and usage spend
|
|
564
|
+
# The alerts the customer set on its usage spend, and that spend so far this period: the same money the upcoming invoice shows for usage, before tax, with the tax when Cbox Tax can say. `spend` covers every product of the organization, so it is `null` for a token bound to one product. `threshold_minor` is the spend an alert fires at (`null` when it cannot fire yet, for example a share of a last period there was none of). An alert never limits usage.
|
|
565
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
566
|
+
# @param [Hash] opts the optional parameters
|
|
567
|
+
# @return [ListSpendAlerts200Response]
|
|
568
|
+
def list_spend_alerts(org, opts = {})
|
|
569
|
+
data, _status_code, _headers = list_spend_alerts_with_http_info(org, opts)
|
|
570
|
+
data
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
# The customer's spend alerts and usage spend
|
|
574
|
+
# The alerts the customer set on its usage spend, and that spend so far this period: the same money the upcoming invoice shows for usage, before tax, with the tax when Cbox Tax can say. `spend` covers every product of the organization, so it is `null` for a token bound to one product. `threshold_minor` is the spend an alert fires at (`null` when it cannot fire yet, for example a share of a last period there was none of). An alert never limits usage.
|
|
575
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
576
|
+
# @param [Hash] opts the optional parameters
|
|
577
|
+
# @return [Array<(ListSpendAlerts200Response, Integer, Hash)>] ListSpendAlerts200Response data, response status code and response headers
|
|
578
|
+
def list_spend_alerts_with_http_info(org, opts = {})
|
|
579
|
+
if @api_client.config.debugging
|
|
580
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.list_spend_alerts ...'
|
|
581
|
+
end
|
|
582
|
+
# verify the required parameter 'org' is set
|
|
583
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
584
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.list_spend_alerts"
|
|
585
|
+
end
|
|
586
|
+
# resource path
|
|
587
|
+
local_var_path = '/organizations/{org}/spend-alerts'.sub('{org}', CGI.escape(org.to_s))
|
|
588
|
+
|
|
589
|
+
# query parameters
|
|
590
|
+
query_params = opts[:query_params] || {}
|
|
591
|
+
|
|
592
|
+
# header parameters
|
|
593
|
+
header_params = opts[:header_params] || {}
|
|
594
|
+
# HTTP header 'Accept' (if needed)
|
|
595
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
596
|
+
|
|
597
|
+
# form parameters
|
|
598
|
+
form_params = opts[:form_params] || {}
|
|
599
|
+
|
|
600
|
+
# http body (model)
|
|
601
|
+
post_body = opts[:debug_body]
|
|
602
|
+
|
|
603
|
+
# return_type
|
|
604
|
+
return_type = opts[:debug_return_type] || 'ListSpendAlerts200Response'
|
|
605
|
+
|
|
606
|
+
# auth_names
|
|
607
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
608
|
+
|
|
609
|
+
new_options = opts.merge(
|
|
610
|
+
:operation => :"UsageApi.list_spend_alerts",
|
|
611
|
+
:header_params => header_params,
|
|
612
|
+
:query_params => query_params,
|
|
613
|
+
:form_params => form_params,
|
|
614
|
+
:body => post_body,
|
|
615
|
+
:auth_names => auth_names,
|
|
616
|
+
:return_type => return_type
|
|
617
|
+
)
|
|
618
|
+
|
|
619
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
620
|
+
if @api_client.config.debugging
|
|
621
|
+
@api_client.config.logger.debug "API called: UsageApi#list_spend_alerts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
622
|
+
end
|
|
623
|
+
return data, status_code, headers
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
# The organization's usage corrections
|
|
627
|
+
# Every voided or amended usage event of the organization (or of `org#reference` with `reference`), newest first, each with the adjustments its request made to invoiced periods and how they were settled.
|
|
628
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
629
|
+
# @param [Hash] opts the optional parameters
|
|
630
|
+
# @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`.
|
|
631
|
+
# @option opts [String] :cursor The opaque `next_cursor` from a previous page. Treat it as a black box — echo it back verbatim to fetch the following page. Omit it for the first page. A malformed cursor is a `400`.
|
|
632
|
+
# @option opts [Integer] :limit Maximum items per page (1–100). Defaults to 20. (default to 20)
|
|
633
|
+
# @option opts [String] :event_id Only the corrections of this event.
|
|
634
|
+
# @option opts [String] :meter Only the corrections of this meter.
|
|
635
|
+
# @return [UsageCorrectionList]
|
|
636
|
+
def list_usage_corrections(org, opts = {})
|
|
637
|
+
data, _status_code, _headers = list_usage_corrections_with_http_info(org, opts)
|
|
638
|
+
data
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
# The organization's usage corrections
|
|
642
|
+
# Every voided or amended usage event of the organization (or of `org#reference` with `reference`), newest first, each with the adjustments its request made to invoiced periods and how they were settled.
|
|
643
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
644
|
+
# @param [Hash] opts the optional parameters
|
|
645
|
+
# @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`.
|
|
646
|
+
# @option opts [String] :cursor The opaque `next_cursor` from a previous page. Treat it as a black box — echo it back verbatim to fetch the following page. Omit it for the first page. A malformed cursor is a `400`.
|
|
647
|
+
# @option opts [Integer] :limit Maximum items per page (1–100). Defaults to 20. (default to 20)
|
|
648
|
+
# @option opts [String] :event_id Only the corrections of this event.
|
|
649
|
+
# @option opts [String] :meter Only the corrections of this meter.
|
|
650
|
+
# @return [Array<(UsageCorrectionList, Integer, Hash)>] UsageCorrectionList data, response status code and response headers
|
|
651
|
+
def list_usage_corrections_with_http_info(org, opts = {})
|
|
652
|
+
if @api_client.config.debugging
|
|
653
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.list_usage_corrections ...'
|
|
654
|
+
end
|
|
655
|
+
# verify the required parameter 'org' is set
|
|
656
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
657
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.list_usage_corrections"
|
|
658
|
+
end
|
|
659
|
+
pattern = Regexp.new(/^[A-Za-z0-9._:-]{1,191}$/)
|
|
660
|
+
if @api_client.config.client_side_validation && !opts[:'reference'].nil? && opts[:'reference'] !~ pattern
|
|
661
|
+
fail ArgumentError, "invalid value for 'opts[:\"reference\"]' when calling UsageApi.list_usage_corrections, must conform to the pattern #{pattern}."
|
|
662
|
+
end
|
|
663
|
+
|
|
664
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
665
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsageApi.list_usage_corrections, must be smaller than or equal to 100.'
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
669
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsageApi.list_usage_corrections, must be greater than or equal to 1.'
|
|
670
|
+
end
|
|
671
|
+
|
|
672
|
+
if @api_client.config.client_side_validation && !opts[:'event_id'].nil? && opts[:'event_id'].to_s.length > 128
|
|
673
|
+
fail ArgumentError, 'invalid value for "opts[:"event_id"]" when calling UsageApi.list_usage_corrections, the character length must be smaller than or equal to 128.'
|
|
674
|
+
end
|
|
675
|
+
|
|
676
|
+
if @api_client.config.client_side_validation && !opts[:'meter'].nil? && opts[:'meter'].to_s.length > 255
|
|
677
|
+
fail ArgumentError, 'invalid value for "opts[:"meter"]" when calling UsageApi.list_usage_corrections, the character length must be smaller than or equal to 255.'
|
|
678
|
+
end
|
|
679
|
+
|
|
680
|
+
# resource path
|
|
681
|
+
local_var_path = '/usage/{org}/corrections'.sub('{org}', CGI.escape(org.to_s))
|
|
682
|
+
|
|
683
|
+
# query parameters
|
|
684
|
+
query_params = opts[:query_params] || {}
|
|
685
|
+
query_params[:'reference'] = opts[:'reference'] if !opts[:'reference'].nil?
|
|
686
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
687
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
688
|
+
query_params[:'event_id'] = opts[:'event_id'] if !opts[:'event_id'].nil?
|
|
689
|
+
query_params[:'meter'] = opts[:'meter'] if !opts[:'meter'].nil?
|
|
690
|
+
|
|
691
|
+
# header parameters
|
|
692
|
+
header_params = opts[:header_params] || {}
|
|
693
|
+
# HTTP header 'Accept' (if needed)
|
|
694
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
695
|
+
|
|
696
|
+
# form parameters
|
|
697
|
+
form_params = opts[:form_params] || {}
|
|
698
|
+
|
|
699
|
+
# http body (model)
|
|
700
|
+
post_body = opts[:debug_body]
|
|
701
|
+
|
|
702
|
+
# return_type
|
|
703
|
+
return_type = opts[:debug_return_type] || 'UsageCorrectionList'
|
|
704
|
+
|
|
705
|
+
# auth_names
|
|
706
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
707
|
+
|
|
708
|
+
new_options = opts.merge(
|
|
709
|
+
:operation => :"UsageApi.list_usage_corrections",
|
|
710
|
+
:header_params => header_params,
|
|
711
|
+
:query_params => query_params,
|
|
712
|
+
:form_params => form_params,
|
|
713
|
+
:body => post_body,
|
|
714
|
+
:auth_names => auth_names,
|
|
715
|
+
:return_type => return_type
|
|
716
|
+
)
|
|
717
|
+
|
|
718
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
719
|
+
if @api_client.config.debugging
|
|
720
|
+
@api_client.config.logger.debug "API called: UsageApi#list_usage_corrections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
721
|
+
end
|
|
722
|
+
return data, status_code, headers
|
|
723
|
+
end
|
|
724
|
+
|
|
725
|
+
# Set a customer's usage threshold (operator)
|
|
726
|
+
# When a subscription's unbilled usage in the running period reaches the threshold, an interim invoice bills it at once, taxed and collected like any invoice. The period's own invoice then bills the period's usage priced as a whole, less what the interim invoices billed, so allowances, tiers and a minimum spend come out as on one invoice. `reset_after_invoice: true` counts again from zero after each interim invoice; `false` bills once a period. A field sent as `null` inherits: customer, then plan, then environment. Without a threshold nothing changes. Takes an operator token. The amount is in the customer's billing currency; another currency is a 422.
|
|
727
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
728
|
+
# @param usage_threshold_request [UsageThresholdRequest]
|
|
729
|
+
# @param [Hash] opts the optional parameters
|
|
730
|
+
# @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`.
|
|
731
|
+
# @return [UsageThreshold]
|
|
732
|
+
def set_organization_usage_threshold(org, usage_threshold_request, opts = {})
|
|
733
|
+
data, _status_code, _headers = set_organization_usage_threshold_with_http_info(org, usage_threshold_request, opts)
|
|
734
|
+
data
|
|
735
|
+
end
|
|
736
|
+
|
|
737
|
+
# Set a customer's usage threshold (operator)
|
|
738
|
+
# When a subscription's unbilled usage in the running period reaches the threshold, an interim invoice bills it at once, taxed and collected like any invoice. The period's own invoice then bills the period's usage priced as a whole, less what the interim invoices billed, so allowances, tiers and a minimum spend come out as on one invoice. `reset_after_invoice: true` counts again from zero after each interim invoice; `false` bills once a period. A field sent as `null` inherits: customer, then plan, then environment. Without a threshold nothing changes. Takes an operator token. The amount is in the customer's billing currency; another currency is a 422.
|
|
739
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
740
|
+
# @param usage_threshold_request [UsageThresholdRequest]
|
|
741
|
+
# @param [Hash] opts the optional parameters
|
|
742
|
+
# @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`.
|
|
743
|
+
# @return [Array<(UsageThreshold, Integer, Hash)>] UsageThreshold data, response status code and response headers
|
|
744
|
+
def set_organization_usage_threshold_with_http_info(org, usage_threshold_request, opts = {})
|
|
745
|
+
if @api_client.config.debugging
|
|
746
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.set_organization_usage_threshold ...'
|
|
747
|
+
end
|
|
748
|
+
# verify the required parameter 'org' is set
|
|
749
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
750
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.set_organization_usage_threshold"
|
|
751
|
+
end
|
|
752
|
+
# verify the required parameter 'usage_threshold_request' is set
|
|
753
|
+
if @api_client.config.client_side_validation && usage_threshold_request.nil?
|
|
754
|
+
fail ArgumentError, "Missing the required parameter 'usage_threshold_request' when calling UsageApi.set_organization_usage_threshold"
|
|
755
|
+
end
|
|
756
|
+
# resource path
|
|
757
|
+
local_var_path = '/organizations/{org}/usage-threshold'.sub('{org}', CGI.escape(org.to_s))
|
|
758
|
+
|
|
759
|
+
# query parameters
|
|
760
|
+
query_params = opts[:query_params] || {}
|
|
761
|
+
|
|
762
|
+
# header parameters
|
|
763
|
+
header_params = opts[:header_params] || {}
|
|
764
|
+
# HTTP header 'Accept' (if needed)
|
|
765
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
766
|
+
# HTTP header 'Content-Type'
|
|
767
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
768
|
+
if !content_type.nil?
|
|
769
|
+
header_params['Content-Type'] = content_type
|
|
770
|
+
end
|
|
771
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
772
|
+
|
|
773
|
+
# form parameters
|
|
774
|
+
form_params = opts[:form_params] || {}
|
|
775
|
+
|
|
776
|
+
# http body (model)
|
|
777
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(usage_threshold_request)
|
|
778
|
+
|
|
779
|
+
# return_type
|
|
780
|
+
return_type = opts[:debug_return_type] || 'UsageThreshold'
|
|
781
|
+
|
|
782
|
+
# auth_names
|
|
783
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
784
|
+
|
|
785
|
+
new_options = opts.merge(
|
|
786
|
+
:operation => :"UsageApi.set_organization_usage_threshold",
|
|
787
|
+
:header_params => header_params,
|
|
788
|
+
:query_params => query_params,
|
|
789
|
+
:form_params => form_params,
|
|
790
|
+
:body => post_body,
|
|
791
|
+
:auth_names => auth_names,
|
|
792
|
+
:return_type => return_type
|
|
793
|
+
)
|
|
794
|
+
|
|
795
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
796
|
+
if @api_client.config.debugging
|
|
797
|
+
@api_client.config.logger.debug "API called: UsageApi#set_organization_usage_threshold\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
798
|
+
end
|
|
799
|
+
return data, status_code, headers
|
|
800
|
+
end
|
|
801
|
+
|
|
802
|
+
# Set the customer's own overage cap on a meter
|
|
803
|
+
# The customer's own cap, `{units}` or `{amount, currency}` with the amount in minor units. It replaces the one it had and applies to every subscription that bills the meter's overage. It can only lower what the operator allows, and it cannot be lower than the overage the current window already used (up to the cap binding now), so nothing already let through goes unbilled. A customer's own token may set it. Audited. Refusals are `422` with `error`: `invalid`, `no_overage` (no subscription bills the meter's overage), `unpriced_currency` (the plan does not price the meter in that currency), `above_operator_cap`, or `below_usage`.
|
|
804
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
805
|
+
# @param meter [String]
|
|
806
|
+
# @param overage_cap [OverageCap]
|
|
807
|
+
# @param [Hash] opts the optional parameters
|
|
808
|
+
# @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`.
|
|
809
|
+
# @return [CustomerOverageCapRow]
|
|
810
|
+
def set_overage_cap(org, meter, overage_cap, opts = {})
|
|
811
|
+
data, _status_code, _headers = set_overage_cap_with_http_info(org, meter, overage_cap, opts)
|
|
812
|
+
data
|
|
813
|
+
end
|
|
814
|
+
|
|
815
|
+
# Set the customer's own overage cap on a meter
|
|
816
|
+
# The customer's own cap, `{units}` or `{amount, currency}` with the amount in minor units. It replaces the one it had and applies to every subscription that bills the meter's overage. It can only lower what the operator allows, and it cannot be lower than the overage the current window already used (up to the cap binding now), so nothing already let through goes unbilled. A customer's own token may set it. Audited. Refusals are `422` with `error`: `invalid`, `no_overage` (no subscription bills the meter's overage), `unpriced_currency` (the plan does not price the meter in that currency), `above_operator_cap`, or `below_usage`.
|
|
817
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
818
|
+
# @param meter [String]
|
|
819
|
+
# @param overage_cap [OverageCap]
|
|
820
|
+
# @param [Hash] opts the optional parameters
|
|
821
|
+
# @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`.
|
|
822
|
+
# @return [Array<(CustomerOverageCapRow, Integer, Hash)>] CustomerOverageCapRow data, response status code and response headers
|
|
823
|
+
def set_overage_cap_with_http_info(org, meter, overage_cap, opts = {})
|
|
824
|
+
if @api_client.config.debugging
|
|
825
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.set_overage_cap ...'
|
|
826
|
+
end
|
|
827
|
+
# verify the required parameter 'org' is set
|
|
828
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
829
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.set_overage_cap"
|
|
830
|
+
end
|
|
831
|
+
# verify the required parameter 'meter' is set
|
|
832
|
+
if @api_client.config.client_side_validation && meter.nil?
|
|
833
|
+
fail ArgumentError, "Missing the required parameter 'meter' when calling UsageApi.set_overage_cap"
|
|
834
|
+
end
|
|
835
|
+
# verify the required parameter 'overage_cap' is set
|
|
836
|
+
if @api_client.config.client_side_validation && overage_cap.nil?
|
|
837
|
+
fail ArgumentError, "Missing the required parameter 'overage_cap' when calling UsageApi.set_overage_cap"
|
|
838
|
+
end
|
|
839
|
+
# resource path
|
|
840
|
+
local_var_path = '/organizations/{org}/overage-caps/{meter}'.sub('{org}', CGI.escape(org.to_s)).sub('{meter}', CGI.escape(meter.to_s))
|
|
841
|
+
|
|
842
|
+
# query parameters
|
|
843
|
+
query_params = opts[:query_params] || {}
|
|
844
|
+
|
|
845
|
+
# header parameters
|
|
846
|
+
header_params = opts[:header_params] || {}
|
|
847
|
+
# HTTP header 'Accept' (if needed)
|
|
848
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
849
|
+
# HTTP header 'Content-Type'
|
|
850
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
851
|
+
if !content_type.nil?
|
|
852
|
+
header_params['Content-Type'] = content_type
|
|
853
|
+
end
|
|
854
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
855
|
+
|
|
856
|
+
# form parameters
|
|
857
|
+
form_params = opts[:form_params] || {}
|
|
858
|
+
|
|
859
|
+
# http body (model)
|
|
860
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(overage_cap)
|
|
861
|
+
|
|
862
|
+
# return_type
|
|
863
|
+
return_type = opts[:debug_return_type] || 'CustomerOverageCapRow'
|
|
864
|
+
|
|
865
|
+
# auth_names
|
|
866
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
867
|
+
|
|
868
|
+
new_options = opts.merge(
|
|
869
|
+
:operation => :"UsageApi.set_overage_cap",
|
|
870
|
+
:header_params => header_params,
|
|
871
|
+
:query_params => query_params,
|
|
872
|
+
:form_params => form_params,
|
|
873
|
+
:body => post_body,
|
|
874
|
+
:auth_names => auth_names,
|
|
875
|
+
:return_type => return_type
|
|
876
|
+
)
|
|
877
|
+
|
|
878
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
879
|
+
if @api_client.config.debugging
|
|
880
|
+
@api_client.config.logger.debug "API called: UsageApi#set_overage_cap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
881
|
+
end
|
|
882
|
+
return data, status_code, headers
|
|
883
|
+
end
|
|
884
|
+
|
|
885
|
+
# Set a plan's usage threshold (operator)
|
|
886
|
+
# When a subscription's unbilled usage in the running period reaches the threshold, an interim invoice bills it at once, taxed and collected like any invoice. The period's own invoice then bills the period's usage priced as a whole, less what the interim invoices billed, so allowances, tiers and a minimum spend come out as on one invoice. `reset_after_invoice: true` counts again from zero after each interim invoice; `false` bills once a period. A field sent as `null` inherits: customer, then plan, then environment. Without a threshold nothing changes. Takes an operator token.
|
|
887
|
+
# @param key [String] The plan key.
|
|
888
|
+
# @param usage_threshold_request [UsageThresholdRequest]
|
|
889
|
+
# @param [Hash] opts the optional parameters
|
|
890
|
+
# @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`.
|
|
891
|
+
# @return [UsageThreshold]
|
|
892
|
+
def set_plan_usage_threshold(key, usage_threshold_request, opts = {})
|
|
893
|
+
data, _status_code, _headers = set_plan_usage_threshold_with_http_info(key, usage_threshold_request, opts)
|
|
894
|
+
data
|
|
895
|
+
end
|
|
896
|
+
|
|
897
|
+
# Set a plan's usage threshold (operator)
|
|
898
|
+
# When a subscription's unbilled usage in the running period reaches the threshold, an interim invoice bills it at once, taxed and collected like any invoice. The period's own invoice then bills the period's usage priced as a whole, less what the interim invoices billed, so allowances, tiers and a minimum spend come out as on one invoice. `reset_after_invoice: true` counts again from zero after each interim invoice; `false` bills once a period. A field sent as `null` inherits: customer, then plan, then environment. Without a threshold nothing changes. Takes an operator token.
|
|
899
|
+
# @param key [String] The plan key.
|
|
900
|
+
# @param usage_threshold_request [UsageThresholdRequest]
|
|
901
|
+
# @param [Hash] opts the optional parameters
|
|
902
|
+
# @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`.
|
|
903
|
+
# @return [Array<(UsageThreshold, Integer, Hash)>] UsageThreshold data, response status code and response headers
|
|
904
|
+
def set_plan_usage_threshold_with_http_info(key, usage_threshold_request, opts = {})
|
|
905
|
+
if @api_client.config.debugging
|
|
906
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.set_plan_usage_threshold ...'
|
|
907
|
+
end
|
|
908
|
+
# verify the required parameter 'key' is set
|
|
909
|
+
if @api_client.config.client_side_validation && key.nil?
|
|
910
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling UsageApi.set_plan_usage_threshold"
|
|
911
|
+
end
|
|
912
|
+
# verify the required parameter 'usage_threshold_request' is set
|
|
913
|
+
if @api_client.config.client_side_validation && usage_threshold_request.nil?
|
|
914
|
+
fail ArgumentError, "Missing the required parameter 'usage_threshold_request' when calling UsageApi.set_plan_usage_threshold"
|
|
915
|
+
end
|
|
916
|
+
# resource path
|
|
917
|
+
local_var_path = '/plans/{key}/usage-threshold'.sub('{key}', CGI.escape(key.to_s))
|
|
918
|
+
|
|
919
|
+
# query parameters
|
|
920
|
+
query_params = opts[:query_params] || {}
|
|
921
|
+
|
|
922
|
+
# header parameters
|
|
923
|
+
header_params = opts[:header_params] || {}
|
|
924
|
+
# HTTP header 'Accept' (if needed)
|
|
925
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
926
|
+
# HTTP header 'Content-Type'
|
|
927
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
928
|
+
if !content_type.nil?
|
|
929
|
+
header_params['Content-Type'] = content_type
|
|
930
|
+
end
|
|
931
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
932
|
+
|
|
933
|
+
# form parameters
|
|
934
|
+
form_params = opts[:form_params] || {}
|
|
935
|
+
|
|
936
|
+
# http body (model)
|
|
937
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(usage_threshold_request)
|
|
938
|
+
|
|
939
|
+
# return_type
|
|
940
|
+
return_type = opts[:debug_return_type] || 'UsageThreshold'
|
|
941
|
+
|
|
942
|
+
# auth_names
|
|
943
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
944
|
+
|
|
945
|
+
new_options = opts.merge(
|
|
946
|
+
:operation => :"UsageApi.set_plan_usage_threshold",
|
|
947
|
+
:header_params => header_params,
|
|
948
|
+
:query_params => query_params,
|
|
949
|
+
:form_params => form_params,
|
|
950
|
+
:body => post_body,
|
|
951
|
+
:auth_names => auth_names,
|
|
952
|
+
:return_type => return_type
|
|
953
|
+
)
|
|
954
|
+
|
|
955
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
956
|
+
if @api_client.config.debugging
|
|
957
|
+
@api_client.config.logger.debug "API called: UsageApi#set_plan_usage_threshold\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
958
|
+
end
|
|
959
|
+
return data, status_code, headers
|
|
960
|
+
end
|
|
961
|
+
|
|
962
|
+
# Set the environment's default usage threshold (operator)
|
|
963
|
+
# When a subscription's unbilled usage in the running period reaches the threshold, an interim invoice bills it at once, taxed and collected like any invoice. The period's own invoice then bills the period's usage priced as a whole, less what the interim invoices billed, so allowances, tiers and a minimum spend come out as on one invoice. `reset_after_invoice: true` counts again from zero after each interim invoice; `false` bills once a period. A field sent as `null` inherits: customer, then plan, then environment. Without a threshold nothing changes. Takes an operator token.
|
|
964
|
+
# @param usage_threshold_request [UsageThresholdRequest]
|
|
965
|
+
# @param [Hash] opts the optional parameters
|
|
966
|
+
# @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`.
|
|
967
|
+
# @return [UsageThreshold]
|
|
968
|
+
def set_usage_threshold(usage_threshold_request, opts = {})
|
|
969
|
+
data, _status_code, _headers = set_usage_threshold_with_http_info(usage_threshold_request, opts)
|
|
970
|
+
data
|
|
971
|
+
end
|
|
972
|
+
|
|
973
|
+
# Set the environment's default usage threshold (operator)
|
|
974
|
+
# When a subscription's unbilled usage in the running period reaches the threshold, an interim invoice bills it at once, taxed and collected like any invoice. The period's own invoice then bills the period's usage priced as a whole, less what the interim invoices billed, so allowances, tiers and a minimum spend come out as on one invoice. `reset_after_invoice: true` counts again from zero after each interim invoice; `false` bills once a period. A field sent as `null` inherits: customer, then plan, then environment. Without a threshold nothing changes. Takes an operator token.
|
|
975
|
+
# @param usage_threshold_request [UsageThresholdRequest]
|
|
976
|
+
# @param [Hash] opts the optional parameters
|
|
977
|
+
# @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`.
|
|
978
|
+
# @return [Array<(UsageThreshold, Integer, Hash)>] UsageThreshold data, response status code and response headers
|
|
979
|
+
def set_usage_threshold_with_http_info(usage_threshold_request, opts = {})
|
|
980
|
+
if @api_client.config.debugging
|
|
981
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.set_usage_threshold ...'
|
|
982
|
+
end
|
|
983
|
+
# verify the required parameter 'usage_threshold_request' is set
|
|
984
|
+
if @api_client.config.client_side_validation && usage_threshold_request.nil?
|
|
985
|
+
fail ArgumentError, "Missing the required parameter 'usage_threshold_request' when calling UsageApi.set_usage_threshold"
|
|
986
|
+
end
|
|
987
|
+
# resource path
|
|
988
|
+
local_var_path = '/usage-threshold'
|
|
989
|
+
|
|
990
|
+
# query parameters
|
|
991
|
+
query_params = opts[:query_params] || {}
|
|
992
|
+
|
|
993
|
+
# header parameters
|
|
994
|
+
header_params = opts[:header_params] || {}
|
|
995
|
+
# HTTP header 'Accept' (if needed)
|
|
996
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
997
|
+
# HTTP header 'Content-Type'
|
|
998
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
999
|
+
if !content_type.nil?
|
|
1000
|
+
header_params['Content-Type'] = content_type
|
|
1001
|
+
end
|
|
1002
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1003
|
+
|
|
1004
|
+
# form parameters
|
|
1005
|
+
form_params = opts[:form_params] || {}
|
|
1006
|
+
|
|
1007
|
+
# http body (model)
|
|
1008
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(usage_threshold_request)
|
|
1009
|
+
|
|
1010
|
+
# return_type
|
|
1011
|
+
return_type = opts[:debug_return_type] || 'UsageThreshold'
|
|
1012
|
+
|
|
1013
|
+
# auth_names
|
|
1014
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1015
|
+
|
|
1016
|
+
new_options = opts.merge(
|
|
1017
|
+
:operation => :"UsageApi.set_usage_threshold",
|
|
1018
|
+
:header_params => header_params,
|
|
1019
|
+
:query_params => query_params,
|
|
1020
|
+
:form_params => form_params,
|
|
1021
|
+
:body => post_body,
|
|
1022
|
+
:auth_names => auth_names,
|
|
1023
|
+
:return_type => return_type
|
|
1024
|
+
)
|
|
1025
|
+
|
|
1026
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1027
|
+
if @api_client.config.debugging
|
|
1028
|
+
@api_client.config.logger.debug "API called: UsageApi#set_usage_threshold\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1029
|
+
end
|
|
1030
|
+
return data, status_code, headers
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
# Change or turn off a spend alert
|
|
1034
|
+
# Send only what changes. A changed threshold may fire again this period; the same threshold never fires twice in one period. `active: false` keeps the alert but stops it firing.
|
|
1035
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
1036
|
+
# @param id [String] The alert's public id (`sal_…`).
|
|
1037
|
+
# @param update_spend_alert_request [UpdateSpendAlertRequest]
|
|
1038
|
+
# @param [Hash] opts the optional parameters
|
|
1039
|
+
# @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`.
|
|
1040
|
+
# @return [SpendAlert]
|
|
1041
|
+
def update_spend_alert(org, id, update_spend_alert_request, opts = {})
|
|
1042
|
+
data, _status_code, _headers = update_spend_alert_with_http_info(org, id, update_spend_alert_request, opts)
|
|
1043
|
+
data
|
|
1044
|
+
end
|
|
1045
|
+
|
|
1046
|
+
# Change or turn off a spend alert
|
|
1047
|
+
# Send only what changes. A changed threshold may fire again this period; the same threshold never fires twice in one period. `active: false` keeps the alert but stops it firing.
|
|
1048
|
+
# @param org [String] The organization id (the merchant platform's own tenant key).
|
|
1049
|
+
# @param id [String] The alert's public id (`sal_…`).
|
|
1050
|
+
# @param update_spend_alert_request [UpdateSpendAlertRequest]
|
|
1051
|
+
# @param [Hash] opts the optional parameters
|
|
1052
|
+
# @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`.
|
|
1053
|
+
# @return [Array<(SpendAlert, Integer, Hash)>] SpendAlert data, response status code and response headers
|
|
1054
|
+
def update_spend_alert_with_http_info(org, id, update_spend_alert_request, opts = {})
|
|
1055
|
+
if @api_client.config.debugging
|
|
1056
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.update_spend_alert ...'
|
|
1057
|
+
end
|
|
1058
|
+
# verify the required parameter 'org' is set
|
|
1059
|
+
if @api_client.config.client_side_validation && org.nil?
|
|
1060
|
+
fail ArgumentError, "Missing the required parameter 'org' when calling UsageApi.update_spend_alert"
|
|
1061
|
+
end
|
|
1062
|
+
# verify the required parameter 'id' is set
|
|
1063
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1064
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsageApi.update_spend_alert"
|
|
1065
|
+
end
|
|
1066
|
+
# verify the required parameter 'update_spend_alert_request' is set
|
|
1067
|
+
if @api_client.config.client_side_validation && update_spend_alert_request.nil?
|
|
1068
|
+
fail ArgumentError, "Missing the required parameter 'update_spend_alert_request' when calling UsageApi.update_spend_alert"
|
|
1069
|
+
end
|
|
1070
|
+
# resource path
|
|
1071
|
+
local_var_path = '/organizations/{org}/spend-alerts/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{id}', CGI.escape(id.to_s))
|
|
1072
|
+
|
|
1073
|
+
# query parameters
|
|
1074
|
+
query_params = opts[:query_params] || {}
|
|
1075
|
+
|
|
1076
|
+
# header parameters
|
|
1077
|
+
header_params = opts[:header_params] || {}
|
|
1078
|
+
# HTTP header 'Accept' (if needed)
|
|
1079
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1080
|
+
# HTTP header 'Content-Type'
|
|
1081
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1082
|
+
if !content_type.nil?
|
|
1083
|
+
header_params['Content-Type'] = content_type
|
|
1084
|
+
end
|
|
1085
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1086
|
+
|
|
1087
|
+
# form parameters
|
|
1088
|
+
form_params = opts[:form_params] || {}
|
|
1089
|
+
|
|
1090
|
+
# http body (model)
|
|
1091
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_spend_alert_request)
|
|
1092
|
+
|
|
1093
|
+
# return_type
|
|
1094
|
+
return_type = opts[:debug_return_type] || 'SpendAlert'
|
|
1095
|
+
|
|
1096
|
+
# auth_names
|
|
1097
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1098
|
+
|
|
1099
|
+
new_options = opts.merge(
|
|
1100
|
+
:operation => :"UsageApi.update_spend_alert",
|
|
1101
|
+
:header_params => header_params,
|
|
1102
|
+
:query_params => query_params,
|
|
1103
|
+
:form_params => form_params,
|
|
1104
|
+
:body => post_body,
|
|
1105
|
+
:auth_names => auth_names,
|
|
1106
|
+
:return_type => return_type
|
|
1107
|
+
)
|
|
1108
|
+
|
|
1109
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
1110
|
+
if @api_client.config.debugging
|
|
1111
|
+
@api_client.config.logger.debug "API called: UsageApi#update_spend_alert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1112
|
+
end
|
|
1113
|
+
return data, status_code, headers
|
|
1114
|
+
end
|
|
1115
|
+
end
|
|
1116
|
+
end
|