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,965 @@
|
|
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 SpecApi
|
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 spec
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Spec]
|
39
|
+
def create(spec, opts = {})
|
40
|
+
data, _status_code, _headers = create_with_http_info(spec, opts)
|
41
|
+
return data
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
#
|
46
|
+
# @param spec
|
47
|
+
# @param [Hash] opts the optional parameters
|
48
|
+
# @return [Array<(Spec, Fixnum, Hash)>] Spec data, response status code and response headers
|
49
|
+
def create_with_http_info(spec, opts = {})
|
50
|
+
if @api_client.config.debugging
|
51
|
+
@api_client.config.logger.debug "Calling API: SpecApi.create ..."
|
52
|
+
end
|
53
|
+
# verify the required parameter 'spec' is set
|
54
|
+
fail ArgumentError, "Missing the required parameter 'spec' when calling SpecApi.create" if spec.nil?
|
55
|
+
# resource path
|
56
|
+
local_var_path = "/specs".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(spec)
|
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 => 'Spec')
|
85
|
+
if @api_client.config.debugging
|
86
|
+
@api_client.config.logger.debug "API called: SpecApi#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 spec_id ID of the spec.
|
94
|
+
# @param option
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [SpecOption]
|
97
|
+
def create_option(spec_id, option, opts = {})
|
98
|
+
data, _status_code, _headers = create_option_with_http_info(spec_id, option, opts)
|
99
|
+
return data
|
100
|
+
end
|
101
|
+
|
102
|
+
#
|
103
|
+
#
|
104
|
+
# @param spec_id ID of the spec.
|
105
|
+
# @param option
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @return [Array<(SpecOption, Fixnum, Hash)>] SpecOption data, response status code and response headers
|
108
|
+
def create_option_with_http_info(spec_id, option, opts = {})
|
109
|
+
if @api_client.config.debugging
|
110
|
+
@api_client.config.logger.debug "Calling API: SpecApi.create_option ..."
|
111
|
+
end
|
112
|
+
# verify the required parameter 'spec_id' is set
|
113
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.create_option" if spec_id.nil?
|
114
|
+
# verify the required parameter 'option' is set
|
115
|
+
fail ArgumentError, "Missing the required parameter 'option' when calling SpecApi.create_option" if option.nil?
|
116
|
+
# resource path
|
117
|
+
local_var_path = "/specs/{specID}/options".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s)
|
118
|
+
|
119
|
+
# query parameters
|
120
|
+
query_params = {}
|
121
|
+
|
122
|
+
# header parameters
|
123
|
+
header_params = {}
|
124
|
+
|
125
|
+
# HTTP header 'Accept' (if needed)
|
126
|
+
local_header_accept = ['application/json']
|
127
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
128
|
+
|
129
|
+
# HTTP header 'Content-Type'
|
130
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
131
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
132
|
+
|
133
|
+
# form parameters
|
134
|
+
form_params = {}
|
135
|
+
|
136
|
+
# http body (model)
|
137
|
+
post_body = @api_client.object_to_http_body(option)
|
138
|
+
auth_names = ['oauth2']
|
139
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
140
|
+
:header_params => header_params,
|
141
|
+
:query_params => query_params,
|
142
|
+
:form_params => form_params,
|
143
|
+
:body => post_body,
|
144
|
+
:auth_names => auth_names,
|
145
|
+
:return_type => 'SpecOption')
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: SpecApi#create_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
148
|
+
end
|
149
|
+
return data, status_code, headers
|
150
|
+
end
|
151
|
+
|
152
|
+
#
|
153
|
+
#
|
154
|
+
# @param spec_id ID of the spec.
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @return [nil]
|
157
|
+
def delete(spec_id, opts = {})
|
158
|
+
delete_with_http_info(spec_id, opts)
|
159
|
+
return nil
|
160
|
+
end
|
161
|
+
|
162
|
+
#
|
163
|
+
#
|
164
|
+
# @param spec_id ID of the spec.
|
165
|
+
# @param [Hash] opts the optional parameters
|
166
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
167
|
+
def delete_with_http_info(spec_id, opts = {})
|
168
|
+
if @api_client.config.debugging
|
169
|
+
@api_client.config.logger.debug "Calling API: SpecApi.delete ..."
|
170
|
+
end
|
171
|
+
# verify the required parameter 'spec_id' is set
|
172
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.delete" if spec_id.nil?
|
173
|
+
# resource path
|
174
|
+
local_var_path = "/specs/{specID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s)
|
175
|
+
|
176
|
+
# query parameters
|
177
|
+
query_params = {}
|
178
|
+
|
179
|
+
# header parameters
|
180
|
+
header_params = {}
|
181
|
+
|
182
|
+
# HTTP header 'Accept' (if needed)
|
183
|
+
local_header_accept = ['application/json']
|
184
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
185
|
+
|
186
|
+
# HTTP header 'Content-Type'
|
187
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
188
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
189
|
+
|
190
|
+
# form parameters
|
191
|
+
form_params = {}
|
192
|
+
|
193
|
+
# http body (model)
|
194
|
+
post_body = nil
|
195
|
+
auth_names = ['oauth2']
|
196
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
197
|
+
:header_params => header_params,
|
198
|
+
:query_params => query_params,
|
199
|
+
:form_params => form_params,
|
200
|
+
:body => post_body,
|
201
|
+
:auth_names => auth_names)
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug "API called: SpecApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
|
+
end
|
205
|
+
return data, status_code, headers
|
206
|
+
end
|
207
|
+
|
208
|
+
#
|
209
|
+
#
|
210
|
+
# @param spec_id ID of the spec.
|
211
|
+
# @param option_id ID of the option.
|
212
|
+
# @param [Hash] opts the optional parameters
|
213
|
+
# @return [nil]
|
214
|
+
def delete_option(spec_id, option_id, opts = {})
|
215
|
+
delete_option_with_http_info(spec_id, option_id, opts)
|
216
|
+
return nil
|
217
|
+
end
|
218
|
+
|
219
|
+
#
|
220
|
+
#
|
221
|
+
# @param spec_id ID of the spec.
|
222
|
+
# @param option_id ID of the option.
|
223
|
+
# @param [Hash] opts the optional parameters
|
224
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
225
|
+
def delete_option_with_http_info(spec_id, option_id, opts = {})
|
226
|
+
if @api_client.config.debugging
|
227
|
+
@api_client.config.logger.debug "Calling API: SpecApi.delete_option ..."
|
228
|
+
end
|
229
|
+
# verify the required parameter 'spec_id' is set
|
230
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.delete_option" if spec_id.nil?
|
231
|
+
# verify the required parameter 'option_id' is set
|
232
|
+
fail ArgumentError, "Missing the required parameter 'option_id' when calling SpecApi.delete_option" if option_id.nil?
|
233
|
+
# resource path
|
234
|
+
local_var_path = "/specs/{specID}/options/{optionID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s).sub('{' + 'optionID' + '}', option_id.to_s)
|
235
|
+
|
236
|
+
# query parameters
|
237
|
+
query_params = {}
|
238
|
+
|
239
|
+
# header parameters
|
240
|
+
header_params = {}
|
241
|
+
|
242
|
+
# HTTP header 'Accept' (if needed)
|
243
|
+
local_header_accept = ['application/json']
|
244
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
245
|
+
|
246
|
+
# HTTP header 'Content-Type'
|
247
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
248
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
249
|
+
|
250
|
+
# form parameters
|
251
|
+
form_params = {}
|
252
|
+
|
253
|
+
# http body (model)
|
254
|
+
post_body = nil
|
255
|
+
auth_names = ['oauth2']
|
256
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
257
|
+
:header_params => header_params,
|
258
|
+
:query_params => query_params,
|
259
|
+
:form_params => form_params,
|
260
|
+
:body => post_body,
|
261
|
+
:auth_names => auth_names)
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: SpecApi#delete_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
|
268
|
+
#
|
269
|
+
#
|
270
|
+
# @param spec_id ID of the spec.
|
271
|
+
# @param product_id ID of the product.
|
272
|
+
# @param [Hash] opts the optional parameters
|
273
|
+
# @return [nil]
|
274
|
+
def delete_product_assignment(spec_id, product_id, opts = {})
|
275
|
+
delete_product_assignment_with_http_info(spec_id, product_id, opts)
|
276
|
+
return nil
|
277
|
+
end
|
278
|
+
|
279
|
+
#
|
280
|
+
#
|
281
|
+
# @param spec_id ID of the spec.
|
282
|
+
# @param product_id ID of the product.
|
283
|
+
# @param [Hash] opts the optional parameters
|
284
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
285
|
+
def delete_product_assignment_with_http_info(spec_id, product_id, opts = {})
|
286
|
+
if @api_client.config.debugging
|
287
|
+
@api_client.config.logger.debug "Calling API: SpecApi.delete_product_assignment ..."
|
288
|
+
end
|
289
|
+
# verify the required parameter 'spec_id' is set
|
290
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.delete_product_assignment" if spec_id.nil?
|
291
|
+
# verify the required parameter 'product_id' is set
|
292
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling SpecApi.delete_product_assignment" if product_id.nil?
|
293
|
+
# resource path
|
294
|
+
local_var_path = "/specs/{specID}/productassignments/{productID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s).sub('{' + 'productID' + '}', product_id.to_s)
|
295
|
+
|
296
|
+
# query parameters
|
297
|
+
query_params = {}
|
298
|
+
|
299
|
+
# header parameters
|
300
|
+
header_params = {}
|
301
|
+
|
302
|
+
# HTTP header 'Accept' (if needed)
|
303
|
+
local_header_accept = ['application/json']
|
304
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
305
|
+
|
306
|
+
# HTTP header 'Content-Type'
|
307
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
308
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
309
|
+
|
310
|
+
# form parameters
|
311
|
+
form_params = {}
|
312
|
+
|
313
|
+
# http body (model)
|
314
|
+
post_body = nil
|
315
|
+
auth_names = ['oauth2']
|
316
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
317
|
+
:header_params => header_params,
|
318
|
+
:query_params => query_params,
|
319
|
+
:form_params => form_params,
|
320
|
+
:body => post_body,
|
321
|
+
:auth_names => auth_names)
|
322
|
+
if @api_client.config.debugging
|
323
|
+
@api_client.config.logger.debug "API called: SpecApi#delete_product_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
324
|
+
end
|
325
|
+
return data, status_code, headers
|
326
|
+
end
|
327
|
+
|
328
|
+
#
|
329
|
+
#
|
330
|
+
# @param spec_id ID of the spec.
|
331
|
+
# @param [Hash] opts the optional parameters
|
332
|
+
# @return [Spec]
|
333
|
+
def get(spec_id, opts = {})
|
334
|
+
data, _status_code, _headers = get_with_http_info(spec_id, opts)
|
335
|
+
return data
|
336
|
+
end
|
337
|
+
|
338
|
+
#
|
339
|
+
#
|
340
|
+
# @param spec_id ID of the spec.
|
341
|
+
# @param [Hash] opts the optional parameters
|
342
|
+
# @return [Array<(Spec, Fixnum, Hash)>] Spec data, response status code and response headers
|
343
|
+
def get_with_http_info(spec_id, opts = {})
|
344
|
+
if @api_client.config.debugging
|
345
|
+
@api_client.config.logger.debug "Calling API: SpecApi.get ..."
|
346
|
+
end
|
347
|
+
# verify the required parameter 'spec_id' is set
|
348
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.get" if spec_id.nil?
|
349
|
+
# resource path
|
350
|
+
local_var_path = "/specs/{specID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s)
|
351
|
+
|
352
|
+
# query parameters
|
353
|
+
query_params = {}
|
354
|
+
|
355
|
+
# header parameters
|
356
|
+
header_params = {}
|
357
|
+
|
358
|
+
# HTTP header 'Accept' (if needed)
|
359
|
+
local_header_accept = ['application/json']
|
360
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
361
|
+
|
362
|
+
# HTTP header 'Content-Type'
|
363
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
364
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
365
|
+
|
366
|
+
# form parameters
|
367
|
+
form_params = {}
|
368
|
+
|
369
|
+
# http body (model)
|
370
|
+
post_body = nil
|
371
|
+
auth_names = ['oauth2']
|
372
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
373
|
+
:header_params => header_params,
|
374
|
+
:query_params => query_params,
|
375
|
+
:form_params => form_params,
|
376
|
+
:body => post_body,
|
377
|
+
:auth_names => auth_names,
|
378
|
+
:return_type => 'Spec')
|
379
|
+
if @api_client.config.debugging
|
380
|
+
@api_client.config.logger.debug "API called: SpecApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
381
|
+
end
|
382
|
+
return data, status_code, headers
|
383
|
+
end
|
384
|
+
|
385
|
+
#
|
386
|
+
#
|
387
|
+
# @param spec_id ID of the spec.
|
388
|
+
# @param option_id ID of the option.
|
389
|
+
# @param [Hash] opts the optional parameters
|
390
|
+
# @return [SpecOption]
|
391
|
+
def get_option(spec_id, option_id, opts = {})
|
392
|
+
data, _status_code, _headers = get_option_with_http_info(spec_id, option_id, opts)
|
393
|
+
return data
|
394
|
+
end
|
395
|
+
|
396
|
+
#
|
397
|
+
#
|
398
|
+
# @param spec_id ID of the spec.
|
399
|
+
# @param option_id ID of the option.
|
400
|
+
# @param [Hash] opts the optional parameters
|
401
|
+
# @return [Array<(SpecOption, Fixnum, Hash)>] SpecOption data, response status code and response headers
|
402
|
+
def get_option_with_http_info(spec_id, option_id, opts = {})
|
403
|
+
if @api_client.config.debugging
|
404
|
+
@api_client.config.logger.debug "Calling API: SpecApi.get_option ..."
|
405
|
+
end
|
406
|
+
# verify the required parameter 'spec_id' is set
|
407
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.get_option" if spec_id.nil?
|
408
|
+
# verify the required parameter 'option_id' is set
|
409
|
+
fail ArgumentError, "Missing the required parameter 'option_id' when calling SpecApi.get_option" if option_id.nil?
|
410
|
+
# resource path
|
411
|
+
local_var_path = "/specs/{specID}/options/{optionID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s).sub('{' + 'optionID' + '}', option_id.to_s)
|
412
|
+
|
413
|
+
# query parameters
|
414
|
+
query_params = {}
|
415
|
+
|
416
|
+
# header parameters
|
417
|
+
header_params = {}
|
418
|
+
|
419
|
+
# HTTP header 'Accept' (if needed)
|
420
|
+
local_header_accept = ['application/json']
|
421
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
422
|
+
|
423
|
+
# HTTP header 'Content-Type'
|
424
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
425
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
426
|
+
|
427
|
+
# form parameters
|
428
|
+
form_params = {}
|
429
|
+
|
430
|
+
# http body (model)
|
431
|
+
post_body = nil
|
432
|
+
auth_names = ['oauth2']
|
433
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
434
|
+
:header_params => header_params,
|
435
|
+
:query_params => query_params,
|
436
|
+
:form_params => form_params,
|
437
|
+
:body => post_body,
|
438
|
+
:auth_names => auth_names,
|
439
|
+
:return_type => 'SpecOption')
|
440
|
+
if @api_client.config.debugging
|
441
|
+
@api_client.config.logger.debug "API called: SpecApi#get_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
442
|
+
end
|
443
|
+
return data, status_code, headers
|
444
|
+
end
|
445
|
+
|
446
|
+
#
|
447
|
+
#
|
448
|
+
# @param [Hash] opts the optional parameters
|
449
|
+
# @option opts [String] :search Word or phrase to search for.
|
450
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
451
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
452
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
453
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
454
|
+
# @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.???'
|
455
|
+
# @return [ListSpec]
|
456
|
+
def list(opts = {})
|
457
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
458
|
+
return data
|
459
|
+
end
|
460
|
+
|
461
|
+
#
|
462
|
+
#
|
463
|
+
# @param [Hash] opts the optional parameters
|
464
|
+
# @option opts [String] :search Word or phrase to search for.
|
465
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
466
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
467
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
468
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
469
|
+
# @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.???'
|
470
|
+
# @return [Array<(ListSpec, Fixnum, Hash)>] ListSpec data, response status code and response headers
|
471
|
+
def list_with_http_info(opts = {})
|
472
|
+
if @api_client.config.debugging
|
473
|
+
@api_client.config.logger.debug "Calling API: SpecApi.list ..."
|
474
|
+
end
|
475
|
+
# resource path
|
476
|
+
local_var_path = "/specs".sub('{format}','json')
|
477
|
+
|
478
|
+
# query parameters
|
479
|
+
query_params = {}
|
480
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
481
|
+
query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
|
482
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
483
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
484
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
485
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
486
|
+
|
487
|
+
# header parameters
|
488
|
+
header_params = {}
|
489
|
+
|
490
|
+
# HTTP header 'Accept' (if needed)
|
491
|
+
local_header_accept = ['application/json']
|
492
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
493
|
+
|
494
|
+
# HTTP header 'Content-Type'
|
495
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
496
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
497
|
+
|
498
|
+
# form parameters
|
499
|
+
form_params = {}
|
500
|
+
|
501
|
+
# http body (model)
|
502
|
+
post_body = nil
|
503
|
+
auth_names = ['oauth2']
|
504
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
505
|
+
:header_params => header_params,
|
506
|
+
:query_params => query_params,
|
507
|
+
:form_params => form_params,
|
508
|
+
:body => post_body,
|
509
|
+
:auth_names => auth_names,
|
510
|
+
:return_type => 'ListSpec')
|
511
|
+
if @api_client.config.debugging
|
512
|
+
@api_client.config.logger.debug "API called: SpecApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
513
|
+
end
|
514
|
+
return data, status_code, headers
|
515
|
+
end
|
516
|
+
|
517
|
+
#
|
518
|
+
#
|
519
|
+
# @param spec_id ID of the spec.
|
520
|
+
# @param [Hash] opts the optional parameters
|
521
|
+
# @option opts [String] :search Word or phrase to search for.
|
522
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
523
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
524
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
525
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
526
|
+
# @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.???'
|
527
|
+
# @return [ListSpecOption]
|
528
|
+
def list_options(spec_id, opts = {})
|
529
|
+
data, _status_code, _headers = list_options_with_http_info(spec_id, opts)
|
530
|
+
return data
|
531
|
+
end
|
532
|
+
|
533
|
+
#
|
534
|
+
#
|
535
|
+
# @param spec_id ID of the spec.
|
536
|
+
# @param [Hash] opts the optional parameters
|
537
|
+
# @option opts [String] :search Word or phrase to search for.
|
538
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
539
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
540
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
541
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
542
|
+
# @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.???'
|
543
|
+
# @return [Array<(ListSpecOption, Fixnum, Hash)>] ListSpecOption data, response status code and response headers
|
544
|
+
def list_options_with_http_info(spec_id, opts = {})
|
545
|
+
if @api_client.config.debugging
|
546
|
+
@api_client.config.logger.debug "Calling API: SpecApi.list_options ..."
|
547
|
+
end
|
548
|
+
# verify the required parameter 'spec_id' is set
|
549
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.list_options" if spec_id.nil?
|
550
|
+
# resource path
|
551
|
+
local_var_path = "/specs/{specID}/options".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s)
|
552
|
+
|
553
|
+
# query parameters
|
554
|
+
query_params = {}
|
555
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
556
|
+
query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
|
557
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
558
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
559
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
560
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
561
|
+
|
562
|
+
# header parameters
|
563
|
+
header_params = {}
|
564
|
+
|
565
|
+
# HTTP header 'Accept' (if needed)
|
566
|
+
local_header_accept = ['application/json']
|
567
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
568
|
+
|
569
|
+
# HTTP header 'Content-Type'
|
570
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
571
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
572
|
+
|
573
|
+
# form parameters
|
574
|
+
form_params = {}
|
575
|
+
|
576
|
+
# http body (model)
|
577
|
+
post_body = nil
|
578
|
+
auth_names = ['oauth2']
|
579
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
580
|
+
:header_params => header_params,
|
581
|
+
:query_params => query_params,
|
582
|
+
:form_params => form_params,
|
583
|
+
:body => post_body,
|
584
|
+
:auth_names => auth_names,
|
585
|
+
:return_type => 'ListSpecOption')
|
586
|
+
if @api_client.config.debugging
|
587
|
+
@api_client.config.logger.debug "API called: SpecApi#list_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
588
|
+
end
|
589
|
+
return data, status_code, headers
|
590
|
+
end
|
591
|
+
|
592
|
+
#
|
593
|
+
#
|
594
|
+
# @param [Hash] opts the optional parameters
|
595
|
+
# @option opts [String] :spec_id ID of the spec.
|
596
|
+
# @option opts [String] :product_id ID of the product.
|
597
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
598
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
599
|
+
# @return [ListSpecProductAssignment]
|
600
|
+
def list_product_assignments(opts = {})
|
601
|
+
data, _status_code, _headers = list_product_assignments_with_http_info(opts)
|
602
|
+
return data
|
603
|
+
end
|
604
|
+
|
605
|
+
#
|
606
|
+
#
|
607
|
+
# @param [Hash] opts the optional parameters
|
608
|
+
# @option opts [String] :spec_id ID of the spec.
|
609
|
+
# @option opts [String] :product_id ID of the product.
|
610
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
611
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
612
|
+
# @return [Array<(ListSpecProductAssignment, Fixnum, Hash)>] ListSpecProductAssignment data, response status code and response headers
|
613
|
+
def list_product_assignments_with_http_info(opts = {})
|
614
|
+
if @api_client.config.debugging
|
615
|
+
@api_client.config.logger.debug "Calling API: SpecApi.list_product_assignments ..."
|
616
|
+
end
|
617
|
+
# resource path
|
618
|
+
local_var_path = "/specs/productassignments".sub('{format}','json')
|
619
|
+
|
620
|
+
# query parameters
|
621
|
+
query_params = {}
|
622
|
+
query_params[:'specID'] = opts[:'spec_id'] if !opts[:'spec_id'].nil?
|
623
|
+
query_params[:'productID'] = opts[:'product_id'] if !opts[:'product_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 => 'ListSpecProductAssignment')
|
651
|
+
if @api_client.config.debugging
|
652
|
+
@api_client.config.logger.debug "API called: SpecApi#list_product_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 spec_id ID of the spec.
|
660
|
+
# @param spec
|
661
|
+
# @param [Hash] opts the optional parameters
|
662
|
+
# @return [Spec]
|
663
|
+
def patch(spec_id, spec, opts = {})
|
664
|
+
data, _status_code, _headers = patch_with_http_info(spec_id, spec, opts)
|
665
|
+
return data
|
666
|
+
end
|
667
|
+
|
668
|
+
#
|
669
|
+
#
|
670
|
+
# @param spec_id ID of the spec.
|
671
|
+
# @param spec
|
672
|
+
# @param [Hash] opts the optional parameters
|
673
|
+
# @return [Array<(Spec, Fixnum, Hash)>] Spec data, response status code and response headers
|
674
|
+
def patch_with_http_info(spec_id, spec, opts = {})
|
675
|
+
if @api_client.config.debugging
|
676
|
+
@api_client.config.logger.debug "Calling API: SpecApi.patch ..."
|
677
|
+
end
|
678
|
+
# verify the required parameter 'spec_id' is set
|
679
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.patch" if spec_id.nil?
|
680
|
+
# verify the required parameter 'spec' is set
|
681
|
+
fail ArgumentError, "Missing the required parameter 'spec' when calling SpecApi.patch" if spec.nil?
|
682
|
+
# resource path
|
683
|
+
local_var_path = "/specs/{specID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s)
|
684
|
+
|
685
|
+
# query parameters
|
686
|
+
query_params = {}
|
687
|
+
|
688
|
+
# header parameters
|
689
|
+
header_params = {}
|
690
|
+
|
691
|
+
# HTTP header 'Accept' (if needed)
|
692
|
+
local_header_accept = ['application/json']
|
693
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
694
|
+
|
695
|
+
# HTTP header 'Content-Type'
|
696
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
697
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
698
|
+
|
699
|
+
# form parameters
|
700
|
+
form_params = {}
|
701
|
+
|
702
|
+
# http body (model)
|
703
|
+
post_body = @api_client.object_to_http_body(spec)
|
704
|
+
auth_names = ['oauth2']
|
705
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
706
|
+
:header_params => header_params,
|
707
|
+
:query_params => query_params,
|
708
|
+
:form_params => form_params,
|
709
|
+
:body => post_body,
|
710
|
+
:auth_names => auth_names,
|
711
|
+
:return_type => 'Spec')
|
712
|
+
if @api_client.config.debugging
|
713
|
+
@api_client.config.logger.debug "API called: SpecApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
714
|
+
end
|
715
|
+
return data, status_code, headers
|
716
|
+
end
|
717
|
+
|
718
|
+
#
|
719
|
+
#
|
720
|
+
# @param spec_id ID of the spec.
|
721
|
+
# @param option_id ID of the option.
|
722
|
+
# @param option
|
723
|
+
# @param [Hash] opts the optional parameters
|
724
|
+
# @return [SpecOption]
|
725
|
+
def patch_option(spec_id, option_id, option, opts = {})
|
726
|
+
data, _status_code, _headers = patch_option_with_http_info(spec_id, option_id, option, opts)
|
727
|
+
return data
|
728
|
+
end
|
729
|
+
|
730
|
+
#
|
731
|
+
#
|
732
|
+
# @param spec_id ID of the spec.
|
733
|
+
# @param option_id ID of the option.
|
734
|
+
# @param option
|
735
|
+
# @param [Hash] opts the optional parameters
|
736
|
+
# @return [Array<(SpecOption, Fixnum, Hash)>] SpecOption data, response status code and response headers
|
737
|
+
def patch_option_with_http_info(spec_id, option_id, option, opts = {})
|
738
|
+
if @api_client.config.debugging
|
739
|
+
@api_client.config.logger.debug "Calling API: SpecApi.patch_option ..."
|
740
|
+
end
|
741
|
+
# verify the required parameter 'spec_id' is set
|
742
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.patch_option" if spec_id.nil?
|
743
|
+
# verify the required parameter 'option_id' is set
|
744
|
+
fail ArgumentError, "Missing the required parameter 'option_id' when calling SpecApi.patch_option" if option_id.nil?
|
745
|
+
# verify the required parameter 'option' is set
|
746
|
+
fail ArgumentError, "Missing the required parameter 'option' when calling SpecApi.patch_option" if option.nil?
|
747
|
+
# resource path
|
748
|
+
local_var_path = "/specs/{specID}/options/{optionID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s).sub('{' + 'optionID' + '}', option_id.to_s)
|
749
|
+
|
750
|
+
# query parameters
|
751
|
+
query_params = {}
|
752
|
+
|
753
|
+
# header parameters
|
754
|
+
header_params = {}
|
755
|
+
|
756
|
+
# HTTP header 'Accept' (if needed)
|
757
|
+
local_header_accept = ['application/json']
|
758
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
759
|
+
|
760
|
+
# HTTP header 'Content-Type'
|
761
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
762
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
763
|
+
|
764
|
+
# form parameters
|
765
|
+
form_params = {}
|
766
|
+
|
767
|
+
# http body (model)
|
768
|
+
post_body = @api_client.object_to_http_body(option)
|
769
|
+
auth_names = ['oauth2']
|
770
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
771
|
+
:header_params => header_params,
|
772
|
+
:query_params => query_params,
|
773
|
+
:form_params => form_params,
|
774
|
+
:body => post_body,
|
775
|
+
:auth_names => auth_names,
|
776
|
+
:return_type => 'SpecOption')
|
777
|
+
if @api_client.config.debugging
|
778
|
+
@api_client.config.logger.debug "API called: SpecApi#patch_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
779
|
+
end
|
780
|
+
return data, status_code, headers
|
781
|
+
end
|
782
|
+
|
783
|
+
#
|
784
|
+
#
|
785
|
+
# @param product_assignment
|
786
|
+
# @param [Hash] opts the optional parameters
|
787
|
+
# @return [nil]
|
788
|
+
def save_product_assignment(product_assignment, opts = {})
|
789
|
+
save_product_assignment_with_http_info(product_assignment, opts)
|
790
|
+
return nil
|
791
|
+
end
|
792
|
+
|
793
|
+
#
|
794
|
+
#
|
795
|
+
# @param product_assignment
|
796
|
+
# @param [Hash] opts the optional parameters
|
797
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
798
|
+
def save_product_assignment_with_http_info(product_assignment, opts = {})
|
799
|
+
if @api_client.config.debugging
|
800
|
+
@api_client.config.logger.debug "Calling API: SpecApi.save_product_assignment ..."
|
801
|
+
end
|
802
|
+
# verify the required parameter 'product_assignment' is set
|
803
|
+
fail ArgumentError, "Missing the required parameter 'product_assignment' when calling SpecApi.save_product_assignment" if product_assignment.nil?
|
804
|
+
# resource path
|
805
|
+
local_var_path = "/specs/productassignments".sub('{format}','json')
|
806
|
+
|
807
|
+
# query parameters
|
808
|
+
query_params = {}
|
809
|
+
|
810
|
+
# header parameters
|
811
|
+
header_params = {}
|
812
|
+
|
813
|
+
# HTTP header 'Accept' (if needed)
|
814
|
+
local_header_accept = ['application/json']
|
815
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
816
|
+
|
817
|
+
# HTTP header 'Content-Type'
|
818
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
819
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
820
|
+
|
821
|
+
# form parameters
|
822
|
+
form_params = {}
|
823
|
+
|
824
|
+
# http body (model)
|
825
|
+
post_body = @api_client.object_to_http_body(product_assignment)
|
826
|
+
auth_names = ['oauth2']
|
827
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
828
|
+
:header_params => header_params,
|
829
|
+
:query_params => query_params,
|
830
|
+
:form_params => form_params,
|
831
|
+
:body => post_body,
|
832
|
+
:auth_names => auth_names)
|
833
|
+
if @api_client.config.debugging
|
834
|
+
@api_client.config.logger.debug "API called: SpecApi#save_product_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
835
|
+
end
|
836
|
+
return data, status_code, headers
|
837
|
+
end
|
838
|
+
|
839
|
+
#
|
840
|
+
#
|
841
|
+
# @param spec_id ID of the spec.
|
842
|
+
# @param spec
|
843
|
+
# @param [Hash] opts the optional parameters
|
844
|
+
# @return [Spec]
|
845
|
+
def update(spec_id, spec, opts = {})
|
846
|
+
data, _status_code, _headers = update_with_http_info(spec_id, spec, opts)
|
847
|
+
return data
|
848
|
+
end
|
849
|
+
|
850
|
+
#
|
851
|
+
#
|
852
|
+
# @param spec_id ID of the spec.
|
853
|
+
# @param spec
|
854
|
+
# @param [Hash] opts the optional parameters
|
855
|
+
# @return [Array<(Spec, Fixnum, Hash)>] Spec data, response status code and response headers
|
856
|
+
def update_with_http_info(spec_id, spec, opts = {})
|
857
|
+
if @api_client.config.debugging
|
858
|
+
@api_client.config.logger.debug "Calling API: SpecApi.update ..."
|
859
|
+
end
|
860
|
+
# verify the required parameter 'spec_id' is set
|
861
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.update" if spec_id.nil?
|
862
|
+
# verify the required parameter 'spec' is set
|
863
|
+
fail ArgumentError, "Missing the required parameter 'spec' when calling SpecApi.update" if spec.nil?
|
864
|
+
# resource path
|
865
|
+
local_var_path = "/specs/{specID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s)
|
866
|
+
|
867
|
+
# query parameters
|
868
|
+
query_params = {}
|
869
|
+
|
870
|
+
# header parameters
|
871
|
+
header_params = {}
|
872
|
+
|
873
|
+
# HTTP header 'Accept' (if needed)
|
874
|
+
local_header_accept = ['application/json']
|
875
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
876
|
+
|
877
|
+
# HTTP header 'Content-Type'
|
878
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
879
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
880
|
+
|
881
|
+
# form parameters
|
882
|
+
form_params = {}
|
883
|
+
|
884
|
+
# http body (model)
|
885
|
+
post_body = @api_client.object_to_http_body(spec)
|
886
|
+
auth_names = ['oauth2']
|
887
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
888
|
+
:header_params => header_params,
|
889
|
+
:query_params => query_params,
|
890
|
+
:form_params => form_params,
|
891
|
+
:body => post_body,
|
892
|
+
:auth_names => auth_names,
|
893
|
+
:return_type => 'Spec')
|
894
|
+
if @api_client.config.debugging
|
895
|
+
@api_client.config.logger.debug "API called: SpecApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
896
|
+
end
|
897
|
+
return data, status_code, headers
|
898
|
+
end
|
899
|
+
|
900
|
+
#
|
901
|
+
#
|
902
|
+
# @param spec_id ID of the spec.
|
903
|
+
# @param option_id ID of the option.
|
904
|
+
# @param option
|
905
|
+
# @param [Hash] opts the optional parameters
|
906
|
+
# @return [SpecOption]
|
907
|
+
def update_option(spec_id, option_id, option, opts = {})
|
908
|
+
data, _status_code, _headers = update_option_with_http_info(spec_id, option_id, option, opts)
|
909
|
+
return data
|
910
|
+
end
|
911
|
+
|
912
|
+
#
|
913
|
+
#
|
914
|
+
# @param spec_id ID of the spec.
|
915
|
+
# @param option_id ID of the option.
|
916
|
+
# @param option
|
917
|
+
# @param [Hash] opts the optional parameters
|
918
|
+
# @return [Array<(SpecOption, Fixnum, Hash)>] SpecOption data, response status code and response headers
|
919
|
+
def update_option_with_http_info(spec_id, option_id, option, opts = {})
|
920
|
+
if @api_client.config.debugging
|
921
|
+
@api_client.config.logger.debug "Calling API: SpecApi.update_option ..."
|
922
|
+
end
|
923
|
+
# verify the required parameter 'spec_id' is set
|
924
|
+
fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.update_option" if spec_id.nil?
|
925
|
+
# verify the required parameter 'option_id' is set
|
926
|
+
fail ArgumentError, "Missing the required parameter 'option_id' when calling SpecApi.update_option" if option_id.nil?
|
927
|
+
# verify the required parameter 'option' is set
|
928
|
+
fail ArgumentError, "Missing the required parameter 'option' when calling SpecApi.update_option" if option.nil?
|
929
|
+
# resource path
|
930
|
+
local_var_path = "/specs/{specID}/options/{optionID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s).sub('{' + 'optionID' + '}', option_id.to_s)
|
931
|
+
|
932
|
+
# query parameters
|
933
|
+
query_params = {}
|
934
|
+
|
935
|
+
# header parameters
|
936
|
+
header_params = {}
|
937
|
+
|
938
|
+
# HTTP header 'Accept' (if needed)
|
939
|
+
local_header_accept = ['application/json']
|
940
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
941
|
+
|
942
|
+
# HTTP header 'Content-Type'
|
943
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
944
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
945
|
+
|
946
|
+
# form parameters
|
947
|
+
form_params = {}
|
948
|
+
|
949
|
+
# http body (model)
|
950
|
+
post_body = @api_client.object_to_http_body(option)
|
951
|
+
auth_names = ['oauth2']
|
952
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
953
|
+
:header_params => header_params,
|
954
|
+
:query_params => query_params,
|
955
|
+
:form_params => form_params,
|
956
|
+
:body => post_body,
|
957
|
+
:auth_names => auth_names,
|
958
|
+
:return_type => 'SpecOption')
|
959
|
+
if @api_client.config.debugging
|
960
|
+
@api_client.config.logger.debug "API called: SpecApi#update_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
961
|
+
end
|
962
|
+
return data, status_code, headers
|
963
|
+
end
|
964
|
+
end
|
965
|
+
end
|