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.
Files changed (736) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +215 -0
  3. data/cbox_billing.gemspec +26 -0
  4. data/lib/cbox_billing/api/accounting_api.rb +1893 -0
  5. data/lib/cbox_billing/api/affiliates_api.rb +2009 -0
  6. data/lib/cbox_billing/api/agreements_api.rb +552 -0
  7. data/lib/cbox_billing/api/bank_reconciliation_api.rb +505 -0
  8. data/lib/cbox_billing/api/catalog_api.rb +361 -0
  9. data/lib/cbox_billing/api/checkout_portal_api.rb +696 -0
  10. data/lib/cbox_billing/api/coupons_api.rb +538 -0
  11. data/lib/cbox_billing/api/credit_notes_api.rb +403 -0
  12. data/lib/cbox_billing/api/disputes_api.rb +540 -0
  13. data/lib/cbox_billing/api/dunning_api.rb +902 -0
  14. data/lib/cbox_billing/api/enforcement_api.rb +746 -0
  15. data/lib/cbox_billing/api/environments_api.rb +343 -0
  16. data/lib/cbox_billing/api/invoices_api.rb +1662 -0
  17. data/lib/cbox_billing/api/licence_data_api.rb +619 -0
  18. data/lib/cbox_billing/api/licenses_api.rb +293 -0
  19. data/lib/cbox_billing/api/management_api.rb +253 -0
  20. data/lib/cbox_billing/api/meters_api.rb +538 -0
  21. data/lib/cbox_billing/api/orders_and_delivery_api.rb +1745 -0
  22. data/lib/cbox_billing/api/organizations_api.rb +1110 -0
  23. data/lib/cbox_billing/api/payment_gateways_api.rb +227 -0
  24. data/lib/cbox_billing/api/payment_intents_api.rb +376 -0
  25. data/lib/cbox_billing/api/payment_methods_api.rb +96 -0
  26. data/lib/cbox_billing/api/plans_api.rb +654 -0
  27. data/lib/cbox_billing/api/product_access_api.rb +2033 -0
  28. data/lib/cbox_billing/api/quotes_api.rb +1062 -0
  29. data/lib/cbox_billing/api/seats_api.rb +938 -0
  30. data/lib/cbox_billing/api/service_connections_api.rb +245 -0
  31. data/lib/cbox_billing/api/subscriptions_api.rb +4697 -0
  32. data/lib/cbox_billing/api/tax_returns_api.rb +453 -0
  33. data/lib/cbox_billing/api/test_mode_api.rb +96 -0
  34. data/lib/cbox_billing/api/usage_api.rb +1116 -0
  35. data/lib/cbox_billing/api/webhook_endpoints_api.rb +835 -0
  36. data/lib/cbox_billing/api_client.rb +441 -0
  37. data/lib/cbox_billing/api_error.rb +58 -0
  38. data/lib/cbox_billing/api_model_base.rb +88 -0
  39. data/lib/cbox_billing/client.rb +49 -0
  40. data/lib/cbox_billing/configuration.rb +408 -0
  41. data/lib/cbox_billing/enforcement/client.rb +665 -0
  42. data/lib/cbox_billing/enforcement/errors.rb +48 -0
  43. data/lib/cbox_billing/enforcement/stores.rb +129 -0
  44. data/lib/cbox_billing/enforcement/transport.rb +79 -0
  45. data/lib/cbox_billing/enforcement/types.rb +63 -0
  46. data/lib/cbox_billing/enforcement.rb +9 -0
  47. data/lib/cbox_billing/errors.rb +110 -0
  48. data/lib/cbox_billing/idempotency.rb +16 -0
  49. data/lib/cbox_billing/models/accept_agreement201_response.rb +177 -0
  50. data/lib/cbox_billing/models/accept_agreement_request.rb +294 -0
  51. data/lib/cbox_billing/models/accept_agreement_request_user.rb +202 -0
  52. data/lib/cbox_billing/models/access_balance.rb +276 -0
  53. data/lib/cbox_billing/models/access_balance_request.rb +309 -0
  54. data/lib/cbox_billing/models/access_batch.rb +321 -0
  55. data/lib/cbox_billing/models/access_batch_filters.rb +183 -0
  56. data/lib/cbox_billing/models/access_cancel_request.rb +207 -0
  57. data/lib/cbox_billing/models/access_commit_request.rb +207 -0
  58. data/lib/cbox_billing/models/access_entry.rb +383 -0
  59. data/lib/cbox_billing/models/access_grant.rb +287 -0
  60. data/lib/cbox_billing/models/access_grant_request.rb +310 -0
  61. data/lib/cbox_billing/models/access_invitation.rb +404 -0
  62. data/lib/cbox_billing/models/access_invite_request.rb +337 -0
  63. data/lib/cbox_billing/models/access_join_request.rb +369 -0
  64. data/lib/cbox_billing/models/access_program.rb +511 -0
  65. data/lib/cbox_billing/models/access_program_input.rb +433 -0
  66. data/lib/cbox_billing/models/access_redeem_request.rb +335 -0
  67. data/lib/cbox_billing/models/access_redemption.rb +394 -0
  68. data/lib/cbox_billing/models/access_report.rb +250 -0
  69. data/lib/cbox_billing/models/access_report_balances.rb +252 -0
  70. data/lib/cbox_billing/models/access_report_batches.rb +252 -0
  71. data/lib/cbox_billing/models/access_report_entries.rb +252 -0
  72. data/lib/cbox_billing/models/access_report_grants.rb +252 -0
  73. data/lib/cbox_billing/models/access_report_invitations.rb +252 -0
  74. data/lib/cbox_billing/models/access_report_redemptions.rb +252 -0
  75. data/lib/cbox_billing/models/access_restore_grant_request.rb +207 -0
  76. data/lib/cbox_billing/models/access_retry_delivery_request.rb +207 -0
  77. data/lib/cbox_billing/models/access_revoke_grant_request.rb +207 -0
  78. data/lib/cbox_billing/models/access_revoke_invitation200_response.rb +195 -0
  79. data/lib/cbox_billing/models/access_revoke_invitation_request.rb +207 -0
  80. data/lib/cbox_billing/models/access_select200_response.rb +356 -0
  81. data/lib/cbox_billing/models/access_select_request.rb +323 -0
  82. data/lib/cbox_billing/models/account_credit.rb +258 -0
  83. data/lib/cbox_billing/models/account_credit_movements_inner.rb +255 -0
  84. data/lib/cbox_billing/models/account_entitlement.rb +240 -0
  85. data/lib/cbox_billing/models/accounting_connection.rb +336 -0
  86. data/lib/cbox_billing/models/accounting_connection_company.rb +170 -0
  87. data/lib/cbox_billing/models/accounting_contact_conflict.rb +308 -0
  88. data/lib/cbox_billing/models/accounting_contact_import.rb +397 -0
  89. data/lib/cbox_billing/models/accounting_contact_import_counts.rb +308 -0
  90. data/lib/cbox_billing/models/accounting_contact_import_row.rb +363 -0
  91. data/lib/cbox_billing/models/accounting_contact_import_row_candidates_inner.rb +227 -0
  92. data/lib/cbox_billing/models/accounting_contact_sync.rb +351 -0
  93. data/lib/cbox_billing/models/accounting_contact_sync_failure.rb +266 -0
  94. data/lib/cbox_billing/models/accounting_customer_document.rb +318 -0
  95. data/lib/cbox_billing/models/accounting_customer_link.rb +354 -0
  96. data/lib/cbox_billing/models/accounting_customer_link_company.rb +180 -0
  97. data/lib/cbox_billing/models/accounting_customer_link_contact.rb +292 -0
  98. data/lib/cbox_billing/models/accounting_customer_link_contact_sync.rb +291 -0
  99. data/lib/cbox_billing/models/accounting_customer_link_contact_sync_conflicts_inner.rb +237 -0
  100. data/lib/cbox_billing/models/accounting_customer_link_several_contacts_inner.rb +227 -0
  101. data/lib/cbox_billing/models/accounting_customer_link_shared_with_inner.rb +203 -0
  102. data/lib/cbox_billing/models/accounting_invoice.rb +532 -0
  103. data/lib/cbox_billing/models/accounting_invoice_contact.rb +189 -0
  104. data/lib/cbox_billing/models/accounting_sync.rb +356 -0
  105. data/lib/cbox_billing/models/accounting_vendor_contact.rb +307 -0
  106. data/lib/cbox_billing/models/accounting_vendor_link.rb +216 -0
  107. data/lib/cbox_billing/models/activation_bundle.rb +293 -0
  108. data/lib/cbox_billing/models/add_dispute_evidence_file201_response.rb +177 -0
  109. data/lib/cbox_billing/models/add_dispute_evidence_file422_response.rb +104 -0
  110. data/lib/cbox_billing/models/add_dispute_evidence_file_request.rb +261 -0
  111. data/lib/cbox_billing/models/add_invoice_item201_response.rb +177 -0
  112. data/lib/cbox_billing/models/add_invoice_item202_response.rb +228 -0
  113. data/lib/cbox_billing/models/add_invoice_item_request.rb +248 -0
  114. data/lib/cbox_billing/models/add_on.rb +305 -0
  115. data/lib/cbox_billing/models/add_on_preview.rb +170 -0
  116. data/lib/cbox_billing/models/add_on_request.rb +434 -0
  117. data/lib/cbox_billing/models/add_on_result.rb +203 -0
  118. data/lib/cbox_billing/models/add_product_file_request1.rb +233 -0
  119. data/lib/cbox_billing/models/add_subscription_phase201_response.rb +177 -0
  120. data/lib/cbox_billing/models/adjust_affiliate_balance_request.rb +257 -0
  121. data/lib/cbox_billing/models/admit_service_organization200_response.rb +169 -0
  122. data/lib/cbox_billing/models/affiliate.rb +505 -0
  123. data/lib/cbox_billing/models/affiliate_commission.rb +520 -0
  124. data/lib/cbox_billing/models/affiliate_detail.rb +523 -0
  125. data/lib/cbox_billing/models/affiliate_payout.rb +443 -0
  126. data/lib/cbox_billing/models/affiliate_payout_run.rb +446 -0
  127. data/lib/cbox_billing/models/affiliate_payout_run_list.rb +229 -0
  128. data/lib/cbox_billing/models/affiliate_payout_settings.rb +356 -0
  129. data/lib/cbox_billing/models/affiliate_portal_link.rb +203 -0
  130. data/lib/cbox_billing/models/affiliate_program.rb +556 -0
  131. data/lib/cbox_billing/models/affiliate_program_commission.rb +269 -0
  132. data/lib/cbox_billing/models/affiliate_rate_plan.rb +273 -0
  133. data/lib/cbox_billing/models/affiliate_rate_plan_phases_inner.rb +316 -0
  134. data/lib/cbox_billing/models/affiliate_rate_rule.rb +233 -0
  135. data/lib/cbox_billing/models/affiliate_referral.rb +325 -0
  136. data/lib/cbox_billing/models/agreement_block.rb +337 -0
  137. data/lib/cbox_billing/models/agreement_error.rb +227 -0
  138. data/lib/cbox_billing/models/agreement_status.rb +453 -0
  139. data/lib/cbox_billing/models/agreement_status_requires_inner.rb +202 -0
  140. data/lib/cbox_billing/models/align_renewals_request.rb +264 -0
  141. data/lib/cbox_billing/models/allowance_window.rb +269 -0
  142. data/lib/cbox_billing/models/appendix.rb +293 -0
  143. data/lib/cbox_billing/models/appendix_column.rb +257 -0
  144. data/lib/cbox_billing/models/apply_catalog409_response.rb +369 -0
  145. data/lib/cbox_billing/models/apply_subscription_coupon200_response.rb +177 -0
  146. data/lib/cbox_billing/models/apply_subscription_coupon_request.rb +197 -0
  147. data/lib/cbox_billing/models/archive_affiliate_program_request.rb +162 -0
  148. data/lib/cbox_billing/models/auto_top_up.rb +462 -0
  149. data/lib/cbox_billing/models/auto_top_up_attempts_inner.rb +290 -0
  150. data/lib/cbox_billing/models/auto_top_up_limits.rb +230 -0
  151. data/lib/cbox_billing/models/bank_csv_mapping.rb +467 -0
  152. data/lib/cbox_billing/models/bank_import_result.rb +285 -0
  153. data/lib/cbox_billing/models/bank_line.rb +486 -0
  154. data/lib/cbox_billing/models/bank_line_detail.rb +233 -0
  155. data/lib/cbox_billing/models/bank_line_detail_payments_inner.rb +280 -0
  156. data/lib/cbox_billing/models/bank_line_detail_suggestions_inner.rb +267 -0
  157. data/lib/cbox_billing/models/bank_statement.rb +412 -0
  158. data/lib/cbox_billing/models/bank_statement_import.rb +258 -0
  159. data/lib/cbox_billing/models/billing_parent.rb +219 -0
  160. data/lib/cbox_billing/models/billing_policy.rb +299 -0
  161. data/lib/cbox_billing/models/billing_policy_policy.rb +228 -0
  162. data/lib/cbox_billing/models/billing_policy_request.rb +323 -0
  163. data/lib/cbox_billing/models/bundle_benefit.rb +597 -0
  164. data/lib/cbox_billing/models/bundle_benefit_tiers_inner.rb +230 -0
  165. data/lib/cbox_billing/models/bundle_consequence.rb +450 -0
  166. data/lib/cbox_billing/models/bundle_offer.rb +508 -0
  167. data/lib/cbox_billing/models/bundle_offer_plan.rb +398 -0
  168. data/lib/cbox_billing/models/bundle_offer_products_to_add_inner.rb +169 -0
  169. data/lib/cbox_billing/models/bundle_offer_saves.rb +226 -0
  170. data/lib/cbox_billing/models/cancel_preview.rb +264 -0
  171. data/lib/cbox_billing/models/cancel_request.rb +256 -0
  172. data/lib/cbox_billing/models/cancel_subscription200_response.rb +652 -0
  173. data/lib/cbox_billing/models/catalog_changes.rb +286 -0
  174. data/lib/cbox_billing/models/catalog_changes_changes_inner.rb +264 -0
  175. data/lib/cbox_billing/models/catalog_changes_diff_inner.rb +303 -0
  176. data/lib/cbox_billing/models/catalog_changes_diff_inner_fields_inner.rb +180 -0
  177. data/lib/cbox_billing/models/catalog_changes_diff_inner_fields_inner_from.rb +105 -0
  178. data/lib/cbox_billing/models/catalog_changes_impact.rb +215 -0
  179. data/lib/cbox_billing/models/catalog_changes_impact_bundle_repriced_inner.rb +224 -0
  180. data/lib/cbox_billing/models/catalog_changes_impact_sample_inner.rb +169 -0
  181. data/lib/cbox_billing/models/catalog_changes_summary.rb +178 -0
  182. data/lib/cbox_billing/models/catalog_manifest.rb +215 -0
  183. data/lib/cbox_billing/models/catalog_manifest_bundles_inner.rb +344 -0
  184. data/lib/cbox_billing/models/catalog_manifest_bundles_inner_applies_to.rb +199 -0
  185. data/lib/cbox_billing/models/catalog_manifest_bundles_inner_copy_value.rb +263 -0
  186. data/lib/cbox_billing/models/catalog_manifest_bundles_inner_discount.rb +286 -0
  187. data/lib/cbox_billing/models/catalog_manifest_bundles_inner_requires.rb +254 -0
  188. data/lib/cbox_billing/models/catalog_manifest_existing.rb +242 -0
  189. data/lib/cbox_billing/models/catalog_manifest_products_inner.rb +246 -0
  190. data/lib/cbox_billing/models/catalog_manifest_products_inner_features_inner.rb +269 -0
  191. data/lib/cbox_billing/models/catalog_manifest_products_inner_meters_inner.rb +410 -0
  192. data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner.rb +258 -0
  193. data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value.rb +356 -0
  194. data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value_price_value.rb +471 -0
  195. data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value_price_value_matrix_inner.rb +274 -0
  196. data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value_price_value_rates_inner.rb +216 -0
  197. data/lib/cbox_billing/models/change_subscription_dates200_response.rb +187 -0
  198. data/lib/cbox_billing/models/change_subscription_dates_request.rb +325 -0
  199. data/lib/cbox_billing/models/charged_invoice.rb +322 -0
  200. data/lib/cbox_billing/models/check_service_admission200_response.rb +178 -0
  201. data/lib/cbox_billing/models/checkout_session_request.rb +354 -0
  202. data/lib/cbox_billing/models/checkout_session_request_items_inner.rb +217 -0
  203. data/lib/cbox_billing/models/choose_accounting_contact_import_row200_response.rb +177 -0
  204. data/lib/cbox_billing/models/clear_subscription_end_date200_response.rb +162 -0
  205. data/lib/cbox_billing/models/commit_request.rb +214 -0
  206. data/lib/cbox_billing/models/commit_request_actuals_inner.rb +212 -0
  207. data/lib/cbox_billing/models/commitment.rb +499 -0
  208. data/lib/cbox_billing/models/commitment_ramp_step.rb +221 -0
  209. data/lib/cbox_billing/models/commitment_refusal.rb +239 -0
  210. data/lib/cbox_billing/models/commitment_request.rb +409 -0
  211. data/lib/cbox_billing/models/commitment_response.rb +203 -0
  212. data/lib/cbox_billing/models/commitment_term.rb +227 -0
  213. data/lib/cbox_billing/models/confirm_accounting_contact_import200_response.rb +177 -0
  214. data/lib/cbox_billing/models/confirm_accounting_contact_import_request.rb +190 -0
  215. data/lib/cbox_billing/models/connect_engage_service200_response.rb +212 -0
  216. data/lib/cbox_billing/models/connect_engage_service_request.rb +267 -0
  217. data/lib/cbox_billing/models/contract_cap_discount.rb +284 -0
  218. data/lib/cbox_billing/models/contract_price_cap.rb +332 -0
  219. data/lib/cbox_billing/models/contract_price_cap_basis.rb +216 -0
  220. data/lib/cbox_billing/models/coupon.rb +307 -0
  221. data/lib/cbox_billing/models/coupon_definition.rb +520 -0
  222. data/lib/cbox_billing/models/coupon_definition_detail.rb +555 -0
  223. data/lib/cbox_billing/models/coupon_definition_detail_all_of_redemptions.rb +216 -0
  224. data/lib/cbox_billing/models/coupon_definition_list.rb +226 -0
  225. data/lib/cbox_billing/models/coupon_deleted.rb +227 -0
  226. data/lib/cbox_billing/models/coupon_request.rb +537 -0
  227. data/lib/cbox_billing/models/create_affiliate_payout_request.rb +247 -0
  228. data/lib/cbox_billing/models/create_affiliate_program_request.rb +423 -0
  229. data/lib/cbox_billing/models/create_affiliate_program_request_commission.rb +348 -0
  230. data/lib/cbox_billing/models/create_affiliate_referral_request.rb +178 -0
  231. data/lib/cbox_billing/models/create_affiliate_request.rb +415 -0
  232. data/lib/cbox_billing/models/create_credit_purchase422_response.rb +104 -0
  233. data/lib/cbox_billing/models/create_customers_from_accounting_contact_import200_response.rb +207 -0
  234. data/lib/cbox_billing/models/create_customers_from_accounting_contact_import200_response_created_inner.rb +204 -0
  235. data/lib/cbox_billing/models/create_customers_from_accounting_contact_import200_response_refused_inner.rb +204 -0
  236. data/lib/cbox_billing/models/create_customers_from_accounting_contact_import_request.rb +197 -0
  237. data/lib/cbox_billing/models/create_download_grant_request.rb +248 -0
  238. data/lib/cbox_billing/models/create_download_links200_response.rb +205 -0
  239. data/lib/cbox_billing/models/create_download_links200_response_data_inner.rb +227 -0
  240. data/lib/cbox_billing/models/create_download_links_request.rb +190 -0
  241. data/lib/cbox_billing/models/create_environment_request.rb +270 -0
  242. data/lib/cbox_billing/models/create_license_key_request.rb +273 -0
  243. data/lib/cbox_billing/models/create_order_request.rb +420 -0
  244. data/lib/cbox_billing/models/create_order_request_lines_inner.rb +262 -0
  245. data/lib/cbox_billing/models/create_private_plan_request.rb +318 -0
  246. data/lib/cbox_billing/models/create_spend_alert_request.rb +295 -0
  247. data/lib/cbox_billing/models/created_access_invitation.rb +464 -0
  248. data/lib/cbox_billing/models/created_environment.rb +214 -0
  249. data/lib/cbox_billing/models/credit_adjustment_applied.rb +247 -0
  250. data/lib/cbox_billing/models/credit_adjustment_pending.rb +228 -0
  251. data/lib/cbox_billing/models/credit_adjustment_request.rb +375 -0
  252. data/lib/cbox_billing/models/credit_delta.rb +229 -0
  253. data/lib/cbox_billing/models/credit_movement.rb +364 -0
  254. data/lib/cbox_billing/models/credit_movement_list.rb +226 -0
  255. data/lib/cbox_billing/models/credit_note.rb +455 -0
  256. data/lib/cbox_billing/models/credit_note_detail.rb +517 -0
  257. data/lib/cbox_billing/models/credit_note_detail_all_of_lines.rb +294 -0
  258. data/lib/cbox_billing/models/credit_note_list.rb +226 -0
  259. data/lib/cbox_billing/models/credit_pool.rb +567 -0
  260. data/lib/cbox_billing/models/credit_pool_expiries_inner.rb +241 -0
  261. data/lib/cbox_billing/models/credit_pool_label.rb +204 -0
  262. data/lib/cbox_billing/models/credit_pool_list.rb +205 -0
  263. data/lib/cbox_billing/models/credit_pool_pay_as_you_go.rb +218 -0
  264. data/lib/cbox_billing/models/credit_pool_period.rb +175 -0
  265. data/lib/cbox_billing/models/credit_pool_scope.rb +207 -0
  266. data/lib/cbox_billing/models/credit_pool_scope_conditions_inner.rb +256 -0
  267. data/lib/cbox_billing/models/credit_purchase.rb +306 -0
  268. data/lib/cbox_billing/models/credit_purchase_credit.rb +203 -0
  269. data/lib/cbox_billing/models/customer_contract.rb +227 -0
  270. data/lib/cbox_billing/models/customer_overage_cap_row.rb +345 -0
  271. data/lib/cbox_billing/models/customer_overage_cap_row_customer.rb +202 -0
  272. data/lib/cbox_billing/models/date_change_preview.rb +370 -0
  273. data/lib/cbox_billing/models/date_change_request.rb +272 -0
  274. data/lib/cbox_billing/models/delete_entitlement_override200_response.rb +204 -0
  275. data/lib/cbox_billing/models/delete_overage_cap200_response.rb +203 -0
  276. data/lib/cbox_billing/models/delete_spend_alert200_response.rb +203 -0
  277. data/lib/cbox_billing/models/delete_webhook_endpoint200_response.rb +239 -0
  278. data/lib/cbox_billing/models/delivery.rb +339 -0
  279. data/lib/cbox_billing/models/destroy_environment200_response.rb +178 -0
  280. data/lib/cbox_billing/models/detach_payment_method422_response.rb +253 -0
  281. data/lib/cbox_billing/models/detach_payment_method422_response_errors.rb +162 -0
  282. data/lib/cbox_billing/models/directory_registration.rb +244 -0
  283. data/lib/cbox_billing/models/directory_service.rb +472 -0
  284. data/lib/cbox_billing/models/disable_license_key_request.rb +161 -0
  285. data/lib/cbox_billing/models/dispute.rb +471 -0
  286. data/lib/cbox_billing/models/dispute_detail.rb +229 -0
  287. data/lib/cbox_billing/models/dispute_detail_evidence.rb +205 -0
  288. data/lib/cbox_billing/models/dispute_detail_evidence_text.rb +200 -0
  289. data/lib/cbox_billing/models/dispute_detail_pack.rb +193 -0
  290. data/lib/cbox_billing/models/dispute_detail_pack_sections_inner.rb +269 -0
  291. data/lib/cbox_billing/models/dispute_evidence.rb +312 -0
  292. data/lib/cbox_billing/models/dispute_evidence_file.rb +357 -0
  293. data/lib/cbox_billing/models/dispute_evidence_slot.rb +43 -0
  294. data/lib/cbox_billing/models/dispute_refusal.rb +256 -0
  295. data/lib/cbox_billing/models/dispute_status.rb +46 -0
  296. data/lib/cbox_billing/models/download_grant.rb +401 -0
  297. data/lib/cbox_billing/models/dunning_hold.rb +344 -0
  298. data/lib/cbox_billing/models/dunning_state.rb +217 -0
  299. data/lib/cbox_billing/models/dunning_state_invoice.rb +281 -0
  300. data/lib/cbox_billing/models/dunning_state_retry.rb +232 -0
  301. data/lib/cbox_billing/models/e_invoice_refusal.rb +229 -0
  302. data/lib/cbox_billing/models/effective_billing_policy.rb +298 -0
  303. data/lib/cbox_billing/models/effective_entitlement.rb +271 -0
  304. data/lib/cbox_billing/models/effective_usage_threshold.rb +280 -0
  305. data/lib/cbox_billing/models/entitlement.rb +366 -0
  306. data/lib/cbox_billing/models/entitlement_override.rb +557 -0
  307. data/lib/cbox_billing/models/entitlement_override_input.rb +353 -0
  308. data/lib/cbox_billing/models/entitlement_override_result.rb +591 -0
  309. data/lib/cbox_billing/models/entitlement_terms.rb +293 -0
  310. data/lib/cbox_billing/models/entitlements_response.rb +200 -0
  311. data/lib/cbox_billing/models/environment.rb +379 -0
  312. data/lib/cbox_billing/models/error_body.rb +242 -0
  313. data/lib/cbox_billing/models/export_catalog200_response.rb +232 -0
  314. data/lib/cbox_billing/models/extend_invoice_due_date_request.rb +213 -0
  315. data/lib/cbox_billing/models/feature.rb +277 -0
  316. data/lib/cbox_billing/models/feature_check.rb +310 -0
  317. data/lib/cbox_billing/models/feature_set.rb +179 -0
  318. data/lib/cbox_billing/models/feature_value.rb +105 -0
  319. data/lib/cbox_billing/models/first_period.rb +461 -0
  320. data/lib/cbox_billing/models/gateway_intent.rb +254 -0
  321. data/lib/cbox_billing/models/get_accounting_connection200_response.rb +163 -0
  322. data/lib/cbox_billing/models/get_accounting_contact200_response.rb +227 -0
  323. data/lib/cbox_billing/models/get_accounting_contact_sync200_response.rb +229 -0
  324. data/lib/cbox_billing/models/get_accounting_invoice_sync200_response.rb +293 -0
  325. data/lib/cbox_billing/models/get_accounting_invoice_sync200_response_settings.rb +241 -0
  326. data/lib/cbox_billing/models/get_accounting_invoice_sync200_response_sync.rb +318 -0
  327. data/lib/cbox_billing/models/get_accounting_organization200_response.rb +231 -0
  328. data/lib/cbox_billing/models/get_bank_statement200_response.rb +205 -0
  329. data/lib/cbox_billing/models/get_customer_statement200_response.rb +339 -0
  330. data/lib/cbox_billing/models/get_customer_statement200_response_account_credit.rb +169 -0
  331. data/lib/cbox_billing/models/get_customer_statement200_response_activity_inner.rb +334 -0
  332. data/lib/cbox_billing/models/get_customer_statement200_response_balances_inner.rb +229 -0
  333. data/lib/cbox_billing/models/get_customer_statement200_response_subscriptions_inner.rb +281 -0
  334. data/lib/cbox_billing/models/get_customer_statement200_response_subscriptions_inner_next.rb +200 -0
  335. data/lib/cbox_billing/models/get_latest_accounting_contact_import200_response.rb +163 -0
  336. data/lib/cbox_billing/models/get_product_delivery200_response.rb +217 -0
  337. data/lib/cbox_billing/models/get_resource_limits200_response.rb +257 -0
  338. data/lib/cbox_billing/models/get_service_admission_policy200_response.rb +160 -0
  339. data/lib/cbox_billing/models/get_service_registrations200_response.rb +179 -0
  340. data/lib/cbox_billing/models/get_service_registrations200_response_data_inner.rb +190 -0
  341. data/lib/cbox_billing/models/get_service_registrations_request.rb +284 -0
  342. data/lib/cbox_billing/models/grandfathered_subscriber.rb +356 -0
  343. data/lib/cbox_billing/models/grandfathered_subscriber_contract_cap.rb +230 -0
  344. data/lib/cbox_billing/models/guest_waitlist_input.rb +271 -0
  345. data/lib/cbox_billing/models/hold_invoice_dunning_request.rb +249 -0
  346. data/lib/cbox_billing/models/hold_invoice_for_review200_response.rb +177 -0
  347. data/lib/cbox_billing/models/hosted_session.rb +204 -0
  348. data/lib/cbox_billing/models/import_bank_statement201_response.rb +203 -0
  349. data/lib/cbox_billing/models/inline_object.rb +227 -0
  350. data/lib/cbox_billing/models/inline_object1.rb +255 -0
  351. data/lib/cbox_billing/models/inline_object2.rb +255 -0
  352. data/lib/cbox_billing/models/invoice.rb +523 -0
  353. data/lib/cbox_billing/models/invoice_balance.rb +281 -0
  354. data/lib/cbox_billing/models/invoice_detail.rb +655 -0
  355. data/lib/cbox_billing/models/invoice_draft.rb +452 -0
  356. data/lib/cbox_billing/models/invoice_draft_lines_inner.rb +199 -0
  357. data/lib/cbox_billing/models/invoice_item.rb +354 -0
  358. data/lib/cbox_billing/models/invoice_line.rb +295 -0
  359. data/lib/cbox_billing/models/invoice_list.rb +226 -0
  360. data/lib/cbox_billing/models/invoice_payment.rb +292 -0
  361. data/lib/cbox_billing/models/invoice_payment_result.rb +203 -0
  362. data/lib/cbox_billing/models/join_service_waitlist200_response.rb +163 -0
  363. data/lib/cbox_billing/models/join_service_waitlist_as_guest200_response.rb +194 -0
  364. data/lib/cbox_billing/models/join_service_waitlist_request.rb +378 -0
  365. data/lib/cbox_billing/models/keep_accounting_contact200_response.rb +231 -0
  366. data/lib/cbox_billing/models/keep_accounting_contact_request.rb +186 -0
  367. data/lib/cbox_billing/models/lease.rb +266 -0
  368. data/lib/cbox_billing/models/lease_request.rb +341 -0
  369. data/lib/cbox_billing/models/leave_feature_waitlist200_response.rb +201 -0
  370. data/lib/cbox_billing/models/leave_feature_waitlist_request.rb +249 -0
  371. data/lib/cbox_billing/models/licence_period_document.rb +408 -0
  372. data/lib/cbox_billing/models/licence_period_document_usage_measures_inner.rb +170 -0
  373. data/lib/cbox_billing/models/licence_period_list.rb +230 -0
  374. data/lib/cbox_billing/models/licence_period_summary.rb +344 -0
  375. data/lib/cbox_billing/models/licence_reportable.rb +204 -0
  376. data/lib/cbox_billing/models/licence_row_list.rb +244 -0
  377. data/lib/cbox_billing/models/licence_seat_count.rb +355 -0
  378. data/lib/cbox_billing/models/licence_seat_ledger_entry.rb +578 -0
  379. data/lib/cbox_billing/models/licence_seat_ledger_list.rb +217 -0
  380. data/lib/cbox_billing/models/licence_seat_snapshot_list.rb +243 -0
  381. data/lib/cbox_billing/models/license.rb +407 -0
  382. data/lib/cbox_billing/models/license_issue_request.rb +232 -0
  383. data/lib/cbox_billing/models/license_key.rb +503 -0
  384. data/lib/cbox_billing/models/license_key_detail.rb +537 -0
  385. data/lib/cbox_billing/models/license_key_detail_all_of_instances.rb +277 -0
  386. data/lib/cbox_billing/models/license_renew_request.rb +160 -0
  387. data/lib/cbox_billing/models/license_revoke_request.rb +160 -0
  388. data/lib/cbox_billing/models/license_revoke_result.rb +227 -0
  389. data/lib/cbox_billing/models/limit_increase_decision.rb +368 -0
  390. data/lib/cbox_billing/models/limit_increase_input.rb +300 -0
  391. data/lib/cbox_billing/models/limit_increase_request.rb +516 -0
  392. data/lib/cbox_billing/models/link_accounting_contact200_response.rb +177 -0
  393. data/lib/cbox_billing/models/link_accounting_contact_request.rb +187 -0
  394. data/lib/cbox_billing/models/list_access_programs200_response.rb +252 -0
  395. data/lib/cbox_billing/models/list_accounting_contact_duplicates200_response.rb +205 -0
  396. data/lib/cbox_billing/models/list_accounting_contact_duplicates200_response_duplicates_inner.rb +205 -0
  397. data/lib/cbox_billing/models/list_accounting_contact_duplicates200_response_duplicates_inner_organizations_inner.rb +203 -0
  398. data/lib/cbox_billing/models/list_accounting_contact_import_rows200_response.rb +192 -0
  399. data/lib/cbox_billing/models/list_accounting_contact_sync_failures200_response.rb +217 -0
  400. data/lib/cbox_billing/models/list_accounting_contacts200_response.rb +282 -0
  401. data/lib/cbox_billing/models/list_accounting_organization_invoices200_response.rb +191 -0
  402. data/lib/cbox_billing/models/list_accounting_syncs200_response.rb +179 -0
  403. data/lib/cbox_billing/models/list_affiliate_commissions200_response.rb +226 -0
  404. data/lib/cbox_billing/models/list_affiliate_payout_runs200_response.rb +226 -0
  405. data/lib/cbox_billing/models/list_affiliate_payouts200_response.rb +226 -0
  406. data/lib/cbox_billing/models/list_affiliate_programs200_response.rb +226 -0
  407. data/lib/cbox_billing/models/list_affiliates200_response.rb +226 -0
  408. data/lib/cbox_billing/models/list_agreements200_response.rb +179 -0
  409. data/lib/cbox_billing/models/list_all_invoices400_response.rb +177 -0
  410. data/lib/cbox_billing/models/list_bank_lines200_response.rb +215 -0
  411. data/lib/cbox_billing/models/list_bank_statements200_response.rb +215 -0
  412. data/lib/cbox_billing/models/list_connected_financial_events200_response.rb +292 -0
  413. data/lib/cbox_billing/models/list_connected_production_environments200_response.rb +205 -0
  414. data/lib/cbox_billing/models/list_connected_production_environments200_response_data_inner.rb +203 -0
  415. data/lib/cbox_billing/models/list_customer_dunning_holds200_response.rb +179 -0
  416. data/lib/cbox_billing/models/list_disputes200_response.rb +217 -0
  417. data/lib/cbox_billing/models/list_download_grants200_response.rb +226 -0
  418. data/lib/cbox_billing/models/list_entitlement_overrides200_response.rb +207 -0
  419. data/lib/cbox_billing/models/list_environments200_response.rb +162 -0
  420. data/lib/cbox_billing/models/list_financial_events200_response.rb +240 -0
  421. data/lib/cbox_billing/models/list_financial_events200_response_data_inner.rb +342 -0
  422. data/lib/cbox_billing/models/list_financial_events200_response_data_inner_data.rb +408 -0
  423. data/lib/cbox_billing/models/list_grandfathered_subscribers200_response.rb +244 -0
  424. data/lib/cbox_billing/models/list_invoice_drafts200_response.rb +215 -0
  425. data/lib/cbox_billing/models/list_invoice_items200_response.rb +179 -0
  426. data/lib/cbox_billing/models/list_invoice_payments200_response.rb +205 -0
  427. data/lib/cbox_billing/models/list_license_keys200_response.rb +226 -0
  428. data/lib/cbox_billing/models/list_limit_increase_requests200_response.rb +231 -0
  429. data/lib/cbox_billing/models/list_one_off_products200_response.rb +179 -0
  430. data/lib/cbox_billing/models/list_orders200_response.rb +226 -0
  431. data/lib/cbox_billing/models/list_organization_purchases200_response.rb +205 -0
  432. data/lib/cbox_billing/models/list_organization_subscriptions200_response.rb +179 -0
  433. data/lib/cbox_billing/models/list_overage_caps200_response.rb +179 -0
  434. data/lib/cbox_billing/models/list_plan_moves200_response.rb +179 -0
  435. data/lib/cbox_billing/models/list_private_plans200_response.rb +179 -0
  436. data/lib/cbox_billing/models/list_product_files200_response.rb +179 -0
  437. data/lib/cbox_billing/models/list_scheduled_catalog_changes200_response.rb +179 -0
  438. data/lib/cbox_billing/models/list_service_directory200_response.rb +249 -0
  439. data/lib/cbox_billing/models/list_signed_agreements200_response.rb +226 -0
  440. data/lib/cbox_billing/models/list_spend_alerts200_response.rb +218 -0
  441. data/lib/cbox_billing/models/list_spend_alerts200_response_spend.rb +222 -0
  442. data/lib/cbox_billing/models/list_subscription_date_moves200_response.rb +179 -0
  443. data/lib/cbox_billing/models/list_subscription_schedule200_response.rb +179 -0
  444. data/lib/cbox_billing/models/list_tax_return_lines200_response.rb +215 -0
  445. data/lib/cbox_billing/models/list_tax_returns200_response.rb +215 -0
  446. data/lib/cbox_billing/models/list_unmatched_accounting_invoices200_response.rb +192 -0
  447. data/lib/cbox_billing/models/lock_subscription_price_request.rb +162 -0
  448. data/lib/cbox_billing/models/mark_affiliate_payout_paid_request.rb +176 -0
  449. data/lib/cbox_billing/models/mark_invoice_paid_request.rb +176 -0
  450. data/lib/cbox_billing/models/match_bank_line_request.rb +197 -0
  451. data/lib/cbox_billing/models/match_bank_line_request_allocations_inner.rb +221 -0
  452. data/lib/cbox_billing/models/meter.rb +524 -0
  453. data/lib/cbox_billing/models/meter_detail.rb +587 -0
  454. data/lib/cbox_billing/models/meter_detail_all_of_entitlements.rb +260 -0
  455. data/lib/cbox_billing/models/meter_list.rb +226 -0
  456. data/lib/cbox_billing/models/meter_request.rb +463 -0
  457. data/lib/cbox_billing/models/meter_request_resets.rb +237 -0
  458. data/lib/cbox_billing/models/meter_resets.rb +279 -0
  459. data/lib/cbox_billing/models/meter_staged.rb +309 -0
  460. data/lib/cbox_billing/models/meter_staged_changeset.rb +265 -0
  461. data/lib/cbox_billing/models/money.rb +222 -0
  462. data/lib/cbox_billing/models/money_amount.rb +203 -0
  463. data/lib/cbox_billing/models/move_affiliate_referral_request.rb +213 -0
  464. data/lib/cbox_billing/models/move_affiliate_request.rb +188 -0
  465. data/lib/cbox_billing/models/negotiated_price.rb +277 -0
  466. data/lib/cbox_billing/models/new_auto_top_up.rb +277 -0
  467. data/lib/cbox_billing/models/new_credit_purchase.rb +271 -0
  468. data/lib/cbox_billing/models/new_invoice.rb +264 -0
  469. data/lib/cbox_billing/models/new_invoice_line.rb +295 -0
  470. data/lib/cbox_billing/models/ok.rb +201 -0
  471. data/lib/cbox_billing/models/one_off_product.rb +359 -0
  472. data/lib/cbox_billing/models/one_off_purchase.rb +396 -0
  473. data/lib/cbox_billing/models/one_off_purchase_items_inner.rb +255 -0
  474. data/lib/cbox_billing/models/one_off_quote.rb +527 -0
  475. data/lib/cbox_billing/models/one_off_quote_organization.rb +177 -0
  476. data/lib/cbox_billing/models/one_off_quote_request.rb +324 -0
  477. data/lib/cbox_billing/models/order.rb +573 -0
  478. data/lib/cbox_billing/models/order_items_inner.rb +311 -0
  479. data/lib/cbox_billing/models/organization.rb +545 -0
  480. data/lib/cbox_billing/models/organization_accounting_contact.rb +255 -0
  481. data/lib/cbox_billing/models/organization_bundles.rb +310 -0
  482. data/lib/cbox_billing/models/organization_bundles_active_inner.rb +242 -0
  483. data/lib/cbox_billing/models/organization_response.rb +177 -0
  484. data/lib/cbox_billing/models/organization_upsert_request.rb +666 -0
  485. data/lib/cbox_billing/models/overage_cap.rb +105 -0
  486. data/lib/cbox_billing/models/overage_cap_binding.rb +263 -0
  487. data/lib/cbox_billing/models/overage_cap_one_of.rb +186 -0
  488. data/lib/cbox_billing/models/overage_cap_one_of1.rb +231 -0
  489. data/lib/cbox_billing/models/overage_cap_state.rb +380 -0
  490. data/lib/cbox_billing/models/page.rb +192 -0
  491. data/lib/cbox_billing/models/payment_gateway_failover.rb +233 -0
  492. data/lib/cbox_billing/models/payment_gateway_failover_failovers_inner.rb +348 -0
  493. data/lib/cbox_billing/models/payment_gateway_failover_failovers_inner_hops_inner.rb +190 -0
  494. data/lib/cbox_billing/models/payment_gateway_failover_gateways_inner.rb +230 -0
  495. data/lib/cbox_billing/models/payment_gateway_failover_gateways_inner_circuit.rb +288 -0
  496. data/lib/cbox_billing/models/payment_gateway_failover_routing.rb +235 -0
  497. data/lib/cbox_billing/models/payment_intent_request.rb +254 -0
  498. data/lib/cbox_billing/models/payment_mandate.rb +253 -0
  499. data/lib/cbox_billing/models/payment_method.rb +374 -0
  500. data/lib/cbox_billing/models/payment_method_id_request.rb +177 -0
  501. data/lib/cbox_billing/models/payment_method_list.rb +226 -0
  502. data/lib/cbox_billing/models/payment_method_set.rb +180 -0
  503. data/lib/cbox_billing/models/payment_terms.rb +281 -0
  504. data/lib/cbox_billing/models/payment_terms_request.rb +235 -0
  505. data/lib/cbox_billing/models/pending_approval.rb +229 -0
  506. data/lib/cbox_billing/models/pending_price_change.rb +257 -0
  507. data/lib/cbox_billing/models/per_value_entitlements.rb +206 -0
  508. data/lib/cbox_billing/models/per_value_entitlements_values_value.rb +263 -0
  509. data/lib/cbox_billing/models/plan.rb +425 -0
  510. data/lib/cbox_billing/models/plan_change_input.rb +224 -0
  511. data/lib/cbox_billing/models/plan_change_preview.rb +478 -0
  512. data/lib/cbox_billing/models/plan_change_preview_seat_types_inner.rb +356 -0
  513. data/lib/cbox_billing/models/plan_change_price_options.rb +280 -0
  514. data/lib/cbox_billing/models/plan_change_price_options_keep_negotiated.rb +230 -0
  515. data/lib/cbox_billing/models/plan_change_request.rb +256 -0
  516. data/lib/cbox_billing/models/plan_change_result.rb +543 -0
  517. data/lib/cbox_billing/models/plan_features_value.rb +105 -0
  518. data/lib/cbox_billing/models/plan_list.rb +253 -0
  519. data/lib/cbox_billing/models/plan_meter_entitlement.rb +250 -0
  520. data/lib/cbox_billing/models/plan_move.rb +386 -0
  521. data/lib/cbox_billing/models/plan_move_subscribers.rb +188 -0
  522. data/lib/cbox_billing/models/plan_price.rb +256 -0
  523. data/lib/cbox_billing/models/plan_prices_inner.rb +241 -0
  524. data/lib/cbox_billing/models/plane_invoice_list.rb +226 -0
  525. data/lib/cbox_billing/models/plane_invoice_list_all_of_data.rb +557 -0
  526. data/lib/cbox_billing/models/portal_session_request.rb +309 -0
  527. data/lib/cbox_billing/models/prepare_tax_return200_response.rb +177 -0
  528. data/lib/cbox_billing/models/prepare_tax_return_request.rb +237 -0
  529. data/lib/cbox_billing/models/preview_renewal_alignment_request.rb +201 -0
  530. data/lib/cbox_billing/models/preview_service_invitation200_response.rb +161 -0
  531. data/lib/cbox_billing/models/preview_service_invitation200_response_invitation.rb +189 -0
  532. data/lib/cbox_billing/models/preview_service_invitation_request.rb +186 -0
  533. data/lib/cbox_billing/models/preview_subscription_cancel_request.rb +216 -0
  534. data/lib/cbox_billing/models/preview_subscription_coupon200_response.rb +205 -0
  535. data/lib/cbox_billing/models/preview_subscription_coupon_request.rb +186 -0
  536. data/lib/cbox_billing/models/price_lock.rb +215 -0
  537. data/lib/cbox_billing/models/price_lock_state.rb +190 -0
  538. data/lib/cbox_billing/models/price_tax.rb +348 -0
  539. data/lib/cbox_billing/models/private_plan.rb +380 -0
  540. data/lib/cbox_billing/models/product_definition_manifest.rb +269 -0
  541. data/lib/cbox_billing/models/product_definition_manifest_features_inner.rb +333 -0
  542. data/lib/cbox_billing/models/product_definition_manifest_meters_inner.rb +434 -0
  543. data/lib/cbox_billing/models/product_file.rb +420 -0
  544. data/lib/cbox_billing/models/proration_line.rb +203 -0
  545. data/lib/cbox_billing/models/quantity_preview.rb +321 -0
  546. data/lib/cbox_billing/models/quantity_request.rb +196 -0
  547. data/lib/cbox_billing/models/quote.rb +700 -0
  548. data/lib/cbox_billing/models/quote_all_of_acceptance.rb +206 -0
  549. data/lib/cbox_billing/models/quote_all_of_approval.rb +201 -0
  550. data/lib/cbox_billing/models/quote_all_of_grants.rb +205 -0
  551. data/lib/cbox_billing/models/quote_all_of_lines.rb +284 -0
  552. data/lib/cbox_billing/models/quote_all_of_terms.rb +285 -0
  553. data/lib/cbox_billing/models/quote_all_of_terms_ramp.rb +169 -0
  554. data/lib/cbox_billing/models/quote_all_of_totals.rb +255 -0
  555. data/lib/cbox_billing/models/quote_all_of_totals_lines.rb +223 -0
  556. data/lib/cbox_billing/models/quote_line_grants.rb +212 -0
  557. data/lib/cbox_billing/models/quote_line_grants_features_inner.rb +204 -0
  558. data/lib/cbox_billing/models/quote_line_grants_meters_inner.rb +260 -0
  559. data/lib/cbox_billing/models/quote_line_request.rb +368 -0
  560. data/lib/cbox_billing/models/quote_list.rb +226 -0
  561. data/lib/cbox_billing/models/quote_request.rb +650 -0
  562. data/lib/cbox_billing/models/quote_request_ramp_inner.rb +221 -0
  563. data/lib/cbox_billing/models/quote_signer.rb +434 -0
  564. data/lib/cbox_billing/models/quote_signer_request.rb +247 -0
  565. data/lib/cbox_billing/models/quote_signer_signature.rb +296 -0
  566. data/lib/cbox_billing/models/quote_signing.rb +384 -0
  567. data/lib/cbox_billing/models/quote_signing_request.rb +278 -0
  568. data/lib/cbox_billing/models/quote_signing_signed_document.rb +240 -0
  569. data/lib/cbox_billing/models/quote_summary.rb +440 -0
  570. data/lib/cbox_billing/models/rate_limit_error_body.rb +177 -0
  571. data/lib/cbox_billing/models/reconcile_id_signals_inclusion200_response.rb +211 -0
  572. data/lib/cbox_billing/models/reconcile_id_signals_inclusion_request.rb +162 -0
  573. data/lib/cbox_billing/models/record_invoice_payment_request.rb +223 -0
  574. data/lib/cbox_billing/models/recurring_price.rb +230 -0
  575. data/lib/cbox_billing/models/refund.rb +493 -0
  576. data/lib/cbox_billing/models/refund_list.rb +179 -0
  577. data/lib/cbox_billing/models/refund_order_request.rb +223 -0
  578. data/lib/cbox_billing/models/refund_request.rb +227 -0
  579. data/lib/cbox_billing/models/refund_result.rb +239 -0
  580. data/lib/cbox_billing/models/refusal.rb +205 -0
  581. data/lib/cbox_billing/models/release_invoice_from_review200_response.rb +205 -0
  582. data/lib/cbox_billing/models/remove_billing_parent_request.rb +186 -0
  583. data/lib/cbox_billing/models/remove_subscription_coupon200_response.rb +177 -0
  584. data/lib/cbox_billing/models/remove_subscription_coupon_request.rb +177 -0
  585. data/lib/cbox_billing/models/reserve_outcome.rb +251 -0
  586. data/lib/cbox_billing/models/reserve_request.rb +225 -0
  587. data/lib/cbox_billing/models/reserve_request_meters_inner.rb +212 -0
  588. data/lib/cbox_billing/models/reset_environment200_response.rb +187 -0
  589. data/lib/cbox_billing/models/reset_environment_request.rb +162 -0
  590. data/lib/cbox_billing/models/reset_period.rb +247 -0
  591. data/lib/cbox_billing/models/resource_limit.rb +392 -0
  592. data/lib/cbox_billing/models/retry_accounting_sync202_response.rb +177 -0
  593. data/lib/cbox_billing/models/retry_invoice_dunning_request.rb +176 -0
  594. data/lib/cbox_billing/models/reverse_invoice_payment_request.rb +186 -0
  595. data/lib/cbox_billing/models/revoke_limit_increase_request.rb +195 -0
  596. data/lib/cbox_billing/models/schedule_phase.rb +486 -0
  597. data/lib/cbox_billing/models/schedule_phase_request.rb +396 -0
  598. data/lib/cbox_billing/models/schedule_plan_move_request.rb +231 -0
  599. data/lib/cbox_billing/models/scheduled_catalog_change.rb +331 -0
  600. data/lib/cbox_billing/models/scheduled_catalog_change_existing.rb +215 -0
  601. data/lib/cbox_billing/models/seat_breakdown.rb +404 -0
  602. data/lib/cbox_billing/models/seat_entitlement.rb +267 -0
  603. data/lib/cbox_billing/models/seat_ledger_entry.rb +440 -0
  604. data/lib/cbox_billing/models/seat_ledger_page.rb +205 -0
  605. data/lib/cbox_billing/models/seat_ledger_page_meta.rb +255 -0
  606. data/lib/cbox_billing/models/seat_reassign_request.rb +187 -0
  607. data/lib/cbox_billing/models/seat_subject_request.rb +178 -0
  608. data/lib/cbox_billing/models/seat_type_change.rb +384 -0
  609. data/lib/cbox_billing/models/seat_type_entitlement.rb +269 -0
  610. data/lib/cbox_billing/models/seat_type_quantity_request.rb +205 -0
  611. data/lib/cbox_billing/models/seat_type_response.rb +177 -0
  612. data/lib/cbox_billing/models/seat_type_state.rb +565 -0
  613. data/lib/cbox_billing/models/seat_type_state_holders_inner.rb +189 -0
  614. data/lib/cbox_billing/models/seats_set_request.rb +186 -0
  615. data/lib/cbox_billing/models/service_admission_identity.rb +237 -0
  616. data/lib/cbox_billing/models/service_admission_input.rb +388 -0
  617. data/lib/cbox_billing/models/set_backup_card_consent200_response.rb +189 -0
  618. data/lib/cbox_billing/models/set_backup_card_consent_request.rb +177 -0
  619. data/lib/cbox_billing/models/set_billing_parent409_response.rb +227 -0
  620. data/lib/cbox_billing/models/set_billing_parent_request.rb +212 -0
  621. data/lib/cbox_billing/models/set_customer_contract_request.rb +197 -0
  622. data/lib/cbox_billing/models/set_invoice_consolidation_request.rb +177 -0
  623. data/lib/cbox_billing/models/set_overage_cap422_response.rb +227 -0
  624. data/lib/cbox_billing/models/set_product_delivery_request.rb +342 -0
  625. data/lib/cbox_billing/models/set_subscription_purchase_order200_response.rb +189 -0
  626. data/lib/cbox_billing/models/set_subscription_purchase_order_request.rb +176 -0
  627. data/lib/cbox_billing/models/setup_intent.rb +302 -0
  628. data/lib/cbox_billing/models/setup_intent_request.rb +177 -0
  629. data/lib/cbox_billing/models/show_environment200_response.rb +160 -0
  630. data/lib/cbox_billing/models/signals_source200_response.rb +214 -0
  631. data/lib/cbox_billing/models/signals_source200_response_meta.rb +471 -0
  632. data/lib/cbox_billing/models/signals_source_erasures200_response.rb +214 -0
  633. data/lib/cbox_billing/models/signals_source_erasures200_response_meta.rb +329 -0
  634. data/lib/cbox_billing/models/signed_agreement.rb +498 -0
  635. data/lib/cbox_billing/models/signed_agreement_document.rb +252 -0
  636. data/lib/cbox_billing/models/skip_accounting_contact_import_rows200_response.rb +177 -0
  637. data/lib/cbox_billing/models/skip_accounting_contact_import_rows_request.rb +188 -0
  638. data/lib/cbox_billing/models/skip_invoice_dunning_step_request.rb +186 -0
  639. data/lib/cbox_billing/models/spend_alert.rb +395 -0
  640. data/lib/cbox_billing/models/start_accounting_contact_import202_response.rb +177 -0
  641. data/lib/cbox_billing/models/stop_invoice_dunning_request.rb +247 -0
  642. data/lib/cbox_billing/models/submit_dispute_evidence_request.rb +178 -0
  643. data/lib/cbox_billing/models/subscribe_request.rb +373 -0
  644. data/lib/cbox_billing/models/subscribe_result.rb +215 -0
  645. data/lib/cbox_billing/models/subscription.rb +617 -0
  646. data/lib/cbox_billing/models/subscription_bundle.rb +200 -0
  647. data/lib/cbox_billing/models/subscription_change.rb +505 -0
  648. data/lib/cbox_billing/models/subscription_change_list.rb +226 -0
  649. data/lib/cbox_billing/models/subscription_contract.rb +188 -0
  650. data/lib/cbox_billing/models/subscription_contract_term.rb +385 -0
  651. data/lib/cbox_billing/models/subscription_date_move.rb +295 -0
  652. data/lib/cbox_billing/models/subscription_discount.rb +315 -0
  653. data/lib/cbox_billing/models/subscription_pending_change.rb +171 -0
  654. data/lib/cbox_billing/models/subscription_standing.rb +230 -0
  655. data/lib/cbox_billing/models/subscription_terms.rb +459 -0
  656. data/lib/cbox_billing/models/subscription_terms_price.rb +178 -0
  657. data/lib/cbox_billing/models/sync_product_definitions200_response.rb +179 -0
  658. data/lib/cbox_billing/models/sync_product_definitions200_response_data_inner.rb +335 -0
  659. data/lib/cbox_billing/models/tax_return.rb +663 -0
  660. data/lib/cbox_billing/models/tax_return_boxes_inner.rb +307 -0
  661. data/lib/cbox_billing/models/tax_return_corrections_inner.rb +178 -0
  662. data/lib/cbox_billing/models/tax_return_issues_inner.rb +227 -0
  663. data/lib/cbox_billing/models/tax_return_line.rb +550 -0
  664. data/lib/cbox_billing/models/tax_return_line_document.rb +214 -0
  665. data/lib/cbox_billing/models/tax_return_line_fx.rb +212 -0
  666. data/lib/cbox_billing/models/tax_return_member_states_inner.rb +250 -0
  667. data/lib/cbox_billing/models/tax_return_not_from_billing_inner.rb +229 -0
  668. data/lib/cbox_billing/models/test_clock_advance_request.rb +178 -0
  669. data/lib/cbox_billing/models/test_clock_advance_result.rb +334 -0
  670. data/lib/cbox_billing/models/test_clock_advance_result_clock.rb +230 -0
  671. data/lib/cbox_billing/models/upcoming_invoice.rb +440 -0
  672. data/lib/cbox_billing/models/upcoming_invoice_first_period.rb +251 -0
  673. data/lib/cbox_billing/models/upcoming_invoice_interim.rb +245 -0
  674. data/lib/cbox_billing/models/upcoming_invoice_interim_invoices_inner.rb +286 -0
  675. data/lib/cbox_billing/models/upcoming_invoice_interim_reconciliation.rb +270 -0
  676. data/lib/cbox_billing/models/upcoming_invoice_interim_reconciliation_credit_notes_inner.rb +282 -0
  677. data/lib/cbox_billing/models/upcoming_invoice_lines_inner.rb +282 -0
  678. data/lib/cbox_billing/models/update_affiliate_program_request.rb +398 -0
  679. data/lib/cbox_billing/models/update_affiliate_request.rb +321 -0
  680. data/lib/cbox_billing/models/update_dispute_evidence_request.rb +177 -0
  681. data/lib/cbox_billing/models/update_dispute_evidence_request_evidence.rb +251 -0
  682. data/lib/cbox_billing/models/update_entitlement_override_request.rb +309 -0
  683. data/lib/cbox_billing/models/update_invoice_draft_request.rb +214 -0
  684. data/lib/cbox_billing/models/update_invoice_draft_request_lines_inner.rb +224 -0
  685. data/lib/cbox_billing/models/update_license_key_request.rb +186 -0
  686. data/lib/cbox_billing/models/update_payment_gateway_routing_request.rb +234 -0
  687. data/lib/cbox_billing/models/update_product_file_request.rb +208 -0
  688. data/lib/cbox_billing/models/update_spend_alert_request.rb +296 -0
  689. data/lib/cbox_billing/models/upgrade_offer.rb +189 -0
  690. data/lib/cbox_billing/models/usage_correction.rb +471 -0
  691. data/lib/cbox_billing/models/usage_correction_actor.rb +211 -0
  692. data/lib/cbox_billing/models/usage_correction_adjustment.rb +411 -0
  693. data/lib/cbox_billing/models/usage_correction_list.rb +226 -0
  694. data/lib/cbox_billing/models/usage_correction_list_all_of_data.rb +506 -0
  695. data/lib/cbox_billing/models/usage_corrections_request.rb +246 -0
  696. data/lib/cbox_billing/models/usage_corrections_request_corrections_inner.rb +413 -0
  697. data/lib/cbox_billing/models/usage_corrections_result.rb +395 -0
  698. data/lib/cbox_billing/models/usage_corrections_result_rejected_inner.rb +262 -0
  699. data/lib/cbox_billing/models/usage_event_values.rb +252 -0
  700. data/lib/cbox_billing/models/usage_events_request.rb +234 -0
  701. data/lib/cbox_billing/models/usage_events_request_events_inner.rb +385 -0
  702. data/lib/cbox_billing/models/usage_events_request_events_inner_dimensions_value.rb +104 -0
  703. data/lib/cbox_billing/models/usage_events_result.rb +301 -0
  704. data/lib/cbox_billing/models/usage_events_result_rejected_inner.rb +263 -0
  705. data/lib/cbox_billing/models/usage_ingest_request.rb +225 -0
  706. data/lib/cbox_billing/models/usage_ingest_request_entries_inner.rb +290 -0
  707. data/lib/cbox_billing/models/usage_ingest_result.rb +374 -0
  708. data/lib/cbox_billing/models/usage_ingest_result_unsupported_meters_inner.rb +203 -0
  709. data/lib/cbox_billing/models/usage_price.rb +258 -0
  710. data/lib/cbox_billing/models/usage_summary.rb +205 -0
  711. data/lib/cbox_billing/models/usage_summary_meters_value.rb +289 -0
  712. data/lib/cbox_billing/models/usage_summary_meters_value_breakdown_inner.rb +205 -0
  713. data/lib/cbox_billing/models/usage_summary_period.rb +247 -0
  714. data/lib/cbox_billing/models/usage_threshold.rb +275 -0
  715. data/lib/cbox_billing/models/usage_threshold_level.rb +217 -0
  716. data/lib/cbox_billing/models/usage_threshold_request.rb +248 -0
  717. data/lib/cbox_billing/models/usage_threshold_subscriptions_inner.rb +201 -0
  718. data/lib/cbox_billing/models/validation_error_body.rb +206 -0
  719. data/lib/cbox_billing/models/value_rule.rb +291 -0
  720. data/lib/cbox_billing/models/value_rules.rb +235 -0
  721. data/lib/cbox_billing/models/waitlist_answer.rb +105 -0
  722. data/lib/cbox_billing/models/waitlist_question.rb +411 -0
  723. data/lib/cbox_billing/models/webhook_delivery.rb +435 -0
  724. data/lib/cbox_billing/models/webhook_delivery_list.rb +226 -0
  725. data/lib/cbox_billing/models/webhook_endpoint.rb +347 -0
  726. data/lib/cbox_billing/models/webhook_endpoint_list.rb +226 -0
  727. data/lib/cbox_billing/models/webhook_endpoint_request.rb +270 -0
  728. data/lib/cbox_billing/models/webhook_endpoint_with_secret.rb +367 -0
  729. data/lib/cbox_billing/models/withdraw_agreement_request.rb +220 -0
  730. data/lib/cbox_billing/models/withdraw_agreement_request_user.rb +177 -0
  731. data/lib/cbox_billing/pagination.rb +28 -0
  732. data/lib/cbox_billing/retry.rb +96 -0
  733. data/lib/cbox_billing/version.rb +15 -0
  734. data/lib/cbox_billing/webhook.rb +77 -0
  735. data/lib/cbox_billing.rb +765 -0
  736. metadata +824 -0
@@ -0,0 +1,2033 @@
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 ProductAccessApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Award invitation allowance
23
+ # Add a number of invitations, or top up the available balance to that number. Issued invitations reserve their uses. Run your eligibility and renewal rules in the calling app or Engage. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
24
+ # @param program [String] The programme's public id (`acp_…`), in the token’s environment and optional product binding. A row number is a 404.
25
+ # @param access_balance_request [AccessBalanceRequest]
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
28
+ # @return [AccessBalance]
29
+ def access_balance(program, access_balance_request, opts = {})
30
+ data, _status_code, _headers = access_balance_with_http_info(program, access_balance_request, opts)
31
+ data
32
+ end
33
+
34
+ # Award invitation allowance
35
+ # Add a number of invitations, or top up the available balance to that number. Issued invitations reserve their uses. Run your eligibility and renewal rules in the calling app or Engage. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
36
+ # @param program [String] The programme's public id (`acp_…`), in the token’s environment and optional product binding. A row number is a 404.
37
+ # @param access_balance_request [AccessBalanceRequest]
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
40
+ # @return [Array<(AccessBalance, Integer, Hash)>] AccessBalance data, response status code and response headers
41
+ def access_balance_with_http_info(program, access_balance_request, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_balance ...'
44
+ end
45
+ # verify the required parameter 'program' is set
46
+ if @api_client.config.client_side_validation && program.nil?
47
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_balance"
48
+ end
49
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
50
+ if @api_client.config.client_side_validation && program !~ pattern
51
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_balance, must conform to the pattern #{pattern}."
52
+ end
53
+
54
+ # verify the required parameter 'access_balance_request' is set
55
+ if @api_client.config.client_side_validation && access_balance_request.nil?
56
+ fail ArgumentError, "Missing the required parameter 'access_balance_request' when calling ProductAccessApi.access_balance"
57
+ end
58
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
59
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_balance, the character length must be smaller than or equal to 190.'
60
+ end
61
+
62
+ # resource path
63
+ local_var_path = '/access/programs/{program}/balance'.sub('{program}', CGI.escape(program.to_s))
64
+
65
+ # query parameters
66
+ query_params = opts[:query_params] || {}
67
+
68
+ # header parameters
69
+ header_params = opts[:header_params] || {}
70
+ # HTTP header 'Accept' (if needed)
71
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
72
+ # HTTP header 'Content-Type'
73
+ content_type = @api_client.select_header_content_type(['application/json'])
74
+ if !content_type.nil?
75
+ header_params['Content-Type'] = content_type
76
+ end
77
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
78
+
79
+ # form parameters
80
+ form_params = opts[:form_params] || {}
81
+
82
+ # http body (model)
83
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_balance_request)
84
+
85
+ # return_type
86
+ return_type = opts[:debug_return_type] || 'AccessBalance'
87
+
88
+ # auth_names
89
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
90
+
91
+ new_options = opts.merge(
92
+ :operation => :"ProductAccessApi.access_balance",
93
+ :header_params => header_params,
94
+ :query_params => query_params,
95
+ :form_params => form_params,
96
+ :body => post_body,
97
+ :auth_names => auth_names,
98
+ :return_type => return_type
99
+ )
100
+
101
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
104
+ end
105
+ return data, status_code, headers
106
+ end
107
+
108
+ # Cancel a saved selection
109
+ # Returns a draft selection to the waitlist. A committed batch cannot be cancelled; revoke its invitations individually. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
110
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
111
+ # @param access_cancel_request [AccessCancelRequest]
112
+ # @param [Hash] opts the optional parameters
113
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
114
+ # @return [AccessBatch]
115
+ def access_cancel(program, access_cancel_request, opts = {})
116
+ data, _status_code, _headers = access_cancel_with_http_info(program, access_cancel_request, opts)
117
+ data
118
+ end
119
+
120
+ # Cancel a saved selection
121
+ # Returns a draft selection to the waitlist. A committed batch cannot be cancelled; revoke its invitations individually. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
122
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
123
+ # @param access_cancel_request [AccessCancelRequest]
124
+ # @param [Hash] opts the optional parameters
125
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
126
+ # @return [Array<(AccessBatch, Integer, Hash)>] AccessBatch data, response status code and response headers
127
+ def access_cancel_with_http_info(program, access_cancel_request, opts = {})
128
+ if @api_client.config.debugging
129
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_cancel ...'
130
+ end
131
+ # verify the required parameter 'program' is set
132
+ if @api_client.config.client_side_validation && program.nil?
133
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_cancel"
134
+ end
135
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
136
+ if @api_client.config.client_side_validation && program !~ pattern
137
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_cancel, must conform to the pattern #{pattern}."
138
+ end
139
+
140
+ # verify the required parameter 'access_cancel_request' is set
141
+ if @api_client.config.client_side_validation && access_cancel_request.nil?
142
+ fail ArgumentError, "Missing the required parameter 'access_cancel_request' when calling ProductAccessApi.access_cancel"
143
+ end
144
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
145
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_cancel, the character length must be smaller than or equal to 190.'
146
+ end
147
+
148
+ # resource path
149
+ local_var_path = '/access/programs/{program}/cancel'.sub('{program}', CGI.escape(program.to_s))
150
+
151
+ # query parameters
152
+ query_params = opts[:query_params] || {}
153
+
154
+ # header parameters
155
+ header_params = opts[:header_params] || {}
156
+ # HTTP header 'Accept' (if needed)
157
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
158
+ # HTTP header 'Content-Type'
159
+ content_type = @api_client.select_header_content_type(['application/json'])
160
+ if !content_type.nil?
161
+ header_params['Content-Type'] = content_type
162
+ end
163
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
164
+
165
+ # form parameters
166
+ form_params = opts[:form_params] || {}
167
+
168
+ # http body (model)
169
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_cancel_request)
170
+
171
+ # return_type
172
+ return_type = opts[:debug_return_type] || 'AccessBatch'
173
+
174
+ # auth_names
175
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
176
+
177
+ new_options = opts.merge(
178
+ :operation => :"ProductAccessApi.access_cancel",
179
+ :header_params => header_params,
180
+ :query_params => query_params,
181
+ :form_params => form_params,
182
+ :body => post_body,
183
+ :auth_names => auth_names,
184
+ :return_type => return_type
185
+ )
186
+
187
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_cancel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
190
+ end
191
+ return data, status_code, headers
192
+ end
193
+
194
+ # Send a saved selection
195
+ # Creates one email invitation for each person in the saved preview. Retries reuse the selection and invitations. Expired or cancelled previews return 422. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
196
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
197
+ # @param access_commit_request [AccessCommitRequest]
198
+ # @param [Hash] opts the optional parameters
199
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
200
+ # @return [AccessBatch]
201
+ def access_commit(program, access_commit_request, opts = {})
202
+ data, _status_code, _headers = access_commit_with_http_info(program, access_commit_request, opts)
203
+ data
204
+ end
205
+
206
+ # Send a saved selection
207
+ # Creates one email invitation for each person in the saved preview. Retries reuse the selection and invitations. Expired or cancelled previews return 422. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
208
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
209
+ # @param access_commit_request [AccessCommitRequest]
210
+ # @param [Hash] opts the optional parameters
211
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
212
+ # @return [Array<(AccessBatch, Integer, Hash)>] AccessBatch data, response status code and response headers
213
+ def access_commit_with_http_info(program, access_commit_request, opts = {})
214
+ if @api_client.config.debugging
215
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_commit ...'
216
+ end
217
+ # verify the required parameter 'program' is set
218
+ if @api_client.config.client_side_validation && program.nil?
219
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_commit"
220
+ end
221
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
222
+ if @api_client.config.client_side_validation && program !~ pattern
223
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_commit, must conform to the pattern #{pattern}."
224
+ end
225
+
226
+ # verify the required parameter 'access_commit_request' is set
227
+ if @api_client.config.client_side_validation && access_commit_request.nil?
228
+ fail ArgumentError, "Missing the required parameter 'access_commit_request' when calling ProductAccessApi.access_commit"
229
+ end
230
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
231
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_commit, the character length must be smaller than or equal to 190.'
232
+ end
233
+
234
+ # resource path
235
+ local_var_path = '/access/programs/{program}/commit'.sub('{program}', CGI.escape(program.to_s))
236
+
237
+ # query parameters
238
+ query_params = opts[:query_params] || {}
239
+
240
+ # header parameters
241
+ header_params = opts[:header_params] || {}
242
+ # HTTP header 'Accept' (if needed)
243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
244
+ # HTTP header 'Content-Type'
245
+ content_type = @api_client.select_header_content_type(['application/json'])
246
+ if !content_type.nil?
247
+ header_params['Content-Type'] = content_type
248
+ end
249
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
250
+
251
+ # form parameters
252
+ form_params = opts[:form_params] || {}
253
+
254
+ # http body (model)
255
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_commit_request)
256
+
257
+ # return_type
258
+ return_type = opts[:debug_return_type] || 'AccessBatch'
259
+
260
+ # auth_names
261
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
262
+
263
+ new_options = opts.merge(
264
+ :operation => :"ProductAccessApi.access_commit",
265
+ :header_params => header_params,
266
+ :query_params => query_params,
267
+ :form_params => form_params,
268
+ :body => post_body,
269
+ :auth_names => auth_names,
270
+ :return_type => return_type
271
+ )
272
+
273
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
274
+ if @api_client.config.debugging
275
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_commit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
276
+ end
277
+ return data, status_code, headers
278
+ end
279
+
280
+ # Grant access directly
281
+ # Operator grant without a code. Keeps the same organization checks, programme scope and unique redemption. Use restore-grant to reopen previously revoked access. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
282
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
283
+ # @param access_grant_request [AccessGrantRequest]
284
+ # @param [Hash] opts the optional parameters
285
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
286
+ # @return [AccessRedemption]
287
+ def access_grant(program, access_grant_request, opts = {})
288
+ data, _status_code, _headers = access_grant_with_http_info(program, access_grant_request, opts)
289
+ data
290
+ end
291
+
292
+ # Grant access directly
293
+ # Operator grant without a code. Keeps the same organization checks, programme scope and unique redemption. Use restore-grant to reopen previously revoked access. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
294
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
295
+ # @param access_grant_request [AccessGrantRequest]
296
+ # @param [Hash] opts the optional parameters
297
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
298
+ # @return [Array<(AccessRedemption, Integer, Hash)>] AccessRedemption data, response status code and response headers
299
+ def access_grant_with_http_info(program, access_grant_request, opts = {})
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_grant ...'
302
+ end
303
+ # verify the required parameter 'program' is set
304
+ if @api_client.config.client_side_validation && program.nil?
305
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_grant"
306
+ end
307
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
308
+ if @api_client.config.client_side_validation && program !~ pattern
309
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_grant, must conform to the pattern #{pattern}."
310
+ end
311
+
312
+ # verify the required parameter 'access_grant_request' is set
313
+ if @api_client.config.client_side_validation && access_grant_request.nil?
314
+ fail ArgumentError, "Missing the required parameter 'access_grant_request' when calling ProductAccessApi.access_grant"
315
+ end
316
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
317
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_grant, the character length must be smaller than or equal to 190.'
318
+ end
319
+
320
+ # resource path
321
+ local_var_path = '/access/programs/{program}/grant'.sub('{program}', CGI.escape(program.to_s))
322
+
323
+ # query parameters
324
+ query_params = opts[:query_params] || {}
325
+
326
+ # header parameters
327
+ header_params = opts[:header_params] || {}
328
+ # HTTP header 'Accept' (if needed)
329
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
330
+ # HTTP header 'Content-Type'
331
+ content_type = @api_client.select_header_content_type(['application/json'])
332
+ if !content_type.nil?
333
+ header_params['Content-Type'] = content_type
334
+ end
335
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
336
+
337
+ # form parameters
338
+ form_params = opts[:form_params] || {}
339
+
340
+ # http body (model)
341
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_grant_request)
342
+
343
+ # return_type
344
+ return_type = opts[:debug_return_type] || 'AccessRedemption'
345
+
346
+ # auth_names
347
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
348
+
349
+ new_options = opts.merge(
350
+ :operation => :"ProductAccessApi.access_grant",
351
+ :header_params => header_params,
352
+ :query_params => query_params,
353
+ :form_params => form_params,
354
+ :body => post_body,
355
+ :auth_names => auth_names,
356
+ :return_type => return_type
357
+ )
358
+
359
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
360
+ if @api_client.config.debugging
361
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_grant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
362
+ end
363
+ return data, status_code, headers
364
+ end
365
+
366
+ # Issue an invitation or code
367
+ # An email-bound invitation has exactly one use and is queued for delivery. Omit email for a shareable code. Set use_balance for a user invitation. Billing reserves the allowed uses atomically; it never interprets membership or application permissions. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
368
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
369
+ # @param access_invite_request [AccessInviteRequest]
370
+ # @param [Hash] opts the optional parameters
371
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
372
+ # @return [CreatedAccessInvitation]
373
+ def access_invite(program, access_invite_request, opts = {})
374
+ data, _status_code, _headers = access_invite_with_http_info(program, access_invite_request, opts)
375
+ data
376
+ end
377
+
378
+ # Issue an invitation or code
379
+ # An email-bound invitation has exactly one use and is queued for delivery. Omit email for a shareable code. Set use_balance for a user invitation. Billing reserves the allowed uses atomically; it never interprets membership or application permissions. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
380
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
381
+ # @param access_invite_request [AccessInviteRequest]
382
+ # @param [Hash] opts the optional parameters
383
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
384
+ # @return [Array<(CreatedAccessInvitation, Integer, Hash)>] CreatedAccessInvitation data, response status code and response headers
385
+ def access_invite_with_http_info(program, access_invite_request, opts = {})
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_invite ...'
388
+ end
389
+ # verify the required parameter 'program' is set
390
+ if @api_client.config.client_side_validation && program.nil?
391
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_invite"
392
+ end
393
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
394
+ if @api_client.config.client_side_validation && program !~ pattern
395
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_invite, must conform to the pattern #{pattern}."
396
+ end
397
+
398
+ # verify the required parameter 'access_invite_request' is set
399
+ if @api_client.config.client_side_validation && access_invite_request.nil?
400
+ fail ArgumentError, "Missing the required parameter 'access_invite_request' when calling ProductAccessApi.access_invite"
401
+ end
402
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
403
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_invite, the character length must be smaller than or equal to 190.'
404
+ end
405
+
406
+ # resource path
407
+ local_var_path = '/access/programs/{program}/invite'.sub('{program}', CGI.escape(program.to_s))
408
+
409
+ # query parameters
410
+ query_params = opts[:query_params] || {}
411
+
412
+ # header parameters
413
+ header_params = opts[:header_params] || {}
414
+ # HTTP header 'Accept' (if needed)
415
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
416
+ # HTTP header 'Content-Type'
417
+ content_type = @api_client.select_header_content_type(['application/json'])
418
+ if !content_type.nil?
419
+ header_params['Content-Type'] = content_type
420
+ end
421
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
422
+
423
+ # form parameters
424
+ form_params = opts[:form_params] || {}
425
+
426
+ # http body (model)
427
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_invite_request)
428
+
429
+ # return_type
430
+ return_type = opts[:debug_return_type] || 'CreatedAccessInvitation'
431
+
432
+ # auth_names
433
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
434
+
435
+ new_options = opts.merge(
436
+ :operation => :"ProductAccessApi.access_invite",
437
+ :header_params => header_params,
438
+ :query_params => query_params,
439
+ :form_params => form_params,
440
+ :body => post_body,
441
+ :auth_names => auth_names,
442
+ :return_type => return_type
443
+ )
444
+
445
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
446
+ if @api_client.config.debugging
447
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
448
+ end
449
+ return data, status_code, headers
450
+ end
451
+
452
+ # Request early access
453
+ # Submit a request through the trusted app backend. Programme questions are validated. Duplicate normalized email keeps its original position, answers and identity. Only waitlist mode accepts requests. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
454
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
455
+ # @param access_join_request [AccessJoinRequest]
456
+ # @param [Hash] opts the optional parameters
457
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
458
+ # @return [AccessEntry]
459
+ def access_join(program, access_join_request, opts = {})
460
+ data, _status_code, _headers = access_join_with_http_info(program, access_join_request, opts)
461
+ data
462
+ end
463
+
464
+ # Request early access
465
+ # Submit a request through the trusted app backend. Programme questions are validated. Duplicate normalized email keeps its original position, answers and identity. Only waitlist mode accepts requests. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
466
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
467
+ # @param access_join_request [AccessJoinRequest]
468
+ # @param [Hash] opts the optional parameters
469
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
470
+ # @return [Array<(AccessEntry, Integer, Hash)>] AccessEntry data, response status code and response headers
471
+ def access_join_with_http_info(program, access_join_request, opts = {})
472
+ if @api_client.config.debugging
473
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_join ...'
474
+ end
475
+ # verify the required parameter 'program' is set
476
+ if @api_client.config.client_side_validation && program.nil?
477
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_join"
478
+ end
479
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
480
+ if @api_client.config.client_side_validation && program !~ pattern
481
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_join, must conform to the pattern #{pattern}."
482
+ end
483
+
484
+ # verify the required parameter 'access_join_request' is set
485
+ if @api_client.config.client_side_validation && access_join_request.nil?
486
+ fail ArgumentError, "Missing the required parameter 'access_join_request' when calling ProductAccessApi.access_join"
487
+ end
488
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
489
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_join, the character length must be smaller than or equal to 190.'
490
+ end
491
+
492
+ # resource path
493
+ local_var_path = '/access/programs/{program}/join'.sub('{program}', CGI.escape(program.to_s))
494
+
495
+ # query parameters
496
+ query_params = opts[:query_params] || {}
497
+
498
+ # header parameters
499
+ header_params = opts[:header_params] || {}
500
+ # HTTP header 'Accept' (if needed)
501
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
502
+ # HTTP header 'Content-Type'
503
+ content_type = @api_client.select_header_content_type(['application/json'])
504
+ if !content_type.nil?
505
+ header_params['Content-Type'] = content_type
506
+ end
507
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
508
+
509
+ # form parameters
510
+ form_params = opts[:form_params] || {}
511
+
512
+ # http body (model)
513
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_join_request)
514
+
515
+ # return_type
516
+ return_type = opts[:debug_return_type] || 'AccessEntry'
517
+
518
+ # auth_names
519
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
520
+
521
+ new_options = opts.merge(
522
+ :operation => :"ProductAccessApi.access_join",
523
+ :header_params => header_params,
524
+ :query_params => query_params,
525
+ :form_params => form_params,
526
+ :body => post_body,
527
+ :auth_names => auth_names,
528
+ :return_type => return_type
529
+ )
530
+
531
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
532
+ if @api_client.config.debugging
533
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_join\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
534
+ end
535
+ return data, status_code, headers
536
+ end
537
+
538
+ # Accept access for a recipient team
539
+ # Trusted backends only: authenticate the recipient, verify the email and authorize the chosen organization in Cbox ID before calling. Never accept these fields from an untrusted browser unchecked. Omit code only for open signup. Grants the programme feature without a subscription. Self-invites, mismatched email, exhausted codes and cross-product codes fail. An existing redemption never emits another referral event. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
540
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
541
+ # @param access_redeem_request [AccessRedeemRequest]
542
+ # @param [Hash] opts the optional parameters
543
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
544
+ # @return [AccessRedemption]
545
+ def access_redeem(program, access_redeem_request, opts = {})
546
+ data, _status_code, _headers = access_redeem_with_http_info(program, access_redeem_request, opts)
547
+ data
548
+ end
549
+
550
+ # Accept access for a recipient team
551
+ # Trusted backends only: authenticate the recipient, verify the email and authorize the chosen organization in Cbox ID before calling. Never accept these fields from an untrusted browser unchecked. Omit code only for open signup. Grants the programme feature without a subscription. Self-invites, mismatched email, exhausted codes and cross-product codes fail. An existing redemption never emits another referral event. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
552
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
553
+ # @param access_redeem_request [AccessRedeemRequest]
554
+ # @param [Hash] opts the optional parameters
555
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
556
+ # @return [Array<(AccessRedemption, Integer, Hash)>] AccessRedemption data, response status code and response headers
557
+ def access_redeem_with_http_info(program, access_redeem_request, opts = {})
558
+ if @api_client.config.debugging
559
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_redeem ...'
560
+ end
561
+ # verify the required parameter 'program' is set
562
+ if @api_client.config.client_side_validation && program.nil?
563
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_redeem"
564
+ end
565
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
566
+ if @api_client.config.client_side_validation && program !~ pattern
567
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_redeem, must conform to the pattern #{pattern}."
568
+ end
569
+
570
+ # verify the required parameter 'access_redeem_request' is set
571
+ if @api_client.config.client_side_validation && access_redeem_request.nil?
572
+ fail ArgumentError, "Missing the required parameter 'access_redeem_request' when calling ProductAccessApi.access_redeem"
573
+ end
574
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
575
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_redeem, the character length must be smaller than or equal to 190.'
576
+ end
577
+
578
+ # resource path
579
+ local_var_path = '/access/programs/{program}/redeem'.sub('{program}', CGI.escape(program.to_s))
580
+
581
+ # query parameters
582
+ query_params = opts[:query_params] || {}
583
+
584
+ # header parameters
585
+ header_params = opts[:header_params] || {}
586
+ # HTTP header 'Accept' (if needed)
587
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
588
+ # HTTP header 'Content-Type'
589
+ content_type = @api_client.select_header_content_type(['application/json'])
590
+ if !content_type.nil?
591
+ header_params['Content-Type'] = content_type
592
+ end
593
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
594
+
595
+ # form parameters
596
+ form_params = opts[:form_params] || {}
597
+
598
+ # http body (model)
599
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_redeem_request)
600
+
601
+ # return_type
602
+ return_type = opts[:debug_return_type] || 'AccessRedemption'
603
+
604
+ # auth_names
605
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
606
+
607
+ new_options = opts.merge(
608
+ :operation => :"ProductAccessApi.access_redeem",
609
+ :header_params => header_params,
610
+ :query_params => query_params,
611
+ :form_params => form_params,
612
+ :body => post_body,
613
+ :auth_names => auth_names,
614
+ :return_type => return_type
615
+ )
616
+
617
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
618
+ if @api_client.config.debugging
619
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_redeem\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
620
+ end
621
+ return data, status_code, headers
622
+ end
623
+
624
+ # Restore programme access
625
+ # Reopens the existing grant without creating a second referral. Suspended or erased organizations cannot be restored. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
626
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
627
+ # @param access_restore_grant_request [AccessRestoreGrantRequest]
628
+ # @param [Hash] opts the optional parameters
629
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
630
+ # @return [AccessRevokeInvitation200Response]
631
+ def access_restore_grant(program, access_restore_grant_request, opts = {})
632
+ data, _status_code, _headers = access_restore_grant_with_http_info(program, access_restore_grant_request, opts)
633
+ data
634
+ end
635
+
636
+ # Restore programme access
637
+ # Reopens the existing grant without creating a second referral. Suspended or erased organizations cannot be restored. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
638
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
639
+ # @param access_restore_grant_request [AccessRestoreGrantRequest]
640
+ # @param [Hash] opts the optional parameters
641
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
642
+ # @return [Array<(AccessRevokeInvitation200Response, Integer, Hash)>] AccessRevokeInvitation200Response data, response status code and response headers
643
+ def access_restore_grant_with_http_info(program, access_restore_grant_request, opts = {})
644
+ if @api_client.config.debugging
645
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_restore_grant ...'
646
+ end
647
+ # verify the required parameter 'program' is set
648
+ if @api_client.config.client_side_validation && program.nil?
649
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_restore_grant"
650
+ end
651
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
652
+ if @api_client.config.client_side_validation && program !~ pattern
653
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_restore_grant, must conform to the pattern #{pattern}."
654
+ end
655
+
656
+ # verify the required parameter 'access_restore_grant_request' is set
657
+ if @api_client.config.client_side_validation && access_restore_grant_request.nil?
658
+ fail ArgumentError, "Missing the required parameter 'access_restore_grant_request' when calling ProductAccessApi.access_restore_grant"
659
+ end
660
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
661
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_restore_grant, the character length must be smaller than or equal to 190.'
662
+ end
663
+
664
+ # resource path
665
+ local_var_path = '/access/programs/{program}/restore-grant'.sub('{program}', CGI.escape(program.to_s))
666
+
667
+ # query parameters
668
+ query_params = opts[:query_params] || {}
669
+
670
+ # header parameters
671
+ header_params = opts[:header_params] || {}
672
+ # HTTP header 'Accept' (if needed)
673
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
674
+ # HTTP header 'Content-Type'
675
+ content_type = @api_client.select_header_content_type(['application/json'])
676
+ if !content_type.nil?
677
+ header_params['Content-Type'] = content_type
678
+ end
679
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
680
+
681
+ # form parameters
682
+ form_params = opts[:form_params] || {}
683
+
684
+ # http body (model)
685
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_restore_grant_request)
686
+
687
+ # return_type
688
+ return_type = opts[:debug_return_type] || 'AccessRevokeInvitation200Response'
689
+
690
+ # auth_names
691
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
692
+
693
+ new_options = opts.merge(
694
+ :operation => :"ProductAccessApi.access_restore_grant",
695
+ :header_params => header_params,
696
+ :query_params => query_params,
697
+ :form_params => form_params,
698
+ :body => post_body,
699
+ :auth_names => auth_names,
700
+ :return_type => return_type
701
+ )
702
+
703
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
704
+ if @api_client.config.debugging
705
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_restore_grant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
706
+ end
707
+ return data, status_code, headers
708
+ end
709
+
710
+ # Retry invitation email
711
+ # Resets failed delivery attempts for a pending valid email invitation. Already sent, expired, revoked or exhausted invitations cannot be retried. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
712
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
713
+ # @param access_retry_delivery_request [AccessRetryDeliveryRequest]
714
+ # @param [Hash] opts the optional parameters
715
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
716
+ # @return [AccessRevokeInvitation200Response]
717
+ def access_retry_delivery(program, access_retry_delivery_request, opts = {})
718
+ data, _status_code, _headers = access_retry_delivery_with_http_info(program, access_retry_delivery_request, opts)
719
+ data
720
+ end
721
+
722
+ # Retry invitation email
723
+ # Resets failed delivery attempts for a pending valid email invitation. Already sent, expired, revoked or exhausted invitations cannot be retried. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
724
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
725
+ # @param access_retry_delivery_request [AccessRetryDeliveryRequest]
726
+ # @param [Hash] opts the optional parameters
727
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
728
+ # @return [Array<(AccessRevokeInvitation200Response, Integer, Hash)>] AccessRevokeInvitation200Response data, response status code and response headers
729
+ def access_retry_delivery_with_http_info(program, access_retry_delivery_request, opts = {})
730
+ if @api_client.config.debugging
731
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_retry_delivery ...'
732
+ end
733
+ # verify the required parameter 'program' is set
734
+ if @api_client.config.client_side_validation && program.nil?
735
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_retry_delivery"
736
+ end
737
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
738
+ if @api_client.config.client_side_validation && program !~ pattern
739
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_retry_delivery, must conform to the pattern #{pattern}."
740
+ end
741
+
742
+ # verify the required parameter 'access_retry_delivery_request' is set
743
+ if @api_client.config.client_side_validation && access_retry_delivery_request.nil?
744
+ fail ArgumentError, "Missing the required parameter 'access_retry_delivery_request' when calling ProductAccessApi.access_retry_delivery"
745
+ end
746
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
747
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_retry_delivery, the character length must be smaller than or equal to 190.'
748
+ end
749
+
750
+ # resource path
751
+ local_var_path = '/access/programs/{program}/retry-delivery'.sub('{program}', CGI.escape(program.to_s))
752
+
753
+ # query parameters
754
+ query_params = opts[:query_params] || {}
755
+
756
+ # header parameters
757
+ header_params = opts[:header_params] || {}
758
+ # HTTP header 'Accept' (if needed)
759
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
760
+ # HTTP header 'Content-Type'
761
+ content_type = @api_client.select_header_content_type(['application/json'])
762
+ if !content_type.nil?
763
+ header_params['Content-Type'] = content_type
764
+ end
765
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
766
+
767
+ # form parameters
768
+ form_params = opts[:form_params] || {}
769
+
770
+ # http body (model)
771
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_retry_delivery_request)
772
+
773
+ # return_type
774
+ return_type = opts[:debug_return_type] || 'AccessRevokeInvitation200Response'
775
+
776
+ # auth_names
777
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
778
+
779
+ new_options = opts.merge(
780
+ :operation => :"ProductAccessApi.access_retry_delivery",
781
+ :header_params => header_params,
782
+ :query_params => query_params,
783
+ :form_params => form_params,
784
+ :body => post_body,
785
+ :auth_names => auth_names,
786
+ :return_type => return_type
787
+ )
788
+
789
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
790
+ if @api_client.config.debugging
791
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_retry_delivery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
792
+ end
793
+ return data, status_code, headers
794
+ end
795
+
796
+ # Revoke programme access
797
+ # Removes only this programme grant; a subscription or manual feature override can still grant access. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
798
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
799
+ # @param access_revoke_grant_request [AccessRevokeGrantRequest]
800
+ # @param [Hash] opts the optional parameters
801
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
802
+ # @return [AccessRevokeInvitation200Response]
803
+ def access_revoke_grant(program, access_revoke_grant_request, opts = {})
804
+ data, _status_code, _headers = access_revoke_grant_with_http_info(program, access_revoke_grant_request, opts)
805
+ data
806
+ end
807
+
808
+ # Revoke programme access
809
+ # Removes only this programme grant; a subscription or manual feature override can still grant access. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
810
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
811
+ # @param access_revoke_grant_request [AccessRevokeGrantRequest]
812
+ # @param [Hash] opts the optional parameters
813
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
814
+ # @return [Array<(AccessRevokeInvitation200Response, Integer, Hash)>] AccessRevokeInvitation200Response data, response status code and response headers
815
+ def access_revoke_grant_with_http_info(program, access_revoke_grant_request, opts = {})
816
+ if @api_client.config.debugging
817
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_revoke_grant ...'
818
+ end
819
+ # verify the required parameter 'program' is set
820
+ if @api_client.config.client_side_validation && program.nil?
821
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_revoke_grant"
822
+ end
823
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
824
+ if @api_client.config.client_side_validation && program !~ pattern
825
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_revoke_grant, must conform to the pattern #{pattern}."
826
+ end
827
+
828
+ # verify the required parameter 'access_revoke_grant_request' is set
829
+ if @api_client.config.client_side_validation && access_revoke_grant_request.nil?
830
+ fail ArgumentError, "Missing the required parameter 'access_revoke_grant_request' when calling ProductAccessApi.access_revoke_grant"
831
+ end
832
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
833
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_revoke_grant, the character length must be smaller than or equal to 190.'
834
+ end
835
+
836
+ # resource path
837
+ local_var_path = '/access/programs/{program}/revoke-grant'.sub('{program}', CGI.escape(program.to_s))
838
+
839
+ # query parameters
840
+ query_params = opts[:query_params] || {}
841
+
842
+ # header parameters
843
+ header_params = opts[:header_params] || {}
844
+ # HTTP header 'Accept' (if needed)
845
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
846
+ # HTTP header 'Content-Type'
847
+ content_type = @api_client.select_header_content_type(['application/json'])
848
+ if !content_type.nil?
849
+ header_params['Content-Type'] = content_type
850
+ end
851
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
852
+
853
+ # form parameters
854
+ form_params = opts[:form_params] || {}
855
+
856
+ # http body (model)
857
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_revoke_grant_request)
858
+
859
+ # return_type
860
+ return_type = opts[:debug_return_type] || 'AccessRevokeInvitation200Response'
861
+
862
+ # auth_names
863
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
864
+
865
+ new_options = opts.merge(
866
+ :operation => :"ProductAccessApi.access_revoke_grant",
867
+ :header_params => header_params,
868
+ :query_params => query_params,
869
+ :form_params => form_params,
870
+ :body => post_body,
871
+ :auth_names => auth_names,
872
+ :return_type => return_type
873
+ )
874
+
875
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
876
+ if @api_client.config.debugging
877
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_revoke_grant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
878
+ end
879
+ return data, status_code, headers
880
+ end
881
+
882
+ # Revoke unused invitation uses
883
+ # Stops further redemptions and returns unused reserved allowance once. Existing admissions and referral attribution remain. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
884
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
885
+ # @param access_revoke_invitation_request [AccessRevokeInvitationRequest]
886
+ # @param [Hash] opts the optional parameters
887
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
888
+ # @return [AccessRevokeInvitation200Response]
889
+ def access_revoke_invitation(program, access_revoke_invitation_request, opts = {})
890
+ data, _status_code, _headers = access_revoke_invitation_with_http_info(program, access_revoke_invitation_request, opts)
891
+ data
892
+ end
893
+
894
+ # Revoke unused invitation uses
895
+ # Stops further redemptions and returns unused reserved allowance once. Existing admissions and referral attribution remain. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
896
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
897
+ # @param access_revoke_invitation_request [AccessRevokeInvitationRequest]
898
+ # @param [Hash] opts the optional parameters
899
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
900
+ # @return [Array<(AccessRevokeInvitation200Response, Integer, Hash)>] AccessRevokeInvitation200Response data, response status code and response headers
901
+ def access_revoke_invitation_with_http_info(program, access_revoke_invitation_request, opts = {})
902
+ if @api_client.config.debugging
903
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_revoke_invitation ...'
904
+ end
905
+ # verify the required parameter 'program' is set
906
+ if @api_client.config.client_side_validation && program.nil?
907
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_revoke_invitation"
908
+ end
909
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
910
+ if @api_client.config.client_side_validation && program !~ pattern
911
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_revoke_invitation, must conform to the pattern #{pattern}."
912
+ end
913
+
914
+ # verify the required parameter 'access_revoke_invitation_request' is set
915
+ if @api_client.config.client_side_validation && access_revoke_invitation_request.nil?
916
+ fail ArgumentError, "Missing the required parameter 'access_revoke_invitation_request' when calling ProductAccessApi.access_revoke_invitation"
917
+ end
918
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
919
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_revoke_invitation, the character length must be smaller than or equal to 190.'
920
+ end
921
+
922
+ # resource path
923
+ local_var_path = '/access/programs/{program}/revoke-invitation'.sub('{program}', CGI.escape(program.to_s))
924
+
925
+ # query parameters
926
+ query_params = opts[:query_params] || {}
927
+
928
+ # header parameters
929
+ header_params = opts[:header_params] || {}
930
+ # HTTP header 'Accept' (if needed)
931
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
932
+ # HTTP header 'Content-Type'
933
+ content_type = @api_client.select_header_content_type(['application/json'])
934
+ if !content_type.nil?
935
+ header_params['Content-Type'] = content_type
936
+ end
937
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
938
+
939
+ # form parameters
940
+ form_params = opts[:form_params] || {}
941
+
942
+ # http body (model)
943
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_revoke_invitation_request)
944
+
945
+ # return_type
946
+ return_type = opts[:debug_return_type] || 'AccessRevokeInvitation200Response'
947
+
948
+ # auth_names
949
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
950
+
951
+ new_options = opts.merge(
952
+ :operation => :"ProductAccessApi.access_revoke_invitation",
953
+ :header_params => header_params,
954
+ :query_params => query_params,
955
+ :form_params => form_params,
956
+ :body => post_body,
957
+ :auth_names => auth_names,
958
+ :return_type => return_type
959
+ )
960
+
961
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
962
+ if @api_client.config.debugging
963
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_revoke_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
964
+ end
965
+ return data, status_code, headers
966
+ end
967
+
968
+ # Preview a waitlist admission
969
+ # Select at most count waiting people by FIFO, random or explicit IDs. Country and answer filters are exact matches. The membership is frozen for 24 hours and cannot overlap another pending preview. Nothing is sent yet. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
970
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
971
+ # @param access_select_request [AccessSelectRequest]
972
+ # @param [Hash] opts the optional parameters
973
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
974
+ # @return [AccessSelect200Response]
975
+ def access_select(program, access_select_request, opts = {})
976
+ data, _status_code, _headers = access_select_with_http_info(program, access_select_request, opts)
977
+ data
978
+ end
979
+
980
+ # Preview a waitlist admission
981
+ # Select at most count waiting people by FIFO, random or explicit IDs. Country and answer filters are exact matches. The membership is frozen for 24 hours and cannot overlap another pending preview. Nothing is sent yet. Every action requires a durable reference in the body or Idempotency-Key header; repeat the identical request to retry safely.
982
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
983
+ # @param access_select_request [AccessSelectRequest]
984
+ # @param [Hash] opts the optional parameters
985
+ # @option opts [String] :idempotency_key Used when reference is absent from the body.
986
+ # @return [Array<(AccessSelect200Response, Integer, Hash)>] AccessSelect200Response data, response status code and response headers
987
+ def access_select_with_http_info(program, access_select_request, opts = {})
988
+ if @api_client.config.debugging
989
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.access_select ...'
990
+ end
991
+ # verify the required parameter 'program' is set
992
+ if @api_client.config.client_side_validation && program.nil?
993
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.access_select"
994
+ end
995
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
996
+ if @api_client.config.client_side_validation && program !~ pattern
997
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.access_select, must conform to the pattern #{pattern}."
998
+ end
999
+
1000
+ # verify the required parameter 'access_select_request' is set
1001
+ if @api_client.config.client_side_validation && access_select_request.nil?
1002
+ fail ArgumentError, "Missing the required parameter 'access_select_request' when calling ProductAccessApi.access_select"
1003
+ end
1004
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 190
1005
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ProductAccessApi.access_select, the character length must be smaller than or equal to 190.'
1006
+ end
1007
+
1008
+ # resource path
1009
+ local_var_path = '/access/programs/{program}/select'.sub('{program}', CGI.escape(program.to_s))
1010
+
1011
+ # query parameters
1012
+ query_params = opts[:query_params] || {}
1013
+
1014
+ # header parameters
1015
+ header_params = opts[:header_params] || {}
1016
+ # HTTP header 'Accept' (if needed)
1017
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1018
+ # HTTP header 'Content-Type'
1019
+ content_type = @api_client.select_header_content_type(['application/json'])
1020
+ if !content_type.nil?
1021
+ header_params['Content-Type'] = content_type
1022
+ end
1023
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
1024
+
1025
+ # form parameters
1026
+ form_params = opts[:form_params] || {}
1027
+
1028
+ # http body (model)
1029
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_select_request)
1030
+
1031
+ # return_type
1032
+ return_type = opts[:debug_return_type] || 'AccessSelect200Response'
1033
+
1034
+ # auth_names
1035
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1036
+
1037
+ new_options = opts.merge(
1038
+ :operation => :"ProductAccessApi.access_select",
1039
+ :header_params => header_params,
1040
+ :query_params => query_params,
1041
+ :form_params => form_params,
1042
+ :body => post_body,
1043
+ :auth_names => auth_names,
1044
+ :return_type => return_type
1045
+ )
1046
+
1047
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1048
+ if @api_client.config.debugging
1049
+ @api_client.config.logger.debug "API called: ProductAccessApi#access_select\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1050
+ end
1051
+ return data, status_code, headers
1052
+ end
1053
+
1054
+ # Admit in open mode or redeem a valid invitation
1055
+ # Trusted product backends only, bound to the product and Billing environment. Subject and organization come from verified identity and membership. Billing remains authoritative; missing or unavailable policy never implies open access. Admission creates no subscription. Guest enrollment is rejected when login_required is true.
1056
+ # @param service [String]
1057
+ # @param service_admission_input [ServiceAdmissionInput]
1058
+ # @param [Hash] opts the optional parameters
1059
+ # @return [AdmitServiceOrganization200Response]
1060
+ def admit_service_organization(service, service_admission_input, opts = {})
1061
+ data, _status_code, _headers = admit_service_organization_with_http_info(service, service_admission_input, opts)
1062
+ data
1063
+ end
1064
+
1065
+ # Admit in open mode or redeem a valid invitation
1066
+ # Trusted product backends only, bound to the product and Billing environment. Subject and organization come from verified identity and membership. Billing remains authoritative; missing or unavailable policy never implies open access. Admission creates no subscription. Guest enrollment is rejected when login_required is true.
1067
+ # @param service [String]
1068
+ # @param service_admission_input [ServiceAdmissionInput]
1069
+ # @param [Hash] opts the optional parameters
1070
+ # @return [Array<(AdmitServiceOrganization200Response, Integer, Hash)>] AdmitServiceOrganization200Response data, response status code and response headers
1071
+ def admit_service_organization_with_http_info(service, service_admission_input, opts = {})
1072
+ if @api_client.config.debugging
1073
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.admit_service_organization ...'
1074
+ end
1075
+ # verify the required parameter 'service' is set
1076
+ if @api_client.config.client_side_validation && service.nil?
1077
+ fail ArgumentError, "Missing the required parameter 'service' when calling ProductAccessApi.admit_service_organization"
1078
+ end
1079
+ # verify the required parameter 'service_admission_input' is set
1080
+ if @api_client.config.client_side_validation && service_admission_input.nil?
1081
+ fail ArgumentError, "Missing the required parameter 'service_admission_input' when calling ProductAccessApi.admit_service_organization"
1082
+ end
1083
+ # resource path
1084
+ local_var_path = '/access/services/{service}/admit'.sub('{service}', CGI.escape(service.to_s))
1085
+
1086
+ # query parameters
1087
+ query_params = opts[:query_params] || {}
1088
+
1089
+ # header parameters
1090
+ header_params = opts[:header_params] || {}
1091
+ # HTTP header 'Accept' (if needed)
1092
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1093
+ # HTTP header 'Content-Type'
1094
+ content_type = @api_client.select_header_content_type(['application/json'])
1095
+ if !content_type.nil?
1096
+ header_params['Content-Type'] = content_type
1097
+ end
1098
+
1099
+ # form parameters
1100
+ form_params = opts[:form_params] || {}
1101
+
1102
+ # http body (model)
1103
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(service_admission_input)
1104
+
1105
+ # return_type
1106
+ return_type = opts[:debug_return_type] || 'AdmitServiceOrganization200Response'
1107
+
1108
+ # auth_names
1109
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1110
+
1111
+ new_options = opts.merge(
1112
+ :operation => :"ProductAccessApi.admit_service_organization",
1113
+ :header_params => header_params,
1114
+ :query_params => query_params,
1115
+ :form_params => form_params,
1116
+ :body => post_body,
1117
+ :auth_names => auth_names,
1118
+ :return_type => return_type
1119
+ )
1120
+
1121
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1122
+ if @api_client.config.debugging
1123
+ @api_client.config.logger.debug "API called: ProductAccessApi#admit_service_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1124
+ end
1125
+ return data, status_code, headers
1126
+ end
1127
+
1128
+ # Check admission without provisioning or redeeming anything
1129
+ # Trusted product backends only, bound to the product and Billing environment. Subject and organization come from verified identity and membership. Billing remains authoritative; missing or unavailable policy never implies open access. Admission creates no subscription. Guest enrollment is rejected when login_required is true.
1130
+ # @param service [String]
1131
+ # @param service_admission_identity [ServiceAdmissionIdentity]
1132
+ # @param [Hash] opts the optional parameters
1133
+ # @return [CheckServiceAdmission200Response]
1134
+ def check_service_admission(service, service_admission_identity, opts = {})
1135
+ data, _status_code, _headers = check_service_admission_with_http_info(service, service_admission_identity, opts)
1136
+ data
1137
+ end
1138
+
1139
+ # Check admission without provisioning or redeeming anything
1140
+ # Trusted product backends only, bound to the product and Billing environment. Subject and organization come from verified identity and membership. Billing remains authoritative; missing or unavailable policy never implies open access. Admission creates no subscription. Guest enrollment is rejected when login_required is true.
1141
+ # @param service [String]
1142
+ # @param service_admission_identity [ServiceAdmissionIdentity]
1143
+ # @param [Hash] opts the optional parameters
1144
+ # @return [Array<(CheckServiceAdmission200Response, Integer, Hash)>] CheckServiceAdmission200Response data, response status code and response headers
1145
+ def check_service_admission_with_http_info(service, service_admission_identity, opts = {})
1146
+ if @api_client.config.debugging
1147
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.check_service_admission ...'
1148
+ end
1149
+ # verify the required parameter 'service' is set
1150
+ if @api_client.config.client_side_validation && service.nil?
1151
+ fail ArgumentError, "Missing the required parameter 'service' when calling ProductAccessApi.check_service_admission"
1152
+ end
1153
+ # verify the required parameter 'service_admission_identity' is set
1154
+ if @api_client.config.client_side_validation && service_admission_identity.nil?
1155
+ fail ArgumentError, "Missing the required parameter 'service_admission_identity' when calling ProductAccessApi.check_service_admission"
1156
+ end
1157
+ # resource path
1158
+ local_var_path = '/access/services/{service}/check'.sub('{service}', CGI.escape(service.to_s))
1159
+
1160
+ # query parameters
1161
+ query_params = opts[:query_params] || {}
1162
+
1163
+ # header parameters
1164
+ header_params = opts[:header_params] || {}
1165
+ # HTTP header 'Accept' (if needed)
1166
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1167
+ # HTTP header 'Content-Type'
1168
+ content_type = @api_client.select_header_content_type(['application/json'])
1169
+ if !content_type.nil?
1170
+ header_params['Content-Type'] = content_type
1171
+ end
1172
+
1173
+ # form parameters
1174
+ form_params = opts[:form_params] || {}
1175
+
1176
+ # http body (model)
1177
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(service_admission_identity)
1178
+
1179
+ # return_type
1180
+ return_type = opts[:debug_return_type] || 'CheckServiceAdmission200Response'
1181
+
1182
+ # auth_names
1183
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1184
+
1185
+ new_options = opts.merge(
1186
+ :operation => :"ProductAccessApi.check_service_admission",
1187
+ :header_params => header_params,
1188
+ :query_params => query_params,
1189
+ :form_params => form_params,
1190
+ :body => post_body,
1191
+ :auth_names => auth_names,
1192
+ :return_type => return_type
1193
+ )
1194
+
1195
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1196
+ if @api_client.config.debugging
1197
+ @api_client.config.logger.debug "API called: ProductAccessApi#check_service_admission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1198
+ end
1199
+ return data, status_code, headers
1200
+ end
1201
+
1202
+ # Create an access programme
1203
+ # Unbound operator tokens only. One programme per product, granting an active boolean entitlement. Billing plugin entitlements cannot be granted by an access programme.
1204
+ # @param idempotency_key [String]
1205
+ # @param access_program_input [AccessProgramInput]
1206
+ # @param [Hash] opts the optional parameters
1207
+ # @return [AccessProgram]
1208
+ def create_access_program(idempotency_key, access_program_input, opts = {})
1209
+ data, _status_code, _headers = create_access_program_with_http_info(idempotency_key, access_program_input, opts)
1210
+ data
1211
+ end
1212
+
1213
+ # Create an access programme
1214
+ # Unbound operator tokens only. One programme per product, granting an active boolean entitlement. Billing plugin entitlements cannot be granted by an access programme.
1215
+ # @param idempotency_key [String]
1216
+ # @param access_program_input [AccessProgramInput]
1217
+ # @param [Hash] opts the optional parameters
1218
+ # @return [Array<(AccessProgram, Integer, Hash)>] AccessProgram data, response status code and response headers
1219
+ def create_access_program_with_http_info(idempotency_key, access_program_input, opts = {})
1220
+ if @api_client.config.debugging
1221
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.create_access_program ...'
1222
+ end
1223
+ # verify the required parameter 'idempotency_key' is set
1224
+ if @api_client.config.client_side_validation && idempotency_key.nil?
1225
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ProductAccessApi.create_access_program"
1226
+ end
1227
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 190
1228
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ProductAccessApi.create_access_program, the character length must be smaller than or equal to 190.'
1229
+ end
1230
+
1231
+ # verify the required parameter 'access_program_input' is set
1232
+ if @api_client.config.client_side_validation && access_program_input.nil?
1233
+ fail ArgumentError, "Missing the required parameter 'access_program_input' when calling ProductAccessApi.create_access_program"
1234
+ end
1235
+ # resource path
1236
+ local_var_path = '/access/programs'
1237
+
1238
+ # query parameters
1239
+ query_params = opts[:query_params] || {}
1240
+
1241
+ # header parameters
1242
+ header_params = opts[:header_params] || {}
1243
+ # HTTP header 'Accept' (if needed)
1244
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1245
+ # HTTP header 'Content-Type'
1246
+ content_type = @api_client.select_header_content_type(['application/json'])
1247
+ if !content_type.nil?
1248
+ header_params['Content-Type'] = content_type
1249
+ end
1250
+ header_params[:'Idempotency-Key'] = idempotency_key
1251
+
1252
+ # form parameters
1253
+ form_params = opts[:form_params] || {}
1254
+
1255
+ # http body (model)
1256
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_program_input)
1257
+
1258
+ # return_type
1259
+ return_type = opts[:debug_return_type] || 'AccessProgram'
1260
+
1261
+ # auth_names
1262
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1263
+
1264
+ new_options = opts.merge(
1265
+ :operation => :"ProductAccessApi.create_access_program",
1266
+ :header_params => header_params,
1267
+ :query_params => query_params,
1268
+ :form_params => form_params,
1269
+ :body => post_body,
1270
+ :auth_names => auth_names,
1271
+ :return_type => return_type
1272
+ )
1273
+
1274
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1275
+ if @api_client.config.debugging
1276
+ @api_client.config.logger.debug "API called: ProductAccessApi#create_access_program\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1277
+ end
1278
+ return data, status_code, headers
1279
+ end
1280
+
1281
+ # Read programme activity
1282
+ # Returns independently paginated waitlist, invitations, balances, redemptions, grants and batches. Codes are never returned. Page query keys are entries_page, invites_page, balances_page, referrals_page, grants_page and batches_page. Use batch to reopen a saved preview, with selected_page for its people.
1283
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
1284
+ # @param [Hash] opts the optional parameters
1285
+ # @return [AccessReport]
1286
+ def get_access_program(program, opts = {})
1287
+ data, _status_code, _headers = get_access_program_with_http_info(program, opts)
1288
+ data
1289
+ end
1290
+
1291
+ # Read programme activity
1292
+ # Returns independently paginated waitlist, invitations, balances, redemptions, grants and batches. Codes are never returned. Page query keys are entries_page, invites_page, balances_page, referrals_page, grants_page and batches_page. Use batch to reopen a saved preview, with selected_page for its people.
1293
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
1294
+ # @param [Hash] opts the optional parameters
1295
+ # @return [Array<(AccessReport, Integer, Hash)>] AccessReport data, response status code and response headers
1296
+ def get_access_program_with_http_info(program, opts = {})
1297
+ if @api_client.config.debugging
1298
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.get_access_program ...'
1299
+ end
1300
+ # verify the required parameter 'program' is set
1301
+ if @api_client.config.client_side_validation && program.nil?
1302
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.get_access_program"
1303
+ end
1304
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
1305
+ if @api_client.config.client_side_validation && program !~ pattern
1306
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.get_access_program, must conform to the pattern #{pattern}."
1307
+ end
1308
+
1309
+ # resource path
1310
+ local_var_path = '/access/programs/{program}'.sub('{program}', CGI.escape(program.to_s))
1311
+
1312
+ # query parameters
1313
+ query_params = opts[:query_params] || {}
1314
+
1315
+ # header parameters
1316
+ header_params = opts[:header_params] || {}
1317
+ # HTTP header 'Accept' (if needed)
1318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1319
+
1320
+ # form parameters
1321
+ form_params = opts[:form_params] || {}
1322
+
1323
+ # http body (model)
1324
+ post_body = opts[:debug_body]
1325
+
1326
+ # return_type
1327
+ return_type = opts[:debug_return_type] || 'AccessReport'
1328
+
1329
+ # auth_names
1330
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1331
+
1332
+ new_options = opts.merge(
1333
+ :operation => :"ProductAccessApi.get_access_program",
1334
+ :header_params => header_params,
1335
+ :query_params => query_params,
1336
+ :form_params => form_params,
1337
+ :body => post_body,
1338
+ :auth_names => auth_names,
1339
+ :return_type => return_type
1340
+ )
1341
+
1342
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1343
+ if @api_client.config.debugging
1344
+ @api_client.config.logger.debug "API called: ProductAccessApi#get_access_program\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1345
+ end
1346
+ return data, status_code, headers
1347
+ end
1348
+
1349
+ # Read the policy and schema for a service-owned signup page
1350
+ # Trusted product backends only, bound to the product and Billing environment. Subject and organization come from verified identity and membership. Billing remains authoritative; missing or unavailable policy never implies open access. Admission creates no subscription. Guest enrollment is rejected when login_required is true.
1351
+ # @param service [String]
1352
+ # @param [Hash] opts the optional parameters
1353
+ # @return [GetServiceAdmissionPolicy200Response]
1354
+ def get_service_admission_policy(service, opts = {})
1355
+ data, _status_code, _headers = get_service_admission_policy_with_http_info(service, opts)
1356
+ data
1357
+ end
1358
+
1359
+ # Read the policy and schema for a service-owned signup page
1360
+ # Trusted product backends only, bound to the product and Billing environment. Subject and organization come from verified identity and membership. Billing remains authoritative; missing or unavailable policy never implies open access. Admission creates no subscription. Guest enrollment is rejected when login_required is true.
1361
+ # @param service [String]
1362
+ # @param [Hash] opts the optional parameters
1363
+ # @return [Array<(GetServiceAdmissionPolicy200Response, Integer, Hash)>] GetServiceAdmissionPolicy200Response data, response status code and response headers
1364
+ def get_service_admission_policy_with_http_info(service, opts = {})
1365
+ if @api_client.config.debugging
1366
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.get_service_admission_policy ...'
1367
+ end
1368
+ # verify the required parameter 'service' is set
1369
+ if @api_client.config.client_side_validation && service.nil?
1370
+ fail ArgumentError, "Missing the required parameter 'service' when calling ProductAccessApi.get_service_admission_policy"
1371
+ end
1372
+ # resource path
1373
+ local_var_path = '/access/services/{service}/policy'.sub('{service}', CGI.escape(service.to_s))
1374
+
1375
+ # query parameters
1376
+ query_params = opts[:query_params] || {}
1377
+
1378
+ # header parameters
1379
+ header_params = opts[:header_params] || {}
1380
+ # HTTP header 'Accept' (if needed)
1381
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1382
+
1383
+ # form parameters
1384
+ form_params = opts[:form_params] || {}
1385
+
1386
+ # http body (model)
1387
+ post_body = opts[:debug_body]
1388
+
1389
+ # return_type
1390
+ return_type = opts[:debug_return_type] || 'GetServiceAdmissionPolicy200Response'
1391
+
1392
+ # auth_names
1393
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1394
+
1395
+ new_options = opts.merge(
1396
+ :operation => :"ProductAccessApi.get_service_admission_policy",
1397
+ :header_params => header_params,
1398
+ :query_params => query_params,
1399
+ :form_params => form_params,
1400
+ :body => post_body,
1401
+ :auth_names => auth_names,
1402
+ :return_type => return_type
1403
+ )
1404
+
1405
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1406
+ if @api_client.config.debugging
1407
+ @api_client.config.logger.debug "API called: ProductAccessApi#get_service_admission_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1408
+ end
1409
+ return data, status_code, headers
1410
+ end
1411
+
1412
+ # Read one person’s registration status
1413
+ # Trusted operator backends only. Requires access:enroll, the module deployment switch and plugin.product-access entitlement. Only published programmes with active products and features are visible. Product-bound tokens are restricted to their product. Derive subject and verified email from the authenticated session; never accept browser-supplied identity. Read-only POST to keep personal data out of URL logs. No idempotency key required. Unknown or unpublished programme IDs are omitted; registration is null when the person has no matching entry. Answers and email are never returned.
1414
+ # @param get_service_registrations_request [GetServiceRegistrationsRequest]
1415
+ # @param [Hash] opts the optional parameters
1416
+ # @return [GetServiceRegistrations200Response]
1417
+ def get_service_registrations(get_service_registrations_request, opts = {})
1418
+ data, _status_code, _headers = get_service_registrations_with_http_info(get_service_registrations_request, opts)
1419
+ data
1420
+ end
1421
+
1422
+ # Read one person’s registration status
1423
+ # Trusted operator backends only. Requires access:enroll, the module deployment switch and plugin.product-access entitlement. Only published programmes with active products and features are visible. Product-bound tokens are restricted to their product. Derive subject and verified email from the authenticated session; never accept browser-supplied identity. Read-only POST to keep personal data out of URL logs. No idempotency key required. Unknown or unpublished programme IDs are omitted; registration is null when the person has no matching entry. Answers and email are never returned.
1424
+ # @param get_service_registrations_request [GetServiceRegistrationsRequest]
1425
+ # @param [Hash] opts the optional parameters
1426
+ # @return [Array<(GetServiceRegistrations200Response, Integer, Hash)>] GetServiceRegistrations200Response data, response status code and response headers
1427
+ def get_service_registrations_with_http_info(get_service_registrations_request, opts = {})
1428
+ if @api_client.config.debugging
1429
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.get_service_registrations ...'
1430
+ end
1431
+ # verify the required parameter 'get_service_registrations_request' is set
1432
+ if @api_client.config.client_side_validation && get_service_registrations_request.nil?
1433
+ fail ArgumentError, "Missing the required parameter 'get_service_registrations_request' when calling ProductAccessApi.get_service_registrations"
1434
+ end
1435
+ # resource path
1436
+ local_var_path = '/access/directory/registrations'
1437
+
1438
+ # query parameters
1439
+ query_params = opts[:query_params] || {}
1440
+
1441
+ # header parameters
1442
+ header_params = opts[:header_params] || {}
1443
+ # HTTP header 'Accept' (if needed)
1444
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1445
+ # HTTP header 'Content-Type'
1446
+ content_type = @api_client.select_header_content_type(['application/json'])
1447
+ if !content_type.nil?
1448
+ header_params['Content-Type'] = content_type
1449
+ end
1450
+
1451
+ # form parameters
1452
+ form_params = opts[:form_params] || {}
1453
+
1454
+ # http body (model)
1455
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(get_service_registrations_request)
1456
+
1457
+ # return_type
1458
+ return_type = opts[:debug_return_type] || 'GetServiceRegistrations200Response'
1459
+
1460
+ # auth_names
1461
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1462
+
1463
+ new_options = opts.merge(
1464
+ :operation => :"ProductAccessApi.get_service_registrations",
1465
+ :header_params => header_params,
1466
+ :query_params => query_params,
1467
+ :form_params => form_params,
1468
+ :body => post_body,
1469
+ :auth_names => auth_names,
1470
+ :return_type => return_type
1471
+ )
1472
+
1473
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1474
+ if @api_client.config.debugging
1475
+ @api_client.config.logger.debug "API called: ProductAccessApi#get_service_registrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1476
+ end
1477
+ return data, status_code, headers
1478
+ end
1479
+
1480
+ # Join a published service or feature waitlist
1481
+ # Trusted operator backends only. Requires access:enroll, the module deployment switch and plugin.product-access entitlement. Only published programmes with active products and features are visible. Product-bound tokens are restricted to their product. Derive subject and verified email from the authenticated session; never accept browser-supplied identity. Stable reference or Idempotency-Key required. Service emails keep their original position. Features require an authenticated subject and existing customer organization; verify active membership before forwarding. Feature interest is unique per programme, team and person; withdrawn applications rejoin at the end. Joining does not grant access or create a subscription.
1482
+ # @param program [String]
1483
+ # @param idempotency_key [String]
1484
+ # @param join_service_waitlist_request [JoinServiceWaitlistRequest]
1485
+ # @param [Hash] opts the optional parameters
1486
+ # @return [JoinServiceWaitlist200Response]
1487
+ def join_service_waitlist(program, idempotency_key, join_service_waitlist_request, opts = {})
1488
+ data, _status_code, _headers = join_service_waitlist_with_http_info(program, idempotency_key, join_service_waitlist_request, opts)
1489
+ data
1490
+ end
1491
+
1492
+ # Join a published service or feature waitlist
1493
+ # Trusted operator backends only. Requires access:enroll, the module deployment switch and plugin.product-access entitlement. Only published programmes with active products and features are visible. Product-bound tokens are restricted to their product. Derive subject and verified email from the authenticated session; never accept browser-supplied identity. Stable reference or Idempotency-Key required. Service emails keep their original position. Features require an authenticated subject and existing customer organization; verify active membership before forwarding. Feature interest is unique per programme, team and person; withdrawn applications rejoin at the end. Joining does not grant access or create a subscription.
1494
+ # @param program [String]
1495
+ # @param idempotency_key [String]
1496
+ # @param join_service_waitlist_request [JoinServiceWaitlistRequest]
1497
+ # @param [Hash] opts the optional parameters
1498
+ # @return [Array<(JoinServiceWaitlist200Response, Integer, Hash)>] JoinServiceWaitlist200Response data, response status code and response headers
1499
+ def join_service_waitlist_with_http_info(program, idempotency_key, join_service_waitlist_request, opts = {})
1500
+ if @api_client.config.debugging
1501
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.join_service_waitlist ...'
1502
+ end
1503
+ # verify the required parameter 'program' is set
1504
+ if @api_client.config.client_side_validation && program.nil?
1505
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.join_service_waitlist"
1506
+ end
1507
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
1508
+ if @api_client.config.client_side_validation && program !~ pattern
1509
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.join_service_waitlist, must conform to the pattern #{pattern}."
1510
+ end
1511
+
1512
+ # verify the required parameter 'idempotency_key' is set
1513
+ if @api_client.config.client_side_validation && idempotency_key.nil?
1514
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ProductAccessApi.join_service_waitlist"
1515
+ end
1516
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 190
1517
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ProductAccessApi.join_service_waitlist, the character length must be smaller than or equal to 190.'
1518
+ end
1519
+
1520
+ # verify the required parameter 'join_service_waitlist_request' is set
1521
+ if @api_client.config.client_side_validation && join_service_waitlist_request.nil?
1522
+ fail ArgumentError, "Missing the required parameter 'join_service_waitlist_request' when calling ProductAccessApi.join_service_waitlist"
1523
+ end
1524
+ # resource path
1525
+ local_var_path = '/access/directory/{program}/join'.sub('{program}', CGI.escape(program.to_s))
1526
+
1527
+ # query parameters
1528
+ query_params = opts[:query_params] || {}
1529
+
1530
+ # header parameters
1531
+ header_params = opts[:header_params] || {}
1532
+ # HTTP header 'Accept' (if needed)
1533
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1534
+ # HTTP header 'Content-Type'
1535
+ content_type = @api_client.select_header_content_type(['application/json'])
1536
+ if !content_type.nil?
1537
+ header_params['Content-Type'] = content_type
1538
+ end
1539
+ header_params[:'Idempotency-Key'] = idempotency_key
1540
+
1541
+ # form parameters
1542
+ form_params = opts[:form_params] || {}
1543
+
1544
+ # http body (model)
1545
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(join_service_waitlist_request)
1546
+
1547
+ # return_type
1548
+ return_type = opts[:debug_return_type] || 'JoinServiceWaitlist200Response'
1549
+
1550
+ # auth_names
1551
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1552
+
1553
+ new_options = opts.merge(
1554
+ :operation => :"ProductAccessApi.join_service_waitlist",
1555
+ :header_params => header_params,
1556
+ :query_params => query_params,
1557
+ :form_params => form_params,
1558
+ :body => post_body,
1559
+ :auth_names => auth_names,
1560
+ :return_type => return_type
1561
+ )
1562
+
1563
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1564
+ if @api_client.config.debugging
1565
+ @api_client.config.logger.debug "API called: ProductAccessApi#join_service_waitlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1566
+ end
1567
+ return data, status_code, headers
1568
+ end
1569
+
1570
+ # Request email confirmation for a guest waitlist enrollment
1571
+ # Trusted product backends only, bound to the product and Billing environment. Subject and organization come from verified identity and membership. Billing remains authoritative; missing or unavailable policy never implies open access. Admission creates no subscription. Guest enrollment is rejected when login_required is true.
1572
+ # @param service [String]
1573
+ # @param idempotency_key [String]
1574
+ # @param guest_waitlist_input [GuestWaitlistInput]
1575
+ # @param [Hash] opts the optional parameters
1576
+ # @return [JoinServiceWaitlistAsGuest200Response]
1577
+ def join_service_waitlist_as_guest(service, idempotency_key, guest_waitlist_input, opts = {})
1578
+ data, _status_code, _headers = join_service_waitlist_as_guest_with_http_info(service, idempotency_key, guest_waitlist_input, opts)
1579
+ data
1580
+ end
1581
+
1582
+ # Request email confirmation for a guest waitlist enrollment
1583
+ # Trusted product backends only, bound to the product and Billing environment. Subject and organization come from verified identity and membership. Billing remains authoritative; missing or unavailable policy never implies open access. Admission creates no subscription. Guest enrollment is rejected when login_required is true.
1584
+ # @param service [String]
1585
+ # @param idempotency_key [String]
1586
+ # @param guest_waitlist_input [GuestWaitlistInput]
1587
+ # @param [Hash] opts the optional parameters
1588
+ # @return [Array<(JoinServiceWaitlistAsGuest200Response, Integer, Hash)>] JoinServiceWaitlistAsGuest200Response data, response status code and response headers
1589
+ def join_service_waitlist_as_guest_with_http_info(service, idempotency_key, guest_waitlist_input, opts = {})
1590
+ if @api_client.config.debugging
1591
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.join_service_waitlist_as_guest ...'
1592
+ end
1593
+ # verify the required parameter 'service' is set
1594
+ if @api_client.config.client_side_validation && service.nil?
1595
+ fail ArgumentError, "Missing the required parameter 'service' when calling ProductAccessApi.join_service_waitlist_as_guest"
1596
+ end
1597
+ # verify the required parameter 'idempotency_key' is set
1598
+ if @api_client.config.client_side_validation && idempotency_key.nil?
1599
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ProductAccessApi.join_service_waitlist_as_guest"
1600
+ end
1601
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 190
1602
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ProductAccessApi.join_service_waitlist_as_guest, the character length must be smaller than or equal to 190.'
1603
+ end
1604
+
1605
+ # verify the required parameter 'guest_waitlist_input' is set
1606
+ if @api_client.config.client_side_validation && guest_waitlist_input.nil?
1607
+ fail ArgumentError, "Missing the required parameter 'guest_waitlist_input' when calling ProductAccessApi.join_service_waitlist_as_guest"
1608
+ end
1609
+ # resource path
1610
+ local_var_path = '/access/services/{service}/join-guest'.sub('{service}', CGI.escape(service.to_s))
1611
+
1612
+ # query parameters
1613
+ query_params = opts[:query_params] || {}
1614
+
1615
+ # header parameters
1616
+ header_params = opts[:header_params] || {}
1617
+ # HTTP header 'Accept' (if needed)
1618
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1619
+ # HTTP header 'Content-Type'
1620
+ content_type = @api_client.select_header_content_type(['application/json'])
1621
+ if !content_type.nil?
1622
+ header_params['Content-Type'] = content_type
1623
+ end
1624
+ header_params[:'Idempotency-Key'] = idempotency_key
1625
+
1626
+ # form parameters
1627
+ form_params = opts[:form_params] || {}
1628
+
1629
+ # http body (model)
1630
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(guest_waitlist_input)
1631
+
1632
+ # return_type
1633
+ return_type = opts[:debug_return_type] || 'JoinServiceWaitlistAsGuest200Response'
1634
+
1635
+ # auth_names
1636
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1637
+
1638
+ new_options = opts.merge(
1639
+ :operation => :"ProductAccessApi.join_service_waitlist_as_guest",
1640
+ :header_params => header_params,
1641
+ :query_params => query_params,
1642
+ :form_params => form_params,
1643
+ :body => post_body,
1644
+ :auth_names => auth_names,
1645
+ :return_type => return_type
1646
+ )
1647
+
1648
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1649
+ if @api_client.config.debugging
1650
+ @api_client.config.logger.debug "API called: ProductAccessApi#join_service_waitlist_as_guest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1651
+ end
1652
+ return data, status_code, headers
1653
+ end
1654
+
1655
+ # Withdraw your feature notification or beta application
1656
+ # Trusted backends with access:enroll only. Derive subject from the session and verify active team membership. Works for unpublished or paused programmes. Activated beta grants must be revoked by an operator. Withdrawal invalidates any saved selection; cancellation never resurrects it.
1657
+ # @param program [String]
1658
+ # @param idempotency_key [String]
1659
+ # @param leave_feature_waitlist_request [LeaveFeatureWaitlistRequest]
1660
+ # @param [Hash] opts the optional parameters
1661
+ # @return [LeaveFeatureWaitlist200Response]
1662
+ def leave_feature_waitlist(program, idempotency_key, leave_feature_waitlist_request, opts = {})
1663
+ data, _status_code, _headers = leave_feature_waitlist_with_http_info(program, idempotency_key, leave_feature_waitlist_request, opts)
1664
+ data
1665
+ end
1666
+
1667
+ # Withdraw your feature notification or beta application
1668
+ # Trusted backends with access:enroll only. Derive subject from the session and verify active team membership. Works for unpublished or paused programmes. Activated beta grants must be revoked by an operator. Withdrawal invalidates any saved selection; cancellation never resurrects it.
1669
+ # @param program [String]
1670
+ # @param idempotency_key [String]
1671
+ # @param leave_feature_waitlist_request [LeaveFeatureWaitlistRequest]
1672
+ # @param [Hash] opts the optional parameters
1673
+ # @return [Array<(LeaveFeatureWaitlist200Response, Integer, Hash)>] LeaveFeatureWaitlist200Response data, response status code and response headers
1674
+ def leave_feature_waitlist_with_http_info(program, idempotency_key, leave_feature_waitlist_request, opts = {})
1675
+ if @api_client.config.debugging
1676
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.leave_feature_waitlist ...'
1677
+ end
1678
+ # verify the required parameter 'program' is set
1679
+ if @api_client.config.client_side_validation && program.nil?
1680
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.leave_feature_waitlist"
1681
+ end
1682
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
1683
+ if @api_client.config.client_side_validation && program !~ pattern
1684
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.leave_feature_waitlist, must conform to the pattern #{pattern}."
1685
+ end
1686
+
1687
+ # verify the required parameter 'idempotency_key' is set
1688
+ if @api_client.config.client_side_validation && idempotency_key.nil?
1689
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ProductAccessApi.leave_feature_waitlist"
1690
+ end
1691
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 190
1692
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ProductAccessApi.leave_feature_waitlist, the character length must be smaller than or equal to 190.'
1693
+ end
1694
+
1695
+ # verify the required parameter 'leave_feature_waitlist_request' is set
1696
+ if @api_client.config.client_side_validation && leave_feature_waitlist_request.nil?
1697
+ fail ArgumentError, "Missing the required parameter 'leave_feature_waitlist_request' when calling ProductAccessApi.leave_feature_waitlist"
1698
+ end
1699
+ # resource path
1700
+ local_var_path = '/access/directory/{program}/leave'.sub('{program}', CGI.escape(program.to_s))
1701
+
1702
+ # query parameters
1703
+ query_params = opts[:query_params] || {}
1704
+
1705
+ # header parameters
1706
+ header_params = opts[:header_params] || {}
1707
+ # HTTP header 'Accept' (if needed)
1708
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1709
+ # HTTP header 'Content-Type'
1710
+ content_type = @api_client.select_header_content_type(['application/json'])
1711
+ if !content_type.nil?
1712
+ header_params['Content-Type'] = content_type
1713
+ end
1714
+ header_params[:'Idempotency-Key'] = idempotency_key
1715
+
1716
+ # form parameters
1717
+ form_params = opts[:form_params] || {}
1718
+
1719
+ # http body (model)
1720
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(leave_feature_waitlist_request)
1721
+
1722
+ # return_type
1723
+ return_type = opts[:debug_return_type] || 'LeaveFeatureWaitlist200Response'
1724
+
1725
+ # auth_names
1726
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1727
+
1728
+ new_options = opts.merge(
1729
+ :operation => :"ProductAccessApi.leave_feature_waitlist",
1730
+ :header_params => header_params,
1731
+ :query_params => query_params,
1732
+ :form_params => form_params,
1733
+ :body => post_body,
1734
+ :auth_names => auth_names,
1735
+ :return_type => return_type
1736
+ )
1737
+
1738
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1739
+ if @api_client.config.debugging
1740
+ @api_client.config.logger.debug "API called: ProductAccessApi#leave_feature_waitlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1741
+ end
1742
+ return data, status_code, headers
1743
+ end
1744
+
1745
+ # List access programmes
1746
+ # Optional module. Requires the deployment switch and plugin.product-access entitlement. Operator tokens only; product-bound tokens see only their own programme.
1747
+ # @param [Hash] opts the optional parameters
1748
+ # @return [ListAccessPrograms200Response]
1749
+ def list_access_programs(opts = {})
1750
+ data, _status_code, _headers = list_access_programs_with_http_info(opts)
1751
+ data
1752
+ end
1753
+
1754
+ # List access programmes
1755
+ # Optional module. Requires the deployment switch and plugin.product-access entitlement. Operator tokens only; product-bound tokens see only their own programme.
1756
+ # @param [Hash] opts the optional parameters
1757
+ # @return [Array<(ListAccessPrograms200Response, Integer, Hash)>] ListAccessPrograms200Response data, response status code and response headers
1758
+ def list_access_programs_with_http_info(opts = {})
1759
+ if @api_client.config.debugging
1760
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.list_access_programs ...'
1761
+ end
1762
+ # resource path
1763
+ local_var_path = '/access/programs'
1764
+
1765
+ # query parameters
1766
+ query_params = opts[:query_params] || {}
1767
+
1768
+ # header parameters
1769
+ header_params = opts[:header_params] || {}
1770
+ # HTTP header 'Accept' (if needed)
1771
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1772
+
1773
+ # form parameters
1774
+ form_params = opts[:form_params] || {}
1775
+
1776
+ # http body (model)
1777
+ post_body = opts[:debug_body]
1778
+
1779
+ # return_type
1780
+ return_type = opts[:debug_return_type] || 'ListAccessPrograms200Response'
1781
+
1782
+ # auth_names
1783
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1784
+
1785
+ new_options = opts.merge(
1786
+ :operation => :"ProductAccessApi.list_access_programs",
1787
+ :header_params => header_params,
1788
+ :query_params => query_params,
1789
+ :form_params => form_params,
1790
+ :body => post_body,
1791
+ :auth_names => auth_names,
1792
+ :return_type => return_type
1793
+ )
1794
+
1795
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1796
+ if @api_client.config.debugging
1797
+ @api_client.config.logger.debug "API called: ProductAccessApi#list_access_programs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1798
+ end
1799
+ return data, status_code, headers
1800
+ end
1801
+
1802
+ # List published service or feature waitlists
1803
+ # Trusted operator backends only. Requires access:enroll, the module deployment switch and plugin.product-access entitlement. Only published programmes with active products and features are visible. Product-bound tokens are restricted to their product. Derive subject and verified email from the authenticated session; never accept browser-supplied identity.
1804
+ # @param [Hash] opts the optional parameters
1805
+ # @option opts [String] :kind (default to 'service')
1806
+ # @option opts [Integer] :page
1807
+ # @option opts [String] :service Optional exact product key.
1808
+ # @return [ListServiceDirectory200Response]
1809
+ def list_service_directory(opts = {})
1810
+ data, _status_code, _headers = list_service_directory_with_http_info(opts)
1811
+ data
1812
+ end
1813
+
1814
+ # List published service or feature waitlists
1815
+ # Trusted operator backends only. Requires access:enroll, the module deployment switch and plugin.product-access entitlement. Only published programmes with active products and features are visible. Product-bound tokens are restricted to their product. Derive subject and verified email from the authenticated session; never accept browser-supplied identity.
1816
+ # @param [Hash] opts the optional parameters
1817
+ # @option opts [String] :kind (default to 'service')
1818
+ # @option opts [Integer] :page
1819
+ # @option opts [String] :service Optional exact product key.
1820
+ # @return [Array<(ListServiceDirectory200Response, Integer, Hash)>] ListServiceDirectory200Response data, response status code and response headers
1821
+ def list_service_directory_with_http_info(opts = {})
1822
+ if @api_client.config.debugging
1823
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.list_service_directory ...'
1824
+ end
1825
+ allowable_values = ["service", "feature"]
1826
+ if @api_client.config.client_side_validation && opts[:'kind'] && !allowable_values.include?(opts[:'kind'])
1827
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{allowable_values}"
1828
+ end
1829
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
1830
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ProductAccessApi.list_service_directory, must be greater than or equal to 1.'
1831
+ end
1832
+
1833
+ if @api_client.config.client_side_validation && !opts[:'service'].nil? && opts[:'service'].to_s.length > 190
1834
+ fail ArgumentError, 'invalid value for "opts[:"service"]" when calling ProductAccessApi.list_service_directory, the character length must be smaller than or equal to 190.'
1835
+ end
1836
+
1837
+ # resource path
1838
+ local_var_path = '/access/directory'
1839
+
1840
+ # query parameters
1841
+ query_params = opts[:query_params] || {}
1842
+ query_params[:'kind'] = opts[:'kind'] if !opts[:'kind'].nil?
1843
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1844
+ query_params[:'service'] = opts[:'service'] if !opts[:'service'].nil?
1845
+
1846
+ # header parameters
1847
+ header_params = opts[:header_params] || {}
1848
+ # HTTP header 'Accept' (if needed)
1849
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1850
+
1851
+ # form parameters
1852
+ form_params = opts[:form_params] || {}
1853
+
1854
+ # http body (model)
1855
+ post_body = opts[:debug_body]
1856
+
1857
+ # return_type
1858
+ return_type = opts[:debug_return_type] || 'ListServiceDirectory200Response'
1859
+
1860
+ # auth_names
1861
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1862
+
1863
+ new_options = opts.merge(
1864
+ :operation => :"ProductAccessApi.list_service_directory",
1865
+ :header_params => header_params,
1866
+ :query_params => query_params,
1867
+ :form_params => form_params,
1868
+ :body => post_body,
1869
+ :auth_names => auth_names,
1870
+ :return_type => return_type
1871
+ )
1872
+
1873
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1874
+ if @api_client.config.debugging
1875
+ @api_client.config.logger.debug "API called: ProductAccessApi#list_service_directory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1876
+ end
1877
+ return data, status_code, headers
1878
+ end
1879
+
1880
+ # Read a held invitation code for a service's signup page
1881
+ # Trusted product backends only, bound to the product and Billing environment. Returns the address the invitation was sent to, the inviter's name and the expiry, so the service can name the inviter and prefill sign-up. Any code that cannot be used (unknown, revoked, expired, used up) answers the same `{invitation: null}`. The code is sent in the body so it stays out of URLs and access logs. Read-only.
1882
+ # @param service [String]
1883
+ # @param preview_service_invitation_request [PreviewServiceInvitationRequest]
1884
+ # @param [Hash] opts the optional parameters
1885
+ # @return [PreviewServiceInvitation200Response]
1886
+ def preview_service_invitation(service, preview_service_invitation_request, opts = {})
1887
+ data, _status_code, _headers = preview_service_invitation_with_http_info(service, preview_service_invitation_request, opts)
1888
+ data
1889
+ end
1890
+
1891
+ # Read a held invitation code for a service&#39;s signup page
1892
+ # Trusted product backends only, bound to the product and Billing environment. Returns the address the invitation was sent to, the inviter&#39;s name and the expiry, so the service can name the inviter and prefill sign-up. Any code that cannot be used (unknown, revoked, expired, used up) answers the same &#x60;{invitation: null}&#x60;. The code is sent in the body so it stays out of URLs and access logs. Read-only.
1893
+ # @param service [String]
1894
+ # @param preview_service_invitation_request [PreviewServiceInvitationRequest]
1895
+ # @param [Hash] opts the optional parameters
1896
+ # @return [Array<(PreviewServiceInvitation200Response, Integer, Hash)>] PreviewServiceInvitation200Response data, response status code and response headers
1897
+ def preview_service_invitation_with_http_info(service, preview_service_invitation_request, opts = {})
1898
+ if @api_client.config.debugging
1899
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.preview_service_invitation ...'
1900
+ end
1901
+ # verify the required parameter 'service' is set
1902
+ if @api_client.config.client_side_validation && service.nil?
1903
+ fail ArgumentError, "Missing the required parameter 'service' when calling ProductAccessApi.preview_service_invitation"
1904
+ end
1905
+ # verify the required parameter 'preview_service_invitation_request' is set
1906
+ if @api_client.config.client_side_validation && preview_service_invitation_request.nil?
1907
+ fail ArgumentError, "Missing the required parameter 'preview_service_invitation_request' when calling ProductAccessApi.preview_service_invitation"
1908
+ end
1909
+ # resource path
1910
+ local_var_path = '/access/services/{service}/invitation'.sub('{service}', CGI.escape(service.to_s))
1911
+
1912
+ # query parameters
1913
+ query_params = opts[:query_params] || {}
1914
+
1915
+ # header parameters
1916
+ header_params = opts[:header_params] || {}
1917
+ # HTTP header 'Accept' (if needed)
1918
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1919
+ # HTTP header 'Content-Type'
1920
+ content_type = @api_client.select_header_content_type(['application/json'])
1921
+ if !content_type.nil?
1922
+ header_params['Content-Type'] = content_type
1923
+ end
1924
+
1925
+ # form parameters
1926
+ form_params = opts[:form_params] || {}
1927
+
1928
+ # http body (model)
1929
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(preview_service_invitation_request)
1930
+
1931
+ # return_type
1932
+ return_type = opts[:debug_return_type] || 'PreviewServiceInvitation200Response'
1933
+
1934
+ # auth_names
1935
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1936
+
1937
+ new_options = opts.merge(
1938
+ :operation => :"ProductAccessApi.preview_service_invitation",
1939
+ :header_params => header_params,
1940
+ :query_params => query_params,
1941
+ :form_params => form_params,
1942
+ :body => post_body,
1943
+ :auth_names => auth_names,
1944
+ :return_type => return_type
1945
+ )
1946
+
1947
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1948
+ if @api_client.config.debugging
1949
+ @api_client.config.logger.debug "API called: ProductAccessApi#preview_service_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1950
+ end
1951
+ return data, status_code, headers
1952
+ end
1953
+
1954
+ # Configure programme admission
1955
+ # Unbound operators only. Product and feature are immutable. Pausing stops new admissions and delivery while preserving existing grants.
1956
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
1957
+ # @param access_program_input [AccessProgramInput]
1958
+ # @param [Hash] opts the optional parameters
1959
+ # @return [AccessProgram]
1960
+ def update_access_program(program, access_program_input, opts = {})
1961
+ data, _status_code, _headers = update_access_program_with_http_info(program, access_program_input, opts)
1962
+ data
1963
+ end
1964
+
1965
+ # Configure programme admission
1966
+ # Unbound operators only. Product and feature are immutable. Pausing stops new admissions and delivery while preserving existing grants.
1967
+ # @param program [String] The programme&#39;s public id (&#x60;acp_…&#x60;), in the token’s environment and optional product binding. A row number is a 404.
1968
+ # @param access_program_input [AccessProgramInput]
1969
+ # @param [Hash] opts the optional parameters
1970
+ # @return [Array<(AccessProgram, Integer, Hash)>] AccessProgram data, response status code and response headers
1971
+ def update_access_program_with_http_info(program, access_program_input, opts = {})
1972
+ if @api_client.config.debugging
1973
+ @api_client.config.logger.debug 'Calling API: ProductAccessApi.update_access_program ...'
1974
+ end
1975
+ # verify the required parameter 'program' is set
1976
+ if @api_client.config.client_side_validation && program.nil?
1977
+ fail ArgumentError, "Missing the required parameter 'program' when calling ProductAccessApi.update_access_program"
1978
+ end
1979
+ pattern = Regexp.new(/^acp_[0-9A-Za-z]{22}$/)
1980
+ if @api_client.config.client_side_validation && program !~ pattern
1981
+ fail ArgumentError, "invalid value for 'program' when calling ProductAccessApi.update_access_program, must conform to the pattern #{pattern}."
1982
+ end
1983
+
1984
+ # verify the required parameter 'access_program_input' is set
1985
+ if @api_client.config.client_side_validation && access_program_input.nil?
1986
+ fail ArgumentError, "Missing the required parameter 'access_program_input' when calling ProductAccessApi.update_access_program"
1987
+ end
1988
+ # resource path
1989
+ local_var_path = '/access/programs/{program}'.sub('{program}', CGI.escape(program.to_s))
1990
+
1991
+ # query parameters
1992
+ query_params = opts[:query_params] || {}
1993
+
1994
+ # header parameters
1995
+ header_params = opts[:header_params] || {}
1996
+ # HTTP header 'Accept' (if needed)
1997
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1998
+ # HTTP header 'Content-Type'
1999
+ content_type = @api_client.select_header_content_type(['application/json'])
2000
+ if !content_type.nil?
2001
+ header_params['Content-Type'] = content_type
2002
+ end
2003
+
2004
+ # form parameters
2005
+ form_params = opts[:form_params] || {}
2006
+
2007
+ # http body (model)
2008
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(access_program_input)
2009
+
2010
+ # return_type
2011
+ return_type = opts[:debug_return_type] || 'AccessProgram'
2012
+
2013
+ # auth_names
2014
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2015
+
2016
+ new_options = opts.merge(
2017
+ :operation => :"ProductAccessApi.update_access_program",
2018
+ :header_params => header_params,
2019
+ :query_params => query_params,
2020
+ :form_params => form_params,
2021
+ :body => post_body,
2022
+ :auth_names => auth_names,
2023
+ :return_type => return_type
2024
+ )
2025
+
2026
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2027
+ if @api_client.config.debugging
2028
+ @api_client.config.logger.debug "API called: ProductAccessApi#update_access_program\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2029
+ end
2030
+ return data, status_code, headers
2031
+ end
2032
+ end
2033
+ end