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