solifyn 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (565) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +344 -0
  4. data/Rakefile +10 -0
  5. data/docs/AddCollectionProductsDto.md +18 -0
  6. data/docs/Addon.md +26 -0
  7. data/docs/AddonCreate.md +26 -0
  8. data/docs/AddonUpdate.md +24 -0
  9. data/docs/AffiliateApi.md +845 -0
  10. data/docs/ApiKeyResponseDto.md +34 -0
  11. data/docs/AppPortalUrlResponseDto.md +18 -0
  12. data/docs/BalanceApi.md +184 -0
  13. data/docs/BillingApi.md +68 -0
  14. data/docs/Brand.md +40 -0
  15. data/docs/BrandCreate.md +28 -0
  16. data/docs/BrandUpdate.md +28 -0
  17. data/docs/BrandsApi.md +286 -0
  18. data/docs/Business.md +56 -0
  19. data/docs/BusinessCreate.md +18 -0
  20. data/docs/BusinessFullCreate.md +26 -0
  21. data/docs/BusinessFullCreateResponse.md +20 -0
  22. data/docs/BusinessesApi.md +350 -0
  23. data/docs/ChatApi.md +246 -0
  24. data/docs/CheckoutApi.md +405 -0
  25. data/docs/CheckoutLinkMessageResponseDto.md +18 -0
  26. data/docs/CheckoutLinkResponseDto.md +50 -0
  27. data/docs/CheckoutLinksApi.md +356 -0
  28. data/docs/CheckoutResponseDto.md +22 -0
  29. data/docs/CheckoutSessionDetailsDto.md +38 -0
  30. data/docs/CollectionArchivedResponseDto.md +18 -0
  31. data/docs/CollectionDetailResponseDto.md +36 -0
  32. data/docs/CollectionProductDeletedResponseDto.md +18 -0
  33. data/docs/CollectionProductDto.md +84 -0
  34. data/docs/CollectionProductEntry.md +20 -0
  35. data/docs/CollectionProductRefDto.md +20 -0
  36. data/docs/CollectionProductUpdatedResponseDto.md +18 -0
  37. data/docs/CollectionResponseDto.md +36 -0
  38. data/docs/CollectionUnarchivedResponseDto.md +18 -0
  39. data/docs/CollectionUpdatedResponseDto.md +18 -0
  40. data/docs/CollectionsApi.md +711 -0
  41. data/docs/CommunityApi.md +497 -0
  42. data/docs/CreateApiKeyDto.md +20 -0
  43. data/docs/CreateCheckoutDto.md +36 -0
  44. data/docs/CreateCheckoutLinkDto.md +44 -0
  45. data/docs/CreateCollectionCheckoutDto.md +26 -0
  46. data/docs/CreateCollectionDto.md +26 -0
  47. data/docs/CreateCustomerDto.md +26 -0
  48. data/docs/CreateMeterDto.md +32 -0
  49. data/docs/CreateSetupCheckoutDto.md +26 -0
  50. data/docs/CreateWebhookEndpointDto.md +22 -0
  51. data/docs/CustomerListResponseDto.md +20 -0
  52. data/docs/CustomerMessageResponseDto.md +18 -0
  53. data/docs/CustomerResponseDto.md +38 -0
  54. data/docs/CustomerSharedInviteResponseDto.md +22 -0
  55. data/docs/CustomersApi.md +356 -0
  56. data/docs/DashboardStatsDto.md +24 -0
  57. data/docs/DefaultApi.md +930 -0
  58. data/docs/DeveloperApi.md +628 -0
  59. data/docs/DigitalFileApi.md +187 -0
  60. data/docs/Discount.md +42 -0
  61. data/docs/DiscountCreate.md +36 -0
  62. data/docs/DiscountUpdate.md +34 -0
  63. data/docs/DiscountsApi.md +441 -0
  64. data/docs/DiscountsList200Response.md +24 -0
  65. data/docs/DiscountsList200ResponsePagination.md +22 -0
  66. data/docs/Dispute.md +58 -0
  67. data/docs/DisputeAttachmentDto.md +18 -0
  68. data/docs/DisputeEvidenceDto.md +24 -0
  69. data/docs/DisputeEvidenceUpdate.md +24 -0
  70. data/docs/DisputeFileUpload.md +24 -0
  71. data/docs/DisputeList.md +20 -0
  72. data/docs/DisputeListMetaDto.md +24 -0
  73. data/docs/DisputesApi.md +442 -0
  74. data/docs/Instance.md +30 -0
  75. data/docs/Invoice.md +26 -0
  76. data/docs/License.md +48 -0
  77. data/docs/LicenseApi.md +716 -0
  78. data/docs/LicenseKeysApi.md +716 -0
  79. data/docs/LicenseKeysClientApi.md +289 -0
  80. data/docs/LicenseSubDto.md +30 -0
  81. data/docs/LicenseValidationResponse.md +22 -0
  82. data/docs/LicensesActivateRequest.md +22 -0
  83. data/docs/LicensesCreateRequest.md +26 -0
  84. data/docs/LicensesDeactivate200Response.md +18 -0
  85. data/docs/LicensesDeactivateRequest.md +18 -0
  86. data/docs/LicensesUpdateInstancePostRequest.md +20 -0
  87. data/docs/LicensesUpdateRequest.md +22 -0
  88. data/docs/LicensesVerifyRequest.md +20 -0
  89. data/docs/MeterDetailResponseDto.md +44 -0
  90. data/docs/MeterEventsResponseDto.md +22 -0
  91. data/docs/MeterIngestEventDto.md +28 -0
  92. data/docs/MeterIngestRequestDto.md +18 -0
  93. data/docs/MeterIngestResponseDto.md +22 -0
  94. data/docs/MeterQuantitiesCostDto.md +26 -0
  95. data/docs/MeterQuantitiesResponseDto.md +24 -0
  96. data/docs/MeterResponseDto.md +40 -0
  97. data/docs/MeterUsageEventDto.md +30 -0
  98. data/docs/MetersApi.md +515 -0
  99. data/docs/OperationalWebhookEndpointHeadersInDto.md +18 -0
  100. data/docs/OperationalWebhookEndpointHeadersResponseDto.md +20 -0
  101. data/docs/OperationalWebhookEndpointInDto.md +32 -0
  102. data/docs/OperationalWebhookEndpointListResponseDto.md +24 -0
  103. data/docs/OperationalWebhookEndpointResponseDto.md +38 -0
  104. data/docs/OperationalWebhookEndpointSecretInDto.md +18 -0
  105. data/docs/OperationalWebhookEndpointSecretResponseDto.md +18 -0
  106. data/docs/OperationalWebhookEndpointUpdateDto.md +30 -0
  107. data/docs/Order.md +68 -0
  108. data/docs/OrderBilling.md +26 -0
  109. data/docs/OrderBillingUpdate.md +26 -0
  110. data/docs/OrderCustomer.md +24 -0
  111. data/docs/OrderDetail.md +22 -0
  112. data/docs/OrderList.md +20 -0
  113. data/docs/OrderProductCart.md +26 -0
  114. data/docs/OrderRefund.md +32 -0
  115. data/docs/OrderRefundCreate.md +26 -0
  116. data/docs/OrderUpdate.md +18 -0
  117. data/docs/OrdersApi.md +369 -0
  118. data/docs/PartnerApi.md +125 -0
  119. data/docs/PayoutAccessToken.md +20 -0
  120. data/docs/PayoutAccount.md +22 -0
  121. data/docs/PayoutAccountLink.md +20 -0
  122. data/docs/PayoutMethod.md +24 -0
  123. data/docs/PayoutMethodList.md +18 -0
  124. data/docs/PayoutVerification.md +24 -0
  125. data/docs/PayoutVerificationList.md +18 -0
  126. data/docs/PayoutsApi.md +579 -0
  127. data/docs/PricePreviewResponseDto.md +24 -0
  128. data/docs/Product.md +82 -0
  129. data/docs/ProductAddOnsApi.md +433 -0
  130. data/docs/ProductCreate.md +62 -0
  131. data/docs/ProductCreateAddonsInner.md +26 -0
  132. data/docs/ProductCreateCustomFieldsInner.md +24 -0
  133. data/docs/ProductMessageResponseDto.md +18 -0
  134. data/docs/ProductSubDto.md +22 -0
  135. data/docs/ProductUpdate.md +62 -0
  136. data/docs/ProductsApi.md +445 -0
  137. data/docs/ProductsArchive200Response.md +18 -0
  138. data/docs/ProductsList200Response.md +20 -0
  139. data/docs/ProductsList200ResponsePagination.md +20 -0
  140. data/docs/ProductsUnarchive200Response.md +18 -0
  141. data/docs/Refund.md +42 -0
  142. data/docs/RefundRequestsApi.md +311 -0
  143. data/docs/RefundsChargebacksApi.md +215 -0
  144. data/docs/ResolvedAddon.md +24 -0
  145. data/docs/RevokeSeatDto.md +20 -0
  146. data/docs/Subscription.md +68 -0
  147. data/docs/SubscriptionAction.md +30 -0
  148. data/docs/SubscriptionCompanyDto.md +20 -0
  149. data/docs/SubscriptionDetail.md +24 -0
  150. data/docs/SubscriptionDetailProduct.md +28 -0
  151. data/docs/SubscriptionList.md +20 -0
  152. data/docs/SubscriptionMemberDto.md +18 -0
  153. data/docs/SubscriptionPlanDto.md +20 -0
  154. data/docs/SubscriptionProductDto.md +22 -0
  155. data/docs/SubscriptionSeatAdjustment.md +34 -0
  156. data/docs/SubscriptionUserDto.md +24 -0
  157. data/docs/SubscriptionsAction201Response.md +49 -0
  158. data/docs/SubscriptionsApi.md +223 -0
  159. data/docs/SupportedCurrenciesResponseDto.md +20 -0
  160. data/docs/TicketApi.md +318 -0
  161. data/docs/UpdateCheckoutLinkDto.md +44 -0
  162. data/docs/UpdateCollectionDto.md +22 -0
  163. data/docs/UpdateCollectionProductDto.md +18 -0
  164. data/docs/UpdateCustomerDto.md +24 -0
  165. data/docs/UpdateInstanceDto.md +20 -0
  166. data/docs/UpdateMeterDto.md +32 -0
  167. data/docs/UpdateWebhookEndpointDto.md +24 -0
  168. data/docs/UserPage.md +26 -0
  169. data/docs/UserProfileThemesApi.md +345 -0
  170. data/docs/UserSettings.md +34 -0
  171. data/docs/UserSettingsUpdate.md +76 -0
  172. data/docs/UserStats.md +20 -0
  173. data/docs/UserTheme.md +26 -0
  174. data/docs/UserThemeUpdate.md +22 -0
  175. data/docs/WebhookApi.md +128 -0
  176. data/docs/WebhookDeliveryResponseDto.md +34 -0
  177. data/docs/WebhookDisputePayload.md +42 -0
  178. data/docs/WebhookEndpointApi.md +574 -0
  179. data/docs/WebhookEndpointResponseDto.md +34 -0
  180. data/docs/WebhookLicensePayload.md +48 -0
  181. data/docs/WebhookPaymentPayload.md +116 -0
  182. data/docs/WebhookPaymentPayloadBillingAddress.md +30 -0
  183. data/docs/WebhookRefundPayload.md +38 -0
  184. data/docs/WebhookSubscriptionPayload.md +44 -0
  185. data/docs/WhopApiKeysRotation.md +18 -0
  186. data/docs/Withdrawal.md +46 -0
  187. data/docs/WithdrawalCreate.md +22 -0
  188. data/docs/WithdrawalList.md +20 -0
  189. data/git_push.sh +57 -0
  190. data/lib/solifyn/api/affiliate_api.rb +760 -0
  191. data/lib/solifyn/api/balance_api.rb +175 -0
  192. data/lib/solifyn/api/billing_api.rb +77 -0
  193. data/lib/solifyn/api/brands_api.rb +284 -0
  194. data/lib/solifyn/api/businesses_api.rb +338 -0
  195. data/lib/solifyn/api/chat_api.rb +232 -0
  196. data/lib/solifyn/api/checkout_api.rb +427 -0
  197. data/lib/solifyn/api/checkout_links_api.rb +347 -0
  198. data/lib/solifyn/api/collections_api.rb +690 -0
  199. data/lib/solifyn/api/community_api.rb +466 -0
  200. data/lib/solifyn/api/customers_api.rb +347 -0
  201. data/lib/solifyn/api/default_api.rb +828 -0
  202. data/lib/solifyn/api/developer_api.rb +631 -0
  203. data/lib/solifyn/api/digital_file_api.rb +181 -0
  204. data/lib/solifyn/api/discounts_api.rb +437 -0
  205. data/lib/solifyn/api/disputes_api.rb +424 -0
  206. data/lib/solifyn/api/license_api.rb +702 -0
  207. data/lib/solifyn/api/license_keys_api.rb +702 -0
  208. data/lib/solifyn/api/license_keys_client_api.rb +295 -0
  209. data/lib/solifyn/api/meters_api.rb +508 -0
  210. data/lib/solifyn/api/orders_api.rb +372 -0
  211. data/lib/solifyn/api/partner_api.rb +124 -0
  212. data/lib/solifyn/api/payouts_api.rb +520 -0
  213. data/lib/solifyn/api/product_add_ons_api.rb +432 -0
  214. data/lib/solifyn/api/products_api.rb +438 -0
  215. data/lib/solifyn/api/refund_requests_api.rb +305 -0
  216. data/lib/solifyn/api/refunds_chargebacks_api.rb +214 -0
  217. data/lib/solifyn/api/subscriptions_api.rb +230 -0
  218. data/lib/solifyn/api/ticket_api.rb +328 -0
  219. data/lib/solifyn/api/user_profile_themes_api.rb +313 -0
  220. data/lib/solifyn/api/webhook_api.rb +131 -0
  221. data/lib/solifyn/api/webhook_endpoint_api.rb +597 -0
  222. data/lib/solifyn/api_client.rb +394 -0
  223. data/lib/solifyn/api_error.rb +58 -0
  224. data/lib/solifyn/configuration.rb +313 -0
  225. data/lib/solifyn/models/add_collection_products_dto.rb +224 -0
  226. data/lib/solifyn/models/addon.rb +290 -0
  227. data/lib/solifyn/models/addon_create.rb +276 -0
  228. data/lib/solifyn/models/addon_update.rb +245 -0
  229. data/lib/solifyn/models/api_key_response_dto.rb +336 -0
  230. data/lib/solifyn/models/app_portal_url_response_dto.rb +221 -0
  231. data/lib/solifyn/models/brand.rb +367 -0
  232. data/lib/solifyn/models/brand_create.rb +310 -0
  233. data/lib/solifyn/models/brand_update.rb +303 -0
  234. data/lib/solifyn/models/business.rb +482 -0
  235. data/lib/solifyn/models/business_create.rb +241 -0
  236. data/lib/solifyn/models/business_full_create.rb +288 -0
  237. data/lib/solifyn/models/business_full_create_response.rb +239 -0
  238. data/lib/solifyn/models/checkout_link_message_response_dto.rb +222 -0
  239. data/lib/solifyn/models/checkout_link_response_dto.rb +410 -0
  240. data/lib/solifyn/models/checkout_response_dto.rb +256 -0
  241. data/lib/solifyn/models/checkout_session_details_dto.rb +350 -0
  242. data/lib/solifyn/models/collection_archived_response_dto.rb +222 -0
  243. data/lib/solifyn/models/collection_detail_response_dto.rb +390 -0
  244. data/lib/solifyn/models/collection_product_deleted_response_dto.rb +222 -0
  245. data/lib/solifyn/models/collection_product_dto.rb +826 -0
  246. data/lib/solifyn/models/collection_product_entry.rb +258 -0
  247. data/lib/solifyn/models/collection_product_ref_dto.rb +239 -0
  248. data/lib/solifyn/models/collection_product_updated_response_dto.rb +222 -0
  249. data/lib/solifyn/models/collection_response_dto.rb +390 -0
  250. data/lib/solifyn/models/collection_unarchived_response_dto.rb +222 -0
  251. data/lib/solifyn/models/collection_updated_response_dto.rb +222 -0
  252. data/lib/solifyn/models/create_api_key_dto.rb +234 -0
  253. data/lib/solifyn/models/create_checkout_dto.rb +314 -0
  254. data/lib/solifyn/models/create_checkout_link_dto.rb +582 -0
  255. data/lib/solifyn/models/create_collection_checkout_dto.rb +264 -0
  256. data/lib/solifyn/models/create_collection_dto.rb +305 -0
  257. data/lib/solifyn/models/create_customer_dto.rb +345 -0
  258. data/lib/solifyn/models/create_meter_dto.rb +344 -0
  259. data/lib/solifyn/models/create_setup_checkout_dto.rb +264 -0
  260. data/lib/solifyn/models/create_webhook_endpoint_dto.rb +251 -0
  261. data/lib/solifyn/models/customer_list_response_dto.rb +241 -0
  262. data/lib/solifyn/models/customer_message_response_dto.rb +222 -0
  263. data/lib/solifyn/models/customer_response_dto.rb +350 -0
  264. data/lib/solifyn/models/customer_shared_invite_response_dto.rb +249 -0
  265. data/lib/solifyn/models/dashboard_stats_dto.rb +273 -0
  266. data/lib/solifyn/models/discount.rb +466 -0
  267. data/lib/solifyn/models/discount_create.rb +362 -0
  268. data/lib/solifyn/models/discount_update.rb +331 -0
  269. data/lib/solifyn/models/discounts_list200_response.rb +273 -0
  270. data/lib/solifyn/models/discounts_list200_response_pagination.rb +256 -0
  271. data/lib/solifyn/models/dispute.rb +492 -0
  272. data/lib/solifyn/models/dispute_attachment_dto.rb +222 -0
  273. data/lib/solifyn/models/dispute_evidence_dto.rb +245 -0
  274. data/lib/solifyn/models/dispute_evidence_update.rb +245 -0
  275. data/lib/solifyn/models/dispute_file_upload.rb +259 -0
  276. data/lib/solifyn/models/dispute_list.rb +241 -0
  277. data/lib/solifyn/models/dispute_list_meta_dto.rb +273 -0
  278. data/lib/solifyn/models/instance.rb +325 -0
  279. data/lib/solifyn/models/invoice.rb +291 -0
  280. data/lib/solifyn/models/license.rb +512 -0
  281. data/lib/solifyn/models/license_sub_dto.rb +310 -0
  282. data/lib/solifyn/models/license_validation_response.rb +253 -0
  283. data/lib/solifyn/models/licenses_activate_request.rb +256 -0
  284. data/lib/solifyn/models/licenses_create_request.rb +269 -0
  285. data/lib/solifyn/models/licenses_deactivate200_response.rb +214 -0
  286. data/lib/solifyn/models/licenses_deactivate_request.rb +222 -0
  287. data/lib/solifyn/models/licenses_update_instance_post_request.rb +225 -0
  288. data/lib/solifyn/models/licenses_update_request.rb +266 -0
  289. data/lib/solifyn/models/licenses_verify_request.rb +239 -0
  290. data/lib/solifyn/models/meter_detail_response_dto.rb +454 -0
  291. data/lib/solifyn/models/meter_events_response_dto.rb +259 -0
  292. data/lib/solifyn/models/meter_ingest_event_dto.rb +290 -0
  293. data/lib/solifyn/models/meter_ingest_request_dto.rb +224 -0
  294. data/lib/solifyn/models/meter_ingest_response_dto.rb +258 -0
  295. data/lib/solifyn/models/meter_quantities_cost_dto.rb +290 -0
  296. data/lib/solifyn/models/meter_quantities_response_dto.rb +276 -0
  297. data/lib/solifyn/models/meter_response_dto.rb +418 -0
  298. data/lib/solifyn/models/meter_usage_event_dto.rb +319 -0
  299. data/lib/solifyn/models/operational_webhook_endpoint_headers_in_dto.rb +222 -0
  300. data/lib/solifyn/models/operational_webhook_endpoint_headers_response_dto.rb +241 -0
  301. data/lib/solifyn/models/operational_webhook_endpoint_in_dto.rb +315 -0
  302. data/lib/solifyn/models/operational_webhook_endpoint_list_response_dto.rb +257 -0
  303. data/lib/solifyn/models/operational_webhook_endpoint_response_dto.rb +363 -0
  304. data/lib/solifyn/models/operational_webhook_endpoint_secret_in_dto.rb +215 -0
  305. data/lib/solifyn/models/operational_webhook_endpoint_secret_response_dto.rb +221 -0
  306. data/lib/solifyn/models/operational_webhook_endpoint_update_dto.rb +303 -0
  307. data/lib/solifyn/models/order.rb +582 -0
  308. data/lib/solifyn/models/order_billing.rb +255 -0
  309. data/lib/solifyn/models/order_billing_update.rb +250 -0
  310. data/lib/solifyn/models/order_customer.rb +266 -0
  311. data/lib/solifyn/models/order_detail.rb +237 -0
  312. data/lib/solifyn/models/order_list.rb +241 -0
  313. data/lib/solifyn/models/order_product_cart.rb +283 -0
  314. data/lib/solifyn/models/order_refund.rb +334 -0
  315. data/lib/solifyn/models/order_refund_create.rb +278 -0
  316. data/lib/solifyn/models/order_update.rb +214 -0
  317. data/lib/solifyn/models/payout_access_token.rb +239 -0
  318. data/lib/solifyn/models/payout_account.rb +249 -0
  319. data/lib/solifyn/models/payout_account_link.rb +239 -0
  320. data/lib/solifyn/models/payout_method.rb +266 -0
  321. data/lib/solifyn/models/payout_method_list.rb +224 -0
  322. data/lib/solifyn/models/payout_verification.rb +266 -0
  323. data/lib/solifyn/models/payout_verification_list.rb +224 -0
  324. data/lib/solifyn/models/price_preview_response_dto.rb +273 -0
  325. data/lib/solifyn/models/product.rb +810 -0
  326. data/lib/solifyn/models/product_create.rb +527 -0
  327. data/lib/solifyn/models/product_create_addons_inner.rb +250 -0
  328. data/lib/solifyn/models/product_create_custom_fields_inner.rb +241 -0
  329. data/lib/solifyn/models/product_message_response_dto.rb +222 -0
  330. data/lib/solifyn/models/product_sub_dto.rb +253 -0
  331. data/lib/solifyn/models/product_update.rb +501 -0
  332. data/lib/solifyn/models/products_archive200_response.rb +214 -0
  333. data/lib/solifyn/models/products_list200_response.rb +239 -0
  334. data/lib/solifyn/models/products_list200_response_pagination.rb +239 -0
  335. data/lib/solifyn/models/products_unarchive200_response.rb +214 -0
  336. data/lib/solifyn/models/refund.rb +425 -0
  337. data/lib/solifyn/models/resolved_addon.rb +273 -0
  338. data/lib/solifyn/models/revoke_seat_dto.rb +239 -0
  339. data/lib/solifyn/models/subscription.rb +627 -0
  340. data/lib/solifyn/models/subscription_action.rb +392 -0
  341. data/lib/solifyn/models/subscription_company_dto.rb +239 -0
  342. data/lib/solifyn/models/subscription_detail.rb +278 -0
  343. data/lib/solifyn/models/subscription_detail_product.rb +300 -0
  344. data/lib/solifyn/models/subscription_list.rb +241 -0
  345. data/lib/solifyn/models/subscription_member_dto.rb +222 -0
  346. data/lib/solifyn/models/subscription_plan_dto.rb +232 -0
  347. data/lib/solifyn/models/subscription_product_dto.rb +249 -0
  348. data/lib/solifyn/models/subscription_seat_adjustment.rb +359 -0
  349. data/lib/solifyn/models/subscription_user_dto.rb +273 -0
  350. data/lib/solifyn/models/subscriptions_action201_response.rb +105 -0
  351. data/lib/solifyn/models/supported_currencies_response_dto.rb +239 -0
  352. data/lib/solifyn/models/update_checkout_link_dto.rb +575 -0
  353. data/lib/solifyn/models/update_collection_dto.rb +235 -0
  354. data/lib/solifyn/models/update_collection_product_dto.rb +241 -0
  355. data/lib/solifyn/models/update_customer_dto.rb +302 -0
  356. data/lib/solifyn/models/update_instance_dto.rb +225 -0
  357. data/lib/solifyn/models/update_meter_dto.rb +321 -0
  358. data/lib/solifyn/models/update_webhook_endpoint_dto.rb +281 -0
  359. data/lib/solifyn/models/user_page.rb +290 -0
  360. data/lib/solifyn/models/user_settings.rb +337 -0
  361. data/lib/solifyn/models/user_settings_update.rb +505 -0
  362. data/lib/solifyn/models/user_stats.rb +241 -0
  363. data/lib/solifyn/models/user_theme.rb +276 -0
  364. data/lib/solifyn/models/user_theme_update.rb +235 -0
  365. data/lib/solifyn/models/webhook_delivery_response_dto.rb +328 -0
  366. data/lib/solifyn/models/webhook_dispute_payload.rb +324 -0
  367. data/lib/solifyn/models/webhook_endpoint_response_dto.rb +339 -0
  368. data/lib/solifyn/models/webhook_license_payload.rb +512 -0
  369. data/lib/solifyn/models/webhook_payment_payload.rb +659 -0
  370. data/lib/solifyn/models/webhook_payment_payload_billing_address.rb +268 -0
  371. data/lib/solifyn/models/webhook_refund_payload.rb +306 -0
  372. data/lib/solifyn/models/webhook_subscription_payload.rb +333 -0
  373. data/lib/solifyn/models/whop_api_keys_rotation.rb +222 -0
  374. data/lib/solifyn/models/withdrawal.rb +411 -0
  375. data/lib/solifyn/models/withdrawal_create.rb +249 -0
  376. data/lib/solifyn/models/withdrawal_list.rb +241 -0
  377. data/lib/solifyn/version.rb +15 -0
  378. data/lib/solifyn.rb +191 -0
  379. data/solifyn.gemspec +39 -0
  380. data/spec/api/affiliate_api_spec.rb +165 -0
  381. data/spec/api/balance_api_spec.rb +62 -0
  382. data/spec/api/billing_api_spec.rb +46 -0
  383. data/spec/api/brands_api_spec.rb +83 -0
  384. data/spec/api/businesses_api_spec.rb +93 -0
  385. data/spec/api/chat_api_spec.rb +72 -0
  386. data/spec/api/checkout_api_spec.rb +99 -0
  387. data/spec/api/checkout_links_api_spec.rb +95 -0
  388. data/spec/api/collections_api_spec.rb +158 -0
  389. data/spec/api/community_api_spec.rb +113 -0
  390. data/spec/api/customers_api_spec.rb +95 -0
  391. data/spec/api/default_api_spec.rb +191 -0
  392. data/spec/api/developer_api_spec.rb +120 -0
  393. data/spec/api/digital_file_api_spec.rb +63 -0
  394. data/spec/api/discounts_api_spec.rb +113 -0
  395. data/spec/api/disputes_api_spec.rb +113 -0
  396. data/spec/api/license_api_spec.rb +160 -0
  397. data/spec/api/license_keys_api_spec.rb +160 -0
  398. data/spec/api/license_keys_client_api_spec.rb +84 -0
  399. data/spec/api/meters_api_spec.rb +125 -0
  400. data/spec/api/orders_api_spec.rb +103 -0
  401. data/spec/api/partner_api_spec.rb +53 -0
  402. data/spec/api/payouts_api_spec.rb +133 -0
  403. data/spec/api/product_add_ons_api_spec.rb +111 -0
  404. data/spec/api/products_api_spec.rb +115 -0
  405. data/spec/api/refund_requests_api_spec.rb +88 -0
  406. data/spec/api/refunds_chargebacks_api_spec.rb +71 -0
  407. data/spec/api/subscriptions_api_spec.rb +73 -0
  408. data/spec/api/ticket_api_spec.rb +86 -0
  409. data/spec/api/user_profile_themes_api_spec.rb +91 -0
  410. data/spec/api/webhook_api_spec.rb +54 -0
  411. data/spec/api/webhook_endpoint_api_spec.rb +136 -0
  412. data/spec/models/add_collection_products_dto_spec.rb +36 -0
  413. data/spec/models/addon_create_spec.rb +60 -0
  414. data/spec/models/addon_spec.rb +60 -0
  415. data/spec/models/addon_update_spec.rb +54 -0
  416. data/spec/models/api_key_response_dto_spec.rb +84 -0
  417. data/spec/models/app_portal_url_response_dto_spec.rb +36 -0
  418. data/spec/models/brand_create_spec.rb +66 -0
  419. data/spec/models/brand_spec.rb +102 -0
  420. data/spec/models/brand_update_spec.rb +66 -0
  421. data/spec/models/business_create_spec.rb +36 -0
  422. data/spec/models/business_full_create_response_spec.rb +42 -0
  423. data/spec/models/business_full_create_spec.rb +60 -0
  424. data/spec/models/business_spec.rb +150 -0
  425. data/spec/models/checkout_link_message_response_dto_spec.rb +36 -0
  426. data/spec/models/checkout_link_response_dto_spec.rb +132 -0
  427. data/spec/models/checkout_response_dto_spec.rb +48 -0
  428. data/spec/models/checkout_session_details_dto_spec.rb +96 -0
  429. data/spec/models/collection_archived_response_dto_spec.rb +36 -0
  430. data/spec/models/collection_detail_response_dto_spec.rb +94 -0
  431. data/spec/models/collection_product_deleted_response_dto_spec.rb +36 -0
  432. data/spec/models/collection_product_dto_spec.rb +236 -0
  433. data/spec/models/collection_product_entry_spec.rb +42 -0
  434. data/spec/models/collection_product_ref_dto_spec.rb +42 -0
  435. data/spec/models/collection_product_updated_response_dto_spec.rb +36 -0
  436. data/spec/models/collection_response_dto_spec.rb +94 -0
  437. data/spec/models/collection_unarchived_response_dto_spec.rb +36 -0
  438. data/spec/models/collection_updated_response_dto_spec.rb +36 -0
  439. data/spec/models/create_api_key_dto_spec.rb +42 -0
  440. data/spec/models/create_checkout_dto_spec.rb +90 -0
  441. data/spec/models/create_checkout_link_dto_spec.rb +114 -0
  442. data/spec/models/create_collection_checkout_dto_spec.rb +60 -0
  443. data/spec/models/create_collection_dto_spec.rb +64 -0
  444. data/spec/models/create_customer_dto_spec.rb +60 -0
  445. data/spec/models/create_meter_dto_spec.rb +82 -0
  446. data/spec/models/create_setup_checkout_dto_spec.rb +60 -0
  447. data/spec/models/create_webhook_endpoint_dto_spec.rb +48 -0
  448. data/spec/models/customer_list_response_dto_spec.rb +42 -0
  449. data/spec/models/customer_message_response_dto_spec.rb +36 -0
  450. data/spec/models/customer_response_dto_spec.rb +96 -0
  451. data/spec/models/customer_shared_invite_response_dto_spec.rb +48 -0
  452. data/spec/models/dashboard_stats_dto_spec.rb +54 -0
  453. data/spec/models/discount_create_spec.rb +94 -0
  454. data/spec/models/discount_spec.rb +116 -0
  455. data/spec/models/discount_update_spec.rb +88 -0
  456. data/spec/models/discounts_list200_response_pagination_spec.rb +48 -0
  457. data/spec/models/discounts_list200_response_spec.rb +54 -0
  458. data/spec/models/dispute_attachment_dto_spec.rb +36 -0
  459. data/spec/models/dispute_evidence_dto_spec.rb +54 -0
  460. data/spec/models/dispute_evidence_update_spec.rb +54 -0
  461. data/spec/models/dispute_file_upload_spec.rb +54 -0
  462. data/spec/models/dispute_list_meta_dto_spec.rb +54 -0
  463. data/spec/models/dispute_list_spec.rb +42 -0
  464. data/spec/models/dispute_spec.rb +156 -0
  465. data/spec/models/instance_spec.rb +72 -0
  466. data/spec/models/invoice_spec.rb +60 -0
  467. data/spec/models/license_spec.rb +130 -0
  468. data/spec/models/license_sub_dto_spec.rb +72 -0
  469. data/spec/models/license_validation_response_spec.rb +48 -0
  470. data/spec/models/licenses_activate_request_spec.rb +48 -0
  471. data/spec/models/licenses_create_request_spec.rb +60 -0
  472. data/spec/models/licenses_deactivate200_response_spec.rb +36 -0
  473. data/spec/models/licenses_deactivate_request_spec.rb +36 -0
  474. data/spec/models/licenses_update_instance_post_request_spec.rb +42 -0
  475. data/spec/models/licenses_update_request_spec.rb +52 -0
  476. data/spec/models/licenses_verify_request_spec.rb +42 -0
  477. data/spec/models/meter_detail_response_dto_spec.rb +118 -0
  478. data/spec/models/meter_events_response_dto_spec.rb +48 -0
  479. data/spec/models/meter_ingest_event_dto_spec.rb +66 -0
  480. data/spec/models/meter_ingest_request_dto_spec.rb +36 -0
  481. data/spec/models/meter_ingest_response_dto_spec.rb +48 -0
  482. data/spec/models/meter_quantities_cost_dto_spec.rb +60 -0
  483. data/spec/models/meter_quantities_response_dto_spec.rb +54 -0
  484. data/spec/models/meter_response_dto_spec.rb +106 -0
  485. data/spec/models/meter_usage_event_dto_spec.rb +72 -0
  486. data/spec/models/operational_webhook_endpoint_headers_in_dto_spec.rb +36 -0
  487. data/spec/models/operational_webhook_endpoint_headers_response_dto_spec.rb +42 -0
  488. data/spec/models/operational_webhook_endpoint_in_dto_spec.rb +78 -0
  489. data/spec/models/operational_webhook_endpoint_list_response_dto_spec.rb +54 -0
  490. data/spec/models/operational_webhook_endpoint_response_dto_spec.rb +96 -0
  491. data/spec/models/operational_webhook_endpoint_secret_in_dto_spec.rb +36 -0
  492. data/spec/models/operational_webhook_endpoint_secret_response_dto_spec.rb +36 -0
  493. data/spec/models/operational_webhook_endpoint_update_dto_spec.rb +72 -0
  494. data/spec/models/order_billing_spec.rb +60 -0
  495. data/spec/models/order_billing_update_spec.rb +60 -0
  496. data/spec/models/order_customer_spec.rb +54 -0
  497. data/spec/models/order_detail_spec.rb +48 -0
  498. data/spec/models/order_list_spec.rb +42 -0
  499. data/spec/models/order_product_cart_spec.rb +60 -0
  500. data/spec/models/order_refund_create_spec.rb +60 -0
  501. data/spec/models/order_refund_spec.rb +78 -0
  502. data/spec/models/order_spec.rb +180 -0
  503. data/spec/models/order_update_spec.rb +36 -0
  504. data/spec/models/payout_access_token_spec.rb +42 -0
  505. data/spec/models/payout_account_link_spec.rb +42 -0
  506. data/spec/models/payout_account_spec.rb +48 -0
  507. data/spec/models/payout_method_list_spec.rb +36 -0
  508. data/spec/models/payout_method_spec.rb +54 -0
  509. data/spec/models/payout_verification_list_spec.rb +36 -0
  510. data/spec/models/payout_verification_spec.rb +54 -0
  511. data/spec/models/price_preview_response_dto_spec.rb +54 -0
  512. data/spec/models/product_create_addons_inner_spec.rb +60 -0
  513. data/spec/models/product_create_custom_fields_inner_spec.rb +54 -0
  514. data/spec/models/product_create_spec.rb +170 -0
  515. data/spec/models/product_message_response_dto_spec.rb +36 -0
  516. data/spec/models/product_spec.rb +230 -0
  517. data/spec/models/product_sub_dto_spec.rb +48 -0
  518. data/spec/models/product_update_spec.rb +170 -0
  519. data/spec/models/products_archive200_response_spec.rb +36 -0
  520. data/spec/models/products_list200_response_pagination_spec.rb +42 -0
  521. data/spec/models/products_list200_response_spec.rb +42 -0
  522. data/spec/models/products_unarchive200_response_spec.rb +36 -0
  523. data/spec/models/refund_spec.rb +112 -0
  524. data/spec/models/resolved_addon_spec.rb +54 -0
  525. data/spec/models/revoke_seat_dto_spec.rb +42 -0
  526. data/spec/models/subscription_action_spec.rb +80 -0
  527. data/spec/models/subscription_company_dto_spec.rb +42 -0
  528. data/spec/models/subscription_detail_product_spec.rb +66 -0
  529. data/spec/models/subscription_detail_spec.rb +54 -0
  530. data/spec/models/subscription_list_spec.rb +42 -0
  531. data/spec/models/subscription_member_dto_spec.rb +36 -0
  532. data/spec/models/subscription_plan_dto_spec.rb +42 -0
  533. data/spec/models/subscription_product_dto_spec.rb +48 -0
  534. data/spec/models/subscription_seat_adjustment_spec.rb +84 -0
  535. data/spec/models/subscription_spec.rb +186 -0
  536. data/spec/models/subscription_user_dto_spec.rb +54 -0
  537. data/spec/models/subscriptions_action201_response_spec.rb +32 -0
  538. data/spec/models/supported_currencies_response_dto_spec.rb +42 -0
  539. data/spec/models/update_checkout_link_dto_spec.rb +114 -0
  540. data/spec/models/update_collection_dto_spec.rb +48 -0
  541. data/spec/models/update_collection_product_dto_spec.rb +36 -0
  542. data/spec/models/update_customer_dto_spec.rb +54 -0
  543. data/spec/models/update_instance_dto_spec.rb +42 -0
  544. data/spec/models/update_meter_dto_spec.rb +82 -0
  545. data/spec/models/update_webhook_endpoint_dto_spec.rb +58 -0
  546. data/spec/models/user_page_spec.rb +60 -0
  547. data/spec/models/user_settings_spec.rb +84 -0
  548. data/spec/models/user_settings_update_spec.rb +210 -0
  549. data/spec/models/user_stats_spec.rb +42 -0
  550. data/spec/models/user_theme_spec.rb +60 -0
  551. data/spec/models/user_theme_update_spec.rb +48 -0
  552. data/spec/models/webhook_delivery_response_dto_spec.rb +84 -0
  553. data/spec/models/webhook_dispute_payload_spec.rb +108 -0
  554. data/spec/models/webhook_endpoint_response_dto_spec.rb +84 -0
  555. data/spec/models/webhook_license_payload_spec.rb +130 -0
  556. data/spec/models/webhook_payment_payload_billing_address_spec.rb +72 -0
  557. data/spec/models/webhook_payment_payload_spec.rb +330 -0
  558. data/spec/models/webhook_refund_payload_spec.rb +96 -0
  559. data/spec/models/webhook_subscription_payload_spec.rb +114 -0
  560. data/spec/models/whop_api_keys_rotation_spec.rb +36 -0
  561. data/spec/models/withdrawal_create_spec.rb +48 -0
  562. data/spec/models/withdrawal_list_spec.rb +42 -0
  563. data/spec/models/withdrawal_spec.rb +120 -0
  564. data/spec/spec_helper.rb +111 -0
  565. metadata +831 -0
@@ -0,0 +1,810 @@
1
+ =begin
2
+ #Solifyn API
3
+
4
+ #Welcome to the Solifyn API Reference. Leverage our secure endpoints to manage products and issue, validate, and manage software license keys programmatically.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
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 Solifyn
17
+ # Represents a product item created under your business, containing core pricing, status, license behavior, subscription settings, and metadata details.
18
+ class Product
19
+ # The unique identifier (ID) of the product.
20
+ attr_accessor :id
21
+
22
+ # The display name of the product.
23
+ attr_accessor :name
24
+
25
+ # The price amount of the product (e.g. 29.00).
26
+ attr_accessor :price
27
+
28
+ # The three-letter ISO currency code (e.g. USD, VND, EUR).
29
+ attr_accessor :currency
30
+
31
+ # A comprehensive rich text description of the product.
32
+ attr_accessor :description
33
+
34
+ # The lifecycle status of the product (e.g. ACTIVE, ARCHIVED).
35
+ attr_accessor :status
36
+
37
+ # URL of the product cover image.
38
+ attr_accessor :image_url
39
+
40
+ # The tax classification for the product.
41
+ attr_accessor :tax_category
42
+
43
+ # Pricing model of the product.
44
+ attr_accessor :pricing_type
45
+
46
+ # Discount value as a percentage or fixed amount.
47
+ attr_accessor :discount
48
+
49
+ # Indicates if the product issues a cryptographically secure software license key upon checkout completion.
50
+ attr_accessor :has_license_key
51
+
52
+ # Whether the product includes digital file downloads upon purchase.
53
+ attr_accessor :has_digital_delivery
54
+
55
+ # Whether the product price already includes applicable sales taxes.
56
+ attr_accessor :is_tax_inclusive
57
+
58
+ # The subscription billing cycle interval in days (for subscription products).
59
+ attr_accessor :billing_period
60
+
61
+ # Trial duration in days for subscription products.
62
+ attr_accessor :trial_period_days
63
+
64
+ # Automatic expiration period in days for the subscription entitlement.
65
+ attr_accessor :expiration_days
66
+
67
+ # Custom text displayed on customer credit card statements for purchases of this product.
68
+ attr_accessor :statement_descriptor
69
+
70
+ # Indicates if customers are allowed to enter a custom pricing amount at checkout.
71
+ attr_accessor :pay_what_you_want
72
+
73
+ # Custom developer metadata key-value pairs associated with the product.
74
+ attr_accessor :metadata
75
+
76
+ # Custom form field questions to ask the customer during checkout.
77
+ attr_accessor :custom_fields
78
+
79
+ # Available stock quantity, or null for unlimited inventory.
80
+ attr_accessor :stock
81
+
82
+ # Maximum number of simultaneous active instances/devices allowed per issued license key (applicable if hasLicenseKey is true).
83
+ attr_accessor :activation_limit
84
+
85
+ # Defines if the product is listed publicly on the merchant's storefront template.
86
+ attr_accessor :is_listed
87
+
88
+ # Whether the product is free.
89
+ attr_accessor :is_free
90
+
91
+ # Timestamp indicating exactly when the product was created.
92
+ attr_accessor :created_at
93
+
94
+ # Timestamp indicating when the product was last modified.
95
+ attr_accessor :updated_at
96
+
97
+ # Indicates if the product has been permanently deleted.
98
+ attr_accessor :is_permanently_deleted
99
+
100
+ # Optional brand identifier.
101
+ attr_accessor :brand_id
102
+
103
+ # Secure link for digital delivery.
104
+ attr_accessor :digital_link
105
+
106
+ # Special instructions provided upon purchase.
107
+ attr_accessor :instructions
108
+
109
+ # Custom message displayed when a license key is activated.
110
+ attr_accessor :activation_message
111
+
112
+ # Number of hours until the license key expires.
113
+ attr_accessor :expiry_hours
114
+
115
+ # The unique identifier of the business owning this product.
116
+ attr_accessor :business_id
117
+
118
+ class EnumAttributeValidator
119
+ attr_reader :datatype
120
+ attr_reader :allowable_values
121
+
122
+ def initialize(datatype, allowable_values)
123
+ @allowable_values = allowable_values.map do |value|
124
+ case datatype.to_s
125
+ when /Integer/i
126
+ value.to_i
127
+ when /Float/i
128
+ value.to_f
129
+ else
130
+ value
131
+ end
132
+ end
133
+ end
134
+
135
+ def valid?(value)
136
+ !value || allowable_values.include?(value)
137
+ end
138
+ end
139
+
140
+ # Attribute mapping from ruby-style variable name to JSON key.
141
+ def self.attribute_map
142
+ {
143
+ :'id' => :'id',
144
+ :'name' => :'name',
145
+ :'price' => :'price',
146
+ :'currency' => :'currency',
147
+ :'description' => :'description',
148
+ :'status' => :'status',
149
+ :'image_url' => :'imageUrl',
150
+ :'tax_category' => :'taxCategory',
151
+ :'pricing_type' => :'pricingType',
152
+ :'discount' => :'discount',
153
+ :'has_license_key' => :'hasLicenseKey',
154
+ :'has_digital_delivery' => :'hasDigitalDelivery',
155
+ :'is_tax_inclusive' => :'isTaxInclusive',
156
+ :'billing_period' => :'billingPeriod',
157
+ :'trial_period_days' => :'trialPeriodDays',
158
+ :'expiration_days' => :'expirationDays',
159
+ :'statement_descriptor' => :'statementDescriptor',
160
+ :'pay_what_you_want' => :'payWhatYouWant',
161
+ :'metadata' => :'metadata',
162
+ :'custom_fields' => :'customFields',
163
+ :'stock' => :'stock',
164
+ :'activation_limit' => :'activationLimit',
165
+ :'is_listed' => :'isListed',
166
+ :'is_free' => :'isFree',
167
+ :'created_at' => :'createdAt',
168
+ :'updated_at' => :'updatedAt',
169
+ :'is_permanently_deleted' => :'isPermanentlyDeleted',
170
+ :'brand_id' => :'brandId',
171
+ :'digital_link' => :'digitalLink',
172
+ :'instructions' => :'instructions',
173
+ :'activation_message' => :'activationMessage',
174
+ :'expiry_hours' => :'expiryHours',
175
+ :'business_id' => :'businessId'
176
+ }
177
+ end
178
+
179
+ # Returns all the JSON keys this model knows about
180
+ def self.acceptable_attributes
181
+ attribute_map.values
182
+ end
183
+
184
+ # Attribute type mapping.
185
+ def self.openapi_types
186
+ {
187
+ :'id' => :'String',
188
+ :'name' => :'String',
189
+ :'price' => :'Float',
190
+ :'currency' => :'String',
191
+ :'description' => :'String',
192
+ :'status' => :'String',
193
+ :'image_url' => :'String',
194
+ :'tax_category' => :'String',
195
+ :'pricing_type' => :'String',
196
+ :'discount' => :'Float',
197
+ :'has_license_key' => :'Boolean',
198
+ :'has_digital_delivery' => :'Boolean',
199
+ :'is_tax_inclusive' => :'Boolean',
200
+ :'billing_period' => :'Integer',
201
+ :'trial_period_days' => :'Integer',
202
+ :'expiration_days' => :'Integer',
203
+ :'statement_descriptor' => :'String',
204
+ :'pay_what_you_want' => :'Boolean',
205
+ :'metadata' => :'Hash<String, String>',
206
+ :'custom_fields' => :'Array<Object>',
207
+ :'stock' => :'Integer',
208
+ :'activation_limit' => :'Integer',
209
+ :'is_listed' => :'Boolean',
210
+ :'is_free' => :'Boolean',
211
+ :'created_at' => :'Time',
212
+ :'updated_at' => :'Time',
213
+ :'is_permanently_deleted' => :'Boolean',
214
+ :'brand_id' => :'String',
215
+ :'digital_link' => :'String',
216
+ :'instructions' => :'String',
217
+ :'activation_message' => :'String',
218
+ :'expiry_hours' => :'Integer',
219
+ :'business_id' => :'String'
220
+ }
221
+ end
222
+
223
+ # List of attributes with nullable: true
224
+ def self.openapi_nullable
225
+ Set.new([
226
+ ])
227
+ end
228
+
229
+ # Initializes the object
230
+ # @param [Hash] attributes Model attributes in the form of hash
231
+ def initialize(attributes = {})
232
+ if (!attributes.is_a?(Hash))
233
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Solifyn::Product` initialize method"
234
+ end
235
+
236
+ # check to see if the attribute exists and convert string to symbol for hash key
237
+ attributes = attributes.each_with_object({}) { |(k, v), h|
238
+ if (!self.class.attribute_map.key?(k.to_sym))
239
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Solifyn::Product`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
240
+ end
241
+ h[k.to_sym] = v
242
+ }
243
+
244
+ if attributes.key?(:'id')
245
+ self.id = attributes[:'id']
246
+ else
247
+ self.id = nil
248
+ end
249
+
250
+ if attributes.key?(:'name')
251
+ self.name = attributes[:'name']
252
+ else
253
+ self.name = nil
254
+ end
255
+
256
+ if attributes.key?(:'price')
257
+ self.price = attributes[:'price']
258
+ else
259
+ self.price = nil
260
+ end
261
+
262
+ if attributes.key?(:'currency')
263
+ self.currency = attributes[:'currency']
264
+ else
265
+ self.currency = nil
266
+ end
267
+
268
+ if attributes.key?(:'description')
269
+ self.description = attributes[:'description']
270
+ end
271
+
272
+ if attributes.key?(:'status')
273
+ self.status = attributes[:'status']
274
+ else
275
+ self.status = nil
276
+ end
277
+
278
+ if attributes.key?(:'image_url')
279
+ self.image_url = attributes[:'image_url']
280
+ else
281
+ self.image_url = nil
282
+ end
283
+
284
+ if attributes.key?(:'tax_category')
285
+ self.tax_category = attributes[:'tax_category']
286
+ else
287
+ self.tax_category = nil
288
+ end
289
+
290
+ if attributes.key?(:'pricing_type')
291
+ self.pricing_type = attributes[:'pricing_type']
292
+ else
293
+ self.pricing_type = nil
294
+ end
295
+
296
+ if attributes.key?(:'discount')
297
+ self.discount = attributes[:'discount']
298
+ else
299
+ self.discount = nil
300
+ end
301
+
302
+ if attributes.key?(:'has_license_key')
303
+ self.has_license_key = attributes[:'has_license_key']
304
+ else
305
+ self.has_license_key = nil
306
+ end
307
+
308
+ if attributes.key?(:'has_digital_delivery')
309
+ self.has_digital_delivery = attributes[:'has_digital_delivery']
310
+ else
311
+ self.has_digital_delivery = nil
312
+ end
313
+
314
+ if attributes.key?(:'is_tax_inclusive')
315
+ self.is_tax_inclusive = attributes[:'is_tax_inclusive']
316
+ else
317
+ self.is_tax_inclusive = nil
318
+ end
319
+
320
+ if attributes.key?(:'billing_period')
321
+ self.billing_period = attributes[:'billing_period']
322
+ else
323
+ self.billing_period = nil
324
+ end
325
+
326
+ if attributes.key?(:'trial_period_days')
327
+ self.trial_period_days = attributes[:'trial_period_days']
328
+ else
329
+ self.trial_period_days = nil
330
+ end
331
+
332
+ if attributes.key?(:'expiration_days')
333
+ self.expiration_days = attributes[:'expiration_days']
334
+ else
335
+ self.expiration_days = nil
336
+ end
337
+
338
+ if attributes.key?(:'statement_descriptor')
339
+ self.statement_descriptor = attributes[:'statement_descriptor']
340
+ else
341
+ self.statement_descriptor = nil
342
+ end
343
+
344
+ if attributes.key?(:'pay_what_you_want')
345
+ self.pay_what_you_want = attributes[:'pay_what_you_want']
346
+ else
347
+ self.pay_what_you_want = nil
348
+ end
349
+
350
+ if attributes.key?(:'metadata')
351
+ if (value = attributes[:'metadata']).is_a?(Hash)
352
+ self.metadata = value
353
+ end
354
+ else
355
+ self.metadata = nil
356
+ end
357
+
358
+ if attributes.key?(:'custom_fields')
359
+ if (value = attributes[:'custom_fields']).is_a?(Array)
360
+ self.custom_fields = value
361
+ end
362
+ else
363
+ self.custom_fields = nil
364
+ end
365
+
366
+ if attributes.key?(:'stock')
367
+ self.stock = attributes[:'stock']
368
+ else
369
+ self.stock = nil
370
+ end
371
+
372
+ if attributes.key?(:'activation_limit')
373
+ self.activation_limit = attributes[:'activation_limit']
374
+ else
375
+ self.activation_limit = nil
376
+ end
377
+
378
+ if attributes.key?(:'is_listed')
379
+ self.is_listed = attributes[:'is_listed']
380
+ else
381
+ self.is_listed = nil
382
+ end
383
+
384
+ if attributes.key?(:'is_free')
385
+ self.is_free = attributes[:'is_free']
386
+ else
387
+ self.is_free = nil
388
+ end
389
+
390
+ if attributes.key?(:'created_at')
391
+ self.created_at = attributes[:'created_at']
392
+ else
393
+ self.created_at = nil
394
+ end
395
+
396
+ if attributes.key?(:'updated_at')
397
+ self.updated_at = attributes[:'updated_at']
398
+ else
399
+ self.updated_at = nil
400
+ end
401
+
402
+ if attributes.key?(:'is_permanently_deleted')
403
+ self.is_permanently_deleted = attributes[:'is_permanently_deleted']
404
+ else
405
+ self.is_permanently_deleted = nil
406
+ end
407
+
408
+ if attributes.key?(:'brand_id')
409
+ self.brand_id = attributes[:'brand_id']
410
+ else
411
+ self.brand_id = nil
412
+ end
413
+
414
+ if attributes.key?(:'digital_link')
415
+ self.digital_link = attributes[:'digital_link']
416
+ else
417
+ self.digital_link = nil
418
+ end
419
+
420
+ if attributes.key?(:'instructions')
421
+ self.instructions = attributes[:'instructions']
422
+ else
423
+ self.instructions = nil
424
+ end
425
+
426
+ if attributes.key?(:'activation_message')
427
+ self.activation_message = attributes[:'activation_message']
428
+ else
429
+ self.activation_message = nil
430
+ end
431
+
432
+ if attributes.key?(:'expiry_hours')
433
+ self.expiry_hours = attributes[:'expiry_hours']
434
+ else
435
+ self.expiry_hours = nil
436
+ end
437
+
438
+ if attributes.key?(:'business_id')
439
+ self.business_id = attributes[:'business_id']
440
+ else
441
+ self.business_id = nil
442
+ end
443
+ end
444
+
445
+ # Show invalid properties with the reasons. Usually used together with valid?
446
+ # @return Array for valid properties with the reasons
447
+ def list_invalid_properties
448
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
449
+ invalid_properties = Array.new
450
+ if @id.nil?
451
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
452
+ end
453
+
454
+ if @name.nil?
455
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
456
+ end
457
+
458
+ if @price.nil?
459
+ invalid_properties.push('invalid value for "price", price cannot be nil.')
460
+ end
461
+
462
+ if @currency.nil?
463
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
464
+ end
465
+
466
+ if @status.nil?
467
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
468
+ end
469
+
470
+ if @image_url.nil?
471
+ invalid_properties.push('invalid value for "image_url", image_url cannot be nil.')
472
+ end
473
+
474
+ if @tax_category.nil?
475
+ invalid_properties.push('invalid value for "tax_category", tax_category cannot be nil.')
476
+ end
477
+
478
+ if @pricing_type.nil?
479
+ invalid_properties.push('invalid value for "pricing_type", pricing_type cannot be nil.')
480
+ end
481
+
482
+ if @discount.nil?
483
+ invalid_properties.push('invalid value for "discount", discount cannot be nil.')
484
+ end
485
+
486
+ if @has_license_key.nil?
487
+ invalid_properties.push('invalid value for "has_license_key", has_license_key cannot be nil.')
488
+ end
489
+
490
+ if @has_digital_delivery.nil?
491
+ invalid_properties.push('invalid value for "has_digital_delivery", has_digital_delivery cannot be nil.')
492
+ end
493
+
494
+ if @is_tax_inclusive.nil?
495
+ invalid_properties.push('invalid value for "is_tax_inclusive", is_tax_inclusive cannot be nil.')
496
+ end
497
+
498
+ if @billing_period.nil?
499
+ invalid_properties.push('invalid value for "billing_period", billing_period cannot be nil.')
500
+ end
501
+
502
+ if @trial_period_days.nil?
503
+ invalid_properties.push('invalid value for "trial_period_days", trial_period_days cannot be nil.')
504
+ end
505
+
506
+ if @expiration_days.nil?
507
+ invalid_properties.push('invalid value for "expiration_days", expiration_days cannot be nil.')
508
+ end
509
+
510
+ if @statement_descriptor.nil?
511
+ invalid_properties.push('invalid value for "statement_descriptor", statement_descriptor cannot be nil.')
512
+ end
513
+
514
+ if @pay_what_you_want.nil?
515
+ invalid_properties.push('invalid value for "pay_what_you_want", pay_what_you_want cannot be nil.')
516
+ end
517
+
518
+ if @metadata.nil?
519
+ invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
520
+ end
521
+
522
+ if @custom_fields.nil?
523
+ invalid_properties.push('invalid value for "custom_fields", custom_fields cannot be nil.')
524
+ end
525
+
526
+ if @stock.nil?
527
+ invalid_properties.push('invalid value for "stock", stock cannot be nil.')
528
+ end
529
+
530
+ if @activation_limit.nil?
531
+ invalid_properties.push('invalid value for "activation_limit", activation_limit cannot be nil.')
532
+ end
533
+
534
+ if @is_listed.nil?
535
+ invalid_properties.push('invalid value for "is_listed", is_listed cannot be nil.')
536
+ end
537
+
538
+ if @is_free.nil?
539
+ invalid_properties.push('invalid value for "is_free", is_free cannot be nil.')
540
+ end
541
+
542
+ if @created_at.nil?
543
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
544
+ end
545
+
546
+ if @updated_at.nil?
547
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
548
+ end
549
+
550
+ if @is_permanently_deleted.nil?
551
+ invalid_properties.push('invalid value for "is_permanently_deleted", is_permanently_deleted cannot be nil.')
552
+ end
553
+
554
+ if @brand_id.nil?
555
+ invalid_properties.push('invalid value for "brand_id", brand_id cannot be nil.')
556
+ end
557
+
558
+ if @digital_link.nil?
559
+ invalid_properties.push('invalid value for "digital_link", digital_link cannot be nil.')
560
+ end
561
+
562
+ if @instructions.nil?
563
+ invalid_properties.push('invalid value for "instructions", instructions cannot be nil.')
564
+ end
565
+
566
+ if @activation_message.nil?
567
+ invalid_properties.push('invalid value for "activation_message", activation_message cannot be nil.')
568
+ end
569
+
570
+ if @expiry_hours.nil?
571
+ invalid_properties.push('invalid value for "expiry_hours", expiry_hours cannot be nil.')
572
+ end
573
+
574
+ if @business_id.nil?
575
+ invalid_properties.push('invalid value for "business_id", business_id cannot be nil.')
576
+ end
577
+
578
+ invalid_properties
579
+ end
580
+
581
+ # Check to see if the all the properties in the model are valid
582
+ # @return true if the model is valid
583
+ def valid?
584
+ warn '[DEPRECATED] the `valid?` method is obsolete'
585
+ return false if @id.nil?
586
+ return false if @name.nil?
587
+ return false if @price.nil?
588
+ return false if @currency.nil?
589
+ return false if @status.nil?
590
+ return false if @image_url.nil?
591
+ return false if @tax_category.nil?
592
+ tax_category_validator = EnumAttributeValidator.new('String', ["digital_products", "saas", "physical_products", "service"])
593
+ return false unless tax_category_validator.valid?(@tax_category)
594
+ return false if @pricing_type.nil?
595
+ pricing_type_validator = EnumAttributeValidator.new('String', ["usage_based", "one_time", "renewal"])
596
+ return false unless pricing_type_validator.valid?(@pricing_type)
597
+ return false if @discount.nil?
598
+ return false if @has_license_key.nil?
599
+ return false if @has_digital_delivery.nil?
600
+ return false if @is_tax_inclusive.nil?
601
+ return false if @billing_period.nil?
602
+ return false if @trial_period_days.nil?
603
+ return false if @expiration_days.nil?
604
+ return false if @statement_descriptor.nil?
605
+ return false if @pay_what_you_want.nil?
606
+ return false if @metadata.nil?
607
+ return false if @custom_fields.nil?
608
+ return false if @stock.nil?
609
+ return false if @activation_limit.nil?
610
+ return false if @is_listed.nil?
611
+ return false if @is_free.nil?
612
+ return false if @created_at.nil?
613
+ return false if @updated_at.nil?
614
+ return false if @is_permanently_deleted.nil?
615
+ return false if @brand_id.nil?
616
+ return false if @digital_link.nil?
617
+ return false if @instructions.nil?
618
+ return false if @activation_message.nil?
619
+ return false if @expiry_hours.nil?
620
+ return false if @business_id.nil?
621
+ true
622
+ end
623
+
624
+ # Custom attribute writer method checking allowed values (enum).
625
+ # @param [Object] tax_category Object to be assigned
626
+ def tax_category=(tax_category)
627
+ validator = EnumAttributeValidator.new('String', ["digital_products", "saas", "physical_products", "service"])
628
+ unless validator.valid?(tax_category)
629
+ fail ArgumentError, "invalid value for \"tax_category\", must be one of #{validator.allowable_values}."
630
+ end
631
+ @tax_category = tax_category
632
+ end
633
+
634
+ # Custom attribute writer method checking allowed values (enum).
635
+ # @param [Object] pricing_type Object to be assigned
636
+ def pricing_type=(pricing_type)
637
+ validator = EnumAttributeValidator.new('String', ["usage_based", "one_time", "renewal"])
638
+ unless validator.valid?(pricing_type)
639
+ fail ArgumentError, "invalid value for \"pricing_type\", must be one of #{validator.allowable_values}."
640
+ end
641
+ @pricing_type = pricing_type
642
+ end
643
+
644
+ # Checks equality by comparing each attribute.
645
+ # @param [Object] Object to be compared
646
+ def ==(o)
647
+ return true if self.equal?(o)
648
+ self.class == o.class &&
649
+ id == o.id &&
650
+ name == o.name &&
651
+ price == o.price &&
652
+ currency == o.currency &&
653
+ description == o.description &&
654
+ status == o.status &&
655
+ image_url == o.image_url &&
656
+ tax_category == o.tax_category &&
657
+ pricing_type == o.pricing_type &&
658
+ discount == o.discount &&
659
+ has_license_key == o.has_license_key &&
660
+ has_digital_delivery == o.has_digital_delivery &&
661
+ is_tax_inclusive == o.is_tax_inclusive &&
662
+ billing_period == o.billing_period &&
663
+ trial_period_days == o.trial_period_days &&
664
+ expiration_days == o.expiration_days &&
665
+ statement_descriptor == o.statement_descriptor &&
666
+ pay_what_you_want == o.pay_what_you_want &&
667
+ metadata == o.metadata &&
668
+ custom_fields == o.custom_fields &&
669
+ stock == o.stock &&
670
+ activation_limit == o.activation_limit &&
671
+ is_listed == o.is_listed &&
672
+ is_free == o.is_free &&
673
+ created_at == o.created_at &&
674
+ updated_at == o.updated_at &&
675
+ is_permanently_deleted == o.is_permanently_deleted &&
676
+ brand_id == o.brand_id &&
677
+ digital_link == o.digital_link &&
678
+ instructions == o.instructions &&
679
+ activation_message == o.activation_message &&
680
+ expiry_hours == o.expiry_hours &&
681
+ business_id == o.business_id
682
+ end
683
+
684
+ # @see the `==` method
685
+ # @param [Object] Object to be compared
686
+ def eql?(o)
687
+ self == o
688
+ end
689
+
690
+ # Calculates hash code according to all attributes.
691
+ # @return [Integer] Hash code
692
+ def hash
693
+ [id, name, price, currency, description, status, image_url, tax_category, pricing_type, discount, has_license_key, has_digital_delivery, is_tax_inclusive, billing_period, trial_period_days, expiration_days, statement_descriptor, pay_what_you_want, metadata, custom_fields, stock, activation_limit, is_listed, is_free, created_at, updated_at, is_permanently_deleted, brand_id, digital_link, instructions, activation_message, expiry_hours, business_id].hash
694
+ end
695
+
696
+ # Builds the object from hash
697
+ # @param [Hash] attributes Model attributes in the form of hash
698
+ # @return [Object] Returns the model itself
699
+ def self.build_from_hash(attributes)
700
+ return nil unless attributes.is_a?(Hash)
701
+ attributes = attributes.transform_keys(&:to_sym)
702
+ transformed_hash = {}
703
+ openapi_types.each_pair do |key, type|
704
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
705
+ transformed_hash["#{key}"] = nil
706
+ elsif type =~ /\AArray<(.*)>/i
707
+ # check to ensure the input is an array given that the attribute
708
+ # is documented as an array but the input is not
709
+ if attributes[attribute_map[key]].is_a?(Array)
710
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
711
+ end
712
+ elsif !attributes[attribute_map[key]].nil?
713
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
714
+ end
715
+ end
716
+ new(transformed_hash)
717
+ end
718
+
719
+ # Deserializes the data based on type
720
+ # @param string type Data type
721
+ # @param string value Value to be deserialized
722
+ # @return [Object] Deserialized data
723
+ def self._deserialize(type, value)
724
+ case type.to_sym
725
+ when :Time
726
+ Time.parse(value)
727
+ when :Date
728
+ Date.parse(value)
729
+ when :String
730
+ value.to_s
731
+ when :Integer
732
+ value.to_i
733
+ when :Float
734
+ value.to_f
735
+ when :Boolean
736
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
737
+ true
738
+ else
739
+ false
740
+ end
741
+ when :Object
742
+ # generic object (usually a Hash), return directly
743
+ value
744
+ when /\AArray<(?<inner_type>.+)>\z/
745
+ inner_type = Regexp.last_match[:inner_type]
746
+ value.map { |v| _deserialize(inner_type, v) }
747
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
748
+ k_type = Regexp.last_match[:k_type]
749
+ v_type = Regexp.last_match[:v_type]
750
+ {}.tap do |hash|
751
+ value.each do |k, v|
752
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
753
+ end
754
+ end
755
+ else # model
756
+ # models (e.g. Pet) or oneOf
757
+ klass = Solifyn.const_get(type)
758
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
759
+ end
760
+ end
761
+
762
+ # Returns the string representation of the object
763
+ # @return [String] String presentation of the object
764
+ def to_s
765
+ to_hash.to_s
766
+ end
767
+
768
+ # to_body is an alias to to_hash (backward compatibility)
769
+ # @return [Hash] Returns the object in the form of hash
770
+ def to_body
771
+ to_hash
772
+ end
773
+
774
+ # Returns the object in the form of hash
775
+ # @return [Hash] Returns the object in the form of hash
776
+ def to_hash
777
+ hash = {}
778
+ self.class.attribute_map.each_pair do |attr, param|
779
+ value = self.send(attr)
780
+ if value.nil?
781
+ is_nullable = self.class.openapi_nullable.include?(attr)
782
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
783
+ end
784
+
785
+ hash[param] = _to_hash(value)
786
+ end
787
+ hash
788
+ end
789
+
790
+ # Outputs non-array value in the form of hash
791
+ # For object, use to_hash. Otherwise, just return the value
792
+ # @param [Object] value Any valid value
793
+ # @return [Hash] Returns the value in the form of hash
794
+ def _to_hash(value)
795
+ if value.is_a?(Array)
796
+ value.compact.map { |v| _to_hash(v) }
797
+ elsif value.is_a?(Hash)
798
+ {}.tap do |hash|
799
+ value.each { |k, v| hash[k] = _to_hash(v) }
800
+ end
801
+ elsif value.respond_to? :to_hash
802
+ value.to_hash
803
+ else
804
+ value
805
+ end
806
+ end
807
+
808
+ end
809
+
810
+ end