togai_client 1.0.0 → 1.0.2

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 (717) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -4
  3. data/docs/Account.md +26 -2
  4. data/docs/AccountAlias.md +28 -0
  5. data/docs/AccountAliases.md +1 -3
  6. data/docs/AccountAliasesPaginatedResponse.md +20 -0
  7. data/docs/AccountSchedule.md +38 -0
  8. data/docs/AccountsApi.md +840 -124
  9. data/docs/AccountsBillingInformation.md +20 -0
  10. data/docs/ActivatePricePlanRequest.md +18 -0
  11. data/docs/AddAccountAliasesRequest.md +3 -1
  12. data/docs/AddOn.md +30 -0
  13. data/docs/AddOnPaginatedResponse.md +22 -0
  14. data/docs/AddOnType.md +15 -0
  15. data/docs/AddOnsApi.md +365 -0
  16. data/docs/Address.md +30 -0
  17. data/docs/Alert.md +40 -0
  18. data/docs/AlertStatus.md +15 -0
  19. data/docs/AlertTemplate.md +38 -0
  20. data/docs/AlertTemplatesPaginatedResponse.md +20 -0
  21. data/docs/AlertsApi.md +566 -0
  22. data/docs/AlertsPaginatedResponse.md +20 -0
  23. data/docs/AliasPaginatedResponse.md +20 -0
  24. data/docs/AliasesApi.md +291 -0
  25. data/docs/AssociatePricePlanRequest.md +4 -4
  26. data/docs/AssociationConfig.md +24 -0
  27. data/docs/Attribute.md +22 -0
  28. data/docs/AuthenticationApi.md +74 -0
  29. data/docs/BillingConfig.md +20 -0
  30. data/docs/BillingEntitlementRateCard.md +34 -0
  31. data/docs/BillingEntitlementRevenueSummary.md +18 -0
  32. data/docs/BulkRateCardOperationsRequest.md +18 -0
  33. data/docs/BulkRateCardOperationsResponse.md +18 -0
  34. data/docs/Bundle.md +22 -0
  35. data/docs/CalculateRevenueRequest.md +30 -0
  36. data/docs/CalculateRevenueResponse.md +24 -0
  37. data/docs/CalculateRevenueResponseV2.md +22 -0
  38. data/docs/Computation.md +5 -3
  39. data/docs/CreateAccountAliasRequest.md +22 -0
  40. data/docs/CreateAccountRequest.md +27 -5
  41. data/docs/CreateAccountRequestWithoutCustomerId.md +42 -0
  42. data/docs/CreateAddOnRequest.md +22 -0
  43. data/docs/CreateAlertRequest.md +32 -0
  44. data/docs/CreateAliasRequest.md +18 -0
  45. data/docs/CreateBulkAliasRequest.md +18 -0
  46. data/docs/CreateCreditRequest.md +18 -0
  47. data/docs/CreateCreditResponse.md +18 -0
  48. data/docs/CreateCustomInvoiceRequest.md +36 -0
  49. data/docs/CreateCustomerContactRequest.md +30 -0
  50. data/docs/CreateCustomerContactResponse.md +34 -0
  51. data/docs/CreateCustomerRequest.md +9 -7
  52. data/docs/CreateCustomerResponse.md +8 -2
  53. data/docs/CreateEntitySetting.md +26 -0
  54. data/docs/CreateEventSchemaRequest.md +7 -1
  55. data/docs/CreateFeatureRequest.md +22 -0
  56. data/docs/CreateInvoiceGroupRequest.md +28 -0
  57. data/docs/CreatePaymentRequest.md +30 -0
  58. data/docs/CreatePricePlanDetails.md +38 -0
  59. data/docs/CreatePricePlanDetailsOverride.md +34 -0
  60. data/docs/CreatePricePlanMigrationRequest.md +32 -0
  61. data/docs/CreatePricePlanRequest.md +6 -4
  62. data/docs/CreatePricePlanV2Request.md +30 -0
  63. data/docs/CreatePricingRule.md +28 -0
  64. data/docs/CreateProposalRequest.md +40 -0
  65. data/docs/CreatePurchaseRequest.md +38 -0
  66. data/docs/CreateUsageMeterRequest.md +12 -6
  67. data/docs/Credit.md +50 -0
  68. data/docs/CreditBalanceResponse.md +28 -0
  69. data/docs/CreditDetailsResponse.md +52 -0
  70. data/docs/CreditGrantRateCard.md +34 -0
  71. data/docs/CreditGrantRevenueSummary.md +18 -0
  72. data/docs/CreditGrantType.md +15 -0
  73. data/docs/CreditRateDetails.md +20 -0
  74. data/docs/CreditRequest.md +34 -0
  75. data/docs/CreditTransaction.md +30 -0
  76. data/docs/CreditsApi.md +369 -0
  77. data/docs/CurrencyConfig.md +22 -0
  78. data/docs/CurrencyRateValue.md +20 -0
  79. data/docs/CurrencySlabRateDetail.md +24 -0
  80. data/docs/CustomInvoiceLineItem.md +28 -0
  81. data/docs/Customer.md +6 -2
  82. data/docs/CustomerPortalApi.md +77 -0
  83. data/docs/CustomersApi.md +85 -13
  84. data/docs/Dependency.md +22 -0
  85. data/docs/EditAccountScheduleRequest.md +18 -0
  86. data/docs/EditPricingScheduleRequest.md +18 -0
  87. data/docs/EnrichedField.md +22 -0
  88. data/docs/EnrichmentDependency.md +24 -0
  89. data/docs/Enrichments.md +20 -0
  90. data/docs/EntitlementOverageConfig.md +22 -0
  91. data/docs/EntitlementOverageConfigLookupCycle.md +20 -0
  92. data/docs/EntitlementOverageEntry.md +20 -0
  93. data/docs/EntitlementOverageRateCard.md +32 -0
  94. data/docs/EntitlementOverageRevenueSummary.md +18 -0
  95. data/docs/EntitlementsApi.md +599 -0
  96. data/docs/Event.md +11 -11
  97. data/docs/EventCorrectionInfo.md +32 -0
  98. data/docs/EventCorrectionRequest.md +18 -0
  99. data/docs/EventIngestionApi.md +16 -15
  100. data/docs/EventManagementApi.md +95 -21
  101. data/docs/EventPipelineInfo.md +15 -3
  102. data/docs/EventPipelineInfoAccount.md +3 -1
  103. data/docs/EventPipelineInfoEnrichments.md +22 -0
  104. data/docs/EventPipelineInfoFeatureDetails.md +24 -0
  105. data/docs/EventPipelineInfoPricePlans.md +28 -0
  106. data/docs/EventPipelineInfoPricePlansInner.md +2 -0
  107. data/docs/EventPipelineInfoRevenueDetails.md +22 -0
  108. data/docs/EventPipelineInfoUsageMeters.md +26 -0
  109. data/docs/EventSchema.md +11 -1
  110. data/docs/EventSchemaListData.md +13 -3
  111. data/docs/EventSchemaListDataAllOf.md +2 -2
  112. data/docs/EventSchemasApi.md +82 -84
  113. data/docs/EventSchemasForFeature.md +20 -0
  114. data/docs/EventSource.md +20 -0
  115. data/docs/EventWithStatus.md +9 -1
  116. data/docs/EventWithStatusAndEventPipelineInfo.md +9 -1
  117. data/docs/EventsCorrectionResponse.md +18 -0
  118. data/docs/ExpiryType.md +15 -0
  119. data/docs/ExternalPaymentReference.md +26 -0
  120. data/docs/Feature.md +30 -0
  121. data/docs/FeatureApi.md +293 -0
  122. data/docs/FeatureConfig.md +22 -0
  123. data/docs/FeatureCreditEntry.md +32 -0
  124. data/docs/FeatureDetails.md +20 -0
  125. data/docs/FeatureListResponse.md +30 -0
  126. data/docs/FeaturePaginatedListData.md +22 -0
  127. data/docs/Field.md +26 -0
  128. data/docs/FileDownloadUrlResponse.md +18 -0
  129. data/docs/FileStorageApi.md +151 -0
  130. data/docs/FinalizeAccountSchedules.md +20 -0
  131. data/docs/FinalizePricePlanRequest.md +20 -0
  132. data/docs/FixedFeeRateCard.md +34 -0
  133. data/docs/FixedFeeRevenueSummary.md +18 -0
  134. data/docs/FixedFeeType.md +15 -0
  135. data/docs/GetCustomerPortalDelegateTokenRequest.md +24 -0
  136. data/docs/GetEntitlementValuesResponse.md +18 -0
  137. data/docs/GetEntitlementValuesResponseDataInner.md +20 -0
  138. data/docs/GetEventResponse.md +1 -1
  139. data/docs/GetFeatureCreditEntriesPaginatedResponse.md +20 -0
  140. data/docs/GetFeatureCreditsResponse.md +28 -0
  141. data/docs/GetJobResponse.md +36 -0
  142. data/docs/GetLicenseUpdatesResponse.md +20 -0
  143. data/docs/GetMetricsRequest.md +4 -4
  144. data/docs/GetProposalResponse.md +62 -0
  145. data/docs/GetPurchaseResponse.md +62 -0
  146. data/docs/GrantDetails.md +24 -0
  147. data/docs/Incident.md +36 -0
  148. data/docs/IncidentsPaginatedResponse.md +20 -0
  149. data/docs/IngestEventRequest.md +1 -1
  150. data/docs/IngestEventResponse.md +12 -2
  151. data/docs/Invoice.md +68 -0
  152. data/docs/InvoiceDetails.md +28 -0
  153. data/docs/InvoiceDetailsAccount.md +24 -0
  154. data/docs/InvoiceDetailsCustomer.md +24 -0
  155. data/docs/InvoiceDetailsInvoiceGroup.md +28 -0
  156. data/docs/InvoiceDetailsOrganization.md +24 -0
  157. data/docs/InvoiceGroupAccountsPaginatedResponse.md +40 -0
  158. data/docs/InvoiceGroupDetails.md +30 -0
  159. data/docs/InvoiceGroupPaginatedResponse.md +20 -0
  160. data/docs/InvoiceGroups.md +36 -0
  161. data/docs/InvoiceGroupsApi.md +358 -0
  162. data/docs/InvoiceInfoInner.md +20 -0
  163. data/docs/InvoiceLineItem.md +34 -0
  164. data/docs/InvoiceSummary.md +58 -0
  165. data/docs/InvoiceTiming.md +15 -0
  166. data/docs/InvoicesApi.md +751 -0
  167. data/docs/InvoicesClass.md +15 -0
  168. data/docs/InvoicesStatus.md +15 -0
  169. data/docs/InvoicesType.md +15 -0
  170. data/docs/JobEntriesPaginatedResponse.md +22 -0
  171. data/docs/JobEntriesResponse.md +26 -0
  172. data/docs/JobsApi.md +361 -0
  173. data/docs/JobsPaginatedResponse.md +22 -0
  174. data/docs/JobsWithoutStatusInfoResponse.md +24 -0
  175. data/docs/LicenseEntriesConfig.md +24 -0
  176. data/docs/LicenseEntriesConfigLookupCycle.md +20 -0
  177. data/docs/LicenseEntriesConfigLookupRange.md +22 -0
  178. data/docs/LicenseEntry.md +22 -0
  179. data/docs/LicenseEntryDetailsUpdateRequest.md +22 -0
  180. data/docs/LicenseRateCard.md +40 -0
  181. data/docs/LicenseRateCardConfig.md +20 -0
  182. data/docs/LicenseUpdate.md +26 -0
  183. data/docs/LicenseUpdateRequest.md +30 -0
  184. data/docs/LicenseUpdateResponse.md +28 -0
  185. data/docs/LicensesApi.md +300 -0
  186. data/docs/ListCreditsResponse.md +20 -0
  187. data/docs/ListInvoicesResponse.md +20 -0
  188. data/docs/ListPaymentResponse.md +20 -0
  189. data/docs/ManageMiscellaneousChargesRequest.md +18 -0
  190. data/docs/MaxQuantityBreachAction.md +15 -0
  191. data/docs/MetricQuery.md +7 -5
  192. data/docs/MetricQueryFilterEntry.md +1 -1
  193. data/docs/MetricQueryResponse.md +1 -1
  194. data/docs/MetricsApi.md +7 -7
  195. data/docs/MigrationMode.md +15 -0
  196. data/docs/MinimumCommitment.md +20 -0
  197. data/docs/MiscellaneousCharge.md +26 -0
  198. data/docs/MiscellaneousChargesResponse.md +18 -0
  199. data/docs/ModelAlias.md +20 -0
  200. data/docs/NamedLicenseEntriesConfig.md +24 -0
  201. data/docs/NamedLicenseEntriesConfigLookupCycle.md +20 -0
  202. data/docs/NamedLicenseEntriesConfigLookupRange.md +22 -0
  203. data/docs/NamedLicenseEntry.md +24 -0
  204. data/docs/NamedLicenseUpdate.md +32 -0
  205. data/docs/NamedLicenseUpdatesPaginatedResponse.md +20 -0
  206. data/docs/Payment.md +38 -0
  207. data/docs/PaymentLineItemRecord.md +24 -0
  208. data/docs/PaymentsApi.md +227 -0
  209. data/docs/PlanOverride.md +8 -2
  210. data/docs/PreAction.md +20 -0
  211. data/docs/PriceExperimentationApi.md +147 -0
  212. data/docs/PricePlan.md +4 -2
  213. data/docs/PricePlanDetails.md +42 -0
  214. data/docs/PricePlanDetailsConfig.md +28 -0
  215. data/docs/PricePlanDetailsOverride.md +34 -0
  216. data/docs/PricePlanInfo.md +20 -0
  217. data/docs/PricePlanListData.md +12 -6
  218. data/docs/PricePlanMigrationConfig.md +30 -0
  219. data/docs/PricePlanPaginatedResponse.md +1 -1
  220. data/docs/PricePlanType.md +15 -0
  221. data/docs/PricePlanV2.md +42 -0
  222. data/docs/PricePlanV2Api.md +953 -0
  223. data/docs/PricePlanV2PaginatedResponse.md +20 -0
  224. data/docs/PricePlansApi.md +202 -52
  225. data/docs/PriceType.md +15 -0
  226. data/docs/PricingCycleConfig.md +24 -0
  227. data/docs/{PricingCycleStartOffset.md → PricingCycleConfigStartOffset.md} +3 -3
  228. data/docs/PricingCycleInterval.md +15 -0
  229. data/docs/PricingModel.md +15 -0
  230. data/docs/PricingRule.md +32 -0
  231. data/docs/PricingRuleAction.md +26 -0
  232. data/docs/PricingRuleChangesLog.md +30 -0
  233. data/docs/PricingRuleInfo.md +24 -0
  234. data/docs/PricingRuleTiming.md +15 -0
  235. data/docs/PricingRulesApi.md +83 -0
  236. data/docs/PricingRulesLog.md +28 -0
  237. data/docs/PricingRulesLogsPaginatedResponse.md +18 -0
  238. data/docs/PricingRulesPaginatedResponse.md +18 -0
  239. data/docs/PricingRulesValues.md +20 -0
  240. data/docs/PricingSchedule.md +11 -3
  241. data/docs/PricingSchedulePaginatedResponse.md +22 -0
  242. data/docs/PricingScheduleWithPricePlanId.md +36 -0
  243. data/docs/Proposal.md +62 -0
  244. data/docs/ProposalsListResponse.md +40 -0
  245. data/docs/ProposalsPaginatedResponse.md +22 -0
  246. data/docs/ProratedRefundMode.md +15 -0
  247. data/docs/ProrationConfig.md +22 -0
  248. data/docs/ProrationConfigCustomConfig.md +22 -0
  249. data/docs/ProrationConfigLookupCycleConfig.md +22 -0
  250. data/docs/Purchase.md +58 -0
  251. data/docs/PurchaseFeatureDetails.md +30 -0
  252. data/docs/PurchaseListResponse.md +46 -0
  253. data/docs/PurchasePaginatedListData.md +22 -0
  254. data/docs/PurchasePlanOverride.md +22 -0
  255. data/docs/PurchaseStatus.md +15 -0
  256. data/docs/PurchaseType.md +15 -0
  257. data/docs/QueryColumn.md +26 -0
  258. data/docs/QueryFilter.md +22 -0
  259. data/docs/QueryFunction.md +20 -0
  260. data/docs/QueryInput.md +28 -0
  261. data/docs/QueryInputSortInner.md +20 -0
  262. data/docs/RateCard.md +23 -5
  263. data/docs/RateCardBundleAggregation.md +15 -0
  264. data/docs/RateCardData.md +28 -0
  265. data/docs/RateCardDetails.md +30 -0
  266. data/docs/RateCardOperation.md +22 -0
  267. data/docs/RateCardPaginatedResponse.md +20 -0
  268. data/docs/RateCardType.md +15 -0
  269. data/docs/RateConfigBundle.md +20 -0
  270. data/docs/RateConfigUsage.md +20 -0
  271. data/docs/RatePlan.md +20 -0
  272. data/docs/RateValue.md +22 -0
  273. data/docs/RecurrenceConfig.md +20 -0
  274. data/docs/RemoveAccountAliasRequest.md +20 -0
  275. data/docs/RemoveAccountAliasesRequest.md +4 -2
  276. data/docs/Report.md +38 -0
  277. data/docs/ReportStatus.md +15 -0
  278. data/docs/ReportType.md +15 -0
  279. data/docs/ReportsApi.md +83 -0
  280. data/docs/ReportsPaginatedResponse.md +20 -0
  281. data/docs/RevenueInfo.md +42 -0
  282. data/docs/RevenueInfoV2.md +32 -0
  283. data/docs/RevenueSummaryWithMetadata.md +24 -0
  284. data/docs/ScheduleInfo.md +22 -0
  285. data/docs/SchedulesApi.md +667 -0
  286. data/docs/SchedulesPaginatedResponse.md +22 -0
  287. data/docs/Setting.md +30 -0
  288. data/docs/SettingDataType.md +15 -0
  289. data/docs/SettingPaginatedResponse.md +22 -0
  290. data/docs/SettingsApi.md +301 -0
  291. data/docs/Slab.md +24 -0
  292. data/docs/SlabBundle.md +24 -0
  293. data/docs/SlabDetail.md +26 -0
  294. data/docs/SlabRate.md +22 -0
  295. data/docs/SlabRevenue.md +22 -0
  296. data/docs/SlabRevenueMetadata.md +22 -0
  297. data/docs/SlabRevenueSummary.md +24 -0
  298. data/docs/SlabRevenueWithMetadata.md +24 -0
  299. data/docs/{UsageStrategy.md → SlabUsage.md} +6 -2
  300. data/docs/TokenResponse.md +18 -0
  301. data/docs/TopupWalletRequest.md +18 -0
  302. data/docs/UpdateAccountRequest.md +18 -2
  303. data/docs/UpdateAccountScheduleV2Request.md +26 -0
  304. data/docs/UpdateAddOnRequest.md +20 -0
  305. data/docs/UpdateAlertRequest.md +26 -0
  306. data/docs/UpdateCustomerRequest.md +5 -5
  307. data/docs/UpdateEventSchemaRequest.md +9 -3
  308. data/docs/UpdateFeatureCreditsRequest.md +20 -0
  309. data/docs/UpdateFeatureRequest.md +22 -0
  310. data/docs/UpdateIncidentStatusRequest.md +18 -0
  311. data/docs/UpdateInvoiceGroupAccounts.md +18 -0
  312. data/docs/UpdateInvoiceRequest.md +26 -0
  313. data/docs/UpdatePricePlanRequest.md +8 -4
  314. data/docs/UpdatePricePlanV2Request.md +22 -0
  315. data/docs/UpdatePricingRulesRequest.md +18 -0
  316. data/docs/UpdatePricingScheduleRequest.md +30 -0
  317. data/docs/UpdatePricingScheduleRequestWithActions.md +32 -0
  318. data/docs/UpdatePricingScheduleResponse.md +22 -0
  319. data/docs/UpdateProposalStatus.md +18 -0
  320. data/docs/UpdateSettingRequest.md +22 -0
  321. data/docs/UpdateUsageMeterRequest.md +13 -5
  322. data/docs/UpdateWalletRequest.md +20 -0
  323. data/docs/UsageConfig.md +24 -0
  324. data/docs/UsageConfigLookupCycle.md +20 -0
  325. data/docs/UsageConfigLookupRange.md +22 -0
  326. data/docs/UsageCycleInterval.md +15 -0
  327. data/docs/UsageLookupRange.md +20 -0
  328. data/docs/UsageMeter.md +12 -2
  329. data/docs/UsageMeterAggregation.md +15 -0
  330. data/docs/UsageMeterFilterEntry.md +20 -0
  331. data/docs/UsageMetersApi.md +64 -74
  332. data/docs/UsageRateCard.md +28 -0
  333. data/docs/ValidateEntitlementValueRequest.md +18 -0
  334. data/docs/ValidatedEntityError.md +24 -0
  335. data/docs/ValidatedEntityErrorsPaginatedResponse.md +20 -0
  336. data/docs/VersionsToMigrate.md +15 -0
  337. data/docs/WalletApi.md +301 -0
  338. data/docs/WalletBalanceResponse.md +40 -0
  339. data/docs/WalletEntriesPaginatedResponse.md +20 -0
  340. data/docs/WalletEntry.md +34 -0
  341. data/docs/WalletStatus.md +15 -0
  342. data/docs/WalletTopupDetails.md +20 -0
  343. data/examples/example.rb +222 -0
  344. data/lib/togai_client/api/accounts_api.rb +881 -220
  345. data/lib/togai_client/api/add_ons_api.rb +372 -0
  346. data/lib/togai_client/api/alerts_api.rb +527 -0
  347. data/lib/togai_client/api/aliases_api.rb +279 -0
  348. data/lib/togai_client/api/authentication_api.rb +79 -0
  349. data/lib/togai_client/api/credits_api.rb +351 -0
  350. data/lib/togai_client/api/customer_portal_api.rb +90 -0
  351. data/lib/togai_client/api/customers_api.rb +96 -18
  352. data/lib/togai_client/api/entitlements_api.rb +655 -0
  353. data/lib/togai_client/api/event_ingestion_api.rb +15 -15
  354. data/lib/togai_client/api/event_management_api.rb +97 -21
  355. data/lib/togai_client/api/event_schemas_api.rb +104 -107
  356. data/lib/togai_client/api/feature_api.rb +298 -0
  357. data/lib/togai_client/api/file_storage_api.rb +151 -0
  358. data/lib/togai_client/api/invoice_groups_api.rb +370 -0
  359. data/lib/togai_client/api/invoices_api.rb +705 -0
  360. data/lib/togai_client/api/jobs_api.rb +337 -0
  361. data/lib/togai_client/api/licenses_api.rb +282 -0
  362. data/lib/togai_client/api/metrics_api.rb +6 -6
  363. data/lib/togai_client/api/payments_api.rb +215 -0
  364. data/lib/togai_client/api/price_experimentation_api.rb +158 -0
  365. data/lib/togai_client/api/price_plan_v2_api.rb +960 -0
  366. data/lib/togai_client/api/price_plans_api.rb +214 -62
  367. data/lib/togai_client/api/pricing_rules_api.rb +106 -0
  368. data/lib/togai_client/api/reports_api.rb +92 -0
  369. data/lib/togai_client/api/schedules_api.rb +685 -0
  370. data/lib/togai_client/api/settings_api.rb +302 -0
  371. data/lib/togai_client/api/usage_meters_api.rb +97 -153
  372. data/lib/togai_client/api/wallet_api.rb +310 -0
  373. data/lib/togai_client/api_client.rb +25 -23
  374. data/lib/togai_client/api_error.rb +2 -1
  375. data/lib/togai_client/configuration.rb +51 -18
  376. data/lib/togai_client/models/account.rb +260 -28
  377. data/lib/togai_client/models/account_alias.rb +329 -0
  378. data/lib/togai_client/models/account_aliases.rb +23 -67
  379. data/lib/togai_client/models/account_aliases_paginated_response.rb +233 -0
  380. data/lib/togai_client/models/account_paginated_response.rb +14 -19
  381. data/lib/togai_client/models/account_schedule.rb +375 -0
  382. data/lib/togai_client/models/accounts_billing_information.rb +228 -0
  383. data/lib/togai_client/models/activate_price_plan_request.rb +235 -0
  384. data/lib/togai_client/models/add_account_aliases_request.rb +64 -25
  385. data/lib/togai_client/models/add_on.rb +395 -0
  386. data/lib/togai_client/models/add_on_paginated_response.rb +241 -0
  387. data/lib/togai_client/models/add_on_type.rb +42 -0
  388. data/lib/togai_client/models/address.rb +276 -0
  389. data/lib/togai_client/models/alert.rb +391 -0
  390. data/lib/togai_client/models/alert_status.rb +40 -0
  391. data/lib/togai_client/models/alert_template.rb +343 -0
  392. data/lib/togai_client/models/alert_templates_paginated_response.rb +232 -0
  393. data/lib/togai_client/models/alerts_paginated_response.rb +232 -0
  394. data/lib/togai_client/models/alias_paginated_response.rb +226 -0
  395. data/lib/togai_client/models/associate_price_plan_request.rb +17 -7
  396. data/lib/togai_client/models/association_config.rb +244 -0
  397. data/lib/togai_client/models/attribute.rb +327 -0
  398. data/lib/togai_client/models/base_success_response.rb +16 -19
  399. data/lib/togai_client/models/billing_config.rb +225 -0
  400. data/lib/togai_client/models/billing_entitlement_rate_card.rb +370 -0
  401. data/lib/togai_client/models/billing_entitlement_revenue_summary.rb +221 -0
  402. data/lib/togai_client/models/bulk_rate_card_operations_request.rb +224 -0
  403. data/lib/togai_client/models/bulk_rate_card_operations_response.rb +224 -0
  404. data/lib/togai_client/models/{pricing_cycle_start_offset.rb → bundle.rb} +58 -25
  405. data/lib/togai_client/models/calculate_revenue_request.rb +297 -0
  406. data/lib/togai_client/models/calculate_revenue_response.rb +264 -0
  407. data/lib/togai_client/models/calculate_revenue_response_v2.rb +248 -0
  408. data/lib/togai_client/models/computation.rb +49 -27
  409. data/lib/togai_client/models/create_account_alias_request.rb +270 -0
  410. data/lib/togai_client/models/create_account_request.rb +306 -27
  411. data/lib/togai_client/models/create_account_request_without_customer_id.rb +551 -0
  412. data/lib/togai_client/models/create_add_on_request.rb +309 -0
  413. data/lib/togai_client/models/create_alert_request.rb +327 -0
  414. data/lib/togai_client/models/create_alias_request.rb +241 -0
  415. data/lib/togai_client/models/create_bulk_alias_request.rb +252 -0
  416. data/lib/togai_client/models/create_credit_request.rb +224 -0
  417. data/lib/togai_client/models/create_credit_response.rb +223 -0
  418. data/lib/togai_client/models/create_custom_invoice_request.rb +411 -0
  419. data/lib/togai_client/models/create_customer_contact_request.rb +402 -0
  420. data/lib/togai_client/models/create_customer_contact_response.rb +435 -0
  421. data/lib/togai_client/models/create_customer_request.rb +65 -52
  422. data/lib/togai_client/models/create_customer_response.rb +79 -47
  423. data/lib/togai_client/models/create_entity_setting.rb +308 -0
  424. data/lib/togai_client/models/create_event_schema_request.rb +70 -24
  425. data/lib/togai_client/models/create_feature_request.rb +309 -0
  426. data/lib/togai_client/models/create_invoice_group_request.rb +344 -0
  427. data/lib/togai_client/models/create_payment_request.rb +394 -0
  428. data/lib/togai_client/models/create_price_plan_details.rb +339 -0
  429. data/lib/togai_client/models/create_price_plan_details_override.rb +319 -0
  430. data/lib/togai_client/models/create_price_plan_migration_request.rb +385 -0
  431. data/lib/togai_client/models/create_price_plan_request.rb +72 -41
  432. data/lib/togai_client/models/create_price_plan_v2_request.rb +367 -0
  433. data/lib/togai_client/models/create_pricing_rule.rb +313 -0
  434. data/lib/togai_client/models/create_proposal_request.rb +371 -0
  435. data/lib/togai_client/models/create_purchase_request.rb +330 -0
  436. data/lib/togai_client/models/create_usage_meter_request.rb +85 -42
  437. data/lib/togai_client/models/credit.rb +490 -0
  438. data/lib/togai_client/models/credit_balance_response.rb +302 -0
  439. data/lib/togai_client/models/credit_details_response.rb +508 -0
  440. data/lib/togai_client/models/credit_grant_rate_card.rb +332 -0
  441. data/lib/togai_client/models/credit_grant_revenue_summary.rb +221 -0
  442. data/lib/togai_client/models/credit_grant_type.rb +40 -0
  443. data/lib/togai_client/models/credit_rate_details.rb +262 -0
  444. data/lib/togai_client/models/credit_request.rb +330 -0
  445. data/lib/togai_client/models/credit_transaction.rb +357 -0
  446. data/lib/togai_client/models/{rate_card_bundle.rb → currency_config.rb} +63 -95
  447. data/lib/togai_client/models/currency_rate_value.rb +237 -0
  448. data/lib/togai_client/models/currency_slab_rate_detail.rb +287 -0
  449. data/lib/togai_client/models/custom_invoice_line_item.rb +260 -0
  450. data/lib/togai_client/models/customer.rb +66 -33
  451. data/lib/togai_client/models/customer_paginated_response.rb +14 -19
  452. data/lib/togai_client/models/dependency.rb +287 -0
  453. data/lib/togai_client/models/dimensions_schema.rb +16 -19
  454. data/lib/togai_client/models/edit_account_schedule_request.rb +252 -0
  455. data/lib/togai_client/models/edit_pricing_schedule_request.rb +252 -0
  456. data/lib/togai_client/models/enriched_field.rb +288 -0
  457. data/lib/togai_client/models/enrichment_dependency.rb +297 -0
  458. data/lib/togai_client/models/enrichments.rb +234 -0
  459. data/lib/togai_client/models/entitlement_overage_config.rb +278 -0
  460. data/lib/togai_client/models/entitlement_overage_config_lookup_cycle.rb +258 -0
  461. data/lib/togai_client/models/entitlement_overage_entry.rb +256 -0
  462. data/lib/togai_client/models/entitlement_overage_rate_card.rb +324 -0
  463. data/lib/togai_client/models/entitlement_overage_revenue_summary.rb +221 -0
  464. data/lib/togai_client/models/error_response.rb +16 -19
  465. data/lib/togai_client/models/event.rb +104 -84
  466. data/lib/togai_client/models/event_attribute_schema.rb +22 -21
  467. data/lib/togai_client/models/event_correction_info.rb +384 -0
  468. data/lib/togai_client/models/event_correction_request.rb +215 -0
  469. data/lib/togai_client/models/event_pipeline_info.rb +76 -25
  470. data/lib/togai_client/models/event_pipeline_info_account.rb +31 -23
  471. data/lib/togai_client/models/event_pipeline_info_customer.rb +18 -19
  472. data/lib/togai_client/models/event_pipeline_info_enrichments.rb +238 -0
  473. data/lib/togai_client/models/event_pipeline_info_event_schema.rb +18 -19
  474. data/lib/togai_client/models/event_pipeline_info_feature_details.rb +255 -0
  475. data/lib/togai_client/models/event_pipeline_info_price_plans.rb +306 -0
  476. data/lib/togai_client/models/event_pipeline_info_price_plans_inner.rb +15 -1
  477. data/lib/togai_client/models/event_pipeline_info_revenue_details.rb +253 -0
  478. data/lib/togai_client/models/event_pipeline_info_usage_meters.rb +312 -0
  479. data/lib/togai_client/models/event_schema.rb +89 -29
  480. data/lib/togai_client/models/event_schema_list_data.rb +96 -39
  481. data/lib/togai_client/models/event_schema_list_data_all_of.rb +7 -9
  482. data/lib/togai_client/models/event_schema_list_paginated_response.rb +14 -19
  483. data/lib/togai_client/models/event_schema_versions_response.rb +16 -19
  484. data/lib/togai_client/models/event_schemas_for_feature.rb +259 -0
  485. data/lib/togai_client/models/event_source.rb +278 -0
  486. data/lib/togai_client/models/event_with_status.rb +94 -23
  487. data/lib/togai_client/models/event_with_status_and_event_pipeline_info.rb +100 -23
  488. data/lib/togai_client/models/events_correction_response.rb +252 -0
  489. data/lib/togai_client/models/expiry_type.rb +41 -0
  490. data/lib/togai_client/models/external_payment_reference.rb +309 -0
  491. data/lib/togai_client/models/feature.rb +365 -0
  492. data/lib/togai_client/models/feature_config.rb +266 -0
  493. data/lib/togai_client/models/feature_credit_entry.rb +387 -0
  494. data/lib/togai_client/models/feature_details.rb +238 -0
  495. data/lib/togai_client/models/feature_list_response.rb +343 -0
  496. data/lib/togai_client/models/feature_paginated_list_data.rb +234 -0
  497. data/lib/togai_client/models/field.rb +331 -0
  498. data/lib/togai_client/models/file_download_url_response.rb +221 -0
  499. data/lib/togai_client/models/finalize_account_schedules.rb +228 -0
  500. data/lib/togai_client/models/finalize_price_plan_request.rb +246 -0
  501. data/lib/togai_client/models/fixed_fee_rate_card.rb +354 -0
  502. data/lib/togai_client/models/fixed_fee_revenue_summary.rb +221 -0
  503. data/lib/togai_client/models/fixed_fee_type.rb +40 -0
  504. data/lib/togai_client/models/get_customer_portal_delegate_token_request.rb +255 -0
  505. data/lib/togai_client/models/get_entitlement_values_response.rb +223 -0
  506. data/lib/togai_client/models/get_entitlement_values_response_data_inner.rb +239 -0
  507. data/lib/togai_client/models/get_event_response.rb +21 -19
  508. data/lib/togai_client/models/get_events_response.rb +21 -20
  509. data/lib/togai_client/models/get_feature_credit_entries_paginated_response.rb +225 -0
  510. data/lib/togai_client/models/get_feature_credits_response.rb +333 -0
  511. data/lib/togai_client/models/get_job_response.rb +399 -0
  512. data/lib/togai_client/models/get_license_updates_response.rb +252 -0
  513. data/lib/togai_client/models/get_metrics_request.rb +22 -19
  514. data/lib/togai_client/models/get_metrics_response.rb +16 -19
  515. data/lib/togai_client/models/get_proposal_response.rb +536 -0
  516. data/lib/togai_client/models/get_purchase_response.rb +519 -0
  517. data/lib/togai_client/models/grant_details.rb +299 -0
  518. data/lib/togai_client/models/incident.rb +347 -0
  519. data/lib/togai_client/models/incidents_paginated_response.rb +232 -0
  520. data/lib/togai_client/models/ingest_batch_event_request.rb +21 -24
  521. data/lib/togai_client/models/ingest_event_request.rb +21 -19
  522. data/lib/togai_client/models/ingest_event_response.rb +76 -42
  523. data/lib/togai_client/models/ingestion_status.rb +23 -22
  524. data/lib/togai_client/models/invoice.rb +571 -0
  525. data/lib/togai_client/models/invoice_details.rb +259 -0
  526. data/lib/togai_client/models/invoice_details_account.rb +269 -0
  527. data/lib/togai_client/models/invoice_details_customer.rb +255 -0
  528. data/lib/togai_client/models/invoice_details_invoice_group.rb +294 -0
  529. data/lib/togai_client/models/invoice_details_organization.rb +264 -0
  530. data/lib/togai_client/models/invoice_group_accounts_paginated_response.rb +430 -0
  531. data/lib/togai_client/models/invoice_group_details.rb +330 -0
  532. data/lib/togai_client/models/invoice_group_paginated_response.rb +225 -0
  533. data/lib/togai_client/models/invoice_groups.rb +403 -0
  534. data/lib/togai_client/models/invoice_info_inner.rb +239 -0
  535. data/lib/togai_client/models/invoice_line_item.rb +381 -0
  536. data/lib/togai_client/models/invoice_summary.rb +520 -0
  537. data/lib/togai_client/models/invoice_timing.rb +41 -0
  538. data/lib/togai_client/models/invoices_class.rb +41 -0
  539. data/lib/togai_client/models/invoices_status.rb +47 -0
  540. data/lib/togai_client/models/invoices_type.rb +44 -0
  541. data/lib/togai_client/models/job_entries_paginated_response.rb +234 -0
  542. data/lib/togai_client/models/job_entries_response.rb +314 -0
  543. data/lib/togai_client/models/jobs_paginated_response.rb +234 -0
  544. data/lib/togai_client/models/jobs_without_status_info_response.rb +269 -0
  545. data/lib/togai_client/models/license_entries_config.rb +287 -0
  546. data/lib/togai_client/models/license_entries_config_lookup_cycle.rb +251 -0
  547. data/lib/togai_client/models/license_entries_config_lookup_range.rb +273 -0
  548. data/lib/togai_client/models/license_entry.rb +272 -0
  549. data/lib/togai_client/models/license_entry_details_update_request.rb +277 -0
  550. data/lib/togai_client/models/license_rate_card.rb +388 -0
  551. data/lib/togai_client/models/license_rate_card_config.rb +246 -0
  552. data/lib/togai_client/models/license_update.rb +320 -0
  553. data/lib/togai_client/models/license_update_request.rb +377 -0
  554. data/lib/togai_client/models/license_update_response.rb +342 -0
  555. data/lib/togai_client/models/list_credits_response.rb +280 -0
  556. data/lib/togai_client/models/list_invoices_response.rb +280 -0
  557. data/lib/togai_client/models/list_payment_response.rb +280 -0
  558. data/lib/togai_client/models/manage_miscellaneous_charges_request.rb +224 -0
  559. data/lib/togai_client/models/max_quantity_breach_action.rb +39 -0
  560. data/lib/togai_client/models/metric_data_points.rb +28 -29
  561. data/lib/togai_client/models/metric_data_points_grouped_by.rb +18 -19
  562. data/lib/togai_client/models/metric_name.rb +11 -4
  563. data/lib/togai_client/models/metric_query.rb +45 -24
  564. data/lib/togai_client/models/metric_query_filter_entry.rb +19 -20
  565. data/lib/togai_client/models/metric_query_response.rb +42 -19
  566. data/lib/togai_client/models/migration_mode.rb +44 -0
  567. data/lib/togai_client/models/minimum_commitment.rb +258 -0
  568. data/lib/togai_client/models/miscellaneous_charge.rb +265 -0
  569. data/lib/togai_client/models/miscellaneous_charges_response.rb +224 -0
  570. data/lib/togai_client/models/model_alias.rb +238 -0
  571. data/lib/togai_client/models/named_license_entries_config.rb +287 -0
  572. data/lib/togai_client/models/named_license_entries_config_lookup_cycle.rb +251 -0
  573. data/lib/togai_client/models/named_license_entries_config_lookup_range.rb +273 -0
  574. data/lib/togai_client/models/named_license_entry.rb +281 -0
  575. data/lib/togai_client/models/named_license_update.rb +396 -0
  576. data/lib/togai_client/models/named_license_updates_paginated_response.rb +252 -0
  577. data/lib/togai_client/models/pagination_options.rb +14 -19
  578. data/lib/togai_client/models/payment.rb +380 -0
  579. data/lib/togai_client/models/payment_line_item_record.rb +290 -0
  580. data/lib/togai_client/models/plan_override.rb +70 -26
  581. data/lib/togai_client/models/pre_action.rb +269 -0
  582. data/lib/togai_client/models/price_plan.rb +59 -35
  583. data/lib/togai_client/models/price_plan_details.rb +396 -0
  584. data/lib/togai_client/models/price_plan_details_config.rb +344 -0
  585. data/lib/togai_client/models/price_plan_details_override.rb +345 -0
  586. data/lib/togai_client/models/price_plan_info.rb +230 -0
  587. data/lib/togai_client/models/price_plan_list_data.rb +125 -49
  588. data/lib/togai_client/models/price_plan_migration_config.rb +368 -0
  589. data/lib/togai_client/models/price_plan_paginated_response.rb +21 -19
  590. data/lib/togai_client/models/price_plan_type.rb +40 -0
  591. data/lib/togai_client/models/price_plan_v2.rb +519 -0
  592. data/lib/togai_client/models/price_plan_v2_paginated_response.rb +233 -0
  593. data/lib/togai_client/models/price_type.rb +41 -0
  594. data/lib/togai_client/models/{pricing_cycle.rb → pricing_cycle_config.rb} +38 -71
  595. data/lib/togai_client/models/pricing_cycle_config_start_offset.rb +240 -0
  596. data/lib/togai_client/models/pricing_cycle_interval.rb +43 -0
  597. data/lib/togai_client/models/pricing_model.rb +40 -0
  598. data/lib/togai_client/models/pricing_rule.rb +382 -0
  599. data/lib/togai_client/models/pricing_rule_action.rb +293 -0
  600. data/lib/togai_client/models/pricing_rule_changes_log.rb +290 -0
  601. data/lib/togai_client/models/pricing_rule_info.rb +249 -0
  602. data/lib/togai_client/models/pricing_rule_timing.rb +40 -0
  603. data/lib/togai_client/models/pricing_rules_log.rb +318 -0
  604. data/lib/togai_client/models/pricing_rules_logs_paginated_response.rb +224 -0
  605. data/lib/togai_client/models/pricing_rules_paginated_response.rb +223 -0
  606. data/lib/togai_client/models/pricing_rules_values.rb +223 -0
  607. data/lib/togai_client/models/pricing_schedule.rb +106 -29
  608. data/lib/togai_client/models/pricing_schedule_paginated_response.rb +234 -0
  609. data/lib/togai_client/models/pricing_schedule_with_price_plan_id.rb +365 -0
  610. data/lib/togai_client/models/proposal.rb +536 -0
  611. data/lib/togai_client/models/proposals_list_response.rb +390 -0
  612. data/lib/togai_client/models/proposals_paginated_response.rb +234 -0
  613. data/lib/togai_client/models/prorated_refund_mode.rb +42 -0
  614. data/lib/togai_client/models/proration_config.rb +275 -0
  615. data/lib/togai_client/models/proration_config_custom_config.rb +254 -0
  616. data/lib/togai_client/models/proration_config_lookup_cycle_config.rb +261 -0
  617. data/lib/togai_client/models/purchase.rb +493 -0
  618. data/lib/togai_client/models/purchase_feature_details.rb +317 -0
  619. data/lib/togai_client/models/purchase_list_response.rb +393 -0
  620. data/lib/togai_client/models/purchase_paginated_list_data.rb +234 -0
  621. data/lib/togai_client/models/purchase_plan_override.rb +296 -0
  622. data/lib/togai_client/models/purchase_status.rb +46 -0
  623. data/lib/togai_client/models/purchase_type.rb +42 -0
  624. data/lib/togai_client/models/query_column.rb +259 -0
  625. data/lib/togai_client/models/query_filter.rb +255 -0
  626. data/lib/togai_client/models/query_function.rb +239 -0
  627. data/lib/togai_client/models/query_input.rb +295 -0
  628. data/lib/togai_client/models/query_input_sort_inner.rb +237 -0
  629. data/lib/togai_client/models/rate_card.rb +321 -44
  630. data/lib/togai_client/models/rate_card_bundle_aggregation.rb +39 -0
  631. data/lib/togai_client/models/rate_card_data.rb +370 -0
  632. data/lib/togai_client/models/rate_card_details.rb +269 -0
  633. data/lib/togai_client/models/rate_card_operation.rb +302 -0
  634. data/lib/togai_client/models/rate_card_paginated_response.rb +233 -0
  635. data/lib/togai_client/models/rate_card_type.rb +45 -0
  636. data/lib/togai_client/models/{bundle_strategy_usage_meters_value.rb → rate_config_bundle.rb} +28 -13
  637. data/lib/togai_client/models/{rate_card_usage_value.rb → rate_config_usage.rb} +15 -98
  638. data/lib/togai_client/models/rate_plan.rb +282 -0
  639. data/lib/togai_client/models/rate_value.rb +270 -0
  640. data/lib/togai_client/models/recurrence_config.rb +225 -0
  641. data/lib/togai_client/models/remove_account_alias_request.rb +232 -0
  642. data/lib/togai_client/models/remove_account_aliases_request.rb +30 -49
  643. data/lib/togai_client/models/report.rb +362 -0
  644. data/lib/togai_client/models/report_status.rb +43 -0
  645. data/lib/togai_client/models/report_type.rb +41 -0
  646. data/lib/togai_client/models/reports_paginated_response.rb +226 -0
  647. data/lib/togai_client/models/revenue_info.rb +335 -0
  648. data/lib/togai_client/models/revenue_info_v2.rb +297 -0
  649. data/lib/togai_client/models/revenue_summary_with_metadata.rb +255 -0
  650. data/lib/togai_client/models/schedule_info.rb +250 -0
  651. data/lib/togai_client/models/schedules_paginated_response.rb +241 -0
  652. data/lib/togai_client/models/setting.rb +340 -0
  653. data/lib/togai_client/models/setting_data_type.rb +42 -0
  654. data/lib/togai_client/models/setting_paginated_response.rb +234 -0
  655. data/lib/togai_client/models/signup_request.rb +0 -11
  656. data/lib/togai_client/models/slab.rb +315 -0
  657. data/lib/togai_client/models/{bundle_strategy.rb → slab_bundle.rb} +33 -94
  658. data/lib/togai_client/models/slab_detail.rb +298 -0
  659. data/lib/togai_client/models/slab_rate.rb +249 -0
  660. data/lib/togai_client/models/slab_revenue.rb +281 -0
  661. data/lib/togai_client/models/slab_revenue_metadata.rb +232 -0
  662. data/lib/togai_client/models/slab_revenue_summary.rb +262 -0
  663. data/lib/togai_client/models/slab_revenue_with_metadata.rb +299 -0
  664. data/lib/togai_client/models/{usage_strategy.rb → slab_usage.rb} +30 -5
  665. data/lib/togai_client/models/token_response.rb +221 -0
  666. data/lib/togai_client/models/topup_wallet_request.rb +222 -0
  667. data/lib/togai_client/models/update_account_request.rb +196 -26
  668. data/lib/togai_client/models/update_account_schedule_v2_request.rb +303 -0
  669. data/lib/togai_client/models/update_add_on_request.rb +264 -0
  670. data/lib/togai_client/models/update_alert_request.rb +274 -0
  671. data/lib/togai_client/models/update_customer_request.rb +36 -58
  672. data/lib/togai_client/models/update_event_schema_request.rb +68 -38
  673. data/lib/togai_client/models/update_feature_credits_request.rb +225 -0
  674. data/lib/togai_client/models/update_feature_request.rb +295 -0
  675. data/lib/togai_client/models/update_incident_status_request.rb +256 -0
  676. data/lib/togai_client/models/update_invoice_group_accounts.rb +252 -0
  677. data/lib/togai_client/models/update_invoice_request.rb +317 -0
  678. data/lib/togai_client/models/update_price_plan_request.rb +81 -34
  679. data/lib/togai_client/models/update_price_plan_v2_request.rb +266 -0
  680. data/lib/togai_client/models/update_pricing_rules_request.rb +216 -0
  681. data/lib/togai_client/models/update_pricing_schedule_request.rb +323 -0
  682. data/lib/togai_client/models/update_pricing_schedule_request_with_actions.rb +343 -0
  683. data/lib/togai_client/models/update_pricing_schedule_response.rb +276 -0
  684. data/lib/togai_client/models/update_proposal_status.rb +256 -0
  685. data/lib/togai_client/models/update_setting_request.rb +255 -0
  686. data/lib/togai_client/models/update_usage_meter_request.rb +105 -50
  687. data/lib/togai_client/models/update_wallet_request.rb +246 -0
  688. data/lib/togai_client/models/usage_config.rb +287 -0
  689. data/lib/togai_client/models/usage_config_lookup_cycle.rb +250 -0
  690. data/lib/togai_client/models/usage_config_lookup_range.rb +273 -0
  691. data/lib/togai_client/models/usage_cycle_interval.rb +43 -0
  692. data/lib/togai_client/models/usage_lookup_range.rb +238 -0
  693. data/lib/togai_client/models/usage_meter.rb +156 -39
  694. data/lib/togai_client/models/usage_meter_aggregation.rb +40 -0
  695. data/lib/togai_client/models/usage_meter_filter_entry.rb +238 -0
  696. data/lib/togai_client/models/usage_meter_paginated_response.rb +14 -19
  697. data/lib/togai_client/models/usage_rate_card.rb +285 -0
  698. data/lib/togai_client/models/user_details.rb +0 -11
  699. data/lib/togai_client/models/validate_entitlement_value_request.rb +222 -0
  700. data/lib/togai_client/models/validated_entity_error.rb +273 -0
  701. data/lib/togai_client/models/validated_entity_errors_paginated_response.rb +232 -0
  702. data/lib/togai_client/models/versions_to_migrate.rb +40 -0
  703. data/lib/togai_client/models/wallet_balance_response.rb +388 -0
  704. data/lib/togai_client/models/wallet_entries_paginated_response.rb +280 -0
  705. data/lib/togai_client/models/wallet_entry.rb +421 -0
  706. data/lib/togai_client/models/wallet_status.rb +40 -0
  707. data/lib/togai_client/models/wallet_topup_details.rb +233 -0
  708. data/lib/togai_client/version.rb +2 -2
  709. data/lib/togai_client.rb +286 -22
  710. data/spec/spec_helper.rb +1 -1
  711. data/togai_client.gemspec +4 -3
  712. metadata +594 -25
  713. data/docs/BundleStrategy.md +0 -24
  714. data/docs/BundleStrategyUsageMetersValue.md +0 -18
  715. data/docs/PricingCycle.md +0 -24
  716. data/docs/RateCardBundle.md +0 -22
  717. data/docs/RateCardUsageValue.md +0 -24
@@ -0,0 +1,264 @@
1
+ =begin
2
+ #Togai Apis
3
+
4
+ #APIs for Togai App
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: engg@togai.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TogaiClient
17
+ class CalculateRevenueResponse
18
+ attr_accessor :currency
19
+
20
+ attr_accessor :usage_lookup_range
21
+
22
+ attr_accessor :price_plan_details
23
+
24
+ attr_accessor :revenue_info
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'currency' => :'currency',
30
+ :'usage_lookup_range' => :'usageLookupRange',
31
+ :'price_plan_details' => :'pricePlanDetails',
32
+ :'revenue_info' => :'revenueInfo'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'currency' => :'String',
45
+ :'usage_lookup_range' => :'UsageLookupRange',
46
+ :'price_plan_details' => :'PricePlanDetails',
47
+ :'revenue_info' => :'Array<RevenueInfo>'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TogaiClient::CalculateRevenueResponse` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TogaiClient::CalculateRevenueResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'currency')
73
+ self.currency = attributes[:'currency']
74
+ else
75
+ self.currency = nil
76
+ end
77
+
78
+ if attributes.key?(:'usage_lookup_range')
79
+ self.usage_lookup_range = attributes[:'usage_lookup_range']
80
+ end
81
+
82
+ if attributes.key?(:'price_plan_details')
83
+ self.price_plan_details = attributes[:'price_plan_details']
84
+ else
85
+ self.price_plan_details = nil
86
+ end
87
+
88
+ if attributes.key?(:'revenue_info')
89
+ if (value = attributes[:'revenue_info']).is_a?(Array)
90
+ self.revenue_info = value
91
+ end
92
+ else
93
+ self.revenue_info = nil
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @currency.nil?
103
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
104
+ end
105
+
106
+ if @price_plan_details.nil?
107
+ invalid_properties.push('invalid value for "price_plan_details", price_plan_details cannot be nil.')
108
+ end
109
+
110
+ if @revenue_info.nil?
111
+ invalid_properties.push('invalid value for "revenue_info", revenue_info cannot be nil.')
112
+ end
113
+
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ return false if @currency.nil?
122
+ return false if @price_plan_details.nil?
123
+ return false if @revenue_info.nil?
124
+ true
125
+ end
126
+
127
+ # Checks equality by comparing each attribute.
128
+ # @param [Object] Object to be compared
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ currency == o.currency &&
133
+ usage_lookup_range == o.usage_lookup_range &&
134
+ price_plan_details == o.price_plan_details &&
135
+ revenue_info == o.revenue_info
136
+ end
137
+
138
+ # @see the `==` method
139
+ # @param [Object] Object to be compared
140
+ def eql?(o)
141
+ self == o
142
+ end
143
+
144
+ # Calculates hash code according to all attributes.
145
+ # @return [Integer] Hash code
146
+ def hash
147
+ [currency, usage_lookup_range, price_plan_details, revenue_info].hash
148
+ end
149
+
150
+ # Builds the object from hash
151
+ # @param [Hash] attributes Model attributes in the form of hash
152
+ # @return [Object] Returns the model itself
153
+ def self.build_from_hash(attributes)
154
+ return nil unless attributes.is_a?(Hash)
155
+ attributes = attributes.transform_keys(&:to_sym)
156
+ transformed_hash = {}
157
+ openapi_types.each_pair do |key, type|
158
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = nil
160
+ elsif type =~ /\AArray<(.*)>/i
161
+ # check to ensure the input is an array given that the attribute
162
+ # is documented as an array but the input is not
163
+ if attributes[attribute_map[key]].is_a?(Array)
164
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
165
+ end
166
+ elsif !attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
168
+ end
169
+ end
170
+ new(transformed_hash)
171
+ end
172
+
173
+ # Deserializes the data based on type
174
+ # @param string type Data type
175
+ # @param string value Value to be deserialized
176
+ # @return [Object] Deserialized data
177
+ def self._deserialize(type, value)
178
+ case type.to_sym
179
+ when :Time
180
+ Time.parse(value)
181
+ when :Date
182
+ Date.parse(value)
183
+ when :String
184
+ value.to_s
185
+ when :Integer
186
+ value.to_i
187
+ when :Float
188
+ value.to_f
189
+ when :Boolean
190
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
191
+ true
192
+ else
193
+ false
194
+ end
195
+ when :Object
196
+ # generic object (usually a Hash), return directly
197
+ value
198
+ when /\AArray<(?<inner_type>.+)>\z/
199
+ inner_type = Regexp.last_match[:inner_type]
200
+ value.map { |v| _deserialize(inner_type, v) }
201
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
202
+ k_type = Regexp.last_match[:k_type]
203
+ v_type = Regexp.last_match[:v_type]
204
+ {}.tap do |hash|
205
+ value.each do |k, v|
206
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
207
+ end
208
+ end
209
+ else # model
210
+ # models (e.g. Pet) or oneOf
211
+ klass = TogaiClient.const_get(type)
212
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
213
+ end
214
+ end
215
+
216
+ # Returns the string representation of the object
217
+ # @return [String] String presentation of the object
218
+ def to_s
219
+ to_hash.to_s
220
+ end
221
+
222
+ # to_body is an alias to to_hash (backward compatibility)
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_body
225
+ to_hash
226
+ end
227
+
228
+ # Returns the object in the form of hash
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_hash
231
+ hash = {}
232
+ self.class.attribute_map.each_pair do |attr, param|
233
+ value = self.send(attr)
234
+ if value.nil?
235
+ is_nullable = self.class.openapi_nullable.include?(attr)
236
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
237
+ end
238
+
239
+ hash[param] = _to_hash(value)
240
+ end
241
+ hash
242
+ end
243
+
244
+ # Outputs non-array value in the form of hash
245
+ # For object, use to_hash. Otherwise, just return the value
246
+ # @param [Object] value Any valid value
247
+ # @return [Hash] Returns the value in the form of hash
248
+ def _to_hash(value)
249
+ if value.is_a?(Array)
250
+ value.compact.map { |v| _to_hash(v) }
251
+ elsif value.is_a?(Hash)
252
+ {}.tap do |hash|
253
+ value.each { |k, v| hash[k] = _to_hash(v) }
254
+ end
255
+ elsif value.respond_to? :to_hash
256
+ value.to_hash
257
+ else
258
+ value
259
+ end
260
+ end
261
+
262
+ end
263
+
264
+ end
@@ -0,0 +1,248 @@
1
+ =begin
2
+ #Togai Apis
3
+
4
+ #APIs for Togai App
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: engg@togai.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TogaiClient
17
+ class CalculateRevenueResponseV2
18
+ attr_accessor :currency
19
+
20
+ attr_accessor :usage_lookup_range
21
+
22
+ attr_accessor :revenue_info
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'currency' => :'currency',
28
+ :'usage_lookup_range' => :'usageLookupRange',
29
+ :'revenue_info' => :'revenueInfo'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'currency' => :'String',
42
+ :'usage_lookup_range' => :'UsageLookupRange',
43
+ :'revenue_info' => :'Array<RevenueInfoV2>'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TogaiClient::CalculateRevenueResponseV2` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TogaiClient::CalculateRevenueResponseV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'currency')
69
+ self.currency = attributes[:'currency']
70
+ else
71
+ self.currency = nil
72
+ end
73
+
74
+ if attributes.key?(:'usage_lookup_range')
75
+ self.usage_lookup_range = attributes[:'usage_lookup_range']
76
+ end
77
+
78
+ if attributes.key?(:'revenue_info')
79
+ if (value = attributes[:'revenue_info']).is_a?(Array)
80
+ self.revenue_info = value
81
+ end
82
+ else
83
+ self.revenue_info = nil
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ if @currency.nil?
93
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
94
+ end
95
+
96
+ if @revenue_info.nil?
97
+ invalid_properties.push('invalid value for "revenue_info", revenue_info cannot be nil.')
98
+ end
99
+
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ return false if @currency.nil?
108
+ return false if @revenue_info.nil?
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ currency == o.currency &&
118
+ usage_lookup_range == o.usage_lookup_range &&
119
+ revenue_info == o.revenue_info
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [currency, usage_lookup_range, revenue_info].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ attributes = attributes.transform_keys(&:to_sym)
140
+ transformed_hash = {}
141
+ openapi_types.each_pair do |key, type|
142
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = nil
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[attribute_map[key]].is_a?(Array)
148
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
+ end
150
+ elsif !attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
+ end
153
+ end
154
+ new(transformed_hash)
155
+ end
156
+
157
+ # Deserializes the data based on type
158
+ # @param string type Data type
159
+ # @param string value Value to be deserialized
160
+ # @return [Object] Deserialized data
161
+ def self._deserialize(type, value)
162
+ case type.to_sym
163
+ when :Time
164
+ Time.parse(value)
165
+ when :Date
166
+ Date.parse(value)
167
+ when :String
168
+ value.to_s
169
+ when :Integer
170
+ value.to_i
171
+ when :Float
172
+ value.to_f
173
+ when :Boolean
174
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
175
+ true
176
+ else
177
+ false
178
+ end
179
+ when :Object
180
+ # generic object (usually a Hash), return directly
181
+ value
182
+ when /\AArray<(?<inner_type>.+)>\z/
183
+ inner_type = Regexp.last_match[:inner_type]
184
+ value.map { |v| _deserialize(inner_type, v) }
185
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
186
+ k_type = Regexp.last_match[:k_type]
187
+ v_type = Regexp.last_match[:v_type]
188
+ {}.tap do |hash|
189
+ value.each do |k, v|
190
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
191
+ end
192
+ end
193
+ else # model
194
+ # models (e.g. Pet) or oneOf
195
+ klass = TogaiClient.const_get(type)
196
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
197
+ end
198
+ end
199
+
200
+ # Returns the string representation of the object
201
+ # @return [String] String presentation of the object
202
+ def to_s
203
+ to_hash.to_s
204
+ end
205
+
206
+ # to_body is an alias to to_hash (backward compatibility)
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_body
209
+ to_hash
210
+ end
211
+
212
+ # Returns the object in the form of hash
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_hash
215
+ hash = {}
216
+ self.class.attribute_map.each_pair do |attr, param|
217
+ value = self.send(attr)
218
+ if value.nil?
219
+ is_nullable = self.class.openapi_nullable.include?(attr)
220
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
221
+ end
222
+
223
+ hash[param] = _to_hash(value)
224
+ end
225
+ hash
226
+ end
227
+
228
+ # Outputs non-array value in the form of hash
229
+ # For object, use to_hash. Otherwise, just return the value
230
+ # @param [Object] value Any valid value
231
+ # @return [Hash] Returns the value in the form of hash
232
+ def _to_hash(value)
233
+ if value.is_a?(Array)
234
+ value.compact.map { |v| _to_hash(v) }
235
+ elsif value.is_a?(Hash)
236
+ {}.tap do |hash|
237
+ value.each { |k, v| hash[k] = _to_hash(v) }
238
+ end
239
+ elsif value.respond_to? :to_hash
240
+ value.to_hash
241
+ else
242
+ value
243
+ end
244
+ end
245
+
246
+ end
247
+
248
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: engg@togai.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.1.0
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -18,18 +18,22 @@ module TogaiClient
18
18
  # Optional identifier describing the matcher and computation pair
19
19
  attr_accessor :id
20
20
 
21
- # Condition to be applied on event. Upon matching it the corresponding computation will be considered for usage_meter unit calculation. The result of the matcher needs to be truthy (https://jsonlogic.com/truthy.html) in order to be considered as a match.
21
+ # Condition to be applied on event. Upon matching it the corresponding computation will be considered for usage_meter unit calculation. The result of the matcher needs to be [truthy](https://jsonlogic.com/truthy.html) in order to be considered as a match.
22
22
  attr_accessor :matcher
23
23
 
24
- # Computation to be applied on an event if it matches the matcher In case of a COUNT aggregation type, computation should be passed as '1'
24
+ # Computation to be applied on an event if it matches the matcher. In case of a COUNT aggregation type, computation should be passed as '1'
25
25
  attr_accessor :computation
26
26
 
27
+ # The order in which multiple matched computations will get evaluated
28
+ attr_accessor :order
29
+
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
28
31
  def self.attribute_map
29
32
  {
30
33
  :'id' => :'id',
31
34
  :'matcher' => :'matcher',
32
- :'computation' => :'computation'
35
+ :'computation' => :'computation',
36
+ :'order' => :'order'
33
37
  }
34
38
  end
35
39
 
@@ -43,7 +47,8 @@ module TogaiClient
43
47
  {
44
48
  :'id' => :'String',
45
49
  :'matcher' => :'String',
46
- :'computation' => :'String'
50
+ :'computation' => :'String',
51
+ :'order' => :'Integer'
47
52
  }
48
53
  end
49
54
 
@@ -78,12 +83,21 @@ module TogaiClient
78
83
 
79
84
  if attributes.key?(:'computation')
80
85
  self.computation = attributes[:'computation']
86
+ else
87
+ self.computation = nil
88
+ end
89
+
90
+ if attributes.key?(:'order')
91
+ self.order = attributes[:'order']
92
+ else
93
+ self.order = nil
81
94
  end
82
95
  end
83
96
 
84
97
  # Show invalid properties with the reasons. Usually used together with valid?
85
98
  # @return Array for valid properties with the reasons
86
99
  def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
101
  invalid_properties = Array.new
88
102
  if !@id.nil? && @id.to_s.length > 50
89
103
  invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 50.')
@@ -101,23 +115,33 @@ module TogaiClient
101
115
  invalid_properties.push('invalid value for "computation", the character length must be smaller than or equal to 500.')
102
116
  end
103
117
 
118
+ if @order.nil?
119
+ invalid_properties.push('invalid value for "order", order cannot be nil.')
120
+ end
121
+
104
122
  invalid_properties
105
123
  end
106
124
 
107
125
  # Check to see if the all the properties in the model are valid
108
126
  # @return true if the model is valid
109
127
  def valid?
128
+ warn '[DEPRECATED] the `valid?` method is obsolete'
110
129
  return false if !@id.nil? && @id.to_s.length > 50
111
130
  return false if !@matcher.nil? && @matcher.to_s.length > 1500
112
131
  return false if @computation.nil?
113
132
  return false if @computation.to_s.length > 500
133
+ return false if @order.nil?
114
134
  true
115
135
  end
116
136
 
117
137
  # Custom attribute writer method with validation
118
138
  # @param [Object] id Value to be assigned
119
139
  def id=(id)
120
- if !id.nil? && id.to_s.length > 50
140
+ if id.nil?
141
+ fail ArgumentError, 'id cannot be nil'
142
+ end
143
+
144
+ if id.to_s.length > 50
121
145
  fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 50.'
122
146
  end
123
147
 
@@ -127,7 +151,11 @@ module TogaiClient
127
151
  # Custom attribute writer method with validation
128
152
  # @param [Object] matcher Value to be assigned
129
153
  def matcher=(matcher)
130
- if !matcher.nil? && matcher.to_s.length > 1500
154
+ if matcher.nil?
155
+ fail ArgumentError, 'matcher cannot be nil'
156
+ end
157
+
158
+ if matcher.to_s.length > 1500
131
159
  fail ArgumentError, 'invalid value for "matcher", the character length must be smaller than or equal to 1500.'
132
160
  end
133
161
 
@@ -155,7 +183,8 @@ module TogaiClient
155
183
  self.class == o.class &&
156
184
  id == o.id &&
157
185
  matcher == o.matcher &&
158
- computation == o.computation
186
+ computation == o.computation &&
187
+ order == o.order
159
188
  end
160
189
 
161
190
  # @see the `==` method
@@ -167,44 +196,37 @@ module TogaiClient
167
196
  # Calculates hash code according to all attributes.
168
197
  # @return [Integer] Hash code
169
198
  def hash
170
- [id, matcher, computation].hash
199
+ [id, matcher, computation, order].hash
171
200
  end
172
201
 
173
202
  # Builds the object from hash
174
203
  # @param [Hash] attributes Model attributes in the form of hash
175
204
  # @return [Object] Returns the model itself
176
205
  def self.build_from_hash(attributes)
177
- new.build_from_hash(attributes)
178
- end
179
-
180
- # Builds the object from hash
181
- # @param [Hash] attributes Model attributes in the form of hash
182
- # @return [Object] Returns the model itself
183
- def build_from_hash(attributes)
184
206
  return nil unless attributes.is_a?(Hash)
185
207
  attributes = attributes.transform_keys(&:to_sym)
186
- self.class.openapi_types.each_pair do |key, type|
187
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
188
- self.send("#{key}=", nil)
208
+ transformed_hash = {}
209
+ openapi_types.each_pair do |key, type|
210
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
211
+ transformed_hash["#{key}"] = nil
189
212
  elsif type =~ /\AArray<(.*)>/i
190
213
  # check to ensure the input is an array given that the attribute
191
214
  # is documented as an array but the input is not
192
- if attributes[self.class.attribute_map[key]].is_a?(Array)
193
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
215
+ if attributes[attribute_map[key]].is_a?(Array)
216
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
217
  end
195
- elsif !attributes[self.class.attribute_map[key]].nil?
196
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
218
+ elsif !attributes[attribute_map[key]].nil?
219
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
220
  end
198
221
  end
199
-
200
- self
222
+ new(transformed_hash)
201
223
  end
202
224
 
203
225
  # Deserializes the data based on type
204
226
  # @param string type Data type
205
227
  # @param string value Value to be deserialized
206
228
  # @return [Object] Deserialized data
207
- def _deserialize(type, value)
229
+ def self._deserialize(type, value)
208
230
  case type.to_sym
209
231
  when :Time
210
232
  Time.parse(value)
@@ -239,7 +261,7 @@ module TogaiClient
239
261
  else # model
240
262
  # models (e.g. Pet) or oneOf
241
263
  klass = TogaiClient.const_get(type)
242
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
264
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
243
265
  end
244
266
  end
245
267