order_cloud 0.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/LICENSE +201 -0
- data/README.md +476 -0
- data/Rakefile +31 -0
- data/docs/AccessToken.md +10 -0
- data/docs/Address.md +20 -0
- data/docs/AddressApi.md +520 -0
- data/docs/AddressAssignment.md +12 -0
- data/docs/AdminAddressApi.md +324 -0
- data/docs/AdminCompany.md +10 -0
- data/docs/AdminModelOnView.md +7 -0
- data/docs/AdminUserApi.md +323 -0
- data/docs/ApprovalRule.md +20 -0
- data/docs/ApprovalRuleApi.md +342 -0
- data/docs/BaseSpec.md +15 -0
- data/docs/Buyer.md +11 -0
- data/docs/BuyerAddress.md +11 -0
- data/docs/BuyerApi.md +324 -0
- data/docs/BuyerCreditCard.md +9 -0
- data/docs/BuyerProduct.md +9 -0
- data/docs/BuyerSpec.md +9 -0
- data/docs/Category.md +15 -0
- data/docs/CategoryApi.md +684 -0
- data/docs/CategoryAssignment.md +10 -0
- data/docs/CategoryProductAssignment.md +10 -0
- data/docs/CostCenter.md +11 -0
- data/docs/CostCenterApi.md +516 -0
- data/docs/CostCenterAssignment.md +10 -0
- data/docs/CreditCard.md +15 -0
- data/docs/CreditCardApi.md +516 -0
- data/docs/CreditCardAssignment.md +10 -0
- data/docs/EmailTemplate.md +12 -0
- data/docs/EmailTemplateApi.md +223 -0
- data/docs/File.md +10 -0
- data/docs/FileApi.md +162 -0
- data/docs/ImpersonateTokenRequest.md +9 -0
- data/docs/Inventory.md +12 -0
- data/docs/LineItem.md +23 -0
- data/docs/LineItemApi.md +478 -0
- data/docs/LineItemSpec.md +11 -0
- data/docs/ListAddress.md +9 -0
- data/docs/ListAddressAssignment.md +9 -0
- data/docs/ListAdminCompany.md +9 -0
- data/docs/ListApiClient.md +9 -0
- data/docs/ListApprovalRule.md +9 -0
- data/docs/ListBuyer.md +9 -0
- data/docs/ListBuyerAddress.md +9 -0
- data/docs/ListBuyerCreditCard.md +9 -0
- data/docs/ListBuyerProduct.md +9 -0
- data/docs/ListBuyerSpec.md +9 -0
- data/docs/ListCategory.md +9 -0
- data/docs/ListCategoryAssignment.md +9 -0
- data/docs/ListCategoryProductAssignment.md +9 -0
- data/docs/ListCostCenter.md +9 -0
- data/docs/ListCostCenterAssignment.md +9 -0
- data/docs/ListCreditCard.md +9 -0
- data/docs/ListCreditCardAssignment.md +9 -0
- data/docs/ListDevAccessibleCompany.md +9 -0
- data/docs/ListFile.md +9 -0
- data/docs/ListInventory.md +9 -0
- data/docs/ListLineItem.md +9 -0
- data/docs/ListOrder.md +9 -0
- data/docs/ListOrderApproval.md +9 -0
- data/docs/ListOrderPromotion.md +9 -0
- data/docs/ListPayment.md +9 -0
- data/docs/ListPriceSchedule.md +9 -0
- data/docs/ListProduct.md +9 -0
- data/docs/ListProductAssignment.md +9 -0
- data/docs/ListPromotion.md +9 -0
- data/docs/ListPromotionAssignment.md +9 -0
- data/docs/ListSecurityProfile.md +9 -0
- data/docs/ListSecurityProfileAssignment.md +9 -0
- data/docs/ListShipment.md +9 -0
- data/docs/ListSpec.md +9 -0
- data/docs/ListSpecOption.md +9 -0
- data/docs/ListSpecProductAssignment.md +9 -0
- data/docs/ListSpendingAccount.md +9 -0
- data/docs/ListSpendingAccountAssignment.md +9 -0
- data/docs/ListUser.md +9 -0
- data/docs/ListUserGroup.md +9 -0
- data/docs/ListUserGroupAssignment.md +9 -0
- data/docs/ListVariant.md +9 -0
- data/docs/ListWebHook.md +9 -0
- data/docs/ListWebHookRoute.md +9 -0
- data/docs/ListXpIndex.md +9 -0
- data/docs/MeApi.md +1488 -0
- data/docs/Meta.md +12 -0
- data/docs/Order.md +31 -0
- data/docs/OrderApi.md +1277 -0
- data/docs/OrderApproval.md +16 -0
- data/docs/OrderPromotion.md +8 -0
- data/docs/PasswordReset.md +10 -0
- data/docs/PasswordResetApi.md +109 -0
- data/docs/PasswordResetRequest.md +11 -0
- data/docs/Payment.md +16 -0
- data/docs/PaymentApi.md +601 -0
- data/docs/PaymentTransaction.md +15 -0
- data/docs/PingResponse.md +8 -0
- data/docs/PriceBreak.md +9 -0
- data/docs/PriceSchedule.md +18 -0
- data/docs/PriceScheduleApi.md +429 -0
- data/docs/Product.md +22 -0
- data/docs/ProductApi.md +1115 -0
- data/docs/ProductAssignment.md +13 -0
- data/docs/Promotion.md +21 -0
- data/docs/PromotionApi.md +495 -0
- data/docs/PromotionAssignment.md +11 -0
- data/docs/SecurityProfile.md +11 -0
- data/docs/SecurityProfileApi.md +290 -0
- data/docs/SecurityProfileAssignment.md +11 -0
- data/docs/Shipment.md +14 -0
- data/docs/ShipmentApi.md +459 -0
- data/docs/ShipmentItem.md +10 -0
- data/docs/Spec.md +8 -0
- data/docs/SpecApi.md +816 -0
- data/docs/SpecOption.md +14 -0
- data/docs/SpecProductAssignment.md +10 -0
- data/docs/SpendingAccount.md +15 -0
- data/docs/SpendingAccountApi.md +516 -0
- data/docs/SpendingAccountAssignment.md +11 -0
- data/docs/User.md +17 -0
- data/docs/UserApi.md +399 -0
- data/docs/UserGroup.md +11 -0
- data/docs/UserGroupApi.md +508 -0
- data/docs/UserGroupAssignment.md +9 -0
- data/docs/Variant.md +12 -0
- data/docs/WebHook.md +18 -0
- data/docs/WebHookRoute.md +10 -0
- data/docs/XpIndex.md +9 -0
- data/git_push.sh +67 -0
- data/lib/order_cloud.rb +176 -0
- data/lib/order_cloud/api/address_api.rb +628 -0
- data/lib/order_cloud/api/admin_address_api.rb +397 -0
- data/lib/order_cloud/api/admin_user_api.rb +396 -0
- data/lib/order_cloud/api/approval_rule_api.rb +421 -0
- data/lib/order_cloud/api/buyer_api.rb +397 -0
- data/lib/order_cloud/api/category_api.rb +817 -0
- data/lib/order_cloud/api/cost_center_api.rb +622 -0
- data/lib/order_cloud/api/credit_card_api.rb +622 -0
- data/lib/order_cloud/api/email_template_api.rb +283 -0
- data/lib/order_cloud/api/file_api.rb +206 -0
- data/lib/order_cloud/api/line_item_api.rb +583 -0
- data/lib/order_cloud/api/me_api.rb +1747 -0
- data/lib/order_cloud/api/order_api.rb +1509 -0
- data/lib/order_cloud/api/password_reset_api.rb +150 -0
- data/lib/order_cloud/api/payment_api.rb +728 -0
- data/lib/order_cloud/api/price_schedule_api.rb +519 -0
- data/lib/order_cloud/api/product_api.rb +1311 -0
- data/lib/order_cloud/api/promotion_api.rb +596 -0
- data/lib/order_cloud/api/security_profile_api.rb +361 -0
- data/lib/order_cloud/api/shipment_api.rb +558 -0
- data/lib/order_cloud/api/spec_api.rb +965 -0
- data/lib/order_cloud/api/spending_account_api.rb +622 -0
- data/lib/order_cloud/api/user_api.rb +488 -0
- data/lib/order_cloud/api/user_group_api.rb +613 -0
- data/lib/order_cloud/api_auth.rb +99 -0
- data/lib/order_cloud/api_client.rb +385 -0
- data/lib/order_cloud/api_error.rb +47 -0
- data/lib/order_cloud/configuration.rb +244 -0
- data/lib/order_cloud/models/access_token.rb +217 -0
- data/lib/order_cloud/models/address.rb +307 -0
- data/lib/order_cloud/models/address_assignment.rb +235 -0
- data/lib/order_cloud/models/admin_company.rb +217 -0
- data/lib/order_cloud/models/admin_model_on_view.rb +190 -0
- data/lib/order_cloud/models/approval_rule.rb +307 -0
- data/lib/order_cloud/models/base_spec.rb +262 -0
- data/lib/order_cloud/models/buyer.rb +226 -0
- data/lib/order_cloud/models/buyer_address.rb +226 -0
- data/lib/order_cloud/models/buyer_credit_card.rb +208 -0
- data/lib/order_cloud/models/buyer_product.rb +208 -0
- data/lib/order_cloud/models/buyer_spec.rb +210 -0
- data/lib/order_cloud/models/category.rb +262 -0
- data/lib/order_cloud/models/category_assignment.rb +217 -0
- data/lib/order_cloud/models/category_product_assignment.rb +217 -0
- data/lib/order_cloud/models/cost_center.rb +226 -0
- data/lib/order_cloud/models/cost_center_assignment.rb +217 -0
- data/lib/order_cloud/models/credit_card.rb +262 -0
- data/lib/order_cloud/models/credit_card_assignment.rb +217 -0
- data/lib/order_cloud/models/email_template.rb +235 -0
- data/lib/order_cloud/models/file.rb +217 -0
- data/lib/order_cloud/models/impersonate_token_request.rb +208 -0
- data/lib/order_cloud/models/inventory.rb +235 -0
- data/lib/order_cloud/models/line_item.rb +336 -0
- data/lib/order_cloud/models/line_item_spec.rb +226 -0
- data/lib/order_cloud/models/list_address.rb +210 -0
- data/lib/order_cloud/models/list_address_assignment.rb +210 -0
- data/lib/order_cloud/models/list_admin_company.rb +210 -0
- data/lib/order_cloud/models/list_api_client.rb +210 -0
- data/lib/order_cloud/models/list_approval_rule.rb +210 -0
- data/lib/order_cloud/models/list_buyer.rb +210 -0
- data/lib/order_cloud/models/list_buyer_address.rb +210 -0
- data/lib/order_cloud/models/list_buyer_credit_card.rb +210 -0
- data/lib/order_cloud/models/list_buyer_product.rb +210 -0
- data/lib/order_cloud/models/list_buyer_spec.rb +210 -0
- data/lib/order_cloud/models/list_category.rb +210 -0
- data/lib/order_cloud/models/list_category_assignment.rb +210 -0
- data/lib/order_cloud/models/list_category_product_assignment.rb +210 -0
- data/lib/order_cloud/models/list_cost_center.rb +210 -0
- data/lib/order_cloud/models/list_cost_center_assignment.rb +210 -0
- data/lib/order_cloud/models/list_credit_card.rb +210 -0
- data/lib/order_cloud/models/list_credit_card_assignment.rb +210 -0
- data/lib/order_cloud/models/list_dev_accessible_company.rb +210 -0
- data/lib/order_cloud/models/list_file.rb +210 -0
- data/lib/order_cloud/models/list_inventory.rb +210 -0
- data/lib/order_cloud/models/list_line_item.rb +210 -0
- data/lib/order_cloud/models/list_order.rb +210 -0
- data/lib/order_cloud/models/list_order_approval.rb +210 -0
- data/lib/order_cloud/models/list_order_promotion.rb +210 -0
- data/lib/order_cloud/models/list_payment.rb +210 -0
- data/lib/order_cloud/models/list_price_schedule.rb +210 -0
- data/lib/order_cloud/models/list_product.rb +210 -0
- data/lib/order_cloud/models/list_product_assignment.rb +210 -0
- data/lib/order_cloud/models/list_promotion.rb +210 -0
- data/lib/order_cloud/models/list_promotion_assignment.rb +210 -0
- data/lib/order_cloud/models/list_security_profile.rb +210 -0
- data/lib/order_cloud/models/list_security_profile_assignment.rb +210 -0
- data/lib/order_cloud/models/list_shipment.rb +210 -0
- data/lib/order_cloud/models/list_spec.rb +210 -0
- data/lib/order_cloud/models/list_spec_option.rb +210 -0
- data/lib/order_cloud/models/list_spec_product_assignment.rb +210 -0
- data/lib/order_cloud/models/list_spending_account.rb +210 -0
- data/lib/order_cloud/models/list_spending_account_assignment.rb +210 -0
- data/lib/order_cloud/models/list_user.rb +210 -0
- data/lib/order_cloud/models/list_user_group.rb +210 -0
- data/lib/order_cloud/models/list_user_group_assignment.rb +210 -0
- data/lib/order_cloud/models/list_variant.rb +210 -0
- data/lib/order_cloud/models/list_web_hook.rb +210 -0
- data/lib/order_cloud/models/list_web_hook_route.rb +210 -0
- data/lib/order_cloud/models/list_xp_index.rb +210 -0
- data/lib/order_cloud/models/meta.rb +237 -0
- data/lib/order_cloud/models/order.rb +406 -0
- data/lib/order_cloud/models/order_approval.rb +271 -0
- data/lib/order_cloud/models/order_promotion.rb +199 -0
- data/lib/order_cloud/models/password_reset.rb +217 -0
- data/lib/order_cloud/models/password_reset_request.rb +226 -0
- data/lib/order_cloud/models/payment.rb +273 -0
- data/lib/order_cloud/models/payment_transaction.rb +262 -0
- data/lib/order_cloud/models/ping_response.rb +199 -0
- data/lib/order_cloud/models/price_break.rb +208 -0
- data/lib/order_cloud/models/price_schedule.rb +291 -0
- data/lib/order_cloud/models/product.rb +325 -0
- data/lib/order_cloud/models/product_assignment.rb +244 -0
- data/lib/order_cloud/models/promotion.rb +316 -0
- data/lib/order_cloud/models/promotion_assignment.rb +226 -0
- data/lib/order_cloud/models/security_profile.rb +228 -0
- data/lib/order_cloud/models/security_profile_assignment.rb +226 -0
- data/lib/order_cloud/models/shipment.rb +255 -0
- data/lib/order_cloud/models/shipment_item.rb +217 -0
- data/lib/order_cloud/models/spec.rb +199 -0
- data/lib/order_cloud/models/spec_option.rb +253 -0
- data/lib/order_cloud/models/spec_product_assignment.rb +217 -0
- data/lib/order_cloud/models/spending_account.rb +262 -0
- data/lib/order_cloud/models/spending_account_assignment.rb +226 -0
- data/lib/order_cloud/models/user.rb +280 -0
- data/lib/order_cloud/models/user_group.rb +226 -0
- data/lib/order_cloud/models/user_group_assignment.rb +208 -0
- data/lib/order_cloud/models/variant.rb +235 -0
- data/lib/order_cloud/models/web_hook.rb +289 -0
- data/lib/order_cloud/models/web_hook_route.rb +217 -0
- data/lib/order_cloud/models/xp_index.rb +208 -0
- data/lib/order_cloud/version.rb +26 -0
- data/order_cloud.gemspec +56 -0
- data/spec/api/address_api_spec.rb +179 -0
- data/spec/api/admin_address_api_spec.rb +125 -0
- data/spec/api/admin_user_api_spec.rb +125 -0
- data/spec/api/approval_rule_api_spec.rb +131 -0
- data/spec/api/buyer_api_spec.rb +125 -0
- data/spec/api/category_api_spec.rb +221 -0
- data/spec/api/cost_center_api_spec.rb +177 -0
- data/spec/api/credit_card_api_spec.rb +177 -0
- data/spec/api/email_template_api_spec.rb +100 -0
- data/spec/api/file_api_spec.rb +83 -0
- data/spec/api/line_item_api_spec.rb +167 -0
- data/spec/api/me_api_spec.rb +431 -0
- data/spec/api/order_api_spec.rb +375 -0
- data/spec/api/password_reset_api_spec.rb +71 -0
- data/spec/api/payment_api_spec.rb +199 -0
- data/spec/api/price_schedule_api_spec.rb +151 -0
- data/spec/api/product_api_spec.rb +330 -0
- data/spec/api/promotion_api_spec.rb +170 -0
- data/spec/api/security_profile_api_spec.rb +120 -0
- data/spec/api/shipment_api_spec.rb +161 -0
- data/spec/api/spec_api_spec.rb +250 -0
- data/spec/api/spending_account_api_spec.rb +177 -0
- data/spec/api/user_api_spec.rb +146 -0
- data/spec/api/user_group_api_spec.rb +174 -0
- data/spec/api_auth_spec.rb +165 -0
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +80 -0
- data/spec/models/access_token_spec.rb +65 -0
- data/spec/models/address_assignment_spec.rb +77 -0
- data/spec/models/address_spec.rb +125 -0
- data/spec/models/admin_company_spec.rb +65 -0
- data/spec/models/admin_model_on_view_spec.rb +47 -0
- data/spec/models/approval_rule_spec.rb +125 -0
- data/spec/models/base_spec_spec.rb +95 -0
- data/spec/models/buyer_address_spec.rb +71 -0
- data/spec/models/buyer_credit_card_spec.rb +59 -0
- data/spec/models/buyer_product_spec.rb +59 -0
- data/spec/models/buyer_spec.rb +71 -0
- data/spec/models/buyer_spec_spec.rb +59 -0
- data/spec/models/category_assignment_spec.rb +65 -0
- data/spec/models/category_product_assignment_spec.rb +65 -0
- data/spec/models/category_spec.rb +95 -0
- data/spec/models/cost_center_assignment_spec.rb +65 -0
- data/spec/models/cost_center_spec.rb +71 -0
- data/spec/models/credit_card_assignment_spec.rb +65 -0
- data/spec/models/credit_card_spec.rb +95 -0
- data/spec/models/email_template_spec.rb +77 -0
- data/spec/models/file_spec.rb +65 -0
- data/spec/models/impersonate_token_request_spec.rb +59 -0
- data/spec/models/inventory_spec.rb +77 -0
- data/spec/models/line_item_spec.rb +143 -0
- data/spec/models/line_item_spec_spec.rb +71 -0
- data/spec/models/list_address_assignment_spec.rb +59 -0
- data/spec/models/list_address_spec.rb +59 -0
- data/spec/models/list_admin_company_spec.rb +59 -0
- data/spec/models/list_api_client_spec.rb +59 -0
- data/spec/models/list_approval_rule_spec.rb +59 -0
- data/spec/models/list_buyer_address_spec.rb +59 -0
- data/spec/models/list_buyer_credit_card_spec.rb +59 -0
- data/spec/models/list_buyer_product_spec.rb +59 -0
- data/spec/models/list_buyer_spec.rb +59 -0
- data/spec/models/list_buyer_spec_spec.rb +59 -0
- data/spec/models/list_category_assignment_spec.rb +59 -0
- data/spec/models/list_category_product_assignment_spec.rb +59 -0
- data/spec/models/list_category_spec.rb +59 -0
- data/spec/models/list_cost_center_assignment_spec.rb +59 -0
- data/spec/models/list_cost_center_spec.rb +59 -0
- data/spec/models/list_credit_card_assignment_spec.rb +59 -0
- data/spec/models/list_credit_card_spec.rb +59 -0
- data/spec/models/list_dev_accessible_company_spec.rb +59 -0
- data/spec/models/list_file_spec.rb +59 -0
- data/spec/models/list_inventory_spec.rb +59 -0
- data/spec/models/list_line_item_spec.rb +59 -0
- data/spec/models/list_order_approval_spec.rb +59 -0
- data/spec/models/list_order_promotion_spec.rb +59 -0
- data/spec/models/list_order_spec.rb +59 -0
- data/spec/models/list_payment_spec.rb +59 -0
- data/spec/models/list_price_schedule_spec.rb +59 -0
- data/spec/models/list_product_assignment_spec.rb +59 -0
- data/spec/models/list_product_spec.rb +59 -0
- data/spec/models/list_promotion_assignment_spec.rb +59 -0
- data/spec/models/list_promotion_spec.rb +59 -0
- data/spec/models/list_security_profile_assignment_spec.rb +59 -0
- data/spec/models/list_security_profile_spec.rb +59 -0
- data/spec/models/list_shipment_spec.rb +59 -0
- data/spec/models/list_spec_option_spec.rb +59 -0
- data/spec/models/list_spec_product_assignment_spec.rb +59 -0
- data/spec/models/list_spec_spec.rb +59 -0
- data/spec/models/list_spending_account_assignment_spec.rb +59 -0
- data/spec/models/list_spending_account_spec.rb +59 -0
- data/spec/models/list_user_group_assignment_spec.rb +59 -0
- data/spec/models/list_user_group_spec.rb +59 -0
- data/spec/models/list_user_spec.rb +59 -0
- data/spec/models/list_variant_spec.rb +59 -0
- data/spec/models/list_web_hook_route_spec.rb +59 -0
- data/spec/models/list_web_hook_spec.rb +59 -0
- data/spec/models/list_xp_index_spec.rb +59 -0
- data/spec/models/meta_spec.rb +77 -0
- data/spec/models/order_approval_spec.rb +101 -0
- data/spec/models/order_promotion_spec.rb +53 -0
- data/spec/models/order_spec.rb +191 -0
- data/spec/models/password_reset_request_spec.rb +71 -0
- data/spec/models/password_reset_spec.rb +65 -0
- data/spec/models/payment_spec.rb +101 -0
- data/spec/models/payment_transaction_spec.rb +95 -0
- data/spec/models/ping_response_spec.rb +53 -0
- data/spec/models/price_break_spec.rb +59 -0
- data/spec/models/price_schedule_spec.rb +113 -0
- data/spec/models/product_assignment_spec.rb +83 -0
- data/spec/models/product_spec.rb +137 -0
- data/spec/models/promotion_assignment_spec.rb +71 -0
- data/spec/models/promotion_spec.rb +131 -0
- data/spec/models/security_profile_assignment_spec.rb +71 -0
- data/spec/models/security_profile_spec.rb +71 -0
- data/spec/models/shipment_item_spec.rb +65 -0
- data/spec/models/shipment_spec.rb +89 -0
- data/spec/models/spec_option_spec.rb +89 -0
- data/spec/models/spec_product_assignment_spec.rb +65 -0
- data/spec/models/spec_spec.rb +53 -0
- data/spec/models/spending_account_assignment_spec.rb +71 -0
- data/spec/models/spending_account_spec.rb +95 -0
- data/spec/models/user_group_assignment_spec.rb +59 -0
- data/spec/models/user_group_spec.rb +71 -0
- data/spec/models/user_spec.rb +107 -0
- data/spec/models/variant_spec.rb +77 -0
- data/spec/models/web_hook_route_spec.rb +65 -0
- data/spec/models/web_hook_spec.rb +113 -0
- data/spec/models/xp_index_spec.rb +59 -0
- data/spec/spec_helper.rb +122 -0
- metadata +757 -0
@@ -0,0 +1,1311 @@
|
|
1
|
+
=begin
|
2
|
+
#OrderCloud
|
3
|
+
|
4
|
+
#A full ecommerce backend as a service.
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
Contact: ordercloud@four51.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require "uri"
|
25
|
+
|
26
|
+
module OrderCloud
|
27
|
+
class ProductApi
|
28
|
+
attr_accessor :api_client
|
29
|
+
|
30
|
+
def initialize(api_client = ApiClient.default)
|
31
|
+
@api_client = api_client
|
32
|
+
end
|
33
|
+
|
34
|
+
#
|
35
|
+
#
|
36
|
+
# @param product
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Product]
|
39
|
+
def create(product, opts = {})
|
40
|
+
data, _status_code, _headers = create_with_http_info(product, opts)
|
41
|
+
return data
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
#
|
46
|
+
# @param product
|
47
|
+
# @param [Hash] opts the optional parameters
|
48
|
+
# @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
|
49
|
+
def create_with_http_info(product, opts = {})
|
50
|
+
if @api_client.config.debugging
|
51
|
+
@api_client.config.logger.debug "Calling API: ProductApi.create ..."
|
52
|
+
end
|
53
|
+
# verify the required parameter 'product' is set
|
54
|
+
fail ArgumentError, "Missing the required parameter 'product' when calling ProductApi.create" if product.nil?
|
55
|
+
# resource path
|
56
|
+
local_var_path = "/products".sub('{format}','json')
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = {}
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = {}
|
63
|
+
|
64
|
+
# HTTP header 'Accept' (if needed)
|
65
|
+
local_header_accept = ['application/json']
|
66
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
67
|
+
|
68
|
+
# HTTP header 'Content-Type'
|
69
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
70
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
71
|
+
|
72
|
+
# form parameters
|
73
|
+
form_params = {}
|
74
|
+
|
75
|
+
# http body (model)
|
76
|
+
post_body = @api_client.object_to_http_body(product)
|
77
|
+
auth_names = ['oauth2']
|
78
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
79
|
+
:header_params => header_params,
|
80
|
+
:query_params => query_params,
|
81
|
+
:form_params => form_params,
|
82
|
+
:body => post_body,
|
83
|
+
:auth_names => auth_names,
|
84
|
+
:return_type => 'Product')
|
85
|
+
if @api_client.config.debugging
|
86
|
+
@api_client.config.logger.debug "API called: ProductApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
87
|
+
end
|
88
|
+
return data, status_code, headers
|
89
|
+
end
|
90
|
+
|
91
|
+
#
|
92
|
+
#
|
93
|
+
# @param product_id ID of the product.
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @return [nil]
|
96
|
+
def delete(product_id, opts = {})
|
97
|
+
delete_with_http_info(product_id, opts)
|
98
|
+
return nil
|
99
|
+
end
|
100
|
+
|
101
|
+
#
|
102
|
+
#
|
103
|
+
# @param product_id ID of the product.
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
106
|
+
def delete_with_http_info(product_id, opts = {})
|
107
|
+
if @api_client.config.debugging
|
108
|
+
@api_client.config.logger.debug "Calling API: ProductApi.delete ..."
|
109
|
+
end
|
110
|
+
# verify the required parameter 'product_id' is set
|
111
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.delete" if product_id.nil?
|
112
|
+
# resource path
|
113
|
+
local_var_path = "/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = {}
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = {}
|
120
|
+
|
121
|
+
# HTTP header 'Accept' (if needed)
|
122
|
+
local_header_accept = ['application/json']
|
123
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
124
|
+
|
125
|
+
# HTTP header 'Content-Type'
|
126
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
127
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
128
|
+
|
129
|
+
# form parameters
|
130
|
+
form_params = {}
|
131
|
+
|
132
|
+
# http body (model)
|
133
|
+
post_body = nil
|
134
|
+
auth_names = ['oauth2']
|
135
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
136
|
+
:header_params => header_params,
|
137
|
+
:query_params => query_params,
|
138
|
+
:form_params => form_params,
|
139
|
+
:body => post_body,
|
140
|
+
:auth_names => auth_names)
|
141
|
+
if @api_client.config.debugging
|
142
|
+
@api_client.config.logger.debug "API called: ProductApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
143
|
+
end
|
144
|
+
return data, status_code, headers
|
145
|
+
end
|
146
|
+
|
147
|
+
#
|
148
|
+
#
|
149
|
+
# @param buyer_id ID of the buyer.
|
150
|
+
# @param product_id ID of the product.
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @option opts [String] :user_id ID of the user.
|
153
|
+
# @option opts [String] :user_group_id ID of the user group.
|
154
|
+
# @return [nil]
|
155
|
+
def delete_assignment(buyer_id, product_id, opts = {})
|
156
|
+
delete_assignment_with_http_info(buyer_id, product_id, opts)
|
157
|
+
return nil
|
158
|
+
end
|
159
|
+
|
160
|
+
#
|
161
|
+
#
|
162
|
+
# @param buyer_id ID of the buyer.
|
163
|
+
# @param product_id ID of the product.
|
164
|
+
# @param [Hash] opts the optional parameters
|
165
|
+
# @option opts [String] :user_id ID of the user.
|
166
|
+
# @option opts [String] :user_group_id ID of the user group.
|
167
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
168
|
+
def delete_assignment_with_http_info(buyer_id, product_id, opts = {})
|
169
|
+
if @api_client.config.debugging
|
170
|
+
@api_client.config.logger.debug "Calling API: ProductApi.delete_assignment ..."
|
171
|
+
end
|
172
|
+
# verify the required parameter 'buyer_id' is set
|
173
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ProductApi.delete_assignment" if buyer_id.nil?
|
174
|
+
# verify the required parameter 'product_id' is set
|
175
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.delete_assignment" if product_id.nil?
|
176
|
+
# resource path
|
177
|
+
local_var_path = "/products/{productID}/assignments/{buyerID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'productID' + '}', product_id.to_s)
|
178
|
+
|
179
|
+
# query parameters
|
180
|
+
query_params = {}
|
181
|
+
query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
182
|
+
query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
|
183
|
+
|
184
|
+
# header parameters
|
185
|
+
header_params = {}
|
186
|
+
|
187
|
+
# HTTP header 'Accept' (if needed)
|
188
|
+
local_header_accept = ['application/json']
|
189
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
190
|
+
|
191
|
+
# HTTP header 'Content-Type'
|
192
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
193
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
194
|
+
|
195
|
+
# form parameters
|
196
|
+
form_params = {}
|
197
|
+
|
198
|
+
# http body (model)
|
199
|
+
post_body = nil
|
200
|
+
auth_names = ['oauth2']
|
201
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names)
|
207
|
+
if @api_client.config.debugging
|
208
|
+
@api_client.config.logger.debug "API called: ProductApi#delete_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
209
|
+
end
|
210
|
+
return data, status_code, headers
|
211
|
+
end
|
212
|
+
|
213
|
+
#
|
214
|
+
#
|
215
|
+
# @param product_id ID of the product.
|
216
|
+
# @param [Hash] opts the optional parameters
|
217
|
+
# @option opts [BOOLEAN] :overwrite_existing Overwrite existing of the product.
|
218
|
+
# @return [Product]
|
219
|
+
def generate_variants(product_id, opts = {})
|
220
|
+
data, _status_code, _headers = generate_variants_with_http_info(product_id, opts)
|
221
|
+
return data
|
222
|
+
end
|
223
|
+
|
224
|
+
#
|
225
|
+
#
|
226
|
+
# @param product_id ID of the product.
|
227
|
+
# @param [Hash] opts the optional parameters
|
228
|
+
# @option opts [BOOLEAN] :overwrite_existing Overwrite existing of the product.
|
229
|
+
# @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
|
230
|
+
def generate_variants_with_http_info(product_id, opts = {})
|
231
|
+
if @api_client.config.debugging
|
232
|
+
@api_client.config.logger.debug "Calling API: ProductApi.generate_variants ..."
|
233
|
+
end
|
234
|
+
# verify the required parameter 'product_id' is set
|
235
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.generate_variants" if product_id.nil?
|
236
|
+
# resource path
|
237
|
+
local_var_path = "/products/{productID}/variants/generate".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
|
238
|
+
|
239
|
+
# query parameters
|
240
|
+
query_params = {}
|
241
|
+
query_params[:'overwriteExisting'] = opts[:'overwrite_existing'] if !opts[:'overwrite_existing'].nil?
|
242
|
+
|
243
|
+
# header parameters
|
244
|
+
header_params = {}
|
245
|
+
|
246
|
+
# HTTP header 'Accept' (if needed)
|
247
|
+
local_header_accept = ['application/json']
|
248
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
249
|
+
|
250
|
+
# HTTP header 'Content-Type'
|
251
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
252
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
253
|
+
|
254
|
+
# form parameters
|
255
|
+
form_params = {}
|
256
|
+
|
257
|
+
# http body (model)
|
258
|
+
post_body = nil
|
259
|
+
auth_names = ['oauth2']
|
260
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
261
|
+
:header_params => header_params,
|
262
|
+
:query_params => query_params,
|
263
|
+
:form_params => form_params,
|
264
|
+
:body => post_body,
|
265
|
+
:auth_names => auth_names,
|
266
|
+
:return_type => 'Product')
|
267
|
+
if @api_client.config.debugging
|
268
|
+
@api_client.config.logger.debug "API called: ProductApi#generate_variants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
269
|
+
end
|
270
|
+
return data, status_code, headers
|
271
|
+
end
|
272
|
+
|
273
|
+
#
|
274
|
+
#
|
275
|
+
# @param product_id ID of the product.
|
276
|
+
# @param [Hash] opts the optional parameters
|
277
|
+
# @return [Product]
|
278
|
+
def get(product_id, opts = {})
|
279
|
+
data, _status_code, _headers = get_with_http_info(product_id, opts)
|
280
|
+
return data
|
281
|
+
end
|
282
|
+
|
283
|
+
#
|
284
|
+
#
|
285
|
+
# @param product_id ID of the product.
|
286
|
+
# @param [Hash] opts the optional parameters
|
287
|
+
# @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
|
288
|
+
def get_with_http_info(product_id, opts = {})
|
289
|
+
if @api_client.config.debugging
|
290
|
+
@api_client.config.logger.debug "Calling API: ProductApi.get ..."
|
291
|
+
end
|
292
|
+
# verify the required parameter 'product_id' is set
|
293
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.get" if product_id.nil?
|
294
|
+
# resource path
|
295
|
+
local_var_path = "/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
|
296
|
+
|
297
|
+
# query parameters
|
298
|
+
query_params = {}
|
299
|
+
|
300
|
+
# header parameters
|
301
|
+
header_params = {}
|
302
|
+
|
303
|
+
# HTTP header 'Accept' (if needed)
|
304
|
+
local_header_accept = ['application/json']
|
305
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
306
|
+
|
307
|
+
# HTTP header 'Content-Type'
|
308
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
309
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
310
|
+
|
311
|
+
# form parameters
|
312
|
+
form_params = {}
|
313
|
+
|
314
|
+
# http body (model)
|
315
|
+
post_body = nil
|
316
|
+
auth_names = ['oauth2']
|
317
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
318
|
+
:header_params => header_params,
|
319
|
+
:query_params => query_params,
|
320
|
+
:form_params => form_params,
|
321
|
+
:body => post_body,
|
322
|
+
:auth_names => auth_names,
|
323
|
+
:return_type => 'Product')
|
324
|
+
if @api_client.config.debugging
|
325
|
+
@api_client.config.logger.debug "API called: ProductApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
326
|
+
end
|
327
|
+
return data, status_code, headers
|
328
|
+
end
|
329
|
+
|
330
|
+
#
|
331
|
+
#
|
332
|
+
# @param product_id ID of the product.
|
333
|
+
# @param [Hash] opts the optional parameters
|
334
|
+
# @return [Inventory]
|
335
|
+
def get_inventory(product_id, opts = {})
|
336
|
+
data, _status_code, _headers = get_inventory_with_http_info(product_id, opts)
|
337
|
+
return data
|
338
|
+
end
|
339
|
+
|
340
|
+
#
|
341
|
+
#
|
342
|
+
# @param product_id ID of the product.
|
343
|
+
# @param [Hash] opts the optional parameters
|
344
|
+
# @return [Array<(Inventory, Fixnum, Hash)>] Inventory data, response status code and response headers
|
345
|
+
def get_inventory_with_http_info(product_id, opts = {})
|
346
|
+
if @api_client.config.debugging
|
347
|
+
@api_client.config.logger.debug "Calling API: ProductApi.get_inventory ..."
|
348
|
+
end
|
349
|
+
# verify the required parameter 'product_id' is set
|
350
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.get_inventory" if product_id.nil?
|
351
|
+
# resource path
|
352
|
+
local_var_path = "/products/{productID}/inventory".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
|
353
|
+
|
354
|
+
# query parameters
|
355
|
+
query_params = {}
|
356
|
+
|
357
|
+
# header parameters
|
358
|
+
header_params = {}
|
359
|
+
|
360
|
+
# HTTP header 'Accept' (if needed)
|
361
|
+
local_header_accept = ['application/json']
|
362
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
363
|
+
|
364
|
+
# HTTP header 'Content-Type'
|
365
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
366
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
367
|
+
|
368
|
+
# form parameters
|
369
|
+
form_params = {}
|
370
|
+
|
371
|
+
# http body (model)
|
372
|
+
post_body = nil
|
373
|
+
auth_names = ['oauth2']
|
374
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
375
|
+
:header_params => header_params,
|
376
|
+
:query_params => query_params,
|
377
|
+
:form_params => form_params,
|
378
|
+
:body => post_body,
|
379
|
+
:auth_names => auth_names,
|
380
|
+
:return_type => 'Inventory')
|
381
|
+
if @api_client.config.debugging
|
382
|
+
@api_client.config.logger.debug "API called: ProductApi#get_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
383
|
+
end
|
384
|
+
return data, status_code, headers
|
385
|
+
end
|
386
|
+
|
387
|
+
#
|
388
|
+
#
|
389
|
+
# @param product_id ID of the product.
|
390
|
+
# @param variant_id ID of the variant.
|
391
|
+
# @param [Hash] opts the optional parameters
|
392
|
+
# @return [Variant]
|
393
|
+
def get_variant(product_id, variant_id, opts = {})
|
394
|
+
data, _status_code, _headers = get_variant_with_http_info(product_id, variant_id, opts)
|
395
|
+
return data
|
396
|
+
end
|
397
|
+
|
398
|
+
#
|
399
|
+
#
|
400
|
+
# @param product_id ID of the product.
|
401
|
+
# @param variant_id ID of the variant.
|
402
|
+
# @param [Hash] opts the optional parameters
|
403
|
+
# @return [Array<(Variant, Fixnum, Hash)>] Variant data, response status code and response headers
|
404
|
+
def get_variant_with_http_info(product_id, variant_id, opts = {})
|
405
|
+
if @api_client.config.debugging
|
406
|
+
@api_client.config.logger.debug "Calling API: ProductApi.get_variant ..."
|
407
|
+
end
|
408
|
+
# verify the required parameter 'product_id' is set
|
409
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.get_variant" if product_id.nil?
|
410
|
+
# verify the required parameter 'variant_id' is set
|
411
|
+
fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.get_variant" if variant_id.nil?
|
412
|
+
# resource path
|
413
|
+
local_var_path = "/products/{productID}/variants/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
|
414
|
+
|
415
|
+
# query parameters
|
416
|
+
query_params = {}
|
417
|
+
|
418
|
+
# header parameters
|
419
|
+
header_params = {}
|
420
|
+
|
421
|
+
# HTTP header 'Accept' (if needed)
|
422
|
+
local_header_accept = ['application/json']
|
423
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
424
|
+
|
425
|
+
# HTTP header 'Content-Type'
|
426
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
427
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
428
|
+
|
429
|
+
# form parameters
|
430
|
+
form_params = {}
|
431
|
+
|
432
|
+
# http body (model)
|
433
|
+
post_body = nil
|
434
|
+
auth_names = ['oauth2']
|
435
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
436
|
+
:header_params => header_params,
|
437
|
+
:query_params => query_params,
|
438
|
+
:form_params => form_params,
|
439
|
+
:body => post_body,
|
440
|
+
:auth_names => auth_names,
|
441
|
+
:return_type => 'Variant')
|
442
|
+
if @api_client.config.debugging
|
443
|
+
@api_client.config.logger.debug "API called: ProductApi#get_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
444
|
+
end
|
445
|
+
return data, status_code, headers
|
446
|
+
end
|
447
|
+
|
448
|
+
#
|
449
|
+
#
|
450
|
+
# @param product_id ID of the product.
|
451
|
+
# @param variant_id ID of the variant.
|
452
|
+
# @param [Hash] opts the optional parameters
|
453
|
+
# @return [Inventory]
|
454
|
+
def get_variant_inventory(product_id, variant_id, opts = {})
|
455
|
+
data, _status_code, _headers = get_variant_inventory_with_http_info(product_id, variant_id, opts)
|
456
|
+
return data
|
457
|
+
end
|
458
|
+
|
459
|
+
#
|
460
|
+
#
|
461
|
+
# @param product_id ID of the product.
|
462
|
+
# @param variant_id ID of the variant.
|
463
|
+
# @param [Hash] opts the optional parameters
|
464
|
+
# @return [Array<(Inventory, Fixnum, Hash)>] Inventory data, response status code and response headers
|
465
|
+
def get_variant_inventory_with_http_info(product_id, variant_id, opts = {})
|
466
|
+
if @api_client.config.debugging
|
467
|
+
@api_client.config.logger.debug "Calling API: ProductApi.get_variant_inventory ..."
|
468
|
+
end
|
469
|
+
# verify the required parameter 'product_id' is set
|
470
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.get_variant_inventory" if product_id.nil?
|
471
|
+
# verify the required parameter 'variant_id' is set
|
472
|
+
fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.get_variant_inventory" if variant_id.nil?
|
473
|
+
# resource path
|
474
|
+
local_var_path = "/products/{productID}/variants/inventory/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
|
475
|
+
|
476
|
+
# query parameters
|
477
|
+
query_params = {}
|
478
|
+
|
479
|
+
# header parameters
|
480
|
+
header_params = {}
|
481
|
+
|
482
|
+
# HTTP header 'Accept' (if needed)
|
483
|
+
local_header_accept = ['application/json']
|
484
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
485
|
+
|
486
|
+
# HTTP header 'Content-Type'
|
487
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
488
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
489
|
+
|
490
|
+
# form parameters
|
491
|
+
form_params = {}
|
492
|
+
|
493
|
+
# http body (model)
|
494
|
+
post_body = nil
|
495
|
+
auth_names = ['oauth2']
|
496
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
497
|
+
:header_params => header_params,
|
498
|
+
:query_params => query_params,
|
499
|
+
:form_params => form_params,
|
500
|
+
:body => post_body,
|
501
|
+
:auth_names => auth_names,
|
502
|
+
:return_type => 'Inventory')
|
503
|
+
if @api_client.config.debugging
|
504
|
+
@api_client.config.logger.debug "API called: ProductApi#get_variant_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
505
|
+
end
|
506
|
+
return data, status_code, headers
|
507
|
+
end
|
508
|
+
|
509
|
+
#
|
510
|
+
#
|
511
|
+
# @param [Hash] opts the optional parameters
|
512
|
+
# @option opts [String] :search Word or phrase to search for.
|
513
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
514
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
515
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
516
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
517
|
+
# @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
|
518
|
+
# @return [ListProduct]
|
519
|
+
def list(opts = {})
|
520
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
521
|
+
return data
|
522
|
+
end
|
523
|
+
|
524
|
+
#
|
525
|
+
#
|
526
|
+
# @param [Hash] opts the optional parameters
|
527
|
+
# @option opts [String] :search Word or phrase to search for.
|
528
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
529
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
530
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
531
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
532
|
+
# @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
|
533
|
+
# @return [Array<(ListProduct, Fixnum, Hash)>] ListProduct data, response status code and response headers
|
534
|
+
def list_with_http_info(opts = {})
|
535
|
+
if @api_client.config.debugging
|
536
|
+
@api_client.config.logger.debug "Calling API: ProductApi.list ..."
|
537
|
+
end
|
538
|
+
# resource path
|
539
|
+
local_var_path = "/products".sub('{format}','json')
|
540
|
+
|
541
|
+
# query parameters
|
542
|
+
query_params = {}
|
543
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
544
|
+
query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
|
545
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
546
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
547
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
548
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
549
|
+
|
550
|
+
# header parameters
|
551
|
+
header_params = {}
|
552
|
+
|
553
|
+
# HTTP header 'Accept' (if needed)
|
554
|
+
local_header_accept = ['application/json']
|
555
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
556
|
+
|
557
|
+
# HTTP header 'Content-Type'
|
558
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
559
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
560
|
+
|
561
|
+
# form parameters
|
562
|
+
form_params = {}
|
563
|
+
|
564
|
+
# http body (model)
|
565
|
+
post_body = nil
|
566
|
+
auth_names = ['oauth2']
|
567
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
568
|
+
:header_params => header_params,
|
569
|
+
:query_params => query_params,
|
570
|
+
:form_params => form_params,
|
571
|
+
:body => post_body,
|
572
|
+
:auth_names => auth_names,
|
573
|
+
:return_type => 'ListProduct')
|
574
|
+
if @api_client.config.debugging
|
575
|
+
@api_client.config.logger.debug "API called: ProductApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
576
|
+
end
|
577
|
+
return data, status_code, headers
|
578
|
+
end
|
579
|
+
|
580
|
+
#
|
581
|
+
#
|
582
|
+
# @param [Hash] opts the optional parameters
|
583
|
+
# @option opts [String] :product_id ID of the product.
|
584
|
+
# @option opts [String] :buyer_id ID of the buyer.
|
585
|
+
# @option opts [String] :user_id ID of the user.
|
586
|
+
# @option opts [String] :user_group_id ID of the user group.
|
587
|
+
# @option opts [String] :level Level of the product.
|
588
|
+
# @option opts [String] :price_schedule_id ID of the price schedule.
|
589
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
590
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
591
|
+
# @return [ListProductAssignment]
|
592
|
+
def list_assignments(opts = {})
|
593
|
+
data, _status_code, _headers = list_assignments_with_http_info(opts)
|
594
|
+
return data
|
595
|
+
end
|
596
|
+
|
597
|
+
#
|
598
|
+
#
|
599
|
+
# @param [Hash] opts the optional parameters
|
600
|
+
# @option opts [String] :product_id ID of the product.
|
601
|
+
# @option opts [String] :buyer_id ID of the buyer.
|
602
|
+
# @option opts [String] :user_id ID of the user.
|
603
|
+
# @option opts [String] :user_group_id ID of the user group.
|
604
|
+
# @option opts [String] :level Level of the product.
|
605
|
+
# @option opts [String] :price_schedule_id ID of the price schedule.
|
606
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
607
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
608
|
+
# @return [Array<(ListProductAssignment, Fixnum, Hash)>] ListProductAssignment data, response status code and response headers
|
609
|
+
def list_assignments_with_http_info(opts = {})
|
610
|
+
if @api_client.config.debugging
|
611
|
+
@api_client.config.logger.debug "Calling API: ProductApi.list_assignments ..."
|
612
|
+
end
|
613
|
+
# resource path
|
614
|
+
local_var_path = "/products/assignments".sub('{format}','json')
|
615
|
+
|
616
|
+
# query parameters
|
617
|
+
query_params = {}
|
618
|
+
query_params[:'productID'] = opts[:'product_id'] if !opts[:'product_id'].nil?
|
619
|
+
query_params[:'buyerID'] = opts[:'buyer_id'] if !opts[:'buyer_id'].nil?
|
620
|
+
query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
621
|
+
query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
|
622
|
+
query_params[:'level'] = opts[:'level'] if !opts[:'level'].nil?
|
623
|
+
query_params[:'priceScheduleID'] = opts[:'price_schedule_id'] if !opts[:'price_schedule_id'].nil?
|
624
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
625
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
626
|
+
|
627
|
+
# header parameters
|
628
|
+
header_params = {}
|
629
|
+
|
630
|
+
# HTTP header 'Accept' (if needed)
|
631
|
+
local_header_accept = ['application/json']
|
632
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
633
|
+
|
634
|
+
# HTTP header 'Content-Type'
|
635
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
636
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
637
|
+
|
638
|
+
# form parameters
|
639
|
+
form_params = {}
|
640
|
+
|
641
|
+
# http body (model)
|
642
|
+
post_body = nil
|
643
|
+
auth_names = ['oauth2']
|
644
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
645
|
+
:header_params => header_params,
|
646
|
+
:query_params => query_params,
|
647
|
+
:form_params => form_params,
|
648
|
+
:body => post_body,
|
649
|
+
:auth_names => auth_names,
|
650
|
+
:return_type => 'ListProductAssignment')
|
651
|
+
if @api_client.config.debugging
|
652
|
+
@api_client.config.logger.debug "API called: ProductApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
653
|
+
end
|
654
|
+
return data, status_code, headers
|
655
|
+
end
|
656
|
+
|
657
|
+
#
|
658
|
+
#
|
659
|
+
# @param [Hash] opts the optional parameters
|
660
|
+
# @option opts [String] :search Word or phrase to search for.
|
661
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
662
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
663
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
664
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
665
|
+
# @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
|
666
|
+
# @return [ListInventory]
|
667
|
+
def list_inventory(opts = {})
|
668
|
+
data, _status_code, _headers = list_inventory_with_http_info(opts)
|
669
|
+
return data
|
670
|
+
end
|
671
|
+
|
672
|
+
#
|
673
|
+
#
|
674
|
+
# @param [Hash] opts the optional parameters
|
675
|
+
# @option opts [String] :search Word or phrase to search for.
|
676
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
677
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
678
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
679
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
680
|
+
# @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
|
681
|
+
# @return [Array<(ListInventory, Fixnum, Hash)>] ListInventory data, response status code and response headers
|
682
|
+
def list_inventory_with_http_info(opts = {})
|
683
|
+
if @api_client.config.debugging
|
684
|
+
@api_client.config.logger.debug "Calling API: ProductApi.list_inventory ..."
|
685
|
+
end
|
686
|
+
# resource path
|
687
|
+
local_var_path = "/products/inventory".sub('{format}','json')
|
688
|
+
|
689
|
+
# query parameters
|
690
|
+
query_params = {}
|
691
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
692
|
+
query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
|
693
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
694
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
695
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
696
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
697
|
+
|
698
|
+
# header parameters
|
699
|
+
header_params = {}
|
700
|
+
|
701
|
+
# HTTP header 'Accept' (if needed)
|
702
|
+
local_header_accept = ['application/json']
|
703
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
704
|
+
|
705
|
+
# HTTP header 'Content-Type'
|
706
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
707
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
708
|
+
|
709
|
+
# form parameters
|
710
|
+
form_params = {}
|
711
|
+
|
712
|
+
# http body (model)
|
713
|
+
post_body = nil
|
714
|
+
auth_names = ['oauth2']
|
715
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
716
|
+
:header_params => header_params,
|
717
|
+
:query_params => query_params,
|
718
|
+
:form_params => form_params,
|
719
|
+
:body => post_body,
|
720
|
+
:auth_names => auth_names,
|
721
|
+
:return_type => 'ListInventory')
|
722
|
+
if @api_client.config.debugging
|
723
|
+
@api_client.config.logger.debug "API called: ProductApi#list_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
724
|
+
end
|
725
|
+
return data, status_code, headers
|
726
|
+
end
|
727
|
+
|
728
|
+
#
|
729
|
+
#
|
730
|
+
# @param product_id ID of the product.
|
731
|
+
# @param [Hash] opts the optional parameters
|
732
|
+
# @option opts [String] :search Word or phrase to search for.
|
733
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
734
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
735
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
736
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
737
|
+
# @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
|
738
|
+
# @return [ListInventory]
|
739
|
+
def list_variant_inventory(product_id, opts = {})
|
740
|
+
data, _status_code, _headers = list_variant_inventory_with_http_info(product_id, opts)
|
741
|
+
return data
|
742
|
+
end
|
743
|
+
|
744
|
+
#
|
745
|
+
#
|
746
|
+
# @param product_id ID of the product.
|
747
|
+
# @param [Hash] opts the optional parameters
|
748
|
+
# @option opts [String] :search Word or phrase to search for.
|
749
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
750
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
751
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
752
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
753
|
+
# @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
|
754
|
+
# @return [Array<(ListInventory, Fixnum, Hash)>] ListInventory data, response status code and response headers
|
755
|
+
def list_variant_inventory_with_http_info(product_id, opts = {})
|
756
|
+
if @api_client.config.debugging
|
757
|
+
@api_client.config.logger.debug "Calling API: ProductApi.list_variant_inventory ..."
|
758
|
+
end
|
759
|
+
# verify the required parameter 'product_id' is set
|
760
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.list_variant_inventory" if product_id.nil?
|
761
|
+
# resource path
|
762
|
+
local_var_path = "/products/{productID}/variants/inventory".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
|
763
|
+
|
764
|
+
# query parameters
|
765
|
+
query_params = {}
|
766
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
767
|
+
query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
|
768
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
769
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
770
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
771
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
772
|
+
|
773
|
+
# header parameters
|
774
|
+
header_params = {}
|
775
|
+
|
776
|
+
# HTTP header 'Accept' (if needed)
|
777
|
+
local_header_accept = ['application/json']
|
778
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
779
|
+
|
780
|
+
# HTTP header 'Content-Type'
|
781
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
782
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
783
|
+
|
784
|
+
# form parameters
|
785
|
+
form_params = {}
|
786
|
+
|
787
|
+
# http body (model)
|
788
|
+
post_body = nil
|
789
|
+
auth_names = ['oauth2']
|
790
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
791
|
+
:header_params => header_params,
|
792
|
+
:query_params => query_params,
|
793
|
+
:form_params => form_params,
|
794
|
+
:body => post_body,
|
795
|
+
:auth_names => auth_names,
|
796
|
+
:return_type => 'ListInventory')
|
797
|
+
if @api_client.config.debugging
|
798
|
+
@api_client.config.logger.debug "API called: ProductApi#list_variant_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
799
|
+
end
|
800
|
+
return data, status_code, headers
|
801
|
+
end
|
802
|
+
|
803
|
+
#
|
804
|
+
#
|
805
|
+
# @param product_id ID of the product.
|
806
|
+
# @param [Hash] opts the optional parameters
|
807
|
+
# @option opts [String] :search Word or phrase to search for.
|
808
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
809
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
810
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
811
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
812
|
+
# @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
|
813
|
+
# @return [ListVariant]
|
814
|
+
def list_variants(product_id, opts = {})
|
815
|
+
data, _status_code, _headers = list_variants_with_http_info(product_id, opts)
|
816
|
+
return data
|
817
|
+
end
|
818
|
+
|
819
|
+
#
|
820
|
+
#
|
821
|
+
# @param product_id ID of the product.
|
822
|
+
# @param [Hash] opts the optional parameters
|
823
|
+
# @option opts [String] :search Word or phrase to search for.
|
824
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
825
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
826
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
827
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
828
|
+
# @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
|
829
|
+
# @return [Array<(ListVariant, Fixnum, Hash)>] ListVariant data, response status code and response headers
|
830
|
+
def list_variants_with_http_info(product_id, opts = {})
|
831
|
+
if @api_client.config.debugging
|
832
|
+
@api_client.config.logger.debug "Calling API: ProductApi.list_variants ..."
|
833
|
+
end
|
834
|
+
# verify the required parameter 'product_id' is set
|
835
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.list_variants" if product_id.nil?
|
836
|
+
# resource path
|
837
|
+
local_var_path = "/products/{productID}/variants".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
|
838
|
+
|
839
|
+
# query parameters
|
840
|
+
query_params = {}
|
841
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
842
|
+
query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
|
843
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
844
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
845
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
846
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
847
|
+
|
848
|
+
# header parameters
|
849
|
+
header_params = {}
|
850
|
+
|
851
|
+
# HTTP header 'Accept' (if needed)
|
852
|
+
local_header_accept = ['application/json']
|
853
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
854
|
+
|
855
|
+
# HTTP header 'Content-Type'
|
856
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
857
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
858
|
+
|
859
|
+
# form parameters
|
860
|
+
form_params = {}
|
861
|
+
|
862
|
+
# http body (model)
|
863
|
+
post_body = nil
|
864
|
+
auth_names = ['oauth2']
|
865
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
866
|
+
:header_params => header_params,
|
867
|
+
:query_params => query_params,
|
868
|
+
:form_params => form_params,
|
869
|
+
:body => post_body,
|
870
|
+
:auth_names => auth_names,
|
871
|
+
:return_type => 'ListVariant')
|
872
|
+
if @api_client.config.debugging
|
873
|
+
@api_client.config.logger.debug "API called: ProductApi#list_variants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
874
|
+
end
|
875
|
+
return data, status_code, headers
|
876
|
+
end
|
877
|
+
|
878
|
+
#
|
879
|
+
#
|
880
|
+
# @param product_id ID of the product.
|
881
|
+
# @param product
|
882
|
+
# @param [Hash] opts the optional parameters
|
883
|
+
# @return [nil]
|
884
|
+
def patch(product_id, product, opts = {})
|
885
|
+
patch_with_http_info(product_id, product, opts)
|
886
|
+
return nil
|
887
|
+
end
|
888
|
+
|
889
|
+
#
|
890
|
+
#
|
891
|
+
# @param product_id ID of the product.
|
892
|
+
# @param product
|
893
|
+
# @param [Hash] opts the optional parameters
|
894
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
895
|
+
def patch_with_http_info(product_id, product, opts = {})
|
896
|
+
if @api_client.config.debugging
|
897
|
+
@api_client.config.logger.debug "Calling API: ProductApi.patch ..."
|
898
|
+
end
|
899
|
+
# verify the required parameter 'product_id' is set
|
900
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.patch" if product_id.nil?
|
901
|
+
# verify the required parameter 'product' is set
|
902
|
+
fail ArgumentError, "Missing the required parameter 'product' when calling ProductApi.patch" if product.nil?
|
903
|
+
# resource path
|
904
|
+
local_var_path = "/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
|
905
|
+
|
906
|
+
# query parameters
|
907
|
+
query_params = {}
|
908
|
+
|
909
|
+
# header parameters
|
910
|
+
header_params = {}
|
911
|
+
|
912
|
+
# HTTP header 'Accept' (if needed)
|
913
|
+
local_header_accept = ['application/json']
|
914
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
915
|
+
|
916
|
+
# HTTP header 'Content-Type'
|
917
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
918
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
919
|
+
|
920
|
+
# form parameters
|
921
|
+
form_params = {}
|
922
|
+
|
923
|
+
# http body (model)
|
924
|
+
post_body = @api_client.object_to_http_body(product)
|
925
|
+
auth_names = ['oauth2']
|
926
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
927
|
+
:header_params => header_params,
|
928
|
+
:query_params => query_params,
|
929
|
+
:form_params => form_params,
|
930
|
+
:body => post_body,
|
931
|
+
:auth_names => auth_names)
|
932
|
+
if @api_client.config.debugging
|
933
|
+
@api_client.config.logger.debug "API called: ProductApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
934
|
+
end
|
935
|
+
return data, status_code, headers
|
936
|
+
end
|
937
|
+
|
938
|
+
#
|
939
|
+
#
|
940
|
+
# @param product_id ID of the product.
|
941
|
+
# @param variant_id ID of the variant.
|
942
|
+
# @param variant
|
943
|
+
# @param [Hash] opts the optional parameters
|
944
|
+
# @return [Variant]
|
945
|
+
def patch_variant(product_id, variant_id, variant, opts = {})
|
946
|
+
data, _status_code, _headers = patch_variant_with_http_info(product_id, variant_id, variant, opts)
|
947
|
+
return data
|
948
|
+
end
|
949
|
+
|
950
|
+
#
|
951
|
+
#
|
952
|
+
# @param product_id ID of the product.
|
953
|
+
# @param variant_id ID of the variant.
|
954
|
+
# @param variant
|
955
|
+
# @param [Hash] opts the optional parameters
|
956
|
+
# @return [Array<(Variant, Fixnum, Hash)>] Variant data, response status code and response headers
|
957
|
+
def patch_variant_with_http_info(product_id, variant_id, variant, opts = {})
|
958
|
+
if @api_client.config.debugging
|
959
|
+
@api_client.config.logger.debug "Calling API: ProductApi.patch_variant ..."
|
960
|
+
end
|
961
|
+
# verify the required parameter 'product_id' is set
|
962
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.patch_variant" if product_id.nil?
|
963
|
+
# verify the required parameter 'variant_id' is set
|
964
|
+
fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.patch_variant" if variant_id.nil?
|
965
|
+
# verify the required parameter 'variant' is set
|
966
|
+
fail ArgumentError, "Missing the required parameter 'variant' when calling ProductApi.patch_variant" if variant.nil?
|
967
|
+
# resource path
|
968
|
+
local_var_path = "/products/{productID}/variants/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
|
969
|
+
|
970
|
+
# query parameters
|
971
|
+
query_params = {}
|
972
|
+
|
973
|
+
# header parameters
|
974
|
+
header_params = {}
|
975
|
+
|
976
|
+
# HTTP header 'Accept' (if needed)
|
977
|
+
local_header_accept = ['application/json']
|
978
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
979
|
+
|
980
|
+
# HTTP header 'Content-Type'
|
981
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
982
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
983
|
+
|
984
|
+
# form parameters
|
985
|
+
form_params = {}
|
986
|
+
|
987
|
+
# http body (model)
|
988
|
+
post_body = @api_client.object_to_http_body(variant)
|
989
|
+
auth_names = ['oauth2']
|
990
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
991
|
+
:header_params => header_params,
|
992
|
+
:query_params => query_params,
|
993
|
+
:form_params => form_params,
|
994
|
+
:body => post_body,
|
995
|
+
:auth_names => auth_names,
|
996
|
+
:return_type => 'Variant')
|
997
|
+
if @api_client.config.debugging
|
998
|
+
@api_client.config.logger.debug "API called: ProductApi#patch_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
999
|
+
end
|
1000
|
+
return data, status_code, headers
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
#
|
1004
|
+
#
|
1005
|
+
# @param product_assignment
|
1006
|
+
# @param [Hash] opts the optional parameters
|
1007
|
+
# @return [nil]
|
1008
|
+
def save_assignment(product_assignment, opts = {})
|
1009
|
+
save_assignment_with_http_info(product_assignment, opts)
|
1010
|
+
return nil
|
1011
|
+
end
|
1012
|
+
|
1013
|
+
#
|
1014
|
+
#
|
1015
|
+
# @param product_assignment
|
1016
|
+
# @param [Hash] opts the optional parameters
|
1017
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
1018
|
+
def save_assignment_with_http_info(product_assignment, opts = {})
|
1019
|
+
if @api_client.config.debugging
|
1020
|
+
@api_client.config.logger.debug "Calling API: ProductApi.save_assignment ..."
|
1021
|
+
end
|
1022
|
+
# verify the required parameter 'product_assignment' is set
|
1023
|
+
fail ArgumentError, "Missing the required parameter 'product_assignment' when calling ProductApi.save_assignment" if product_assignment.nil?
|
1024
|
+
# resource path
|
1025
|
+
local_var_path = "/products/assignments".sub('{format}','json')
|
1026
|
+
|
1027
|
+
# query parameters
|
1028
|
+
query_params = {}
|
1029
|
+
|
1030
|
+
# header parameters
|
1031
|
+
header_params = {}
|
1032
|
+
|
1033
|
+
# HTTP header 'Accept' (if needed)
|
1034
|
+
local_header_accept = ['application/json']
|
1035
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1036
|
+
|
1037
|
+
# HTTP header 'Content-Type'
|
1038
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1039
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1040
|
+
|
1041
|
+
# form parameters
|
1042
|
+
form_params = {}
|
1043
|
+
|
1044
|
+
# http body (model)
|
1045
|
+
post_body = @api_client.object_to_http_body(product_assignment)
|
1046
|
+
auth_names = ['oauth2']
|
1047
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1048
|
+
:header_params => header_params,
|
1049
|
+
:query_params => query_params,
|
1050
|
+
:form_params => form_params,
|
1051
|
+
:body => post_body,
|
1052
|
+
:auth_names => auth_names)
|
1053
|
+
if @api_client.config.debugging
|
1054
|
+
@api_client.config.logger.debug "API called: ProductApi#save_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1055
|
+
end
|
1056
|
+
return data, status_code, headers
|
1057
|
+
end
|
1058
|
+
|
1059
|
+
#
|
1060
|
+
#
|
1061
|
+
# @param product_id ID of the product.
|
1062
|
+
# @param product
|
1063
|
+
# @param [Hash] opts the optional parameters
|
1064
|
+
# @return [Product]
|
1065
|
+
def update(product_id, product, opts = {})
|
1066
|
+
data, _status_code, _headers = update_with_http_info(product_id, product, opts)
|
1067
|
+
return data
|
1068
|
+
end
|
1069
|
+
|
1070
|
+
#
|
1071
|
+
#
|
1072
|
+
# @param product_id ID of the product.
|
1073
|
+
# @param product
|
1074
|
+
# @param [Hash] opts the optional parameters
|
1075
|
+
# @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
|
1076
|
+
def update_with_http_info(product_id, product, opts = {})
|
1077
|
+
if @api_client.config.debugging
|
1078
|
+
@api_client.config.logger.debug "Calling API: ProductApi.update ..."
|
1079
|
+
end
|
1080
|
+
# verify the required parameter 'product_id' is set
|
1081
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.update" if product_id.nil?
|
1082
|
+
# verify the required parameter 'product' is set
|
1083
|
+
fail ArgumentError, "Missing the required parameter 'product' when calling ProductApi.update" if product.nil?
|
1084
|
+
# resource path
|
1085
|
+
local_var_path = "/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
|
1086
|
+
|
1087
|
+
# query parameters
|
1088
|
+
query_params = {}
|
1089
|
+
|
1090
|
+
# header parameters
|
1091
|
+
header_params = {}
|
1092
|
+
|
1093
|
+
# HTTP header 'Accept' (if needed)
|
1094
|
+
local_header_accept = ['application/json']
|
1095
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1096
|
+
|
1097
|
+
# HTTP header 'Content-Type'
|
1098
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1099
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1100
|
+
|
1101
|
+
# form parameters
|
1102
|
+
form_params = {}
|
1103
|
+
|
1104
|
+
# http body (model)
|
1105
|
+
post_body = @api_client.object_to_http_body(product)
|
1106
|
+
auth_names = ['oauth2']
|
1107
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1108
|
+
:header_params => header_params,
|
1109
|
+
:query_params => query_params,
|
1110
|
+
:form_params => form_params,
|
1111
|
+
:body => post_body,
|
1112
|
+
:auth_names => auth_names,
|
1113
|
+
:return_type => 'Product')
|
1114
|
+
if @api_client.config.debugging
|
1115
|
+
@api_client.config.logger.debug "API called: ProductApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1116
|
+
end
|
1117
|
+
return data, status_code, headers
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
#
|
1121
|
+
#
|
1122
|
+
# @param product_id ID of the product.
|
1123
|
+
# @param inventory Inventory of the product.
|
1124
|
+
# @param [Hash] opts the optional parameters
|
1125
|
+
# @return [Inventory]
|
1126
|
+
def update_inventory(product_id, inventory, opts = {})
|
1127
|
+
data, _status_code, _headers = update_inventory_with_http_info(product_id, inventory, opts)
|
1128
|
+
return data
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
#
|
1132
|
+
#
|
1133
|
+
# @param product_id ID of the product.
|
1134
|
+
# @param inventory Inventory of the product.
|
1135
|
+
# @param [Hash] opts the optional parameters
|
1136
|
+
# @return [Array<(Inventory, Fixnum, Hash)>] Inventory data, response status code and response headers
|
1137
|
+
def update_inventory_with_http_info(product_id, inventory, opts = {})
|
1138
|
+
if @api_client.config.debugging
|
1139
|
+
@api_client.config.logger.debug "Calling API: ProductApi.update_inventory ..."
|
1140
|
+
end
|
1141
|
+
# verify the required parameter 'product_id' is set
|
1142
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.update_inventory" if product_id.nil?
|
1143
|
+
# verify the required parameter 'inventory' is set
|
1144
|
+
fail ArgumentError, "Missing the required parameter 'inventory' when calling ProductApi.update_inventory" if inventory.nil?
|
1145
|
+
# resource path
|
1146
|
+
local_var_path = "/products/{productID}/inventory/{inventory}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'inventory' + '}', inventory.to_s)
|
1147
|
+
|
1148
|
+
# query parameters
|
1149
|
+
query_params = {}
|
1150
|
+
|
1151
|
+
# header parameters
|
1152
|
+
header_params = {}
|
1153
|
+
|
1154
|
+
# HTTP header 'Accept' (if needed)
|
1155
|
+
local_header_accept = ['application/json']
|
1156
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1157
|
+
|
1158
|
+
# HTTP header 'Content-Type'
|
1159
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1160
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1161
|
+
|
1162
|
+
# form parameters
|
1163
|
+
form_params = {}
|
1164
|
+
|
1165
|
+
# http body (model)
|
1166
|
+
post_body = nil
|
1167
|
+
auth_names = ['oauth2']
|
1168
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1169
|
+
:header_params => header_params,
|
1170
|
+
:query_params => query_params,
|
1171
|
+
:form_params => form_params,
|
1172
|
+
:body => post_body,
|
1173
|
+
:auth_names => auth_names,
|
1174
|
+
:return_type => 'Inventory')
|
1175
|
+
if @api_client.config.debugging
|
1176
|
+
@api_client.config.logger.debug "API called: ProductApi#update_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1177
|
+
end
|
1178
|
+
return data, status_code, headers
|
1179
|
+
end
|
1180
|
+
|
1181
|
+
#
|
1182
|
+
#
|
1183
|
+
# @param product_id ID of the product.
|
1184
|
+
# @param variant_id ID of the variant.
|
1185
|
+
# @param variant
|
1186
|
+
# @param [Hash] opts the optional parameters
|
1187
|
+
# @return [Variant]
|
1188
|
+
def update_variant(product_id, variant_id, variant, opts = {})
|
1189
|
+
data, _status_code, _headers = update_variant_with_http_info(product_id, variant_id, variant, opts)
|
1190
|
+
return data
|
1191
|
+
end
|
1192
|
+
|
1193
|
+
#
|
1194
|
+
#
|
1195
|
+
# @param product_id ID of the product.
|
1196
|
+
# @param variant_id ID of the variant.
|
1197
|
+
# @param variant
|
1198
|
+
# @param [Hash] opts the optional parameters
|
1199
|
+
# @return [Array<(Variant, Fixnum, Hash)>] Variant data, response status code and response headers
|
1200
|
+
def update_variant_with_http_info(product_id, variant_id, variant, opts = {})
|
1201
|
+
if @api_client.config.debugging
|
1202
|
+
@api_client.config.logger.debug "Calling API: ProductApi.update_variant ..."
|
1203
|
+
end
|
1204
|
+
# verify the required parameter 'product_id' is set
|
1205
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.update_variant" if product_id.nil?
|
1206
|
+
# verify the required parameter 'variant_id' is set
|
1207
|
+
fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.update_variant" if variant_id.nil?
|
1208
|
+
# verify the required parameter 'variant' is set
|
1209
|
+
fail ArgumentError, "Missing the required parameter 'variant' when calling ProductApi.update_variant" if variant.nil?
|
1210
|
+
# resource path
|
1211
|
+
local_var_path = "/products/{productID}/variants/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
|
1212
|
+
|
1213
|
+
# query parameters
|
1214
|
+
query_params = {}
|
1215
|
+
|
1216
|
+
# header parameters
|
1217
|
+
header_params = {}
|
1218
|
+
|
1219
|
+
# HTTP header 'Accept' (if needed)
|
1220
|
+
local_header_accept = ['application/json']
|
1221
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1222
|
+
|
1223
|
+
# HTTP header 'Content-Type'
|
1224
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1225
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1226
|
+
|
1227
|
+
# form parameters
|
1228
|
+
form_params = {}
|
1229
|
+
|
1230
|
+
# http body (model)
|
1231
|
+
post_body = @api_client.object_to_http_body(variant)
|
1232
|
+
auth_names = ['oauth2']
|
1233
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1234
|
+
:header_params => header_params,
|
1235
|
+
:query_params => query_params,
|
1236
|
+
:form_params => form_params,
|
1237
|
+
:body => post_body,
|
1238
|
+
:auth_names => auth_names,
|
1239
|
+
:return_type => 'Variant')
|
1240
|
+
if @api_client.config.debugging
|
1241
|
+
@api_client.config.logger.debug "API called: ProductApi#update_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1242
|
+
end
|
1243
|
+
return data, status_code, headers
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
#
|
1247
|
+
#
|
1248
|
+
# @param product_id ID of the product.
|
1249
|
+
# @param variant_id ID of the variant.
|
1250
|
+
# @param inventory Inventory of the product.
|
1251
|
+
# @param [Hash] opts the optional parameters
|
1252
|
+
# @return [Inventory]
|
1253
|
+
def update_variant_inventory(product_id, variant_id, inventory, opts = {})
|
1254
|
+
data, _status_code, _headers = update_variant_inventory_with_http_info(product_id, variant_id, inventory, opts)
|
1255
|
+
return data
|
1256
|
+
end
|
1257
|
+
|
1258
|
+
#
|
1259
|
+
#
|
1260
|
+
# @param product_id ID of the product.
|
1261
|
+
# @param variant_id ID of the variant.
|
1262
|
+
# @param inventory Inventory of the product.
|
1263
|
+
# @param [Hash] opts the optional parameters
|
1264
|
+
# @return [Array<(Inventory, Fixnum, Hash)>] Inventory data, response status code and response headers
|
1265
|
+
def update_variant_inventory_with_http_info(product_id, variant_id, inventory, opts = {})
|
1266
|
+
if @api_client.config.debugging
|
1267
|
+
@api_client.config.logger.debug "Calling API: ProductApi.update_variant_inventory ..."
|
1268
|
+
end
|
1269
|
+
# verify the required parameter 'product_id' is set
|
1270
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.update_variant_inventory" if product_id.nil?
|
1271
|
+
# verify the required parameter 'variant_id' is set
|
1272
|
+
fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.update_variant_inventory" if variant_id.nil?
|
1273
|
+
# verify the required parameter 'inventory' is set
|
1274
|
+
fail ArgumentError, "Missing the required parameter 'inventory' when calling ProductApi.update_variant_inventory" if inventory.nil?
|
1275
|
+
# resource path
|
1276
|
+
local_var_path = "/products/{productID}/variants/inventory/{variantID}/{inventory}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s).sub('{' + 'inventory' + '}', inventory.to_s)
|
1277
|
+
|
1278
|
+
# query parameters
|
1279
|
+
query_params = {}
|
1280
|
+
|
1281
|
+
# header parameters
|
1282
|
+
header_params = {}
|
1283
|
+
|
1284
|
+
# HTTP header 'Accept' (if needed)
|
1285
|
+
local_header_accept = ['application/json']
|
1286
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1287
|
+
|
1288
|
+
# HTTP header 'Content-Type'
|
1289
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1290
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1291
|
+
|
1292
|
+
# form parameters
|
1293
|
+
form_params = {}
|
1294
|
+
|
1295
|
+
# http body (model)
|
1296
|
+
post_body = nil
|
1297
|
+
auth_names = ['oauth2']
|
1298
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1299
|
+
:header_params => header_params,
|
1300
|
+
:query_params => query_params,
|
1301
|
+
:form_params => form_params,
|
1302
|
+
:body => post_body,
|
1303
|
+
:auth_names => auth_names,
|
1304
|
+
:return_type => 'Inventory')
|
1305
|
+
if @api_client.config.debugging
|
1306
|
+
@api_client.config.logger.debug "API called: ProductApi#update_variant_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1307
|
+
end
|
1308
|
+
return data, status_code, headers
|
1309
|
+
end
|
1310
|
+
end
|
1311
|
+
end
|