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
data/docs/README.md
ADDED
@@ -0,0 +1,410 @@
|
|
1
|
+
# printful_client
|
2
|
+
|
3
|
+
Printful - the Ruby gem for the API Documentation | Printful
|
4
|
+
|
5
|
+
# About the Printful API
|
6
|
+
|
7
|
+
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.
|
8
|
+
|
9
|
+
## Requests and responses
|
10
|
+
|
11
|
+
### Request endpoint
|
12
|
+
All API requests have to be sent to this URL:
|
13
|
+
```
|
14
|
+
https://api.printful.com/
|
15
|
+
```
|
16
|
+
If you are using a proxy, make sure that all requests have host header set to **api.printful.com**.
|
17
|
+
|
18
|
+
### Request parameters
|
19
|
+
Some mandatory parameters (like object identifiers) must be included in the request URL path
|
20
|
+
```
|
21
|
+
GET /orders/123
|
22
|
+
```
|
23
|
+
Additional parameters can be passed as GET variables:
|
24
|
+
```
|
25
|
+
GET /orders?offset=10&limit=5
|
26
|
+
```
|
27
|
+
For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body:
|
28
|
+
```
|
29
|
+
POST /orders
|
30
|
+
|
31
|
+
{\"recipient\":{...},\"items\":[...]}
|
32
|
+
```
|
33
|
+
|
34
|
+
### Response body
|
35
|
+
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.
|
36
|
+
```
|
37
|
+
{
|
38
|
+
\"code\": 200, //Response status code
|
39
|
+
\"result\":{
|
40
|
+
//API method return data
|
41
|
+
//...
|
42
|
+
}
|
43
|
+
}
|
44
|
+
```
|
45
|
+
|
46
|
+
Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL.
|
47
|
+
```
|
48
|
+
{
|
49
|
+
\"code\": 200, //Response status code
|
50
|
+
\"result\":[
|
51
|
+
{
|
52
|
+
//Item 11
|
53
|
+
},
|
54
|
+
{
|
55
|
+
//Item 12
|
56
|
+
}
|
57
|
+
]
|
58
|
+
\"paging\": {
|
59
|
+
\"total\": 12, //Total items available
|
60
|
+
\"offset\": 10, //Items skipped from the beginning
|
61
|
+
\"limit\": 20 //Number of items per page
|
62
|
+
}
|
63
|
+
}
|
64
|
+
```
|
65
|
+
|
66
|
+
## Error response
|
67
|
+
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.
|
68
|
+
```
|
69
|
+
{
|
70
|
+
\"code\": 404,
|
71
|
+
\"result\": \"Not Found\",
|
72
|
+
\"error\": {
|
73
|
+
\"reason\": \"NotFound\",
|
74
|
+
\"message\": \"Not Found\"
|
75
|
+
}
|
76
|
+
}
|
77
|
+
```
|
78
|
+
|
79
|
+
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.
|
80
|
+
|
81
|
+
### Timestamps
|
82
|
+
All timestamps from the API are returned as integers in UNIX timestamp format.
|
83
|
+
|
84
|
+
### Rate Limits
|
85
|
+
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.
|
86
|
+
|
87
|
+
# Authentication
|
88
|
+
|
89
|
+
<!-- ReDoc-Inject: <security-definitions> -->
|
90
|
+
|
91
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
92
|
+
|
93
|
+
- API version: 1.0
|
94
|
+
- Package version: 1.0.1
|
95
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
96
|
+
For more information, please visit [https://www.printful.com/docs/support](https://www.printful.com/docs/support)
|
97
|
+
|
98
|
+
## Installation
|
99
|
+
|
100
|
+
### Build a gem
|
101
|
+
|
102
|
+
To build the Ruby code into a gem:
|
103
|
+
|
104
|
+
```shell
|
105
|
+
gem build printful_client.gemspec
|
106
|
+
```
|
107
|
+
|
108
|
+
Then either install the gem locally:
|
109
|
+
|
110
|
+
```shell
|
111
|
+
gem install ./printful_client-1.0.1.gem
|
112
|
+
```
|
113
|
+
|
114
|
+
(for development, run `gem install --dev ./printful_client-1.0.1.gem` to install the development dependencies)
|
115
|
+
|
116
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
117
|
+
|
118
|
+
Finally add this to the Gemfile:
|
119
|
+
|
120
|
+
gem 'printful_client', '~> 1.0.1'
|
121
|
+
|
122
|
+
### Install from Git
|
123
|
+
|
124
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
125
|
+
|
126
|
+
gem 'printful_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
127
|
+
|
128
|
+
### Include the Ruby code directly
|
129
|
+
|
130
|
+
Include the Ruby code directly using `-I` as follows:
|
131
|
+
|
132
|
+
```shell
|
133
|
+
ruby -Ilib script.rb
|
134
|
+
```
|
135
|
+
|
136
|
+
## Getting Started
|
137
|
+
|
138
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
139
|
+
|
140
|
+
```ruby
|
141
|
+
# Load the gem
|
142
|
+
require 'printful_client'
|
143
|
+
|
144
|
+
api_instance = Printful::ApprovalSheetsAPIClient.new
|
145
|
+
confirm_hash = 'a14e51714be01f98487fcf5131727d31' # String | The confirm hash for the approval sheet you would like to approve.
|
146
|
+
approval_sheet = Printful::ApprovalSheet.new({status: 'approved'}) # ApprovalSheet | POST request body
|
147
|
+
opts = {
|
148
|
+
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)
|
149
|
+
}
|
150
|
+
|
151
|
+
begin
|
152
|
+
#Approve a design
|
153
|
+
result = api_instance.approve_design(confirm_hash, approval_sheet, opts)
|
154
|
+
p result
|
155
|
+
rescue Printful::ApiError => e
|
156
|
+
puts "Exception when calling ApprovalSheetsAPIClient->approve_design: #{e}"
|
157
|
+
end
|
158
|
+
|
159
|
+
```
|
160
|
+
|
161
|
+
## Documentation for API Endpoints
|
162
|
+
|
163
|
+
All URIs are relative to *https://api.printful.com*
|
164
|
+
|
165
|
+
Class | Method | HTTP request | Description
|
166
|
+
------------ | ------------- | ------------- | -------------
|
167
|
+
*Printful::ApprovalSheetsAPIClient* | [**approve_design**](docs/ApprovalSheetsAPIClient.md#approve_design) | **POST** /approval-sheets | Approve a design
|
168
|
+
*Printful::ApprovalSheetsAPIClient* | [**get_approval_sheets**](docs/ApprovalSheetsAPIClient.md#get_approval_sheets) | **GET** /approval-sheets | Retrieve a list of approval sheets
|
169
|
+
*Printful::ApprovalSheetsAPIClient* | [**submit_approval_sheet_changes**](docs/ApprovalSheetsAPIClient.md#submit_approval_sheet_changes) | **POST** /approval-sheets/changes | Submit changes to an approval sheet
|
170
|
+
*Printful::CatalogAPIClient* | [**get_categories**](docs/CatalogAPIClient.md#get_categories) | **GET** /categories | Get Categories
|
171
|
+
*Printful::CatalogAPIClient* | [**get_category_by_id**](docs/CatalogAPIClient.md#get_category_by_id) | **GET** /categories/{id} | Get Category
|
172
|
+
*Printful::CatalogAPIClient* | [**get_product_by_id**](docs/CatalogAPIClient.md#get_product_by_id) | **GET** /products/{id} | Get Product
|
173
|
+
*Printful::CatalogAPIClient* | [**get_product_size_guide_by_id**](docs/CatalogAPIClient.md#get_product_size_guide_by_id) | **GET** /products/{id}/sizes | Get Product Size Guide
|
174
|
+
*Printful::CatalogAPIClient* | [**get_products**](docs/CatalogAPIClient.md#get_products) | **GET** /products | Get Products
|
175
|
+
*Printful::CatalogAPIClient* | [**get_variant_by_id**](docs/CatalogAPIClient.md#get_variant_by_id) | **GET** /products/variant/{id} | Get Variant
|
176
|
+
*Printful::CountryStateCodeAPIClient* | [**get_countries**](docs/CountryStateCodeAPIClient.md#get_countries) | **GET** /countries | Retrieve country list
|
177
|
+
*Printful::EcommercePlatformSyncAPIClient* | [**delete_store_sync_product**](docs/EcommercePlatformSyncAPIClient.md#delete_store_sync_product) | **DELETE** /sync/products/{id} | Delete a Sync Product
|
178
|
+
*Printful::EcommercePlatformSyncAPIClient* | [**delete_store_sync_variant**](docs/EcommercePlatformSyncAPIClient.md#delete_store_sync_variant) | **DELETE** /sync/variant/{id} | Delete a Sync Variant
|
179
|
+
*Printful::EcommercePlatformSyncAPIClient* | [**get_store_sync_product_by_id**](docs/EcommercePlatformSyncAPIClient.md#get_store_sync_product_by_id) | **GET** /sync/products/{id} | Get a Sync Product
|
180
|
+
*Printful::EcommercePlatformSyncAPIClient* | [**get_store_sync_products**](docs/EcommercePlatformSyncAPIClient.md#get_store_sync_products) | **GET** /sync/products | Get list of Sync Products
|
181
|
+
*Printful::EcommercePlatformSyncAPIClient* | [**get_store_sync_variant_by_id**](docs/EcommercePlatformSyncAPIClient.md#get_store_sync_variant_by_id) | **GET** /sync/variant/{id} | Get a Sync Variant
|
182
|
+
*Printful::EcommercePlatformSyncAPIClient* | [**update_store_sync_variant**](docs/EcommercePlatformSyncAPIClient.md#update_store_sync_variant) | **PUT** /sync/variant/{id} | Modify a Sync Variant
|
183
|
+
*Printful::FileLibraryAPIClient* | [**add_file**](docs/FileLibraryAPIClient.md#add_file) | **POST** /files | Add a new file
|
184
|
+
*Printful::FileLibraryAPIClient* | [**get_file**](docs/FileLibraryAPIClient.md#get_file) | **GET** /files/{id} | Get file
|
185
|
+
*Printful::FileLibraryAPIClient* | [**thread_colors**](docs/FileLibraryAPIClient.md#thread_colors) | **POST** /files/thread-colors | Return available thread colors from provided image URL
|
186
|
+
*Printful::MockupGeneratorAPIClient* | [**create_generator_task**](docs/MockupGeneratorAPIClient.md#create_generator_task) | **POST** /mockup-generator/create-task/{id} | Create a mockup generation task
|
187
|
+
*Printful::MockupGeneratorAPIClient* | [**get_printfiles**](docs/MockupGeneratorAPIClient.md#get_printfiles) | **GET** /mockup-generator/printfiles/{id} | Retrieve product variant printfiles
|
188
|
+
*Printful::MockupGeneratorAPIClient* | [**get_task**](docs/MockupGeneratorAPIClient.md#get_task) | **GET** /mockup-generator/task | Mockup generation task result
|
189
|
+
*Printful::MockupGeneratorAPIClient* | [**get_templates**](docs/MockupGeneratorAPIClient.md#get_templates) | **GET** /mockup-generator/templates/{id} | Layout templates
|
190
|
+
*Printful::OAuthAPIClient* | [**get_scopes**](docs/OAuthAPIClient.md#get_scopes) | **GET** /oauth/scopes | Get scopes for token
|
191
|
+
*Printful::OrdersAPIClient* | [**cancel_order_by_id**](docs/OrdersAPIClient.md#cancel_order_by_id) | **DELETE** /orders/{id} | Cancel an order
|
192
|
+
*Printful::OrdersAPIClient* | [**confirm_order_by_id**](docs/OrdersAPIClient.md#confirm_order_by_id) | **POST** /orders/{id}/confirm | Confirm draft for fulfillment
|
193
|
+
*Printful::OrdersAPIClient* | [**create_order**](docs/OrdersAPIClient.md#create_order) | **POST** /orders | Create a new order
|
194
|
+
*Printful::OrdersAPIClient* | [**estimate_order_costs**](docs/OrdersAPIClient.md#estimate_order_costs) | **POST** /orders/estimate-costs | Estimate order costs
|
195
|
+
*Printful::OrdersAPIClient* | [**get_order_by_id**](docs/OrdersAPIClient.md#get_order_by_id) | **GET** /orders/{id} | Get order data
|
196
|
+
*Printful::OrdersAPIClient* | [**get_orders**](docs/OrdersAPIClient.md#get_orders) | **GET** /orders | Get list of orders
|
197
|
+
*Printful::OrdersAPIClient* | [**update_order_by_id**](docs/OrdersAPIClient.md#update_order_by_id) | **PUT** /orders/{id} | Update order data
|
198
|
+
*Printful::ProductTemplatesAPIClient* | [**delete_product_template**](docs/ProductTemplatesAPIClient.md#delete_product_template) | **DELETE** /product-templates/{id} | Delete product template
|
199
|
+
*Printful::ProductTemplatesAPIClient* | [**get_product_template_by_id**](docs/ProductTemplatesAPIClient.md#get_product_template_by_id) | **GET** /product-templates/{id} | Get product template
|
200
|
+
*Printful::ProductTemplatesAPIClient* | [**get_product_templates**](docs/ProductTemplatesAPIClient.md#get_product_templates) | **GET** /product-templates | Get product template list
|
201
|
+
*Printful::ProductsAPIClient* | [**create_sync_product**](docs/ProductsAPIClient.md#create_sync_product) | **POST** /store/products | Create a new Sync Product
|
202
|
+
*Printful::ProductsAPIClient* | [**create_sync_variant**](docs/ProductsAPIClient.md#create_sync_variant) | **POST** /store/products/{id}/variants | Create a new Sync Variant
|
203
|
+
*Printful::ProductsAPIClient* | [**delete_sync_product**](docs/ProductsAPIClient.md#delete_sync_product) | **DELETE** /store/products/{id} | Delete a Sync Product
|
204
|
+
*Printful::ProductsAPIClient* | [**delete_sync_variant**](docs/ProductsAPIClient.md#delete_sync_variant) | **DELETE** /store/variants/{id} | Delete a Sync Variant
|
205
|
+
*Printful::ProductsAPIClient* | [**get_sync_product_by_id**](docs/ProductsAPIClient.md#get_sync_product_by_id) | **GET** /store/products/{id} | Get a Sync Product
|
206
|
+
*Printful::ProductsAPIClient* | [**get_sync_products**](docs/ProductsAPIClient.md#get_sync_products) | **GET** /store/products | Get Sync Products
|
207
|
+
*Printful::ProductsAPIClient* | [**get_sync_variant_by_id**](docs/ProductsAPIClient.md#get_sync_variant_by_id) | **GET** /store/variants/{id} | Get a Sync Variant
|
208
|
+
*Printful::ProductsAPIClient* | [**update_sync_product**](docs/ProductsAPIClient.md#update_sync_product) | **PUT** /store/products/{id} | Modify a Sync Product
|
209
|
+
*Printful::ProductsAPIClient* | [**update_sync_variant**](docs/ProductsAPIClient.md#update_sync_variant) | **PUT** /store/variants/{id} | Modify a Sync Variant
|
210
|
+
*Printful::ReportsAPIClient* | [**get_statistics**](docs/ReportsAPIClient.md#get_statistics) | **GET** /reports/statistics | Get statistics
|
211
|
+
*Printful::ShippingRateAPIClient* | [**calculate_shipping_rates**](docs/ShippingRateAPIClient.md#calculate_shipping_rates) | **POST** /shipping/rates | Calculate shipping rates
|
212
|
+
*Printful::StoreInformationAPIClient* | [**change_packing_slip**](docs/StoreInformationAPIClient.md#change_packing_slip) | **POST** /store/packing-slip | Change packing slip
|
213
|
+
*Printful::StoreInformationAPIClient* | [**get_store**](docs/StoreInformationAPIClient.md#get_store) | **GET** /stores/{id} | Get basic information about a store
|
214
|
+
*Printful::StoreInformationAPIClient* | [**get_stores**](docs/StoreInformationAPIClient.md#get_stores) | **GET** /stores | Get basic information about stores
|
215
|
+
*Printful::TaxRateAPIClient* | [**calculate_tax_rates**](docs/TaxRateAPIClient.md#calculate_tax_rates) | **POST** /tax/rates | Calculate tax rate
|
216
|
+
*Printful::TaxRateAPIClient* | [**get_tax_countries**](docs/TaxRateAPIClient.md#get_tax_countries) | **GET** /tax/countries | Get a list of countries for tax calculation
|
217
|
+
*Printful::WarehouseProductsAPIClient* | [**get_warehouse_product**](docs/WarehouseProductsAPIClient.md#get_warehouse_product) | **GET** /warehouse/products/{id} | Get warehouse product data
|
218
|
+
*Printful::WarehouseProductsAPIClient* | [**get_warehouse_products**](docs/WarehouseProductsAPIClient.md#get_warehouse_products) | **GET** /warehouse/products | Get a list of your warehouse products
|
219
|
+
*Printful::WebhookAPIClient* | [**create_webhook**](docs/WebhookAPIClient.md#create_webhook) | **POST** /webhooks | Set up webhook configuration
|
220
|
+
*Printful::WebhookAPIClient* | [**disable_webhook**](docs/WebhookAPIClient.md#disable_webhook) | **DELETE** /webhooks | Disable webhook support
|
221
|
+
*Printful::WebhookAPIClient* | [**get_webhooks**](docs/WebhookAPIClient.md#get_webhooks) | **GET** /webhooks | Get webhook configuration
|
222
|
+
|
223
|
+
|
224
|
+
## Documentation for Models
|
225
|
+
|
226
|
+
- [Printful::AddFile200Response](docs/AddFile200Response.md)
|
227
|
+
- [Printful::Address](docs/Address.md)
|
228
|
+
- [Printful::AddressInfo](docs/AddressInfo.md)
|
229
|
+
- [Printful::ApprovalSheet](docs/ApprovalSheet.md)
|
230
|
+
- [Printful::ApprovalSheetChanges](docs/ApprovalSheetChanges.md)
|
231
|
+
- [Printful::ApprovalSheetChangesFilesInner](docs/ApprovalSheetChangesFilesInner.md)
|
232
|
+
- [Printful::ApprovalSheetWebhookFile](docs/ApprovalSheetWebhookFile.md)
|
233
|
+
- [Printful::ApproveDesign200Response](docs/ApproveDesign200Response.md)
|
234
|
+
- [Printful::ApproveDesign200ResponseAllOfResult](docs/ApproveDesign200ResponseAllOfResult.md)
|
235
|
+
- [Printful::AvailabilityStatus](docs/AvailabilityStatus.md)
|
236
|
+
- [Printful::AvailableTechnique](docs/AvailableTechnique.md)
|
237
|
+
- [Printful::AverageFulfillmentTime](docs/AverageFulfillmentTime.md)
|
238
|
+
- [Printful::CalculateShippingRates](docs/CalculateShippingRates.md)
|
239
|
+
- [Printful::CalculateShippingRates200Response](docs/CalculateShippingRates200Response.md)
|
240
|
+
- [Printful::CalculateTaxRates200Response](docs/CalculateTaxRates200Response.md)
|
241
|
+
- [Printful::CatalogFileOption](docs/CatalogFileOption.md)
|
242
|
+
- [Printful::Category](docs/Category.md)
|
243
|
+
- [Printful::ChangePackingSlip200Response](docs/ChangePackingSlip200Response.md)
|
244
|
+
- [Printful::ChangePackingSlip200ResponseResult](docs/ChangePackingSlip200ResponseResult.md)
|
245
|
+
- [Printful::Costs](docs/Costs.md)
|
246
|
+
- [Printful::CostsByAmountInner](docs/CostsByAmountInner.md)
|
247
|
+
- [Printful::CostsByProductInner](docs/CostsByProductInner.md)
|
248
|
+
- [Printful::CostsByVariantInner](docs/CostsByVariantInner.md)
|
249
|
+
- [Printful::Country](docs/Country.md)
|
250
|
+
- [Printful::CreateGenerationTask](docs/CreateGenerationTask.md)
|
251
|
+
- [Printful::CreateGeneratorTask200Response](docs/CreateGeneratorTask200Response.md)
|
252
|
+
- [Printful::CreateOrder200Response](docs/CreateOrder200Response.md)
|
253
|
+
- [Printful::CreateSyncProduct200Response](docs/CreateSyncProduct200Response.md)
|
254
|
+
- [Printful::CreateSyncProduct400Response](docs/CreateSyncProduct400Response.md)
|
255
|
+
- [Printful::CreateSyncProduct400ResponseError](docs/CreateSyncProduct400ResponseError.md)
|
256
|
+
- [Printful::CreateWebhookRequest](docs/CreateWebhookRequest.md)
|
257
|
+
- [Printful::DeleteProductTemplate200Response](docs/DeleteProductTemplate200Response.md)
|
258
|
+
- [Printful::DeleteProductTemplate200ResponseAllOfResult](docs/DeleteProductTemplate200ResponseAllOfResult.md)
|
259
|
+
- [Printful::DeleteSyncVariant200Response](docs/DeleteSyncVariant200Response.md)
|
260
|
+
- [Printful::EstimateOrderCosts200Response](docs/EstimateOrderCosts200Response.md)
|
261
|
+
- [Printful::EstimateOrderCosts200ResponseAllOfResult](docs/EstimateOrderCosts200ResponseAllOfResult.md)
|
262
|
+
- [Printful::File](docs/File.md)
|
263
|
+
- [Printful::FileOption](docs/FileOption.md)
|
264
|
+
- [Printful::FileType](docs/FileType.md)
|
265
|
+
- [Printful::GenerationTask](docs/GenerationTask.md)
|
266
|
+
- [Printful::GenerationTaskExtraMockup](docs/GenerationTaskExtraMockup.md)
|
267
|
+
- [Printful::GenerationTaskFile](docs/GenerationTaskFile.md)
|
268
|
+
- [Printful::GenerationTaskFilePosition](docs/GenerationTaskFilePosition.md)
|
269
|
+
- [Printful::GenerationTaskMockup](docs/GenerationTaskMockup.md)
|
270
|
+
- [Printful::GenerationTaskTemplateFile](docs/GenerationTaskTemplateFile.md)
|
271
|
+
- [Printful::GetApprovalSheets200Response](docs/GetApprovalSheets200Response.md)
|
272
|
+
- [Printful::GetCategories200Response](docs/GetCategories200Response.md)
|
273
|
+
- [Printful::GetCategoryById200Response](docs/GetCategoryById200Response.md)
|
274
|
+
- [Printful::GetCountries200Response](docs/GetCountries200Response.md)
|
275
|
+
- [Printful::GetOrderByIdIdParameter](docs/GetOrderByIdIdParameter.md)
|
276
|
+
- [Printful::GetOrders200Response](docs/GetOrders200Response.md)
|
277
|
+
- [Printful::GetPrintfiles200Response](docs/GetPrintfiles200Response.md)
|
278
|
+
- [Printful::GetProductById200Response](docs/GetProductById200Response.md)
|
279
|
+
- [Printful::GetProductSizeGuideById200Response](docs/GetProductSizeGuideById200Response.md)
|
280
|
+
- [Printful::GetProductSizeGuideById404Response](docs/GetProductSizeGuideById404Response.md)
|
281
|
+
- [Printful::GetProductSizeGuideById404ResponseError](docs/GetProductSizeGuideById404ResponseError.md)
|
282
|
+
- [Printful::GetProductTemplateById200Response](docs/GetProductTemplateById200Response.md)
|
283
|
+
- [Printful::GetProductTemplates200Response](docs/GetProductTemplates200Response.md)
|
284
|
+
- [Printful::GetProducts200Response](docs/GetProducts200Response.md)
|
285
|
+
- [Printful::GetProducts401Response](docs/GetProducts401Response.md)
|
286
|
+
- [Printful::GetProducts401ResponseError](docs/GetProducts401ResponseError.md)
|
287
|
+
- [Printful::GetScopes200Response](docs/GetScopes200Response.md)
|
288
|
+
- [Printful::GetScopes200ResponseAllOfResult](docs/GetScopes200ResponseAllOfResult.md)
|
289
|
+
- [Printful::GetScopes200ResponseAllOfResultScopesInner](docs/GetScopes200ResponseAllOfResultScopesInner.md)
|
290
|
+
- [Printful::GetStatistics200Response](docs/GetStatistics200Response.md)
|
291
|
+
- [Printful::GetStore200Response](docs/GetStore200Response.md)
|
292
|
+
- [Printful::GetStoreSyncVariantById200Response](docs/GetStoreSyncVariantById200Response.md)
|
293
|
+
- [Printful::GetStores200Response](docs/GetStores200Response.md)
|
294
|
+
- [Printful::GetStores403Response](docs/GetStores403Response.md)
|
295
|
+
- [Printful::GetStores403ResponseError](docs/GetStores403ResponseError.md)
|
296
|
+
- [Printful::GetSyncProductById200Response](docs/GetSyncProductById200Response.md)
|
297
|
+
- [Printful::GetSyncProductByIdIdParameter](docs/GetSyncProductByIdIdParameter.md)
|
298
|
+
- [Printful::GetSyncProducts200Response](docs/GetSyncProducts200Response.md)
|
299
|
+
- [Printful::GetSyncVariantById200Response](docs/GetSyncVariantById200Response.md)
|
300
|
+
- [Printful::GetTaxCountries200Response](docs/GetTaxCountries200Response.md)
|
301
|
+
- [Printful::GetTaxCountries200ResponseResultInner](docs/GetTaxCountries200ResponseResultInner.md)
|
302
|
+
- [Printful::GetTaxCountries200ResponseResultInnerAllOfStatesInner](docs/GetTaxCountries200ResponseResultInnerAllOfStatesInner.md)
|
303
|
+
- [Printful::GetTemplates200Response](docs/GetTemplates200Response.md)
|
304
|
+
- [Printful::GetVariantById200Response](docs/GetVariantById200Response.md)
|
305
|
+
- [Printful::GetWarehouseProduct200Response](docs/GetWarehouseProduct200Response.md)
|
306
|
+
- [Printful::GetWarehouseProducts200Response](docs/GetWarehouseProducts200Response.md)
|
307
|
+
- [Printful::GetWebhooks200Response](docs/GetWebhooks200Response.md)
|
308
|
+
- [Printful::Gift](docs/Gift.md)
|
309
|
+
- [Printful::IncompleteItem](docs/IncompleteItem.md)
|
310
|
+
- [Printful::Item](docs/Item.md)
|
311
|
+
- [Printful::ItemFilesInner](docs/ItemFilesInner.md)
|
312
|
+
- [Printful::ItemFilesInnerAllOfPosition](docs/ItemFilesInnerAllOfPosition.md)
|
313
|
+
- [Printful::ItemInfo](docs/ItemInfo.md)
|
314
|
+
- [Printful::ItemOption](docs/ItemOption.md)
|
315
|
+
- [Printful::Material](docs/Material.md)
|
316
|
+
- [Printful::Measurement](docs/Measurement.md)
|
317
|
+
- [Printful::MeasurementValue](docs/MeasurementValue.md)
|
318
|
+
- [Printful::Option](docs/Option.md)
|
319
|
+
- [Printful::OptionType](docs/OptionType.md)
|
320
|
+
- [Printful::Order](docs/Order.md)
|
321
|
+
- [Printful::OrderCosts](docs/OrderCosts.md)
|
322
|
+
- [Printful::OrderEstimateCosts](docs/OrderEstimateCosts.md)
|
323
|
+
- [Printful::OrderEstimateRetailCosts](docs/OrderEstimateRetailCosts.md)
|
324
|
+
- [Printful::OrderEvent](docs/OrderEvent.md)
|
325
|
+
- [Printful::OrderShipmentItem](docs/OrderShipmentItem.md)
|
326
|
+
- [Printful::PackingSlip](docs/PackingSlip.md)
|
327
|
+
- [Printful::Paging](docs/Paging.md)
|
328
|
+
- [Printful::PricingBreakdown](docs/PricingBreakdown.md)
|
329
|
+
- [Printful::Printfile](docs/Printfile.md)
|
330
|
+
- [Printful::PrintfileInfo](docs/PrintfileInfo.md)
|
331
|
+
- [Printful::PrintfulCosts](docs/PrintfulCosts.md)
|
332
|
+
- [Printful::Product](docs/Product.md)
|
333
|
+
- [Printful::Product1](docs/Product1.md)
|
334
|
+
- [Printful::Product1SyncVariantsInner](docs/Product1SyncVariantsInner.md)
|
335
|
+
- [Printful::ProductInfo](docs/ProductInfo.md)
|
336
|
+
- [Printful::ProductSizeGuide](docs/ProductSizeGuide.md)
|
337
|
+
- [Printful::ProductTemplate](docs/ProductTemplate.md)
|
338
|
+
- [Printful::ProductVariant](docs/ProductVariant.md)
|
339
|
+
- [Printful::Profit](docs/Profit.md)
|
340
|
+
- [Printful::Response200](docs/Response200.md)
|
341
|
+
- [Printful::Response200Paginated](docs/Response200Paginated.md)
|
342
|
+
- [Printful::RetailCosts](docs/RetailCosts.md)
|
343
|
+
- [Printful::SalesAndCostsInner](docs/SalesAndCostsInner.md)
|
344
|
+
- [Printful::SalesAndCostsSummaryInner](docs/SalesAndCostsSummaryInner.md)
|
345
|
+
- [Printful::Shipment](docs/Shipment.md)
|
346
|
+
- [Printful::ShippingInfo](docs/ShippingInfo.md)
|
347
|
+
- [Printful::SizeTable](docs/SizeTable.md)
|
348
|
+
- [Printful::State](docs/State.md)
|
349
|
+
- [Printful::Statistics](docs/Statistics.md)
|
350
|
+
- [Printful::Store](docs/Store.md)
|
351
|
+
- [Printful::StoreStatistics](docs/StoreStatistics.md)
|
352
|
+
- [Printful::SubmitApprovalSheetChanges200Response](docs/SubmitApprovalSheetChanges200Response.md)
|
353
|
+
- [Printful::SyncProduct](docs/SyncProduct.md)
|
354
|
+
- [Printful::SyncProductDeleted](docs/SyncProductDeleted.md)
|
355
|
+
- [Printful::SyncProductEvent](docs/SyncProductEvent.md)
|
356
|
+
- [Printful::SyncProductInfo](docs/SyncProductInfo.md)
|
357
|
+
- [Printful::SyncVariant](docs/SyncVariant.md)
|
358
|
+
- [Printful::SyncVariantInfo](docs/SyncVariantInfo.md)
|
359
|
+
- [Printful::SyncVariantProduct](docs/SyncVariantProduct.md)
|
360
|
+
- [Printful::TaxAddressInfo](docs/TaxAddressInfo.md)
|
361
|
+
- [Printful::TaxInfo](docs/TaxInfo.md)
|
362
|
+
- [Printful::TaxRequest](docs/TaxRequest.md)
|
363
|
+
- [Printful::Template](docs/Template.md)
|
364
|
+
- [Printful::TemplateById](docs/TemplateById.md)
|
365
|
+
- [Printful::TemplateByIdColorsInner](docs/TemplateByIdColorsInner.md)
|
366
|
+
- [Printful::TemplateByIdOptionDataInner](docs/TemplateByIdOptionDataInner.md)
|
367
|
+
- [Printful::TemplateByIdPlacementOptionDataInner](docs/TemplateByIdPlacementOptionDataInner.md)
|
368
|
+
- [Printful::TemplateByIdPlacementOptionDataInnerOptionsInner](docs/TemplateByIdPlacementOptionDataInnerOptionsInner.md)
|
369
|
+
- [Printful::TemplateByIdPlacementsInner](docs/TemplateByIdPlacementsInner.md)
|
370
|
+
- [Printful::TemplatePlacementConflict](docs/TemplatePlacementConflict.md)
|
371
|
+
- [Printful::TemplateVariantMapping](docs/TemplateVariantMapping.md)
|
372
|
+
- [Printful::TemplateVariantMappingItem](docs/TemplateVariantMappingItem.md)
|
373
|
+
- [Printful::Templates](docs/Templates.md)
|
374
|
+
- [Printful::ThreadColors200Response](docs/ThreadColors200Response.md)
|
375
|
+
- [Printful::ThreadColorsRequest](docs/ThreadColorsRequest.md)
|
376
|
+
- [Printful::TotalPaidOrders](docs/TotalPaidOrders.md)
|
377
|
+
- [Printful::UpdateSyncProductRequest](docs/UpdateSyncProductRequest.md)
|
378
|
+
- [Printful::UpdateSyncProductRequestSyncVariantsInner](docs/UpdateSyncProductRequestSyncVariantsInner.md)
|
379
|
+
- [Printful::UpdateSyncVariantRequest](docs/UpdateSyncVariantRequest.md)
|
380
|
+
- [Printful::Variant](docs/Variant.md)
|
381
|
+
- [Printful::VariantInfo](docs/VariantInfo.md)
|
382
|
+
- [Printful::VariantPrintfile](docs/VariantPrintfile.md)
|
383
|
+
- [Printful::WarehouseProduct](docs/WarehouseProduct.md)
|
384
|
+
- [Printful::WarehouseProductVariant](docs/WarehouseProductVariant.md)
|
385
|
+
- [Printful::Webhook](docs/Webhook.md)
|
386
|
+
- [Printful::WebhookInfo](docs/WebhookInfo.md)
|
387
|
+
|
388
|
+
|
389
|
+
## Documentation for Authorization
|
390
|
+
|
391
|
+
|
392
|
+
Authentication schemes defined for the API:
|
393
|
+
### OAuth
|
394
|
+
|
395
|
+
|
396
|
+
- **Type**: OAuth
|
397
|
+
- **Flow**: accessCode
|
398
|
+
- **Authorization URL**: https://www.printful.com/oauth/token
|
399
|
+
- **Scopes**:
|
400
|
+
- orders: Read and Write access to Orders
|
401
|
+
- orders/read: Read access to Orders
|
402
|
+
- stores_list: Read and Write access to Stores
|
403
|
+
- stores_list/read: Read access to Stores
|
404
|
+
- sync_products: Read and Write access to SyncProducts
|
405
|
+
- sync_products/read: Read access to SyncProducts
|
406
|
+
- file_library: Read and Write access to File library
|
407
|
+
- file_library/read: Read access to File library
|
408
|
+
- webhooks: Read and Write access to Webhooks
|
409
|
+
- webhooks/read: Read access to Webhooks
|
410
|
+
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# Printful::ReportsAPIClient
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.printful.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**get_statistics**](ReportsAPIClient.md#get_statistics) | **GET** /reports/statistics | Get statistics |
|
8
|
+
|
9
|
+
|
10
|
+
## get_statistics
|
11
|
+
|
12
|
+
> <GetStatistics200Response> get_statistics(date_from, date_to, report_types, opts)
|
13
|
+
|
14
|
+
Get statistics
|
15
|
+
|
16
|
+
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]`).
|
17
|
+
|
18
|
+
### Examples
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'time'
|
22
|
+
require 'printful_client'
|
23
|
+
# setup authorization
|
24
|
+
Printful.configure do |config|
|
25
|
+
# Configure OAuth2 access token for authorization: OAuth
|
26
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
27
|
+
end
|
28
|
+
|
29
|
+
api_instance = Printful::ReportsAPIClient.new
|
30
|
+
date_from = Date.parse('Mon Aug 01 00:00:00 UTC 2022') # Date | The beginning of the period to get the statistics from (date in `Y-m-d` format).
|
31
|
+
date_to = Date.parse('Wed Aug 31 00:00:00 UTC 2022') # Date | The end of the period to get the statistics from (date in `Y-m-d` format).
|
32
|
+
report_types = 'sales_and_costs,profit' # String | A comma-separated list of report types to be retrieved.
|
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
|
+
currency: 'USD' # String | 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.
|
36
|
+
}
|
37
|
+
|
38
|
+
begin
|
39
|
+
# Get statistics
|
40
|
+
result = api_instance.get_statistics(date_from, date_to, report_types, opts)
|
41
|
+
p result
|
42
|
+
rescue Printful::ApiError => e
|
43
|
+
puts "Error when calling ReportsAPIClient->get_statistics: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
#### Using the get_statistics_with_http_info variant
|
48
|
+
|
49
|
+
This returns an Array which contains the response data, status code and headers.
|
50
|
+
|
51
|
+
> <Array(<GetStatistics200Response>, Integer, Hash)> get_statistics_with_http_info(date_from, date_to, report_types, opts)
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
begin
|
55
|
+
# Get statistics
|
56
|
+
data, status_code, headers = api_instance.get_statistics_with_http_info(date_from, date_to, report_types, opts)
|
57
|
+
p status_code # => 2xx
|
58
|
+
p headers # => { ... }
|
59
|
+
p data # => <GetStatistics200Response>
|
60
|
+
rescue Printful::ApiError => e
|
61
|
+
puts "Error when calling ReportsAPIClient->get_statistics_with_http_info: #{e}"
|
62
|
+
end
|
63
|
+
```
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
|
67
|
+
| Name | Type | Description | Notes |
|
68
|
+
| ---- | ---- | ----------- | ----- |
|
69
|
+
| **date_from** | **Date** | The beginning of the period to get the statistics from (date in `Y-m-d` format). | |
|
70
|
+
| **date_to** | **Date** | The end of the period to get the statistics from (date in `Y-m-d` format). | |
|
71
|
+
| **report_types** | **String** | A comma-separated list of report types to be retrieved. | |
|
72
|
+
| **x_pf_store_id** | **String** | Use this to specify which store you want to use (required only for account level token) | [optional] |
|
73
|
+
| **currency** | **String** | 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. | [optional] |
|
74
|
+
|
75
|
+
### Return type
|
76
|
+
|
77
|
+
[**GetStatistics200Response**](GetStatistics200Response.md)
|
78
|
+
|
79
|
+
### Authorization
|
80
|
+
|
81
|
+
[OAuth](../README.md#OAuth)
|
82
|
+
|
83
|
+
### HTTP request headers
|
84
|
+
|
85
|
+
- **Content-Type**: Not defined
|
86
|
+
- **Accept**: application/json
|
87
|
+
|
data/docs/Response200.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Printful::Response200
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **code** | **Integer** | Response status code `200` | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'printful_client'
|
13
|
+
|
14
|
+
instance = Printful::Response200.new(
|
15
|
+
code: 200
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Printful::Response200Paginated
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **code** | **Integer** | Response status code `200` | [optional] |
|
8
|
+
| **paging** | [**Paging**](Paging.md) | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'printful_client'
|
14
|
+
|
15
|
+
instance = Printful::Response200Paginated.new(
|
16
|
+
code: 200,
|
17
|
+
paging: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/RetailCosts.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Printful::RetailCosts
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **currency** | **String** | 3 letter currency code | [optional] |
|
8
|
+
| **subtotal** | **String** | Total cost of all items | [optional] |
|
9
|
+
| **discount** | **String** | Discount sum | [optional] |
|
10
|
+
| **shipping** | **String** | Shipping costs | [optional] |
|
11
|
+
| **tax** | **String** | Sum of taxes (not included in the item price) | [optional] |
|
12
|
+
| **vat** | **String** | Sum of VAT (not included in the item price) | [optional][readonly] |
|
13
|
+
| **total** | **String** | Grand Total (subtotal-discount+tax+vat+shipping) | [optional][readonly] |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'printful_client'
|
19
|
+
|
20
|
+
instance = Printful::RetailCosts.new(
|
21
|
+
currency: USD,
|
22
|
+
subtotal: 10.00,
|
23
|
+
discount: 0.00,
|
24
|
+
shipping: 5.00,
|
25
|
+
tax: 0.00,
|
26
|
+
vat: 0.00,
|
27
|
+
total: 15.00
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Printful::SalesAndCostsInner
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **date** | **String** | The date of the value: day in `Y-m-d` format, month in `Y-m` format or \"Total\" for the first element of the list which shows the total values for the whole requested period | [optional] |
|
8
|
+
| **sales** | **Float** | Order retail price data. Available only if retail price fields are properly set up on the integration's side | [optional] |
|
9
|
+
| **fulfillment** | **Float** | Product fulfillment, digitization, branding, shipping costs and taxes that are charged by Printful | [optional] |
|
10
|
+
| **profit** | **Float** | The difference between Sales and Fulfillment. If retail price data is not available, profit might be negative | [optional] |
|
11
|
+
| **sales_discount** | **Float** | Any retail price discounts set up on the integration's side | [optional] |
|
12
|
+
| **fulfillment_discount** | **Float** | Any fulfillment discounts (such as the monthly discount) set up on Printful's side | [optional] |
|
13
|
+
| **sales_shipping** | **Float** | The retail shipping price that was paid by the buyer | [optional] |
|
14
|
+
| **fulfillment_shipping** | **Float** | Shipping costs that were charged by Printful | [optional] |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'printful_client'
|
20
|
+
|
21
|
+
instance = Printful::SalesAndCostsInner.new(
|
22
|
+
date: null,
|
23
|
+
sales: null,
|
24
|
+
fulfillment: null,
|
25
|
+
profit: null,
|
26
|
+
sales_discount: null,
|
27
|
+
fulfillment_discount: null,
|
28
|
+
sales_shipping: null,
|
29
|
+
fulfillment_shipping: null
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Printful::SalesAndCostsSummaryInner
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **date** | **String** | The date of the value: day in `Y-m-d` format, month in `Y-m` format or \"Total\" for the first element of the list which shows the total values for the whole requested period | [optional] |
|
8
|
+
| **order_count** | **Float** | The order count in the aggregation period | [optional] |
|
9
|
+
| **costs** | **Float** | Product fulfillment, digitization, branding, shipping costs and taxes that are charged by Printful | [optional] |
|
10
|
+
| **profit** | **Float** | The difference between Sales and Fulfillment. If retail price data is not available, profit might be negative | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'printful_client'
|
16
|
+
|
17
|
+
instance = Printful::SalesAndCostsSummaryInner.new(
|
18
|
+
date: null,
|
19
|
+
order_count: null,
|
20
|
+
costs: null,
|
21
|
+
profit: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|