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,817 @@
|
|
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 CategoryApi
|
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 buyer_id ID of the buyer.
|
37
|
+
# @param category
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Category]
|
40
|
+
def create(buyer_id, category, opts = {})
|
41
|
+
data, _status_code, _headers = create_with_http_info(buyer_id, category, opts)
|
42
|
+
return data
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
#
|
47
|
+
# @param buyer_id ID of the buyer.
|
48
|
+
# @param category
|
49
|
+
# @param [Hash] opts the optional parameters
|
50
|
+
# @return [Array<(Category, Fixnum, Hash)>] Category data, response status code and response headers
|
51
|
+
def create_with_http_info(buyer_id, category, opts = {})
|
52
|
+
if @api_client.config.debugging
|
53
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.create ..."
|
54
|
+
end
|
55
|
+
# verify the required parameter 'buyer_id' is set
|
56
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.create" if buyer_id.nil?
|
57
|
+
# verify the required parameter 'category' is set
|
58
|
+
fail ArgumentError, "Missing the required parameter 'category' when calling CategoryApi.create" if category.nil?
|
59
|
+
# resource path
|
60
|
+
local_var_path = "/buyers/{buyerID}/categories".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)
|
61
|
+
|
62
|
+
# query parameters
|
63
|
+
query_params = {}
|
64
|
+
|
65
|
+
# header parameters
|
66
|
+
header_params = {}
|
67
|
+
|
68
|
+
# HTTP header 'Accept' (if needed)
|
69
|
+
local_header_accept = ['application/json']
|
70
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
71
|
+
|
72
|
+
# HTTP header 'Content-Type'
|
73
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
74
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
75
|
+
|
76
|
+
# form parameters
|
77
|
+
form_params = {}
|
78
|
+
|
79
|
+
# http body (model)
|
80
|
+
post_body = @api_client.object_to_http_body(category)
|
81
|
+
auth_names = ['oauth2']
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
83
|
+
:header_params => header_params,
|
84
|
+
:query_params => query_params,
|
85
|
+
:form_params => form_params,
|
86
|
+
:body => post_body,
|
87
|
+
:auth_names => auth_names,
|
88
|
+
:return_type => 'Category')
|
89
|
+
if @api_client.config.debugging
|
90
|
+
@api_client.config.logger.debug "API called: CategoryApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
91
|
+
end
|
92
|
+
return data, status_code, headers
|
93
|
+
end
|
94
|
+
|
95
|
+
#
|
96
|
+
#
|
97
|
+
# @param buyer_id ID of the buyer.
|
98
|
+
# @param category_id ID of the category.
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [nil]
|
101
|
+
def delete(buyer_id, category_id, opts = {})
|
102
|
+
delete_with_http_info(buyer_id, category_id, opts)
|
103
|
+
return nil
|
104
|
+
end
|
105
|
+
|
106
|
+
#
|
107
|
+
#
|
108
|
+
# @param buyer_id ID of the buyer.
|
109
|
+
# @param category_id ID of the category.
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
112
|
+
def delete_with_http_info(buyer_id, category_id, opts = {})
|
113
|
+
if @api_client.config.debugging
|
114
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.delete ..."
|
115
|
+
end
|
116
|
+
# verify the required parameter 'buyer_id' is set
|
117
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.delete" if buyer_id.nil?
|
118
|
+
# verify the required parameter 'category_id' is set
|
119
|
+
fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoryApi.delete" if category_id.nil?
|
120
|
+
# resource path
|
121
|
+
local_var_path = "/buyers/{buyerID}/categories/{categoryID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'categoryID' + '}', category_id.to_s)
|
122
|
+
|
123
|
+
# query parameters
|
124
|
+
query_params = {}
|
125
|
+
|
126
|
+
# header parameters
|
127
|
+
header_params = {}
|
128
|
+
|
129
|
+
# HTTP header 'Accept' (if needed)
|
130
|
+
local_header_accept = ['application/json']
|
131
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
132
|
+
|
133
|
+
# HTTP header 'Content-Type'
|
134
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
135
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
136
|
+
|
137
|
+
# form parameters
|
138
|
+
form_params = {}
|
139
|
+
|
140
|
+
# http body (model)
|
141
|
+
post_body = nil
|
142
|
+
auth_names = ['oauth2']
|
143
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
144
|
+
:header_params => header_params,
|
145
|
+
:query_params => query_params,
|
146
|
+
:form_params => form_params,
|
147
|
+
:body => post_body,
|
148
|
+
:auth_names => auth_names)
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug "API called: CategoryApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
151
|
+
end
|
152
|
+
return data, status_code, headers
|
153
|
+
end
|
154
|
+
|
155
|
+
#
|
156
|
+
#
|
157
|
+
# @param buyer_id ID of the buyer.
|
158
|
+
# @param category_id ID of the category.
|
159
|
+
# @param [Hash] opts the optional parameters
|
160
|
+
# @option opts [String] :user_id ID of the user.
|
161
|
+
# @option opts [String] :user_group_id ID of the user group.
|
162
|
+
# @return [nil]
|
163
|
+
def delete_assignment(buyer_id, category_id, opts = {})
|
164
|
+
delete_assignment_with_http_info(buyer_id, category_id, opts)
|
165
|
+
return nil
|
166
|
+
end
|
167
|
+
|
168
|
+
#
|
169
|
+
#
|
170
|
+
# @param buyer_id ID of the buyer.
|
171
|
+
# @param category_id ID of the category.
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @option opts [String] :user_id ID of the user.
|
174
|
+
# @option opts [String] :user_group_id ID of the user group.
|
175
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
176
|
+
def delete_assignment_with_http_info(buyer_id, category_id, opts = {})
|
177
|
+
if @api_client.config.debugging
|
178
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.delete_assignment ..."
|
179
|
+
end
|
180
|
+
# verify the required parameter 'buyer_id' is set
|
181
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.delete_assignment" if buyer_id.nil?
|
182
|
+
# verify the required parameter 'category_id' is set
|
183
|
+
fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoryApi.delete_assignment" if category_id.nil?
|
184
|
+
# resource path
|
185
|
+
local_var_path = "/buyers/{buyerID}/categories/{categoryID}/assignments".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'categoryID' + '}', category_id.to_s)
|
186
|
+
|
187
|
+
# query parameters
|
188
|
+
query_params = {}
|
189
|
+
query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
190
|
+
query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
|
191
|
+
|
192
|
+
# header parameters
|
193
|
+
header_params = {}
|
194
|
+
|
195
|
+
# HTTP header 'Accept' (if needed)
|
196
|
+
local_header_accept = ['application/json']
|
197
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
198
|
+
|
199
|
+
# HTTP header 'Content-Type'
|
200
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
201
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
202
|
+
|
203
|
+
# form parameters
|
204
|
+
form_params = {}
|
205
|
+
|
206
|
+
# http body (model)
|
207
|
+
post_body = nil
|
208
|
+
auth_names = ['oauth2']
|
209
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
210
|
+
:header_params => header_params,
|
211
|
+
:query_params => query_params,
|
212
|
+
:form_params => form_params,
|
213
|
+
:body => post_body,
|
214
|
+
:auth_names => auth_names)
|
215
|
+
if @api_client.config.debugging
|
216
|
+
@api_client.config.logger.debug "API called: CategoryApi#delete_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
217
|
+
end
|
218
|
+
return data, status_code, headers
|
219
|
+
end
|
220
|
+
|
221
|
+
#
|
222
|
+
#
|
223
|
+
# @param buyer_id ID of the buyer.
|
224
|
+
# @param category_id ID of the category.
|
225
|
+
# @param product_id ID of the product.
|
226
|
+
# @param [Hash] opts the optional parameters
|
227
|
+
# @return [nil]
|
228
|
+
def delete_product_assignment(buyer_id, category_id, product_id, opts = {})
|
229
|
+
delete_product_assignment_with_http_info(buyer_id, category_id, product_id, opts)
|
230
|
+
return nil
|
231
|
+
end
|
232
|
+
|
233
|
+
#
|
234
|
+
#
|
235
|
+
# @param buyer_id ID of the buyer.
|
236
|
+
# @param category_id ID of the category.
|
237
|
+
# @param product_id ID of the product.
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
240
|
+
def delete_product_assignment_with_http_info(buyer_id, category_id, product_id, opts = {})
|
241
|
+
if @api_client.config.debugging
|
242
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.delete_product_assignment ..."
|
243
|
+
end
|
244
|
+
# verify the required parameter 'buyer_id' is set
|
245
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.delete_product_assignment" if buyer_id.nil?
|
246
|
+
# verify the required parameter 'category_id' is set
|
247
|
+
fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoryApi.delete_product_assignment" if category_id.nil?
|
248
|
+
# verify the required parameter 'product_id' is set
|
249
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling CategoryApi.delete_product_assignment" if product_id.nil?
|
250
|
+
# resource path
|
251
|
+
local_var_path = "/buyers/{buyerID}/categories/{categoryID}/productassignments/{productID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'categoryID' + '}', category_id.to_s).sub('{' + 'productID' + '}', product_id.to_s)
|
252
|
+
|
253
|
+
# query parameters
|
254
|
+
query_params = {}
|
255
|
+
|
256
|
+
# header parameters
|
257
|
+
header_params = {}
|
258
|
+
|
259
|
+
# HTTP header 'Accept' (if needed)
|
260
|
+
local_header_accept = ['application/json']
|
261
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
262
|
+
|
263
|
+
# HTTP header 'Content-Type'
|
264
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
265
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
266
|
+
|
267
|
+
# form parameters
|
268
|
+
form_params = {}
|
269
|
+
|
270
|
+
# http body (model)
|
271
|
+
post_body = nil
|
272
|
+
auth_names = ['oauth2']
|
273
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
274
|
+
:header_params => header_params,
|
275
|
+
:query_params => query_params,
|
276
|
+
:form_params => form_params,
|
277
|
+
:body => post_body,
|
278
|
+
:auth_names => auth_names)
|
279
|
+
if @api_client.config.debugging
|
280
|
+
@api_client.config.logger.debug "API called: CategoryApi#delete_product_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
281
|
+
end
|
282
|
+
return data, status_code, headers
|
283
|
+
end
|
284
|
+
|
285
|
+
#
|
286
|
+
#
|
287
|
+
# @param buyer_id ID of the buyer.
|
288
|
+
# @param category_id ID of the category.
|
289
|
+
# @param [Hash] opts the optional parameters
|
290
|
+
# @return [Category]
|
291
|
+
def get(buyer_id, category_id, opts = {})
|
292
|
+
data, _status_code, _headers = get_with_http_info(buyer_id, category_id, opts)
|
293
|
+
return data
|
294
|
+
end
|
295
|
+
|
296
|
+
#
|
297
|
+
#
|
298
|
+
# @param buyer_id ID of the buyer.
|
299
|
+
# @param category_id ID of the category.
|
300
|
+
# @param [Hash] opts the optional parameters
|
301
|
+
# @return [Array<(Category, Fixnum, Hash)>] Category data, response status code and response headers
|
302
|
+
def get_with_http_info(buyer_id, category_id, opts = {})
|
303
|
+
if @api_client.config.debugging
|
304
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.get ..."
|
305
|
+
end
|
306
|
+
# verify the required parameter 'buyer_id' is set
|
307
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.get" if buyer_id.nil?
|
308
|
+
# verify the required parameter 'category_id' is set
|
309
|
+
fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoryApi.get" if category_id.nil?
|
310
|
+
# resource path
|
311
|
+
local_var_path = "/buyers/{buyerID}/categories/{categoryID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'categoryID' + '}', category_id.to_s)
|
312
|
+
|
313
|
+
# query parameters
|
314
|
+
query_params = {}
|
315
|
+
|
316
|
+
# header parameters
|
317
|
+
header_params = {}
|
318
|
+
|
319
|
+
# HTTP header 'Accept' (if needed)
|
320
|
+
local_header_accept = ['application/json']
|
321
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
322
|
+
|
323
|
+
# HTTP header 'Content-Type'
|
324
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
325
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
326
|
+
|
327
|
+
# form parameters
|
328
|
+
form_params = {}
|
329
|
+
|
330
|
+
# http body (model)
|
331
|
+
post_body = nil
|
332
|
+
auth_names = ['oauth2']
|
333
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
334
|
+
:header_params => header_params,
|
335
|
+
:query_params => query_params,
|
336
|
+
:form_params => form_params,
|
337
|
+
:body => post_body,
|
338
|
+
:auth_names => auth_names,
|
339
|
+
:return_type => 'Category')
|
340
|
+
if @api_client.config.debugging
|
341
|
+
@api_client.config.logger.debug "API called: CategoryApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
342
|
+
end
|
343
|
+
return data, status_code, headers
|
344
|
+
end
|
345
|
+
|
346
|
+
#
|
347
|
+
#
|
348
|
+
# @param buyer_id ID of the buyer.
|
349
|
+
# @param [Hash] opts the optional parameters
|
350
|
+
# @option opts [String] :depth Depth of the category.
|
351
|
+
# @option opts [String] :search Word or phrase to search for.
|
352
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
353
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
354
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
355
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
356
|
+
# @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.???'
|
357
|
+
# @return [ListCategory]
|
358
|
+
def list(buyer_id, opts = {})
|
359
|
+
data, _status_code, _headers = list_with_http_info(buyer_id, opts)
|
360
|
+
return data
|
361
|
+
end
|
362
|
+
|
363
|
+
#
|
364
|
+
#
|
365
|
+
# @param buyer_id ID of the buyer.
|
366
|
+
# @param [Hash] opts the optional parameters
|
367
|
+
# @option opts [String] :depth Depth of the category.
|
368
|
+
# @option opts [String] :search Word or phrase to search for.
|
369
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
370
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
371
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
372
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
373
|
+
# @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.???'
|
374
|
+
# @return [Array<(ListCategory, Fixnum, Hash)>] ListCategory data, response status code and response headers
|
375
|
+
def list_with_http_info(buyer_id, opts = {})
|
376
|
+
if @api_client.config.debugging
|
377
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.list ..."
|
378
|
+
end
|
379
|
+
# verify the required parameter 'buyer_id' is set
|
380
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.list" if buyer_id.nil?
|
381
|
+
# resource path
|
382
|
+
local_var_path = "/buyers/{buyerID}/categories".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)
|
383
|
+
|
384
|
+
# query parameters
|
385
|
+
query_params = {}
|
386
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
387
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
388
|
+
query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
|
389
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
390
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
391
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
392
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
393
|
+
|
394
|
+
# header parameters
|
395
|
+
header_params = {}
|
396
|
+
|
397
|
+
# HTTP header 'Accept' (if needed)
|
398
|
+
local_header_accept = ['application/json']
|
399
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
400
|
+
|
401
|
+
# HTTP header 'Content-Type'
|
402
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
403
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
404
|
+
|
405
|
+
# form parameters
|
406
|
+
form_params = {}
|
407
|
+
|
408
|
+
# http body (model)
|
409
|
+
post_body = nil
|
410
|
+
auth_names = ['oauth2']
|
411
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
412
|
+
:header_params => header_params,
|
413
|
+
:query_params => query_params,
|
414
|
+
:form_params => form_params,
|
415
|
+
:body => post_body,
|
416
|
+
:auth_names => auth_names,
|
417
|
+
:return_type => 'ListCategory')
|
418
|
+
if @api_client.config.debugging
|
419
|
+
@api_client.config.logger.debug "API called: CategoryApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
420
|
+
end
|
421
|
+
return data, status_code, headers
|
422
|
+
end
|
423
|
+
|
424
|
+
#
|
425
|
+
#
|
426
|
+
# @param buyer_id ID of the buyer.
|
427
|
+
# @param [Hash] opts the optional parameters
|
428
|
+
# @option opts [String] :category_id ID of the category.
|
429
|
+
# @option opts [String] :user_id ID of the user.
|
430
|
+
# @option opts [String] :user_group_id ID of the user group.
|
431
|
+
# @option opts [String] :level Level of the category.
|
432
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
433
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
434
|
+
# @return [ListCategoryAssignment]
|
435
|
+
def list_assignments(buyer_id, opts = {})
|
436
|
+
data, _status_code, _headers = list_assignments_with_http_info(buyer_id, opts)
|
437
|
+
return data
|
438
|
+
end
|
439
|
+
|
440
|
+
#
|
441
|
+
#
|
442
|
+
# @param buyer_id ID of the buyer.
|
443
|
+
# @param [Hash] opts the optional parameters
|
444
|
+
# @option opts [String] :category_id ID of the category.
|
445
|
+
# @option opts [String] :user_id ID of the user.
|
446
|
+
# @option opts [String] :user_group_id ID of the user group.
|
447
|
+
# @option opts [String] :level Level of the category.
|
448
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
449
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
450
|
+
# @return [Array<(ListCategoryAssignment, Fixnum, Hash)>] ListCategoryAssignment data, response status code and response headers
|
451
|
+
def list_assignments_with_http_info(buyer_id, opts = {})
|
452
|
+
if @api_client.config.debugging
|
453
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.list_assignments ..."
|
454
|
+
end
|
455
|
+
# verify the required parameter 'buyer_id' is set
|
456
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.list_assignments" if buyer_id.nil?
|
457
|
+
# resource path
|
458
|
+
local_var_path = "/buyers/{buyerID}/categories/assignments".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)
|
459
|
+
|
460
|
+
# query parameters
|
461
|
+
query_params = {}
|
462
|
+
query_params[:'categoryID'] = opts[:'category_id'] if !opts[:'category_id'].nil?
|
463
|
+
query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
464
|
+
query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
|
465
|
+
query_params[:'level'] = opts[:'level'] if !opts[:'level'].nil?
|
466
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
467
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
468
|
+
|
469
|
+
# header parameters
|
470
|
+
header_params = {}
|
471
|
+
|
472
|
+
# HTTP header 'Accept' (if needed)
|
473
|
+
local_header_accept = ['application/json']
|
474
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
475
|
+
|
476
|
+
# HTTP header 'Content-Type'
|
477
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
478
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
479
|
+
|
480
|
+
# form parameters
|
481
|
+
form_params = {}
|
482
|
+
|
483
|
+
# http body (model)
|
484
|
+
post_body = nil
|
485
|
+
auth_names = ['oauth2']
|
486
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
487
|
+
:header_params => header_params,
|
488
|
+
:query_params => query_params,
|
489
|
+
:form_params => form_params,
|
490
|
+
:body => post_body,
|
491
|
+
:auth_names => auth_names,
|
492
|
+
:return_type => 'ListCategoryAssignment')
|
493
|
+
if @api_client.config.debugging
|
494
|
+
@api_client.config.logger.debug "API called: CategoryApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
495
|
+
end
|
496
|
+
return data, status_code, headers
|
497
|
+
end
|
498
|
+
|
499
|
+
#
|
500
|
+
#
|
501
|
+
# @param buyer_id ID of the buyer.
|
502
|
+
# @param [Hash] opts the optional parameters
|
503
|
+
# @option opts [String] :category_id ID of the category.
|
504
|
+
# @option opts [String] :product_id ID of the product.
|
505
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
506
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
507
|
+
# @return [ListCategoryProductAssignment]
|
508
|
+
def list_product_assignments(buyer_id, opts = {})
|
509
|
+
data, _status_code, _headers = list_product_assignments_with_http_info(buyer_id, opts)
|
510
|
+
return data
|
511
|
+
end
|
512
|
+
|
513
|
+
#
|
514
|
+
#
|
515
|
+
# @param buyer_id ID of the buyer.
|
516
|
+
# @param [Hash] opts the optional parameters
|
517
|
+
# @option opts [String] :category_id ID of the category.
|
518
|
+
# @option opts [String] :product_id ID of the product.
|
519
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
520
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
521
|
+
# @return [Array<(ListCategoryProductAssignment, Fixnum, Hash)>] ListCategoryProductAssignment data, response status code and response headers
|
522
|
+
def list_product_assignments_with_http_info(buyer_id, opts = {})
|
523
|
+
if @api_client.config.debugging
|
524
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.list_product_assignments ..."
|
525
|
+
end
|
526
|
+
# verify the required parameter 'buyer_id' is set
|
527
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.list_product_assignments" if buyer_id.nil?
|
528
|
+
# resource path
|
529
|
+
local_var_path = "/buyers/{buyerID}/categories/productassignments".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)
|
530
|
+
|
531
|
+
# query parameters
|
532
|
+
query_params = {}
|
533
|
+
query_params[:'categoryID'] = opts[:'category_id'] if !opts[:'category_id'].nil?
|
534
|
+
query_params[:'productID'] = opts[:'product_id'] if !opts[:'product_id'].nil?
|
535
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
536
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
537
|
+
|
538
|
+
# header parameters
|
539
|
+
header_params = {}
|
540
|
+
|
541
|
+
# HTTP header 'Accept' (if needed)
|
542
|
+
local_header_accept = ['application/json']
|
543
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
544
|
+
|
545
|
+
# HTTP header 'Content-Type'
|
546
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
547
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
548
|
+
|
549
|
+
# form parameters
|
550
|
+
form_params = {}
|
551
|
+
|
552
|
+
# http body (model)
|
553
|
+
post_body = nil
|
554
|
+
auth_names = ['oauth2']
|
555
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
556
|
+
:header_params => header_params,
|
557
|
+
:query_params => query_params,
|
558
|
+
:form_params => form_params,
|
559
|
+
:body => post_body,
|
560
|
+
:auth_names => auth_names,
|
561
|
+
:return_type => 'ListCategoryProductAssignment')
|
562
|
+
if @api_client.config.debugging
|
563
|
+
@api_client.config.logger.debug "API called: CategoryApi#list_product_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
564
|
+
end
|
565
|
+
return data, status_code, headers
|
566
|
+
end
|
567
|
+
|
568
|
+
#
|
569
|
+
#
|
570
|
+
# @param buyer_id ID of the buyer.
|
571
|
+
# @param category_id ID of the category.
|
572
|
+
# @param category
|
573
|
+
# @param [Hash] opts the optional parameters
|
574
|
+
# @return [nil]
|
575
|
+
def patch(buyer_id, category_id, category, opts = {})
|
576
|
+
patch_with_http_info(buyer_id, category_id, category, opts)
|
577
|
+
return nil
|
578
|
+
end
|
579
|
+
|
580
|
+
#
|
581
|
+
#
|
582
|
+
# @param buyer_id ID of the buyer.
|
583
|
+
# @param category_id ID of the category.
|
584
|
+
# @param category
|
585
|
+
# @param [Hash] opts the optional parameters
|
586
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
587
|
+
def patch_with_http_info(buyer_id, category_id, category, opts = {})
|
588
|
+
if @api_client.config.debugging
|
589
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.patch ..."
|
590
|
+
end
|
591
|
+
# verify the required parameter 'buyer_id' is set
|
592
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.patch" if buyer_id.nil?
|
593
|
+
# verify the required parameter 'category_id' is set
|
594
|
+
fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoryApi.patch" if category_id.nil?
|
595
|
+
# verify the required parameter 'category' is set
|
596
|
+
fail ArgumentError, "Missing the required parameter 'category' when calling CategoryApi.patch" if category.nil?
|
597
|
+
# resource path
|
598
|
+
local_var_path = "/buyers/{buyerID}/categories/{categoryID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'categoryID' + '}', category_id.to_s)
|
599
|
+
|
600
|
+
# query parameters
|
601
|
+
query_params = {}
|
602
|
+
|
603
|
+
# header parameters
|
604
|
+
header_params = {}
|
605
|
+
|
606
|
+
# HTTP header 'Accept' (if needed)
|
607
|
+
local_header_accept = ['application/json']
|
608
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
609
|
+
|
610
|
+
# HTTP header 'Content-Type'
|
611
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
612
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
613
|
+
|
614
|
+
# form parameters
|
615
|
+
form_params = {}
|
616
|
+
|
617
|
+
# http body (model)
|
618
|
+
post_body = @api_client.object_to_http_body(category)
|
619
|
+
auth_names = ['oauth2']
|
620
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
621
|
+
:header_params => header_params,
|
622
|
+
:query_params => query_params,
|
623
|
+
:form_params => form_params,
|
624
|
+
:body => post_body,
|
625
|
+
:auth_names => auth_names)
|
626
|
+
if @api_client.config.debugging
|
627
|
+
@api_client.config.logger.debug "API called: CategoryApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
628
|
+
end
|
629
|
+
return data, status_code, headers
|
630
|
+
end
|
631
|
+
|
632
|
+
#
|
633
|
+
#
|
634
|
+
# @param buyer_id ID of the buyer.
|
635
|
+
# @param category_assignment
|
636
|
+
# @param [Hash] opts the optional parameters
|
637
|
+
# @return [nil]
|
638
|
+
def save_assignment(buyer_id, category_assignment, opts = {})
|
639
|
+
save_assignment_with_http_info(buyer_id, category_assignment, opts)
|
640
|
+
return nil
|
641
|
+
end
|
642
|
+
|
643
|
+
#
|
644
|
+
#
|
645
|
+
# @param buyer_id ID of the buyer.
|
646
|
+
# @param category_assignment
|
647
|
+
# @param [Hash] opts the optional parameters
|
648
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
649
|
+
def save_assignment_with_http_info(buyer_id, category_assignment, opts = {})
|
650
|
+
if @api_client.config.debugging
|
651
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.save_assignment ..."
|
652
|
+
end
|
653
|
+
# verify the required parameter 'buyer_id' is set
|
654
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.save_assignment" if buyer_id.nil?
|
655
|
+
# verify the required parameter 'category_assignment' is set
|
656
|
+
fail ArgumentError, "Missing the required parameter 'category_assignment' when calling CategoryApi.save_assignment" if category_assignment.nil?
|
657
|
+
# resource path
|
658
|
+
local_var_path = "/buyers/{buyerID}/categories/assignments".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)
|
659
|
+
|
660
|
+
# query parameters
|
661
|
+
query_params = {}
|
662
|
+
|
663
|
+
# header parameters
|
664
|
+
header_params = {}
|
665
|
+
|
666
|
+
# HTTP header 'Accept' (if needed)
|
667
|
+
local_header_accept = ['application/json']
|
668
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
669
|
+
|
670
|
+
# HTTP header 'Content-Type'
|
671
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
672
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
673
|
+
|
674
|
+
# form parameters
|
675
|
+
form_params = {}
|
676
|
+
|
677
|
+
# http body (model)
|
678
|
+
post_body = @api_client.object_to_http_body(category_assignment)
|
679
|
+
auth_names = ['oauth2']
|
680
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
681
|
+
:header_params => header_params,
|
682
|
+
:query_params => query_params,
|
683
|
+
:form_params => form_params,
|
684
|
+
:body => post_body,
|
685
|
+
:auth_names => auth_names)
|
686
|
+
if @api_client.config.debugging
|
687
|
+
@api_client.config.logger.debug "API called: CategoryApi#save_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
688
|
+
end
|
689
|
+
return data, status_code, headers
|
690
|
+
end
|
691
|
+
|
692
|
+
#
|
693
|
+
#
|
694
|
+
# @param buyer_id ID of the buyer.
|
695
|
+
# @param product_assignment
|
696
|
+
# @param [Hash] opts the optional parameters
|
697
|
+
# @return [nil]
|
698
|
+
def save_product_assignment(buyer_id, product_assignment, opts = {})
|
699
|
+
save_product_assignment_with_http_info(buyer_id, product_assignment, opts)
|
700
|
+
return nil
|
701
|
+
end
|
702
|
+
|
703
|
+
#
|
704
|
+
#
|
705
|
+
# @param buyer_id ID of the buyer.
|
706
|
+
# @param product_assignment
|
707
|
+
# @param [Hash] opts the optional parameters
|
708
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
709
|
+
def save_product_assignment_with_http_info(buyer_id, product_assignment, opts = {})
|
710
|
+
if @api_client.config.debugging
|
711
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.save_product_assignment ..."
|
712
|
+
end
|
713
|
+
# verify the required parameter 'buyer_id' is set
|
714
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.save_product_assignment" if buyer_id.nil?
|
715
|
+
# verify the required parameter 'product_assignment' is set
|
716
|
+
fail ArgumentError, "Missing the required parameter 'product_assignment' when calling CategoryApi.save_product_assignment" if product_assignment.nil?
|
717
|
+
# resource path
|
718
|
+
local_var_path = "/buyers/{buyerID}/categories/productassignments".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)
|
719
|
+
|
720
|
+
# query parameters
|
721
|
+
query_params = {}
|
722
|
+
|
723
|
+
# header parameters
|
724
|
+
header_params = {}
|
725
|
+
|
726
|
+
# HTTP header 'Accept' (if needed)
|
727
|
+
local_header_accept = ['application/json']
|
728
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
729
|
+
|
730
|
+
# HTTP header 'Content-Type'
|
731
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
732
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
733
|
+
|
734
|
+
# form parameters
|
735
|
+
form_params = {}
|
736
|
+
|
737
|
+
# http body (model)
|
738
|
+
post_body = @api_client.object_to_http_body(product_assignment)
|
739
|
+
auth_names = ['oauth2']
|
740
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
741
|
+
:header_params => header_params,
|
742
|
+
:query_params => query_params,
|
743
|
+
:form_params => form_params,
|
744
|
+
:body => post_body,
|
745
|
+
:auth_names => auth_names)
|
746
|
+
if @api_client.config.debugging
|
747
|
+
@api_client.config.logger.debug "API called: CategoryApi#save_product_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
748
|
+
end
|
749
|
+
return data, status_code, headers
|
750
|
+
end
|
751
|
+
|
752
|
+
#
|
753
|
+
#
|
754
|
+
# @param buyer_id ID of the buyer.
|
755
|
+
# @param category_id ID of the category.
|
756
|
+
# @param category
|
757
|
+
# @param [Hash] opts the optional parameters
|
758
|
+
# @return [Category]
|
759
|
+
def update(buyer_id, category_id, category, opts = {})
|
760
|
+
data, _status_code, _headers = update_with_http_info(buyer_id, category_id, category, opts)
|
761
|
+
return data
|
762
|
+
end
|
763
|
+
|
764
|
+
#
|
765
|
+
#
|
766
|
+
# @param buyer_id ID of the buyer.
|
767
|
+
# @param category_id ID of the category.
|
768
|
+
# @param category
|
769
|
+
# @param [Hash] opts the optional parameters
|
770
|
+
# @return [Array<(Category, Fixnum, Hash)>] Category data, response status code and response headers
|
771
|
+
def update_with_http_info(buyer_id, category_id, category, opts = {})
|
772
|
+
if @api_client.config.debugging
|
773
|
+
@api_client.config.logger.debug "Calling API: CategoryApi.update ..."
|
774
|
+
end
|
775
|
+
# verify the required parameter 'buyer_id' is set
|
776
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CategoryApi.update" if buyer_id.nil?
|
777
|
+
# verify the required parameter 'category_id' is set
|
778
|
+
fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoryApi.update" if category_id.nil?
|
779
|
+
# verify the required parameter 'category' is set
|
780
|
+
fail ArgumentError, "Missing the required parameter 'category' when calling CategoryApi.update" if category.nil?
|
781
|
+
# resource path
|
782
|
+
local_var_path = "/buyers/{buyerID}/categories/{categoryID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'categoryID' + '}', category_id.to_s)
|
783
|
+
|
784
|
+
# query parameters
|
785
|
+
query_params = {}
|
786
|
+
|
787
|
+
# header parameters
|
788
|
+
header_params = {}
|
789
|
+
|
790
|
+
# HTTP header 'Accept' (if needed)
|
791
|
+
local_header_accept = ['application/json']
|
792
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
793
|
+
|
794
|
+
# HTTP header 'Content-Type'
|
795
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
796
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
797
|
+
|
798
|
+
# form parameters
|
799
|
+
form_params = {}
|
800
|
+
|
801
|
+
# http body (model)
|
802
|
+
post_body = @api_client.object_to_http_body(category)
|
803
|
+
auth_names = ['oauth2']
|
804
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
805
|
+
:header_params => header_params,
|
806
|
+
:query_params => query_params,
|
807
|
+
:form_params => form_params,
|
808
|
+
:body => post_body,
|
809
|
+
:auth_names => auth_names,
|
810
|
+
:return_type => 'Category')
|
811
|
+
if @api_client.config.debugging
|
812
|
+
@api_client.config.logger.debug "API called: CategoryApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
813
|
+
end
|
814
|
+
return data, status_code, headers
|
815
|
+
end
|
816
|
+
end
|
817
|
+
end
|