printful_client 1.0.1
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/Gemfile.lock +72 -0
- data/LICENSE +21 -0
- data/README.md +43 -0
- data/docs/AddFile200Response.md +20 -0
- data/docs/Address.md +42 -0
- data/docs/AddressInfo.md +28 -0
- data/docs/ApprovalSheet.md +18 -0
- data/docs/ApprovalSheetChanges.md +20 -0
- data/docs/ApprovalSheetChangesFilesInner.md +18 -0
- data/docs/ApprovalSheetWebhookFile.md +24 -0
- data/docs/ApprovalSheetsAPIClient.md +216 -0
- data/docs/ApproveDesign200Response.md +20 -0
- data/docs/ApproveDesign200ResponseAllOfResult.md +18 -0
- data/docs/AvailabilityStatus.md +20 -0
- data/docs/AvailableTechnique.md +22 -0
- data/docs/AverageFulfillmentTime.md +20 -0
- data/docs/CalculateShippingRates.md +24 -0
- data/docs/CalculateShippingRates200Response.md +20 -0
- data/docs/CalculateTaxRates200Response.md +20 -0
- data/docs/CatalogAPIClient.md +400 -0
- data/docs/CatalogFileOption.md +24 -0
- data/docs/Category.md +26 -0
- data/docs/ChangePackingSlip200Response.md +20 -0
- data/docs/ChangePackingSlip200ResponseResult.md +18 -0
- data/docs/Costs.md +38 -0
- data/docs/CostsByAmountInner.md +34 -0
- data/docs/CostsByProductInner.md +26 -0
- data/docs/CostsByVariantInner.md +28 -0
- data/docs/Country.md +24 -0
- data/docs/CountryStateCodeAPIClient.md +69 -0
- data/docs/CreateGenerationTask.md +32 -0
- data/docs/CreateGeneratorTask200Response.md +20 -0
- data/docs/CreateOrder200Response.md +20 -0
- data/docs/CreateSyncProduct200Response.md +20 -0
- data/docs/CreateSyncProduct400Response.md +22 -0
- data/docs/CreateSyncProduct400ResponseError.md +20 -0
- data/docs/CreateWebhookRequest.md +22 -0
- data/docs/DeleteProductTemplate200Response.md +20 -0
- data/docs/DeleteProductTemplate200ResponseAllOfResult.md +18 -0
- data/docs/DeleteSyncVariant200Response.md +20 -0
- data/docs/EcommercePlatformSyncAPIClient.md +459 -0
- data/docs/EstimateOrderCosts200Response.md +20 -0
- data/docs/EstimateOrderCosts200ResponseAllOfResult.md +20 -0
- data/docs/File.md +50 -0
- data/docs/FileLibraryAPIClient.md +220 -0
- data/docs/FileOption.md +20 -0
- data/docs/FileType.md +26 -0
- data/docs/GenerationTask.md +26 -0
- data/docs/GenerationTaskExtraMockup.md +24 -0
- data/docs/GenerationTaskFile.md +24 -0
- data/docs/GenerationTaskFilePosition.md +28 -0
- data/docs/GenerationTaskMockup.md +24 -0
- data/docs/GenerationTaskTemplateFile.md +22 -0
- data/docs/GetApprovalSheets200Response.md +20 -0
- data/docs/GetCategories200Response.md +20 -0
- data/docs/GetCategoryById200Response.md +20 -0
- data/docs/GetCountries200Response.md +20 -0
- data/docs/GetOrderByIdIdParameter.md +49 -0
- data/docs/GetOrders200Response.md +22 -0
- data/docs/GetPrintfiles200Response.md +20 -0
- data/docs/GetProductById200Response.md +20 -0
- data/docs/GetProductSizeGuideById200Response.md +20 -0
- data/docs/GetProductSizeGuideById404Response.md +22 -0
- data/docs/GetProductSizeGuideById404ResponseError.md +20 -0
- data/docs/GetProductTemplateById200Response.md +20 -0
- data/docs/GetProductTemplates200Response.md +22 -0
- data/docs/GetProducts200Response.md +20 -0
- data/docs/GetProducts401Response.md +22 -0
- data/docs/GetProducts401ResponseError.md +20 -0
- data/docs/GetScopes200Response.md +20 -0
- data/docs/GetScopes200ResponseAllOfResult.md +18 -0
- data/docs/GetScopes200ResponseAllOfResultScopesInner.md +20 -0
- data/docs/GetStatistics200Response.md +20 -0
- data/docs/GetStore200Response.md +20 -0
- data/docs/GetStoreSyncVariantById200Response.md +20 -0
- data/docs/GetStores200Response.md +22 -0
- data/docs/GetStores403Response.md +22 -0
- data/docs/GetStores403ResponseError.md +20 -0
- data/docs/GetSyncProductById200Response.md +20 -0
- data/docs/GetSyncProductByIdIdParameter.md +49 -0
- data/docs/GetSyncProducts200Response.md +22 -0
- data/docs/GetSyncVariantById200Response.md +20 -0
- data/docs/GetTaxCountries200Response.md +20 -0
- data/docs/GetTaxCountries200ResponseResultInner.md +24 -0
- data/docs/GetTaxCountries200ResponseResultInnerAllOfStatesInner.md +18 -0
- data/docs/GetTemplates200Response.md +20 -0
- data/docs/GetVariantById200Response.md +20 -0
- data/docs/GetWarehouseProduct200Response.md +20 -0
- data/docs/GetWarehouseProducts200Response.md +22 -0
- data/docs/GetWebhooks200Response.md +20 -0
- data/docs/Gift.md +20 -0
- data/docs/IncompleteItem.md +26 -0
- data/docs/Item.md +52 -0
- data/docs/ItemFilesInner.md +52 -0
- data/docs/ItemFilesInnerAllOfPosition.md +30 -0
- data/docs/ItemInfo.md +26 -0
- data/docs/ItemOption.md +20 -0
- data/docs/Material.md +20 -0
- data/docs/Measurement.md +22 -0
- data/docs/MeasurementValue.md +24 -0
- data/docs/MockupGeneratorAPIClient.md +313 -0
- data/docs/OAuthAPIClient.md +74 -0
- data/docs/Option.md +20 -0
- data/docs/OptionType.md +28 -0
- data/docs/Order.md +52 -0
- data/docs/OrderCosts.md +38 -0
- data/docs/OrderEstimateCosts.md +36 -0
- data/docs/OrderEstimateRetailCosts.md +30 -0
- data/docs/OrderEvent.md +52 -0
- data/docs/OrderShipmentItem.md +24 -0
- data/docs/OrdersAPIClient.md +535 -0
- data/docs/PackingSlip.md +28 -0
- data/docs/Paging.md +22 -0
- data/docs/PricingBreakdown.md +24 -0
- data/docs/Printfile.md +28 -0
- data/docs/PrintfileInfo.md +28 -0
- data/docs/PrintfulCosts.md +20 -0
- data/docs/Product.md +50 -0
- data/docs/Product1.md +20 -0
- data/docs/Product1SyncVariantsInner.md +46 -0
- data/docs/ProductInfo.md +20 -0
- data/docs/ProductSizeGuide.md +22 -0
- data/docs/ProductTemplate.md +26 -0
- data/docs/ProductTemplatesAPIClient.md +221 -0
- data/docs/ProductVariant.md +24 -0
- data/docs/ProductsAPIClient.md +679 -0
- data/docs/Profit.md +20 -0
- data/docs/README.md +410 -0
- data/docs/ReportsAPIClient.md +87 -0
- data/docs/Response200.md +18 -0
- data/docs/Response200Paginated.md +20 -0
- data/docs/RetailCosts.md +30 -0
- data/docs/SalesAndCostsInner.md +32 -0
- data/docs/SalesAndCostsSummaryInner.md +24 -0
- data/docs/Shipment.md +36 -0
- data/docs/ShippingInfo.md +32 -0
- data/docs/ShippingRateAPIClient.md +81 -0
- data/docs/SizeTable.md +28 -0
- data/docs/State.md +20 -0
- data/docs/Statistics.md +18 -0
- data/docs/Store.md +22 -0
- data/docs/StoreInformationAPIClient.md +218 -0
- data/docs/StoreStatistics.md +38 -0
- data/docs/SubmitApprovalSheetChanges200Response.md +20 -0
- data/docs/SyncProduct.md +32 -0
- data/docs/SyncProductDeleted.md +22 -0
- data/docs/SyncProductEvent.md +32 -0
- data/docs/SyncProductInfo.md +20 -0
- data/docs/SyncVariant.md +46 -0
- data/docs/SyncVariantInfo.md +20 -0
- data/docs/SyncVariantProduct.md +24 -0
- data/docs/TaxAddressInfo.md +24 -0
- data/docs/TaxInfo.md +22 -0
- data/docs/TaxRateAPIClient.md +134 -0
- data/docs/TaxRequest.md +18 -0
- data/docs/Template.md +42 -0
- data/docs/TemplateById.md +42 -0
- data/docs/TemplateByIdColorsInner.md +20 -0
- data/docs/TemplateByIdOptionDataInner.md +20 -0
- data/docs/TemplateByIdPlacementOptionDataInner.md +20 -0
- data/docs/TemplateByIdPlacementOptionDataInnerOptionsInner.md +20 -0
- data/docs/TemplateByIdPlacementsInner.md +24 -0
- data/docs/TemplatePlacementConflict.md +20 -0
- data/docs/TemplateVariantMapping.md +20 -0
- data/docs/TemplateVariantMappingItem.md +20 -0
- data/docs/Templates.md +18 -0
- data/docs/ThreadColors200Response.md +20 -0
- data/docs/ThreadColorsRequest.md +18 -0
- data/docs/TotalPaidOrders.md +20 -0
- data/docs/UpdateSyncProductRequest.md +20 -0
- data/docs/UpdateSyncProductRequestSyncVariantsInner.md +46 -0
- data/docs/UpdateSyncVariantRequest.md +46 -0
- data/docs/Variant.md +42 -0
- data/docs/VariantInfo.md +20 -0
- data/docs/VariantPrintfile.md +20 -0
- data/docs/WarehouseProduct.md +30 -0
- data/docs/WarehouseProductVariant.md +36 -0
- data/docs/WarehouseProductsAPIClient.md +159 -0
- data/docs/Webhook.md +24 -0
- data/docs/WebhookAPIClient.md +225 -0
- data/docs/WebhookInfo.md +22 -0
- data/generate.sh +53 -0
- data/lib/printful_client/api/approval_sheets_api_client.rb +238 -0
- data/lib/printful_client/api/catalog_api_client.rb +394 -0
- data/lib/printful_client/api/country_state_code_api_client.rb +79 -0
- data/lib/printful_client/api/ecommerce_platform_sync_api_client.rb +435 -0
- data/lib/printful_client/api/file_library_api_client.rb +227 -0
- data/lib/printful_client/api/mockup_generator_api_client.rb +318 -0
- data/lib/printful_client/api/o_auth_api_client.rb +79 -0
- data/lib/printful_client/api/orders_api_client.rb +514 -0
- data/lib/printful_client/api/product_templates_api_client.rb +211 -0
- data/lib/printful_client/api/products_api_client.rb +651 -0
- data/lib/printful_client/api/reports_api_client.rb +106 -0
- data/lib/printful_client/api/shipping_rate_api_client.rb +93 -0
- data/lib/printful_client/api/store_information_api_client.rb +209 -0
- data/lib/printful_client/api/tax_rate_api_client.rb +147 -0
- data/lib/printful_client/api/warehouse_products_api_client.rb +157 -0
- data/lib/printful_client/api/webhook_api_client.rb +213 -0
- data/lib/printful_client/api_client.rb +392 -0
- data/lib/printful_client/api_error.rb +58 -0
- data/lib/printful_client/configuration.rb +297 -0
- data/lib/printful_client/models/add_file200_response.rb +231 -0
- data/lib/printful_client/models/address.rb +336 -0
- data/lib/printful_client/models/address_info.rb +287 -0
- data/lib/printful_client/models/approval_sheet.rb +256 -0
- data/lib/printful_client/models/approval_sheet_changes.rb +242 -0
- data/lib/printful_client/models/approval_sheet_changes_files_inner.rb +222 -0
- data/lib/printful_client/models/approval_sheet_webhook_file.rb +241 -0
- data/lib/printful_client/models/approve_design200_response.rb +231 -0
- data/lib/printful_client/models/approve_design200_response_all_of_result.rb +214 -0
- data/lib/printful_client/models/availability_status.rb +225 -0
- data/lib/printful_client/models/available_technique.rb +235 -0
- data/lib/printful_client/models/average_fulfillment_time.rb +226 -0
- data/lib/printful_client/models/calculate_shipping_rates.rb +261 -0
- data/lib/printful_client/models/calculate_shipping_rates200_response.rb +226 -0
- data/lib/printful_client/models/calculate_tax_rates200_response.rb +224 -0
- data/lib/printful_client/models/catalog_file_option.rb +244 -0
- data/lib/printful_client/models/category.rb +290 -0
- data/lib/printful_client/models/change_packing_slip200_response.rb +224 -0
- data/lib/printful_client/models/change_packing_slip200_response_result.rb +215 -0
- data/lib/printful_client/models/costs.rb +316 -0
- data/lib/printful_client/models/costs_by_amount_inner.rb +295 -0
- data/lib/printful_client/models/costs_by_product_inner.rb +255 -0
- data/lib/printful_client/models/costs_by_variant_inner.rb +265 -0
- data/lib/printful_client/models/country.rb +246 -0
- data/lib/printful_client/models/create_generation_task.rb +329 -0
- data/lib/printful_client/models/create_generator_task200_response.rb +231 -0
- data/lib/printful_client/models/create_order200_response.rb +231 -0
- data/lib/printful_client/models/create_sync_product200_response.rb +231 -0
- data/lib/printful_client/models/create_sync_product400_response.rb +234 -0
- data/lib/printful_client/models/create_sync_product400_response_error.rb +223 -0
- data/lib/printful_client/models/create_webhook_request.rb +259 -0
- data/lib/printful_client/models/delete_product_template200_response.rb +231 -0
- data/lib/printful_client/models/delete_product_template200_response_all_of_result.rb +215 -0
- data/lib/printful_client/models/delete_sync_variant200_response.rb +234 -0
- data/lib/printful_client/models/estimate_order_costs200_response.rb +231 -0
- data/lib/printful_client/models/estimate_order_costs200_response_all_of_result.rb +223 -0
- data/lib/printful_client/models/file.rb +385 -0
- data/lib/printful_client/models/file_option.rb +240 -0
- data/lib/printful_client/models/file_type.rb +257 -0
- data/lib/printful_client/models/generation_task.rb +294 -0
- data/lib/printful_client/models/generation_task_extra_mockup.rb +246 -0
- data/lib/printful_client/models/generation_task_file.rb +247 -0
- data/lib/printful_client/models/generation_task_file_position.rb +268 -0
- data/lib/printful_client/models/generation_task_mockup.rb +250 -0
- data/lib/printful_client/models/generation_task_template_file.rb +238 -0
- data/lib/printful_client/models/get_approval_sheets200_response.rb +233 -0
- data/lib/printful_client/models/get_categories200_response.rb +233 -0
- data/lib/printful_client/models/get_category_by_id200_response.rb +231 -0
- data/lib/printful_client/models/get_countries200_response.rb +233 -0
- data/lib/printful_client/models/get_order_by_id_id_parameter.rb +105 -0
- data/lib/printful_client/models/get_orders200_response.rb +242 -0
- data/lib/printful_client/models/get_printfiles200_response.rb +231 -0
- data/lib/printful_client/models/get_product_by_id200_response.rb +231 -0
- data/lib/printful_client/models/get_product_size_guide_by_id200_response.rb +231 -0
- data/lib/printful_client/models/get_product_size_guide_by_id404_response.rb +234 -0
- data/lib/printful_client/models/get_product_size_guide_by_id404_response_error.rb +223 -0
- data/lib/printful_client/models/get_product_template_by_id200_response.rb +231 -0
- data/lib/printful_client/models/get_product_templates200_response.rb +240 -0
- data/lib/printful_client/models/get_products200_response.rb +233 -0
- data/lib/printful_client/models/get_products401_response.rb +234 -0
- data/lib/printful_client/models/get_products401_response_error.rb +223 -0
- data/lib/printful_client/models/get_scopes200_response.rb +231 -0
- data/lib/printful_client/models/get_scopes200_response_all_of_result.rb +216 -0
- data/lib/printful_client/models/get_scopes200_response_all_of_result_scopes_inner.rb +223 -0
- data/lib/printful_client/models/get_statistics200_response.rb +224 -0
- data/lib/printful_client/models/get_store200_response.rb +231 -0
- data/lib/printful_client/models/get_store_sync_variant_by_id200_response.rb +231 -0
- data/lib/printful_client/models/get_stores200_response.rb +242 -0
- data/lib/printful_client/models/get_stores403_response.rb +234 -0
- data/lib/printful_client/models/get_stores403_response_error.rb +223 -0
- data/lib/printful_client/models/get_sync_product_by_id200_response.rb +231 -0
- data/lib/printful_client/models/get_sync_product_by_id_id_parameter.rb +105 -0
- data/lib/printful_client/models/get_sync_products200_response.rb +243 -0
- data/lib/printful_client/models/get_sync_variant_by_id200_response.rb +224 -0
- data/lib/printful_client/models/get_tax_countries200_response.rb +226 -0
- data/lib/printful_client/models/get_tax_countries200_response_result_inner.rb +252 -0
- data/lib/printful_client/models/get_tax_countries200_response_result_inner_all_of_states_inner.rb +215 -0
- data/lib/printful_client/models/get_templates200_response.rb +231 -0
- data/lib/printful_client/models/get_variant_by_id200_response.rb +231 -0
- data/lib/printful_client/models/get_warehouse_product200_response.rb +231 -0
- data/lib/printful_client/models/get_warehouse_products200_response.rb +243 -0
- data/lib/printful_client/models/get_webhooks200_response.rb +231 -0
- data/lib/printful_client/models/gift.rb +264 -0
- data/lib/printful_client/models/incomplete_item.rb +256 -0
- data/lib/printful_client/models/item.rb +389 -0
- data/lib/printful_client/models/item_files_inner.rb +400 -0
- data/lib/printful_client/models/item_files_inner_all_of_position.rb +286 -0
- data/lib/printful_client/models/item_info.rb +263 -0
- data/lib/printful_client/models/item_option.rb +240 -0
- data/lib/printful_client/models/material.rb +225 -0
- data/lib/printful_client/models/measurement.rb +245 -0
- data/lib/printful_client/models/measurement_value.rb +253 -0
- data/lib/printful_client/models/option.rb +226 -0
- data/lib/printful_client/models/option_type.rb +269 -0
- data/lib/printful_client/models/order.rb +406 -0
- data/lib/printful_client/models/order_costs.rb +322 -0
- data/lib/printful_client/models/order_estimate_costs.rb +306 -0
- data/lib/printful_client/models/order_estimate_retail_costs.rb +282 -0
- data/lib/printful_client/models/order_event.rb +396 -0
- data/lib/printful_client/models/order_shipment_item.rb +292 -0
- data/lib/printful_client/models/packing_slip.rb +266 -0
- data/lib/printful_client/models/paging.rb +236 -0
- data/lib/printful_client/models/pricing_breakdown.rb +246 -0
- data/lib/printful_client/models/printfile.rb +300 -0
- data/lib/printful_client/models/printfile_info.rb +270 -0
- data/lib/printful_client/models/printful_costs.rb +226 -0
- data/lib/printful_client/models/product.rb +383 -0
- data/lib/printful_client/models/product1.rb +241 -0
- data/lib/printful_client/models/product1_sync_variants_inner.rb +379 -0
- data/lib/printful_client/models/product_info.rb +225 -0
- data/lib/printful_client/models/product_size_guide.rb +261 -0
- data/lib/printful_client/models/product_template.rb +262 -0
- data/lib/printful_client/models/product_variant.rb +246 -0
- data/lib/printful_client/models/profit.rb +226 -0
- data/lib/printful_client/models/response200.rb +215 -0
- data/lib/printful_client/models/response200_paginated.rb +231 -0
- data/lib/printful_client/models/retail_costs.rb +282 -0
- data/lib/printful_client/models/sales_and_costs_inner.rb +285 -0
- data/lib/printful_client/models/sales_and_costs_summary_inner.rb +245 -0
- data/lib/printful_client/models/shipment.rb +308 -0
- data/lib/printful_client/models/shipping_info.rb +286 -0
- data/lib/printful_client/models/size_table.rb +328 -0
- data/lib/printful_client/models/state.rb +225 -0
- data/lib/printful_client/models/statistics.rb +218 -0
- data/lib/printful_client/models/store.rb +236 -0
- data/lib/printful_client/models/store_statistics.rb +322 -0
- data/lib/printful_client/models/submit_approval_sheet_changes200_response.rb +231 -0
- data/lib/printful_client/models/sync_product.rb +312 -0
- data/lib/printful_client/models/sync_product_deleted.rb +257 -0
- data/lib/printful_client/models/sync_product_event.rb +293 -0
- data/lib/printful_client/models/sync_product_info.rb +226 -0
- data/lib/printful_client/models/sync_variant.rb +359 -0
- data/lib/printful_client/models/sync_variant_info.rb +223 -0
- data/lib/printful_client/models/sync_variant_product.rb +252 -0
- data/lib/printful_client/models/tax_address_info.rb +274 -0
- data/lib/printful_client/models/tax_info.rb +236 -0
- data/lib/printful_client/models/tax_request.rb +222 -0
- data/lib/printful_client/models/template.rb +372 -0
- data/lib/printful_client/models/template_by_id.rb +335 -0
- data/lib/printful_client/models/template_by_id_colors_inner.rb +223 -0
- data/lib/printful_client/models/template_by_id_option_data_inner.rb +225 -0
- data/lib/printful_client/models/template_by_id_placement_option_data_inner.rb +225 -0
- data/lib/printful_client/models/template_by_id_placement_option_data_inner_options_inner.rb +224 -0
- data/lib/printful_client/models/template_by_id_placements_inner.rb +241 -0
- data/lib/printful_client/models/template_placement_conflict.rb +228 -0
- data/lib/printful_client/models/template_variant_mapping.rb +228 -0
- data/lib/printful_client/models/template_variant_mapping_item.rb +226 -0
- data/lib/printful_client/models/templates.rb +217 -0
- data/lib/printful_client/models/thread_colors200_response.rb +233 -0
- data/lib/printful_client/models/thread_colors_request.rb +215 -0
- data/lib/printful_client/models/total_paid_orders.rb +226 -0
- data/lib/printful_client/models/update_sync_product_request.rb +226 -0
- data/lib/printful_client/models/update_sync_product_request_sync_variants_inner.rb +365 -0
- data/lib/printful_client/models/update_sync_variant_request.rb +365 -0
- data/lib/printful_client/models/variant.rb +341 -0
- data/lib/printful_client/models/variant_info.rb +223 -0
- data/lib/printful_client/models/variant_printfile.rb +224 -0
- data/lib/printful_client/models/warehouse_product.rb +312 -0
- data/lib/printful_client/models/warehouse_product_variant.rb +306 -0
- data/lib/printful_client/models/webhook.rb +245 -0
- data/lib/printful_client/models/webhook_info.rb +238 -0
- data/lib/printful_client/version.rb +15 -0
- data/lib/printful_client.rb +216 -0
- data/printful_client.gemspec +38 -0
- data/spec/api/approval_sheets_api_client_spec.rb +75 -0
- data/spec/api/catalog_api_client_spec.rb +107 -0
- data/spec/api/country_state_code_api_client_spec.rb +46 -0
- data/spec/api/ecommerce_platform_sync_api_client_spec.rb +117 -0
- data/spec/api/file_library_api_client_spec.rb +73 -0
- data/spec/api/mockup_generator_api_client_spec.rb +92 -0
- data/spec/api/o_auth_api_client_spec.rb +46 -0
- data/spec/api/orders_api_client_spec.rb +131 -0
- data/spec/api/product_templates_api_client_spec.rb +72 -0
- data/spec/api/products_api_client_spec.rb +155 -0
- data/spec/api/reports_api_client_spec.rb +51 -0
- data/spec/api/shipping_rate_api_client_spec.rb +48 -0
- data/spec/api/store_information_api_client_spec.rb +71 -0
- data/spec/api/tax_rate_api_client_spec.rb +58 -0
- data/spec/api/warehouse_products_api_client_spec.rb +63 -0
- data/spec/api/webhook_api_client_spec.rb +72 -0
- data/spec/api_client_spec.rb +228 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/add_file200_response_spec.rb +40 -0
- data/spec/models/address_info_spec.rb +64 -0
- data/spec/models/address_spec.rb +106 -0
- data/spec/models/approval_sheet_changes_files_inner_spec.rb +34 -0
- data/spec/models/approval_sheet_changes_spec.rb +40 -0
- data/spec/models/approval_sheet_spec.rb +38 -0
- data/spec/models/approval_sheet_webhook_file_spec.rb +52 -0
- data/spec/models/approve_design200_response_all_of_result_spec.rb +34 -0
- data/spec/models/approve_design200_response_spec.rb +40 -0
- data/spec/models/availability_status_spec.rb +40 -0
- data/spec/models/available_technique_spec.rb +46 -0
- data/spec/models/average_fulfillment_time_spec.rb +40 -0
- data/spec/models/calculate_shipping_rates200_response_spec.rb +40 -0
- data/spec/models/calculate_shipping_rates_spec.rb +52 -0
- data/spec/models/calculate_tax_rates200_response_spec.rb +40 -0
- data/spec/models/catalog_file_option_spec.rb +52 -0
- data/spec/models/category_spec.rb +62 -0
- data/spec/models/change_packing_slip200_response_result_spec.rb +34 -0
- data/spec/models/change_packing_slip200_response_spec.rb +40 -0
- data/spec/models/costs_by_amount_inner_spec.rb +82 -0
- data/spec/models/costs_by_product_inner_spec.rb +58 -0
- data/spec/models/costs_by_variant_inner_spec.rb +64 -0
- data/spec/models/costs_spec.rb +94 -0
- data/spec/models/country_spec.rb +52 -0
- data/spec/models/create_generation_task_spec.rb +80 -0
- data/spec/models/create_generator_task200_response_spec.rb +40 -0
- data/spec/models/create_order200_response_spec.rb +40 -0
- data/spec/models/create_sync_product200_response_spec.rb +40 -0
- data/spec/models/create_sync_product400_response_error_spec.rb +40 -0
- data/spec/models/create_sync_product400_response_spec.rb +46 -0
- data/spec/models/create_webhook_request_spec.rb +46 -0
- data/spec/models/delete_product_template200_response_all_of_result_spec.rb +34 -0
- data/spec/models/delete_product_template200_response_spec.rb +40 -0
- data/spec/models/delete_sync_variant200_response_spec.rb +40 -0
- data/spec/models/estimate_order_costs200_response_all_of_result_spec.rb +40 -0
- data/spec/models/estimate_order_costs200_response_spec.rb +40 -0
- data/spec/models/file_option_spec.rb +40 -0
- data/spec/models/file_spec.rb +130 -0
- data/spec/models/file_type_spec.rb +58 -0
- data/spec/models/generation_task_extra_mockup_spec.rb +52 -0
- data/spec/models/generation_task_file_position_spec.rb +64 -0
- data/spec/models/generation_task_file_spec.rb +52 -0
- data/spec/models/generation_task_mockup_spec.rb +52 -0
- data/spec/models/generation_task_spec.rb +62 -0
- data/spec/models/generation_task_template_file_spec.rb +46 -0
- data/spec/models/get_approval_sheets200_response_spec.rb +40 -0
- data/spec/models/get_categories200_response_spec.rb +40 -0
- data/spec/models/get_category_by_id200_response_spec.rb +40 -0
- data/spec/models/get_countries200_response_spec.rb +40 -0
- data/spec/models/get_order_by_id_id_parameter_spec.rb +31 -0
- data/spec/models/get_orders200_response_spec.rb +46 -0
- data/spec/models/get_printfiles200_response_spec.rb +40 -0
- data/spec/models/get_product_by_id200_response_spec.rb +40 -0
- data/spec/models/get_product_size_guide_by_id200_response_spec.rb +40 -0
- data/spec/models/get_product_size_guide_by_id404_response_error_spec.rb +40 -0
- data/spec/models/get_product_size_guide_by_id404_response_spec.rb +46 -0
- data/spec/models/get_product_template_by_id200_response_spec.rb +40 -0
- data/spec/models/get_product_templates200_response_spec.rb +46 -0
- data/spec/models/get_products200_response_spec.rb +40 -0
- data/spec/models/get_products401_response_error_spec.rb +40 -0
- data/spec/models/get_products401_response_spec.rb +46 -0
- data/spec/models/get_scopes200_response_all_of_result_scopes_inner_spec.rb +40 -0
- data/spec/models/get_scopes200_response_all_of_result_spec.rb +34 -0
- data/spec/models/get_scopes200_response_spec.rb +40 -0
- data/spec/models/get_statistics200_response_spec.rb +40 -0
- data/spec/models/get_store200_response_spec.rb +40 -0
- data/spec/models/get_store_sync_variant_by_id200_response_spec.rb +40 -0
- data/spec/models/get_stores200_response_spec.rb +46 -0
- data/spec/models/get_stores403_response_error_spec.rb +40 -0
- data/spec/models/get_stores403_response_spec.rb +46 -0
- data/spec/models/get_sync_product_by_id200_response_spec.rb +40 -0
- data/spec/models/get_sync_product_by_id_id_parameter_spec.rb +31 -0
- data/spec/models/get_sync_products200_response_spec.rb +46 -0
- data/spec/models/get_sync_variant_by_id200_response_spec.rb +40 -0
- data/spec/models/get_tax_countries200_response_result_inner_all_of_states_inner_spec.rb +34 -0
- data/spec/models/get_tax_countries200_response_result_inner_spec.rb +52 -0
- data/spec/models/get_tax_countries200_response_spec.rb +40 -0
- data/spec/models/get_templates200_response_spec.rb +40 -0
- data/spec/models/get_variant_by_id200_response_spec.rb +40 -0
- data/spec/models/get_warehouse_product200_response_spec.rb +40 -0
- data/spec/models/get_warehouse_products200_response_spec.rb +46 -0
- data/spec/models/get_webhooks200_response_spec.rb +40 -0
- data/spec/models/gift_spec.rb +40 -0
- data/spec/models/incomplete_item_spec.rb +58 -0
- data/spec/models/item_files_inner_all_of_position_spec.rb +70 -0
- data/spec/models/item_files_inner_spec.rb +136 -0
- data/spec/models/item_info_spec.rb +58 -0
- data/spec/models/item_option_spec.rb +40 -0
- data/spec/models/item_spec.rb +136 -0
- data/spec/models/material_spec.rb +40 -0
- data/spec/models/measurement_spec.rb +46 -0
- data/spec/models/measurement_value_spec.rb +52 -0
- data/spec/models/option_spec.rb +40 -0
- data/spec/models/option_type_spec.rb +64 -0
- data/spec/models/order_costs_spec.rb +94 -0
- data/spec/models/order_estimate_costs_spec.rb +88 -0
- data/spec/models/order_estimate_retail_costs_spec.rb +70 -0
- data/spec/models/order_event_spec.rb +136 -0
- data/spec/models/order_shipment_item_spec.rb +60 -0
- data/spec/models/order_spec.rb +136 -0
- data/spec/models/packing_slip_spec.rb +64 -0
- data/spec/models/paging_spec.rb +46 -0
- data/spec/models/pricing_breakdown_spec.rb +52 -0
- data/spec/models/printfile_info_spec.rb +64 -0
- data/spec/models/printfile_spec.rb +68 -0
- data/spec/models/printful_costs_spec.rb +40 -0
- data/spec/models/product1_spec.rb +40 -0
- data/spec/models/product1_sync_variants_inner_spec.rb +118 -0
- data/spec/models/product_info_spec.rb +40 -0
- data/spec/models/product_size_guide_spec.rb +46 -0
- data/spec/models/product_spec.rb +130 -0
- data/spec/models/product_template_spec.rb +58 -0
- data/spec/models/product_variant_spec.rb +52 -0
- data/spec/models/profit_spec.rb +40 -0
- data/spec/models/response200_paginated_spec.rb +40 -0
- data/spec/models/response200_spec.rb +34 -0
- data/spec/models/retail_costs_spec.rb +70 -0
- data/spec/models/sales_and_costs_inner_spec.rb +76 -0
- data/spec/models/sales_and_costs_summary_inner_spec.rb +52 -0
- data/spec/models/shipment_spec.rb +88 -0
- data/spec/models/shipping_info_spec.rb +76 -0
- data/spec/models/size_table_spec.rb +72 -0
- data/spec/models/state_spec.rb +40 -0
- data/spec/models/statistics_spec.rb +34 -0
- data/spec/models/store_spec.rb +46 -0
- data/spec/models/store_statistics_spec.rb +94 -0
- data/spec/models/submit_approval_sheet_changes200_response_spec.rb +40 -0
- data/spec/models/sync_product_deleted_spec.rb +46 -0
- data/spec/models/sync_product_event_spec.rb +76 -0
- data/spec/models/sync_product_info_spec.rb +40 -0
- data/spec/models/sync_product_spec.rb +76 -0
- data/spec/models/sync_variant_info_spec.rb +40 -0
- data/spec/models/sync_variant_product_spec.rb +52 -0
- data/spec/models/sync_variant_spec.rb +118 -0
- data/spec/models/tax_address_info_spec.rb +52 -0
- data/spec/models/tax_info_spec.rb +46 -0
- data/spec/models/tax_request_spec.rb +34 -0
- data/spec/models/template_by_id_colors_inner_spec.rb +40 -0
- data/spec/models/template_by_id_option_data_inner_spec.rb +40 -0
- data/spec/models/template_by_id_placement_option_data_inner_options_inner_spec.rb +40 -0
- data/spec/models/template_by_id_placement_option_data_inner_spec.rb +40 -0
- data/spec/models/template_by_id_placements_inner_spec.rb +52 -0
- data/spec/models/template_by_id_spec.rb +106 -0
- data/spec/models/template_placement_conflict_spec.rb +40 -0
- data/spec/models/template_spec.rb +110 -0
- data/spec/models/template_variant_mapping_item_spec.rb +40 -0
- data/spec/models/template_variant_mapping_spec.rb +40 -0
- data/spec/models/templates_spec.rb +34 -0
- data/spec/models/thread_colors200_response_spec.rb +40 -0
- data/spec/models/thread_colors_request_spec.rb +34 -0
- data/spec/models/total_paid_orders_spec.rb +40 -0
- data/spec/models/update_sync_product_request_spec.rb +40 -0
- data/spec/models/update_sync_product_request_sync_variants_inner_spec.rb +118 -0
- data/spec/models/update_sync_variant_request_spec.rb +118 -0
- data/spec/models/variant_info_spec.rb +40 -0
- data/spec/models/variant_printfile_spec.rb +40 -0
- data/spec/models/variant_spec.rb +106 -0
- data/spec/models/warehouse_product_spec.rb +74 -0
- data/spec/models/warehouse_product_variant_spec.rb +88 -0
- data/spec/models/webhook_info_spec.rb +46 -0
- data/spec/models/webhook_spec.rb +52 -0
- data/spec/spec_helper.rb +111 -0
- data/swagger.json +8318 -0
- metadata +812 -0
@@ -0,0 +1,72 @@
|
|
1
|
+
=begin
|
2
|
+
#API Documentation | Printful
|
3
|
+
|
4
|
+
## About the Printful API The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources. ## Requests and responses ### Request endpoint All API requests have to be sent to this URL: ``` https://api.printful.com/ ``` If you are using a proxy, make sure that all requests have host header set to **api.printful.com**. ### Request parameters Some mandatory parameters (like object identifiers) must be included in the request URL path ``` GET /orders/123 ``` Additional parameters can be passed as GET variables: ``` GET /orders?offset=10&limit=5 ``` For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body: ``` POST /orders {\"recipient\":{...},\"items\":[...]} ``` ### Response body The response body is always a JSON object that contains a response status code (identical to the HTTP status code) and the result of the action. If the status code is 200, then the action was successful. ``` { \"code\": 200, //Response status code \"result\":{ //API method return data //... } } ``` Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL. ``` { \"code\": 200, //Response status code \"result\":[ { //Item 11 }, { //Item 12 } ] \"paging\": { \"total\": 12, //Total items available \"offset\": 10, //Items skipped from the beginning \"limit\": 20 //Number of items per page } } ``` ## Error response If the API call is not successful, then the response code is not in the 2xx range and the `result` attribute contains an error description. ``` { \"code\": 404, \"result\": \"Not Found\", \"error\": { \"reason\": \"NotFound\", \"message\": \"Not Found\" } } ``` In general, response codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Printful's servers. ### Timestamps All timestamps from the API are returned as integers in UNIX timestamp format. ### Rate Limits Printful API has a general rate limit of 120 API calls per minute. Additionally, endpoints that perform resource intensive operations (such as mockup generator) have a lower allowed request limit. # Authentication <!-- ReDoc-Inject: <security-definitions> -->
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: devsupport@printful.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Printful::ProductTemplatesAPIClient
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ProductTemplatesAPIClient' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Printful::ProductTemplatesAPIClient.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ProductTemplatesAPIClient' do
|
30
|
+
it 'should create an instance of ProductTemplatesAPIClient' do
|
31
|
+
expect(@api_instance).to be_instance_of(Printful::ProductTemplatesAPIClient)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for delete_product_template
|
36
|
+
# Delete product template
|
37
|
+
# Delete product template by ID or External Product ID
|
38
|
+
# @param id Template ID (integer) or External Product ID (if prefixed with @)
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [DeleteProductTemplate200Response]
|
41
|
+
describe 'delete_product_template test' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# unit tests for get_product_template_by_id
|
48
|
+
# Get product template
|
49
|
+
# Get information about a single product template
|
50
|
+
# @param id Template ID (integer) or External Product ID (if prefixed with @)
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @return [GetProductTemplateById200Response]
|
53
|
+
describe 'get_product_template_by_id test' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# unit tests for get_product_templates
|
60
|
+
# Get product template list
|
61
|
+
# Returns a list of templates.
|
62
|
+
# @param [Hash] opts the optional parameters
|
63
|
+
# @option opts [Integer] :offset Result set offset
|
64
|
+
# @option opts [Integer] :limit Number of items per page (max 100)
|
65
|
+
# @return [GetProductTemplates200Response]
|
66
|
+
describe 'get_product_templates test' do
|
67
|
+
it 'should work' do
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
@@ -0,0 +1,155 @@
|
|
1
|
+
=begin
|
2
|
+
#API Documentation | Printful
|
3
|
+
|
4
|
+
## About the Printful API The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources. ## Requests and responses ### Request endpoint All API requests have to be sent to this URL: ``` https://api.printful.com/ ``` If you are using a proxy, make sure that all requests have host header set to **api.printful.com**. ### Request parameters Some mandatory parameters (like object identifiers) must be included in the request URL path ``` GET /orders/123 ``` Additional parameters can be passed as GET variables: ``` GET /orders?offset=10&limit=5 ``` For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body: ``` POST /orders {\"recipient\":{...},\"items\":[...]} ``` ### Response body The response body is always a JSON object that contains a response status code (identical to the HTTP status code) and the result of the action. If the status code is 200, then the action was successful. ``` { \"code\": 200, //Response status code \"result\":{ //API method return data //... } } ``` Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL. ``` { \"code\": 200, //Response status code \"result\":[ { //Item 11 }, { //Item 12 } ] \"paging\": { \"total\": 12, //Total items available \"offset\": 10, //Items skipped from the beginning \"limit\": 20 //Number of items per page } } ``` ## Error response If the API call is not successful, then the response code is not in the 2xx range and the `result` attribute contains an error description. ``` { \"code\": 404, \"result\": \"Not Found\", \"error\": { \"reason\": \"NotFound\", \"message\": \"Not Found\" } } ``` In general, response codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Printful's servers. ### Timestamps All timestamps from the API are returned as integers in UNIX timestamp format. ### Rate Limits Printful API has a general rate limit of 120 API calls per minute. Additionally, endpoints that perform resource intensive operations (such as mockup generator) have a lower allowed request limit. # Authentication <!-- ReDoc-Inject: <security-definitions> -->
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: devsupport@printful.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Printful::ProductsAPIClient
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ProductsAPIClient' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Printful::ProductsAPIClient.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ProductsAPIClient' do
|
30
|
+
it 'should create an instance of ProductsAPIClient' do
|
31
|
+
expect(@api_instance).to be_instance_of(Printful::ProductsAPIClient)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for create_sync_product
|
36
|
+
# Create a new Sync Product
|
37
|
+
# Creates a new Sync Product together with its Sync Variants ([See examples](#section/Products-API-examples/Create-a-new-Sync-Product)).
|
38
|
+
# @param product1 POST request body
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
41
|
+
# @return [CreateSyncProduct200Response]
|
42
|
+
describe 'create_sync_product test' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# unit tests for create_sync_variant
|
49
|
+
# Create a new Sync Variant
|
50
|
+
# Creates a new Sync Variant for an existing Sync Product ([See examples](#section/Products-API-examples/Create-a-new-Sync-Variant)).
|
51
|
+
# @param id Sync Product ID (integer) or External ID (if prefixed with @)
|
52
|
+
# @param product1_sync_variants_inner POST request body
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
55
|
+
# @return [GetSyncVariantById200Response]
|
56
|
+
describe 'create_sync_variant test' do
|
57
|
+
it 'should work' do
|
58
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# unit tests for delete_sync_product
|
63
|
+
# Delete a Sync Product
|
64
|
+
# Deletes a Sync Product with all of its Sync Variants
|
65
|
+
# @param id Sync Product ID (integer) or External ID (if prefixed with @)
|
66
|
+
# @param [Hash] opts the optional parameters
|
67
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
68
|
+
# @return [GetSyncProductById200Response]
|
69
|
+
describe 'delete_sync_product test' do
|
70
|
+
it 'should work' do
|
71
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# unit tests for delete_sync_variant
|
76
|
+
# Delete a Sync Variant
|
77
|
+
# Deletes a single Sync Variant.
|
78
|
+
# @param id Sync Variant ID (integer) or External ID (if prefixed with @)
|
79
|
+
# @param [Hash] opts the optional parameters
|
80
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
81
|
+
# @return [DeleteSyncVariant200Response]
|
82
|
+
describe 'delete_sync_variant test' do
|
83
|
+
it 'should work' do
|
84
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# unit tests for get_sync_product_by_id
|
89
|
+
# Get a Sync Product
|
90
|
+
# Get information about a single Sync Product and its Sync Variants.
|
91
|
+
# @param id Sync Product ID (integer) or External ID (if prefixed with @)
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
94
|
+
# @return [GetSyncProductById200Response]
|
95
|
+
describe 'get_sync_product_by_id test' do
|
96
|
+
it 'should work' do
|
97
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# unit tests for get_sync_products
|
102
|
+
# Get Sync Products
|
103
|
+
# Returns a list of Sync Product objects from your custom Printful store.
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
106
|
+
# @option opts [String] :category_id A comma-separated list of Category IDs of the Products that are to be returned
|
107
|
+
# @return [GetSyncProducts200Response]
|
108
|
+
describe 'get_sync_products test' do
|
109
|
+
it 'should work' do
|
110
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# unit tests for get_sync_variant_by_id
|
115
|
+
# Get a Sync Variant
|
116
|
+
# Get information about a single Sync Variant.
|
117
|
+
# @param id Sync Variant ID (integer) or External ID (if prefixed with @)
|
118
|
+
# @param [Hash] opts the optional parameters
|
119
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
120
|
+
# @return [GetSyncVariantById200Response]
|
121
|
+
describe 'get_sync_variant_by_id test' do
|
122
|
+
it 'should work' do
|
123
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# unit tests for update_sync_product
|
128
|
+
# Modify a Sync Product
|
129
|
+
# Modifies an existing Sync Product with its Sync Variants. Please note that in the request body you only need to specify the fields that need to be changed. Furthermore, if you want to update existing sync variants, then in the sync variants array you must specify the IDs of all existing sync variants. All omitted existing sync variants will be deleted. All new sync variants without an ID will be created. See examples for more insights. **Rate limiting:** Up to 10 requests per 60 seconds. A 60 seconds lockout is applied if request count is exceeded. [See examples](#section/Products-API-examples/Modify-a-Sync-Product)
|
130
|
+
# @param id Sync Product ID (integer) or External ID (if prefixed with @)
|
131
|
+
# @param update_sync_product_request PUT request body
|
132
|
+
# @param [Hash] opts the optional parameters
|
133
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
134
|
+
# @return [CreateSyncProduct200Response]
|
135
|
+
describe 'update_sync_product test' do
|
136
|
+
it 'should work' do
|
137
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# unit tests for update_sync_variant
|
142
|
+
# Modify a Sync Variant
|
143
|
+
# Modifies an existing Sync Variant. Please note that in the request body you only need to specify the fields that need to be changed. See examples for more insights. [See examples](#section/Products-API-examples/Modify-a-Sync-Variant)
|
144
|
+
# @param id Sync Variant ID (integer) or External ID (if prefixed with @)
|
145
|
+
# @param update_sync_variant_request POST request body
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
148
|
+
# @return [GetSyncVariantById200Response]
|
149
|
+
describe 'update_sync_variant test' do
|
150
|
+
it 'should work' do
|
151
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
=begin
|
2
|
+
#API Documentation | Printful
|
3
|
+
|
4
|
+
## About the Printful API The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources. ## Requests and responses ### Request endpoint All API requests have to be sent to this URL: ``` https://api.printful.com/ ``` If you are using a proxy, make sure that all requests have host header set to **api.printful.com**. ### Request parameters Some mandatory parameters (like object identifiers) must be included in the request URL path ``` GET /orders/123 ``` Additional parameters can be passed as GET variables: ``` GET /orders?offset=10&limit=5 ``` For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body: ``` POST /orders {\"recipient\":{...},\"items\":[...]} ``` ### Response body The response body is always a JSON object that contains a response status code (identical to the HTTP status code) and the result of the action. If the status code is 200, then the action was successful. ``` { \"code\": 200, //Response status code \"result\":{ //API method return data //... } } ``` Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL. ``` { \"code\": 200, //Response status code \"result\":[ { //Item 11 }, { //Item 12 } ] \"paging\": { \"total\": 12, //Total items available \"offset\": 10, //Items skipped from the beginning \"limit\": 20 //Number of items per page } } ``` ## Error response If the API call is not successful, then the response code is not in the 2xx range and the `result` attribute contains an error description. ``` { \"code\": 404, \"result\": \"Not Found\", \"error\": { \"reason\": \"NotFound\", \"message\": \"Not Found\" } } ``` In general, response codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Printful's servers. ### Timestamps All timestamps from the API are returned as integers in UNIX timestamp format. ### Rate Limits Printful API has a general rate limit of 120 API calls per minute. Additionally, endpoints that perform resource intensive operations (such as mockup generator) have a lower allowed request limit. # Authentication <!-- ReDoc-Inject: <security-definitions> -->
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: devsupport@printful.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Printful::ReportsAPIClient
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ReportsAPIClient' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Printful::ReportsAPIClient.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ReportsAPIClient' do
|
30
|
+
it 'should create an instance of ReportsAPIClient' do
|
31
|
+
expect(@api_instance).to be_instance_of(Printful::ReportsAPIClient)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_statistics
|
36
|
+
# Get statistics
|
37
|
+
# Returns statistics for specified report types. You need to specify the report types you want to retrieve in the `report_types` query parameter as a comma-separated list, e.g. `report_types=sales_and_costs,profit`. **Note**: You cannot get statistics for a period longer than 6 months. #### Example To get statistics in the default currency of a store for `sales_and_costs` and `profit` reports for August 2022, you can use the following URL: https://api.printful.com/reports/statistics?report_types=sales_and_costs,profit&date_from=2022-08-01&date_to=2022-08-31. ### Report types Currently, the following report types are available: | Report type | Description | |----------------------------|----------------------------------------------------------| | `sales_and_costs` | Detailed information on sales and costs grouped by date. | | `sales_and_costs_summary` | Short information on sales and costs grouped by date. | | `printful_costs` | Amount paid to Printful for fulfillment and shipping. | | `profit` | Profit in the specified period. | | `total_paid_orders` | The number of paid orders in the specified period. | | `costs_by_amount` | Information on costs by amount grouped by date. | | `costs_by_product` | Information on costs grouped by product. | | `costs_by_variant` | Information on costs grouped by variant. | | `average_fulfillment_time` | Average time it took Printful to fulfill Your orders. | The response structure for the specific reports is documented in the response schema (`result.store_statistics.[reportName]`).
|
38
|
+
# @param date_from The beginning of the period to get the statistics from (date in `Y-m-d` format).
|
39
|
+
# @param date_to The end of the period to get the statistics from (date in `Y-m-d` format).
|
40
|
+
# @param report_types A comma-separated list of report types to be retrieved.
|
41
|
+
# @param [Hash] opts the optional parameters
|
42
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
43
|
+
# @option opts [String] :currency The currency (3-letter code) to return the statistics in. You can also specify `display_currency` as the value to get the statistics in the account's display currency. The store currency will be used by default.
|
44
|
+
# @return [GetStatistics200Response]
|
45
|
+
describe 'get_statistics test' do
|
46
|
+
it 'should work' do
|
47
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
=begin
|
2
|
+
#API Documentation | Printful
|
3
|
+
|
4
|
+
## About the Printful API The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources. ## Requests and responses ### Request endpoint All API requests have to be sent to this URL: ``` https://api.printful.com/ ``` If you are using a proxy, make sure that all requests have host header set to **api.printful.com**. ### Request parameters Some mandatory parameters (like object identifiers) must be included in the request URL path ``` GET /orders/123 ``` Additional parameters can be passed as GET variables: ``` GET /orders?offset=10&limit=5 ``` For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body: ``` POST /orders {\"recipient\":{...},\"items\":[...]} ``` ### Response body The response body is always a JSON object that contains a response status code (identical to the HTTP status code) and the result of the action. If the status code is 200, then the action was successful. ``` { \"code\": 200, //Response status code \"result\":{ //API method return data //... } } ``` Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL. ``` { \"code\": 200, //Response status code \"result\":[ { //Item 11 }, { //Item 12 } ] \"paging\": { \"total\": 12, //Total items available \"offset\": 10, //Items skipped from the beginning \"limit\": 20 //Number of items per page } } ``` ## Error response If the API call is not successful, then the response code is not in the 2xx range and the `result` attribute contains an error description. ``` { \"code\": 404, \"result\": \"Not Found\", \"error\": { \"reason\": \"NotFound\", \"message\": \"Not Found\" } } ``` In general, response codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Printful's servers. ### Timestamps All timestamps from the API are returned as integers in UNIX timestamp format. ### Rate Limits Printful API has a general rate limit of 120 API calls per minute. Additionally, endpoints that perform resource intensive operations (such as mockup generator) have a lower allowed request limit. # Authentication <!-- ReDoc-Inject: <security-definitions> -->
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: devsupport@printful.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Printful::ShippingRateAPIClient
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ShippingRateAPIClient' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Printful::ShippingRateAPIClient.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ShippingRateAPIClient' do
|
30
|
+
it 'should create an instance of ShippingRateAPIClient' do
|
31
|
+
expect(@api_instance).to be_instance_of(Printful::ShippingRateAPIClient)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for calculate_shipping_rates
|
36
|
+
# Calculate shipping rates
|
37
|
+
# Returns available shipping options and rates for the given list of products.
|
38
|
+
# @param calculate_shipping_rates POST request body
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
41
|
+
# @return [CalculateShippingRates200Response]
|
42
|
+
describe 'calculate_shipping_rates test' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
=begin
|
2
|
+
#API Documentation | Printful
|
3
|
+
|
4
|
+
## About the Printful API The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources. ## Requests and responses ### Request endpoint All API requests have to be sent to this URL: ``` https://api.printful.com/ ``` If you are using a proxy, make sure that all requests have host header set to **api.printful.com**. ### Request parameters Some mandatory parameters (like object identifiers) must be included in the request URL path ``` GET /orders/123 ``` Additional parameters can be passed as GET variables: ``` GET /orders?offset=10&limit=5 ``` For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body: ``` POST /orders {\"recipient\":{...},\"items\":[...]} ``` ### Response body The response body is always a JSON object that contains a response status code (identical to the HTTP status code) and the result of the action. If the status code is 200, then the action was successful. ``` { \"code\": 200, //Response status code \"result\":{ //API method return data //... } } ``` Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL. ``` { \"code\": 200, //Response status code \"result\":[ { //Item 11 }, { //Item 12 } ] \"paging\": { \"total\": 12, //Total items available \"offset\": 10, //Items skipped from the beginning \"limit\": 20 //Number of items per page } } ``` ## Error response If the API call is not successful, then the response code is not in the 2xx range and the `result` attribute contains an error description. ``` { \"code\": 404, \"result\": \"Not Found\", \"error\": { \"reason\": \"NotFound\", \"message\": \"Not Found\" } } ``` In general, response codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Printful's servers. ### Timestamps All timestamps from the API are returned as integers in UNIX timestamp format. ### Rate Limits Printful API has a general rate limit of 120 API calls per minute. Additionally, endpoints that perform resource intensive operations (such as mockup generator) have a lower allowed request limit. # Authentication <!-- ReDoc-Inject: <security-definitions> -->
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: devsupport@printful.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Printful::StoreInformationAPIClient
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'StoreInformationAPIClient' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Printful::StoreInformationAPIClient.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of StoreInformationAPIClient' do
|
30
|
+
it 'should create an instance of StoreInformationAPIClient' do
|
31
|
+
expect(@api_instance).to be_instance_of(Printful::StoreInformationAPIClient)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for change_packing_slip
|
36
|
+
# Change packing slip
|
37
|
+
# Modifies packing slip information of the currently authorized Printful store.
|
38
|
+
# @param packing_slip POST request body
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
41
|
+
# @return [ChangePackingSlip200Response]
|
42
|
+
describe 'change_packing_slip test' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# unit tests for get_store
|
49
|
+
# Get basic information about a store
|
50
|
+
# Get basic information about a store based on provided ID
|
51
|
+
# @param id Store ID
|
52
|
+
# @param [Hash] opts the optional parameters
|
53
|
+
# @return [GetStore200Response]
|
54
|
+
describe 'get_store test' do
|
55
|
+
it 'should work' do
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# unit tests for get_stores
|
61
|
+
# Get basic information about stores
|
62
|
+
# Get basic information about stores depending on the token access level
|
63
|
+
# @param [Hash] opts the optional parameters
|
64
|
+
# @return [GetStores200Response]
|
65
|
+
describe 'get_stores test' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
=begin
|
2
|
+
#API Documentation | Printful
|
3
|
+
|
4
|
+
## About the Printful API The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources. ## Requests and responses ### Request endpoint All API requests have to be sent to this URL: ``` https://api.printful.com/ ``` If you are using a proxy, make sure that all requests have host header set to **api.printful.com**. ### Request parameters Some mandatory parameters (like object identifiers) must be included in the request URL path ``` GET /orders/123 ``` Additional parameters can be passed as GET variables: ``` GET /orders?offset=10&limit=5 ``` For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body: ``` POST /orders {\"recipient\":{...},\"items\":[...]} ``` ### Response body The response body is always a JSON object that contains a response status code (identical to the HTTP status code) and the result of the action. If the status code is 200, then the action was successful. ``` { \"code\": 200, //Response status code \"result\":{ //API method return data //... } } ``` Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL. ``` { \"code\": 200, //Response status code \"result\":[ { //Item 11 }, { //Item 12 } ] \"paging\": { \"total\": 12, //Total items available \"offset\": 10, //Items skipped from the beginning \"limit\": 20 //Number of items per page } } ``` ## Error response If the API call is not successful, then the response code is not in the 2xx range and the `result` attribute contains an error description. ``` { \"code\": 404, \"result\": \"Not Found\", \"error\": { \"reason\": \"NotFound\", \"message\": \"Not Found\" } } ``` In general, response codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Printful's servers. ### Timestamps All timestamps from the API are returned as integers in UNIX timestamp format. ### Rate Limits Printful API has a general rate limit of 120 API calls per minute. Additionally, endpoints that perform resource intensive operations (such as mockup generator) have a lower allowed request limit. # Authentication <!-- ReDoc-Inject: <security-definitions> -->
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: devsupport@printful.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Printful::TaxRateAPIClient
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'TaxRateAPIClient' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Printful::TaxRateAPIClient.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of TaxRateAPIClient' do
|
30
|
+
it 'should create an instance of TaxRateAPIClient' do
|
31
|
+
expect(@api_instance).to be_instance_of(Printful::TaxRateAPIClient)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for calculate_tax_rates
|
36
|
+
# Calculate tax rate
|
37
|
+
# Calculates sales tax rate for given address if required
|
38
|
+
# @param tax_request POST request body
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [CalculateTaxRates200Response]
|
41
|
+
describe 'calculate_tax_rates test' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# unit tests for get_tax_countries
|
48
|
+
# Get a list of countries for tax calculation
|
49
|
+
# Retrieve state list that requires sales tax calculation
|
50
|
+
# @param [Hash] opts the optional parameters
|
51
|
+
# @return [GetTaxCountries200Response]
|
52
|
+
describe 'get_tax_countries test' do
|
53
|
+
it 'should work' do
|
54
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
=begin
|
2
|
+
#API Documentation | Printful
|
3
|
+
|
4
|
+
## About the Printful API The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources. ## Requests and responses ### Request endpoint All API requests have to be sent to this URL: ``` https://api.printful.com/ ``` If you are using a proxy, make sure that all requests have host header set to **api.printful.com**. ### Request parameters Some mandatory parameters (like object identifiers) must be included in the request URL path ``` GET /orders/123 ``` Additional parameters can be passed as GET variables: ``` GET /orders?offset=10&limit=5 ``` For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body: ``` POST /orders {\"recipient\":{...},\"items\":[...]} ``` ### Response body The response body is always a JSON object that contains a response status code (identical to the HTTP status code) and the result of the action. If the status code is 200, then the action was successful. ``` { \"code\": 200, //Response status code \"result\":{ //API method return data //... } } ``` Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL. ``` { \"code\": 200, //Response status code \"result\":[ { //Item 11 }, { //Item 12 } ] \"paging\": { \"total\": 12, //Total items available \"offset\": 10, //Items skipped from the beginning \"limit\": 20 //Number of items per page } } ``` ## Error response If the API call is not successful, then the response code is not in the 2xx range and the `result` attribute contains an error description. ``` { \"code\": 404, \"result\": \"Not Found\", \"error\": { \"reason\": \"NotFound\", \"message\": \"Not Found\" } } ``` In general, response codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Printful's servers. ### Timestamps All timestamps from the API are returned as integers in UNIX timestamp format. ### Rate Limits Printful API has a general rate limit of 120 API calls per minute. Additionally, endpoints that perform resource intensive operations (such as mockup generator) have a lower allowed request limit. # Authentication <!-- ReDoc-Inject: <security-definitions> -->
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: devsupport@printful.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Printful::WarehouseProductsAPIClient
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'WarehouseProductsAPIClient' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Printful::WarehouseProductsAPIClient.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of WarehouseProductsAPIClient' do
|
30
|
+
it 'should create an instance of WarehouseProductsAPIClient' do
|
31
|
+
expect(@api_instance).to be_instance_of(Printful::WarehouseProductsAPIClient)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_warehouse_product
|
36
|
+
# Get warehouse product data
|
37
|
+
# Returns warehouse product data by ID
|
38
|
+
# @param id Product ID
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
41
|
+
# @return [GetWarehouseProduct200Response]
|
42
|
+
describe 'get_warehouse_product test' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# unit tests for get_warehouse_products
|
49
|
+
# Get a list of your warehouse products
|
50
|
+
# Returns a list of warehouse products from your store
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @option opts [String] :query Filter by partial or full product name
|
53
|
+
# @option opts [Integer] :limit Number of items per page (max 100)
|
54
|
+
# @option opts [Integer] :offset Result set offset
|
55
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
56
|
+
# @return [GetWarehouseProducts200Response]
|
57
|
+
describe 'get_warehouse_products test' do
|
58
|
+
it 'should work' do
|
59
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
=begin
|
2
|
+
#API Documentation | Printful
|
3
|
+
|
4
|
+
## About the Printful API The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources. ## Requests and responses ### Request endpoint All API requests have to be sent to this URL: ``` https://api.printful.com/ ``` If you are using a proxy, make sure that all requests have host header set to **api.printful.com**. ### Request parameters Some mandatory parameters (like object identifiers) must be included in the request URL path ``` GET /orders/123 ``` Additional parameters can be passed as GET variables: ``` GET /orders?offset=10&limit=5 ``` For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body: ``` POST /orders {\"recipient\":{...},\"items\":[...]} ``` ### Response body The response body is always a JSON object that contains a response status code (identical to the HTTP status code) and the result of the action. If the status code is 200, then the action was successful. ``` { \"code\": 200, //Response status code \"result\":{ //API method return data //... } } ``` Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL. ``` { \"code\": 200, //Response status code \"result\":[ { //Item 11 }, { //Item 12 } ] \"paging\": { \"total\": 12, //Total items available \"offset\": 10, //Items skipped from the beginning \"limit\": 20 //Number of items per page } } ``` ## Error response If the API call is not successful, then the response code is not in the 2xx range and the `result` attribute contains an error description. ``` { \"code\": 404, \"result\": \"Not Found\", \"error\": { \"reason\": \"NotFound\", \"message\": \"Not Found\" } } ``` In general, response codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Printful's servers. ### Timestamps All timestamps from the API are returned as integers in UNIX timestamp format. ### Rate Limits Printful API has a general rate limit of 120 API calls per minute. Additionally, endpoints that perform resource intensive operations (such as mockup generator) have a lower allowed request limit. # Authentication <!-- ReDoc-Inject: <security-definitions> -->
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: devsupport@printful.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Printful::WebhookAPIClient
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'WebhookAPIClient' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Printful::WebhookAPIClient.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of WebhookAPIClient' do
|
30
|
+
it 'should create an instance of WebhookAPIClient' do
|
31
|
+
expect(@api_instance).to be_instance_of(Printful::WebhookAPIClient)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for create_webhook
|
36
|
+
# Set up webhook configuration
|
37
|
+
# Use this endpoint to enable a webhook URL for a store and select webhook event types that will be sent to this URL. Note that only one webhook URL can be active for a store, so calling this method disables all existing webhook configuration. Setting up the [Stock updated](#operation/stockUpdated) webhook requires passing IDs for products that need to be monitored for changes. Stock update webhook will only include information for specified products. These product IDs need to be set up using the params property.
|
38
|
+
# @param create_webhook_request POST request body
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
41
|
+
# @return [GetWebhooks200Response]
|
42
|
+
describe 'create_webhook test' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# unit tests for disable_webhook
|
49
|
+
# Disable webhook support
|
50
|
+
# Removes the webhook URL and all event types from the store.
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
53
|
+
# @return [GetWebhooks200Response]
|
54
|
+
describe 'disable_webhook test' do
|
55
|
+
it 'should work' do
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# unit tests for get_webhooks
|
61
|
+
# Get webhook configuration
|
62
|
+
# Returns configured webhook URL and list of webhook event types enabled for the store
|
63
|
+
# @param [Hash] opts the optional parameters
|
64
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
65
|
+
# @return [GetWebhooks200Response]
|
66
|
+
describe 'get_webhooks test' do
|
67
|
+
it 'should work' do
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|