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,46 @@
|
|
1
|
+
# Printful::UpdateSyncVariantRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **Integer** | Sync Variant ID. Please specify the IDs of all Sync Variants you wish to keep. | [optional] |
|
8
|
+
| **external_id** | **String** | Variant ID from the Ecommerce platform | [optional] |
|
9
|
+
| **sync_product_id** | **Integer** | Sync Product ID that this variant belongs to | [optional][readonly] |
|
10
|
+
| **name** | **String** | Sync Variant name | [optional][readonly] |
|
11
|
+
| **synced** | **Boolean** | Indicates if this Sync Variant is properly linked with Printful product | [optional][readonly] |
|
12
|
+
| **variant_id** | **Integer** | Printful Variant ID that this Sync Variant is synced to | [optional] |
|
13
|
+
| **retail_price** | **String** | Retail price that this item is sold for | [optional] |
|
14
|
+
| **currency** | **String** | Currency in which prices are returned | [optional][readonly] |
|
15
|
+
| **is_ignored** | **Boolean** | Indicates if this Sync Variant is ignored | [optional] |
|
16
|
+
| **sku** | **String** | SKU of this Sync Variant | [optional] |
|
17
|
+
| **product** | [**SyncVariantProduct**](SyncVariantProduct.md) | | [optional] |
|
18
|
+
| **files** | **Array<File>** | Array of attached printfiles / preview images | [optional] |
|
19
|
+
| **options** | [**Array<ItemOption>**](ItemOption.md) | Array of additional options for the configured product/variant [See examples](#section/Options) | [optional] |
|
20
|
+
| **main_category_id** | **Integer** | Printful Variant catalog category ID | [optional][readonly] |
|
21
|
+
| **warehouse_product_variant_id** | **Integer** | Warehousing variant ID. If sync variant is connected with a warehousing item, this is its ID | [optional][readonly] |
|
22
|
+
|
23
|
+
## Example
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'printful_client'
|
27
|
+
|
28
|
+
instance = Printful::UpdateSyncVariantRequest.new(
|
29
|
+
id: 10,
|
30
|
+
external_id: 12312414,
|
31
|
+
sync_product_id: 71,
|
32
|
+
name: Red T-Shirt,
|
33
|
+
synced: true,
|
34
|
+
variant_id: 3001,
|
35
|
+
retail_price: 29.99,
|
36
|
+
currency: USD,
|
37
|
+
is_ignored: true,
|
38
|
+
sku: SKU1234,
|
39
|
+
product: null,
|
40
|
+
files: null,
|
41
|
+
options: null,
|
42
|
+
main_category_id: 24,
|
43
|
+
warehouse_product_variant_id: 3002
|
44
|
+
)
|
45
|
+
```
|
46
|
+
|
data/docs/Variant.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Printful::Variant
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **Integer** | Variant ID, use this to specify the product when creating orders | [optional] |
|
8
|
+
| **product_id** | **Integer** | ID of the product that this variant belongs to | [optional] |
|
9
|
+
| **name** | **String** | Display name | [optional] |
|
10
|
+
| **size** | **String** | Item size | [optional] |
|
11
|
+
| **color** | **String** | Item color | [optional] |
|
12
|
+
| **color_code** | **String** | Hexadecimal RGB color code. May not exactly reflect the real-world color | [optional] |
|
13
|
+
| **color_code2** | **String** | Secondary hexadecimal RGB color code. May not exactly reflect the real-world color | [optional] |
|
14
|
+
| **image** | **String** | URL of a preview image for this variant | [optional] |
|
15
|
+
| **price** | **String** | Variant's price (can change depending on print files and optional settings) | [optional] |
|
16
|
+
| **in_stock** | **Boolean** | Stock availability of this variant | [optional] |
|
17
|
+
| **availability_regions** | **Hash<String, Object>** | Map of [region code, region name] of regions where the variant is available for fulfillment | [optional] |
|
18
|
+
| **availability_status** | [**Array<AvailabilityStatus>**](AvailabilityStatus.md) | Detailed stock status per region | [optional] |
|
19
|
+
| **material** | [**Array<Material>**](Material.md) | A list of materials this Variant is composed of | [optional] |
|
20
|
+
|
21
|
+
## Example
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'printful_client'
|
25
|
+
|
26
|
+
instance = Printful::Variant.new(
|
27
|
+
id: 100,
|
28
|
+
product_id: 12,
|
29
|
+
name: Gildan 64000 Unisex Softstyle T-Shirt with Tear Away (Black / 2XL),
|
30
|
+
size: 2XL,
|
31
|
+
color: Black,
|
32
|
+
color_code: #14191e,
|
33
|
+
color_code2: null,
|
34
|
+
image: https://files.cdn.printful.com/products/12/629_1517916489.jpg,
|
35
|
+
price: 9.85,
|
36
|
+
in_stock: true,
|
37
|
+
availability_regions: {"US":"USA","EU":"Europe"},
|
38
|
+
availability_status: null,
|
39
|
+
material: null
|
40
|
+
)
|
41
|
+
```
|
42
|
+
|
data/docs/VariantInfo.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Printful::VariantInfo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **variant** | [**Variant**](Variant.md) | | [optional] |
|
8
|
+
| **product** | [**Product**](Product.md) | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'printful_client'
|
14
|
+
|
15
|
+
instance = Printful::VariantInfo.new(
|
16
|
+
variant: null,
|
17
|
+
product: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Printful::VariantPrintfile
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **variant_id** | **Integer** | | [optional] |
|
8
|
+
| **placements** | **Object** | A key-value object mapping placement identifiers to printfile IDs. | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'printful_client'
|
14
|
+
|
15
|
+
instance = Printful::VariantPrintfile.new(
|
16
|
+
variant_id: 4012,
|
17
|
+
placements: {"front":1,"back":1,"label_outside":1}
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Printful::WarehouseProduct
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **Integer** | Product ID | [optional] |
|
8
|
+
| **name** | **String** | Product name | [optional] |
|
9
|
+
| **status** | **String** | Product status: **created** - product request created, **active** - product request approved **suspended** - product suspended **declined** - product request declined **draft** - product created as a draft | [optional] |
|
10
|
+
| **currency** | **String** | Currency | [optional] |
|
11
|
+
| **image_url** | **String** | Image URL of product | [optional] |
|
12
|
+
| **retail_price** | **Float** | Retail price of product | [optional] |
|
13
|
+
| **variants** | [**Array<WarehouseProductVariant>**](WarehouseProductVariant.md) | Array of product variants | [optional] |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'printful_client'
|
19
|
+
|
20
|
+
instance = Printful::WarehouseProduct.new(
|
21
|
+
id: 12,
|
22
|
+
name: Some product name,
|
23
|
+
status: draft,
|
24
|
+
currency: USD,
|
25
|
+
image_url: url.to/your/image/location.png,
|
26
|
+
retail_price: 12.99,
|
27
|
+
variants: null
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Printful::WarehouseProductVariant
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **Integer** | Product variant ID | [optional] |
|
8
|
+
| **name** | **String** | Name of product variant | [optional] |
|
9
|
+
| **sku** | **String** | SKU of product variant | [optional] |
|
10
|
+
| **image_url** | **String** | Image URL of product variant | [optional] |
|
11
|
+
| **retail_price** | **Float** | Retail price of product variant | [optional] |
|
12
|
+
| **quantity** | **Integer** | Quantity of product variant in our stock | [optional] |
|
13
|
+
| **length** | **Float** | Length of product variant | [optional] |
|
14
|
+
| **width** | **Float** | Width of product variant | [optional] |
|
15
|
+
| **height** | **Float** | Height of product variant | [optional] |
|
16
|
+
| **weight** | **Float** | Weight of product variant | [optional] |
|
17
|
+
|
18
|
+
## Example
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'printful_client'
|
22
|
+
|
23
|
+
instance = Printful::WarehouseProductVariant.new(
|
24
|
+
id: 12,
|
25
|
+
name: SomeName,
|
26
|
+
sku: some-sku-12,
|
27
|
+
image_url: url.to/image/variant.png,
|
28
|
+
retail_price: 1.1,
|
29
|
+
quantity: 10,
|
30
|
+
length: 3.21,
|
31
|
+
width: 2.13,
|
32
|
+
height: 3.11,
|
33
|
+
weight: 1.11
|
34
|
+
)
|
35
|
+
```
|
36
|
+
|
@@ -0,0 +1,159 @@
|
|
1
|
+
# Printful::WarehouseProductsAPIClient
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.printful.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**get_warehouse_product**](WarehouseProductsAPIClient.md#get_warehouse_product) | **GET** /warehouse/products/{id} | Get warehouse product data |
|
8
|
+
| [**get_warehouse_products**](WarehouseProductsAPIClient.md#get_warehouse_products) | **GET** /warehouse/products | Get a list of your warehouse products |
|
9
|
+
|
10
|
+
|
11
|
+
## get_warehouse_product
|
12
|
+
|
13
|
+
> <GetWarehouseProduct200Response> get_warehouse_product(id, opts)
|
14
|
+
|
15
|
+
Get warehouse product data
|
16
|
+
|
17
|
+
Returns warehouse product data by ID
|
18
|
+
|
19
|
+
### Examples
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'time'
|
23
|
+
require 'printful_client'
|
24
|
+
# setup authorization
|
25
|
+
Printful.configure do |config|
|
26
|
+
# Configure OAuth2 access token for authorization: OAuth
|
27
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
28
|
+
end
|
29
|
+
|
30
|
+
api_instance = Printful::WarehouseProductsAPIClient.new
|
31
|
+
id = nil # GetSyncProductByIdIdParameter | Product ID
|
32
|
+
opts = {
|
33
|
+
x_pf_store_id: 'x_pf_store_id_example' # String | Use this to specify which store you want to use (required only for account level token)
|
34
|
+
}
|
35
|
+
|
36
|
+
begin
|
37
|
+
# Get warehouse product data
|
38
|
+
result = api_instance.get_warehouse_product(id, opts)
|
39
|
+
p result
|
40
|
+
rescue Printful::ApiError => e
|
41
|
+
puts "Error when calling WarehouseProductsAPIClient->get_warehouse_product: #{e}"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
#### Using the get_warehouse_product_with_http_info variant
|
46
|
+
|
47
|
+
This returns an Array which contains the response data, status code and headers.
|
48
|
+
|
49
|
+
> <Array(<GetWarehouseProduct200Response>, Integer, Hash)> get_warehouse_product_with_http_info(id, opts)
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
begin
|
53
|
+
# Get warehouse product data
|
54
|
+
data, status_code, headers = api_instance.get_warehouse_product_with_http_info(id, opts)
|
55
|
+
p status_code # => 2xx
|
56
|
+
p headers # => { ... }
|
57
|
+
p data # => <GetWarehouseProduct200Response>
|
58
|
+
rescue Printful::ApiError => e
|
59
|
+
puts "Error when calling WarehouseProductsAPIClient->get_warehouse_product_with_http_info: #{e}"
|
60
|
+
end
|
61
|
+
```
|
62
|
+
|
63
|
+
### Parameters
|
64
|
+
|
65
|
+
| Name | Type | Description | Notes |
|
66
|
+
| ---- | ---- | ----------- | ----- |
|
67
|
+
| **id** | [**GetSyncProductByIdIdParameter**](.md) | Product ID | |
|
68
|
+
| **x_pf_store_id** | **String** | Use this to specify which store you want to use (required only for account level token) | [optional] |
|
69
|
+
|
70
|
+
### Return type
|
71
|
+
|
72
|
+
[**GetWarehouseProduct200Response**](GetWarehouseProduct200Response.md)
|
73
|
+
|
74
|
+
### Authorization
|
75
|
+
|
76
|
+
[OAuth](../README.md#OAuth)
|
77
|
+
|
78
|
+
### HTTP request headers
|
79
|
+
|
80
|
+
- **Content-Type**: Not defined
|
81
|
+
- **Accept**: application/json
|
82
|
+
|
83
|
+
|
84
|
+
## get_warehouse_products
|
85
|
+
|
86
|
+
> <GetWarehouseProducts200Response> get_warehouse_products(opts)
|
87
|
+
|
88
|
+
Get a list of your warehouse products
|
89
|
+
|
90
|
+
Returns a list of warehouse products from your store
|
91
|
+
|
92
|
+
### Examples
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
require 'time'
|
96
|
+
require 'printful_client'
|
97
|
+
# setup authorization
|
98
|
+
Printful.configure do |config|
|
99
|
+
# Configure OAuth2 access token for authorization: OAuth
|
100
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
101
|
+
end
|
102
|
+
|
103
|
+
api_instance = Printful::WarehouseProductsAPIClient.new
|
104
|
+
opts = {
|
105
|
+
query: 'query_example', # String | Filter by partial or full product name
|
106
|
+
limit: 56, # Integer | Number of items per page (max 100)
|
107
|
+
offset: 56, # Integer | Result set offset
|
108
|
+
x_pf_store_id: 'x_pf_store_id_example' # String | Use this to specify which store you want to use (required only for account level token)
|
109
|
+
}
|
110
|
+
|
111
|
+
begin
|
112
|
+
# Get a list of your warehouse products
|
113
|
+
result = api_instance.get_warehouse_products(opts)
|
114
|
+
p result
|
115
|
+
rescue Printful::ApiError => e
|
116
|
+
puts "Error when calling WarehouseProductsAPIClient->get_warehouse_products: #{e}"
|
117
|
+
end
|
118
|
+
```
|
119
|
+
|
120
|
+
#### Using the get_warehouse_products_with_http_info variant
|
121
|
+
|
122
|
+
This returns an Array which contains the response data, status code and headers.
|
123
|
+
|
124
|
+
> <Array(<GetWarehouseProducts200Response>, Integer, Hash)> get_warehouse_products_with_http_info(opts)
|
125
|
+
|
126
|
+
```ruby
|
127
|
+
begin
|
128
|
+
# Get a list of your warehouse products
|
129
|
+
data, status_code, headers = api_instance.get_warehouse_products_with_http_info(opts)
|
130
|
+
p status_code # => 2xx
|
131
|
+
p headers # => { ... }
|
132
|
+
p data # => <GetWarehouseProducts200Response>
|
133
|
+
rescue Printful::ApiError => e
|
134
|
+
puts "Error when calling WarehouseProductsAPIClient->get_warehouse_products_with_http_info: #{e}"
|
135
|
+
end
|
136
|
+
```
|
137
|
+
|
138
|
+
### Parameters
|
139
|
+
|
140
|
+
| Name | Type | Description | Notes |
|
141
|
+
| ---- | ---- | ----------- | ----- |
|
142
|
+
| **query** | **String** | Filter by partial or full product name | [optional] |
|
143
|
+
| **limit** | **Integer** | Number of items per page (max 100) | [optional] |
|
144
|
+
| **offset** | **Integer** | Result set offset | [optional] |
|
145
|
+
| **x_pf_store_id** | **String** | Use this to specify which store you want to use (required only for account level token) | [optional] |
|
146
|
+
|
147
|
+
### Return type
|
148
|
+
|
149
|
+
[**GetWarehouseProducts200Response**](GetWarehouseProducts200Response.md)
|
150
|
+
|
151
|
+
### Authorization
|
152
|
+
|
153
|
+
[OAuth](../README.md#OAuth)
|
154
|
+
|
155
|
+
### HTTP request headers
|
156
|
+
|
157
|
+
- **Content-Type**: Not defined
|
158
|
+
- **Accept**: application/json
|
159
|
+
|
data/docs/Webhook.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Printful::Webhook
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **type** | **String** | Event type | [optional] |
|
8
|
+
| **created** | **Integer** | Event time | [optional] |
|
9
|
+
| **retries** | **Integer** | Number of previous attempts to deliver this webhook event | [optional] |
|
10
|
+
| **store** | **Integer** | ID of the store that the event occured to | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'printful_client'
|
16
|
+
|
17
|
+
instance = Printful::Webhook.new(
|
18
|
+
type: null,
|
19
|
+
created: 1622456737,
|
20
|
+
retries: 2,
|
21
|
+
store: 12
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,225 @@
|
|
1
|
+
# Printful::WebhookAPIClient
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.printful.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_webhook**](WebhookAPIClient.md#create_webhook) | **POST** /webhooks | Set up webhook configuration |
|
8
|
+
| [**disable_webhook**](WebhookAPIClient.md#disable_webhook) | **DELETE** /webhooks | Disable webhook support |
|
9
|
+
| [**get_webhooks**](WebhookAPIClient.md#get_webhooks) | **GET** /webhooks | Get webhook configuration |
|
10
|
+
|
11
|
+
|
12
|
+
## create_webhook
|
13
|
+
|
14
|
+
> <GetWebhooks200Response> create_webhook(create_webhook_request, opts)
|
15
|
+
|
16
|
+
Set up webhook configuration
|
17
|
+
|
18
|
+
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.
|
19
|
+
|
20
|
+
### Examples
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'time'
|
24
|
+
require 'printful_client'
|
25
|
+
# setup authorization
|
26
|
+
Printful.configure do |config|
|
27
|
+
# Configure OAuth2 access token for authorization: OAuth
|
28
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = Printful::WebhookAPIClient.new
|
32
|
+
create_webhook_request = Printful::CreateWebhookRequest.new({url: '*https://www.example.com/printful/webhook', types: ["package_shipped", "stock_updated"]}) # CreateWebhookRequest | POST request body
|
33
|
+
opts = {
|
34
|
+
x_pf_store_id: 'x_pf_store_id_example' # String | Use this to specify which store you want to use (required only for account level token)
|
35
|
+
}
|
36
|
+
|
37
|
+
begin
|
38
|
+
# Set up webhook configuration
|
39
|
+
result = api_instance.create_webhook(create_webhook_request, opts)
|
40
|
+
p result
|
41
|
+
rescue Printful::ApiError => e
|
42
|
+
puts "Error when calling WebhookAPIClient->create_webhook: #{e}"
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
#### Using the create_webhook_with_http_info variant
|
47
|
+
|
48
|
+
This returns an Array which contains the response data, status code and headers.
|
49
|
+
|
50
|
+
> <Array(<GetWebhooks200Response>, Integer, Hash)> create_webhook_with_http_info(create_webhook_request, opts)
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
begin
|
54
|
+
# Set up webhook configuration
|
55
|
+
data, status_code, headers = api_instance.create_webhook_with_http_info(create_webhook_request, opts)
|
56
|
+
p status_code # => 2xx
|
57
|
+
p headers # => { ... }
|
58
|
+
p data # => <GetWebhooks200Response>
|
59
|
+
rescue Printful::ApiError => e
|
60
|
+
puts "Error when calling WebhookAPIClient->create_webhook_with_http_info: #{e}"
|
61
|
+
end
|
62
|
+
```
|
63
|
+
|
64
|
+
### Parameters
|
65
|
+
|
66
|
+
| Name | Type | Description | Notes |
|
67
|
+
| ---- | ---- | ----------- | ----- |
|
68
|
+
| **create_webhook_request** | [**CreateWebhookRequest**](CreateWebhookRequest.md) | POST request body | |
|
69
|
+
| **x_pf_store_id** | **String** | Use this to specify which store you want to use (required only for account level token) | [optional] |
|
70
|
+
|
71
|
+
### Return type
|
72
|
+
|
73
|
+
[**GetWebhooks200Response**](GetWebhooks200Response.md)
|
74
|
+
|
75
|
+
### Authorization
|
76
|
+
|
77
|
+
[OAuth](../README.md#OAuth)
|
78
|
+
|
79
|
+
### HTTP request headers
|
80
|
+
|
81
|
+
- **Content-Type**: application/json
|
82
|
+
- **Accept**: application/json
|
83
|
+
|
84
|
+
|
85
|
+
## disable_webhook
|
86
|
+
|
87
|
+
> <GetWebhooks200Response> disable_webhook(opts)
|
88
|
+
|
89
|
+
Disable webhook support
|
90
|
+
|
91
|
+
Removes the webhook URL and all event types from the store.
|
92
|
+
|
93
|
+
### Examples
|
94
|
+
|
95
|
+
```ruby
|
96
|
+
require 'time'
|
97
|
+
require 'printful_client'
|
98
|
+
# setup authorization
|
99
|
+
Printful.configure do |config|
|
100
|
+
# Configure OAuth2 access token for authorization: OAuth
|
101
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
102
|
+
end
|
103
|
+
|
104
|
+
api_instance = Printful::WebhookAPIClient.new
|
105
|
+
opts = {
|
106
|
+
x_pf_store_id: 'x_pf_store_id_example' # String | Use this to specify which store you want to use (required only for account level token)
|
107
|
+
}
|
108
|
+
|
109
|
+
begin
|
110
|
+
# Disable webhook support
|
111
|
+
result = api_instance.disable_webhook(opts)
|
112
|
+
p result
|
113
|
+
rescue Printful::ApiError => e
|
114
|
+
puts "Error when calling WebhookAPIClient->disable_webhook: #{e}"
|
115
|
+
end
|
116
|
+
```
|
117
|
+
|
118
|
+
#### Using the disable_webhook_with_http_info variant
|
119
|
+
|
120
|
+
This returns an Array which contains the response data, status code and headers.
|
121
|
+
|
122
|
+
> <Array(<GetWebhooks200Response>, Integer, Hash)> disable_webhook_with_http_info(opts)
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
begin
|
126
|
+
# Disable webhook support
|
127
|
+
data, status_code, headers = api_instance.disable_webhook_with_http_info(opts)
|
128
|
+
p status_code # => 2xx
|
129
|
+
p headers # => { ... }
|
130
|
+
p data # => <GetWebhooks200Response>
|
131
|
+
rescue Printful::ApiError => e
|
132
|
+
puts "Error when calling WebhookAPIClient->disable_webhook_with_http_info: #{e}"
|
133
|
+
end
|
134
|
+
```
|
135
|
+
|
136
|
+
### Parameters
|
137
|
+
|
138
|
+
| Name | Type | Description | Notes |
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
140
|
+
| **x_pf_store_id** | **String** | Use this to specify which store you want to use (required only for account level token) | [optional] |
|
141
|
+
|
142
|
+
### Return type
|
143
|
+
|
144
|
+
[**GetWebhooks200Response**](GetWebhooks200Response.md)
|
145
|
+
|
146
|
+
### Authorization
|
147
|
+
|
148
|
+
[OAuth](../README.md#OAuth)
|
149
|
+
|
150
|
+
### HTTP request headers
|
151
|
+
|
152
|
+
- **Content-Type**: Not defined
|
153
|
+
- **Accept**: application/json
|
154
|
+
|
155
|
+
|
156
|
+
## get_webhooks
|
157
|
+
|
158
|
+
> <GetWebhooks200Response> get_webhooks(opts)
|
159
|
+
|
160
|
+
Get webhook configuration
|
161
|
+
|
162
|
+
Returns configured webhook URL and list of webhook event types enabled for the store
|
163
|
+
|
164
|
+
### Examples
|
165
|
+
|
166
|
+
```ruby
|
167
|
+
require 'time'
|
168
|
+
require 'printful_client'
|
169
|
+
# setup authorization
|
170
|
+
Printful.configure do |config|
|
171
|
+
# Configure OAuth2 access token for authorization: OAuth
|
172
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
173
|
+
end
|
174
|
+
|
175
|
+
api_instance = Printful::WebhookAPIClient.new
|
176
|
+
opts = {
|
177
|
+
x_pf_store_id: 'x_pf_store_id_example' # String | Use this to specify which store you want to use (required only for account level token)
|
178
|
+
}
|
179
|
+
|
180
|
+
begin
|
181
|
+
# Get webhook configuration
|
182
|
+
result = api_instance.get_webhooks(opts)
|
183
|
+
p result
|
184
|
+
rescue Printful::ApiError => e
|
185
|
+
puts "Error when calling WebhookAPIClient->get_webhooks: #{e}"
|
186
|
+
end
|
187
|
+
```
|
188
|
+
|
189
|
+
#### Using the get_webhooks_with_http_info variant
|
190
|
+
|
191
|
+
This returns an Array which contains the response data, status code and headers.
|
192
|
+
|
193
|
+
> <Array(<GetWebhooks200Response>, Integer, Hash)> get_webhooks_with_http_info(opts)
|
194
|
+
|
195
|
+
```ruby
|
196
|
+
begin
|
197
|
+
# Get webhook configuration
|
198
|
+
data, status_code, headers = api_instance.get_webhooks_with_http_info(opts)
|
199
|
+
p status_code # => 2xx
|
200
|
+
p headers # => { ... }
|
201
|
+
p data # => <GetWebhooks200Response>
|
202
|
+
rescue Printful::ApiError => e
|
203
|
+
puts "Error when calling WebhookAPIClient->get_webhooks_with_http_info: #{e}"
|
204
|
+
end
|
205
|
+
```
|
206
|
+
|
207
|
+
### Parameters
|
208
|
+
|
209
|
+
| Name | Type | Description | Notes |
|
210
|
+
| ---- | ---- | ----------- | ----- |
|
211
|
+
| **x_pf_store_id** | **String** | Use this to specify which store you want to use (required only for account level token) | [optional] |
|
212
|
+
|
213
|
+
### Return type
|
214
|
+
|
215
|
+
[**GetWebhooks200Response**](GetWebhooks200Response.md)
|
216
|
+
|
217
|
+
### Authorization
|
218
|
+
|
219
|
+
[OAuth](../README.md#OAuth)
|
220
|
+
|
221
|
+
### HTTP request headers
|
222
|
+
|
223
|
+
- **Content-Type**: Not defined
|
224
|
+
- **Accept**: application/json
|
225
|
+
|
data/docs/WebhookInfo.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Printful::WebhookInfo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **url** | **String** | Webhook URL that will receive store's event notifications | [optional] |
|
8
|
+
| **types** | **Array<String>** | Array of enabled webhook event types | [optional] |
|
9
|
+
| **params** | **Hash<String, Object>** | | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'printful_client'
|
15
|
+
|
16
|
+
instance = Printful::WebhookInfo.new(
|
17
|
+
url: *https://www.example.com/printful/webhook,
|
18
|
+
types: ["package_shipped","stock_updated"],
|
19
|
+
params: {"stock_updated":{"product_ids":[5,12]}}
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/generate.sh
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
set -euo pipefail
|
3
|
+
|
4
|
+
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
5
|
+
cd "${SCRIPT_DIR}"
|
6
|
+
|
7
|
+
GENERATOR="ruby"
|
8
|
+
OUTPUT_DIR="generated"
|
9
|
+
|
10
|
+
echo "Generating API client..."
|
11
|
+
rm -rf "${OUTPUT_DIR}"
|
12
|
+
docker run --rm -v ${PWD}:/local \
|
13
|
+
openapitools/openapi-generator-cli generate \
|
14
|
+
--skip-validate-spec \
|
15
|
+
-i "/local/swagger.json" \
|
16
|
+
-g "${GENERATOR}" \
|
17
|
+
-o "/local/${OUTPUT_DIR}" \
|
18
|
+
--api-name-suffix 'Client' \
|
19
|
+
--ignore-file-override "/local/.openapi-generator-ignore" \
|
20
|
+
--additional-properties=gemName="printful_client" \
|
21
|
+
--additional-properties=gemVersion="1.0.1" \
|
22
|
+
--additional-properties=gemAuthor="Mindprint.ai" \
|
23
|
+
--additional-properties=gemAuthorEmail="tech@mindprint.ai" \
|
24
|
+
--additional-properties=gemSummary="A Ruby client for the [Printful.com API" \
|
25
|
+
--additional-properties=gemDescription="A Ruby client for the [Printful.com API](https://developers.printful.com/docs/) generated using their OpenAPI/Swagger spec and the [OpenAPI Generator](https://openapi-generator.tech/) tool." \
|
26
|
+
--additional-properties=gemHomepage="https://github.com/mindprintai/printful_client" \
|
27
|
+
--additional-properties=gemLicense="MIT" \
|
28
|
+
--additional-properties=moduleName="Printful"
|
29
|
+
|
30
|
+
echo "Applying post-processing operations on generated files..."
|
31
|
+
sudo chown -R "${USER}:${USER}" "${OUTPUT_DIR}"
|
32
|
+
cd "${SCRIPT_DIR}/${OUTPUT_DIR}"
|
33
|
+
sed -i 's#^README.md$#docs/README.md#' ".openapi-generator/FILES"
|
34
|
+
sed -r 's#^(.*)$#\1 linguist-generated=true#' ".openapi-generator/FILES" > ".gitattributes"
|
35
|
+
echo "swagger.json linguist-generated=true" >> ".gitattributes"
|
36
|
+
rm -rf ".openapi-generator"
|
37
|
+
mv "README.md" "docs/"
|
38
|
+
|
39
|
+
echo "Running post-generate tests..."
|
40
|
+
bundle install
|
41
|
+
bundle exec rspec
|
42
|
+
|
43
|
+
echo "Overwriting existing files with generator output..."
|
44
|
+
cd "${SCRIPT_DIR}"
|
45
|
+
for fn in $(ls "${OUTPUT_DIR}") ; do
|
46
|
+
if [[ -d "${OUTPUT_DIR}/${fn}" ]] ; then
|
47
|
+
rm -rf "${fn}"
|
48
|
+
fi
|
49
|
+
|
50
|
+
mv "${OUTPUT_DIR}/${fn}" "${fn}"
|
51
|
+
done
|
52
|
+
|
53
|
+
rm -rf "${OUTPUT_DIR}"
|