shopline-sdk-python 0.3.0__py3-none-any.whl → 0.3.3__py3-none-any.whl
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.
- shopline_sdk/__init__.py +3 -0
- shopline_sdk/apis/addon_products/bulk_update_addon_product_quantity_by_sku.py +12 -13
- shopline_sdk/apis/addon_products/create_addon_product.py +10 -24
- shopline_sdk/apis/addon_products/get_addon_product.py +10 -7
- shopline_sdk/apis/addon_products/get_addon_product_stocks.py +10 -12
- shopline_sdk/apis/addon_products/get_addon_products.py +10 -13
- shopline_sdk/apis/addon_products/search_addon_products.py +11 -14
- shopline_sdk/apis/addon_products/update_addon_product.py +10 -7
- shopline_sdk/apis/addon_products/update_addon_product_quantity.py +12 -13
- shopline_sdk/apis/addon_products/update_addon_product_stock.py +13 -14
- shopline_sdk/apis/affiliate_campaigns/create_affiliate_campaign.py +13 -18
- shopline_sdk/apis/affiliate_campaigns/delete_affiliate_campaign.py +9 -11
- shopline_sdk/apis/affiliate_campaigns/export_affiliate_campaign_report_to_partner.py +10 -11
- shopline_sdk/apis/affiliate_campaigns/get_affiliate_campaign.py +10 -7
- shopline_sdk/apis/affiliate_campaigns/get_affiliate_campaign_orders.py +10 -11
- shopline_sdk/apis/affiliate_campaigns/get_affiliate_campaign_summary.py +12 -9
- shopline_sdk/apis/affiliate_campaigns/get_affiliate_campaigns.py +9 -11
- shopline_sdk/apis/affiliate_campaigns/get_products_sales_ranking_of_campaign.py +12 -12
- shopline_sdk/apis/affiliate_campaigns/update_affiliate_campaign.py +14 -15
- shopline_sdk/apis/agents/get_agent.py +10 -11
- shopline_sdk/apis/agents/get_agents.py +9 -12
- shopline_sdk/apis/blog_categories/__init__.py +0 -0
- shopline_sdk/apis/blog_categories/create_a_blog_category.py +66 -0
- shopline_sdk/apis/blog_categories/delete_a_blog_category.py +44 -0
- shopline_sdk/apis/blog_categories/get_a_blog_category.py +42 -0
- shopline_sdk/apis/blog_categories/get_blog_categories.py +42 -0
- shopline_sdk/apis/blog_categories/update_a_blog_category.py +66 -0
- shopline_sdk/apis/blog_posts/__init__.py +0 -0
- shopline_sdk/apis/blog_posts/create_a_blog_post.py +68 -0
- shopline_sdk/apis/blog_posts/delete_a_blog_post.py +43 -0
- shopline_sdk/apis/blog_posts/get_a_blog_post.py +42 -0
- shopline_sdk/apis/blog_posts/get_blog_posts.py +63 -0
- shopline_sdk/apis/blog_posts/update_a_blog_post.py +68 -0
- shopline_sdk/apis/bulk_operations/get_a_bulk_operation.py +10 -7
- shopline_sdk/apis/bulk_operations/get_bulk_operations.py +9 -11
- shopline_sdk/apis/cart_item_app_metafields/bulk_create_app_metafield.py +9 -33
- shopline_sdk/apis/cart_item_app_metafields/bulk_delete_app_metafield.py +11 -26
- shopline_sdk/apis/cart_item_app_metafields/bulk_update_app_metafield.py +10 -26
- shopline_sdk/apis/cart_item_app_metafields/get_app_metafields_attached_to_cart_items_of_specific_cart.py +10 -12
- shopline_sdk/apis/cart_item_metafields/bulk_create_metafield.py +9 -35
- shopline_sdk/apis/cart_item_metafields/bulk_delete_metafield.py +11 -27
- shopline_sdk/apis/cart_item_metafields/bulk_update_metafield.py +9 -27
- shopline_sdk/apis/cart_item_metafields/get_metafields_attached_to_cart_items_of_specific_cart.py +10 -12
- shopline_sdk/apis/carts/bulk_add_items_to_cart.py +10 -13
- shopline_sdk/apis/carts/bulk_delete_cart_items.py +9 -12
- shopline_sdk/apis/carts/bulk_patch_cart_items.py +9 -12
- shopline_sdk/apis/carts/get_cart.py +10 -12
- shopline_sdk/apis/carts/get_cart_id.py +8 -12
- shopline_sdk/apis/categories/bulk_assign.py +13 -12
- shopline_sdk/apis/categories/bulk_update_category_product_sorting.py +10 -12
- shopline_sdk/apis/categories/create_category.py +10 -7
- shopline_sdk/apis/categories/delete_category.py +10 -11
- shopline_sdk/apis/categories/get_categories.py +12 -15
- shopline_sdk/apis/categories/get_category.py +10 -11
- shopline_sdk/apis/categories/update_category.py +10 -7
- shopline_sdk/apis/channels/create_product_channel_price.py +10 -7
- shopline_sdk/apis/channels/get_channel.py +9 -11
- shopline_sdk/apis/channels/get_channels.py +9 -11
- shopline_sdk/apis/channels/get_product_channel_price.py +10 -11
- shopline_sdk/apis/channels/update_product_channel_price.py +10 -7
- shopline_sdk/apis/conversations/create_order_message.py +10 -12
- shopline_sdk/apis/conversations/create_return_order_message.py +10 -12
- shopline_sdk/apis/conversations/create_shop_message.py +10 -11
- shopline_sdk/apis/conversations/get_conversations.py +10 -11
- shopline_sdk/apis/conversations/get_messages.py +10 -11
- shopline_sdk/apis/custom_fields/get_custom_fields.py +10 -9
- shopline_sdk/apis/customer_app_metafields/bulk_create_app_metafield.py +9 -31
- shopline_sdk/apis/customer_app_metafields/bulk_delete_app_metafield.py +10 -23
- shopline_sdk/apis/customer_app_metafields/bulk_update_app_metafield.py +9 -33
- shopline_sdk/apis/customer_app_metafields/create_specific_app_metafield.py +10 -9
- shopline_sdk/apis/customer_app_metafields/delete_specific_app_metafield.py +9 -11
- shopline_sdk/apis/customer_app_metafields/get_app_metafields_attached_to_specific_customer.py +10 -12
- shopline_sdk/apis/customer_app_metafields/get_specific_app_metafield.py +10 -7
- shopline_sdk/apis/customer_app_metafields/update_specific_app_metafield.py +11 -10
- shopline_sdk/apis/customer_group_children/get_children_group_of_the_customer_group.py +10 -12
- shopline_sdk/apis/customer_group_children/get_customer_ids_of_the_specific_customer_group.py +10 -12
- shopline_sdk/apis/customer_groups/get_customer_group.py +10 -11
- shopline_sdk/apis/customer_groups/get_customer_groups.py +9 -12
- shopline_sdk/apis/customer_groups/get_customer_ids_of_the_specific_customer_group.py +10 -12
- shopline_sdk/apis/customer_groups/search_customer_groups.py +10 -12
- shopline_sdk/apis/customer_metafields/bulk_create_metafield.py +9 -33
- shopline_sdk/apis/customer_metafields/bulk_delete_metafield.py +10 -23
- shopline_sdk/apis/customer_metafields/bulk_update_metafield.py +9 -35
- shopline_sdk/apis/customer_metafields/create_specific_metafield.py +10 -9
- shopline_sdk/apis/customer_metafields/delete_specific_metafield.py +9 -11
- shopline_sdk/apis/customer_metafields/get_metafields_attached_to_specific_customer.py +10 -12
- shopline_sdk/apis/customer_metafields/get_specific_metafield.py +10 -7
- shopline_sdk/apis/customer_metafields/update_specific_metafield.py +10 -9
- shopline_sdk/apis/customers/add_or_remove_customer_tags.py +11 -14
- shopline_sdk/apis/customers/create_customer.py +13 -11
- shopline_sdk/apis/customers/delete_customer.py +10 -11
- shopline_sdk/apis/customers/get_customer.py +10 -12
- shopline_sdk/apis/customers/get_customer_member_points_history.py +10 -11
- shopline_sdk/apis/customers/get_customer_store_credit_history.py +10 -12
- shopline_sdk/apis/customers/get_customers.py +11 -14
- shopline_sdk/apis/customers/{getcustomers_smembershipinfo.py → get_customers_s_membership_info.py} +10 -12
- shopline_sdk/apis/customers/get_line_customer.py +23 -6
- shopline_sdk/apis/customers/search_customers.py +17 -17
- shopline_sdk/apis/customers/update_customer.py +13 -11
- shopline_sdk/apis/customers/update_customer_member_points.py +15 -11
- shopline_sdk/apis/customers/update_customer_store_credits.py +11 -15
- shopline_sdk/apis/customers/update_customer_subscriptions.py +10 -11
- shopline_sdk/apis/customers/update_customer_tags.py +12 -14
- shopline_sdk/apis/delivery_options/get_delivery_config.py +9 -11
- shopline_sdk/apis/delivery_options/get_delivery_option.py +10 -7
- shopline_sdk/apis/delivery_options/get_delivery_options.py +10 -12
- shopline_sdk/apis/delivery_options/get_delivery_time_slots.py +10 -12
- shopline_sdk/apis/delivery_options/{updatedeliveryoption_sstoreinformation.py → update_delivery_option_s_store_information.py} +10 -12
- shopline_sdk/apis/event_trackers/create_an_event_tracker.py +10 -11
- shopline_sdk/apis/event_trackers/delete_an_event_tracker.py +9 -12
- shopline_sdk/apis/event_trackers/get_an_event_tracker.py +10 -11
- shopline_sdk/apis/event_trackers/get_event_trackers.py +10 -13
- shopline_sdk/apis/event_trackers/update_event_tracker.py +10 -11
- shopline_sdk/apis/flash_price_campaigns/create_flash_price_campaign.py +10 -7
- shopline_sdk/apis/flash_price_campaigns/delete_flash_price_campaign.py +9 -11
- shopline_sdk/apis/flash_price_campaigns/get_a_flash_price_campaign.py +10 -7
- shopline_sdk/apis/flash_price_campaigns/get_flash_price_campaigns.py +9 -11
- shopline_sdk/apis/flash_price_campaigns/update_flash_price_campaign.py +10 -7
- shopline_sdk/apis/gifts/bulk_update_quantity_by_sku.py +11 -12
- shopline_sdk/apis/gifts/create_gift.py +10 -19
- shopline_sdk/apis/gifts/get_gift_stocks.py +10 -12
- shopline_sdk/apis/gifts/get_gifts.py +11 -13
- shopline_sdk/apis/gifts/search_gifts.py +10 -13
- shopline_sdk/apis/gifts/update_gift.py +10 -7
- shopline_sdk/apis/gifts/update_gift_quantity.py +12 -13
- shopline_sdk/apis/gifts/update_gift_stock.py +13 -14
- shopline_sdk/apis/inventory_transfers/__init__.py +0 -0
- shopline_sdk/apis/inventory_transfers/get_inventory_transfers.py +118 -0
- shopline_sdk/apis/layouts/get_layouts_sections.py +9 -12
- shopline_sdk/apis/medias/create_image.py +10 -13
- shopline_sdk/apis/medias/create_media_asynchronously.py +69 -0
- shopline_sdk/apis/medias/query_media_processing_status.py +62 -0
- shopline_sdk/apis/member_point_rules/get_member_point_rules.py +10 -11
- shopline_sdk/apis/member_points/bulk_update_member_points.py +27 -23
- shopline_sdk/apis/membership_tiers/get_customer_membership_tier_history.py +10 -11
- shopline_sdk/apis/membership_tiers/get_membership_tiers.py +10 -14
- shopline_sdk/apis/merchant_app_metafields/bulk_create_app_metafield.py +9 -31
- shopline_sdk/apis/merchant_app_metafields/bulk_delete_app_metafield.py +10 -23
- shopline_sdk/apis/merchant_app_metafields/bulk_update_app_metafield.py +9 -33
- shopline_sdk/apis/merchant_app_metafields/create_specific_app_metafield.py +10 -9
- shopline_sdk/apis/merchant_app_metafields/delete_specific_app_metafield.py +9 -11
- shopline_sdk/apis/merchant_app_metafields/get_app_metafields_attached_to_current_merchant.py +10 -12
- shopline_sdk/apis/merchant_app_metafields/get_specific_app_metafield.py +10 -7
- shopline_sdk/apis/merchant_app_metafields/update_specific_app_metafield.py +11 -10
- shopline_sdk/apis/merchant_metafields/bulk_create_metafield.py +9 -33
- shopline_sdk/apis/merchant_metafields/bulk_delete_metafield.py +10 -23
- shopline_sdk/apis/merchant_metafields/bulk_update_metafield.py +9 -35
- shopline_sdk/apis/merchant_metafields/create_specific_metafield.py +10 -9
- shopline_sdk/apis/merchant_metafields/delete_specific_metafield.py +9 -11
- shopline_sdk/apis/merchant_metafields/get_metafields_attached_to_current_merchant.py +10 -12
- shopline_sdk/apis/merchant_metafields/get_specific_metafield.py +10 -7
- shopline_sdk/apis/merchant_metafields/update_specific_metafield.py +10 -9
- shopline_sdk/apis/merchants/{generatemerchant_sexpresscartlink.py → generate_merchant_s_express_cart_link.py} +14 -14
- shopline_sdk/apis/merchants/get_merchant.py +10 -14
- shopline_sdk/apis/merchants/get_merchants.py +10 -11
- shopline_sdk/apis/metafield_definitions/cart_items/create_specific_metafield_definition.py +10 -9
- shopline_sdk/apis/metafield_definitions/cart_items/delete_specific_metafield.py +9 -11
- shopline_sdk/apis/metafield_definitions/cart_items/get_an_array_of_metafield_definitions.py +10 -11
- shopline_sdk/apis/metafield_definitions/cart_items/get_specific_metafield_definition.py +10 -7
- shopline_sdk/apis/metafield_definitions/customers/create_specific_metafield_definition.py +10 -9
- shopline_sdk/apis/metafield_definitions/customers/delete_specific_metafield.py +9 -11
- shopline_sdk/apis/metafield_definitions/customers/get_an_array_of_metafield_definitions.py +10 -11
- shopline_sdk/apis/metafield_definitions/customers/get_specific_metafield_definition.py +10 -7
- shopline_sdk/apis/metafield_definitions/merchants/create_specific_metafield_definition.py +10 -9
- shopline_sdk/apis/metafield_definitions/merchants/delete_specific_metafield.py +9 -11
- shopline_sdk/apis/metafield_definitions/merchants/get_an_array_of_metafield_definitions.py +10 -11
- shopline_sdk/apis/metafield_definitions/merchants/get_specific_metafield_definition.py +10 -7
- shopline_sdk/apis/metafield_definitions/order_items/create_specific_metafield_definition.py +10 -9
- shopline_sdk/apis/metafield_definitions/order_items/delete_specific_metafield.py +9 -11
- shopline_sdk/apis/metafield_definitions/order_items/get_an_array_of_metafield_definitions.py +10 -11
- shopline_sdk/apis/metafield_definitions/order_items/get_specific_metafield_definition.py +10 -7
- shopline_sdk/apis/metafield_definitions/orders/create_specific_metafield_definition.py +10 -9
- shopline_sdk/apis/metafield_definitions/orders/delete_specific_metafield.py +9 -11
- shopline_sdk/apis/metafield_definitions/orders/get_an_array_of_metafield_definitions.py +10 -11
- shopline_sdk/apis/metafield_definitions/orders/get_specific_metafield_definition.py +10 -7
- shopline_sdk/apis/metafield_definitions/products/create_specific_metafield_definition.py +10 -9
- shopline_sdk/apis/metafield_definitions/products/delete_specific_metafield.py +9 -11
- shopline_sdk/apis/metafield_definitions/products/get_an_array_of_metafield_definitions.py +10 -11
- shopline_sdk/apis/metafield_definitions/products/get_specific_metafield_definition.py +10 -7
- shopline_sdk/apis/multipass_linkingprivate/delete_multipass_linking_for_customer.py +10 -11
- shopline_sdk/apis/multipass_linkingprivate/get_active_multipass_linkings.py +10 -11
- shopline_sdk/apis/multipass_linkingprivate/update_multipass_linking_for_customer.py +10 -12
- shopline_sdk/apis/multipass_secretprivate/create_multipass_secret.py +10 -7
- shopline_sdk/apis/multipass_secretprivate/get_multipass_secret.py +11 -8
- shopline_sdk/apis/order_app_metafields/bulk_create_app_metafield.py +9 -31
- shopline_sdk/apis/order_app_metafields/bulk_delete_app_metafield.py +10 -23
- shopline_sdk/apis/order_app_metafields/bulk_update_app_metafield.py +9 -33
- shopline_sdk/apis/order_app_metafields/create_specific_app_metafield.py +10 -9
- shopline_sdk/apis/order_app_metafields/get_app_metafields_attached_to_specific_order.py +10 -12
- shopline_sdk/apis/order_app_metafields/get_specific_app_metafield.py +10 -7
- shopline_sdk/apis/order_app_metafields/update_specific_app_metafield.py +11 -10
- shopline_sdk/apis/order_deliveries/get_order_delivery.py +10 -7
- shopline_sdk/apis/order_deliveries/update_order_delivery.py +10 -11
- shopline_sdk/apis/order_item_app_metafields/bulk_create_app_metafield.py +9 -33
- shopline_sdk/apis/order_item_app_metafields/bulk_delete_app_metafield.py +11 -26
- shopline_sdk/apis/order_item_app_metafields/bulk_update_app_metafield.py +10 -26
- shopline_sdk/apis/order_item_app_metafields/get_app_metafields_attached_to_order_items_of_specific_order.py +10 -12
- shopline_sdk/apis/order_item_metafields/bulk_create_metafield.py +9 -35
- shopline_sdk/apis/order_item_metafields/bulk_delete_metafield.py +11 -27
- shopline_sdk/apis/order_item_metafields/bulk_update_metafield.py +9 -27
- shopline_sdk/apis/order_item_metafields/get_metafields_attached_to_order_items_of_specific_order.py +10 -12
- shopline_sdk/apis/order_metafields/bulk_create_metafield.py +9 -33
- shopline_sdk/apis/order_metafields/bulk_delete_metafield.py +10 -23
- shopline_sdk/apis/order_metafields/bulk_update_metafield.py +9 -35
- shopline_sdk/apis/order_metafields/create_specific_metafield.py +10 -9
- shopline_sdk/apis/order_metafields/delete_specific_app_metafield.py +9 -11
- shopline_sdk/apis/order_metafields/delete_specific_metafield.py +9 -11
- shopline_sdk/apis/order_metafields/get_metafields_attached_to_specific_order.py +10 -12
- shopline_sdk/apis/order_metafields/get_specific_metafield.py +10 -7
- shopline_sdk/apis/order_metafields/update_specific_metafield.py +10 -9
- shopline_sdk/apis/orders/bulk_execute_shipment.py +13 -15
- shopline_sdk/apis/orders/cancel_order.py +9 -13
- shopline_sdk/apis/orders/create_archived_orders_report.py +10 -12
- shopline_sdk/apis/orders/create_order.py +9 -13
- shopline_sdk/apis/orders/execute_shipment.py +10 -12
- shopline_sdk/apis/orders/get_all_orders_tags.py +10 -11
- shopline_sdk/apis/orders/get_order.py +11 -15
- shopline_sdk/apis/orders/get_order_action_logs.py +11 -8
- shopline_sdk/apis/orders/get_order_labels_of_delivery.py +10 -12
- shopline_sdk/apis/orders/get_order_transaction_by_order_ids.py +10 -12
- shopline_sdk/apis/orders/get_orders.py +14 -18
- shopline_sdk/apis/orders/request_order_invoice_creation.py +96 -0
- shopline_sdk/apis/orders/search_orders.py +32 -41
- shopline_sdk/apis/orders/split_order.py +10 -11
- shopline_sdk/apis/orders/update_order.py +12 -16
- shopline_sdk/apis/orders/update_order_delivery_status.py +13 -37
- shopline_sdk/apis/orders/update_order_payment_status.py +10 -33
- shopline_sdk/apis/orders/update_order_status.py +11 -15
- shopline_sdk/apis/orders/update_order_tags.py +12 -14
- shopline_sdk/apis/pages/__init__.py +0 -0
- shopline_sdk/apis/pages/create_page.py +68 -0
- shopline_sdk/apis/pages/delete_page.py +67 -0
- shopline_sdk/apis/pages/publish_page.py +68 -0
- shopline_sdk/apis/pages/save_draft_page.py +68 -0
- shopline_sdk/apis/pages/show_draft_page.py +77 -0
- shopline_sdk/apis/pages/show_page.py +77 -0
- shopline_sdk/apis/payments/get_payment.py +10 -11
- shopline_sdk/apis/payments/get_payments.py +9 -12
- shopline_sdk/apis/product_app_metafields/bulk_create_app_metafield.py +9 -31
- shopline_sdk/apis/product_app_metafields/bulk_delete_app_metafield.py +10 -23
- shopline_sdk/apis/product_app_metafields/bulk_update_app_metafield.py +9 -33
- shopline_sdk/apis/product_app_metafields/create_specific_metafield.py +10 -9
- shopline_sdk/apis/product_app_metafields/delete_specific_app_metafield.py +9 -11
- shopline_sdk/apis/product_app_metafields/get_app_metafields_attached_to_specific_product.py +10 -12
- shopline_sdk/apis/product_app_metafields/get_specific_app_metafield.py +10 -7
- shopline_sdk/apis/product_app_metafields/update_specific_app_metafield.py +11 -10
- shopline_sdk/apis/product_metafields/bulk_create_metafield.py +9 -33
- shopline_sdk/apis/product_metafields/bulk_delete_metafield.py +10 -23
- shopline_sdk/apis/product_metafields/bulk_update_metafield.py +9 -35
- shopline_sdk/apis/product_metafields/create_specific_metafield.py +10 -9
- shopline_sdk/apis/product_metafields/delete_specific_metafield.py +9 -11
- shopline_sdk/apis/product_metafields/get_metafields_attached_to_specific_product.py +10 -12
- shopline_sdk/apis/product_metafields/get_specific_metafield.py +10 -7
- shopline_sdk/apis/product_metafields/update_specific_metafield.py +10 -9
- shopline_sdk/apis/product_review_comments/bulk_create_product_review_comments.py +13 -21
- shopline_sdk/apis/product_review_comments/bulk_delete_product_review_comments.py +9 -11
- shopline_sdk/apis/product_review_comments/bulk_update_product_review_comments.py +13 -18
- shopline_sdk/apis/product_review_comments/create_product_review_comments.py +10 -7
- shopline_sdk/apis/product_review_comments/delete_product_review_comment.py +9 -7
- shopline_sdk/apis/product_review_comments/get_product_review_comment.py +10 -7
- shopline_sdk/apis/product_review_comments/get_product_review_comments.py +10 -13
- shopline_sdk/apis/product_review_comments/update_product_review_comment.py +10 -7
- shopline_sdk/apis/product_subscriptions/cancel_product_subscription.py +71 -0
- shopline_sdk/apis/product_subscriptions/get_a_list_of_product_subscriptions.py +18 -12
- shopline_sdk/apis/product_subscriptions/get_product_subscription.py +10 -7
- shopline_sdk/apis/product_subscriptions/update_product_subscription_next_billing_at.py +80 -0
- shopline_sdk/apis/products/add_product_images.py +12 -12
- shopline_sdk/apis/products/batch_update_current_product_labels.py +11 -12
- shopline_sdk/apis/products/bulk_delete_product.py +10 -12
- shopline_sdk/apis/products/{bulkpublish_unpublishproductinonlinestore.py → bulk_publish_unpublish_product_in_online_store.py} +10 -14
- shopline_sdk/apis/products/{bulkpublish_unpublishproductinretailstore.py → bulk_publish_unpublish_product_in_retail_store.py} +10 -14
- shopline_sdk/apis/products/bulk_update_stock.py +14 -15
- shopline_sdk/apis/products/create_product.py +10 -7
- shopline_sdk/apis/products/create_product_variation.py +10 -9
- shopline_sdk/apis/products/delete_product.py +10 -11
- shopline_sdk/apis/products/delete_product_images.py +10 -13
- shopline_sdk/apis/products/delete_product_variation.py +10 -11
- shopline_sdk/apis/products/get_locked_inventory_count.py +9 -12
- shopline_sdk/apis/products/get_product.py +9 -11
- shopline_sdk/apis/products/get_product_stocks.py +10 -12
- shopline_sdk/apis/products/get_products.py +16 -15
- shopline_sdk/apis/products/search_products.py +15 -137
- shopline_sdk/apis/products/search_products_by_get.py +177 -0
- shopline_sdk/apis/products/update_current_product_tags.py +12 -14
- shopline_sdk/apis/products/update_current_product_tags_by_patch.py +78 -0
- shopline_sdk/apis/products/update_product.py +10 -7
- shopline_sdk/apis/products/update_product_price.py +14 -14
- shopline_sdk/apis/products/update_product_quantity.py +14 -15
- shopline_sdk/apis/products/update_product_variation.py +12 -9
- shopline_sdk/apis/products/update_product_variation_price.py +12 -12
- shopline_sdk/apis/products/update_product_variation_quantity.py +13 -14
- shopline_sdk/apis/products/update_quantity_by_sku.py +14 -14
- shopline_sdk/apis/products/update_stock.py +13 -14
- shopline_sdk/apis/promotions/create_promotion.py +10 -7
- shopline_sdk/apis/promotions/delete_promotion.py +9 -11
- shopline_sdk/apis/promotions/get_customer_coupon_promotions.py +11 -12
- shopline_sdk/apis/promotions/get_customer_promotions.py +9 -12
- shopline_sdk/apis/promotions/get_promotion.py +10 -11
- shopline_sdk/apis/promotions/get_promotions.py +9 -12
- shopline_sdk/apis/promotions/search_promotions.py +11 -17
- shopline_sdk/apis/promotions/update_promotion.py +19 -16
- shopline_sdk/apis/purchase_orders/create_child_purchase_order.py +10 -11
- shopline_sdk/apis/purchase_orders/create_purchase_order.py +11 -11
- shopline_sdk/apis/purchase_orders/delete_the_specified_purchase_orders.py +10 -11
- shopline_sdk/apis/purchase_orders/get_purchase_orders.py +13 -11
- shopline_sdk/apis/purchase_orders/get_the_specified_purchase_order.py +10 -7
- shopline_sdk/apis/purchase_orders/update_purchase_order.py +11 -11
- shopline_sdk/apis/return_orders/create_return_order.py +10 -7
- shopline_sdk/apis/return_orders/execute_return_order_inspection.py +92 -0
- shopline_sdk/apis/return_orders/get_return_order.py +10 -7
- shopline_sdk/apis/return_orders/get_return_orders.py +10 -12
- shopline_sdk/apis/return_orders/update_return_order.py +10 -9
- shopline_sdk/apis/return_orders/update_return_order_delivery_status.py +80 -0
- shopline_sdk/apis/sales/create_sale_products.py +10 -12
- shopline_sdk/apis/sales/delete_sale_products.py +9 -11
- shopline_sdk/apis/sales/get_sale_comments.py +10 -12
- shopline_sdk/apis/sales/get_sale_customers.py +10 -12
- shopline_sdk/apis/sales/get_sale_products.py +10 -12
- shopline_sdk/apis/sales/update_sale_product_status.py +9 -12
- shopline_sdk/apis/sales/update_sale_products.py +10 -12
- shopline_sdk/apis/selling_plan_groups/__init__.py +0 -0
- shopline_sdk/apis/selling_plan_groups/add_selling_plan_group_resources.py +55 -0
- shopline_sdk/apis/selling_plan_groups/create_selling_plan_group.py +59 -0
- shopline_sdk/apis/selling_plan_groups/delete_selling_plan_group.py +43 -0
- shopline_sdk/apis/selling_plan_groups/get_selling_plan_group.py +41 -0
- shopline_sdk/apis/selling_plan_groups/list_selling_plan_groups.py +61 -0
- shopline_sdk/apis/selling_plan_groups/remove_selling_plan_group_resources.py +55 -0
- shopline_sdk/apis/selling_plan_groups/update_selling_plan_group.py +60 -0
- shopline_sdk/apis/settings/get_checkout_setting.py +10 -7
- shopline_sdk/apis/settings/get_domains_setting.py +10 -7
- shopline_sdk/apis/settings/get_layouts_draft_setting.py +10 -7
- shopline_sdk/apis/settings/get_layouts_setting.py +10 -7
- shopline_sdk/apis/settings/get_orders_setting.py +10 -7
- shopline_sdk/apis/settings/get_payments_setting.py +10 -7
- shopline_sdk/apis/settings/get_pos_setting.py +10 -7
- shopline_sdk/apis/settings/get_product_review_setting.py +10 -7
- shopline_sdk/apis/settings/get_products_setting.py +10 -7
- shopline_sdk/apis/settings/get_promotions_setting.py +10 -7
- shopline_sdk/apis/settings/get_setting.py +10 -7
- shopline_sdk/apis/settings/get_shop_setting.py +10 -7
- shopline_sdk/apis/settings/get_tax_setting.py +10 -7
- shopline_sdk/apis/settings/get_theme_draft_setting.py +10 -7
- shopline_sdk/apis/settings/get_theme_setting.py +10 -7
- shopline_sdk/apis/settings/get_third_party_ads_setting.py +10 -7
- shopline_sdk/apis/settings/get_users_setting.py +10 -13
- shopline_sdk/apis/settings/publish_layouts_setting.py +10 -11
- shopline_sdk/apis/settings/publish_theme_setting.py +10 -7
- shopline_sdk/apis/settings/save_layouts_draft_setting.py +10 -7
- shopline_sdk/apis/settings/save_theme_setting.py +10 -7
- shopline_sdk/apis/settings/update_domains_setting.py +12 -13
- shopline_sdk/apis/staffs/get_all_staff.py +12 -12
- shopline_sdk/apis/staffs/get_staff.py +10 -7
- shopline_sdk/apis/staffs/get_staff_permissions.py +12 -14
- shopline_sdk/apis/staged_uploads/__init__.py +0 -0
- shopline_sdk/apis/staged_uploads/create_staged_file_upload_targets.py +78 -0
- shopline_sdk/apis/store_credits/bulk_update_store_credits.py +25 -24
- shopline_sdk/apis/store_credits/get_store_credits.py +10 -12
- shopline_sdk/apis/storefront_o_auth_applications/create_storefront_o_auth_application.py +11 -14
- shopline_sdk/apis/storefront_o_auth_applications/delete_storefront_oauth_application_by_id.py +11 -8
- shopline_sdk/apis/storefront_o_auth_applications/get_storefront_o_auth_application.py +11 -8
- shopline_sdk/apis/storefront_o_auth_applications/get_storefront_o_auth_application_by_id.py +11 -8
- shopline_sdk/apis/storefront_tokens/create_storefront_token.py +11 -11
- shopline_sdk/apis/storefront_tokens/delete_storefront_token_by_id.py +10 -11
- shopline_sdk/apis/storefront_tokens/get_storefront_token_by_id.py +10 -7
- shopline_sdk/apis/storefront_tokens/list_all_storefront_tokens.py +10 -11
- shopline_sdk/apis/taxes/get_taxes.py +10 -11
- shopline_sdk/apis/themes/{getthethemesectionsbytheme_key.py → get_the_theme_sections_by_theme_key.py} +10 -12
- shopline_sdk/apis/themes/get_theme_by_theme_key.py +10 -11
- shopline_sdk/apis/tokens/get_token_info.py +9 -11
- shopline_sdk/apis/user_coupons/claim_user_coupon.py +9 -11
- shopline_sdk/apis/user_coupons/create_user_coupon.py +10 -7
- shopline_sdk/apis/user_coupons/get_user_coupons.py +10 -11
- shopline_sdk/apis/user_coupons/get_user_coupons_with_cursor.py +10 -11
- shopline_sdk/apis/user_coupons/redeem_user_coupon.py +9 -11
- shopline_sdk/apis/warehouses/get_warehouses.py +11 -13
- shopline_sdk/apis/webhooks/create_webhook.py +10 -7
- shopline_sdk/apis/webhooks/delete_webhook.py +9 -7
- shopline_sdk/apis/webhooks/get_webhook.py +10 -7
- shopline_sdk/apis/webhooks/get_webhooks.py +10 -11
- shopline_sdk/apis/webhooks/update_webhook.py +10 -7
- shopline_sdk/apis/wish_list_items/create_wish_list_item.py +10 -11
- shopline_sdk/apis/wish_list_items/delete_wish_list_item.py +10 -11
- shopline_sdk/apis/wish_list_items/get_wish_list_items.py +9 -11
- shopline_sdk/exceptions.py +8 -9
- shopline_sdk/models/__init__.py +71 -196
- shopline_sdk/models/addon_product.py +16 -11
- shopline_sdk/models/affiliate_campaign.py +19 -15
- shopline_sdk/models/affiliate_campaign_order.py +33 -27
- shopline_sdk/models/affiliate_campaign_orders.py +10 -7
- shopline_sdk/models/affiliate_campaigns.py +12 -11
- shopline_sdk/models/agent.py +8 -3
- shopline_sdk/models/app_metafield_value.py +8 -6
- shopline_sdk/models/app_setting.py +5 -4
- shopline_sdk/models/bad_request_error.py +5 -4
- shopline_sdk/models/blog_categories.py +14 -0
- shopline_sdk/models/blog_category.py +35 -0
- shopline_sdk/models/blog_post.py +46 -0
- shopline_sdk/models/blog_posts.py +15 -0
- shopline_sdk/models/bulk_delete_metafield_body.py +7 -6
- shopline_sdk/models/bulk_media_result.py +22 -0
- shopline_sdk/models/bulk_update_app_metafield_body.py +9 -10
- shopline_sdk/models/bulk_update_metafield_body.py +9 -11
- shopline_sdk/models/campaign_product.py +8 -6
- shopline_sdk/models/cart.py +31 -26
- shopline_sdk/models/cart_delivery.py +8 -3
- shopline_sdk/models/cart_item.py +20 -16
- shopline_sdk/models/cart_product.py +19 -13
- shopline_sdk/models/cart_product_variation.py +16 -11
- shopline_sdk/models/cart_promotion.py +10 -7
- shopline_sdk/models/category.py +13 -8
- shopline_sdk/models/channel.py +9 -8
- shopline_sdk/models/channels.py +9 -8
- shopline_sdk/models/checkout_setting.py +9 -5
- shopline_sdk/models/coupon_item.py +15 -12
- shopline_sdk/models/create_app_metafield_body.py +8 -9
- shopline_sdk/models/create_category_body.py +11 -11
- shopline_sdk/models/create_channel_price_body.py +8 -4
- shopline_sdk/models/create_customer_body.py +10 -10
- shopline_sdk/models/create_event_tracker_body.py +9 -7
- shopline_sdk/models/create_flash_price_campaign_body.py +8 -4
- shopline_sdk/models/create_metafield_body.py +8 -10
- shopline_sdk/models/create_metafield_definition_body.py +8 -10
- shopline_sdk/models/create_page_body.py +18 -17
- shopline_sdk/models/create_product_body.py +27 -41
- shopline_sdk/models/create_product_review_comment_body.py +9 -8
- shopline_sdk/models/create_product_variation_body.py +13 -14
- shopline_sdk/models/create_promotion_body.py +17 -35
- shopline_sdk/models/create_return_order_body.py +11 -16
- shopline_sdk/models/create_sub_res_app_metafield_body.py +8 -10
- shopline_sdk/models/create_sub_res_metafield_body.py +8 -11
- shopline_sdk/models/create_user_coupon_body.py +8 -4
- shopline_sdk/models/create_webhook_body.py +9 -8
- shopline_sdk/models/create_wish_list_item_body.py +10 -4
- shopline_sdk/models/cursor_based_paginatable.py +7 -3
- shopline_sdk/models/custom_code_error.py +13 -0
- shopline_sdk/models/custom_field.py +8 -7
- shopline_sdk/models/customer.py +25 -20
- shopline_sdk/models/customer_coupon_promotions.py +8 -5
- shopline_sdk/models/customer_group.py +8 -4
- shopline_sdk/models/customer_promotion.py +13 -8
- shopline_sdk/models/delivery_option.py +15 -12
- shopline_sdk/models/delivery_time_slot.py +9 -7
- shopline_sdk/models/domains_setting.py +8 -7
- shopline_sdk/models/domains_setting_webmaster.py +8 -3
- shopline_sdk/models/event_tracker.py +9 -7
- shopline_sdk/models/event_trackers.py +9 -8
- shopline_sdk/models/extend_promotion.py +11 -9
- shopline_sdk/models/filter_tag.py +7 -6
- shopline_sdk/models/flash_price_campaign.py +12 -8
- shopline_sdk/models/flash_price_campaigns.py +10 -9
- shopline_sdk/models/forbidden_error.py +5 -4
- shopline_sdk/models/gift.py +17 -14
- shopline_sdk/models/global_section_settings.py +10 -7
- shopline_sdk/models/inventory_transfer.py +57 -0
- shopline_sdk/models/inventory_transfer_item.py +37 -0
- shopline_sdk/models/inventory_transfers.py +17 -0
- shopline_sdk/models/invoice.py +7 -3
- shopline_sdk/models/job.py +8 -5
- shopline_sdk/models/jobs.py +9 -8
- shopline_sdk/models/layouts_setting.py +10 -8
- shopline_sdk/models/limit_exceeded_error.py +5 -4
- shopline_sdk/models/link.py +10 -7
- shopline_sdk/models/media.py +8 -7
- shopline_sdk/models/media_processing.py +32 -0
- shopline_sdk/models/media_upload_error.py +7 -3
- shopline_sdk/models/member_point.py +10 -7
- shopline_sdk/models/member_point_rule.py +12 -9
- shopline_sdk/models/member_point_rules.py +9 -5
- shopline_sdk/models/member_points.py +9 -8
- shopline_sdk/models/membership_info.py +11 -9
- shopline_sdk/models/membership_tier.py +19 -14
- shopline_sdk/models/membership_tier_action_log.py +7 -3
- shopline_sdk/models/membership_tier_action_logs.py +10 -8
- shopline_sdk/models/membership_tier_rule.py +8 -5
- shopline_sdk/models/merchant.py +13 -10
- shopline_sdk/models/merchant_tax.py +16 -13
- shopline_sdk/models/metafield_definition.py +10 -11
- shopline_sdk/models/metafield_value.py +9 -8
- shopline_sdk/models/money.py +5 -4
- shopline_sdk/models/multipass_linking.py +8 -3
- shopline_sdk/models/multipass_linkings.py +9 -7
- shopline_sdk/models/multipass_secret.py +8 -4
- shopline_sdk/models/not_found_error.py +5 -4
- shopline_sdk/models/order.py +65 -52
- shopline_sdk/models/order_action_log.py +7 -3
- shopline_sdk/models/order_action_logs.py +8 -6
- shopline_sdk/models/order_agent.py +9 -4
- shopline_sdk/models/order_campaign_item.py +10 -9
- shopline_sdk/models/order_comment.py +8 -6
- shopline_sdk/models/order_conversation.py +9 -5
- shopline_sdk/models/order_conversations.py +10 -8
- shopline_sdk/models/order_conversations_message.py +12 -6
- shopline_sdk/models/order_conversations_messages.py +10 -6
- shopline_sdk/models/order_customer_info.py +10 -7
- shopline_sdk/models/order_delivery.py +12 -12
- shopline_sdk/models/order_delivery_address.py +8 -3
- shopline_sdk/models/order_delivery_data.py +10 -7
- shopline_sdk/models/order_inspect_item.py +9 -6
- shopline_sdk/models/order_invoice.py +10 -4
- shopline_sdk/models/order_item.py +39 -38
- shopline_sdk/models/order_payment.py +14 -12
- shopline_sdk/models/order_promotion_item.py +11 -8
- shopline_sdk/models/order_source.py +8 -6
- shopline_sdk/models/order_transaction.py +13 -9
- shopline_sdk/models/orders_setting.py +13 -4
- shopline_sdk/models/page.py +16 -13
- shopline_sdk/models/page_block_settings.py +7 -2
- shopline_sdk/models/page_section.py +7 -5
- shopline_sdk/models/page_section_schema.py +11 -6
- shopline_sdk/models/page_section_settings.py +14 -10
- shopline_sdk/models/page_sections.py +9 -5
- shopline_sdk/models/paginatable.py +5 -4
- shopline_sdk/models/payment.py +11 -10
- shopline_sdk/models/payment_config_data.py +7 -4
- shopline_sdk/models/payments_setting.py +9 -4
- shopline_sdk/models/pos_agent.py +35 -0
- shopline_sdk/models/pos_channel.py +15 -0
- shopline_sdk/models/pos_payment.py +11 -9
- shopline_sdk/models/pos_setting.py +5 -3
- shopline_sdk/models/pos_staff.py +25 -0
- shopline_sdk/models/pos_warehouse.py +16 -0
- shopline_sdk/models/price_detail.py +10 -7
- shopline_sdk/models/price_set.py +11 -10
- shopline_sdk/models/price_sets.py +7 -6
- shopline_sdk/models/product.py +46 -34
- shopline_sdk/models/product_price_tier.py +8 -6
- shopline_sdk/models/product_related_theme_settings.py +12 -4
- shopline_sdk/models/product_review_comment.py +10 -3
- shopline_sdk/models/product_review_comments.py +10 -8
- shopline_sdk/models/product_review_setting.py +9 -5
- shopline_sdk/models/product_stock.py +14 -11
- shopline_sdk/models/product_subscription.py +13 -7
- shopline_sdk/models/product_subscription_update.py +20 -0
- shopline_sdk/models/product_subscription_update_error_response.py +23 -0
- shopline_sdk/models/product_subscription_update_response.py +17 -0
- shopline_sdk/models/product_variation.py +21 -18
- shopline_sdk/models/products_setting.py +7 -4
- shopline_sdk/models/promotion.py +22 -21
- shopline_sdk/models/promotion_condition.py +8 -7
- shopline_sdk/models/promotions_setting.py +15 -12
- shopline_sdk/models/public_api_error.py +13 -0
- shopline_sdk/models/purchase_order.py +27 -24
- shopline_sdk/models/purchase_order_item.py +16 -10
- shopline_sdk/models/purchase_orders.py +10 -8
- shopline_sdk/models/request_invoice_creation_error_response.py +21 -0
- shopline_sdk/models/request_invoice_creation_response.py +15 -0
- shopline_sdk/models/retail_status.py +7 -2
- shopline_sdk/models/return_order.py +38 -28
- shopline_sdk/models/return_order_delivery.py +13 -9
- shopline_sdk/models/return_order_delivery_address.py +11 -3
- shopline_sdk/models/return_order_delivery_data.py +13 -7
- shopline_sdk/models/return_order_item.py +27 -9
- shopline_sdk/models/return_order_payment.py +13 -9
- shopline_sdk/models/return_order_promotion_item.py +12 -7
- shopline_sdk/models/return_order_ref_data.py +8 -3
- shopline_sdk/models/return_orders.py +10 -8
- shopline_sdk/models/sale_comment.py +7 -3
- shopline_sdk/models/sale_customer.py +8 -4
- shopline_sdk/models/sale_product.py +8 -4
- shopline_sdk/models/save_draft_body.py +18 -17
- shopline_sdk/models/search_products_body.py +10 -4
- shopline_sdk/models/selling_plan.py +21 -0
- shopline_sdk/models/selling_plan_delivery_policy.py +20 -0
- shopline_sdk/models/selling_plan_group.py +21 -0
- shopline_sdk/models/selling_plan_group_resource.py +17 -0
- shopline_sdk/models/selling_plan_groups.py +17 -0
- shopline_sdk/models/selling_plan_groups_cursor_based.py +18 -0
- shopline_sdk/models/server_error.py +5 -4
- shopline_sdk/models/settings.py +29 -24
- shopline_sdk/models/shop_conversation.py +8 -5
- shopline_sdk/models/shop_conversations.py +9 -8
- shopline_sdk/models/shop_conversations_message.py +11 -6
- shopline_sdk/models/shop_conversations_messages.py +9 -6
- shopline_sdk/models/shop_setting.py +5 -4
- shopline_sdk/models/staff.py +9 -4
- shopline_sdk/models/staged_upload_result.py +19 -0
- shopline_sdk/models/staged_upload_target.py +24 -0
- shopline_sdk/models/status.py +4 -2
- shopline_sdk/models/stock.py +8 -3
- shopline_sdk/models/store_credit.py +12 -15
- shopline_sdk/models/storefront_o_auth_application.py +5 -4
- shopline_sdk/models/storefront_o_auth_applications.py +7 -6
- shopline_sdk/models/storefront_token.py +10 -8
- shopline_sdk/models/storefront_token_merchant.py +8 -3
- shopline_sdk/models/supplier.py +9 -7
- shopline_sdk/models/taggable.py +6 -3
- shopline_sdk/models/tax.py +14 -13
- shopline_sdk/models/tax_info.py +7 -3
- shopline_sdk/models/tax_region.py +7 -3
- shopline_sdk/models/tax_setting.py +7 -3
- shopline_sdk/models/theme.py +9 -4
- shopline_sdk/models/theme_schema.py +10 -7
- shopline_sdk/models/theme_setting.py +9 -14
- shopline_sdk/models/third_party_ads_setting.py +5 -4
- shopline_sdk/models/translatable.py +7 -3
- shopline_sdk/models/translatable_array.py +8 -3
- shopline_sdk/models/unauthorized_error.py +5 -4
- shopline_sdk/models/unprocessable_entity_error.py +5 -4
- shopline_sdk/models/update_addon_product_body.py +13 -16
- shopline_sdk/models/update_app_metafield_body.py +8 -8
- shopline_sdk/models/update_category_body.py +11 -12
- shopline_sdk/models/update_channel_price_body.py +8 -4
- shopline_sdk/models/update_customer_body.py +10 -12
- shopline_sdk/models/update_event_tracker_body.py +8 -5
- shopline_sdk/models/update_gift_body.py +10 -12
- shopline_sdk/models/update_metafield_body.py +8 -8
- shopline_sdk/models/update_product_body.py +26 -50
- shopline_sdk/models/update_product_review_comment_body.py +9 -5
- shopline_sdk/models/update_product_variation_body.py +11 -9
- shopline_sdk/models/update_promotion_body.py +16 -27
- shopline_sdk/models/update_return_order_body.py +12 -4
- shopline_sdk/models/update_webhook_body.py +9 -8
- shopline_sdk/models/user_coupon.py +5 -4
- shopline_sdk/models/user_coupon_rule.py +21 -0
- shopline_sdk/models/user_coupons.py +9 -8
- shopline_sdk/models/user_credit_rule.py +10 -8
- shopline_sdk/models/users_setting.py +25 -9
- shopline_sdk/models/utm_data.py +5 -4
- shopline_sdk/models/warehouse.py +7 -4
- shopline_sdk/models/webhook.py +8 -5
- shopline_sdk/models/webhooks.py +9 -8
- shopline_sdk/models/wish_list_item.py +16 -24
- shopline_sdk/models/wish_list_items.py +8 -8
- {shopline_sdk_python-0.3.0.dist-info → shopline_sdk_python-0.3.3.dist-info}/METADATA +1 -1
- shopline_sdk_python-0.3.3.dist-info/RECORD +695 -0
- {shopline_sdk_python-0.3.0.dist-info → shopline_sdk_python-0.3.3.dist-info}/WHEEL +1 -1
- shopline_sdk/models/addon_products.py +0 -14
- shopline_sdk/models/addon_products_cursor_based.py +0 -16
- shopline_sdk/models/address_node.py +0 -27
- shopline_sdk/models/address_nodes.py +0 -20
- shopline_sdk/models/address_preference.py +0 -52
- shopline_sdk/models/address_preference_layout_data.py +0 -15
- shopline_sdk/models/address_preferences.py +0 -16
- shopline_sdk/models/affiliate.py +0 -32
- shopline_sdk/models/agent_work_log.py +0 -31
- shopline_sdk/models/agent_work_logs.py +0 -12
- shopline_sdk/models/agents.py +0 -14
- shopline_sdk/models/analytics.py +0 -12
- shopline_sdk/models/bearer_auth.py +0 -7
- shopline_sdk/models/categories.py +0 -14
- shopline_sdk/models/categories_cursor_based.py +0 -16
- shopline_sdk/models/category_layout.py +0 -23
- shopline_sdk/models/change_payment_method_response.py +0 -14
- shopline_sdk/models/channel_param.py +0 -10
- shopline_sdk/models/corporate_info.py +0 -34
- shopline_sdk/models/create_agent_body.py +0 -17
- shopline_sdk/models/create_agent_work_log_request_body.py +0 -19
- shopline_sdk/models/create_bulk_operation_body.py +0 -21
- shopline_sdk/models/create_customer_group_activity_body.py +0 -29
- shopline_sdk/models/create_delivery_option_body.py +0 -45
- shopline_sdk/models/create_product_feed_setting_body.py +0 -32
- shopline_sdk/models/customer_group_activity.py +0 -30
- shopline_sdk/models/customer_groups.py +0 -14
- shopline_sdk/models/customer_viewed_categories.py +0 -14
- shopline_sdk/models/customer_viewed_category.py +0 -14
- shopline_sdk/models/customer_viewed_product.py +0 -14
- shopline_sdk/models/customer_viewed_products.py +0 -14
- shopline_sdk/models/delivery_rate.py +0 -17
- shopline_sdk/models/discount_amount.py +0 -13
- shopline_sdk/models/discount_option.py +0 -21
- shopline_sdk/models/discount_options.py +0 -20
- shopline_sdk/models/end_date_param.py +0 -8
- shopline_sdk/models/entity_render_error.py +0 -11
- shopline_sdk/models/facebook_business_extension_domains_entity.py +0 -17
- shopline_sdk/models/gifts.py +0 -14
- shopline_sdk/models/gifts_cursor_based.py +0 -16
- shopline_sdk/models/global_section.py +0 -27
- shopline_sdk/models/gross_amount_analytics.py +0 -29
- shopline_sdk/models/gross_orders_analytics.py +0 -28
- shopline_sdk/models/individual_info.py +0 -14
- shopline_sdk/models/interval_param.py +0 -10
- shopline_sdk/models/is_real_time_param.py +0 -8
- shopline_sdk/models/layout_sections.py +0 -10
- shopline_sdk/models/lock_inventory.py +0 -9
- shopline_sdk/models/lock_inventory_count.py +0 -14
- shopline_sdk/models/max_applicable_member_point.py +0 -16
- shopline_sdk/models/member_point_fulfillment.py +0 -23
- shopline_sdk/models/member_registration_analytics.py +0 -28
- shopline_sdk/models/merchant_kyc.py +0 -25
- shopline_sdk/models/net_amount_analytics.py +0 -29
- shopline_sdk/models/net_orders_analytics.py +0 -28
- shopline_sdk/models/order_tag.py +0 -10
- shopline_sdk/models/pagination.py +0 -19
- shopline_sdk/models/payment_fee_item.py +0 -31
- shopline_sdk/models/payment_settlement.py +0 -48
- shopline_sdk/models/product_feed_setting.py +0 -45
- shopline_sdk/models/product_feed_settings.py +0 -14
- shopline_sdk/models/product_ids_param.py +0 -8
- shopline_sdk/models/product_revenue.py +0 -27
- shopline_sdk/models/product_revenues.py +0 -14
- shopline_sdk/models/product_review.py +0 -28
- shopline_sdk/models/product_review_comments_cursor_based.py +0 -16
- shopline_sdk/models/product_reviews.py +0 -14
- shopline_sdk/models/products_cursor_based.py +0 -18
- shopline_sdk/models/promotion_excluded_hints.py +0 -16
- shopline_sdk/models/quantity_update_not_allowed_error.py +0 -14
- shopline_sdk/models/sc_conversation.py +0 -32
- shopline_sdk/models/sc_conversations.py +0 -14
- shopline_sdk/models/sc_conversations_message.py +0 -31
- shopline_sdk/models/sc_conversations_messages.py +0 -16
- shopline_sdk/models/service_unavailable_error.py +0 -12
- shopline_sdk/models/settlement_terminal_list.py +0 -7
- shopline_sdk/models/shop_crm_setting.py +0 -24
- shopline_sdk/models/staff_performance.py +0 -7
- shopline_sdk/models/start_date_param.py +0 -8
- shopline_sdk/models/store_credit_fulfillment.py +0 -27
- shopline_sdk/models/storefront_token_staff.py +0 -15
- shopline_sdk/models/storefront_tokens.py +0 -12
- shopline_sdk/models/tag.py +0 -16
- shopline_sdk/models/title_translations.py +0 -13
- shopline_sdk/models/token_scopes.py +0 -10
- shopline_sdk/models/top_products_analytics.py +0 -20
- shopline_sdk/models/top_products_analytics_record.py +0 -32
- shopline_sdk/models/top_products_analytics_record_variation.py +0 -36
- shopline_sdk/models/total_sessions_analytics.py +0 -34
- shopline_sdk/models/total_views_analytics.py +0 -28
- shopline_sdk/models/transaction.py +0 -66
- shopline_sdk/models/update_agent_body.py +0 -15
- shopline_sdk/models/update_customer_group_activity_body.py +0 -25
- shopline_sdk/models/update_flash_price_campaign_body.py +0 -22
- shopline_sdk/models/update_lock_inventory_body.py +0 -21
- shopline_sdk/models/update_product_feed_setting_body.py +0 -27
- shopline_sdk/models/warehouses_cursor_based.py +0 -18
- shopline_sdk_python-0.3.0.dist-info/RECORD +0 -723
- {shopline_sdk_python-0.3.0.dist-info → shopline_sdk_python-0.3.3.dist-info}/licenses/LICENSE +0 -0
- {shopline_sdk_python-0.3.0.dist-info → shopline_sdk_python-0.3.3.dist-info}/top_level.txt +0 -0
shopline_sdk/__init__.py
CHANGED
|
@@ -7,6 +7,9 @@ A Python SDK for interacting with the Shopline OpenAPI.
|
|
|
7
7
|
__author__ = "Shopline"
|
|
8
8
|
__description__ = "Shopline OpenAPI on python implement. (From https://open-api.docs.shoplineapp.com)"
|
|
9
9
|
|
|
10
|
+
from . import exceptions
|
|
11
|
+
from . import models
|
|
12
|
+
from . import apis
|
|
10
13
|
from .client import ShoplineAPIClient
|
|
11
14
|
from .exceptions import *
|
|
12
15
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
|
|
1
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
2
|
import aiohttp
|
|
4
|
-
from pydantic import BaseModel
|
|
3
|
+
from pydantic import BaseModel, ValidationError, Field
|
|
4
|
+
from typing_extensions import Literal
|
|
5
5
|
|
|
6
6
|
# 导入异常类
|
|
7
7
|
from shopline_sdk.exceptions import ShoplineAPIError
|
|
8
|
+
|
|
8
9
|
# 导入需要的模型
|
|
9
10
|
from shopline_sdk.models.addon_product import AddonProduct
|
|
10
11
|
from shopline_sdk.models.server_error import ServerError
|
|
11
12
|
|
|
12
|
-
|
|
13
13
|
class Body(BaseModel):
|
|
14
14
|
"""请求体模型"""
|
|
15
15
|
sku: Optional[str] = None
|
|
@@ -21,23 +21,22 @@ class Body(BaseModel):
|
|
|
21
21
|
replace: Optional[bool] = None
|
|
22
22
|
"""Whether replacing the original quantity
|
|
23
23
|
是否取代原本數量
|
|
24
|
-
-
|
|
24
|
+
-
|
|
25
25
|
true: replace the product's quantity with the number you provided
|
|
26
26
|
取代原本數量
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
false: increase/decrease the quantity with the number you provided
|
|
29
29
|
增加/減少數量" """
|
|
30
30
|
|
|
31
|
-
|
|
32
31
|
async def call(
|
|
33
|
-
|
|
32
|
+
session: aiohttp.ClientSession, body: Optional[Body] = None
|
|
34
33
|
) -> AddonProduct:
|
|
35
34
|
"""
|
|
36
35
|
Bulk Update Addon Product Quantity by SKU
|
|
37
|
-
|
|
36
|
+
|
|
38
37
|
Update all add-on products quantity by input SKU
|
|
39
38
|
更新所有相同商品貨號加購品的庫存數量
|
|
40
|
-
|
|
39
|
+
|
|
41
40
|
Path: PUT /addon_products/update_quantity
|
|
42
41
|
"""
|
|
43
42
|
# 构建请求 URL
|
|
@@ -51,7 +50,7 @@ async def call(
|
|
|
51
50
|
|
|
52
51
|
# 发起 HTTP 请求
|
|
53
52
|
async with session.put(
|
|
54
|
-
|
|
53
|
+
url, json=json_data, headers=headers
|
|
55
54
|
) as response:
|
|
56
55
|
if response.status >= 400:
|
|
57
56
|
error_data = await response.json()
|
|
@@ -64,9 +63,9 @@ async def call(
|
|
|
64
63
|
# 默认错误处理
|
|
65
64
|
raise ShoplineAPIError(
|
|
66
65
|
status_code=response.status,
|
|
67
|
-
|
|
66
|
+
error=error_data
|
|
68
67
|
)
|
|
69
68
|
response_data = await response.json()
|
|
70
69
|
|
|
71
70
|
# 验证并返回响应数据
|
|
72
|
-
return AddonProduct(**response_data)
|
|
71
|
+
return AddonProduct(**response_data)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
from typing import List, Optional
|
|
2
|
-
|
|
1
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
2
|
import aiohttp
|
|
4
|
-
from pydantic import BaseModel, Field
|
|
3
|
+
from pydantic import BaseModel, ValidationError, Field
|
|
4
|
+
from typing_extensions import Literal
|
|
5
5
|
|
|
6
6
|
# 导入异常类
|
|
7
7
|
from shopline_sdk.exceptions import ShoplineAPIError
|
|
8
|
+
|
|
8
9
|
# 导入需要的模型
|
|
9
10
|
from shopline_sdk.models.addon_product import AddonProduct
|
|
10
11
|
from shopline_sdk.models.money import Money
|
|
@@ -16,46 +17,31 @@ class MainProductsItemSchema(BaseModel):
|
|
|
16
17
|
id: Optional[str] = Field(default=None, alias="_id")
|
|
17
18
|
addon_price: Optional[Money] = None
|
|
18
19
|
|
|
19
|
-
|
|
20
20
|
class Body(BaseModel):
|
|
21
21
|
"""请求体模型"""
|
|
22
22
|
title_translations: Optional[Translatable] = None
|
|
23
23
|
unlimited_quantity: Optional[bool] = None
|
|
24
|
-
"""Unlimited quantity or not.
|
|
25
|
-
加購品數量是否無限
|
|
26
|
-
-
|
|
27
|
-
true: unlimited quantity
|
|
28
|
-
false: limited quantity"""
|
|
29
24
|
sku: Optional[str] = None
|
|
30
|
-
"""Stock Keeping Unit
|
|
31
|
-
加購品貨號"""
|
|
32
25
|
weight: Optional[float] = None
|
|
33
|
-
"""Addon Product's Weight (kg)
|
|
34
|
-
加購品重量 (公斤)"""
|
|
35
26
|
media_ids: Optional[List[str]] = None
|
|
36
27
|
start_at: Optional[str] = None
|
|
37
28
|
end_at: Optional[str] = None
|
|
38
29
|
location_id: Optional[str] = None
|
|
39
30
|
tax_type: Optional[str] = None
|
|
40
|
-
"""Tax Type
|
|
41
|
-
國內稅項"""
|
|
42
31
|
oversea_tax_type: Optional[str] = None
|
|
43
|
-
"""Oversea Tax Type
|
|
44
|
-
海外稅項"""
|
|
45
32
|
product_id: Optional[str] = None
|
|
46
33
|
cost: Optional[Money] = None
|
|
47
34
|
main_products: Optional[List[MainProductsItemSchema]] = None
|
|
48
35
|
|
|
49
|
-
|
|
50
36
|
async def call(
|
|
51
|
-
|
|
37
|
+
session: aiohttp.ClientSession, body: Optional[Body] = None
|
|
52
38
|
) -> AddonProduct:
|
|
53
39
|
"""
|
|
54
40
|
Create Addon Product
|
|
55
|
-
|
|
41
|
+
|
|
56
42
|
To create addon product
|
|
57
43
|
建立加購品
|
|
58
|
-
|
|
44
|
+
|
|
59
45
|
Path: POST /addon_products
|
|
60
46
|
"""
|
|
61
47
|
# 构建请求 URL
|
|
@@ -69,15 +55,15 @@ async def call(
|
|
|
69
55
|
|
|
70
56
|
# 发起 HTTP 请求
|
|
71
57
|
async with session.post(
|
|
72
|
-
|
|
58
|
+
url, json=json_data, headers=headers
|
|
73
59
|
) as response:
|
|
74
60
|
if response.status >= 400:
|
|
75
61
|
error_data = await response.json()
|
|
76
62
|
raise ShoplineAPIError(
|
|
77
63
|
status_code=response.status,
|
|
78
|
-
|
|
64
|
+
error=error_data
|
|
79
65
|
)
|
|
80
66
|
response_data = await response.json()
|
|
81
67
|
|
|
82
68
|
# 验证并返回响应数据
|
|
83
|
-
return AddonProduct(**response_data)
|
|
69
|
+
return AddonProduct(**response_data)
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Optional, Union
|
|
1
2
|
import aiohttp
|
|
3
|
+
from pydantic import BaseModel, ValidationError, Field
|
|
4
|
+
from typing_extensions import Literal
|
|
2
5
|
|
|
3
6
|
# 导入异常类
|
|
4
7
|
from shopline_sdk.exceptions import ShoplineAPIError
|
|
8
|
+
|
|
5
9
|
# 导入需要的模型
|
|
6
10
|
from shopline_sdk.models.addon_product import AddonProduct
|
|
7
11
|
|
|
8
|
-
|
|
9
12
|
async def call(
|
|
10
|
-
|
|
13
|
+
session: aiohttp.ClientSession, id: str
|
|
11
14
|
) -> AddonProduct:
|
|
12
15
|
"""
|
|
13
16
|
Get Addon Product
|
|
14
|
-
|
|
17
|
+
|
|
15
18
|
To get detailed information for a specific addon product with its ID
|
|
16
19
|
使用加購品ID獲取特定一個商品的詳細資料
|
|
17
|
-
|
|
20
|
+
|
|
18
21
|
Path: GET /addon_products/{id}
|
|
19
22
|
"""
|
|
20
23
|
# 构建请求 URL
|
|
@@ -25,15 +28,15 @@ async def call(
|
|
|
25
28
|
|
|
26
29
|
# 发起 HTTP 请求
|
|
27
30
|
async with session.get(
|
|
28
|
-
|
|
31
|
+
url, headers=headers
|
|
29
32
|
) as response:
|
|
30
33
|
if response.status >= 400:
|
|
31
34
|
error_data = await response.json()
|
|
32
35
|
raise ShoplineAPIError(
|
|
33
36
|
status_code=response.status,
|
|
34
|
-
|
|
37
|
+
error=error_data
|
|
35
38
|
)
|
|
36
39
|
response_data = await response.json()
|
|
37
40
|
|
|
38
41
|
# 验证并返回响应数据
|
|
39
|
-
return AddonProduct(**response_data)
|
|
42
|
+
return AddonProduct(**response_data)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
from typing import List, Optional
|
|
2
|
-
|
|
1
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
2
|
import aiohttp
|
|
4
|
-
from pydantic import BaseModel, Field
|
|
3
|
+
from pydantic import BaseModel, ValidationError, Field
|
|
4
|
+
from typing_extensions import Literal
|
|
5
5
|
|
|
6
6
|
# 导入异常类
|
|
7
7
|
from shopline_sdk.exceptions import ShoplineAPIError
|
|
8
|
+
|
|
8
9
|
# 导入需要的模型
|
|
9
10
|
from shopline_sdk.models.stock import Stock
|
|
10
11
|
from shopline_sdk.models.translatable import Translatable
|
|
11
12
|
|
|
12
|
-
|
|
13
13
|
class Params(BaseModel):
|
|
14
14
|
"""查询参数模型"""
|
|
15
15
|
excludes: Optional[List[str]] = Field(default=None, alias="excludes[]")
|
|
@@ -19,23 +19,21 @@ class Params(BaseModel):
|
|
|
19
19
|
"""Could only show certain parameters in the response
|
|
20
20
|
結果只顯示哪些參數"""
|
|
21
21
|
|
|
22
|
-
|
|
23
22
|
class Response(BaseModel):
|
|
24
23
|
"""响应体模型"""
|
|
25
24
|
id: Optional[str] = None
|
|
26
25
|
title_translations: Optional[Translatable] = None
|
|
27
26
|
stocks: Optional[List[Stock]] = None
|
|
28
27
|
|
|
29
|
-
|
|
30
28
|
async def call(
|
|
31
|
-
|
|
29
|
+
session: aiohttp.ClientSession, id: str, params: Optional[Params] = None
|
|
32
30
|
) -> Response:
|
|
33
31
|
"""
|
|
34
32
|
Get Addon Product Stocks
|
|
35
|
-
|
|
33
|
+
|
|
36
34
|
To get stock information for a specific addon product with its ID
|
|
37
35
|
使用商品 ID 獲取特定一個加購品的庫存資料
|
|
38
|
-
|
|
36
|
+
|
|
39
37
|
Path: GET /addon_products/{id}/stocks
|
|
40
38
|
"""
|
|
41
39
|
# 构建请求 URL
|
|
@@ -54,15 +52,15 @@ async def call(
|
|
|
54
52
|
|
|
55
53
|
# 发起 HTTP 请求
|
|
56
54
|
async with session.get(
|
|
57
|
-
|
|
55
|
+
url, params=query_params, headers=headers
|
|
58
56
|
) as response:
|
|
59
57
|
if response.status >= 400:
|
|
60
58
|
error_data = await response.json()
|
|
61
59
|
raise ShoplineAPIError(
|
|
62
60
|
status_code=response.status,
|
|
63
|
-
|
|
61
|
+
error=error_data
|
|
64
62
|
)
|
|
65
63
|
response_data = await response.json()
|
|
66
64
|
|
|
67
65
|
# 验证并返回响应数据
|
|
68
|
-
return Response(**response_data)
|
|
66
|
+
return Response(**response_data)
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
from typing import List, Optional, Union
|
|
2
|
-
|
|
1
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
2
|
import aiohttp
|
|
4
|
-
from pydantic import BaseModel, Field
|
|
3
|
+
from pydantic import BaseModel, ValidationError, Field
|
|
5
4
|
from typing_extensions import Literal
|
|
6
5
|
|
|
7
6
|
# 导入异常类
|
|
8
7
|
from shopline_sdk.exceptions import ShoplineAPIError
|
|
8
|
+
|
|
9
9
|
# 导入需要的模型
|
|
10
10
|
from shopline_sdk.models.addon_product import AddonProduct
|
|
11
11
|
from shopline_sdk.models.paginatable import Paginatable
|
|
12
12
|
from shopline_sdk.models.server_error import ServerError
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
class Params(BaseModel):
|
|
16
15
|
"""查询参数模型"""
|
|
17
16
|
previous_id: Optional[str] = None
|
|
18
17
|
"""The last ID of the addon products in the previous request.
|
|
19
|
-
前一筆加購品的 ID
|
|
18
|
+
前一筆加購品的 ID
|
|
20
19
|
beta 測試中,僅開放部分店家使用,如無法使用功能請聯絡客服窗口"""
|
|
21
20
|
page: Optional[int] = None
|
|
22
21
|
"""Page Number
|
|
@@ -31,22 +30,20 @@ class Params(BaseModel):
|
|
|
31
30
|
"""Main Product ID
|
|
32
31
|
主商品ID"""
|
|
33
32
|
|
|
34
|
-
|
|
35
33
|
class Response(BaseModel):
|
|
36
34
|
"""响应体模型"""
|
|
37
35
|
items: Optional[List[AddonProduct]] = None
|
|
38
36
|
pagination: Optional[Paginatable] = None
|
|
39
37
|
|
|
40
|
-
|
|
41
38
|
async def call(
|
|
42
|
-
|
|
39
|
+
session: aiohttp.ClientSession, params: Optional[Params] = None
|
|
43
40
|
) -> Response:
|
|
44
41
|
"""
|
|
45
42
|
Get Addon Products
|
|
46
|
-
|
|
43
|
+
|
|
47
44
|
To get detailed information of addon products.
|
|
48
45
|
撈取加購品的詳細資訊
|
|
49
|
-
|
|
46
|
+
|
|
50
47
|
Path: GET /addon_products
|
|
51
48
|
"""
|
|
52
49
|
# 构建请求 URL
|
|
@@ -65,7 +62,7 @@ async def call(
|
|
|
65
62
|
|
|
66
63
|
# 发起 HTTP 请求
|
|
67
64
|
async with session.get(
|
|
68
|
-
|
|
65
|
+
url, params=query_params, headers=headers
|
|
69
66
|
) as response:
|
|
70
67
|
if response.status >= 400:
|
|
71
68
|
error_data = await response.json()
|
|
@@ -78,9 +75,9 @@ async def call(
|
|
|
78
75
|
# 默认错误处理
|
|
79
76
|
raise ShoplineAPIError(
|
|
80
77
|
status_code=response.status,
|
|
81
|
-
|
|
78
|
+
error=error_data
|
|
82
79
|
)
|
|
83
80
|
response_data = await response.json()
|
|
84
81
|
|
|
85
82
|
# 验证并返回响应数据
|
|
86
|
-
return Response(**response_data)
|
|
83
|
+
return Response(**response_data)
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
from typing import List, Optional, Union
|
|
2
|
-
|
|
1
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
2
|
import aiohttp
|
|
4
|
-
from pydantic import BaseModel, Field
|
|
3
|
+
from pydantic import BaseModel, ValidationError, Field
|
|
5
4
|
from typing_extensions import Literal
|
|
6
5
|
|
|
7
6
|
# 导入异常类
|
|
8
7
|
from shopline_sdk.exceptions import ShoplineAPIError
|
|
8
|
+
|
|
9
9
|
# 导入需要的模型
|
|
10
10
|
from shopline_sdk.models.addon_product import AddonProduct
|
|
11
11
|
from shopline_sdk.models.paginatable import Paginatable
|
|
12
12
|
|
|
13
|
-
|
|
14
13
|
class Params(BaseModel):
|
|
15
14
|
"""查询参数模型"""
|
|
16
15
|
previous_id: Optional[str] = None
|
|
17
16
|
"""The last ID of the addon products in the previous request.
|
|
18
|
-
前一筆加購品的 ID
|
|
17
|
+
前一筆加購品的 ID
|
|
19
18
|
beta 測試中,僅開放部分店家使用,如無法使用功能請聯絡客服窗口"""
|
|
20
19
|
id: Optional[str] = None
|
|
21
20
|
"""Addon Product ID
|
|
@@ -61,29 +60,27 @@ class Params(BaseModel):
|
|
|
61
60
|
-
|
|
62
61
|
*Support equal or not equal or less than or less than or equal or greater than or greater than or equal
|
|
63
62
|
支援 等於 或 不等於 或 小於 或 小於等於 或 大於 或 大於等於
|
|
64
|
-
|
|
63
|
+
|
|
65
64
|
Please fill in to the second level. Default value is 00:00:00 if only fill in dates.
|
|
66
65
|
請輸入至秒數,若只輸入日期,則會自動帶入當天00:00:00"""
|
|
67
66
|
include_fields: Optional[List[Union[Literal['promotions'], str]]] = Field(default=None, alias="include_fields[]")
|
|
68
67
|
"""Provide additional attributes in the response
|
|
69
68
|
結果添加哪些參數"""
|
|
70
69
|
|
|
71
|
-
|
|
72
70
|
class Response(BaseModel):
|
|
73
71
|
"""响应体模型"""
|
|
74
72
|
items: Optional[List[AddonProduct]] = None
|
|
75
73
|
pagination: Optional[Paginatable] = None
|
|
76
74
|
|
|
77
|
-
|
|
78
75
|
async def call(
|
|
79
|
-
|
|
76
|
+
session: aiohttp.ClientSession, params: Optional[Params] = None
|
|
80
77
|
) -> Response:
|
|
81
78
|
"""
|
|
82
79
|
Search Addon Products
|
|
83
|
-
|
|
80
|
+
|
|
84
81
|
To search add-on products with specific conditions.
|
|
85
82
|
利用特殊條件搜尋加購品列表
|
|
86
|
-
|
|
83
|
+
|
|
87
84
|
Path: GET /addon_products/search
|
|
88
85
|
"""
|
|
89
86
|
# 构建请求 URL
|
|
@@ -102,15 +99,15 @@ async def call(
|
|
|
102
99
|
|
|
103
100
|
# 发起 HTTP 请求
|
|
104
101
|
async with session.get(
|
|
105
|
-
|
|
102
|
+
url, params=query_params, headers=headers
|
|
106
103
|
) as response:
|
|
107
104
|
if response.status >= 400:
|
|
108
105
|
error_data = await response.json()
|
|
109
106
|
raise ShoplineAPIError(
|
|
110
107
|
status_code=response.status,
|
|
111
|
-
|
|
108
|
+
error=error_data
|
|
112
109
|
)
|
|
113
110
|
response_data = await response.json()
|
|
114
111
|
|
|
115
112
|
# 验证并返回响应数据
|
|
116
|
-
return Response(**response_data)
|
|
113
|
+
return Response(**response_data)
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Optional, Union
|
|
1
2
|
import aiohttp
|
|
3
|
+
from pydantic import BaseModel, ValidationError, Field
|
|
4
|
+
from typing_extensions import Literal
|
|
2
5
|
|
|
3
6
|
# 导入异常类
|
|
4
7
|
from shopline_sdk.exceptions import ShoplineAPIError
|
|
8
|
+
|
|
5
9
|
# 导入需要的模型
|
|
6
10
|
from shopline_sdk.models.addon_product import AddonProduct
|
|
7
11
|
from shopline_sdk.models.server_error import ServerError
|
|
8
12
|
from shopline_sdk.models.update_addon_product_body import UpdateAddonProductBody as Body
|
|
9
13
|
|
|
10
|
-
|
|
11
14
|
async def call(
|
|
12
|
-
|
|
15
|
+
session: aiohttp.ClientSession, id: str, body: Optional[Body] = None
|
|
13
16
|
) -> AddonProduct:
|
|
14
17
|
"""
|
|
15
18
|
Update Addon Product
|
|
16
|
-
|
|
19
|
+
|
|
17
20
|
To update information about existing addon product with open API.
|
|
18
21
|
透過open API 更新加購品
|
|
19
|
-
|
|
22
|
+
|
|
20
23
|
Path: PUT /addon_products/{id}
|
|
21
24
|
"""
|
|
22
25
|
# 构建请求 URL
|
|
@@ -30,7 +33,7 @@ async def call(
|
|
|
30
33
|
|
|
31
34
|
# 发起 HTTP 请求
|
|
32
35
|
async with session.put(
|
|
33
|
-
|
|
36
|
+
url, json=json_data, headers=headers
|
|
34
37
|
) as response:
|
|
35
38
|
if response.status >= 400:
|
|
36
39
|
error_data = await response.json()
|
|
@@ -43,9 +46,9 @@ async def call(
|
|
|
43
46
|
# 默认错误处理
|
|
44
47
|
raise ShoplineAPIError(
|
|
45
48
|
status_code=response.status,
|
|
46
|
-
|
|
49
|
+
error=error_data
|
|
47
50
|
)
|
|
48
51
|
response_data = await response.json()
|
|
49
52
|
|
|
50
53
|
# 验证并返回响应数据
|
|
51
|
-
return AddonProduct(**response_data)
|
|
54
|
+
return AddonProduct(**response_data)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
|
|
1
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
2
|
import aiohttp
|
|
4
|
-
from pydantic import BaseModel
|
|
3
|
+
from pydantic import BaseModel, ValidationError, Field
|
|
4
|
+
from typing_extensions import Literal
|
|
5
5
|
|
|
6
6
|
# 导入异常类
|
|
7
7
|
from shopline_sdk.exceptions import ShoplineAPIError
|
|
8
|
+
|
|
8
9
|
# 导入需要的模型
|
|
9
10
|
from shopline_sdk.models.addon_product import AddonProduct
|
|
10
11
|
from shopline_sdk.models.forbidden_error import ForbiddenError
|
|
@@ -12,7 +13,6 @@ from shopline_sdk.models.not_found_error import NotFoundError
|
|
|
12
13
|
from shopline_sdk.models.server_error import ServerError
|
|
13
14
|
from shopline_sdk.models.unprocessable_entity_error import UnprocessableEntityError
|
|
14
15
|
|
|
15
|
-
|
|
16
16
|
class Body(BaseModel):
|
|
17
17
|
"""请求体模型"""
|
|
18
18
|
quantity: float
|
|
@@ -24,23 +24,22 @@ class Body(BaseModel):
|
|
|
24
24
|
replace: Optional[bool] = None
|
|
25
25
|
"""Whether replacing the original quantity
|
|
26
26
|
是否取代原本數量
|
|
27
|
-
-
|
|
27
|
+
-
|
|
28
28
|
true: replace the product's quantity with the number you provided
|
|
29
29
|
取代原本數量
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
false: increase/decrease the quantity with the number you provided
|
|
32
32
|
增加/減少數量"""
|
|
33
33
|
|
|
34
|
-
|
|
35
34
|
async def call(
|
|
36
|
-
|
|
35
|
+
session: aiohttp.ClientSession, id: str, body: Optional[Body] = None
|
|
37
36
|
) -> AddonProduct:
|
|
38
37
|
"""
|
|
39
38
|
Update Addon Product Quantity
|
|
40
|
-
|
|
39
|
+
|
|
41
40
|
To update quantity of add-on products with open API
|
|
42
41
|
透過open API 更新加購品數量
|
|
43
|
-
|
|
42
|
+
|
|
44
43
|
Path: PUT /addon_products/{id}/update_quantity
|
|
45
44
|
"""
|
|
46
45
|
# 构建请求 URL
|
|
@@ -54,7 +53,7 @@ async def call(
|
|
|
54
53
|
|
|
55
54
|
# 发起 HTTP 请求
|
|
56
55
|
async with session.put(
|
|
57
|
-
|
|
56
|
+
url, json=json_data, headers=headers
|
|
58
57
|
) as response:
|
|
59
58
|
if response.status >= 400:
|
|
60
59
|
error_data = await response.json()
|
|
@@ -85,9 +84,9 @@ async def call(
|
|
|
85
84
|
# 默认错误处理
|
|
86
85
|
raise ShoplineAPIError(
|
|
87
86
|
status_code=response.status,
|
|
88
|
-
|
|
87
|
+
error=error_data
|
|
89
88
|
)
|
|
90
89
|
response_data = await response.json()
|
|
91
90
|
|
|
92
91
|
# 验证并返回响应数据
|
|
93
|
-
return AddonProduct(**response_data)
|
|
92
|
+
return AddonProduct(**response_data)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
|
|
1
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
2
|
import aiohttp
|
|
4
|
-
from pydantic import BaseModel
|
|
3
|
+
from pydantic import BaseModel, ValidationError, Field
|
|
4
|
+
from typing_extensions import Literal
|
|
5
5
|
|
|
6
6
|
# 导入异常类
|
|
7
7
|
from shopline_sdk.exceptions import ShoplineAPIError
|
|
8
|
+
|
|
8
9
|
# 导入需要的模型
|
|
9
10
|
from shopline_sdk.models.not_found_error import NotFoundError
|
|
10
11
|
from shopline_sdk.models.product_stock import ProductStock
|
|
11
12
|
from shopline_sdk.models.server_error import ServerError
|
|
12
13
|
|
|
13
|
-
|
|
14
14
|
class Body(BaseModel):
|
|
15
15
|
"""请求体模型"""
|
|
16
16
|
warehouse_id: str
|
|
@@ -22,29 +22,28 @@ class Body(BaseModel):
|
|
|
22
22
|
quantity: float
|
|
23
23
|
"""Quantity
|
|
24
24
|
(新增/減少)商品數量
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
Negative number is allowed
|
|
27
27
|
允許更新庫存為負值"""
|
|
28
28
|
is_replace: Optional[bool] = None
|
|
29
29
|
"""Whether replacing the original quantity
|
|
30
30
|
是否取代原本數量
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
true: replace the product's quantity with the number you provided
|
|
33
33
|
取代原本數量
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
false: increase/decrease the quantity with the number you provided
|
|
36
36
|
增加/減少數量"""
|
|
37
37
|
|
|
38
|
-
|
|
39
38
|
async def call(
|
|
40
|
-
|
|
39
|
+
session: aiohttp.ClientSession, id: str, body: Optional[Body] = None
|
|
41
40
|
) -> ProductStock:
|
|
42
41
|
"""
|
|
43
42
|
Update Addon Product Stock
|
|
44
|
-
|
|
43
|
+
|
|
45
44
|
To update the addon product stock with its ID
|
|
46
45
|
使用商品 ID 更新加購品在各個倉庫的庫存
|
|
47
|
-
|
|
46
|
+
|
|
48
47
|
Path: PUT /addon_products/{id}/stocks
|
|
49
48
|
"""
|
|
50
49
|
# 构建请求 URL
|
|
@@ -58,7 +57,7 @@ async def call(
|
|
|
58
57
|
|
|
59
58
|
# 发起 HTTP 请求
|
|
60
59
|
async with session.put(
|
|
61
|
-
|
|
60
|
+
url, json=json_data, headers=headers
|
|
62
61
|
) as response:
|
|
63
62
|
if response.status >= 400:
|
|
64
63
|
error_data = await response.json()
|
|
@@ -77,9 +76,9 @@ async def call(
|
|
|
77
76
|
# 默认错误处理
|
|
78
77
|
raise ShoplineAPIError(
|
|
79
78
|
status_code=response.status,
|
|
80
|
-
|
|
79
|
+
error=error_data
|
|
81
80
|
)
|
|
82
81
|
response_data = await response.json()
|
|
83
82
|
|
|
84
83
|
# 验证并返回响应数据
|
|
85
|
-
return ProductStock(**response_data)
|
|
84
|
+
return ProductStock(**response_data)
|