growwer 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 (383) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +306 -0
  4. data/Rakefile +10 -0
  5. data/docs/AccountApi.md +213 -0
  6. data/docs/Balance.md +20 -0
  7. data/docs/BuyerMoneyApi.md +362 -0
  8. data/docs/CatalogueApi.md +731 -0
  9. data/docs/CatalogueMedia.md +46 -0
  10. data/docs/CatalogueMediaFlashOffer.md +20 -0
  11. data/docs/CatalogueMediaMetrics.md +26 -0
  12. data/docs/CatalogueOffer.md +24 -0
  13. data/docs/CatalogueOfferOrNull.md +24 -0
  14. data/docs/CataloguePostOffer.md +30 -0
  15. data/docs/CataloguePostOfferAllOfExtras.md +20 -0
  16. data/docs/CataloguePostOfferAllOfExtrasSensitiveTopic.md +20 -0
  17. data/docs/CodeName.md +20 -0
  18. data/docs/CountSavedFilterMedias200Response.md +18 -0
  19. data/docs/CreateProjectRequest.md +32 -0
  20. data/docs/CreateSavedFilterRequest.md +22 -0
  21. data/docs/Error.md +24 -0
  22. data/docs/FilesApi.md +79 -0
  23. data/docs/GetBuyerWallet200Response.md +20 -0
  24. data/docs/GetMe200Response.md +34 -0
  25. data/docs/GetMe200ResponseBuyer.md +18 -0
  26. data/docs/GetMe200ResponseCatalogue.md +18 -0
  27. data/docs/GetMe200ResponseManagedService.md +18 -0
  28. data/docs/GetMe200ResponseSeller.md +24 -0
  29. data/docs/GetSellerWallet200Response.md +20 -0
  30. data/docs/GetVocabulary200Response.md +28 -0
  31. data/docs/GetVocabulary200ResponseTopicsInner.md +20 -0
  32. data/docs/Invoice.md +24 -0
  33. data/docs/LinkAdditionOrderBriefing.md +22 -0
  34. data/docs/LinkAdditionOrderBriefingRequest.md +22 -0
  35. data/docs/ListBuyerTransactions200Response.md +20 -0
  36. data/docs/ListFlashOffers200Response.md +20 -0
  37. data/docs/ListInvoices200Response.md +20 -0
  38. data/docs/ListManagedServiceCampaigns200Response.md +20 -0
  39. data/docs/ListManagedServiceProposals200Response.md +20 -0
  40. data/docs/ListOrders200Response.md +20 -0
  41. data/docs/ListProjects200Response.md +20 -0
  42. data/docs/ListSavedFilters200Response.md +20 -0
  43. data/docs/ListSellerMedias200Response.md +20 -0
  44. data/docs/ListSellerOrders200Response.md +20 -0
  45. data/docs/ListSellerTransactions200Response.md +20 -0
  46. data/docs/ListWithdrawals200Response.md +20 -0
  47. data/docs/ManagedServiceCampaign.md +40 -0
  48. data/docs/ManagedServiceCampaignProject.md +20 -0
  49. data/docs/ManagedServiceCampaignProposalCounts.md +26 -0
  50. data/docs/ManagedServiceCampaignStrategy.md +26 -0
  51. data/docs/ManagedServiceProposal.md +40 -0
  52. data/docs/ManagedServiceProposalBriefing.md +24 -0
  53. data/docs/ManagedServiceProposalBriefingLinksInner.md +22 -0
  54. data/docs/ManagedServiceProposalMedia.md +24 -0
  55. data/docs/ManagedServiceProposalReview.md +20 -0
  56. data/docs/ManagedServiceProposalReviewRequest.md +18 -0
  57. data/docs/ManagedServiceProposalReviewRequestReviewsInner.md +22 -0
  58. data/docs/ManagedServiceProposalsEstimate.md +28 -0
  59. data/docs/ManagedServiceProposalsEstimateRequest.md +18 -0
  60. data/docs/ManagedServiceRequest.md +28 -0
  61. data/docs/ManagedServiceRequestSent.md +18 -0
  62. data/docs/ManagedServicesApi.md +593 -0
  63. data/docs/Money.md +20 -0
  64. data/docs/MoneyOrNull.md +20 -0
  65. data/docs/Order.md +48 -0
  66. data/docs/OrderActionReason.md +18 -0
  67. data/docs/OrderBriefing.md +49 -0
  68. data/docs/OrderChannel.md +18 -0
  69. data/docs/OrderCreateRequest.md +32 -0
  70. data/docs/OrderDelivery.md +20 -0
  71. data/docs/OrderDraft.md +22 -0
  72. data/docs/OrderEstimate.md +24 -0
  73. data/docs/OrderEstimateRequest.md +30 -0
  74. data/docs/OrderEstimateRequestBriefing.md +49 -0
  75. data/docs/OrderLink.md +22 -0
  76. data/docs/OrderLinkRequest.md +22 -0
  77. data/docs/OrderMedia.md +20 -0
  78. data/docs/OrderProject.md +20 -0
  79. data/docs/OrderStateHistoryInner.md +22 -0
  80. data/docs/OrderStateHistoryInnerReason.md +20 -0
  81. data/docs/OrdersApi.md +809 -0
  82. data/docs/PostOrderBriefing.md +28 -0
  83. data/docs/PostOrderBriefingRequest.md +24 -0
  84. data/docs/Project.md +38 -0
  85. data/docs/ProjectCatalogueMedia.md +48 -0
  86. data/docs/ProjectCatalogueMediaAllOfProject.md +28 -0
  87. data/docs/ProjectsApi.md +368 -0
  88. data/docs/PutSellerHoliday200Response.md +20 -0
  89. data/docs/PutSellerHolidayRequest.md +20 -0
  90. data/docs/RequestMedias201Response.md +18 -0
  91. data/docs/RequestMediasRequest.md +18 -0
  92. data/docs/SavedFilter.md +26 -0
  93. data/docs/SavedFilterNotifications.md +20 -0
  94. data/docs/SavedFiltersApi.md +296 -0
  95. data/docs/SellerFees.md +20 -0
  96. data/docs/SellerFeesOrNull.md +20 -0
  97. data/docs/SellerMedia.md +54 -0
  98. data/docs/SellerMediaFlashOffer.md +20 -0
  99. data/docs/SellerMediaLinkAdditionOffer.md +18 -0
  100. data/docs/SellerMediaLinkAdditionOfferPricingOptionsInner.md +22 -0
  101. data/docs/SellerMediaPostOffer.md +20 -0
  102. data/docs/SellerMediaPostOfferPricingOptionsInner.md +24 -0
  103. data/docs/SellerMediasApi.md +301 -0
  104. data/docs/SellerMoneyApi.md +364 -0
  105. data/docs/SellerOrder.md +50 -0
  106. data/docs/SellerOrderBriefing.md +49 -0
  107. data/docs/SellerOrderChannel.md +20 -0
  108. data/docs/SellerOrderDraft.md +20 -0
  109. data/docs/SellerOrderDraftFile.md +18 -0
  110. data/docs/SellerOrderPostDelivery.md +20 -0
  111. data/docs/SellerOrderProject.md +18 -0
  112. data/docs/SellerOrderRefutation.md +18 -0
  113. data/docs/SellerOrderRejection.md +18 -0
  114. data/docs/SellerOrderRejectionReason.md +20 -0
  115. data/docs/SellerOrdersApi.md +893 -0
  116. data/docs/SellerPostOrderBriefing.md +30 -0
  117. data/docs/SellerTransaction.md +38 -0
  118. data/docs/Transaction.md +40 -0
  119. data/docs/UpdateProjectRequest.md +30 -0
  120. data/docs/UpdateSellerMediaRequest.md +22 -0
  121. data/docs/UpdateSellerMediaRequestExtraServicesInner.md +20 -0
  122. data/docs/UpdateSellerMediaRequestLinkAdditionOffer.md +18 -0
  123. data/docs/UpdateSellerMediaRequestLinkAdditionOfferPricingOptionsInner.md +20 -0
  124. data/docs/UpdateSellerMediaRequestPostOffer.md +18 -0
  125. data/docs/UpdateSellerMediaRequestPostOfferPricingOptionsInner.md +22 -0
  126. data/docs/UploadFile201Response.md +24 -0
  127. data/docs/Withdrawal.md +28 -0
  128. data/git_push.sh +57 -0
  129. data/growwer.gemspec +41 -0
  130. data/lib/growwer/api/account_api.rb +215 -0
  131. data/lib/growwer/api/buyer_money_api.rb +355 -0
  132. data/lib/growwer/api/catalogue_api.rb +881 -0
  133. data/lib/growwer/api/files_api.rb +102 -0
  134. data/lib/growwer/api/managed_services_api.rb +625 -0
  135. data/lib/growwer/api/orders_api.rb +855 -0
  136. data/lib/growwer/api/projects_api.rb +398 -0
  137. data/lib/growwer/api/saved_filters_api.rb +319 -0
  138. data/lib/growwer/api/seller_medias_api.rb +329 -0
  139. data/lib/growwer/api/seller_money_api.rb +358 -0
  140. data/lib/growwer/api/seller_orders_api.rb +963 -0
  141. data/lib/growwer/api_client.rb +441 -0
  142. data/lib/growwer/api_error.rb +58 -0
  143. data/lib/growwer/api_model_base.rb +88 -0
  144. data/lib/growwer/configuration.rb +392 -0
  145. data/lib/growwer/models/balance.rb +192 -0
  146. data/lib/growwer/models/catalogue_media.rb +491 -0
  147. data/lib/growwer/models/catalogue_media_flash_offer.rb +191 -0
  148. data/lib/growwer/models/catalogue_media_metrics.rb +200 -0
  149. data/lib/growwer/models/catalogue_offer.rb +254 -0
  150. data/lib/growwer/models/catalogue_offer_or_null.rb +254 -0
  151. data/lib/growwer/models/catalogue_post_offer.rb +333 -0
  152. data/lib/growwer/models/catalogue_post_offer_all_of_extras.rb +177 -0
  153. data/lib/growwer/models/catalogue_post_offer_all_of_extras_sensitive_topic.rb +178 -0
  154. data/lib/growwer/models/code_name.rb +190 -0
  155. data/lib/growwer/models/count_saved_filter_medias200_response.rb +173 -0
  156. data/lib/growwer/models/create_project_request.rb +402 -0
  157. data/lib/growwer/models/create_saved_filter_request.rb +247 -0
  158. data/lib/growwer/models/error.rb +231 -0
  159. data/lib/growwer/models/get_buyer_wallet200_response.rb +191 -0
  160. data/lib/growwer/models/get_me200_response.rb +373 -0
  161. data/lib/growwer/models/get_me200_response_buyer.rb +164 -0
  162. data/lib/growwer/models/get_me200_response_catalogue.rb +165 -0
  163. data/lib/growwer/models/get_me200_response_managed_service.rb +165 -0
  164. data/lib/growwer/models/get_me200_response_seller.rb +231 -0
  165. data/lib/growwer/models/get_seller_wallet200_response.rb +191 -0
  166. data/lib/growwer/models/get_vocabulary200_response.rb +311 -0
  167. data/lib/growwer/models/get_vocabulary200_response_topics_inner.rb +190 -0
  168. data/lib/growwer/models/invoice.rb +243 -0
  169. data/lib/growwer/models/link_addition_order_briefing.rb +204 -0
  170. data/lib/growwer/models/link_addition_order_briefing_request.rb +201 -0
  171. data/lib/growwer/models/list_buyer_transactions200_response.rb +192 -0
  172. data/lib/growwer/models/list_flash_offers200_response.rb +192 -0
  173. data/lib/growwer/models/list_invoices200_response.rb +192 -0
  174. data/lib/growwer/models/list_managed_service_campaigns200_response.rb +192 -0
  175. data/lib/growwer/models/list_managed_service_proposals200_response.rb +192 -0
  176. data/lib/growwer/models/list_orders200_response.rb +192 -0
  177. data/lib/growwer/models/list_projects200_response.rb +192 -0
  178. data/lib/growwer/models/list_saved_filters200_response.rb +192 -0
  179. data/lib/growwer/models/list_seller_medias200_response.rb +192 -0
  180. data/lib/growwer/models/list_seller_orders200_response.rb +192 -0
  181. data/lib/growwer/models/list_seller_transactions200_response.rb +192 -0
  182. data/lib/growwer/models/list_withdrawals200_response.rb +192 -0
  183. data/lib/growwer/models/managed_service_campaign.rb +451 -0
  184. data/lib/growwer/models/managed_service_campaign_project.rb +190 -0
  185. data/lib/growwer/models/managed_service_campaign_proposal_counts.rb +269 -0
  186. data/lib/growwer/models/managed_service_campaign_strategy.rb +300 -0
  187. data/lib/growwer/models/managed_service_proposal.rb +428 -0
  188. data/lib/growwer/models/managed_service_proposal_briefing.rb +244 -0
  189. data/lib/growwer/models/managed_service_proposal_briefing_links_inner.rb +226 -0
  190. data/lib/growwer/models/managed_service_proposal_media.rb +214 -0
  191. data/lib/growwer/models/managed_service_proposal_review.rb +193 -0
  192. data/lib/growwer/models/managed_service_proposal_review_request.rb +176 -0
  193. data/lib/growwer/models/managed_service_proposal_review_request_reviews_inner.rb +240 -0
  194. data/lib/growwer/models/managed_service_proposals_estimate.rb +300 -0
  195. data/lib/growwer/models/managed_service_proposals_estimate_request.rb +150 -0
  196. data/lib/growwer/models/managed_service_request.rb +331 -0
  197. data/lib/growwer/models/managed_service_request_sent.rb +188 -0
  198. data/lib/growwer/models/money.rb +192 -0
  199. data/lib/growwer/models/money_or_null.rb +192 -0
  200. data/lib/growwer/models/order.rb +541 -0
  201. data/lib/growwer/models/order_action_reason.rb +183 -0
  202. data/lib/growwer/models/order_briefing.rb +102 -0
  203. data/lib/growwer/models/order_channel.rb +189 -0
  204. data/lib/growwer/models/order_create_request.rb +333 -0
  205. data/lib/growwer/models/order_delivery.rb +179 -0
  206. data/lib/growwer/models/order_draft.rb +220 -0
  207. data/lib/growwer/models/order_estimate.rb +246 -0
  208. data/lib/growwer/models/order_estimate_request.rb +299 -0
  209. data/lib/growwer/models/order_estimate_request_briefing.rb +102 -0
  210. data/lib/growwer/models/order_link.rb +214 -0
  211. data/lib/growwer/models/order_link_request.rb +209 -0
  212. data/lib/growwer/models/order_media.rb +178 -0
  213. data/lib/growwer/models/order_project.rb +178 -0
  214. data/lib/growwer/models/order_state_history_inner.rb +202 -0
  215. data/lib/growwer/models/order_state_history_inner_reason.rb +200 -0
  216. data/lib/growwer/models/post_order_briefing.rb +285 -0
  217. data/lib/growwer/models/post_order_briefing_request.rb +220 -0
  218. data/lib/growwer/models/project.rb +437 -0
  219. data/lib/growwer/models/project_catalogue_media.rb +524 -0
  220. data/lib/growwer/models/project_catalogue_media_all_of_project.rb +298 -0
  221. data/lib/growwer/models/put_seller_holiday200_response.rb +177 -0
  222. data/lib/growwer/models/put_seller_holiday_request.rb +174 -0
  223. data/lib/growwer/models/request_medias201_response.rb +166 -0
  224. data/lib/growwer/models/request_medias_request.rb +167 -0
  225. data/lib/growwer/models/saved_filter.rb +269 -0
  226. data/lib/growwer/models/saved_filter_notifications.rb +211 -0
  227. data/lib/growwer/models/seller_fees.rb +164 -0
  228. data/lib/growwer/models/seller_fees_or_null.rb +164 -0
  229. data/lib/growwer/models/seller_media.rb +573 -0
  230. data/lib/growwer/models/seller_media_flash_offer.rb +191 -0
  231. data/lib/growwer/models/seller_media_link_addition_offer.rb +167 -0
  232. data/lib/growwer/models/seller_media_link_addition_offer_pricing_options_inner.rb +228 -0
  233. data/lib/growwer/models/seller_media_post_offer.rb +195 -0
  234. data/lib/growwer/models/seller_media_post_offer_pricing_options_inner.rb +234 -0
  235. data/lib/growwer/models/seller_order.rb +563 -0
  236. data/lib/growwer/models/seller_order_briefing.rb +102 -0
  237. data/lib/growwer/models/seller_order_channel.rb +214 -0
  238. data/lib/growwer/models/seller_order_draft.rb +193 -0
  239. data/lib/growwer/models/seller_order_draft_file.rb +165 -0
  240. data/lib/growwer/models/seller_order_post_delivery.rb +193 -0
  241. data/lib/growwer/models/seller_order_project.rb +165 -0
  242. data/lib/growwer/models/seller_order_refutation.rb +183 -0
  243. data/lib/growwer/models/seller_order_rejection.rb +164 -0
  244. data/lib/growwer/models/seller_order_rejection_reason.rb +224 -0
  245. data/lib/growwer/models/seller_post_order_briefing.rb +314 -0
  246. data/lib/growwer/models/seller_transaction.rb +415 -0
  247. data/lib/growwer/models/transaction.rb +427 -0
  248. data/lib/growwer/models/update_project_request.rb +339 -0
  249. data/lib/growwer/models/update_seller_media_request.rb +168 -0
  250. data/lib/growwer/models/update_seller_media_request_extra_services_inner.rb +215 -0
  251. data/lib/growwer/models/update_seller_media_request_link_addition_offer.rb +166 -0
  252. data/lib/growwer/models/update_seller_media_request_link_addition_offer_pricing_options_inner.rb +215 -0
  253. data/lib/growwer/models/update_seller_media_request_post_offer.rb +175 -0
  254. data/lib/growwer/models/update_seller_media_request_post_offer_pricing_options_inner.rb +210 -0
  255. data/lib/growwer/models/upload_file201_response.rb +244 -0
  256. data/lib/growwer/models/withdrawal.rb +322 -0
  257. data/lib/growwer/version.rb +15 -0
  258. data/lib/growwer.rb +163 -0
  259. data/spec/api/account_api_spec.rb +70 -0
  260. data/spec/api/buyer_money_api_spec.rb +96 -0
  261. data/spec/api/catalogue_api_spec.rb +213 -0
  262. data/spec/api/files_api_spec.rb +48 -0
  263. data/spec/api/managed_services_api_spec.rb +140 -0
  264. data/spec/api/orders_api_spec.rb +182 -0
  265. data/spec/api/projects_api_spec.rb +100 -0
  266. data/spec/api/saved_filters_api_spec.rb +88 -0
  267. data/spec/api/seller_medias_api_spec.rb +89 -0
  268. data/spec/api/seller_money_api_spec.rb +97 -0
  269. data/spec/api/seller_orders_api_spec.rb +199 -0
  270. data/spec/models/balance_spec.rb +42 -0
  271. data/spec/models/catalogue_media_flash_offer_spec.rb +42 -0
  272. data/spec/models/catalogue_media_metrics_spec.rb +60 -0
  273. data/spec/models/catalogue_media_spec.rb +124 -0
  274. data/spec/models/catalogue_offer_or_null_spec.rb +58 -0
  275. data/spec/models/catalogue_offer_spec.rb +58 -0
  276. data/spec/models/catalogue_post_offer_all_of_extras_sensitive_topic_spec.rb +42 -0
  277. data/spec/models/catalogue_post_offer_all_of_extras_spec.rb +42 -0
  278. data/spec/models/catalogue_post_offer_spec.rb +80 -0
  279. data/spec/models/code_name_spec.rb +42 -0
  280. data/spec/models/count_saved_filter_medias200_response_spec.rb +36 -0
  281. data/spec/models/create_project_request_spec.rb +82 -0
  282. data/spec/models/create_saved_filter_request_spec.rb +52 -0
  283. data/spec/models/error_spec.rb +54 -0
  284. data/spec/models/get_buyer_wallet200_response_spec.rb +42 -0
  285. data/spec/models/get_me200_response_buyer_spec.rb +36 -0
  286. data/spec/models/get_me200_response_catalogue_spec.rb +36 -0
  287. data/spec/models/get_me200_response_managed_service_spec.rb +36 -0
  288. data/spec/models/get_me200_response_seller_spec.rb +54 -0
  289. data/spec/models/get_me200_response_spec.rb +84 -0
  290. data/spec/models/get_seller_wallet200_response_spec.rb +42 -0
  291. data/spec/models/get_vocabulary200_response_spec.rb +74 -0
  292. data/spec/models/get_vocabulary200_response_topics_inner_spec.rb +42 -0
  293. data/spec/models/invoice_spec.rb +54 -0
  294. data/spec/models/link_addition_order_briefing_request_spec.rb +48 -0
  295. data/spec/models/link_addition_order_briefing_spec.rb +48 -0
  296. data/spec/models/list_buyer_transactions200_response_spec.rb +42 -0
  297. data/spec/models/list_flash_offers200_response_spec.rb +42 -0
  298. data/spec/models/list_invoices200_response_spec.rb +42 -0
  299. data/spec/models/list_managed_service_campaigns200_response_spec.rb +42 -0
  300. data/spec/models/list_managed_service_proposals200_response_spec.rb +42 -0
  301. data/spec/models/list_orders200_response_spec.rb +42 -0
  302. data/spec/models/list_projects200_response_spec.rb +42 -0
  303. data/spec/models/list_saved_filters200_response_spec.rb +42 -0
  304. data/spec/models/list_seller_medias200_response_spec.rb +42 -0
  305. data/spec/models/list_seller_orders200_response_spec.rb +42 -0
  306. data/spec/models/list_seller_transactions200_response_spec.rb +42 -0
  307. data/spec/models/list_withdrawals200_response_spec.rb +42 -0
  308. data/spec/models/managed_service_campaign_project_spec.rb +42 -0
  309. data/spec/models/managed_service_campaign_proposal_counts_spec.rb +60 -0
  310. data/spec/models/managed_service_campaign_spec.rb +106 -0
  311. data/spec/models/managed_service_campaign_strategy_spec.rb +64 -0
  312. data/spec/models/managed_service_proposal_briefing_links_inner_spec.rb +52 -0
  313. data/spec/models/managed_service_proposal_briefing_spec.rb +54 -0
  314. data/spec/models/managed_service_proposal_media_spec.rb +54 -0
  315. data/spec/models/managed_service_proposal_review_request_reviews_inner_spec.rb +52 -0
  316. data/spec/models/managed_service_proposal_review_request_spec.rb +36 -0
  317. data/spec/models/managed_service_proposal_review_spec.rb +42 -0
  318. data/spec/models/managed_service_proposal_spec.rb +110 -0
  319. data/spec/models/managed_service_proposals_estimate_request_spec.rb +36 -0
  320. data/spec/models/managed_service_proposals_estimate_spec.rb +66 -0
  321. data/spec/models/managed_service_request_sent_spec.rb +40 -0
  322. data/spec/models/managed_service_request_spec.rb +74 -0
  323. data/spec/models/money_or_null_spec.rb +42 -0
  324. data/spec/models/money_spec.rb +42 -0
  325. data/spec/models/order_action_reason_spec.rb +36 -0
  326. data/spec/models/order_briefing_spec.rb +32 -0
  327. data/spec/models/order_channel_spec.rb +40 -0
  328. data/spec/models/order_create_request_spec.rb +82 -0
  329. data/spec/models/order_delivery_spec.rb +42 -0
  330. data/spec/models/order_draft_spec.rb +48 -0
  331. data/spec/models/order_estimate_request_briefing_spec.rb +32 -0
  332. data/spec/models/order_estimate_request_spec.rb +76 -0
  333. data/spec/models/order_estimate_spec.rb +54 -0
  334. data/spec/models/order_link_request_spec.rb +52 -0
  335. data/spec/models/order_link_spec.rb +52 -0
  336. data/spec/models/order_media_spec.rb +42 -0
  337. data/spec/models/order_project_spec.rb +42 -0
  338. data/spec/models/order_spec.rb +134 -0
  339. data/spec/models/order_state_history_inner_reason_spec.rb +46 -0
  340. data/spec/models/order_state_history_inner_spec.rb +48 -0
  341. data/spec/models/post_order_briefing_request_spec.rb +58 -0
  342. data/spec/models/post_order_briefing_spec.rb +70 -0
  343. data/spec/models/project_catalogue_media_all_of_project_spec.rb +66 -0
  344. data/spec/models/project_catalogue_media_spec.rb +130 -0
  345. data/spec/models/project_spec.rb +104 -0
  346. data/spec/models/put_seller_holiday200_response_spec.rb +42 -0
  347. data/spec/models/put_seller_holiday_request_spec.rb +42 -0
  348. data/spec/models/request_medias201_response_spec.rb +36 -0
  349. data/spec/models/request_medias_request_spec.rb +36 -0
  350. data/spec/models/saved_filter_notifications_spec.rb +46 -0
  351. data/spec/models/saved_filter_spec.rb +60 -0
  352. data/spec/models/seller_fees_or_null_spec.rb +42 -0
  353. data/spec/models/seller_fees_spec.rb +42 -0
  354. data/spec/models/seller_media_flash_offer_spec.rb +42 -0
  355. data/spec/models/seller_media_link_addition_offer_pricing_options_inner_spec.rb +52 -0
  356. data/spec/models/seller_media_link_addition_offer_spec.rb +36 -0
  357. data/spec/models/seller_media_post_offer_pricing_options_inner_spec.rb +58 -0
  358. data/spec/models/seller_media_post_offer_spec.rb +42 -0
  359. data/spec/models/seller_media_spec.rb +148 -0
  360. data/spec/models/seller_order_briefing_spec.rb +32 -0
  361. data/spec/models/seller_order_channel_spec.rb +50 -0
  362. data/spec/models/seller_order_draft_file_spec.rb +36 -0
  363. data/spec/models/seller_order_draft_spec.rb +42 -0
  364. data/spec/models/seller_order_post_delivery_spec.rb +42 -0
  365. data/spec/models/seller_order_project_spec.rb +36 -0
  366. data/spec/models/seller_order_refutation_spec.rb +36 -0
  367. data/spec/models/seller_order_rejection_reason_spec.rb +46 -0
  368. data/spec/models/seller_order_rejection_spec.rb +36 -0
  369. data/spec/models/seller_order_spec.rb +140 -0
  370. data/spec/models/seller_post_order_briefing_spec.rb +80 -0
  371. data/spec/models/seller_transaction_spec.rb +104 -0
  372. data/spec/models/transaction_spec.rb +110 -0
  373. data/spec/models/update_project_request_spec.rb +76 -0
  374. data/spec/models/update_seller_media_request_extra_services_inner_spec.rb +46 -0
  375. data/spec/models/update_seller_media_request_link_addition_offer_pricing_options_inner_spec.rb +46 -0
  376. data/spec/models/update_seller_media_request_link_addition_offer_spec.rb +36 -0
  377. data/spec/models/update_seller_media_request_post_offer_pricing_options_inner_spec.rb +52 -0
  378. data/spec/models/update_seller_media_request_post_offer_spec.rb +36 -0
  379. data/spec/models/update_seller_media_request_spec.rb +48 -0
  380. data/spec/models/upload_file201_response_spec.rb +54 -0
  381. data/spec/models/withdrawal_spec.rb +74 -0
  382. data/spec/spec_helper.rb +111 -0
  383. metadata +618 -0
@@ -0,0 +1,164 @@
1
+ =begin
2
+ #Growwer API
3
+
4
+ #The Growwer customer API. Authenticate every call with an API key created on your profile page, sent as `Authorization: Bearer <key>`. A read key can call every GET operation; writes need a read and write key and an `Idempotency-Key` header. Idempotency: use a new `Idempotency-Key` (1 to 255 printable ASCII characters without spaces) for each operation and reuse it only to retry that same operation. Keys belong to your account, not to one API key. - A successful write is stored for 30 days: a retry with the same key and the same request replays its response with `Idempotent-Replayed: true` and does nothing again. - A refused write (4xx) has no effect and releases its key: once you fix the cause, retry with the same key and the write runs. - A failed write (5xx) may have taken effect, so it is never run again under its key: a retry gets 409 `idempotency_outcome_unknown`. Check whether it took effect before retrying with a new key. - A retry while the first request is still running gets 409 `idempotency_request_in_progress`. A request still running after 5 minutes is treated as failed: a retry gets 409 `idempotency_outcome_unknown`. - The same key with a different request (method, path, query or body) gets 409 `idempotency_key_reused`. A write without the header gets 400 `idempotency_key_required`. Every response carries `X-Request-Id`. Errors share one shape, `{code, message, requestId, details?}`. Money is integer cents plus a currency code and dates are ISO-8601.
5
+
6
+ The version of the OpenAPI document: 1
7
+ Contact: support@growwer.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Growwer
17
+ class SellerOrderRejection < ApiModelBase
18
+ attr_accessor :reason
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'reason' => :'reason'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'reason' => :'SellerOrderRejectionReason'
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 `Growwer::SellerOrderRejection` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::SellerOrderRejection`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'reason')
67
+ self.reason = attributes[:'reason']
68
+ else
69
+ self.reason = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @reason.nil?
79
+ invalid_properties.push('invalid value for "reason", reason cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @reason.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] reason Value to be assigned
95
+ def reason=(reason)
96
+ if reason.nil?
97
+ fail ArgumentError, 'reason cannot be nil'
98
+ end
99
+
100
+ @reason = reason
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ reason == o.reason
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [reason].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -0,0 +1,224 @@
1
+ =begin
2
+ #Growwer API
3
+
4
+ #The Growwer customer API. Authenticate every call with an API key created on your profile page, sent as `Authorization: Bearer <key>`. A read key can call every GET operation; writes need a read and write key and an `Idempotency-Key` header. Idempotency: use a new `Idempotency-Key` (1 to 255 printable ASCII characters without spaces) for each operation and reuse it only to retry that same operation. Keys belong to your account, not to one API key. - A successful write is stored for 30 days: a retry with the same key and the same request replays its response with `Idempotent-Replayed: true` and does nothing again. - A refused write (4xx) has no effect and releases its key: once you fix the cause, retry with the same key and the write runs. - A failed write (5xx) may have taken effect, so it is never run again under its key: a retry gets 409 `idempotency_outcome_unknown`. Check whether it took effect before retrying with a new key. - A retry while the first request is still running gets 409 `idempotency_request_in_progress`. A request still running after 5 minutes is treated as failed: a retry gets 409 `idempotency_outcome_unknown`. - The same key with a different request (method, path, query or body) gets 409 `idempotency_key_reused`. A write without the header gets 400 `idempotency_key_required`. Every response carries `X-Request-Id`. Errors share one shape, `{code, message, requestId, details?}`. Money is integer cents plus a currency code and dates are ISO-8601.
5
+
6
+ The version of the OpenAPI document: 1
7
+ Contact: support@growwer.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Growwer
17
+ class SellerOrderRejectionReason < ApiModelBase
18
+ # Why you reject the order, as the seller order page offers it.
19
+ attr_accessor :name
20
+
21
+ # More about the reason, which the buyer is told, 10 to 2000 characters. Required with `other_reasons`.
22
+ attr_accessor :additional_info
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'name' => :'name',
50
+ :'additional_info' => :'additionalInfo'
51
+ }
52
+ end
53
+
54
+ # Returns attribute mapping this model knows about
55
+ def self.acceptable_attribute_map
56
+ attribute_map
57
+ end
58
+
59
+ # Returns all the JSON keys this model knows about
60
+ def self.acceptable_attributes
61
+ acceptable_attribute_map.values
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.openapi_types
66
+ {
67
+ :'name' => :'String',
68
+ :'additional_info' => :'String'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ :'additional_info'
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Growwer::SellerOrderRejectionReason` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ acceptable_attribute_map = self.class.acceptable_attribute_map
88
+ attributes = attributes.each_with_object({}) { |(k, v), h|
89
+ if (!acceptable_attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::SellerOrderRejectionReason`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
91
+ end
92
+ h[k.to_sym] = v
93
+ }
94
+
95
+ if attributes.key?(:'name')
96
+ self.name = attributes[:'name']
97
+ else
98
+ self.name = nil
99
+ end
100
+
101
+ if attributes.key?(:'additional_info')
102
+ self.additional_info = attributes[:'additional_info']
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
110
+ invalid_properties = Array.new
111
+ if @name.nil?
112
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
113
+ end
114
+
115
+ if !@additional_info.nil? && @additional_info.to_s.length > 2000
116
+ invalid_properties.push('invalid value for "additional_info", the character length must be smaller than or equal to 2000.')
117
+ end
118
+
119
+ if !@additional_info.nil? && @additional_info.to_s.length < 10
120
+ invalid_properties.push('invalid value for "additional_info", the character length must be greater than or equal to 10.')
121
+ end
122
+
123
+ invalid_properties
124
+ end
125
+
126
+ # Check to see if the all the properties in the model are valid
127
+ # @return true if the model is valid
128
+ def valid?
129
+ warn '[DEPRECATED] the `valid?` method is obsolete'
130
+ return false if @name.nil?
131
+ name_validator = EnumAttributeValidator.new('String', ["media_is_competition", "media_has_exclusivity", "forbidden_topic", "other_reasons"])
132
+ return false unless name_validator.valid?(@name)
133
+ return false if !@additional_info.nil? && @additional_info.to_s.length > 2000
134
+ return false if !@additional_info.nil? && @additional_info.to_s.length < 10
135
+ true
136
+ end
137
+
138
+ # Custom attribute writer method checking allowed values (enum).
139
+ # @param [Object] name Object to be assigned
140
+ def name=(name)
141
+ validator = EnumAttributeValidator.new('String', ["media_is_competition", "media_has_exclusivity", "forbidden_topic", "other_reasons"])
142
+ unless validator.valid?(name)
143
+ fail ArgumentError, "invalid value for \"name\", must be one of #{validator.allowable_values}."
144
+ end
145
+ @name = name
146
+ end
147
+
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] additional_info Value to be assigned
150
+ def additional_info=(additional_info)
151
+ if !additional_info.nil? && additional_info.to_s.length > 2000
152
+ fail ArgumentError, 'invalid value for "additional_info", the character length must be smaller than or equal to 2000.'
153
+ end
154
+
155
+ if !additional_info.nil? && additional_info.to_s.length < 10
156
+ fail ArgumentError, 'invalid value for "additional_info", the character length must be greater than or equal to 10.'
157
+ end
158
+
159
+ @additional_info = additional_info
160
+ end
161
+
162
+ # Checks equality by comparing each attribute.
163
+ # @param [Object] Object to be compared
164
+ def ==(o)
165
+ return true if self.equal?(o)
166
+ self.class == o.class &&
167
+ name == o.name &&
168
+ additional_info == o.additional_info
169
+ end
170
+
171
+ # @see the `==` method
172
+ # @param [Object] Object to be compared
173
+ def eql?(o)
174
+ self == o
175
+ end
176
+
177
+ # Calculates hash code according to all attributes.
178
+ # @return [Integer] Hash code
179
+ def hash
180
+ [name, additional_info].hash
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def self.build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+ attributes = attributes.transform_keys(&:to_sym)
189
+ transformed_hash = {}
190
+ openapi_types.each_pair do |key, type|
191
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
192
+ transformed_hash["#{key}"] = nil
193
+ elsif type =~ /\AArray<(.*)>/i
194
+ # check to ensure the input is an array given that the attribute
195
+ # is documented as an array but the input is not
196
+ if attributes[attribute_map[key]].is_a?(Array)
197
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
198
+ end
199
+ elsif !attributes[attribute_map[key]].nil?
200
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
201
+ end
202
+ end
203
+ new(transformed_hash)
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = self.send(attr)
212
+ if value.nil?
213
+ is_nullable = self.class.openapi_nullable.include?(attr)
214
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
215
+ end
216
+
217
+ hash[param] = _to_hash(value)
218
+ end
219
+ hash
220
+ end
221
+
222
+ end
223
+
224
+ end
@@ -0,0 +1,314 @@
1
+ =begin
2
+ #Growwer API
3
+
4
+ #The Growwer customer API. Authenticate every call with an API key created on your profile page, sent as `Authorization: Bearer <key>`. A read key can call every GET operation; writes need a read and write key and an `Idempotency-Key` header. Idempotency: use a new `Idempotency-Key` (1 to 255 printable ASCII characters without spaces) for each operation and reuse it only to retry that same operation. Keys belong to your account, not to one API key. - A successful write is stored for 30 days: a retry with the same key and the same request replays its response with `Idempotent-Replayed: true` and does nothing again. - A refused write (4xx) has no effect and releases its key: once you fix the cause, retry with the same key and the write runs. - A failed write (5xx) may have taken effect, so it is never run again under its key: a retry gets 409 `idempotency_outcome_unknown`. Check whether it took effect before retrying with a new key. - A retry while the first request is still running gets 409 `idempotency_request_in_progress`. A request still running after 5 minutes is treated as failed: a retry gets 409 `idempotency_outcome_unknown`. - The same key with a different request (method, path, query or body) gets 409 `idempotency_key_reused`. A write without the header gets 400 `idempotency_key_required`. Every response carries `X-Request-Id`. Errors share one shape, `{code, message, requestId, details?}`. Money is integer cents plus a currency code and dates are ISO-8601.
5
+
6
+ The version of the OpenAPI document: 1
7
+ Contact: support@growwer.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Growwer
17
+ # The briefing of a post order (`type` `post`), as you, the seller, receive it.
18
+ class SellerPostOrderBriefing < ApiModelBase
19
+ attr_accessor :title
20
+
21
+ # The language code of the article.
22
+ attr_accessor :language
23
+
24
+ attr_accessor :links
25
+
26
+ attr_accessor :extra_services
27
+
28
+ attr_accessor :additional_info
29
+
30
+ # Who writes the article; `seller` means you do.
31
+ attr_accessor :written_by
32
+
33
+ # Whether the buyer attached a draft; GET /seller/orders/{id}/briefing downloads it.
34
+ attr_accessor :has_proposed_draft
35
+
36
+ class EnumAttributeValidator
37
+ attr_reader :datatype
38
+ attr_reader :allowable_values
39
+
40
+ def initialize(datatype, allowable_values)
41
+ @allowable_values = allowable_values.map do |value|
42
+ case datatype.to_s
43
+ when /Integer/i
44
+ value.to_i
45
+ when /Float/i
46
+ value.to_f
47
+ else
48
+ value
49
+ end
50
+ end
51
+ end
52
+
53
+ def valid?(value)
54
+ !value || allowable_values.include?(value)
55
+ end
56
+ end
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'title' => :'title',
62
+ :'language' => :'language',
63
+ :'links' => :'links',
64
+ :'extra_services' => :'extraServices',
65
+ :'additional_info' => :'additionalInfo',
66
+ :'written_by' => :'writtenBy',
67
+ :'has_proposed_draft' => :'hasProposedDraft'
68
+ }
69
+ end
70
+
71
+ # Returns attribute mapping this model knows about
72
+ def self.acceptable_attribute_map
73
+ attribute_map
74
+ end
75
+
76
+ # Returns all the JSON keys this model knows about
77
+ def self.acceptable_attributes
78
+ acceptable_attribute_map.values
79
+ end
80
+
81
+ # Attribute type mapping.
82
+ def self.openapi_types
83
+ {
84
+ :'title' => :'String',
85
+ :'language' => :'String',
86
+ :'links' => :'Array<OrderLink>',
87
+ :'extra_services' => :'Array<String>',
88
+ :'additional_info' => :'String',
89
+ :'written_by' => :'String',
90
+ :'has_proposed_draft' => :'Boolean'
91
+ }
92
+ end
93
+
94
+ # List of attributes with nullable: true
95
+ def self.openapi_nullable
96
+ Set.new([
97
+ :'title',
98
+ :'additional_info',
99
+ ])
100
+ end
101
+
102
+ # Initializes the object
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ def initialize(attributes = {})
105
+ if (!attributes.is_a?(Hash))
106
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Growwer::SellerPostOrderBriefing` initialize method"
107
+ end
108
+
109
+ # check to see if the attribute exists and convert string to symbol for hash key
110
+ acceptable_attribute_map = self.class.acceptable_attribute_map
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!acceptable_attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::SellerPostOrderBriefing`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+ if attributes.key?(:'title')
119
+ self.title = attributes[:'title']
120
+ else
121
+ self.title = nil
122
+ end
123
+
124
+ if attributes.key?(:'language')
125
+ self.language = attributes[:'language']
126
+ else
127
+ self.language = nil
128
+ end
129
+
130
+ if attributes.key?(:'links')
131
+ if (value = attributes[:'links']).is_a?(Array)
132
+ self.links = value
133
+ end
134
+ else
135
+ self.links = nil
136
+ end
137
+
138
+ if attributes.key?(:'extra_services')
139
+ if (value = attributes[:'extra_services']).is_a?(Array)
140
+ self.extra_services = value
141
+ end
142
+ else
143
+ self.extra_services = nil
144
+ end
145
+
146
+ if attributes.key?(:'additional_info')
147
+ self.additional_info = attributes[:'additional_info']
148
+ else
149
+ self.additional_info = nil
150
+ end
151
+
152
+ if attributes.key?(:'written_by')
153
+ self.written_by = attributes[:'written_by']
154
+ else
155
+ self.written_by = nil
156
+ end
157
+
158
+ if attributes.key?(:'has_proposed_draft')
159
+ self.has_proposed_draft = attributes[:'has_proposed_draft']
160
+ else
161
+ self.has_proposed_draft = nil
162
+ end
163
+ end
164
+
165
+ # Show invalid properties with the reasons. Usually used together with valid?
166
+ # @return Array for valid properties with the reasons
167
+ def list_invalid_properties
168
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
169
+ invalid_properties = Array.new
170
+ if @language.nil?
171
+ invalid_properties.push('invalid value for "language", language cannot be nil.')
172
+ end
173
+
174
+ if @links.nil?
175
+ invalid_properties.push('invalid value for "links", links cannot be nil.')
176
+ end
177
+
178
+ if @extra_services.nil?
179
+ invalid_properties.push('invalid value for "extra_services", extra_services cannot be nil.')
180
+ end
181
+
182
+ if @written_by.nil?
183
+ invalid_properties.push('invalid value for "written_by", written_by cannot be nil.')
184
+ end
185
+
186
+ if @has_proposed_draft.nil?
187
+ invalid_properties.push('invalid value for "has_proposed_draft", has_proposed_draft cannot be nil.')
188
+ end
189
+
190
+ invalid_properties
191
+ end
192
+
193
+ # Check to see if the all the properties in the model are valid
194
+ # @return true if the model is valid
195
+ def valid?
196
+ warn '[DEPRECATED] the `valid?` method is obsolete'
197
+ return false if @language.nil?
198
+ return false if @links.nil?
199
+ return false if @extra_services.nil?
200
+ return false if @written_by.nil?
201
+ written_by_validator = EnumAttributeValidator.new('String', ["seller", "buyer", "growwer"])
202
+ return false unless written_by_validator.valid?(@written_by)
203
+ return false if @has_proposed_draft.nil?
204
+ true
205
+ end
206
+
207
+ # Custom attribute writer method with validation
208
+ # @param [Object] language Value to be assigned
209
+ def language=(language)
210
+ if language.nil?
211
+ fail ArgumentError, 'language cannot be nil'
212
+ end
213
+
214
+ @language = language
215
+ end
216
+
217
+ # Custom attribute writer method with validation
218
+ # @param [Object] links Value to be assigned
219
+ def links=(links)
220
+ if links.nil?
221
+ fail ArgumentError, 'links cannot be nil'
222
+ end
223
+
224
+ @links = links
225
+ end
226
+
227
+ # Custom attribute writer method checking allowed values (enum).
228
+ # @param [Object] written_by Object to be assigned
229
+ def written_by=(written_by)
230
+ validator = EnumAttributeValidator.new('String', ["seller", "buyer", "growwer"])
231
+ unless validator.valid?(written_by)
232
+ fail ArgumentError, "invalid value for \"written_by\", must be one of #{validator.allowable_values}."
233
+ end
234
+ @written_by = written_by
235
+ end
236
+
237
+ # Custom attribute writer method with validation
238
+ # @param [Object] has_proposed_draft Value to be assigned
239
+ def has_proposed_draft=(has_proposed_draft)
240
+ if has_proposed_draft.nil?
241
+ fail ArgumentError, 'has_proposed_draft cannot be nil'
242
+ end
243
+
244
+ @has_proposed_draft = has_proposed_draft
245
+ end
246
+
247
+ # Checks equality by comparing each attribute.
248
+ # @param [Object] Object to be compared
249
+ def ==(o)
250
+ return true if self.equal?(o)
251
+ self.class == o.class &&
252
+ title == o.title &&
253
+ language == o.language &&
254
+ links == o.links &&
255
+ extra_services == o.extra_services &&
256
+ additional_info == o.additional_info &&
257
+ written_by == o.written_by &&
258
+ has_proposed_draft == o.has_proposed_draft
259
+ end
260
+
261
+ # @see the `==` method
262
+ # @param [Object] Object to be compared
263
+ def eql?(o)
264
+ self == o
265
+ end
266
+
267
+ # Calculates hash code according to all attributes.
268
+ # @return [Integer] Hash code
269
+ def hash
270
+ [title, language, links, extra_services, additional_info, written_by, has_proposed_draft].hash
271
+ end
272
+
273
+ # Builds the object from hash
274
+ # @param [Hash] attributes Model attributes in the form of hash
275
+ # @return [Object] Returns the model itself
276
+ def self.build_from_hash(attributes)
277
+ return nil unless attributes.is_a?(Hash)
278
+ attributes = attributes.transform_keys(&:to_sym)
279
+ transformed_hash = {}
280
+ openapi_types.each_pair do |key, type|
281
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
282
+ transformed_hash["#{key}"] = nil
283
+ elsif type =~ /\AArray<(.*)>/i
284
+ # check to ensure the input is an array given that the attribute
285
+ # is documented as an array but the input is not
286
+ if attributes[attribute_map[key]].is_a?(Array)
287
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
288
+ end
289
+ elsif !attributes[attribute_map[key]].nil?
290
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
291
+ end
292
+ end
293
+ new(transformed_hash)
294
+ end
295
+
296
+ # Returns the object in the form of hash
297
+ # @return [Hash] Returns the object in the form of hash
298
+ def to_hash
299
+ hash = {}
300
+ self.class.attribute_map.each_pair do |attr, param|
301
+ value = self.send(attr)
302
+ if value.nil?
303
+ is_nullable = self.class.openapi_nullable.include?(attr)
304
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
305
+ end
306
+
307
+ hash[param] = _to_hash(value)
308
+ end
309
+ hash
310
+ end
311
+
312
+ end
313
+
314
+ end