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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +306 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +213 -0
- data/docs/Balance.md +20 -0
- data/docs/BuyerMoneyApi.md +362 -0
- data/docs/CatalogueApi.md +731 -0
- data/docs/CatalogueMedia.md +46 -0
- data/docs/CatalogueMediaFlashOffer.md +20 -0
- data/docs/CatalogueMediaMetrics.md +26 -0
- data/docs/CatalogueOffer.md +24 -0
- data/docs/CatalogueOfferOrNull.md +24 -0
- data/docs/CataloguePostOffer.md +30 -0
- data/docs/CataloguePostOfferAllOfExtras.md +20 -0
- data/docs/CataloguePostOfferAllOfExtrasSensitiveTopic.md +20 -0
- data/docs/CodeName.md +20 -0
- data/docs/CountSavedFilterMedias200Response.md +18 -0
- data/docs/CreateProjectRequest.md +32 -0
- data/docs/CreateSavedFilterRequest.md +22 -0
- data/docs/Error.md +24 -0
- data/docs/FilesApi.md +79 -0
- data/docs/GetBuyerWallet200Response.md +20 -0
- data/docs/GetMe200Response.md +34 -0
- data/docs/GetMe200ResponseBuyer.md +18 -0
- data/docs/GetMe200ResponseCatalogue.md +18 -0
- data/docs/GetMe200ResponseManagedService.md +18 -0
- data/docs/GetMe200ResponseSeller.md +24 -0
- data/docs/GetSellerWallet200Response.md +20 -0
- data/docs/GetVocabulary200Response.md +28 -0
- data/docs/GetVocabulary200ResponseTopicsInner.md +20 -0
- data/docs/Invoice.md +24 -0
- data/docs/LinkAdditionOrderBriefing.md +22 -0
- data/docs/LinkAdditionOrderBriefingRequest.md +22 -0
- data/docs/ListBuyerTransactions200Response.md +20 -0
- data/docs/ListFlashOffers200Response.md +20 -0
- data/docs/ListInvoices200Response.md +20 -0
- data/docs/ListManagedServiceCampaigns200Response.md +20 -0
- data/docs/ListManagedServiceProposals200Response.md +20 -0
- data/docs/ListOrders200Response.md +20 -0
- data/docs/ListProjects200Response.md +20 -0
- data/docs/ListSavedFilters200Response.md +20 -0
- data/docs/ListSellerMedias200Response.md +20 -0
- data/docs/ListSellerOrders200Response.md +20 -0
- data/docs/ListSellerTransactions200Response.md +20 -0
- data/docs/ListWithdrawals200Response.md +20 -0
- data/docs/ManagedServiceCampaign.md +40 -0
- data/docs/ManagedServiceCampaignProject.md +20 -0
- data/docs/ManagedServiceCampaignProposalCounts.md +26 -0
- data/docs/ManagedServiceCampaignStrategy.md +26 -0
- data/docs/ManagedServiceProposal.md +40 -0
- data/docs/ManagedServiceProposalBriefing.md +24 -0
- data/docs/ManagedServiceProposalBriefingLinksInner.md +22 -0
- data/docs/ManagedServiceProposalMedia.md +24 -0
- data/docs/ManagedServiceProposalReview.md +20 -0
- data/docs/ManagedServiceProposalReviewRequest.md +18 -0
- data/docs/ManagedServiceProposalReviewRequestReviewsInner.md +22 -0
- data/docs/ManagedServiceProposalsEstimate.md +28 -0
- data/docs/ManagedServiceProposalsEstimateRequest.md +18 -0
- data/docs/ManagedServiceRequest.md +28 -0
- data/docs/ManagedServiceRequestSent.md +18 -0
- data/docs/ManagedServicesApi.md +593 -0
- data/docs/Money.md +20 -0
- data/docs/MoneyOrNull.md +20 -0
- data/docs/Order.md +48 -0
- data/docs/OrderActionReason.md +18 -0
- data/docs/OrderBriefing.md +49 -0
- data/docs/OrderChannel.md +18 -0
- data/docs/OrderCreateRequest.md +32 -0
- data/docs/OrderDelivery.md +20 -0
- data/docs/OrderDraft.md +22 -0
- data/docs/OrderEstimate.md +24 -0
- data/docs/OrderEstimateRequest.md +30 -0
- data/docs/OrderEstimateRequestBriefing.md +49 -0
- data/docs/OrderLink.md +22 -0
- data/docs/OrderLinkRequest.md +22 -0
- data/docs/OrderMedia.md +20 -0
- data/docs/OrderProject.md +20 -0
- data/docs/OrderStateHistoryInner.md +22 -0
- data/docs/OrderStateHistoryInnerReason.md +20 -0
- data/docs/OrdersApi.md +809 -0
- data/docs/PostOrderBriefing.md +28 -0
- data/docs/PostOrderBriefingRequest.md +24 -0
- data/docs/Project.md +38 -0
- data/docs/ProjectCatalogueMedia.md +48 -0
- data/docs/ProjectCatalogueMediaAllOfProject.md +28 -0
- data/docs/ProjectsApi.md +368 -0
- data/docs/PutSellerHoliday200Response.md +20 -0
- data/docs/PutSellerHolidayRequest.md +20 -0
- data/docs/RequestMedias201Response.md +18 -0
- data/docs/RequestMediasRequest.md +18 -0
- data/docs/SavedFilter.md +26 -0
- data/docs/SavedFilterNotifications.md +20 -0
- data/docs/SavedFiltersApi.md +296 -0
- data/docs/SellerFees.md +20 -0
- data/docs/SellerFeesOrNull.md +20 -0
- data/docs/SellerMedia.md +54 -0
- data/docs/SellerMediaFlashOffer.md +20 -0
- data/docs/SellerMediaLinkAdditionOffer.md +18 -0
- data/docs/SellerMediaLinkAdditionOfferPricingOptionsInner.md +22 -0
- data/docs/SellerMediaPostOffer.md +20 -0
- data/docs/SellerMediaPostOfferPricingOptionsInner.md +24 -0
- data/docs/SellerMediasApi.md +301 -0
- data/docs/SellerMoneyApi.md +364 -0
- data/docs/SellerOrder.md +50 -0
- data/docs/SellerOrderBriefing.md +49 -0
- data/docs/SellerOrderChannel.md +20 -0
- data/docs/SellerOrderDraft.md +20 -0
- data/docs/SellerOrderDraftFile.md +18 -0
- data/docs/SellerOrderPostDelivery.md +20 -0
- data/docs/SellerOrderProject.md +18 -0
- data/docs/SellerOrderRefutation.md +18 -0
- data/docs/SellerOrderRejection.md +18 -0
- data/docs/SellerOrderRejectionReason.md +20 -0
- data/docs/SellerOrdersApi.md +893 -0
- data/docs/SellerPostOrderBriefing.md +30 -0
- data/docs/SellerTransaction.md +38 -0
- data/docs/Transaction.md +40 -0
- data/docs/UpdateProjectRequest.md +30 -0
- data/docs/UpdateSellerMediaRequest.md +22 -0
- data/docs/UpdateSellerMediaRequestExtraServicesInner.md +20 -0
- data/docs/UpdateSellerMediaRequestLinkAdditionOffer.md +18 -0
- data/docs/UpdateSellerMediaRequestLinkAdditionOfferPricingOptionsInner.md +20 -0
- data/docs/UpdateSellerMediaRequestPostOffer.md +18 -0
- data/docs/UpdateSellerMediaRequestPostOfferPricingOptionsInner.md +22 -0
- data/docs/UploadFile201Response.md +24 -0
- data/docs/Withdrawal.md +28 -0
- data/git_push.sh +57 -0
- data/growwer.gemspec +41 -0
- data/lib/growwer/api/account_api.rb +215 -0
- data/lib/growwer/api/buyer_money_api.rb +355 -0
- data/lib/growwer/api/catalogue_api.rb +881 -0
- data/lib/growwer/api/files_api.rb +102 -0
- data/lib/growwer/api/managed_services_api.rb +625 -0
- data/lib/growwer/api/orders_api.rb +855 -0
- data/lib/growwer/api/projects_api.rb +398 -0
- data/lib/growwer/api/saved_filters_api.rb +319 -0
- data/lib/growwer/api/seller_medias_api.rb +329 -0
- data/lib/growwer/api/seller_money_api.rb +358 -0
- data/lib/growwer/api/seller_orders_api.rb +963 -0
- data/lib/growwer/api_client.rb +441 -0
- data/lib/growwer/api_error.rb +58 -0
- data/lib/growwer/api_model_base.rb +88 -0
- data/lib/growwer/configuration.rb +392 -0
- data/lib/growwer/models/balance.rb +192 -0
- data/lib/growwer/models/catalogue_media.rb +491 -0
- data/lib/growwer/models/catalogue_media_flash_offer.rb +191 -0
- data/lib/growwer/models/catalogue_media_metrics.rb +200 -0
- data/lib/growwer/models/catalogue_offer.rb +254 -0
- data/lib/growwer/models/catalogue_offer_or_null.rb +254 -0
- data/lib/growwer/models/catalogue_post_offer.rb +333 -0
- data/lib/growwer/models/catalogue_post_offer_all_of_extras.rb +177 -0
- data/lib/growwer/models/catalogue_post_offer_all_of_extras_sensitive_topic.rb +178 -0
- data/lib/growwer/models/code_name.rb +190 -0
- data/lib/growwer/models/count_saved_filter_medias200_response.rb +173 -0
- data/lib/growwer/models/create_project_request.rb +402 -0
- data/lib/growwer/models/create_saved_filter_request.rb +247 -0
- data/lib/growwer/models/error.rb +231 -0
- data/lib/growwer/models/get_buyer_wallet200_response.rb +191 -0
- data/lib/growwer/models/get_me200_response.rb +373 -0
- data/lib/growwer/models/get_me200_response_buyer.rb +164 -0
- data/lib/growwer/models/get_me200_response_catalogue.rb +165 -0
- data/lib/growwer/models/get_me200_response_managed_service.rb +165 -0
- data/lib/growwer/models/get_me200_response_seller.rb +231 -0
- data/lib/growwer/models/get_seller_wallet200_response.rb +191 -0
- data/lib/growwer/models/get_vocabulary200_response.rb +311 -0
- data/lib/growwer/models/get_vocabulary200_response_topics_inner.rb +190 -0
- data/lib/growwer/models/invoice.rb +243 -0
- data/lib/growwer/models/link_addition_order_briefing.rb +204 -0
- data/lib/growwer/models/link_addition_order_briefing_request.rb +201 -0
- data/lib/growwer/models/list_buyer_transactions200_response.rb +192 -0
- data/lib/growwer/models/list_flash_offers200_response.rb +192 -0
- data/lib/growwer/models/list_invoices200_response.rb +192 -0
- data/lib/growwer/models/list_managed_service_campaigns200_response.rb +192 -0
- data/lib/growwer/models/list_managed_service_proposals200_response.rb +192 -0
- data/lib/growwer/models/list_orders200_response.rb +192 -0
- data/lib/growwer/models/list_projects200_response.rb +192 -0
- data/lib/growwer/models/list_saved_filters200_response.rb +192 -0
- data/lib/growwer/models/list_seller_medias200_response.rb +192 -0
- data/lib/growwer/models/list_seller_orders200_response.rb +192 -0
- data/lib/growwer/models/list_seller_transactions200_response.rb +192 -0
- data/lib/growwer/models/list_withdrawals200_response.rb +192 -0
- data/lib/growwer/models/managed_service_campaign.rb +451 -0
- data/lib/growwer/models/managed_service_campaign_project.rb +190 -0
- data/lib/growwer/models/managed_service_campaign_proposal_counts.rb +269 -0
- data/lib/growwer/models/managed_service_campaign_strategy.rb +300 -0
- data/lib/growwer/models/managed_service_proposal.rb +428 -0
- data/lib/growwer/models/managed_service_proposal_briefing.rb +244 -0
- data/lib/growwer/models/managed_service_proposal_briefing_links_inner.rb +226 -0
- data/lib/growwer/models/managed_service_proposal_media.rb +214 -0
- data/lib/growwer/models/managed_service_proposal_review.rb +193 -0
- data/lib/growwer/models/managed_service_proposal_review_request.rb +176 -0
- data/lib/growwer/models/managed_service_proposal_review_request_reviews_inner.rb +240 -0
- data/lib/growwer/models/managed_service_proposals_estimate.rb +300 -0
- data/lib/growwer/models/managed_service_proposals_estimate_request.rb +150 -0
- data/lib/growwer/models/managed_service_request.rb +331 -0
- data/lib/growwer/models/managed_service_request_sent.rb +188 -0
- data/lib/growwer/models/money.rb +192 -0
- data/lib/growwer/models/money_or_null.rb +192 -0
- data/lib/growwer/models/order.rb +541 -0
- data/lib/growwer/models/order_action_reason.rb +183 -0
- data/lib/growwer/models/order_briefing.rb +102 -0
- data/lib/growwer/models/order_channel.rb +189 -0
- data/lib/growwer/models/order_create_request.rb +333 -0
- data/lib/growwer/models/order_delivery.rb +179 -0
- data/lib/growwer/models/order_draft.rb +220 -0
- data/lib/growwer/models/order_estimate.rb +246 -0
- data/lib/growwer/models/order_estimate_request.rb +299 -0
- data/lib/growwer/models/order_estimate_request_briefing.rb +102 -0
- data/lib/growwer/models/order_link.rb +214 -0
- data/lib/growwer/models/order_link_request.rb +209 -0
- data/lib/growwer/models/order_media.rb +178 -0
- data/lib/growwer/models/order_project.rb +178 -0
- data/lib/growwer/models/order_state_history_inner.rb +202 -0
- data/lib/growwer/models/order_state_history_inner_reason.rb +200 -0
- data/lib/growwer/models/post_order_briefing.rb +285 -0
- data/lib/growwer/models/post_order_briefing_request.rb +220 -0
- data/lib/growwer/models/project.rb +437 -0
- data/lib/growwer/models/project_catalogue_media.rb +524 -0
- data/lib/growwer/models/project_catalogue_media_all_of_project.rb +298 -0
- data/lib/growwer/models/put_seller_holiday200_response.rb +177 -0
- data/lib/growwer/models/put_seller_holiday_request.rb +174 -0
- data/lib/growwer/models/request_medias201_response.rb +166 -0
- data/lib/growwer/models/request_medias_request.rb +167 -0
- data/lib/growwer/models/saved_filter.rb +269 -0
- data/lib/growwer/models/saved_filter_notifications.rb +211 -0
- data/lib/growwer/models/seller_fees.rb +164 -0
- data/lib/growwer/models/seller_fees_or_null.rb +164 -0
- data/lib/growwer/models/seller_media.rb +573 -0
- data/lib/growwer/models/seller_media_flash_offer.rb +191 -0
- data/lib/growwer/models/seller_media_link_addition_offer.rb +167 -0
- data/lib/growwer/models/seller_media_link_addition_offer_pricing_options_inner.rb +228 -0
- data/lib/growwer/models/seller_media_post_offer.rb +195 -0
- data/lib/growwer/models/seller_media_post_offer_pricing_options_inner.rb +234 -0
- data/lib/growwer/models/seller_order.rb +563 -0
- data/lib/growwer/models/seller_order_briefing.rb +102 -0
- data/lib/growwer/models/seller_order_channel.rb +214 -0
- data/lib/growwer/models/seller_order_draft.rb +193 -0
- data/lib/growwer/models/seller_order_draft_file.rb +165 -0
- data/lib/growwer/models/seller_order_post_delivery.rb +193 -0
- data/lib/growwer/models/seller_order_project.rb +165 -0
- data/lib/growwer/models/seller_order_refutation.rb +183 -0
- data/lib/growwer/models/seller_order_rejection.rb +164 -0
- data/lib/growwer/models/seller_order_rejection_reason.rb +224 -0
- data/lib/growwer/models/seller_post_order_briefing.rb +314 -0
- data/lib/growwer/models/seller_transaction.rb +415 -0
- data/lib/growwer/models/transaction.rb +427 -0
- data/lib/growwer/models/update_project_request.rb +339 -0
- data/lib/growwer/models/update_seller_media_request.rb +168 -0
- data/lib/growwer/models/update_seller_media_request_extra_services_inner.rb +215 -0
- data/lib/growwer/models/update_seller_media_request_link_addition_offer.rb +166 -0
- data/lib/growwer/models/update_seller_media_request_link_addition_offer_pricing_options_inner.rb +215 -0
- data/lib/growwer/models/update_seller_media_request_post_offer.rb +175 -0
- data/lib/growwer/models/update_seller_media_request_post_offer_pricing_options_inner.rb +210 -0
- data/lib/growwer/models/upload_file201_response.rb +244 -0
- data/lib/growwer/models/withdrawal.rb +322 -0
- data/lib/growwer/version.rb +15 -0
- data/lib/growwer.rb +163 -0
- data/spec/api/account_api_spec.rb +70 -0
- data/spec/api/buyer_money_api_spec.rb +96 -0
- data/spec/api/catalogue_api_spec.rb +213 -0
- data/spec/api/files_api_spec.rb +48 -0
- data/spec/api/managed_services_api_spec.rb +140 -0
- data/spec/api/orders_api_spec.rb +182 -0
- data/spec/api/projects_api_spec.rb +100 -0
- data/spec/api/saved_filters_api_spec.rb +88 -0
- data/spec/api/seller_medias_api_spec.rb +89 -0
- data/spec/api/seller_money_api_spec.rb +97 -0
- data/spec/api/seller_orders_api_spec.rb +199 -0
- data/spec/models/balance_spec.rb +42 -0
- data/spec/models/catalogue_media_flash_offer_spec.rb +42 -0
- data/spec/models/catalogue_media_metrics_spec.rb +60 -0
- data/spec/models/catalogue_media_spec.rb +124 -0
- data/spec/models/catalogue_offer_or_null_spec.rb +58 -0
- data/spec/models/catalogue_offer_spec.rb +58 -0
- data/spec/models/catalogue_post_offer_all_of_extras_sensitive_topic_spec.rb +42 -0
- data/spec/models/catalogue_post_offer_all_of_extras_spec.rb +42 -0
- data/spec/models/catalogue_post_offer_spec.rb +80 -0
- data/spec/models/code_name_spec.rb +42 -0
- data/spec/models/count_saved_filter_medias200_response_spec.rb +36 -0
- data/spec/models/create_project_request_spec.rb +82 -0
- data/spec/models/create_saved_filter_request_spec.rb +52 -0
- data/spec/models/error_spec.rb +54 -0
- data/spec/models/get_buyer_wallet200_response_spec.rb +42 -0
- data/spec/models/get_me200_response_buyer_spec.rb +36 -0
- data/spec/models/get_me200_response_catalogue_spec.rb +36 -0
- data/spec/models/get_me200_response_managed_service_spec.rb +36 -0
- data/spec/models/get_me200_response_seller_spec.rb +54 -0
- data/spec/models/get_me200_response_spec.rb +84 -0
- data/spec/models/get_seller_wallet200_response_spec.rb +42 -0
- data/spec/models/get_vocabulary200_response_spec.rb +74 -0
- data/spec/models/get_vocabulary200_response_topics_inner_spec.rb +42 -0
- data/spec/models/invoice_spec.rb +54 -0
- data/spec/models/link_addition_order_briefing_request_spec.rb +48 -0
- data/spec/models/link_addition_order_briefing_spec.rb +48 -0
- data/spec/models/list_buyer_transactions200_response_spec.rb +42 -0
- data/spec/models/list_flash_offers200_response_spec.rb +42 -0
- data/spec/models/list_invoices200_response_spec.rb +42 -0
- data/spec/models/list_managed_service_campaigns200_response_spec.rb +42 -0
- data/spec/models/list_managed_service_proposals200_response_spec.rb +42 -0
- data/spec/models/list_orders200_response_spec.rb +42 -0
- data/spec/models/list_projects200_response_spec.rb +42 -0
- data/spec/models/list_saved_filters200_response_spec.rb +42 -0
- data/spec/models/list_seller_medias200_response_spec.rb +42 -0
- data/spec/models/list_seller_orders200_response_spec.rb +42 -0
- data/spec/models/list_seller_transactions200_response_spec.rb +42 -0
- data/spec/models/list_withdrawals200_response_spec.rb +42 -0
- data/spec/models/managed_service_campaign_project_spec.rb +42 -0
- data/spec/models/managed_service_campaign_proposal_counts_spec.rb +60 -0
- data/spec/models/managed_service_campaign_spec.rb +106 -0
- data/spec/models/managed_service_campaign_strategy_spec.rb +64 -0
- data/spec/models/managed_service_proposal_briefing_links_inner_spec.rb +52 -0
- data/spec/models/managed_service_proposal_briefing_spec.rb +54 -0
- data/spec/models/managed_service_proposal_media_spec.rb +54 -0
- data/spec/models/managed_service_proposal_review_request_reviews_inner_spec.rb +52 -0
- data/spec/models/managed_service_proposal_review_request_spec.rb +36 -0
- data/spec/models/managed_service_proposal_review_spec.rb +42 -0
- data/spec/models/managed_service_proposal_spec.rb +110 -0
- data/spec/models/managed_service_proposals_estimate_request_spec.rb +36 -0
- data/spec/models/managed_service_proposals_estimate_spec.rb +66 -0
- data/spec/models/managed_service_request_sent_spec.rb +40 -0
- data/spec/models/managed_service_request_spec.rb +74 -0
- data/spec/models/money_or_null_spec.rb +42 -0
- data/spec/models/money_spec.rb +42 -0
- data/spec/models/order_action_reason_spec.rb +36 -0
- data/spec/models/order_briefing_spec.rb +32 -0
- data/spec/models/order_channel_spec.rb +40 -0
- data/spec/models/order_create_request_spec.rb +82 -0
- data/spec/models/order_delivery_spec.rb +42 -0
- data/spec/models/order_draft_spec.rb +48 -0
- data/spec/models/order_estimate_request_briefing_spec.rb +32 -0
- data/spec/models/order_estimate_request_spec.rb +76 -0
- data/spec/models/order_estimate_spec.rb +54 -0
- data/spec/models/order_link_request_spec.rb +52 -0
- data/spec/models/order_link_spec.rb +52 -0
- data/spec/models/order_media_spec.rb +42 -0
- data/spec/models/order_project_spec.rb +42 -0
- data/spec/models/order_spec.rb +134 -0
- data/spec/models/order_state_history_inner_reason_spec.rb +46 -0
- data/spec/models/order_state_history_inner_spec.rb +48 -0
- data/spec/models/post_order_briefing_request_spec.rb +58 -0
- data/spec/models/post_order_briefing_spec.rb +70 -0
- data/spec/models/project_catalogue_media_all_of_project_spec.rb +66 -0
- data/spec/models/project_catalogue_media_spec.rb +130 -0
- data/spec/models/project_spec.rb +104 -0
- data/spec/models/put_seller_holiday200_response_spec.rb +42 -0
- data/spec/models/put_seller_holiday_request_spec.rb +42 -0
- data/spec/models/request_medias201_response_spec.rb +36 -0
- data/spec/models/request_medias_request_spec.rb +36 -0
- data/spec/models/saved_filter_notifications_spec.rb +46 -0
- data/spec/models/saved_filter_spec.rb +60 -0
- data/spec/models/seller_fees_or_null_spec.rb +42 -0
- data/spec/models/seller_fees_spec.rb +42 -0
- data/spec/models/seller_media_flash_offer_spec.rb +42 -0
- data/spec/models/seller_media_link_addition_offer_pricing_options_inner_spec.rb +52 -0
- data/spec/models/seller_media_link_addition_offer_spec.rb +36 -0
- data/spec/models/seller_media_post_offer_pricing_options_inner_spec.rb +58 -0
- data/spec/models/seller_media_post_offer_spec.rb +42 -0
- data/spec/models/seller_media_spec.rb +148 -0
- data/spec/models/seller_order_briefing_spec.rb +32 -0
- data/spec/models/seller_order_channel_spec.rb +50 -0
- data/spec/models/seller_order_draft_file_spec.rb +36 -0
- data/spec/models/seller_order_draft_spec.rb +42 -0
- data/spec/models/seller_order_post_delivery_spec.rb +42 -0
- data/spec/models/seller_order_project_spec.rb +36 -0
- data/spec/models/seller_order_refutation_spec.rb +36 -0
- data/spec/models/seller_order_rejection_reason_spec.rb +46 -0
- data/spec/models/seller_order_rejection_spec.rb +36 -0
- data/spec/models/seller_order_spec.rb +140 -0
- data/spec/models/seller_post_order_briefing_spec.rb +80 -0
- data/spec/models/seller_transaction_spec.rb +104 -0
- data/spec/models/transaction_spec.rb +110 -0
- data/spec/models/update_project_request_spec.rb +76 -0
- data/spec/models/update_seller_media_request_extra_services_inner_spec.rb +46 -0
- data/spec/models/update_seller_media_request_link_addition_offer_pricing_options_inner_spec.rb +46 -0
- data/spec/models/update_seller_media_request_link_addition_offer_spec.rb +36 -0
- data/spec/models/update_seller_media_request_post_offer_pricing_options_inner_spec.rb +52 -0
- data/spec/models/update_seller_media_request_post_offer_spec.rb +36 -0
- data/spec/models/update_seller_media_request_spec.rb +48 -0
- data/spec/models/upload_file201_response_spec.rb +54 -0
- data/spec/models/withdrawal_spec.rb +74 -0
- data/spec/spec_helper.rb +111 -0
- metadata +618 -0
|
@@ -0,0 +1,183 @@
|
|
|
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 OrderActionReason < ApiModelBase
|
|
18
|
+
# What the seller is told, 10 to 2000 characters once trimmed.
|
|
19
|
+
attr_accessor :reason
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'reason' => :'reason'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'reason' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Growwer::OrderActionReason` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::OrderActionReason`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'reason')
|
|
68
|
+
self.reason = attributes[:'reason']
|
|
69
|
+
else
|
|
70
|
+
self.reason = nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @reason.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if @reason.to_s.length > 2000
|
|
84
|
+
invalid_properties.push('invalid value for "reason", the character length must be smaller than or equal to 2000.')
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if @reason.to_s.length < 10
|
|
88
|
+
invalid_properties.push('invalid value for "reason", the character length must be greater than or equal to 10.')
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
invalid_properties
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Check to see if the all the properties in the model are valid
|
|
95
|
+
# @return true if the model is valid
|
|
96
|
+
def valid?
|
|
97
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
98
|
+
return false if @reason.nil?
|
|
99
|
+
return false if @reason.to_s.length > 2000
|
|
100
|
+
return false if @reason.to_s.length < 10
|
|
101
|
+
true
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Custom attribute writer method with validation
|
|
105
|
+
# @param [Object] reason Value to be assigned
|
|
106
|
+
def reason=(reason)
|
|
107
|
+
if reason.nil?
|
|
108
|
+
fail ArgumentError, 'reason cannot be nil'
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if reason.to_s.length > 2000
|
|
112
|
+
fail ArgumentError, 'invalid value for "reason", the character length must be smaller than or equal to 2000.'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if reason.to_s.length < 10
|
|
116
|
+
fail ArgumentError, 'invalid value for "reason", the character length must be greater than or equal to 10.'
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
@reason = reason
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Checks equality by comparing each attribute.
|
|
123
|
+
# @param [Object] Object to be compared
|
|
124
|
+
def ==(o)
|
|
125
|
+
return true if self.equal?(o)
|
|
126
|
+
self.class == o.class &&
|
|
127
|
+
reason == o.reason
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# @see the `==` method
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def eql?(o)
|
|
133
|
+
self == o
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Calculates hash code according to all attributes.
|
|
137
|
+
# @return [Integer] Hash code
|
|
138
|
+
def hash
|
|
139
|
+
[reason].hash
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Builds the object from hash
|
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
|
+
# @return [Object] Returns the model itself
|
|
145
|
+
def self.build_from_hash(attributes)
|
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
148
|
+
transformed_hash = {}
|
|
149
|
+
openapi_types.each_pair do |key, type|
|
|
150
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
151
|
+
transformed_hash["#{key}"] = nil
|
|
152
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
153
|
+
# check to ensure the input is an array given that the attribute
|
|
154
|
+
# is documented as an array but the input is not
|
|
155
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
156
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
157
|
+
end
|
|
158
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
159
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
new(transformed_hash)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Returns the object in the form of hash
|
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
|
167
|
+
def to_hash
|
|
168
|
+
hash = {}
|
|
169
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
170
|
+
value = self.send(attr)
|
|
171
|
+
if value.nil?
|
|
172
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
173
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
hash[param] = _to_hash(value)
|
|
177
|
+
end
|
|
178
|
+
hash
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
end
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
module OrderBriefing
|
|
18
|
+
class << self
|
|
19
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
20
|
+
def openapi_one_of
|
|
21
|
+
[
|
|
22
|
+
:'LinkAdditionOrderBriefing',
|
|
23
|
+
:'PostOrderBriefing'
|
|
24
|
+
]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Builds the object
|
|
28
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
29
|
+
# @return [Object] Returns the model or the data itself
|
|
30
|
+
def build(data)
|
|
31
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
|
32
|
+
# Note:
|
|
33
|
+
# - We do not attempt to check whether exactly one item matches.
|
|
34
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
35
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
36
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
37
|
+
# - TODO: logging when debugging is set.
|
|
38
|
+
openapi_one_of.each do |klass|
|
|
39
|
+
begin
|
|
40
|
+
next if klass == :AnyType # "nullable: true"
|
|
41
|
+
return find_and_cast_into_type(klass, data)
|
|
42
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
openapi_one_of.include?(:AnyType) ? data : nil
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
private
|
|
50
|
+
|
|
51
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
52
|
+
|
|
53
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
54
|
+
def find_and_cast_into_type(klass, data)
|
|
55
|
+
return if data.nil?
|
|
56
|
+
|
|
57
|
+
case klass.to_s
|
|
58
|
+
when 'Boolean'
|
|
59
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
60
|
+
when 'Float'
|
|
61
|
+
return data if data.instance_of?(Float)
|
|
62
|
+
when 'Integer'
|
|
63
|
+
return data if data.instance_of?(Integer)
|
|
64
|
+
when 'Time'
|
|
65
|
+
return Time.parse(data)
|
|
66
|
+
when 'Date'
|
|
67
|
+
return Date.iso8601(data)
|
|
68
|
+
when 'String'
|
|
69
|
+
return data if data.instance_of?(String)
|
|
70
|
+
when 'Object' # "type: object"
|
|
71
|
+
return data if data.instance_of?(Hash)
|
|
72
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
73
|
+
if data.instance_of?(Array)
|
|
74
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
75
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
76
|
+
end
|
|
77
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
78
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
79
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
80
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
81
|
+
end
|
|
82
|
+
else # model
|
|
83
|
+
const = Growwer.const_get(klass)
|
|
84
|
+
if const
|
|
85
|
+
if const.respond_to?(:openapi_one_of) # nested oneOf model
|
|
86
|
+
model = const.build(data)
|
|
87
|
+
return model if model
|
|
88
|
+
else
|
|
89
|
+
model = const.build_from_hash(data)
|
|
90
|
+
return model if model
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
raise # if no match by now, raise
|
|
96
|
+
rescue
|
|
97
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
end
|
|
@@ -0,0 +1,189 @@
|
|
|
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 OrderChannel < ApiModelBase
|
|
18
|
+
# Whether the order was placed through this API or on the web.
|
|
19
|
+
attr_accessor :created
|
|
20
|
+
|
|
21
|
+
class EnumAttributeValidator
|
|
22
|
+
attr_reader :datatype
|
|
23
|
+
attr_reader :allowable_values
|
|
24
|
+
|
|
25
|
+
def initialize(datatype, allowable_values)
|
|
26
|
+
@allowable_values = allowable_values.map do |value|
|
|
27
|
+
case datatype.to_s
|
|
28
|
+
when /Integer/i
|
|
29
|
+
value.to_i
|
|
30
|
+
when /Float/i
|
|
31
|
+
value.to_f
|
|
32
|
+
else
|
|
33
|
+
value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def valid?(value)
|
|
39
|
+
!value || allowable_values.include?(value)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
44
|
+
def self.attribute_map
|
|
45
|
+
{
|
|
46
|
+
:'created' => :'created'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns attribute mapping this model knows about
|
|
51
|
+
def self.acceptable_attribute_map
|
|
52
|
+
attribute_map
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
|
56
|
+
def self.acceptable_attributes
|
|
57
|
+
acceptable_attribute_map.values
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute type mapping.
|
|
61
|
+
def self.openapi_types
|
|
62
|
+
{
|
|
63
|
+
:'created' => :'String'
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# List of attributes with nullable: true
|
|
68
|
+
def self.openapi_nullable
|
|
69
|
+
Set.new([
|
|
70
|
+
])
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Initializes the object
|
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
75
|
+
def initialize(attributes = {})
|
|
76
|
+
if (!attributes.is_a?(Hash))
|
|
77
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Growwer::OrderChannel` initialize method"
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
81
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
82
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
83
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::OrderChannel`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
85
|
+
end
|
|
86
|
+
h[k.to_sym] = v
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'created')
|
|
90
|
+
self.created = attributes[:'created']
|
|
91
|
+
else
|
|
92
|
+
self.created = nil
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
97
|
+
# @return Array for valid properties with the reasons
|
|
98
|
+
def list_invalid_properties
|
|
99
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
|
+
invalid_properties = Array.new
|
|
101
|
+
if @created.nil?
|
|
102
|
+
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
invalid_properties
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Check to see if the all the properties in the model are valid
|
|
109
|
+
# @return true if the model is valid
|
|
110
|
+
def valid?
|
|
111
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
112
|
+
return false if @created.nil?
|
|
113
|
+
created_validator = EnumAttributeValidator.new('String', ["api", "web"])
|
|
114
|
+
return false unless created_validator.valid?(@created)
|
|
115
|
+
true
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
119
|
+
# @param [Object] created Object to be assigned
|
|
120
|
+
def created=(created)
|
|
121
|
+
validator = EnumAttributeValidator.new('String', ["api", "web"])
|
|
122
|
+
unless validator.valid?(created)
|
|
123
|
+
fail ArgumentError, "invalid value for \"created\", must be one of #{validator.allowable_values}."
|
|
124
|
+
end
|
|
125
|
+
@created = created
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
created == o.created
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# @see the `==` method
|
|
137
|
+
# @param [Object] Object to be compared
|
|
138
|
+
def eql?(o)
|
|
139
|
+
self == o
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Calculates hash code according to all attributes.
|
|
143
|
+
# @return [Integer] Hash code
|
|
144
|
+
def hash
|
|
145
|
+
[created].hash
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Builds the object from hash
|
|
149
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
150
|
+
# @return [Object] Returns the model itself
|
|
151
|
+
def self.build_from_hash(attributes)
|
|
152
|
+
return nil unless attributes.is_a?(Hash)
|
|
153
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
154
|
+
transformed_hash = {}
|
|
155
|
+
openapi_types.each_pair do |key, type|
|
|
156
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
157
|
+
transformed_hash["#{key}"] = nil
|
|
158
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
159
|
+
# check to ensure the input is an array given that the attribute
|
|
160
|
+
# is documented as an array but the input is not
|
|
161
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
162
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
163
|
+
end
|
|
164
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
165
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
new(transformed_hash)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Returns the object in the form of hash
|
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
|
173
|
+
def to_hash
|
|
174
|
+
hash = {}
|
|
175
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
176
|
+
value = self.send(attr)
|
|
177
|
+
if value.nil?
|
|
178
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
179
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
hash[param] = _to_hash(value)
|
|
183
|
+
end
|
|
184
|
+
hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
end
|