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,1062 @@
|
|
|
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 QuotesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Clone a quote into a new draft
|
|
23
|
+
# Create a new draft with a new number and the same customer, terms and lines, valid for the environment's default number of days. `Idempotency-Key` is **required**.
|
|
24
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
25
|
+
# @param idempotency_key [String] An opaque, caller-generated key (at most 100 characters). Required: a missing key is `400 idempotency_key_required`. A retry with the same key replays the first response; reusing it with a different body is `409`.
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [Quote]
|
|
28
|
+
def clone_quote(number, idempotency_key, opts = {})
|
|
29
|
+
data, _status_code, _headers = clone_quote_with_http_info(number, idempotency_key, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Clone a quote into a new draft
|
|
34
|
+
# Create a new draft with a new number and the same customer, terms and lines, valid for the environment's default number of days. `Idempotency-Key` is **required**.
|
|
35
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
36
|
+
# @param idempotency_key [String] An opaque, caller-generated key (at most 100 characters). Required: a missing key is `400 idempotency_key_required`. A retry with the same key replays the first response; reusing it with a different body is `409`.
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
39
|
+
def clone_quote_with_http_info(number, idempotency_key, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.clone_quote ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'number' is set
|
|
44
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.clone_quote"
|
|
46
|
+
end
|
|
47
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
48
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
49
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.clone_quote, must conform to the pattern #{pattern}."
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# verify the required parameter 'idempotency_key' is set
|
|
53
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
54
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling QuotesApi.clone_quote"
|
|
55
|
+
end
|
|
56
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 100
|
|
57
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling QuotesApi.clone_quote, the character length must be smaller than or equal to 100.'
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# resource path
|
|
61
|
+
local_var_path = '/quotes/{number}/clone'.sub('{number}', CGI.escape(number.to_s))
|
|
62
|
+
|
|
63
|
+
# query parameters
|
|
64
|
+
query_params = opts[:query_params] || {}
|
|
65
|
+
|
|
66
|
+
# header parameters
|
|
67
|
+
header_params = opts[:header_params] || {}
|
|
68
|
+
# HTTP header 'Accept' (if needed)
|
|
69
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
70
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
71
|
+
|
|
72
|
+
# form parameters
|
|
73
|
+
form_params = opts[:form_params] || {}
|
|
74
|
+
|
|
75
|
+
# http body (model)
|
|
76
|
+
post_body = opts[:debug_body]
|
|
77
|
+
|
|
78
|
+
# return_type
|
|
79
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
80
|
+
|
|
81
|
+
# auth_names
|
|
82
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
83
|
+
|
|
84
|
+
new_options = opts.merge(
|
|
85
|
+
:operation => :"QuotesApi.clone_quote",
|
|
86
|
+
:header_params => header_params,
|
|
87
|
+
:query_params => query_params,
|
|
88
|
+
:form_params => form_params,
|
|
89
|
+
:body => post_body,
|
|
90
|
+
:auth_names => auth_names,
|
|
91
|
+
:return_type => return_type
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
95
|
+
if @api_client.config.debugging
|
|
96
|
+
@api_client.config.logger.debug "API called: QuotesApi#clone_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
97
|
+
end
|
|
98
|
+
return data, status_code, headers
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Create a draft quote
|
|
102
|
+
# Author a draft quote, exactly as the console's \"New quote\" does. The token owns the quote (`owner_name` defaults to the token's name). A quote names an organization (`organization_id`) or a prospect (`prospect_name`, `prospect_email`). Every amount is in integer minor units of `currency`. A plan line names the plan by key and must be priced in `currency`. A custom line carries its own `unit_amount_minor` and is a one-off unless `recurring` is true. A percentage discount is a whole percent (at most 100); a fixed one is in minor units. `Idempotency-Key` is **required**. Another environment's organization, plan, coupon or seller entity is `422`, as if it did not exist. A plan not priced in the currency, or a notice period as long as the term, is `409 quote_refused`.
|
|
103
|
+
# @param idempotency_key [String] An opaque, caller-generated key (at most 100 characters). Required: a missing key is `400 idempotency_key_required`. A retry with the same key replays the first response; reusing it with a different body is `409`.
|
|
104
|
+
# @param quote_request [QuoteRequest]
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @return [Quote]
|
|
107
|
+
def create_quote(idempotency_key, quote_request, opts = {})
|
|
108
|
+
data, _status_code, _headers = create_quote_with_http_info(idempotency_key, quote_request, opts)
|
|
109
|
+
data
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Create a draft quote
|
|
113
|
+
# Author a draft quote, exactly as the console's \"New quote\" does. The token owns the quote (`owner_name` defaults to the token's name). A quote names an organization (`organization_id`) or a prospect (`prospect_name`, `prospect_email`). Every amount is in integer minor units of `currency`. A plan line names the plan by key and must be priced in `currency`. A custom line carries its own `unit_amount_minor` and is a one-off unless `recurring` is true. A percentage discount is a whole percent (at most 100); a fixed one is in minor units. `Idempotency-Key` is **required**. Another environment's organization, plan, coupon or seller entity is `422`, as if it did not exist. A plan not priced in the currency, or a notice period as long as the term, is `409 quote_refused`.
|
|
114
|
+
# @param idempotency_key [String] An opaque, caller-generated key (at most 100 characters). Required: a missing key is `400 idempotency_key_required`. A retry with the same key replays the first response; reusing it with a different body is `409`.
|
|
115
|
+
# @param quote_request [QuoteRequest]
|
|
116
|
+
# @param [Hash] opts the optional parameters
|
|
117
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
118
|
+
def create_quote_with_http_info(idempotency_key, quote_request, opts = {})
|
|
119
|
+
if @api_client.config.debugging
|
|
120
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.create_quote ...'
|
|
121
|
+
end
|
|
122
|
+
# verify the required parameter 'idempotency_key' is set
|
|
123
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
124
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling QuotesApi.create_quote"
|
|
125
|
+
end
|
|
126
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 100
|
|
127
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling QuotesApi.create_quote, the character length must be smaller than or equal to 100.'
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# verify the required parameter 'quote_request' is set
|
|
131
|
+
if @api_client.config.client_side_validation && quote_request.nil?
|
|
132
|
+
fail ArgumentError, "Missing the required parameter 'quote_request' when calling QuotesApi.create_quote"
|
|
133
|
+
end
|
|
134
|
+
# resource path
|
|
135
|
+
local_var_path = '/quotes'
|
|
136
|
+
|
|
137
|
+
# query parameters
|
|
138
|
+
query_params = opts[:query_params] || {}
|
|
139
|
+
|
|
140
|
+
# header parameters
|
|
141
|
+
header_params = opts[:header_params] || {}
|
|
142
|
+
# HTTP header 'Accept' (if needed)
|
|
143
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
144
|
+
# HTTP header 'Content-Type'
|
|
145
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
146
|
+
if !content_type.nil?
|
|
147
|
+
header_params['Content-Type'] = content_type
|
|
148
|
+
end
|
|
149
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
150
|
+
|
|
151
|
+
# form parameters
|
|
152
|
+
form_params = opts[:form_params] || {}
|
|
153
|
+
|
|
154
|
+
# http body (model)
|
|
155
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(quote_request)
|
|
156
|
+
|
|
157
|
+
# return_type
|
|
158
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
159
|
+
|
|
160
|
+
# auth_names
|
|
161
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
162
|
+
|
|
163
|
+
new_options = opts.merge(
|
|
164
|
+
:operation => :"QuotesApi.create_quote",
|
|
165
|
+
:header_params => header_params,
|
|
166
|
+
:query_params => query_params,
|
|
167
|
+
:form_params => form_params,
|
|
168
|
+
:body => post_body,
|
|
169
|
+
:auth_names => auth_names,
|
|
170
|
+
:return_type => return_type
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
174
|
+
if @api_client.config.debugging
|
|
175
|
+
@api_client.config.logger.debug "API called: QuotesApi#create_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
176
|
+
end
|
|
177
|
+
return data, status_code, headers
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Delete a quote
|
|
181
|
+
# A quote that opened a subscription cannot be deleted (`409 quote_refused`).
|
|
182
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
183
|
+
# @param [Hash] opts the optional parameters
|
|
184
|
+
# @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`.
|
|
185
|
+
# @return [nil]
|
|
186
|
+
def delete_quote(number, opts = {})
|
|
187
|
+
delete_quote_with_http_info(number, opts)
|
|
188
|
+
nil
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Delete a quote
|
|
192
|
+
# A quote that opened a subscription cannot be deleted (`409 quote_refused`).
|
|
193
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
194
|
+
# @param [Hash] opts the optional parameters
|
|
195
|
+
# @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`.
|
|
196
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
197
|
+
def delete_quote_with_http_info(number, opts = {})
|
|
198
|
+
if @api_client.config.debugging
|
|
199
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.delete_quote ...'
|
|
200
|
+
end
|
|
201
|
+
# verify the required parameter 'number' is set
|
|
202
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
203
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.delete_quote"
|
|
204
|
+
end
|
|
205
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
206
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
207
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.delete_quote, must conform to the pattern #{pattern}."
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# resource path
|
|
211
|
+
local_var_path = '/quotes/{number}'.sub('{number}', CGI.escape(number.to_s))
|
|
212
|
+
|
|
213
|
+
# query parameters
|
|
214
|
+
query_params = opts[:query_params] || {}
|
|
215
|
+
|
|
216
|
+
# header parameters
|
|
217
|
+
header_params = opts[:header_params] || {}
|
|
218
|
+
# HTTP header 'Accept' (if needed)
|
|
219
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
220
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
221
|
+
|
|
222
|
+
# form parameters
|
|
223
|
+
form_params = opts[:form_params] || {}
|
|
224
|
+
|
|
225
|
+
# http body (model)
|
|
226
|
+
post_body = opts[:debug_body]
|
|
227
|
+
|
|
228
|
+
# return_type
|
|
229
|
+
return_type = opts[:debug_return_type]
|
|
230
|
+
|
|
231
|
+
# auth_names
|
|
232
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
233
|
+
|
|
234
|
+
new_options = opts.merge(
|
|
235
|
+
:operation => :"QuotesApi.delete_quote",
|
|
236
|
+
:header_params => header_params,
|
|
237
|
+
:query_params => query_params,
|
|
238
|
+
:form_params => form_params,
|
|
239
|
+
:body => post_body,
|
|
240
|
+
:auth_names => auth_names,
|
|
241
|
+
:return_type => return_type
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
245
|
+
if @api_client.config.debugging
|
|
246
|
+
@api_client.config.logger.debug "API called: QuotesApi#delete_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
247
|
+
end
|
|
248
|
+
return data, status_code, headers
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Download the signed PDF of a quote
|
|
252
|
+
# The PDF kept when the last required signature came in: the quote version as the signers read it, every signature, and an evidence page per signer (name, email, title, company, IP, browser, when they were sent it, viewed it, were sent a code, verified it and signed, the consent they ticked) with the SHA-256 of the signed content. It is never rendered again; `X-Content-SHA256` is the hash kept with it. `404` until everyone has signed.
|
|
253
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
254
|
+
# @param [Hash] opts the optional parameters
|
|
255
|
+
# @return [File]
|
|
256
|
+
def download_signed_quote(number, opts = {})
|
|
257
|
+
data, _status_code, _headers = download_signed_quote_with_http_info(number, opts)
|
|
258
|
+
data
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Download the signed PDF of a quote
|
|
262
|
+
# The PDF kept when the last required signature came in: the quote version as the signers read it, every signature, and an evidence page per signer (name, email, title, company, IP, browser, when they were sent it, viewed it, were sent a code, verified it and signed, the consent they ticked) with the SHA-256 of the signed content. It is never rendered again; `X-Content-SHA256` is the hash kept with it. `404` until everyone has signed.
|
|
263
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
264
|
+
# @param [Hash] opts the optional parameters
|
|
265
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
266
|
+
def download_signed_quote_with_http_info(number, opts = {})
|
|
267
|
+
if @api_client.config.debugging
|
|
268
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.download_signed_quote ...'
|
|
269
|
+
end
|
|
270
|
+
# verify the required parameter 'number' is set
|
|
271
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
272
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.download_signed_quote"
|
|
273
|
+
end
|
|
274
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
275
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
276
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.download_signed_quote, must conform to the pattern #{pattern}."
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# resource path
|
|
280
|
+
local_var_path = '/quotes/{number}/signed-document'.sub('{number}', CGI.escape(number.to_s))
|
|
281
|
+
|
|
282
|
+
# query parameters
|
|
283
|
+
query_params = opts[:query_params] || {}
|
|
284
|
+
|
|
285
|
+
# header parameters
|
|
286
|
+
header_params = opts[:header_params] || {}
|
|
287
|
+
# HTTP header 'Accept' (if needed)
|
|
288
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']
|
|
289
|
+
|
|
290
|
+
# form parameters
|
|
291
|
+
form_params = opts[:form_params] || {}
|
|
292
|
+
|
|
293
|
+
# http body (model)
|
|
294
|
+
post_body = opts[:debug_body]
|
|
295
|
+
|
|
296
|
+
# return_type
|
|
297
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
298
|
+
|
|
299
|
+
# auth_names
|
|
300
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
301
|
+
|
|
302
|
+
new_options = opts.merge(
|
|
303
|
+
:operation => :"QuotesApi.download_signed_quote",
|
|
304
|
+
:header_params => header_params,
|
|
305
|
+
:query_params => query_params,
|
|
306
|
+
:form_params => form_params,
|
|
307
|
+
:body => post_body,
|
|
308
|
+
:auth_names => auth_names,
|
|
309
|
+
:return_type => return_type
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
313
|
+
if @api_client.config.debugging
|
|
314
|
+
@api_client.config.logger.debug "API called: QuotesApi#download_signed_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
315
|
+
end
|
|
316
|
+
return data, status_code, headers
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Expire (void) a quote
|
|
320
|
+
# Close a quote that is not accepted, declined or expired yet, so its order form stops taking acceptance. An accepted, declined or expired quote is `409`.
|
|
321
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
322
|
+
# @param [Hash] opts the optional parameters
|
|
323
|
+
# @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`.
|
|
324
|
+
# @return [Quote]
|
|
325
|
+
def expire_quote(number, opts = {})
|
|
326
|
+
data, _status_code, _headers = expire_quote_with_http_info(number, opts)
|
|
327
|
+
data
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Expire (void) a quote
|
|
331
|
+
# Close a quote that is not accepted, declined or expired yet, so its order form stops taking acceptance. An accepted, declined or expired quote is `409`.
|
|
332
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
333
|
+
# @param [Hash] opts the optional parameters
|
|
334
|
+
# @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`.
|
|
335
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
336
|
+
def expire_quote_with_http_info(number, opts = {})
|
|
337
|
+
if @api_client.config.debugging
|
|
338
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.expire_quote ...'
|
|
339
|
+
end
|
|
340
|
+
# verify the required parameter 'number' is set
|
|
341
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
342
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.expire_quote"
|
|
343
|
+
end
|
|
344
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
345
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
346
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.expire_quote, must conform to the pattern #{pattern}."
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
# resource path
|
|
350
|
+
local_var_path = '/quotes/{number}/expire'.sub('{number}', CGI.escape(number.to_s))
|
|
351
|
+
|
|
352
|
+
# query parameters
|
|
353
|
+
query_params = opts[:query_params] || {}
|
|
354
|
+
|
|
355
|
+
# header parameters
|
|
356
|
+
header_params = opts[:header_params] || {}
|
|
357
|
+
# HTTP header 'Accept' (if needed)
|
|
358
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
359
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
360
|
+
|
|
361
|
+
# form parameters
|
|
362
|
+
form_params = opts[:form_params] || {}
|
|
363
|
+
|
|
364
|
+
# http body (model)
|
|
365
|
+
post_body = opts[:debug_body]
|
|
366
|
+
|
|
367
|
+
# return_type
|
|
368
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
369
|
+
|
|
370
|
+
# auth_names
|
|
371
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
372
|
+
|
|
373
|
+
new_options = opts.merge(
|
|
374
|
+
:operation => :"QuotesApi.expire_quote",
|
|
375
|
+
:header_params => header_params,
|
|
376
|
+
:query_params => query_params,
|
|
377
|
+
:form_params => form_params,
|
|
378
|
+
:body => post_body,
|
|
379
|
+
:auth_names => auth_names,
|
|
380
|
+
:return_type => return_type
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
384
|
+
if @api_client.config.debugging
|
|
385
|
+
@api_client.config.logger.debug "API called: QuotesApi#expire_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
386
|
+
end
|
|
387
|
+
return data, status_code, headers
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# Read a quote with its totals and acceptance
|
|
391
|
+
# One quote with its terms, its lines and the totals the console shows, computed through the engine. While tax cannot be calculated yet, the totals are net and `totals.tax_pending` is true. `acceptance` is the customer's signed acceptance on the order form (who and when), or null. Another environment's quote is `404`.
|
|
392
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
393
|
+
# @param [Hash] opts the optional parameters
|
|
394
|
+
# @return [Quote]
|
|
395
|
+
def get_quote(number, opts = {})
|
|
396
|
+
data, _status_code, _headers = get_quote_with_http_info(number, opts)
|
|
397
|
+
data
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# Read a quote with its totals and acceptance
|
|
401
|
+
# One quote with its terms, its lines and the totals the console shows, computed through the engine. While tax cannot be calculated yet, the totals are net and `totals.tax_pending` is true. `acceptance` is the customer's signed acceptance on the order form (who and when), or null. Another environment's quote is `404`.
|
|
402
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
403
|
+
# @param [Hash] opts the optional parameters
|
|
404
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
405
|
+
def get_quote_with_http_info(number, opts = {})
|
|
406
|
+
if @api_client.config.debugging
|
|
407
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.get_quote ...'
|
|
408
|
+
end
|
|
409
|
+
# verify the required parameter 'number' is set
|
|
410
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
411
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.get_quote"
|
|
412
|
+
end
|
|
413
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
414
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
415
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.get_quote, must conform to the pattern #{pattern}."
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
# resource path
|
|
419
|
+
local_var_path = '/quotes/{number}'.sub('{number}', CGI.escape(number.to_s))
|
|
420
|
+
|
|
421
|
+
# query parameters
|
|
422
|
+
query_params = opts[:query_params] || {}
|
|
423
|
+
|
|
424
|
+
# header parameters
|
|
425
|
+
header_params = opts[:header_params] || {}
|
|
426
|
+
# HTTP header 'Accept' (if needed)
|
|
427
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
428
|
+
|
|
429
|
+
# form parameters
|
|
430
|
+
form_params = opts[:form_params] || {}
|
|
431
|
+
|
|
432
|
+
# http body (model)
|
|
433
|
+
post_body = opts[:debug_body]
|
|
434
|
+
|
|
435
|
+
# return_type
|
|
436
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
437
|
+
|
|
438
|
+
# auth_names
|
|
439
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
440
|
+
|
|
441
|
+
new_options = opts.merge(
|
|
442
|
+
:operation => :"QuotesApi.get_quote",
|
|
443
|
+
:header_params => header_params,
|
|
444
|
+
:query_params => query_params,
|
|
445
|
+
:form_params => form_params,
|
|
446
|
+
:body => post_body,
|
|
447
|
+
:auth_names => auth_names,
|
|
448
|
+
:return_type => return_type
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
452
|
+
if @api_client.config.debugging
|
|
453
|
+
@api_client.config.logger.debug "API called: QuotesApi#get_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
454
|
+
end
|
|
455
|
+
return data, status_code, headers
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
# List sales quotes (newest first)
|
|
459
|
+
# The environment's quotes, newest first, as the console's Quotes list shows them. Filter by `status` (one status, or `all`) and search `q` over the quote number, the prospect's name or email and the organization's name. Cursor-paginated. Needs an operator token with `quotes:read` that is not bound to a product; any other token is `403`.
|
|
460
|
+
# @param [Hash] opts the optional parameters
|
|
461
|
+
# @option opts [String] :status One status, or `all` (the default).
|
|
462
|
+
# @option opts [String] :q Search over number, prospect name and email, and organization name.
|
|
463
|
+
# @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`.
|
|
464
|
+
# @option opts [Integer] :limit Maximum items per page (1–100). Defaults to 20. (default to 20)
|
|
465
|
+
# @return [QuoteList]
|
|
466
|
+
def list_quotes(opts = {})
|
|
467
|
+
data, _status_code, _headers = list_quotes_with_http_info(opts)
|
|
468
|
+
data
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
# List sales quotes (newest first)
|
|
472
|
+
# The environment's quotes, newest first, as the console's Quotes list shows them. Filter by `status` (one status, or `all`) and search `q` over the quote number, the prospect's name or email and the organization's name. Cursor-paginated. Needs an operator token with `quotes:read` that is not bound to a product; any other token is `403`.
|
|
473
|
+
# @param [Hash] opts the optional parameters
|
|
474
|
+
# @option opts [String] :status One status, or `all` (the default).
|
|
475
|
+
# @option opts [String] :q Search over number, prospect name and email, and organization name.
|
|
476
|
+
# @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`.
|
|
477
|
+
# @option opts [Integer] :limit Maximum items per page (1–100). Defaults to 20. (default to 20)
|
|
478
|
+
# @return [Array<(QuoteList, Integer, Hash)>] QuoteList data, response status code and response headers
|
|
479
|
+
def list_quotes_with_http_info(opts = {})
|
|
480
|
+
if @api_client.config.debugging
|
|
481
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.list_quotes ...'
|
|
482
|
+
end
|
|
483
|
+
allowable_values = ["all", "draft", "pending_approval", "approved", "sent", "awaiting_countersign", "accepted", "declined", "expired"]
|
|
484
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
485
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
486
|
+
end
|
|
487
|
+
if @api_client.config.client_side_validation && !opts[:'q'].nil? && opts[:'q'].to_s.length > 200
|
|
488
|
+
fail ArgumentError, 'invalid value for "opts[:"q"]" when calling QuotesApi.list_quotes, the character length must be smaller than or equal to 200.'
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
492
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling QuotesApi.list_quotes, must be smaller than or equal to 100.'
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
496
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling QuotesApi.list_quotes, must be greater than or equal to 1.'
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# resource path
|
|
500
|
+
local_var_path = '/quotes'
|
|
501
|
+
|
|
502
|
+
# query parameters
|
|
503
|
+
query_params = opts[:query_params] || {}
|
|
504
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
505
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
506
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
507
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
508
|
+
|
|
509
|
+
# header parameters
|
|
510
|
+
header_params = opts[:header_params] || {}
|
|
511
|
+
# HTTP header 'Accept' (if needed)
|
|
512
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
513
|
+
|
|
514
|
+
# form parameters
|
|
515
|
+
form_params = opts[:form_params] || {}
|
|
516
|
+
|
|
517
|
+
# http body (model)
|
|
518
|
+
post_body = opts[:debug_body]
|
|
519
|
+
|
|
520
|
+
# return_type
|
|
521
|
+
return_type = opts[:debug_return_type] || 'QuoteList'
|
|
522
|
+
|
|
523
|
+
# auth_names
|
|
524
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
525
|
+
|
|
526
|
+
new_options = opts.merge(
|
|
527
|
+
:operation => :"QuotesApi.list_quotes",
|
|
528
|
+
:header_params => header_params,
|
|
529
|
+
:query_params => query_params,
|
|
530
|
+
:form_params => form_params,
|
|
531
|
+
:body => post_body,
|
|
532
|
+
:auth_names => auth_names,
|
|
533
|
+
:return_type => return_type
|
|
534
|
+
)
|
|
535
|
+
|
|
536
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
537
|
+
if @api_client.config.debugging
|
|
538
|
+
@api_client.config.logger.debug "API called: QuotesApi#list_quotes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
539
|
+
end
|
|
540
|
+
return data, status_code, headers
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
# Retry opening the subscription of an accepted quote
|
|
544
|
+
# A daily pass opens the subscription of an accepted quote. When that pass gives up, `provisioning_failed_at` is set and `provisioning_error` says why. Fix the cause, then call this to try once more. Any other quote is `409 quote_refused`.
|
|
545
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
546
|
+
# @param [Hash] opts the optional parameters
|
|
547
|
+
# @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`.
|
|
548
|
+
# @return [Quote]
|
|
549
|
+
def provision_quote(number, opts = {})
|
|
550
|
+
data, _status_code, _headers = provision_quote_with_http_info(number, opts)
|
|
551
|
+
data
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
# Retry opening the subscription of an accepted quote
|
|
555
|
+
# A daily pass opens the subscription of an accepted quote. When that pass gives up, `provisioning_failed_at` is set and `provisioning_error` says why. Fix the cause, then call this to try once more. Any other quote is `409 quote_refused`.
|
|
556
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
557
|
+
# @param [Hash] opts the optional parameters
|
|
558
|
+
# @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`.
|
|
559
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
560
|
+
def provision_quote_with_http_info(number, opts = {})
|
|
561
|
+
if @api_client.config.debugging
|
|
562
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.provision_quote ...'
|
|
563
|
+
end
|
|
564
|
+
# verify the required parameter 'number' is set
|
|
565
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
566
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.provision_quote"
|
|
567
|
+
end
|
|
568
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
569
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
570
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.provision_quote, must conform to the pattern #{pattern}."
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
# resource path
|
|
574
|
+
local_var_path = '/quotes/{number}/provision'.sub('{number}', CGI.escape(number.to_s))
|
|
575
|
+
|
|
576
|
+
# query parameters
|
|
577
|
+
query_params = opts[:query_params] || {}
|
|
578
|
+
|
|
579
|
+
# header parameters
|
|
580
|
+
header_params = opts[:header_params] || {}
|
|
581
|
+
# HTTP header 'Accept' (if needed)
|
|
582
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
583
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
584
|
+
|
|
585
|
+
# form parameters
|
|
586
|
+
form_params = opts[:form_params] || {}
|
|
587
|
+
|
|
588
|
+
# http body (model)
|
|
589
|
+
post_body = opts[:debug_body]
|
|
590
|
+
|
|
591
|
+
# return_type
|
|
592
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
593
|
+
|
|
594
|
+
# auth_names
|
|
595
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
596
|
+
|
|
597
|
+
new_options = opts.merge(
|
|
598
|
+
:operation => :"QuotesApi.provision_quote",
|
|
599
|
+
:header_params => header_params,
|
|
600
|
+
:query_params => query_params,
|
|
601
|
+
:form_params => form_params,
|
|
602
|
+
:body => post_body,
|
|
603
|
+
:auth_names => auth_names,
|
|
604
|
+
:return_type => return_type
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
608
|
+
if @api_client.config.debugging
|
|
609
|
+
@api_client.config.logger.debug "API called: QuotesApi#provision_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
610
|
+
end
|
|
611
|
+
return data, status_code, headers
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
# Resend a sent quote
|
|
615
|
+
# Stamp a sent quote as sent again and email the signers whose turn it is their links again. The order form keeps its link, and the link is not shown again (`order_form_url: null`). Only a quote out for signatures (`sent` or `awaiting_countersign`) can be resent (`409`).
|
|
616
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
617
|
+
# @param [Hash] opts the optional parameters
|
|
618
|
+
# @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`.
|
|
619
|
+
# @return [Quote]
|
|
620
|
+
def resend_quote(number, opts = {})
|
|
621
|
+
data, _status_code, _headers = resend_quote_with_http_info(number, opts)
|
|
622
|
+
data
|
|
623
|
+
end
|
|
624
|
+
|
|
625
|
+
# Resend a sent quote
|
|
626
|
+
# Stamp a sent quote as sent again and email the signers whose turn it is their links again. The order form keeps its link, and the link is not shown again (`order_form_url: null`). Only a quote out for signatures (`sent` or `awaiting_countersign`) can be resent (`409`).
|
|
627
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
628
|
+
# @param [Hash] opts the optional parameters
|
|
629
|
+
# @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`.
|
|
630
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
631
|
+
def resend_quote_with_http_info(number, opts = {})
|
|
632
|
+
if @api_client.config.debugging
|
|
633
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.resend_quote ...'
|
|
634
|
+
end
|
|
635
|
+
# verify the required parameter 'number' is set
|
|
636
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
637
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.resend_quote"
|
|
638
|
+
end
|
|
639
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
640
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
641
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.resend_quote, must conform to the pattern #{pattern}."
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
# resource path
|
|
645
|
+
local_var_path = '/quotes/{number}/resend'.sub('{number}', CGI.escape(number.to_s))
|
|
646
|
+
|
|
647
|
+
# query parameters
|
|
648
|
+
query_params = opts[:query_params] || {}
|
|
649
|
+
|
|
650
|
+
# header parameters
|
|
651
|
+
header_params = opts[:header_params] || {}
|
|
652
|
+
# HTTP header 'Accept' (if needed)
|
|
653
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
654
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
655
|
+
|
|
656
|
+
# form parameters
|
|
657
|
+
form_params = opts[:form_params] || {}
|
|
658
|
+
|
|
659
|
+
# http body (model)
|
|
660
|
+
post_body = opts[:debug_body]
|
|
661
|
+
|
|
662
|
+
# return_type
|
|
663
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
664
|
+
|
|
665
|
+
# auth_names
|
|
666
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
667
|
+
|
|
668
|
+
new_options = opts.merge(
|
|
669
|
+
:operation => :"QuotesApi.resend_quote",
|
|
670
|
+
:header_params => header_params,
|
|
671
|
+
:query_params => query_params,
|
|
672
|
+
:form_params => form_params,
|
|
673
|
+
:body => post_body,
|
|
674
|
+
:auth_names => auth_names,
|
|
675
|
+
:return_type => return_type
|
|
676
|
+
)
|
|
677
|
+
|
|
678
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
679
|
+
if @api_client.config.debugging
|
|
680
|
+
@api_client.config.logger.debug "API called: QuotesApi#resend_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
681
|
+
end
|
|
682
|
+
return data, status_code, headers
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
# Revise a quote that is out (a new version that needs new signatures)
|
|
686
|
+
# Take a quote that is waiting for approval, approved, out for signatures or waiting for the countersignature back to draft. A quote that was sent becomes the next version (`signing.version`): every signature of the old version stays on record and stops counting, its links stop working, and the same signers sign the new version once it is approved and sent. A signed (accepted), declined or expired quote is `409`; clone it instead.
|
|
687
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
688
|
+
# @param [Hash] opts the optional parameters
|
|
689
|
+
# @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`.
|
|
690
|
+
# @return [Quote]
|
|
691
|
+
def revise_quote(number, opts = {})
|
|
692
|
+
data, _status_code, _headers = revise_quote_with_http_info(number, opts)
|
|
693
|
+
data
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
# Revise a quote that is out (a new version that needs new signatures)
|
|
697
|
+
# Take a quote that is waiting for approval, approved, out for signatures or waiting for the countersignature back to draft. A quote that was sent becomes the next version (`signing.version`): every signature of the old version stays on record and stops counting, its links stop working, and the same signers sign the new version once it is approved and sent. A signed (accepted), declined or expired quote is `409`; clone it instead.
|
|
698
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
699
|
+
# @param [Hash] opts the optional parameters
|
|
700
|
+
# @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`.
|
|
701
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
702
|
+
def revise_quote_with_http_info(number, opts = {})
|
|
703
|
+
if @api_client.config.debugging
|
|
704
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.revise_quote ...'
|
|
705
|
+
end
|
|
706
|
+
# verify the required parameter 'number' is set
|
|
707
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
708
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.revise_quote"
|
|
709
|
+
end
|
|
710
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
711
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
712
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.revise_quote, must conform to the pattern #{pattern}."
|
|
713
|
+
end
|
|
714
|
+
|
|
715
|
+
# resource path
|
|
716
|
+
local_var_path = '/quotes/{number}/revise'.sub('{number}', CGI.escape(number.to_s))
|
|
717
|
+
|
|
718
|
+
# query parameters
|
|
719
|
+
query_params = opts[:query_params] || {}
|
|
720
|
+
|
|
721
|
+
# header parameters
|
|
722
|
+
header_params = opts[:header_params] || {}
|
|
723
|
+
# HTTP header 'Accept' (if needed)
|
|
724
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
725
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
726
|
+
|
|
727
|
+
# form parameters
|
|
728
|
+
form_params = opts[:form_params] || {}
|
|
729
|
+
|
|
730
|
+
# http body (model)
|
|
731
|
+
post_body = opts[:debug_body]
|
|
732
|
+
|
|
733
|
+
# return_type
|
|
734
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
735
|
+
|
|
736
|
+
# auth_names
|
|
737
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
738
|
+
|
|
739
|
+
new_options = opts.merge(
|
|
740
|
+
:operation => :"QuotesApi.revise_quote",
|
|
741
|
+
:header_params => header_params,
|
|
742
|
+
:query_params => query_params,
|
|
743
|
+
:form_params => form_params,
|
|
744
|
+
:body => post_body,
|
|
745
|
+
:auth_names => auth_names,
|
|
746
|
+
:return_type => return_type
|
|
747
|
+
)
|
|
748
|
+
|
|
749
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
750
|
+
if @api_client.config.debugging
|
|
751
|
+
@api_client.config.logger.debug "API called: QuotesApi#revise_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
752
|
+
end
|
|
753
|
+
return data, status_code, headers
|
|
754
|
+
end
|
|
755
|
+
|
|
756
|
+
# Send an approved quote (open its order form)
|
|
757
|
+
# Mark an approved quote sent and open its order form. `order_form_url` is the customer's link, and it appears in this answer only, because Billing keeps a digest of it and never the link itself. A replay with the same `Idempotency-Key` answers `order_form_url: null`. Billing emails each signer their own link; the order-form link is yours to share. Only an approved quote can be sent (`409`). Sending also opens the quote for signatures: the content signers sign is frozen with its SHA-256 (`signing.content_hash`), each signer gets a personal link by email when it is their turn, and a quote with no signers set up asks its customer (the prospect's email, else the organization's billing contact). With one customer signer, `order_form_url` is also that signer's link; with several, it shows the progress and each signs from their own email.
|
|
758
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
759
|
+
# @param [Hash] opts the optional parameters
|
|
760
|
+
# @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`.
|
|
761
|
+
# @return [Quote]
|
|
762
|
+
def send_quote(number, opts = {})
|
|
763
|
+
data, _status_code, _headers = send_quote_with_http_info(number, opts)
|
|
764
|
+
data
|
|
765
|
+
end
|
|
766
|
+
|
|
767
|
+
# Send an approved quote (open its order form)
|
|
768
|
+
# Mark an approved quote sent and open its order form. `order_form_url` is the customer's link, and it appears in this answer only, because Billing keeps a digest of it and never the link itself. A replay with the same `Idempotency-Key` answers `order_form_url: null`. Billing emails each signer their own link; the order-form link is yours to share. Only an approved quote can be sent (`409`). Sending also opens the quote for signatures: the content signers sign is frozen with its SHA-256 (`signing.content_hash`), each signer gets a personal link by email when it is their turn, and a quote with no signers set up asks its customer (the prospect's email, else the organization's billing contact). With one customer signer, `order_form_url` is also that signer's link; with several, it shows the progress and each signs from their own email.
|
|
769
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
770
|
+
# @param [Hash] opts the optional parameters
|
|
771
|
+
# @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`.
|
|
772
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
773
|
+
def send_quote_with_http_info(number, opts = {})
|
|
774
|
+
if @api_client.config.debugging
|
|
775
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.send_quote ...'
|
|
776
|
+
end
|
|
777
|
+
# verify the required parameter 'number' is set
|
|
778
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
779
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.send_quote"
|
|
780
|
+
end
|
|
781
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
782
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
783
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.send_quote, must conform to the pattern #{pattern}."
|
|
784
|
+
end
|
|
785
|
+
|
|
786
|
+
# resource path
|
|
787
|
+
local_var_path = '/quotes/{number}/send'.sub('{number}', CGI.escape(number.to_s))
|
|
788
|
+
|
|
789
|
+
# query parameters
|
|
790
|
+
query_params = opts[:query_params] || {}
|
|
791
|
+
|
|
792
|
+
# header parameters
|
|
793
|
+
header_params = opts[:header_params] || {}
|
|
794
|
+
# HTTP header 'Accept' (if needed)
|
|
795
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
796
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
797
|
+
|
|
798
|
+
# form parameters
|
|
799
|
+
form_params = opts[:form_params] || {}
|
|
800
|
+
|
|
801
|
+
# http body (model)
|
|
802
|
+
post_body = opts[:debug_body]
|
|
803
|
+
|
|
804
|
+
# return_type
|
|
805
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
806
|
+
|
|
807
|
+
# auth_names
|
|
808
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
809
|
+
|
|
810
|
+
new_options = opts.merge(
|
|
811
|
+
:operation => :"QuotesApi.send_quote",
|
|
812
|
+
:header_params => header_params,
|
|
813
|
+
:query_params => query_params,
|
|
814
|
+
:form_params => form_params,
|
|
815
|
+
:body => post_body,
|
|
816
|
+
:auth_names => auth_names,
|
|
817
|
+
:return_type => return_type
|
|
818
|
+
)
|
|
819
|
+
|
|
820
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
821
|
+
if @api_client.config.debugging
|
|
822
|
+
@api_client.config.logger.debug "API called: QuotesApi#send_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
823
|
+
end
|
|
824
|
+
return data, status_code, headers
|
|
825
|
+
end
|
|
826
|
+
|
|
827
|
+
# Set who signs a quote and how
|
|
828
|
+
# Replace a quote's signing setup before it is sent: the customer signers in order (at most 10), whether they sign one after another (`sequential`) or all at once (`parallel`), whether each enters a one-time code mailed to them before signing (`auto` asks when the committed value reaches the amount in the environment's signing settings; `required`, `off`), and the seller's `countersigner`, who signs after every customer signer and before anything is provisioned. A sent quote is `409`: revise it first.
|
|
829
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
830
|
+
# @param quote_signing_request [QuoteSigningRequest]
|
|
831
|
+
# @param [Hash] opts the optional parameters
|
|
832
|
+
# @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`.
|
|
833
|
+
# @return [Quote]
|
|
834
|
+
def set_quote_signers(number, quote_signing_request, opts = {})
|
|
835
|
+
data, _status_code, _headers = set_quote_signers_with_http_info(number, quote_signing_request, opts)
|
|
836
|
+
data
|
|
837
|
+
end
|
|
838
|
+
|
|
839
|
+
# Set who signs a quote and how
|
|
840
|
+
# Replace a quote's signing setup before it is sent: the customer signers in order (at most 10), whether they sign one after another (`sequential`) or all at once (`parallel`), whether each enters a one-time code mailed to them before signing (`auto` asks when the committed value reaches the amount in the environment's signing settings; `required`, `off`), and the seller's `countersigner`, who signs after every customer signer and before anything is provisioned. A sent quote is `409`: revise it first.
|
|
841
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
842
|
+
# @param quote_signing_request [QuoteSigningRequest]
|
|
843
|
+
# @param [Hash] opts the optional parameters
|
|
844
|
+
# @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`.
|
|
845
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
846
|
+
def set_quote_signers_with_http_info(number, quote_signing_request, opts = {})
|
|
847
|
+
if @api_client.config.debugging
|
|
848
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.set_quote_signers ...'
|
|
849
|
+
end
|
|
850
|
+
# verify the required parameter 'number' is set
|
|
851
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
852
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.set_quote_signers"
|
|
853
|
+
end
|
|
854
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
855
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
856
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.set_quote_signers, must conform to the pattern #{pattern}."
|
|
857
|
+
end
|
|
858
|
+
|
|
859
|
+
# verify the required parameter 'quote_signing_request' is set
|
|
860
|
+
if @api_client.config.client_side_validation && quote_signing_request.nil?
|
|
861
|
+
fail ArgumentError, "Missing the required parameter 'quote_signing_request' when calling QuotesApi.set_quote_signers"
|
|
862
|
+
end
|
|
863
|
+
# resource path
|
|
864
|
+
local_var_path = '/quotes/{number}/signing'.sub('{number}', CGI.escape(number.to_s))
|
|
865
|
+
|
|
866
|
+
# query parameters
|
|
867
|
+
query_params = opts[:query_params] || {}
|
|
868
|
+
|
|
869
|
+
# header parameters
|
|
870
|
+
header_params = opts[:header_params] || {}
|
|
871
|
+
# HTTP header 'Accept' (if needed)
|
|
872
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
873
|
+
# HTTP header 'Content-Type'
|
|
874
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
875
|
+
if !content_type.nil?
|
|
876
|
+
header_params['Content-Type'] = content_type
|
|
877
|
+
end
|
|
878
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
879
|
+
|
|
880
|
+
# form parameters
|
|
881
|
+
form_params = opts[:form_params] || {}
|
|
882
|
+
|
|
883
|
+
# http body (model)
|
|
884
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(quote_signing_request)
|
|
885
|
+
|
|
886
|
+
# return_type
|
|
887
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
888
|
+
|
|
889
|
+
# auth_names
|
|
890
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
891
|
+
|
|
892
|
+
new_options = opts.merge(
|
|
893
|
+
:operation => :"QuotesApi.set_quote_signers",
|
|
894
|
+
:header_params => header_params,
|
|
895
|
+
:query_params => query_params,
|
|
896
|
+
:form_params => form_params,
|
|
897
|
+
:body => post_body,
|
|
898
|
+
:auth_names => auth_names,
|
|
899
|
+
:return_type => return_type
|
|
900
|
+
)
|
|
901
|
+
|
|
902
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
903
|
+
if @api_client.config.debugging
|
|
904
|
+
@api_client.config.logger.debug "API called: QuotesApi#set_quote_signers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
905
|
+
end
|
|
906
|
+
return data, status_code, headers
|
|
907
|
+
end
|
|
908
|
+
|
|
909
|
+
# Submit a draft for approval
|
|
910
|
+
# Price the quote in full (tax included) and route it. Below the approval threshold (first invoice amount or largest discount) it becomes `approved` at once and can be sent. At or above the threshold it becomes `pending_approval` and waits for a second person in the console's approval queue. There is no API to approve or reject a quote, because the two-person rule needs a person who is not the quote's owner. A quote with no lines, or one that is not a draft, is `409 quote_refused`. When tax cannot be calculated, the answer is the shared tax refusal (`422 tax_service_not_connected` or `503 tax_calculation_unavailable`) or `409 seller_incomplete`.
|
|
911
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
912
|
+
# @param [Hash] opts the optional parameters
|
|
913
|
+
# @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`.
|
|
914
|
+
# @return [Quote]
|
|
915
|
+
def submit_quote(number, opts = {})
|
|
916
|
+
data, _status_code, _headers = submit_quote_with_http_info(number, opts)
|
|
917
|
+
data
|
|
918
|
+
end
|
|
919
|
+
|
|
920
|
+
# Submit a draft for approval
|
|
921
|
+
# Price the quote in full (tax included) and route it. Below the approval threshold (first invoice amount or largest discount) it becomes `approved` at once and can be sent. At or above the threshold it becomes `pending_approval` and waits for a second person in the console's approval queue. There is no API to approve or reject a quote, because the two-person rule needs a person who is not the quote's owner. A quote with no lines, or one that is not a draft, is `409 quote_refused`. When tax cannot be calculated, the answer is the shared tax refusal (`422 tax_service_not_connected` or `503 tax_calculation_unavailable`) or `409 seller_incomplete`.
|
|
922
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
923
|
+
# @param [Hash] opts the optional parameters
|
|
924
|
+
# @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`.
|
|
925
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
926
|
+
def submit_quote_with_http_info(number, opts = {})
|
|
927
|
+
if @api_client.config.debugging
|
|
928
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.submit_quote ...'
|
|
929
|
+
end
|
|
930
|
+
# verify the required parameter 'number' is set
|
|
931
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
932
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.submit_quote"
|
|
933
|
+
end
|
|
934
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
935
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
936
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.submit_quote, must conform to the pattern #{pattern}."
|
|
937
|
+
end
|
|
938
|
+
|
|
939
|
+
# resource path
|
|
940
|
+
local_var_path = '/quotes/{number}/submit'.sub('{number}', CGI.escape(number.to_s))
|
|
941
|
+
|
|
942
|
+
# query parameters
|
|
943
|
+
query_params = opts[:query_params] || {}
|
|
944
|
+
|
|
945
|
+
# header parameters
|
|
946
|
+
header_params = opts[:header_params] || {}
|
|
947
|
+
# HTTP header 'Accept' (if needed)
|
|
948
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
949
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
950
|
+
|
|
951
|
+
# form parameters
|
|
952
|
+
form_params = opts[:form_params] || {}
|
|
953
|
+
|
|
954
|
+
# http body (model)
|
|
955
|
+
post_body = opts[:debug_body]
|
|
956
|
+
|
|
957
|
+
# return_type
|
|
958
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
959
|
+
|
|
960
|
+
# auth_names
|
|
961
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
962
|
+
|
|
963
|
+
new_options = opts.merge(
|
|
964
|
+
:operation => :"QuotesApi.submit_quote",
|
|
965
|
+
:header_params => header_params,
|
|
966
|
+
:query_params => query_params,
|
|
967
|
+
:form_params => form_params,
|
|
968
|
+
:body => post_body,
|
|
969
|
+
:auth_names => auth_names,
|
|
970
|
+
:return_type => return_type
|
|
971
|
+
)
|
|
972
|
+
|
|
973
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
974
|
+
if @api_client.config.debugging
|
|
975
|
+
@api_client.config.logger.debug "API called: QuotesApi#submit_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
976
|
+
end
|
|
977
|
+
return data, status_code, headers
|
|
978
|
+
end
|
|
979
|
+
|
|
980
|
+
# Replace a draft quote
|
|
981
|
+
# Replace a draft's header and every line, with the same body and rules as create. The token becomes the owner, just as an edit in the console makes the editor the owner. Only a draft can be edited. Any other status is `409 quote_refused` (\"Only a draft quote can be edited.\").
|
|
982
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
983
|
+
# @param quote_request [QuoteRequest]
|
|
984
|
+
# @param [Hash] opts the optional parameters
|
|
985
|
+
# @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`.
|
|
986
|
+
# @return [Quote]
|
|
987
|
+
def update_quote(number, quote_request, opts = {})
|
|
988
|
+
data, _status_code, _headers = update_quote_with_http_info(number, quote_request, opts)
|
|
989
|
+
data
|
|
990
|
+
end
|
|
991
|
+
|
|
992
|
+
# Replace a draft quote
|
|
993
|
+
# Replace a draft's header and every line, with the same body and rules as create. The token becomes the owner, just as an edit in the console makes the editor the owner. Only a draft can be edited. Any other status is `409 quote_refused` (\"Only a draft quote can be edited.\").
|
|
994
|
+
# @param number [String] The quote number, unique within the token's environment, or the quote's public id (`quo_…`).
|
|
995
|
+
# @param quote_request [QuoteRequest]
|
|
996
|
+
# @param [Hash] opts the optional parameters
|
|
997
|
+
# @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`.
|
|
998
|
+
# @return [Array<(Quote, Integer, Hash)>] Quote data, response status code and response headers
|
|
999
|
+
def update_quote_with_http_info(number, quote_request, opts = {})
|
|
1000
|
+
if @api_client.config.debugging
|
|
1001
|
+
@api_client.config.logger.debug 'Calling API: QuotesApi.update_quote ...'
|
|
1002
|
+
end
|
|
1003
|
+
# verify the required parameter 'number' is set
|
|
1004
|
+
if @api_client.config.client_side_validation && number.nil?
|
|
1005
|
+
fail ArgumentError, "Missing the required parameter 'number' when calling QuotesApi.update_quote"
|
|
1006
|
+
end
|
|
1007
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]+$/)
|
|
1008
|
+
if @api_client.config.client_side_validation && number !~ pattern
|
|
1009
|
+
fail ArgumentError, "invalid value for 'number' when calling QuotesApi.update_quote, must conform to the pattern #{pattern}."
|
|
1010
|
+
end
|
|
1011
|
+
|
|
1012
|
+
# verify the required parameter 'quote_request' is set
|
|
1013
|
+
if @api_client.config.client_side_validation && quote_request.nil?
|
|
1014
|
+
fail ArgumentError, "Missing the required parameter 'quote_request' when calling QuotesApi.update_quote"
|
|
1015
|
+
end
|
|
1016
|
+
# resource path
|
|
1017
|
+
local_var_path = '/quotes/{number}'.sub('{number}', CGI.escape(number.to_s))
|
|
1018
|
+
|
|
1019
|
+
# query parameters
|
|
1020
|
+
query_params = opts[:query_params] || {}
|
|
1021
|
+
|
|
1022
|
+
# header parameters
|
|
1023
|
+
header_params = opts[:header_params] || {}
|
|
1024
|
+
# HTTP header 'Accept' (if needed)
|
|
1025
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1026
|
+
# HTTP header 'Content-Type'
|
|
1027
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1028
|
+
if !content_type.nil?
|
|
1029
|
+
header_params['Content-Type'] = content_type
|
|
1030
|
+
end
|
|
1031
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1032
|
+
|
|
1033
|
+
# form parameters
|
|
1034
|
+
form_params = opts[:form_params] || {}
|
|
1035
|
+
|
|
1036
|
+
# http body (model)
|
|
1037
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(quote_request)
|
|
1038
|
+
|
|
1039
|
+
# return_type
|
|
1040
|
+
return_type = opts[:debug_return_type] || 'Quote'
|
|
1041
|
+
|
|
1042
|
+
# auth_names
|
|
1043
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1044
|
+
|
|
1045
|
+
new_options = opts.merge(
|
|
1046
|
+
:operation => :"QuotesApi.update_quote",
|
|
1047
|
+
:header_params => header_params,
|
|
1048
|
+
:query_params => query_params,
|
|
1049
|
+
:form_params => form_params,
|
|
1050
|
+
:body => post_body,
|
|
1051
|
+
:auth_names => auth_names,
|
|
1052
|
+
:return_type => return_type
|
|
1053
|
+
)
|
|
1054
|
+
|
|
1055
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1056
|
+
if @api_client.config.debugging
|
|
1057
|
+
@api_client.config.logger.debug "API called: QuotesApi#update_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1058
|
+
end
|
|
1059
|
+
return data, status_code, headers
|
|
1060
|
+
end
|
|
1061
|
+
end
|
|
1062
|
+
end
|