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,651 @@
|
|
1
|
+
=begin
|
2
|
+
#API Documentation | Printful
|
3
|
+
|
4
|
+
## About the Printful API The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources. ## Requests and responses ### Request endpoint All API requests have to be sent to this URL: ``` https://api.printful.com/ ``` If you are using a proxy, make sure that all requests have host header set to **api.printful.com**. ### Request parameters Some mandatory parameters (like object identifiers) must be included in the request URL path ``` GET /orders/123 ``` Additional parameters can be passed as GET variables: ``` GET /orders?offset=10&limit=5 ``` For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body: ``` POST /orders {\"recipient\":{...},\"items\":[...]} ``` ### Response body The response body is always a JSON object that contains a response status code (identical to the HTTP status code) and the result of the action. If the status code is 200, then the action was successful. ``` { \"code\": 200, //Response status code \"result\":{ //API method return data //... } } ``` Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL. ``` { \"code\": 200, //Response status code \"result\":[ { //Item 11 }, { //Item 12 } ] \"paging\": { \"total\": 12, //Total items available \"offset\": 10, //Items skipped from the beginning \"limit\": 20 //Number of items per page } } ``` ## Error response If the API call is not successful, then the response code is not in the 2xx range and the `result` attribute contains an error description. ``` { \"code\": 404, \"result\": \"Not Found\", \"error\": { \"reason\": \"NotFound\", \"message\": \"Not Found\" } } ``` In general, response codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Printful's servers. ### Timestamps All timestamps from the API are returned as integers in UNIX timestamp format. ### Rate Limits Printful API has a general rate limit of 120 API calls per minute. Additionally, endpoints that perform resource intensive operations (such as mockup generator) have a lower allowed request limit. # Authentication <!-- ReDoc-Inject: <security-definitions> -->
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: devsupport@printful.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Printful
|
16
|
+
class ProductsAPIClient
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a new Sync Product
|
23
|
+
# Creates a new Sync Product together with its Sync Variants ([See examples](#section/Products-API-examples/Create-a-new-Sync-Product)).
|
24
|
+
# @param product1 [Product1] POST request body
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
27
|
+
# @return [CreateSyncProduct200Response]
|
28
|
+
def create_sync_product(product1, opts = {})
|
29
|
+
data, _status_code, _headers = create_sync_product_with_http_info(product1, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a new Sync Product
|
34
|
+
# Creates a new Sync Product together with its Sync Variants ([See examples](#section/Products-API-examples/Create-a-new-Sync-Product)).
|
35
|
+
# @param product1 [Product1] POST request body
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
38
|
+
# @return [Array<(CreateSyncProduct200Response, Integer, Hash)>] CreateSyncProduct200Response data, response status code and response headers
|
39
|
+
def create_sync_product_with_http_info(product1, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: ProductsAPIClient.create_sync_product ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'product1' is set
|
44
|
+
if @api_client.config.client_side_validation && product1.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'product1' when calling ProductsAPIClient.create_sync_product"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/store/products'
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = opts[:header_params] || {}
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
57
|
+
# HTTP header 'Content-Type'
|
58
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
59
|
+
if !content_type.nil?
|
60
|
+
header_params['Content-Type'] = content_type
|
61
|
+
end
|
62
|
+
header_params[:'X-PF-Store-Id'] = opts[:'x_pf_store_id'] if !opts[:'x_pf_store_id'].nil?
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(product1)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:debug_return_type] || 'CreateSyncProduct200Response'
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:debug_auth_names] || ['OAuth']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:operation => :"ProductsAPIClient.create_sync_product",
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names,
|
83
|
+
:return_type => return_type
|
84
|
+
)
|
85
|
+
|
86
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: ProductsAPIClient#create_sync_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
|
93
|
+
# Create a new Sync Variant
|
94
|
+
# Creates a new Sync Variant for an existing Sync Product ([See examples](#section/Products-API-examples/Create-a-new-Sync-Variant)).
|
95
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Product ID (integer) or External ID (if prefixed with @)
|
96
|
+
# @param product1_sync_variants_inner [Product1SyncVariantsInner] POST request body
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
99
|
+
# @return [GetSyncVariantById200Response]
|
100
|
+
def create_sync_variant(id, product1_sync_variants_inner, opts = {})
|
101
|
+
data, _status_code, _headers = create_sync_variant_with_http_info(id, product1_sync_variants_inner, opts)
|
102
|
+
data
|
103
|
+
end
|
104
|
+
|
105
|
+
# Create a new Sync Variant
|
106
|
+
# Creates a new Sync Variant for an existing Sync Product ([See examples](#section/Products-API-examples/Create-a-new-Sync-Variant)).
|
107
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Product ID (integer) or External ID (if prefixed with @)
|
108
|
+
# @param product1_sync_variants_inner [Product1SyncVariantsInner] POST request body
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
111
|
+
# @return [Array<(GetSyncVariantById200Response, Integer, Hash)>] GetSyncVariantById200Response data, response status code and response headers
|
112
|
+
def create_sync_variant_with_http_info(id, product1_sync_variants_inner, opts = {})
|
113
|
+
if @api_client.config.debugging
|
114
|
+
@api_client.config.logger.debug 'Calling API: ProductsAPIClient.create_sync_variant ...'
|
115
|
+
end
|
116
|
+
# verify the required parameter 'id' is set
|
117
|
+
if @api_client.config.client_side_validation && id.nil?
|
118
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProductsAPIClient.create_sync_variant"
|
119
|
+
end
|
120
|
+
# verify the required parameter 'product1_sync_variants_inner' is set
|
121
|
+
if @api_client.config.client_side_validation && product1_sync_variants_inner.nil?
|
122
|
+
fail ArgumentError, "Missing the required parameter 'product1_sync_variants_inner' when calling ProductsAPIClient.create_sync_variant"
|
123
|
+
end
|
124
|
+
# resource path
|
125
|
+
local_var_path = '/store/products/{id}/variants'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
126
|
+
|
127
|
+
# query parameters
|
128
|
+
query_params = opts[:query_params] || {}
|
129
|
+
|
130
|
+
# header parameters
|
131
|
+
header_params = opts[:header_params] || {}
|
132
|
+
# HTTP header 'Accept' (if needed)
|
133
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
134
|
+
# HTTP header 'Content-Type'
|
135
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
136
|
+
if !content_type.nil?
|
137
|
+
header_params['Content-Type'] = content_type
|
138
|
+
end
|
139
|
+
header_params[:'X-PF-Store-Id'] = opts[:'x_pf_store_id'] if !opts[:'x_pf_store_id'].nil?
|
140
|
+
|
141
|
+
# form parameters
|
142
|
+
form_params = opts[:form_params] || {}
|
143
|
+
|
144
|
+
# http body (model)
|
145
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(product1_sync_variants_inner)
|
146
|
+
|
147
|
+
# return_type
|
148
|
+
return_type = opts[:debug_return_type] || 'GetSyncVariantById200Response'
|
149
|
+
|
150
|
+
# auth_names
|
151
|
+
auth_names = opts[:debug_auth_names] || ['OAuth']
|
152
|
+
|
153
|
+
new_options = opts.merge(
|
154
|
+
:operation => :"ProductsAPIClient.create_sync_variant",
|
155
|
+
:header_params => header_params,
|
156
|
+
:query_params => query_params,
|
157
|
+
:form_params => form_params,
|
158
|
+
:body => post_body,
|
159
|
+
:auth_names => auth_names,
|
160
|
+
:return_type => return_type
|
161
|
+
)
|
162
|
+
|
163
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug "API called: ProductsAPIClient#create_sync_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
166
|
+
end
|
167
|
+
return data, status_code, headers
|
168
|
+
end
|
169
|
+
|
170
|
+
# Delete a Sync Product
|
171
|
+
# Deletes a Sync Product with all of its Sync Variants
|
172
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Product ID (integer) or External ID (if prefixed with @)
|
173
|
+
# @param [Hash] opts the optional parameters
|
174
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
175
|
+
# @return [GetSyncProductById200Response]
|
176
|
+
def delete_sync_product(id, opts = {})
|
177
|
+
data, _status_code, _headers = delete_sync_product_with_http_info(id, opts)
|
178
|
+
data
|
179
|
+
end
|
180
|
+
|
181
|
+
# Delete a Sync Product
|
182
|
+
# Deletes a Sync Product with all of its Sync Variants
|
183
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Product ID (integer) or External ID (if prefixed with @)
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
186
|
+
# @return [Array<(GetSyncProductById200Response, Integer, Hash)>] GetSyncProductById200Response data, response status code and response headers
|
187
|
+
def delete_sync_product_with_http_info(id, opts = {})
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug 'Calling API: ProductsAPIClient.delete_sync_product ...'
|
190
|
+
end
|
191
|
+
# verify the required parameter 'id' is set
|
192
|
+
if @api_client.config.client_side_validation && id.nil?
|
193
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProductsAPIClient.delete_sync_product"
|
194
|
+
end
|
195
|
+
# resource path
|
196
|
+
local_var_path = '/store/products/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
197
|
+
|
198
|
+
# query parameters
|
199
|
+
query_params = opts[:query_params] || {}
|
200
|
+
|
201
|
+
# header parameters
|
202
|
+
header_params = opts[:header_params] || {}
|
203
|
+
# HTTP header 'Accept' (if needed)
|
204
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
205
|
+
header_params[:'X-PF-Store-Id'] = opts[:'x_pf_store_id'] if !opts[:'x_pf_store_id'].nil?
|
206
|
+
|
207
|
+
# form parameters
|
208
|
+
form_params = opts[:form_params] || {}
|
209
|
+
|
210
|
+
# http body (model)
|
211
|
+
post_body = opts[:debug_body]
|
212
|
+
|
213
|
+
# return_type
|
214
|
+
return_type = opts[:debug_return_type] || 'GetSyncProductById200Response'
|
215
|
+
|
216
|
+
# auth_names
|
217
|
+
auth_names = opts[:debug_auth_names] || ['OAuth']
|
218
|
+
|
219
|
+
new_options = opts.merge(
|
220
|
+
:operation => :"ProductsAPIClient.delete_sync_product",
|
221
|
+
:header_params => header_params,
|
222
|
+
:query_params => query_params,
|
223
|
+
:form_params => form_params,
|
224
|
+
:body => post_body,
|
225
|
+
:auth_names => auth_names,
|
226
|
+
:return_type => return_type
|
227
|
+
)
|
228
|
+
|
229
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
230
|
+
if @api_client.config.debugging
|
231
|
+
@api_client.config.logger.debug "API called: ProductsAPIClient#delete_sync_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
232
|
+
end
|
233
|
+
return data, status_code, headers
|
234
|
+
end
|
235
|
+
|
236
|
+
# Delete a Sync Variant
|
237
|
+
# Deletes a single Sync Variant.
|
238
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Variant ID (integer) or External ID (if prefixed with @)
|
239
|
+
# @param [Hash] opts the optional parameters
|
240
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
241
|
+
# @return [DeleteSyncVariant200Response]
|
242
|
+
def delete_sync_variant(id, opts = {})
|
243
|
+
data, _status_code, _headers = delete_sync_variant_with_http_info(id, opts)
|
244
|
+
data
|
245
|
+
end
|
246
|
+
|
247
|
+
# Delete a Sync Variant
|
248
|
+
# Deletes a single Sync Variant.
|
249
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Variant ID (integer) or External ID (if prefixed with @)
|
250
|
+
# @param [Hash] opts the optional parameters
|
251
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
252
|
+
# @return [Array<(DeleteSyncVariant200Response, Integer, Hash)>] DeleteSyncVariant200Response data, response status code and response headers
|
253
|
+
def delete_sync_variant_with_http_info(id, opts = {})
|
254
|
+
if @api_client.config.debugging
|
255
|
+
@api_client.config.logger.debug 'Calling API: ProductsAPIClient.delete_sync_variant ...'
|
256
|
+
end
|
257
|
+
# verify the required parameter 'id' is set
|
258
|
+
if @api_client.config.client_side_validation && id.nil?
|
259
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProductsAPIClient.delete_sync_variant"
|
260
|
+
end
|
261
|
+
# resource path
|
262
|
+
local_var_path = '/store/variants/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
263
|
+
|
264
|
+
# query parameters
|
265
|
+
query_params = opts[:query_params] || {}
|
266
|
+
|
267
|
+
# header parameters
|
268
|
+
header_params = opts[:header_params] || {}
|
269
|
+
# HTTP header 'Accept' (if needed)
|
270
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
271
|
+
header_params[:'X-PF-Store-Id'] = opts[:'x_pf_store_id'] if !opts[:'x_pf_store_id'].nil?
|
272
|
+
|
273
|
+
# form parameters
|
274
|
+
form_params = opts[:form_params] || {}
|
275
|
+
|
276
|
+
# http body (model)
|
277
|
+
post_body = opts[:debug_body]
|
278
|
+
|
279
|
+
# return_type
|
280
|
+
return_type = opts[:debug_return_type] || 'DeleteSyncVariant200Response'
|
281
|
+
|
282
|
+
# auth_names
|
283
|
+
auth_names = opts[:debug_auth_names] || ['OAuth']
|
284
|
+
|
285
|
+
new_options = opts.merge(
|
286
|
+
:operation => :"ProductsAPIClient.delete_sync_variant",
|
287
|
+
:header_params => header_params,
|
288
|
+
:query_params => query_params,
|
289
|
+
:form_params => form_params,
|
290
|
+
:body => post_body,
|
291
|
+
:auth_names => auth_names,
|
292
|
+
:return_type => return_type
|
293
|
+
)
|
294
|
+
|
295
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
296
|
+
if @api_client.config.debugging
|
297
|
+
@api_client.config.logger.debug "API called: ProductsAPIClient#delete_sync_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
298
|
+
end
|
299
|
+
return data, status_code, headers
|
300
|
+
end
|
301
|
+
|
302
|
+
# Get a Sync Product
|
303
|
+
# Get information about a single Sync Product and its Sync Variants.
|
304
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Product ID (integer) or External ID (if prefixed with @)
|
305
|
+
# @param [Hash] opts the optional parameters
|
306
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
307
|
+
# @return [GetSyncProductById200Response]
|
308
|
+
def get_sync_product_by_id(id, opts = {})
|
309
|
+
data, _status_code, _headers = get_sync_product_by_id_with_http_info(id, opts)
|
310
|
+
data
|
311
|
+
end
|
312
|
+
|
313
|
+
# Get a Sync Product
|
314
|
+
# Get information about a single Sync Product and its Sync Variants.
|
315
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Product ID (integer) or External ID (if prefixed with @)
|
316
|
+
# @param [Hash] opts the optional parameters
|
317
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
318
|
+
# @return [Array<(GetSyncProductById200Response, Integer, Hash)>] GetSyncProductById200Response data, response status code and response headers
|
319
|
+
def get_sync_product_by_id_with_http_info(id, opts = {})
|
320
|
+
if @api_client.config.debugging
|
321
|
+
@api_client.config.logger.debug 'Calling API: ProductsAPIClient.get_sync_product_by_id ...'
|
322
|
+
end
|
323
|
+
# verify the required parameter 'id' is set
|
324
|
+
if @api_client.config.client_side_validation && id.nil?
|
325
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProductsAPIClient.get_sync_product_by_id"
|
326
|
+
end
|
327
|
+
# resource path
|
328
|
+
local_var_path = '/store/products/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
329
|
+
|
330
|
+
# query parameters
|
331
|
+
query_params = opts[:query_params] || {}
|
332
|
+
|
333
|
+
# header parameters
|
334
|
+
header_params = opts[:header_params] || {}
|
335
|
+
# HTTP header 'Accept' (if needed)
|
336
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
337
|
+
header_params[:'X-PF-Store-Id'] = opts[:'x_pf_store_id'] if !opts[:'x_pf_store_id'].nil?
|
338
|
+
|
339
|
+
# form parameters
|
340
|
+
form_params = opts[:form_params] || {}
|
341
|
+
|
342
|
+
# http body (model)
|
343
|
+
post_body = opts[:debug_body]
|
344
|
+
|
345
|
+
# return_type
|
346
|
+
return_type = opts[:debug_return_type] || 'GetSyncProductById200Response'
|
347
|
+
|
348
|
+
# auth_names
|
349
|
+
auth_names = opts[:debug_auth_names] || ['OAuth']
|
350
|
+
|
351
|
+
new_options = opts.merge(
|
352
|
+
:operation => :"ProductsAPIClient.get_sync_product_by_id",
|
353
|
+
:header_params => header_params,
|
354
|
+
:query_params => query_params,
|
355
|
+
:form_params => form_params,
|
356
|
+
:body => post_body,
|
357
|
+
:auth_names => auth_names,
|
358
|
+
:return_type => return_type
|
359
|
+
)
|
360
|
+
|
361
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
362
|
+
if @api_client.config.debugging
|
363
|
+
@api_client.config.logger.debug "API called: ProductsAPIClient#get_sync_product_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
364
|
+
end
|
365
|
+
return data, status_code, headers
|
366
|
+
end
|
367
|
+
|
368
|
+
# Get Sync Products
|
369
|
+
# Returns a list of Sync Product objects from your custom Printful store.
|
370
|
+
# @param [Hash] opts the optional parameters
|
371
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
372
|
+
# @option opts [String] :category_id A comma-separated list of Category IDs of the Products that are to be returned
|
373
|
+
# @return [GetSyncProducts200Response]
|
374
|
+
def get_sync_products(opts = {})
|
375
|
+
data, _status_code, _headers = get_sync_products_with_http_info(opts)
|
376
|
+
data
|
377
|
+
end
|
378
|
+
|
379
|
+
# Get Sync Products
|
380
|
+
# Returns a list of Sync Product objects from your custom Printful store.
|
381
|
+
# @param [Hash] opts the optional parameters
|
382
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
383
|
+
# @option opts [String] :category_id A comma-separated list of Category IDs of the Products that are to be returned
|
384
|
+
# @return [Array<(GetSyncProducts200Response, Integer, Hash)>] GetSyncProducts200Response data, response status code and response headers
|
385
|
+
def get_sync_products_with_http_info(opts = {})
|
386
|
+
if @api_client.config.debugging
|
387
|
+
@api_client.config.logger.debug 'Calling API: ProductsAPIClient.get_sync_products ...'
|
388
|
+
end
|
389
|
+
# resource path
|
390
|
+
local_var_path = '/store/products'
|
391
|
+
|
392
|
+
# query parameters
|
393
|
+
query_params = opts[:query_params] || {}
|
394
|
+
query_params[:'category_id'] = opts[:'category_id'] if !opts[:'category_id'].nil?
|
395
|
+
|
396
|
+
# header parameters
|
397
|
+
header_params = opts[:header_params] || {}
|
398
|
+
# HTTP header 'Accept' (if needed)
|
399
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
400
|
+
header_params[:'X-PF-Store-Id'] = opts[:'x_pf_store_id'] if !opts[:'x_pf_store_id'].nil?
|
401
|
+
|
402
|
+
# form parameters
|
403
|
+
form_params = opts[:form_params] || {}
|
404
|
+
|
405
|
+
# http body (model)
|
406
|
+
post_body = opts[:debug_body]
|
407
|
+
|
408
|
+
# return_type
|
409
|
+
return_type = opts[:debug_return_type] || 'GetSyncProducts200Response'
|
410
|
+
|
411
|
+
# auth_names
|
412
|
+
auth_names = opts[:debug_auth_names] || ['OAuth']
|
413
|
+
|
414
|
+
new_options = opts.merge(
|
415
|
+
:operation => :"ProductsAPIClient.get_sync_products",
|
416
|
+
:header_params => header_params,
|
417
|
+
:query_params => query_params,
|
418
|
+
:form_params => form_params,
|
419
|
+
:body => post_body,
|
420
|
+
:auth_names => auth_names,
|
421
|
+
:return_type => return_type
|
422
|
+
)
|
423
|
+
|
424
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
425
|
+
if @api_client.config.debugging
|
426
|
+
@api_client.config.logger.debug "API called: ProductsAPIClient#get_sync_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
427
|
+
end
|
428
|
+
return data, status_code, headers
|
429
|
+
end
|
430
|
+
|
431
|
+
# Get a Sync Variant
|
432
|
+
# Get information about a single Sync Variant.
|
433
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Variant ID (integer) or External ID (if prefixed with @)
|
434
|
+
# @param [Hash] opts the optional parameters
|
435
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
436
|
+
# @return [GetSyncVariantById200Response]
|
437
|
+
def get_sync_variant_by_id(id, opts = {})
|
438
|
+
data, _status_code, _headers = get_sync_variant_by_id_with_http_info(id, opts)
|
439
|
+
data
|
440
|
+
end
|
441
|
+
|
442
|
+
# Get a Sync Variant
|
443
|
+
# Get information about a single Sync Variant.
|
444
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Variant ID (integer) or External ID (if prefixed with @)
|
445
|
+
# @param [Hash] opts the optional parameters
|
446
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
447
|
+
# @return [Array<(GetSyncVariantById200Response, Integer, Hash)>] GetSyncVariantById200Response data, response status code and response headers
|
448
|
+
def get_sync_variant_by_id_with_http_info(id, opts = {})
|
449
|
+
if @api_client.config.debugging
|
450
|
+
@api_client.config.logger.debug 'Calling API: ProductsAPIClient.get_sync_variant_by_id ...'
|
451
|
+
end
|
452
|
+
# verify the required parameter 'id' is set
|
453
|
+
if @api_client.config.client_side_validation && id.nil?
|
454
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProductsAPIClient.get_sync_variant_by_id"
|
455
|
+
end
|
456
|
+
# resource path
|
457
|
+
local_var_path = '/store/variants/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
458
|
+
|
459
|
+
# query parameters
|
460
|
+
query_params = opts[:query_params] || {}
|
461
|
+
|
462
|
+
# header parameters
|
463
|
+
header_params = opts[:header_params] || {}
|
464
|
+
# HTTP header 'Accept' (if needed)
|
465
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
466
|
+
header_params[:'X-PF-Store-Id'] = opts[:'x_pf_store_id'] if !opts[:'x_pf_store_id'].nil?
|
467
|
+
|
468
|
+
# form parameters
|
469
|
+
form_params = opts[:form_params] || {}
|
470
|
+
|
471
|
+
# http body (model)
|
472
|
+
post_body = opts[:debug_body]
|
473
|
+
|
474
|
+
# return_type
|
475
|
+
return_type = opts[:debug_return_type] || 'GetSyncVariantById200Response'
|
476
|
+
|
477
|
+
# auth_names
|
478
|
+
auth_names = opts[:debug_auth_names] || ['OAuth']
|
479
|
+
|
480
|
+
new_options = opts.merge(
|
481
|
+
:operation => :"ProductsAPIClient.get_sync_variant_by_id",
|
482
|
+
:header_params => header_params,
|
483
|
+
:query_params => query_params,
|
484
|
+
:form_params => form_params,
|
485
|
+
:body => post_body,
|
486
|
+
:auth_names => auth_names,
|
487
|
+
:return_type => return_type
|
488
|
+
)
|
489
|
+
|
490
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
491
|
+
if @api_client.config.debugging
|
492
|
+
@api_client.config.logger.debug "API called: ProductsAPIClient#get_sync_variant_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
493
|
+
end
|
494
|
+
return data, status_code, headers
|
495
|
+
end
|
496
|
+
|
497
|
+
# Modify a Sync Product
|
498
|
+
# Modifies an existing Sync Product with its Sync Variants. Please note that in the request body you only need to specify the fields that need to be changed. Furthermore, if you want to update existing sync variants, then in the sync variants array you must specify the IDs of all existing sync variants. All omitted existing sync variants will be deleted. All new sync variants without an ID will be created. See examples for more insights. **Rate limiting:** Up to 10 requests per 60 seconds. A 60 seconds lockout is applied if request count is exceeded. [See examples](#section/Products-API-examples/Modify-a-Sync-Product)
|
499
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Product ID (integer) or External ID (if prefixed with @)
|
500
|
+
# @param update_sync_product_request [UpdateSyncProductRequest] PUT request body
|
501
|
+
# @param [Hash] opts the optional parameters
|
502
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
503
|
+
# @return [CreateSyncProduct200Response]
|
504
|
+
def update_sync_product(id, update_sync_product_request, opts = {})
|
505
|
+
data, _status_code, _headers = update_sync_product_with_http_info(id, update_sync_product_request, opts)
|
506
|
+
data
|
507
|
+
end
|
508
|
+
|
509
|
+
# Modify a Sync Product
|
510
|
+
# Modifies an existing Sync Product with its Sync Variants. Please note that in the request body you only need to specify the fields that need to be changed. Furthermore, if you want to update existing sync variants, then in the sync variants array you must specify the IDs of all existing sync variants. All omitted existing sync variants will be deleted. All new sync variants without an ID will be created. See examples for more insights. **Rate limiting:** Up to 10 requests per 60 seconds. A 60 seconds lockout is applied if request count is exceeded. [See examples](#section/Products-API-examples/Modify-a-Sync-Product)
|
511
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Product ID (integer) or External ID (if prefixed with @)
|
512
|
+
# @param update_sync_product_request [UpdateSyncProductRequest] PUT request body
|
513
|
+
# @param [Hash] opts the optional parameters
|
514
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
515
|
+
# @return [Array<(CreateSyncProduct200Response, Integer, Hash)>] CreateSyncProduct200Response data, response status code and response headers
|
516
|
+
def update_sync_product_with_http_info(id, update_sync_product_request, opts = {})
|
517
|
+
if @api_client.config.debugging
|
518
|
+
@api_client.config.logger.debug 'Calling API: ProductsAPIClient.update_sync_product ...'
|
519
|
+
end
|
520
|
+
# verify the required parameter 'id' is set
|
521
|
+
if @api_client.config.client_side_validation && id.nil?
|
522
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProductsAPIClient.update_sync_product"
|
523
|
+
end
|
524
|
+
# verify the required parameter 'update_sync_product_request' is set
|
525
|
+
if @api_client.config.client_side_validation && update_sync_product_request.nil?
|
526
|
+
fail ArgumentError, "Missing the required parameter 'update_sync_product_request' when calling ProductsAPIClient.update_sync_product"
|
527
|
+
end
|
528
|
+
# resource path
|
529
|
+
local_var_path = '/store/products/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
530
|
+
|
531
|
+
# query parameters
|
532
|
+
query_params = opts[:query_params] || {}
|
533
|
+
|
534
|
+
# header parameters
|
535
|
+
header_params = opts[:header_params] || {}
|
536
|
+
# HTTP header 'Accept' (if needed)
|
537
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
538
|
+
# HTTP header 'Content-Type'
|
539
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
540
|
+
if !content_type.nil?
|
541
|
+
header_params['Content-Type'] = content_type
|
542
|
+
end
|
543
|
+
header_params[:'X-PF-Store-Id'] = opts[:'x_pf_store_id'] if !opts[:'x_pf_store_id'].nil?
|
544
|
+
|
545
|
+
# form parameters
|
546
|
+
form_params = opts[:form_params] || {}
|
547
|
+
|
548
|
+
# http body (model)
|
549
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sync_product_request)
|
550
|
+
|
551
|
+
# return_type
|
552
|
+
return_type = opts[:debug_return_type] || 'CreateSyncProduct200Response'
|
553
|
+
|
554
|
+
# auth_names
|
555
|
+
auth_names = opts[:debug_auth_names] || ['OAuth']
|
556
|
+
|
557
|
+
new_options = opts.merge(
|
558
|
+
:operation => :"ProductsAPIClient.update_sync_product",
|
559
|
+
:header_params => header_params,
|
560
|
+
:query_params => query_params,
|
561
|
+
:form_params => form_params,
|
562
|
+
:body => post_body,
|
563
|
+
:auth_names => auth_names,
|
564
|
+
:return_type => return_type
|
565
|
+
)
|
566
|
+
|
567
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
568
|
+
if @api_client.config.debugging
|
569
|
+
@api_client.config.logger.debug "API called: ProductsAPIClient#update_sync_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
570
|
+
end
|
571
|
+
return data, status_code, headers
|
572
|
+
end
|
573
|
+
|
574
|
+
# Modify a Sync Variant
|
575
|
+
# Modifies an existing Sync Variant. Please note that in the request body you only need to specify the fields that need to be changed. See examples for more insights. [See examples](#section/Products-API-examples/Modify-a-Sync-Variant)
|
576
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Variant ID (integer) or External ID (if prefixed with @)
|
577
|
+
# @param update_sync_variant_request [UpdateSyncVariantRequest] POST request body
|
578
|
+
# @param [Hash] opts the optional parameters
|
579
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
580
|
+
# @return [GetSyncVariantById200Response]
|
581
|
+
def update_sync_variant(id, update_sync_variant_request, opts = {})
|
582
|
+
data, _status_code, _headers = update_sync_variant_with_http_info(id, update_sync_variant_request, opts)
|
583
|
+
data
|
584
|
+
end
|
585
|
+
|
586
|
+
# Modify a Sync Variant
|
587
|
+
# Modifies an existing Sync Variant. Please note that in the request body you only need to specify the fields that need to be changed. See examples for more insights. [See examples](#section/Products-API-examples/Modify-a-Sync-Variant)
|
588
|
+
# @param id [GetSyncProductByIdIdParameter] Sync Variant ID (integer) or External ID (if prefixed with @)
|
589
|
+
# @param update_sync_variant_request [UpdateSyncVariantRequest] POST request body
|
590
|
+
# @param [Hash] opts the optional parameters
|
591
|
+
# @option opts [String] :x_pf_store_id Use this to specify which store you want to use (required only for account level token)
|
592
|
+
# @return [Array<(GetSyncVariantById200Response, Integer, Hash)>] GetSyncVariantById200Response data, response status code and response headers
|
593
|
+
def update_sync_variant_with_http_info(id, update_sync_variant_request, opts = {})
|
594
|
+
if @api_client.config.debugging
|
595
|
+
@api_client.config.logger.debug 'Calling API: ProductsAPIClient.update_sync_variant ...'
|
596
|
+
end
|
597
|
+
# verify the required parameter 'id' is set
|
598
|
+
if @api_client.config.client_side_validation && id.nil?
|
599
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProductsAPIClient.update_sync_variant"
|
600
|
+
end
|
601
|
+
# verify the required parameter 'update_sync_variant_request' is set
|
602
|
+
if @api_client.config.client_side_validation && update_sync_variant_request.nil?
|
603
|
+
fail ArgumentError, "Missing the required parameter 'update_sync_variant_request' when calling ProductsAPIClient.update_sync_variant"
|
604
|
+
end
|
605
|
+
# resource path
|
606
|
+
local_var_path = '/store/variants/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
607
|
+
|
608
|
+
# query parameters
|
609
|
+
query_params = opts[:query_params] || {}
|
610
|
+
|
611
|
+
# header parameters
|
612
|
+
header_params = opts[:header_params] || {}
|
613
|
+
# HTTP header 'Accept' (if needed)
|
614
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
615
|
+
# HTTP header 'Content-Type'
|
616
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
617
|
+
if !content_type.nil?
|
618
|
+
header_params['Content-Type'] = content_type
|
619
|
+
end
|
620
|
+
header_params[:'X-PF-Store-Id'] = opts[:'x_pf_store_id'] if !opts[:'x_pf_store_id'].nil?
|
621
|
+
|
622
|
+
# form parameters
|
623
|
+
form_params = opts[:form_params] || {}
|
624
|
+
|
625
|
+
# http body (model)
|
626
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sync_variant_request)
|
627
|
+
|
628
|
+
# return_type
|
629
|
+
return_type = opts[:debug_return_type] || 'GetSyncVariantById200Response'
|
630
|
+
|
631
|
+
# auth_names
|
632
|
+
auth_names = opts[:debug_auth_names] || ['OAuth']
|
633
|
+
|
634
|
+
new_options = opts.merge(
|
635
|
+
:operation => :"ProductsAPIClient.update_sync_variant",
|
636
|
+
:header_params => header_params,
|
637
|
+
:query_params => query_params,
|
638
|
+
:form_params => form_params,
|
639
|
+
:body => post_body,
|
640
|
+
:auth_names => auth_names,
|
641
|
+
:return_type => return_type
|
642
|
+
)
|
643
|
+
|
644
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
645
|
+
if @api_client.config.debugging
|
646
|
+
@api_client.config.logger.debug "API called: ProductsAPIClient#update_sync_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
647
|
+
end
|
648
|
+
return data, status_code, headers
|
649
|
+
end
|
650
|
+
end
|
651
|
+
end
|