order_cloud 1.0.45.pre.staging → 1.0.57
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +28 -0
- data/Gemfile.lock +34 -0
- data/LICENSE +201 -0
- data/README.md +552 -0
- data/Rakefile +31 -0
- data/docs/AccessToken.md +11 -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/AdminUserApi.md +324 -0
- data/docs/AdminUserGroupApi.md +482 -0
- data/docs/ApprovalRule.md +13 -0
- data/docs/ApprovalRuleApi.md +342 -0
- data/docs/BaseSpec.md +16 -0
- data/docs/Buyer.md +12 -0
- data/docs/BuyerAddress.md +23 -0
- data/docs/BuyerApi.md +324 -0
- data/docs/BuyerCreditCard.md +16 -0
- data/docs/BuyerProduct.md +23 -0
- data/docs/BuyerShipment.md +19 -0
- data/docs/BuyerSpec.md +17 -0
- data/docs/Catalog.md +13 -0
- data/docs/CatalogApi.md +640 -0
- data/docs/CatalogAssignment.md +11 -0
- data/docs/Category.md +15 -0
- data/docs/CategoryApi.md +690 -0
- data/docs/CategoryAssignment.md +12 -0
- data/docs/CategoryProductAssignment.md +10 -0
- data/docs/CostCenter.md +11 -0
- data/docs/CostCenterApi.md +516 -0
- data/docs/CostCenterAssignment.md +9 -0
- data/docs/CreditCard.md +15 -0
- data/docs/CreditCardApi.md +516 -0
- data/docs/CreditCardAssignment.md +10 -0
- data/docs/ImpersonateTokenRequest.md +9 -0
- data/docs/ImpersonationConfig.md +16 -0
- data/docs/ImpersonationConfigApi.md +324 -0
- data/docs/Inventory.md +13 -0
- data/docs/LineItem.md +24 -0
- data/docs/LineItemApi.md +478 -0
- data/docs/LineItemProduct.md +16 -0
- data/docs/LineItemSpec.md +11 -0
- data/docs/ListAddress.md +9 -0
- data/docs/ListAddressAssignment.md +9 -0
- data/docs/ListApprovalRule.md +9 -0
- data/docs/ListArgs.md +13 -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/ListBuyerShipment.md +9 -0
- data/docs/ListBuyerSpec.md +9 -0
- data/docs/ListCatalog.md +9 -0
- data/docs/ListCatalogAssignment.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/ListImpersonationConfig.md +9 -0
- data/docs/ListLineItem.md +9 -0
- data/docs/ListMessageCCListenerAssignment.md +9 -0
- data/docs/ListMessageConfig.md +9 -0
- data/docs/ListMessageSender.md +9 -0
- data/docs/ListMessageSenderAssignment.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/ListProductCatalogAssignment.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/ListShipmentItem.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/ListSupplier.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/MeApi.md +2002 -0
- data/docs/MeBuyer.md +9 -0
- data/docs/MeUser.md +19 -0
- data/docs/MessageCCListenerAssignment.md +13 -0
- data/docs/MessageConfig.md +14 -0
- data/docs/MessageSender.md +10 -0
- data/docs/MessageSenderAssignment.md +11 -0
- data/docs/MessageSendersApi.md +398 -0
- data/docs/Meta.md +12 -0
- data/docs/Order.md +30 -0
- data/docs/OrderApi.md +1161 -0
- data/docs/OrderApproval.md +14 -0
- data/docs/OrderApprovalInfo.md +9 -0
- data/docs/OrderPromotion.md +22 -0
- data/docs/PasswordReset.md +10 -0
- data/docs/PasswordResetApi.md +109 -0
- data/docs/PasswordResetRequest.md +11 -0
- data/docs/Payment.md +17 -0
- data/docs/PaymentApi.md +418 -0
- data/docs/PaymentTransaction.md +15 -0
- data/docs/PriceBreak.md +9 -0
- data/docs/PriceSchedule.md +17 -0
- data/docs/PriceScheduleApi.md +429 -0
- data/docs/Product.md +23 -0
- data/docs/ProductApi.md +953 -0
- data/docs/ProductAssignment.md +11 -0
- data/docs/ProductBase.md +22 -0
- data/docs/ProductCatalogAssignment.md +9 -0
- data/docs/Promotion.md +21 -0
- data/docs/PromotionApi.md +494 -0
- data/docs/PromotionAssignment.md +10 -0
- data/docs/SecurityProfile.md +10 -0
- data/docs/SecurityProfileApi.md +292 -0
- data/docs/SecurityProfileAssignment.md +12 -0
- data/docs/Shipment.md +20 -0
- data/docs/ShipmentApi.md +554 -0
- data/docs/ShipmentItem.md +16 -0
- data/docs/Spec.md +17 -0
- data/docs/SpecApi.md +820 -0
- data/docs/SpecOption.md +14 -0
- data/docs/SpecProductAssignment.md +11 -0
- data/docs/SpendingAccount.md +15 -0
- data/docs/SpendingAccountApi.md +516 -0
- data/docs/SpendingAccountAssignment.md +11 -0
- data/docs/Supplier.md +11 -0
- data/docs/SupplierApi.md +324 -0
- data/docs/SupplierUserApi.md +400 -0
- data/docs/SupplierUserGroupApi.md +509 -0
- data/docs/TokenPasswordReset.md +8 -0
- data/docs/User.md +18 -0
- data/docs/UserApi.md +400 -0
- data/docs/UserGroup.md +11 -0
- data/docs/UserGroupApi.md +509 -0
- data/docs/UserGroupAssignment.md +9 -0
- data/docs/Variant.md +12 -0
- data/git_push.sh +67 -0
- data/lib/order_cloud.rb +193 -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 +397 -0
- data/lib/order_cloud/api/admin_user_group_api.rb +578 -0
- data/lib/order_cloud/api/approval_rule_api.rb +421 -0
- data/lib/order_cloud/api/auth_api.rb +138 -0
- data/lib/order_cloud/api/buyer_api.rb +397 -0
- data/lib/order_cloud/api/catalog_api.rb +760 -0
- data/lib/order_cloud/api/category_api.rb +826 -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/impersonation_config_api.rb +397 -0
- data/lib/order_cloud/api/line_item_api.rb +583 -0
- data/lib/order_cloud/api/me_api.rb +2345 -0
- data/lib/order_cloud/api/message_senders_api.rb +484 -0
- data/lib/order_cloud/api/order_api.rb +1377 -0
- data/lib/order_cloud/api/password_reset_api.rb +150 -0
- data/lib/order_cloud/api/payment_api.rb +513 -0
- data/lib/order_cloud/api/price_schedule_api.rb +519 -0
- data/lib/order_cloud/api/product_api.rb +1126 -0
- data/lib/order_cloud/api/promotion_api.rb +594 -0
- data/lib/order_cloud/api/security_profile_api.rb +363 -0
- data/lib/order_cloud/api/shipment_api.rb +665 -0
- data/lib/order_cloud/api/spec_api.rb +971 -0
- data/lib/order_cloud/api/spending_account_api.rb +622 -0
- data/lib/order_cloud/api/supplier_api.rb +397 -0
- data/lib/order_cloud/api/supplier_user_api.rb +489 -0
- data/lib/order_cloud/api/supplier_user_group_api.rb +614 -0
- data/lib/order_cloud/api/user_api.rb +489 -0
- data/lib/order_cloud/api/user_group_api.rb +614 -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 +245 -0
- data/lib/order_cloud/models/access_token.rb +226 -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/approval_rule.rb +244 -0
- data/lib/order_cloud/models/base_spec.rb +271 -0
- data/lib/order_cloud/models/buyer.rb +235 -0
- data/lib/order_cloud/models/buyer_address.rb +334 -0
- data/lib/order_cloud/models/buyer_credit_card.rb +271 -0
- data/lib/order_cloud/models/buyer_product.rb +334 -0
- data/lib/order_cloud/models/buyer_shipment.rb +298 -0
- data/lib/order_cloud/models/buyer_spec.rb +282 -0
- data/lib/order_cloud/models/catalog.rb +244 -0
- data/lib/order_cloud/models/catalog_assignment.rb +226 -0
- data/lib/order_cloud/models/category.rb +262 -0
- data/lib/order_cloud/models/category_assignment.rb +235 -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 +208 -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/impersonate_token_request.rb +210 -0
- data/lib/order_cloud/models/impersonation_config.rb +271 -0
- data/lib/order_cloud/models/inventory.rb +244 -0
- data/lib/order_cloud/models/line_item.rb +345 -0
- data/lib/order_cloud/models/line_item_product.rb +271 -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_approval_rule.rb +210 -0
- data/lib/order_cloud/models/list_args.rb +248 -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_shipment.rb +210 -0
- data/lib/order_cloud/models/list_buyer_spec.rb +210 -0
- data/lib/order_cloud/models/list_catalog.rb +210 -0
- data/lib/order_cloud/models/list_catalog_assignment.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_impersonation_config.rb +210 -0
- data/lib/order_cloud/models/list_line_item.rb +210 -0
- data/lib/order_cloud/models/list_message_cc_listener_assignment.rb +210 -0
- data/lib/order_cloud/models/list_message_config.rb +210 -0
- data/lib/order_cloud/models/list_message_sender.rb +210 -0
- data/lib/order_cloud/models/list_message_sender_assignment.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_product_catalog_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_shipment_item.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_supplier.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/me_buyer.rb +208 -0
- data/lib/order_cloud/models/me_user.rb +300 -0
- data/lib/order_cloud/models/message_cc_listener_assignment.rb +244 -0
- data/lib/order_cloud/models/message_config.rb +255 -0
- data/lib/order_cloud/models/message_sender.rb +219 -0
- data/lib/order_cloud/models/message_sender_assignment.rb +226 -0
- data/lib/order_cloud/models/meta.rb +237 -0
- data/lib/order_cloud/models/order.rb +397 -0
- data/lib/order_cloud/models/order_approval.rb +253 -0
- data/lib/order_cloud/models/order_approval_info.rb +208 -0
- data/lib/order_cloud/models/order_promotion.rb +325 -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 +282 -0
- data/lib/order_cloud/models/payment_transaction.rb +262 -0
- data/lib/order_cloud/models/price_break.rb +208 -0
- data/lib/order_cloud/models/price_schedule.rb +282 -0
- data/lib/order_cloud/models/product.rb +334 -0
- data/lib/order_cloud/models/product_assignment.rb +226 -0
- data/lib/order_cloud/models/product_base.rb +325 -0
- data/lib/order_cloud/models/product_catalog_assignment.rb +208 -0
- data/lib/order_cloud/models/promotion.rb +316 -0
- data/lib/order_cloud/models/promotion_assignment.rb +217 -0
- data/lib/order_cloud/models/security_profile.rb +219 -0
- data/lib/order_cloud/models/security_profile_assignment.rb +235 -0
- data/lib/order_cloud/models/shipment.rb +307 -0
- data/lib/order_cloud/models/shipment_item.rb +273 -0
- data/lib/order_cloud/models/spec.rb +280 -0
- data/lib/order_cloud/models/spec_option.rb +253 -0
- data/lib/order_cloud/models/spec_product_assignment.rb +226 -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/supplier.rb +226 -0
- data/lib/order_cloud/models/token_password_reset.rb +199 -0
- data/lib/order_cloud/models/user.rb +291 -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/version.rb +26 -0
- data/order_cloud-1.0.56.gem +0 -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/admin_user_group_api_spec.rb +165 -0
- data/spec/api/approval_rule_api_spec.rb +131 -0
- data/spec/api/auth_api_spec.rb +165 -0
- data/spec/api/buyer_api_spec.rb +125 -0
- data/spec/api/catalog_api_spec.rb +205 -0
- data/spec/api/category_api_spec.rb +223 -0
- data/spec/api/cost_center_api_spec.rb +177 -0
- data/spec/api/credit_card_api_spec.rb +177 -0
- data/spec/api/impersonation_config_api_spec.rb +125 -0
- data/spec/api/line_item_api_spec.rb +167 -0
- data/spec/api/me_api_spec.rb +568 -0
- data/spec/api/message_senders_api_spec.rb +149 -0
- data/spec/api/order_api_spec.rb +344 -0
- data/spec/api/password_reset_api_spec.rb +71 -0
- data/spec/api/payment_api_spec.rb +152 -0
- data/spec/api/price_schedule_api_spec.rb +151 -0
- data/spec/api/product_api_spec.rb +290 -0
- data/spec/api/promotion_api_spec.rb +170 -0
- data/spec/api/security_profile_api_spec.rb +122 -0
- data/spec/api/shipment_api_spec.rb +185 -0
- data/spec/api/spec_api_spec.rb +252 -0
- data/spec/api/spending_account_api_spec.rb +177 -0
- data/spec/api/supplier_api_spec.rb +125 -0
- data/spec/api/supplier_user_api_spec.rb +146 -0
- data/spec/api/supplier_user_group_api_spec.rb +174 -0
- data/spec/api/user_api_spec.rb +146 -0
- data/spec/api/user_group_api_spec.rb +174 -0
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +80 -0
- data/spec/models/access_token_spec.rb +71 -0
- data/spec/models/address_assignment_spec.rb +77 -0
- data/spec/models/address_spec.rb +125 -0
- data/spec/models/approval_rule_spec.rb +83 -0
- data/spec/models/base_spec_spec.rb +101 -0
- data/spec/models/buyer_address_spec.rb +143 -0
- data/spec/models/buyer_credit_card_spec.rb +101 -0
- data/spec/models/buyer_product_spec.rb +143 -0
- data/spec/models/buyer_shipment_spec.rb +119 -0
- data/spec/models/buyer_spec.rb +77 -0
- data/spec/models/buyer_spec_spec.rb +107 -0
- data/spec/models/catalog_assignment_spec.rb +71 -0
- data/spec/models/catalog_spec.rb +83 -0
- data/spec/models/category_assignment_spec.rb +77 -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 +59 -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/impersonate_token_request_spec.rb +59 -0
- data/spec/models/impersonation_config_spec.rb +101 -0
- data/spec/models/inventory_spec.rb +83 -0
- data/spec/models/line_item_product_spec.rb +101 -0
- data/spec/models/line_item_spec.rb +149 -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_approval_rule_spec.rb +59 -0
- data/spec/models/list_args_spec.rb +83 -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_shipment_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_catalog_assignment_spec.rb +59 -0
- data/spec/models/list_catalog_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_impersonation_config_spec.rb +59 -0
- data/spec/models/list_line_item_spec.rb +59 -0
- data/spec/models/list_message_cc_listener_assignment_spec.rb +59 -0
- data/spec/models/list_message_config_spec.rb +59 -0
- data/spec/models/list_message_sender_assignment_spec.rb +59 -0
- data/spec/models/list_message_sender_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_catalog_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_item_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_supplier_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/me_buyer_spec.rb +59 -0
- data/spec/models/me_user_spec.rb +119 -0
- data/spec/models/message_cc_listener_assignment_spec.rb +83 -0
- data/spec/models/message_config_spec.rb +89 -0
- data/spec/models/message_sender_assignment_spec.rb +71 -0
- data/spec/models/message_sender_spec.rb +65 -0
- data/spec/models/meta_spec.rb +77 -0
- data/spec/models/order_approval_info_spec.rb +59 -0
- data/spec/models/order_approval_spec.rb +89 -0
- data/spec/models/order_promotion_spec.rb +137 -0
- data/spec/models/order_spec.rb +185 -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 +107 -0
- data/spec/models/payment_transaction_spec.rb +95 -0
- data/spec/models/price_break_spec.rb +59 -0
- data/spec/models/price_schedule_spec.rb +107 -0
- data/spec/models/product_assignment_spec.rb +71 -0
- data/spec/models/product_base_spec.rb +137 -0
- data/spec/models/product_catalog_assignment_spec.rb +59 -0
- data/spec/models/product_spec.rb +143 -0
- data/spec/models/promotion_assignment_spec.rb +65 -0
- data/spec/models/promotion_spec.rb +131 -0
- data/spec/models/security_profile_assignment_spec.rb +77 -0
- data/spec/models/security_profile_spec.rb +65 -0
- data/spec/models/shipment_item_spec.rb +101 -0
- data/spec/models/shipment_spec.rb +125 -0
- data/spec/models/spec_option_spec.rb +89 -0
- data/spec/models/spec_product_assignment_spec.rb +71 -0
- data/spec/models/spec_spec.rb +107 -0
- data/spec/models/spending_account_assignment_spec.rb +71 -0
- data/spec/models/spending_account_spec.rb +95 -0
- data/spec/models/supplier_spec.rb +71 -0
- data/spec/models/token_password_reset_spec.rb +53 -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 +113 -0
- data/spec/models/variant_spec.rb +77 -0
- data/spec/spec_helper.rb +122 -0
- metadata +596 -6
@@ -0,0 +1,1377 @@
|
|
1
|
+
=begin
|
2
|
+
#OrderCloud
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
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 OrderApi
|
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 direction Direction of the order. Possible values: Incoming, Outgoing.
|
37
|
+
# @param order_id ID of the order.
|
38
|
+
# @param promo_code Promo code of the order.
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [Promotion]
|
41
|
+
def add_promotion(direction, order_id, promo_code, opts = {})
|
42
|
+
data, _status_code, _headers = add_promotion_with_http_info(direction, order_id, promo_code, opts)
|
43
|
+
return data
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
#
|
48
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
49
|
+
# @param order_id ID of the order.
|
50
|
+
# @param promo_code Promo code of the order.
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @return [Array<(Promotion, Fixnum, Hash)>] Promotion data, response status code and response headers
|
53
|
+
def add_promotion_with_http_info(direction, order_id, promo_code, opts = {})
|
54
|
+
if @api_client.config.debugging
|
55
|
+
@api_client.config.logger.debug "Calling API: OrderApi.add_promotion ..."
|
56
|
+
end
|
57
|
+
# verify the required parameter 'direction' is set
|
58
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.add_promotion" if direction.nil?
|
59
|
+
# verify the required parameter 'order_id' is set
|
60
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.add_promotion" if order_id.nil?
|
61
|
+
# verify the required parameter 'promo_code' is set
|
62
|
+
fail ArgumentError, "Missing the required parameter 'promo_code' when calling OrderApi.add_promotion" if promo_code.nil?
|
63
|
+
# resource path
|
64
|
+
local_var_path = "/orders/{direction}/{orderID}/promotions/{promoCode}".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'promoCode' + '}', promo_code.to_s)
|
65
|
+
|
66
|
+
# query parameters
|
67
|
+
query_params = {}
|
68
|
+
|
69
|
+
# header parameters
|
70
|
+
header_params = {}
|
71
|
+
|
72
|
+
# HTTP header 'Accept' (if needed)
|
73
|
+
local_header_accept = ['application/json']
|
74
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
75
|
+
|
76
|
+
# HTTP header 'Content-Type'
|
77
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
78
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
79
|
+
|
80
|
+
# form parameters
|
81
|
+
form_params = {}
|
82
|
+
|
83
|
+
# http body (model)
|
84
|
+
post_body = nil
|
85
|
+
auth_names = ['oauth2']
|
86
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
87
|
+
:header_params => header_params,
|
88
|
+
:query_params => query_params,
|
89
|
+
:form_params => form_params,
|
90
|
+
:body => post_body,
|
91
|
+
:auth_names => auth_names,
|
92
|
+
:return_type => 'Promotion')
|
93
|
+
if @api_client.config.debugging
|
94
|
+
@api_client.config.logger.debug "API called: OrderApi#add_promotion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
95
|
+
end
|
96
|
+
return data, status_code, headers
|
97
|
+
end
|
98
|
+
|
99
|
+
#
|
100
|
+
#
|
101
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
102
|
+
# @param order_id ID of the order.
|
103
|
+
# @param info
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @return [Order]
|
106
|
+
def approve(direction, order_id, info, opts = {})
|
107
|
+
data, _status_code, _headers = approve_with_http_info(direction, order_id, info, opts)
|
108
|
+
return data
|
109
|
+
end
|
110
|
+
|
111
|
+
#
|
112
|
+
#
|
113
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
114
|
+
# @param order_id ID of the order.
|
115
|
+
# @param info
|
116
|
+
# @param [Hash] opts the optional parameters
|
117
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
118
|
+
def approve_with_http_info(direction, order_id, info, opts = {})
|
119
|
+
if @api_client.config.debugging
|
120
|
+
@api_client.config.logger.debug "Calling API: OrderApi.approve ..."
|
121
|
+
end
|
122
|
+
# verify the required parameter 'direction' is set
|
123
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.approve" if direction.nil?
|
124
|
+
# verify the required parameter 'order_id' is set
|
125
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.approve" if order_id.nil?
|
126
|
+
# verify the required parameter 'info' is set
|
127
|
+
fail ArgumentError, "Missing the required parameter 'info' when calling OrderApi.approve" if info.nil?
|
128
|
+
# resource path
|
129
|
+
local_var_path = "/orders/{direction}/{orderID}/approve".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
130
|
+
|
131
|
+
# query parameters
|
132
|
+
query_params = {}
|
133
|
+
|
134
|
+
# header parameters
|
135
|
+
header_params = {}
|
136
|
+
|
137
|
+
# HTTP header 'Accept' (if needed)
|
138
|
+
local_header_accept = ['application/json']
|
139
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
140
|
+
|
141
|
+
# HTTP header 'Content-Type'
|
142
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
143
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
144
|
+
|
145
|
+
# form parameters
|
146
|
+
form_params = {}
|
147
|
+
|
148
|
+
# http body (model)
|
149
|
+
post_body = @api_client.object_to_http_body(info)
|
150
|
+
auth_names = ['oauth2']
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
152
|
+
:header_params => header_params,
|
153
|
+
:query_params => query_params,
|
154
|
+
:form_params => form_params,
|
155
|
+
:body => post_body,
|
156
|
+
:auth_names => auth_names,
|
157
|
+
:return_type => 'Order')
|
158
|
+
if @api_client.config.debugging
|
159
|
+
@api_client.config.logger.debug "API called: OrderApi#approve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
160
|
+
end
|
161
|
+
return data, status_code, headers
|
162
|
+
end
|
163
|
+
|
164
|
+
#
|
165
|
+
#
|
166
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
167
|
+
# @param order_id ID of the order.
|
168
|
+
# @param [Hash] opts the optional parameters
|
169
|
+
# @return [Order]
|
170
|
+
def cancel(direction, order_id, opts = {})
|
171
|
+
data, _status_code, _headers = cancel_with_http_info(direction, order_id, opts)
|
172
|
+
return data
|
173
|
+
end
|
174
|
+
|
175
|
+
#
|
176
|
+
#
|
177
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
178
|
+
# @param order_id ID of the order.
|
179
|
+
# @param [Hash] opts the optional parameters
|
180
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
181
|
+
def cancel_with_http_info(direction, order_id, opts = {})
|
182
|
+
if @api_client.config.debugging
|
183
|
+
@api_client.config.logger.debug "Calling API: OrderApi.cancel ..."
|
184
|
+
end
|
185
|
+
# verify the required parameter 'direction' is set
|
186
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.cancel" if direction.nil?
|
187
|
+
# verify the required parameter 'order_id' is set
|
188
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.cancel" if order_id.nil?
|
189
|
+
# resource path
|
190
|
+
local_var_path = "/orders/{direction}/{orderID}/cancel".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
191
|
+
|
192
|
+
# query parameters
|
193
|
+
query_params = {}
|
194
|
+
|
195
|
+
# header parameters
|
196
|
+
header_params = {}
|
197
|
+
|
198
|
+
# HTTP header 'Accept' (if needed)
|
199
|
+
local_header_accept = ['application/json']
|
200
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
201
|
+
|
202
|
+
# HTTP header 'Content-Type'
|
203
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
204
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
205
|
+
|
206
|
+
# form parameters
|
207
|
+
form_params = {}
|
208
|
+
|
209
|
+
# http body (model)
|
210
|
+
post_body = nil
|
211
|
+
auth_names = ['oauth2']
|
212
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
213
|
+
:header_params => header_params,
|
214
|
+
:query_params => query_params,
|
215
|
+
:form_params => form_params,
|
216
|
+
:body => post_body,
|
217
|
+
:auth_names => auth_names,
|
218
|
+
:return_type => 'Order')
|
219
|
+
if @api_client.config.debugging
|
220
|
+
@api_client.config.logger.debug "API called: OrderApi#cancel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
221
|
+
end
|
222
|
+
return data, status_code, headers
|
223
|
+
end
|
224
|
+
|
225
|
+
#
|
226
|
+
#
|
227
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
228
|
+
# @param order
|
229
|
+
# @param [Hash] opts the optional parameters
|
230
|
+
# @return [Order]
|
231
|
+
def create(direction, order, opts = {})
|
232
|
+
data, _status_code, _headers = create_with_http_info(direction, order, opts)
|
233
|
+
return data
|
234
|
+
end
|
235
|
+
|
236
|
+
#
|
237
|
+
#
|
238
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
239
|
+
# @param order
|
240
|
+
# @param [Hash] opts the optional parameters
|
241
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
242
|
+
def create_with_http_info(direction, order, opts = {})
|
243
|
+
if @api_client.config.debugging
|
244
|
+
@api_client.config.logger.debug "Calling API: OrderApi.create ..."
|
245
|
+
end
|
246
|
+
# verify the required parameter 'direction' is set
|
247
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.create" if direction.nil?
|
248
|
+
# verify the required parameter 'order' is set
|
249
|
+
fail ArgumentError, "Missing the required parameter 'order' when calling OrderApi.create" if order.nil?
|
250
|
+
# resource path
|
251
|
+
local_var_path = "/orders/{direction}".sub('{format}','json').sub('{' + 'direction' + '}', direction.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 = @api_client.object_to_http_body(order)
|
272
|
+
auth_names = ['oauth2']
|
273
|
+
data, status_code, headers = @api_client.call_api(:POST, 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
|
+
:return_type => 'Order')
|
280
|
+
if @api_client.config.debugging
|
281
|
+
@api_client.config.logger.debug "API called: OrderApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
282
|
+
end
|
283
|
+
return data, status_code, headers
|
284
|
+
end
|
285
|
+
|
286
|
+
#
|
287
|
+
#
|
288
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
289
|
+
# @param order_id ID of the order.
|
290
|
+
# @param info
|
291
|
+
# @param [Hash] opts the optional parameters
|
292
|
+
# @return [Order]
|
293
|
+
def decline(direction, order_id, info, opts = {})
|
294
|
+
data, _status_code, _headers = decline_with_http_info(direction, order_id, info, opts)
|
295
|
+
return data
|
296
|
+
end
|
297
|
+
|
298
|
+
#
|
299
|
+
#
|
300
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
301
|
+
# @param order_id ID of the order.
|
302
|
+
# @param info
|
303
|
+
# @param [Hash] opts the optional parameters
|
304
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
305
|
+
def decline_with_http_info(direction, order_id, info, opts = {})
|
306
|
+
if @api_client.config.debugging
|
307
|
+
@api_client.config.logger.debug "Calling API: OrderApi.decline ..."
|
308
|
+
end
|
309
|
+
# verify the required parameter 'direction' is set
|
310
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.decline" if direction.nil?
|
311
|
+
# verify the required parameter 'order_id' is set
|
312
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.decline" if order_id.nil?
|
313
|
+
# verify the required parameter 'info' is set
|
314
|
+
fail ArgumentError, "Missing the required parameter 'info' when calling OrderApi.decline" if info.nil?
|
315
|
+
# resource path
|
316
|
+
local_var_path = "/orders/{direction}/{orderID}/decline".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
317
|
+
|
318
|
+
# query parameters
|
319
|
+
query_params = {}
|
320
|
+
|
321
|
+
# header parameters
|
322
|
+
header_params = {}
|
323
|
+
|
324
|
+
# HTTP header 'Accept' (if needed)
|
325
|
+
local_header_accept = ['application/json']
|
326
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
327
|
+
|
328
|
+
# HTTP header 'Content-Type'
|
329
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
330
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
331
|
+
|
332
|
+
# form parameters
|
333
|
+
form_params = {}
|
334
|
+
|
335
|
+
# http body (model)
|
336
|
+
post_body = @api_client.object_to_http_body(info)
|
337
|
+
auth_names = ['oauth2']
|
338
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
339
|
+
:header_params => header_params,
|
340
|
+
:query_params => query_params,
|
341
|
+
:form_params => form_params,
|
342
|
+
:body => post_body,
|
343
|
+
:auth_names => auth_names,
|
344
|
+
:return_type => 'Order')
|
345
|
+
if @api_client.config.debugging
|
346
|
+
@api_client.config.logger.debug "API called: OrderApi#decline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
347
|
+
end
|
348
|
+
return data, status_code, headers
|
349
|
+
end
|
350
|
+
|
351
|
+
#
|
352
|
+
#
|
353
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
354
|
+
# @param order_id ID of the order.
|
355
|
+
# @param [Hash] opts the optional parameters
|
356
|
+
# @return [nil]
|
357
|
+
def delete(direction, order_id, opts = {})
|
358
|
+
delete_with_http_info(direction, order_id, opts)
|
359
|
+
return nil
|
360
|
+
end
|
361
|
+
|
362
|
+
#
|
363
|
+
#
|
364
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
365
|
+
# @param order_id ID of the order.
|
366
|
+
# @param [Hash] opts the optional parameters
|
367
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
368
|
+
def delete_with_http_info(direction, order_id, opts = {})
|
369
|
+
if @api_client.config.debugging
|
370
|
+
@api_client.config.logger.debug "Calling API: OrderApi.delete ..."
|
371
|
+
end
|
372
|
+
# verify the required parameter 'direction' is set
|
373
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.delete" if direction.nil?
|
374
|
+
# verify the required parameter 'order_id' is set
|
375
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.delete" if order_id.nil?
|
376
|
+
# resource path
|
377
|
+
local_var_path = "/orders/{direction}/{orderID}".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
378
|
+
|
379
|
+
# query parameters
|
380
|
+
query_params = {}
|
381
|
+
|
382
|
+
# header parameters
|
383
|
+
header_params = {}
|
384
|
+
|
385
|
+
# HTTP header 'Accept' (if needed)
|
386
|
+
local_header_accept = ['application/json']
|
387
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
388
|
+
|
389
|
+
# HTTP header 'Content-Type'
|
390
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
391
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
392
|
+
|
393
|
+
# form parameters
|
394
|
+
form_params = {}
|
395
|
+
|
396
|
+
# http body (model)
|
397
|
+
post_body = nil
|
398
|
+
auth_names = ['oauth2']
|
399
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
400
|
+
:header_params => header_params,
|
401
|
+
:query_params => query_params,
|
402
|
+
:form_params => form_params,
|
403
|
+
:body => post_body,
|
404
|
+
:auth_names => auth_names)
|
405
|
+
if @api_client.config.debugging
|
406
|
+
@api_client.config.logger.debug "API called: OrderApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
407
|
+
end
|
408
|
+
return data, status_code, headers
|
409
|
+
end
|
410
|
+
|
411
|
+
#
|
412
|
+
#
|
413
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
414
|
+
# @param order_id ID of the order.
|
415
|
+
# @param [Hash] opts the optional parameters
|
416
|
+
# @return [Order]
|
417
|
+
def get(direction, order_id, opts = {})
|
418
|
+
data, _status_code, _headers = get_with_http_info(direction, order_id, opts)
|
419
|
+
return data
|
420
|
+
end
|
421
|
+
|
422
|
+
#
|
423
|
+
#
|
424
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
425
|
+
# @param order_id ID of the order.
|
426
|
+
# @param [Hash] opts the optional parameters
|
427
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
428
|
+
def get_with_http_info(direction, order_id, opts = {})
|
429
|
+
if @api_client.config.debugging
|
430
|
+
@api_client.config.logger.debug "Calling API: OrderApi.get ..."
|
431
|
+
end
|
432
|
+
# verify the required parameter 'direction' is set
|
433
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.get" if direction.nil?
|
434
|
+
# verify the required parameter 'order_id' is set
|
435
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.get" if order_id.nil?
|
436
|
+
# resource path
|
437
|
+
local_var_path = "/orders/{direction}/{orderID}".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
438
|
+
|
439
|
+
# query parameters
|
440
|
+
query_params = {}
|
441
|
+
|
442
|
+
# header parameters
|
443
|
+
header_params = {}
|
444
|
+
|
445
|
+
# HTTP header 'Accept' (if needed)
|
446
|
+
local_header_accept = ['application/json']
|
447
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
448
|
+
|
449
|
+
# HTTP header 'Content-Type'
|
450
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
451
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
452
|
+
|
453
|
+
# form parameters
|
454
|
+
form_params = {}
|
455
|
+
|
456
|
+
# http body (model)
|
457
|
+
post_body = nil
|
458
|
+
auth_names = ['oauth2']
|
459
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
460
|
+
:header_params => header_params,
|
461
|
+
:query_params => query_params,
|
462
|
+
:form_params => form_params,
|
463
|
+
:body => post_body,
|
464
|
+
:auth_names => auth_names,
|
465
|
+
:return_type => 'Order')
|
466
|
+
if @api_client.config.debugging
|
467
|
+
@api_client.config.logger.debug "API called: OrderApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
468
|
+
end
|
469
|
+
return data, status_code, headers
|
470
|
+
end
|
471
|
+
|
472
|
+
#
|
473
|
+
#
|
474
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
475
|
+
# @param [Hash] opts the optional parameters
|
476
|
+
# @option opts [String] :buyer_id ID of the buyer.
|
477
|
+
# @option opts [String] :supplier_id ID of the supplier.
|
478
|
+
# @option opts [String] :from Lower bound of date range that the order was created.
|
479
|
+
# @option opts [String] :to Upper bound of date range that the order was created.
|
480
|
+
# @option opts [String] :search Search of the order.
|
481
|
+
# @option opts [Array<String>] :search_on Search on of the order.
|
482
|
+
# @option opts [Array<String>] :sort_by Sort by of the order.
|
483
|
+
# @option opts [Integer] :page Page of the order.
|
484
|
+
# @option opts [Integer] :page_size Page size of the order.
|
485
|
+
# @option opts [Hash<String, String>] :filters Filters of the order.
|
486
|
+
# @return [ListOrder]
|
487
|
+
def list(direction, opts = {})
|
488
|
+
data, _status_code, _headers = list_with_http_info(direction, opts)
|
489
|
+
return data
|
490
|
+
end
|
491
|
+
|
492
|
+
#
|
493
|
+
#
|
494
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
495
|
+
# @param [Hash] opts the optional parameters
|
496
|
+
# @option opts [String] :buyer_id ID of the buyer.
|
497
|
+
# @option opts [String] :supplier_id ID of the supplier.
|
498
|
+
# @option opts [String] :from Lower bound of date range that the order was created.
|
499
|
+
# @option opts [String] :to Upper bound of date range that the order was created.
|
500
|
+
# @option opts [String] :search Search of the order.
|
501
|
+
# @option opts [Array<String>] :search_on Search on of the order.
|
502
|
+
# @option opts [Array<String>] :sort_by Sort by of the order.
|
503
|
+
# @option opts [Integer] :page Page of the order.
|
504
|
+
# @option opts [Integer] :page_size Page size of the order.
|
505
|
+
# @option opts [Hash<String, String>] :filters Filters of the order.
|
506
|
+
# @return [Array<(ListOrder, Fixnum, Hash)>] ListOrder data, response status code and response headers
|
507
|
+
def list_with_http_info(direction, opts = {})
|
508
|
+
if @api_client.config.debugging
|
509
|
+
@api_client.config.logger.debug "Calling API: OrderApi.list ..."
|
510
|
+
end
|
511
|
+
# verify the required parameter 'direction' is set
|
512
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.list" if direction.nil?
|
513
|
+
# resource path
|
514
|
+
local_var_path = "/orders/{direction}".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s)
|
515
|
+
|
516
|
+
# query parameters
|
517
|
+
query_params = {}
|
518
|
+
query_params[:'buyerID'] = opts[:'buyer_id'] if !opts[:'buyer_id'].nil?
|
519
|
+
query_params[:'supplierID'] = opts[:'supplier_id'] if !opts[:'supplier_id'].nil?
|
520
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
521
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
522
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
523
|
+
query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
|
524
|
+
query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
|
525
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
526
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
527
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
528
|
+
|
529
|
+
# header parameters
|
530
|
+
header_params = {}
|
531
|
+
|
532
|
+
# HTTP header 'Accept' (if needed)
|
533
|
+
local_header_accept = ['application/json']
|
534
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
535
|
+
|
536
|
+
# HTTP header 'Content-Type'
|
537
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
538
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
539
|
+
|
540
|
+
# form parameters
|
541
|
+
form_params = {}
|
542
|
+
|
543
|
+
# http body (model)
|
544
|
+
post_body = nil
|
545
|
+
auth_names = ['oauth2']
|
546
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
547
|
+
:header_params => header_params,
|
548
|
+
:query_params => query_params,
|
549
|
+
:form_params => form_params,
|
550
|
+
:body => post_body,
|
551
|
+
:auth_names => auth_names,
|
552
|
+
:return_type => 'ListOrder')
|
553
|
+
if @api_client.config.debugging
|
554
|
+
@api_client.config.logger.debug "API called: OrderApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
555
|
+
end
|
556
|
+
return data, status_code, headers
|
557
|
+
end
|
558
|
+
|
559
|
+
#
|
560
|
+
#
|
561
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
562
|
+
# @param order_id ID of the order.
|
563
|
+
# @param [Hash] opts the optional parameters
|
564
|
+
# @option opts [String] :search Search of the order.
|
565
|
+
# @option opts [Array<String>] :search_on Search on of the order.
|
566
|
+
# @option opts [Array<String>] :sort_by Sort by of the order.
|
567
|
+
# @option opts [Integer] :page Page of the order.
|
568
|
+
# @option opts [Integer] :page_size Page size of the order.
|
569
|
+
# @option opts [Hash<String, String>] :filters Filters of the order.
|
570
|
+
# @return [ListOrderApproval]
|
571
|
+
def list_approvals(direction, order_id, opts = {})
|
572
|
+
data, _status_code, _headers = list_approvals_with_http_info(direction, order_id, opts)
|
573
|
+
return data
|
574
|
+
end
|
575
|
+
|
576
|
+
#
|
577
|
+
#
|
578
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
579
|
+
# @param order_id ID of the order.
|
580
|
+
# @param [Hash] opts the optional parameters
|
581
|
+
# @option opts [String] :search Search of the order.
|
582
|
+
# @option opts [Array<String>] :search_on Search on of the order.
|
583
|
+
# @option opts [Array<String>] :sort_by Sort by of the order.
|
584
|
+
# @option opts [Integer] :page Page of the order.
|
585
|
+
# @option opts [Integer] :page_size Page size of the order.
|
586
|
+
# @option opts [Hash<String, String>] :filters Filters of the order.
|
587
|
+
# @return [Array<(ListOrderApproval, Fixnum, Hash)>] ListOrderApproval data, response status code and response headers
|
588
|
+
def list_approvals_with_http_info(direction, order_id, opts = {})
|
589
|
+
if @api_client.config.debugging
|
590
|
+
@api_client.config.logger.debug "Calling API: OrderApi.list_approvals ..."
|
591
|
+
end
|
592
|
+
# verify the required parameter 'direction' is set
|
593
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.list_approvals" if direction.nil?
|
594
|
+
# verify the required parameter 'order_id' is set
|
595
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.list_approvals" if order_id.nil?
|
596
|
+
# resource path
|
597
|
+
local_var_path = "/orders/{direction}/{orderID}/approvals".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
598
|
+
|
599
|
+
# query parameters
|
600
|
+
query_params = {}
|
601
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
602
|
+
query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
|
603
|
+
query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
|
604
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
605
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
606
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
607
|
+
|
608
|
+
# header parameters
|
609
|
+
header_params = {}
|
610
|
+
|
611
|
+
# HTTP header 'Accept' (if needed)
|
612
|
+
local_header_accept = ['application/json']
|
613
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
614
|
+
|
615
|
+
# HTTP header 'Content-Type'
|
616
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
617
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
618
|
+
|
619
|
+
# form parameters
|
620
|
+
form_params = {}
|
621
|
+
|
622
|
+
# http body (model)
|
623
|
+
post_body = nil
|
624
|
+
auth_names = ['oauth2']
|
625
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
626
|
+
:header_params => header_params,
|
627
|
+
:query_params => query_params,
|
628
|
+
:form_params => form_params,
|
629
|
+
:body => post_body,
|
630
|
+
:auth_names => auth_names,
|
631
|
+
:return_type => 'ListOrderApproval')
|
632
|
+
if @api_client.config.debugging
|
633
|
+
@api_client.config.logger.debug "API called: OrderApi#list_approvals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
634
|
+
end
|
635
|
+
return data, status_code, headers
|
636
|
+
end
|
637
|
+
|
638
|
+
#
|
639
|
+
#
|
640
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
641
|
+
# @param order_id ID of the order.
|
642
|
+
# @param [Hash] opts the optional parameters
|
643
|
+
# @option opts [String] :search Search of the order.
|
644
|
+
# @option opts [Array<String>] :search_on Search on of the order.
|
645
|
+
# @option opts [Array<String>] :sort_by Sort by of the order.
|
646
|
+
# @option opts [Integer] :page Page of the order.
|
647
|
+
# @option opts [Integer] :page_size Page size of the order.
|
648
|
+
# @option opts [Hash<String, String>] :filters Filters of the order.
|
649
|
+
# @return [ListUser]
|
650
|
+
def list_eligible_approvers(direction, order_id, opts = {})
|
651
|
+
data, _status_code, _headers = list_eligible_approvers_with_http_info(direction, order_id, opts)
|
652
|
+
return data
|
653
|
+
end
|
654
|
+
|
655
|
+
#
|
656
|
+
#
|
657
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
658
|
+
# @param order_id ID of the order.
|
659
|
+
# @param [Hash] opts the optional parameters
|
660
|
+
# @option opts [String] :search Search of the order.
|
661
|
+
# @option opts [Array<String>] :search_on Search on of the order.
|
662
|
+
# @option opts [Array<String>] :sort_by Sort by of the order.
|
663
|
+
# @option opts [Integer] :page Page of the order.
|
664
|
+
# @option opts [Integer] :page_size Page size of the order.
|
665
|
+
# @option opts [Hash<String, String>] :filters Filters of the order.
|
666
|
+
# @return [Array<(ListUser, Fixnum, Hash)>] ListUser data, response status code and response headers
|
667
|
+
def list_eligible_approvers_with_http_info(direction, order_id, opts = {})
|
668
|
+
if @api_client.config.debugging
|
669
|
+
@api_client.config.logger.debug "Calling API: OrderApi.list_eligible_approvers ..."
|
670
|
+
end
|
671
|
+
# verify the required parameter 'direction' is set
|
672
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.list_eligible_approvers" if direction.nil?
|
673
|
+
# verify the required parameter 'order_id' is set
|
674
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.list_eligible_approvers" if order_id.nil?
|
675
|
+
# resource path
|
676
|
+
local_var_path = "/orders/{direction}/{orderID}/eligibleapprovers".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
677
|
+
|
678
|
+
# query parameters
|
679
|
+
query_params = {}
|
680
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
681
|
+
query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
|
682
|
+
query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
|
683
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
684
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
685
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
686
|
+
|
687
|
+
# header parameters
|
688
|
+
header_params = {}
|
689
|
+
|
690
|
+
# HTTP header 'Accept' (if needed)
|
691
|
+
local_header_accept = ['application/json']
|
692
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
693
|
+
|
694
|
+
# HTTP header 'Content-Type'
|
695
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
696
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
697
|
+
|
698
|
+
# form parameters
|
699
|
+
form_params = {}
|
700
|
+
|
701
|
+
# http body (model)
|
702
|
+
post_body = nil
|
703
|
+
auth_names = ['oauth2']
|
704
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
705
|
+
:header_params => header_params,
|
706
|
+
:query_params => query_params,
|
707
|
+
:form_params => form_params,
|
708
|
+
:body => post_body,
|
709
|
+
:auth_names => auth_names,
|
710
|
+
:return_type => 'ListUser')
|
711
|
+
if @api_client.config.debugging
|
712
|
+
@api_client.config.logger.debug "API called: OrderApi#list_eligible_approvers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
713
|
+
end
|
714
|
+
return data, status_code, headers
|
715
|
+
end
|
716
|
+
|
717
|
+
#
|
718
|
+
#
|
719
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
720
|
+
# @param order_id ID of the order.
|
721
|
+
# @param [Hash] opts the optional parameters
|
722
|
+
# @option opts [String] :search Search of the order.
|
723
|
+
# @option opts [Array<String>] :search_on Search on of the order.
|
724
|
+
# @option opts [Array<String>] :sort_by Sort by of the order.
|
725
|
+
# @option opts [Integer] :page Page of the order.
|
726
|
+
# @option opts [Integer] :page_size Page size of the order.
|
727
|
+
# @option opts [Hash<String, String>] :filters Filters of the order.
|
728
|
+
# @return [ListOrderPromotion]
|
729
|
+
def list_promotions(direction, order_id, opts = {})
|
730
|
+
data, _status_code, _headers = list_promotions_with_http_info(direction, order_id, opts)
|
731
|
+
return data
|
732
|
+
end
|
733
|
+
|
734
|
+
#
|
735
|
+
#
|
736
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
737
|
+
# @param order_id ID of the order.
|
738
|
+
# @param [Hash] opts the optional parameters
|
739
|
+
# @option opts [String] :search Search of the order.
|
740
|
+
# @option opts [Array<String>] :search_on Search on of the order.
|
741
|
+
# @option opts [Array<String>] :sort_by Sort by of the order.
|
742
|
+
# @option opts [Integer] :page Page of the order.
|
743
|
+
# @option opts [Integer] :page_size Page size of the order.
|
744
|
+
# @option opts [Hash<String, String>] :filters Filters of the order.
|
745
|
+
# @return [Array<(ListOrderPromotion, Fixnum, Hash)>] ListOrderPromotion data, response status code and response headers
|
746
|
+
def list_promotions_with_http_info(direction, order_id, opts = {})
|
747
|
+
if @api_client.config.debugging
|
748
|
+
@api_client.config.logger.debug "Calling API: OrderApi.list_promotions ..."
|
749
|
+
end
|
750
|
+
# verify the required parameter 'direction' is set
|
751
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.list_promotions" if direction.nil?
|
752
|
+
# verify the required parameter 'order_id' is set
|
753
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.list_promotions" if order_id.nil?
|
754
|
+
# resource path
|
755
|
+
local_var_path = "/orders/{direction}/{orderID}/promotions".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
756
|
+
|
757
|
+
# query parameters
|
758
|
+
query_params = {}
|
759
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
760
|
+
query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
|
761
|
+
query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
|
762
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
763
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
764
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
765
|
+
|
766
|
+
# header parameters
|
767
|
+
header_params = {}
|
768
|
+
|
769
|
+
# HTTP header 'Accept' (if needed)
|
770
|
+
local_header_accept = ['application/json']
|
771
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
772
|
+
|
773
|
+
# HTTP header 'Content-Type'
|
774
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
775
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
776
|
+
|
777
|
+
# form parameters
|
778
|
+
form_params = {}
|
779
|
+
|
780
|
+
# http body (model)
|
781
|
+
post_body = nil
|
782
|
+
auth_names = ['oauth2']
|
783
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
784
|
+
:header_params => header_params,
|
785
|
+
:query_params => query_params,
|
786
|
+
:form_params => form_params,
|
787
|
+
:body => post_body,
|
788
|
+
:auth_names => auth_names,
|
789
|
+
:return_type => 'ListOrderPromotion')
|
790
|
+
if @api_client.config.debugging
|
791
|
+
@api_client.config.logger.debug "API called: OrderApi#list_promotions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
792
|
+
end
|
793
|
+
return data, status_code, headers
|
794
|
+
end
|
795
|
+
|
796
|
+
#
|
797
|
+
#
|
798
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
799
|
+
# @param order_id ID of the order.
|
800
|
+
# @param partial_order
|
801
|
+
# @param [Hash] opts the optional parameters
|
802
|
+
# @return [Order]
|
803
|
+
def patch(direction, order_id, partial_order, opts = {})
|
804
|
+
data, _status_code, _headers = patch_with_http_info(direction, order_id, partial_order, opts)
|
805
|
+
return data
|
806
|
+
end
|
807
|
+
|
808
|
+
#
|
809
|
+
#
|
810
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
811
|
+
# @param order_id ID of the order.
|
812
|
+
# @param partial_order
|
813
|
+
# @param [Hash] opts the optional parameters
|
814
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
815
|
+
def patch_with_http_info(direction, order_id, partial_order, opts = {})
|
816
|
+
if @api_client.config.debugging
|
817
|
+
@api_client.config.logger.debug "Calling API: OrderApi.patch ..."
|
818
|
+
end
|
819
|
+
# verify the required parameter 'direction' is set
|
820
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.patch" if direction.nil?
|
821
|
+
# verify the required parameter 'order_id' is set
|
822
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.patch" if order_id.nil?
|
823
|
+
# verify the required parameter 'partial_order' is set
|
824
|
+
fail ArgumentError, "Missing the required parameter 'partial_order' when calling OrderApi.patch" if partial_order.nil?
|
825
|
+
# resource path
|
826
|
+
local_var_path = "/orders/{direction}/{orderID}".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
827
|
+
|
828
|
+
# query parameters
|
829
|
+
query_params = {}
|
830
|
+
|
831
|
+
# header parameters
|
832
|
+
header_params = {}
|
833
|
+
|
834
|
+
# HTTP header 'Accept' (if needed)
|
835
|
+
local_header_accept = ['application/json']
|
836
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
837
|
+
|
838
|
+
# HTTP header 'Content-Type'
|
839
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
840
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
841
|
+
|
842
|
+
# form parameters
|
843
|
+
form_params = {}
|
844
|
+
|
845
|
+
# http body (model)
|
846
|
+
post_body = @api_client.object_to_http_body(partial_order)
|
847
|
+
auth_names = ['oauth2']
|
848
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
849
|
+
:header_params => header_params,
|
850
|
+
:query_params => query_params,
|
851
|
+
:form_params => form_params,
|
852
|
+
:body => post_body,
|
853
|
+
:auth_names => auth_names,
|
854
|
+
:return_type => 'Order')
|
855
|
+
if @api_client.config.debugging
|
856
|
+
@api_client.config.logger.debug "API called: OrderApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
857
|
+
end
|
858
|
+
return data, status_code, headers
|
859
|
+
end
|
860
|
+
|
861
|
+
#
|
862
|
+
#
|
863
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
864
|
+
# @param order_id ID of the order.
|
865
|
+
# @param address
|
866
|
+
# @param [Hash] opts the optional parameters
|
867
|
+
# @return [Order]
|
868
|
+
def patch_billing_address(direction, order_id, address, opts = {})
|
869
|
+
data, _status_code, _headers = patch_billing_address_with_http_info(direction, order_id, address, opts)
|
870
|
+
return data
|
871
|
+
end
|
872
|
+
|
873
|
+
#
|
874
|
+
#
|
875
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
876
|
+
# @param order_id ID of the order.
|
877
|
+
# @param address
|
878
|
+
# @param [Hash] opts the optional parameters
|
879
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
880
|
+
def patch_billing_address_with_http_info(direction, order_id, address, opts = {})
|
881
|
+
if @api_client.config.debugging
|
882
|
+
@api_client.config.logger.debug "Calling API: OrderApi.patch_billing_address ..."
|
883
|
+
end
|
884
|
+
# verify the required parameter 'direction' is set
|
885
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.patch_billing_address" if direction.nil?
|
886
|
+
# verify the required parameter 'order_id' is set
|
887
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.patch_billing_address" if order_id.nil?
|
888
|
+
# verify the required parameter 'address' is set
|
889
|
+
fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.patch_billing_address" if address.nil?
|
890
|
+
# resource path
|
891
|
+
local_var_path = "/orders/{direction}/{orderID}/billto".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
892
|
+
|
893
|
+
# query parameters
|
894
|
+
query_params = {}
|
895
|
+
|
896
|
+
# header parameters
|
897
|
+
header_params = {}
|
898
|
+
|
899
|
+
# HTTP header 'Accept' (if needed)
|
900
|
+
local_header_accept = ['application/json']
|
901
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
902
|
+
|
903
|
+
# HTTP header 'Content-Type'
|
904
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
905
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
906
|
+
|
907
|
+
# form parameters
|
908
|
+
form_params = {}
|
909
|
+
|
910
|
+
# http body (model)
|
911
|
+
post_body = @api_client.object_to_http_body(address)
|
912
|
+
auth_names = ['oauth2']
|
913
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
914
|
+
:header_params => header_params,
|
915
|
+
:query_params => query_params,
|
916
|
+
:form_params => form_params,
|
917
|
+
:body => post_body,
|
918
|
+
:auth_names => auth_names,
|
919
|
+
:return_type => 'Order')
|
920
|
+
if @api_client.config.debugging
|
921
|
+
@api_client.config.logger.debug "API called: OrderApi#patch_billing_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
922
|
+
end
|
923
|
+
return data, status_code, headers
|
924
|
+
end
|
925
|
+
|
926
|
+
#
|
927
|
+
#
|
928
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
929
|
+
# @param order_id ID of the order.
|
930
|
+
# @param address
|
931
|
+
# @param [Hash] opts the optional parameters
|
932
|
+
# @return [Order]
|
933
|
+
def patch_shipping_address(direction, order_id, address, opts = {})
|
934
|
+
data, _status_code, _headers = patch_shipping_address_with_http_info(direction, order_id, address, opts)
|
935
|
+
return data
|
936
|
+
end
|
937
|
+
|
938
|
+
#
|
939
|
+
#
|
940
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
941
|
+
# @param order_id ID of the order.
|
942
|
+
# @param address
|
943
|
+
# @param [Hash] opts the optional parameters
|
944
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
945
|
+
def patch_shipping_address_with_http_info(direction, order_id, address, opts = {})
|
946
|
+
if @api_client.config.debugging
|
947
|
+
@api_client.config.logger.debug "Calling API: OrderApi.patch_shipping_address ..."
|
948
|
+
end
|
949
|
+
# verify the required parameter 'direction' is set
|
950
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.patch_shipping_address" if direction.nil?
|
951
|
+
# verify the required parameter 'order_id' is set
|
952
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.patch_shipping_address" if order_id.nil?
|
953
|
+
# verify the required parameter 'address' is set
|
954
|
+
fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.patch_shipping_address" if address.nil?
|
955
|
+
# resource path
|
956
|
+
local_var_path = "/orders/{direction}/{orderID}/shipto".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
957
|
+
|
958
|
+
# query parameters
|
959
|
+
query_params = {}
|
960
|
+
|
961
|
+
# header parameters
|
962
|
+
header_params = {}
|
963
|
+
|
964
|
+
# HTTP header 'Accept' (if needed)
|
965
|
+
local_header_accept = ['application/json']
|
966
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
967
|
+
|
968
|
+
# HTTP header 'Content-Type'
|
969
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
970
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
971
|
+
|
972
|
+
# form parameters
|
973
|
+
form_params = {}
|
974
|
+
|
975
|
+
# http body (model)
|
976
|
+
post_body = @api_client.object_to_http_body(address)
|
977
|
+
auth_names = ['oauth2']
|
978
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
979
|
+
:header_params => header_params,
|
980
|
+
:query_params => query_params,
|
981
|
+
:form_params => form_params,
|
982
|
+
:body => post_body,
|
983
|
+
:auth_names => auth_names,
|
984
|
+
:return_type => 'Order')
|
985
|
+
if @api_client.config.debugging
|
986
|
+
@api_client.config.logger.debug "API called: OrderApi#patch_shipping_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
987
|
+
end
|
988
|
+
return data, status_code, headers
|
989
|
+
end
|
990
|
+
|
991
|
+
#
|
992
|
+
#
|
993
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
994
|
+
# @param order_id ID of the order.
|
995
|
+
# @param promo_code Promo code of the order.
|
996
|
+
# @param [Hash] opts the optional parameters
|
997
|
+
# @return [Order]
|
998
|
+
def remove_promotion(direction, order_id, promo_code, opts = {})
|
999
|
+
data, _status_code, _headers = remove_promotion_with_http_info(direction, order_id, promo_code, opts)
|
1000
|
+
return data
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
#
|
1004
|
+
#
|
1005
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1006
|
+
# @param order_id ID of the order.
|
1007
|
+
# @param promo_code Promo code of the order.
|
1008
|
+
# @param [Hash] opts the optional parameters
|
1009
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
1010
|
+
def remove_promotion_with_http_info(direction, order_id, promo_code, opts = {})
|
1011
|
+
if @api_client.config.debugging
|
1012
|
+
@api_client.config.logger.debug "Calling API: OrderApi.remove_promotion ..."
|
1013
|
+
end
|
1014
|
+
# verify the required parameter 'direction' is set
|
1015
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.remove_promotion" if direction.nil?
|
1016
|
+
# verify the required parameter 'order_id' is set
|
1017
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.remove_promotion" if order_id.nil?
|
1018
|
+
# verify the required parameter 'promo_code' is set
|
1019
|
+
fail ArgumentError, "Missing the required parameter 'promo_code' when calling OrderApi.remove_promotion" if promo_code.nil?
|
1020
|
+
# resource path
|
1021
|
+
local_var_path = "/orders/{direction}/{orderID}/promotions/{promoCode}".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'promoCode' + '}', promo_code.to_s)
|
1022
|
+
|
1023
|
+
# query parameters
|
1024
|
+
query_params = {}
|
1025
|
+
|
1026
|
+
# header parameters
|
1027
|
+
header_params = {}
|
1028
|
+
|
1029
|
+
# HTTP header 'Accept' (if needed)
|
1030
|
+
local_header_accept = ['application/json']
|
1031
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1032
|
+
|
1033
|
+
# HTTP header 'Content-Type'
|
1034
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1035
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1036
|
+
|
1037
|
+
# form parameters
|
1038
|
+
form_params = {}
|
1039
|
+
|
1040
|
+
# http body (model)
|
1041
|
+
post_body = nil
|
1042
|
+
auth_names = ['oauth2']
|
1043
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
1044
|
+
:header_params => header_params,
|
1045
|
+
:query_params => query_params,
|
1046
|
+
:form_params => form_params,
|
1047
|
+
:body => post_body,
|
1048
|
+
:auth_names => auth_names,
|
1049
|
+
:return_type => 'Order')
|
1050
|
+
if @api_client.config.debugging
|
1051
|
+
@api_client.config.logger.debug "API called: OrderApi#remove_promotion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1052
|
+
end
|
1053
|
+
return data, status_code, headers
|
1054
|
+
end
|
1055
|
+
|
1056
|
+
#
|
1057
|
+
#
|
1058
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1059
|
+
# @param order_id ID of the order.
|
1060
|
+
# @param address
|
1061
|
+
# @param [Hash] opts the optional parameters
|
1062
|
+
# @return [Order]
|
1063
|
+
def set_billing_address(direction, order_id, address, opts = {})
|
1064
|
+
data, _status_code, _headers = set_billing_address_with_http_info(direction, order_id, address, opts)
|
1065
|
+
return data
|
1066
|
+
end
|
1067
|
+
|
1068
|
+
#
|
1069
|
+
#
|
1070
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1071
|
+
# @param order_id ID of the order.
|
1072
|
+
# @param address
|
1073
|
+
# @param [Hash] opts the optional parameters
|
1074
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
1075
|
+
def set_billing_address_with_http_info(direction, order_id, address, opts = {})
|
1076
|
+
if @api_client.config.debugging
|
1077
|
+
@api_client.config.logger.debug "Calling API: OrderApi.set_billing_address ..."
|
1078
|
+
end
|
1079
|
+
# verify the required parameter 'direction' is set
|
1080
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.set_billing_address" if direction.nil?
|
1081
|
+
# verify the required parameter 'order_id' is set
|
1082
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.set_billing_address" if order_id.nil?
|
1083
|
+
# verify the required parameter 'address' is set
|
1084
|
+
fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.set_billing_address" if address.nil?
|
1085
|
+
# resource path
|
1086
|
+
local_var_path = "/orders/{direction}/{orderID}/billto".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
1087
|
+
|
1088
|
+
# query parameters
|
1089
|
+
query_params = {}
|
1090
|
+
|
1091
|
+
# header parameters
|
1092
|
+
header_params = {}
|
1093
|
+
|
1094
|
+
# HTTP header 'Accept' (if needed)
|
1095
|
+
local_header_accept = ['application/json']
|
1096
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1097
|
+
|
1098
|
+
# HTTP header 'Content-Type'
|
1099
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1100
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1101
|
+
|
1102
|
+
# form parameters
|
1103
|
+
form_params = {}
|
1104
|
+
|
1105
|
+
# http body (model)
|
1106
|
+
post_body = @api_client.object_to_http_body(address)
|
1107
|
+
auth_names = ['oauth2']
|
1108
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1109
|
+
:header_params => header_params,
|
1110
|
+
:query_params => query_params,
|
1111
|
+
:form_params => form_params,
|
1112
|
+
:body => post_body,
|
1113
|
+
:auth_names => auth_names,
|
1114
|
+
:return_type => 'Order')
|
1115
|
+
if @api_client.config.debugging
|
1116
|
+
@api_client.config.logger.debug "API called: OrderApi#set_billing_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1117
|
+
end
|
1118
|
+
return data, status_code, headers
|
1119
|
+
end
|
1120
|
+
|
1121
|
+
#
|
1122
|
+
#
|
1123
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1124
|
+
# @param order_id ID of the order.
|
1125
|
+
# @param address
|
1126
|
+
# @param [Hash] opts the optional parameters
|
1127
|
+
# @return [Order]
|
1128
|
+
def set_shipping_address(direction, order_id, address, opts = {})
|
1129
|
+
data, _status_code, _headers = set_shipping_address_with_http_info(direction, order_id, address, opts)
|
1130
|
+
return data
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
#
|
1134
|
+
#
|
1135
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1136
|
+
# @param order_id ID of the order.
|
1137
|
+
# @param address
|
1138
|
+
# @param [Hash] opts the optional parameters
|
1139
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
1140
|
+
def set_shipping_address_with_http_info(direction, order_id, address, opts = {})
|
1141
|
+
if @api_client.config.debugging
|
1142
|
+
@api_client.config.logger.debug "Calling API: OrderApi.set_shipping_address ..."
|
1143
|
+
end
|
1144
|
+
# verify the required parameter 'direction' is set
|
1145
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.set_shipping_address" if direction.nil?
|
1146
|
+
# verify the required parameter 'order_id' is set
|
1147
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.set_shipping_address" if order_id.nil?
|
1148
|
+
# verify the required parameter 'address' is set
|
1149
|
+
fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.set_shipping_address" if address.nil?
|
1150
|
+
# resource path
|
1151
|
+
local_var_path = "/orders/{direction}/{orderID}/shipto".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
1152
|
+
|
1153
|
+
# query parameters
|
1154
|
+
query_params = {}
|
1155
|
+
|
1156
|
+
# header parameters
|
1157
|
+
header_params = {}
|
1158
|
+
|
1159
|
+
# HTTP header 'Accept' (if needed)
|
1160
|
+
local_header_accept = ['application/json']
|
1161
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1162
|
+
|
1163
|
+
# HTTP header 'Content-Type'
|
1164
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1165
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1166
|
+
|
1167
|
+
# form parameters
|
1168
|
+
form_params = {}
|
1169
|
+
|
1170
|
+
# http body (model)
|
1171
|
+
post_body = @api_client.object_to_http_body(address)
|
1172
|
+
auth_names = ['oauth2']
|
1173
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1174
|
+
:header_params => header_params,
|
1175
|
+
:query_params => query_params,
|
1176
|
+
:form_params => form_params,
|
1177
|
+
:body => post_body,
|
1178
|
+
:auth_names => auth_names,
|
1179
|
+
:return_type => 'Order')
|
1180
|
+
if @api_client.config.debugging
|
1181
|
+
@api_client.config.logger.debug "API called: OrderApi#set_shipping_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1182
|
+
end
|
1183
|
+
return data, status_code, headers
|
1184
|
+
end
|
1185
|
+
|
1186
|
+
#
|
1187
|
+
#
|
1188
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1189
|
+
# @param order_id ID of the order.
|
1190
|
+
# @param shipment
|
1191
|
+
# @param [Hash] opts the optional parameters
|
1192
|
+
# @return [Order]
|
1193
|
+
def ship(direction, order_id, shipment, opts = {})
|
1194
|
+
data, _status_code, _headers = ship_with_http_info(direction, order_id, shipment, opts)
|
1195
|
+
return data
|
1196
|
+
end
|
1197
|
+
|
1198
|
+
#
|
1199
|
+
#
|
1200
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1201
|
+
# @param order_id ID of the order.
|
1202
|
+
# @param shipment
|
1203
|
+
# @param [Hash] opts the optional parameters
|
1204
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
1205
|
+
def ship_with_http_info(direction, order_id, shipment, opts = {})
|
1206
|
+
if @api_client.config.debugging
|
1207
|
+
@api_client.config.logger.debug "Calling API: OrderApi.ship ..."
|
1208
|
+
end
|
1209
|
+
# verify the required parameter 'direction' is set
|
1210
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.ship" if direction.nil?
|
1211
|
+
# verify the required parameter 'order_id' is set
|
1212
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.ship" if order_id.nil?
|
1213
|
+
# verify the required parameter 'shipment' is set
|
1214
|
+
fail ArgumentError, "Missing the required parameter 'shipment' when calling OrderApi.ship" if shipment.nil?
|
1215
|
+
# resource path
|
1216
|
+
local_var_path = "/orders/{direction}/{orderID}/ship".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
1217
|
+
|
1218
|
+
# query parameters
|
1219
|
+
query_params = {}
|
1220
|
+
|
1221
|
+
# header parameters
|
1222
|
+
header_params = {}
|
1223
|
+
|
1224
|
+
# HTTP header 'Accept' (if needed)
|
1225
|
+
local_header_accept = ['application/json']
|
1226
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1227
|
+
|
1228
|
+
# HTTP header 'Content-Type'
|
1229
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1230
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1231
|
+
|
1232
|
+
# form parameters
|
1233
|
+
form_params = {}
|
1234
|
+
|
1235
|
+
# http body (model)
|
1236
|
+
post_body = @api_client.object_to_http_body(shipment)
|
1237
|
+
auth_names = ['oauth2']
|
1238
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1239
|
+
:header_params => header_params,
|
1240
|
+
:query_params => query_params,
|
1241
|
+
:form_params => form_params,
|
1242
|
+
:body => post_body,
|
1243
|
+
:auth_names => auth_names,
|
1244
|
+
:return_type => 'Order')
|
1245
|
+
if @api_client.config.debugging
|
1246
|
+
@api_client.config.logger.debug "API called: OrderApi#ship\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1247
|
+
end
|
1248
|
+
return data, status_code, headers
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
#
|
1252
|
+
#
|
1253
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1254
|
+
# @param order_id ID of the order.
|
1255
|
+
# @param [Hash] opts the optional parameters
|
1256
|
+
# @return [Order]
|
1257
|
+
def submit(direction, order_id, opts = {})
|
1258
|
+
data, _status_code, _headers = submit_with_http_info(direction, order_id, opts)
|
1259
|
+
return data
|
1260
|
+
end
|
1261
|
+
|
1262
|
+
#
|
1263
|
+
#
|
1264
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1265
|
+
# @param order_id ID of the order.
|
1266
|
+
# @param [Hash] opts the optional parameters
|
1267
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
1268
|
+
def submit_with_http_info(direction, order_id, opts = {})
|
1269
|
+
if @api_client.config.debugging
|
1270
|
+
@api_client.config.logger.debug "Calling API: OrderApi.submit ..."
|
1271
|
+
end
|
1272
|
+
# verify the required parameter 'direction' is set
|
1273
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.submit" if direction.nil?
|
1274
|
+
# verify the required parameter 'order_id' is set
|
1275
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.submit" if order_id.nil?
|
1276
|
+
# resource path
|
1277
|
+
local_var_path = "/orders/{direction}/{orderID}/submit".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
1278
|
+
|
1279
|
+
# query parameters
|
1280
|
+
query_params = {}
|
1281
|
+
|
1282
|
+
# header parameters
|
1283
|
+
header_params = {}
|
1284
|
+
|
1285
|
+
# HTTP header 'Accept' (if needed)
|
1286
|
+
local_header_accept = ['application/json']
|
1287
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1288
|
+
|
1289
|
+
# HTTP header 'Content-Type'
|
1290
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1291
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1292
|
+
|
1293
|
+
# form parameters
|
1294
|
+
form_params = {}
|
1295
|
+
|
1296
|
+
# http body (model)
|
1297
|
+
post_body = nil
|
1298
|
+
auth_names = ['oauth2']
|
1299
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1300
|
+
:header_params => header_params,
|
1301
|
+
:query_params => query_params,
|
1302
|
+
:form_params => form_params,
|
1303
|
+
:body => post_body,
|
1304
|
+
:auth_names => auth_names,
|
1305
|
+
:return_type => 'Order')
|
1306
|
+
if @api_client.config.debugging
|
1307
|
+
@api_client.config.logger.debug "API called: OrderApi#submit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1308
|
+
end
|
1309
|
+
return data, status_code, headers
|
1310
|
+
end
|
1311
|
+
|
1312
|
+
#
|
1313
|
+
#
|
1314
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1315
|
+
# @param order_id ID of the order.
|
1316
|
+
# @param order
|
1317
|
+
# @param [Hash] opts the optional parameters
|
1318
|
+
# @return [Order]
|
1319
|
+
def update(direction, order_id, order, opts = {})
|
1320
|
+
data, _status_code, _headers = update_with_http_info(direction, order_id, order, opts)
|
1321
|
+
return data
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
#
|
1325
|
+
#
|
1326
|
+
# @param direction Direction of the order. Possible values: Incoming, Outgoing.
|
1327
|
+
# @param order_id ID of the order.
|
1328
|
+
# @param order
|
1329
|
+
# @param [Hash] opts the optional parameters
|
1330
|
+
# @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
|
1331
|
+
def update_with_http_info(direction, order_id, order, opts = {})
|
1332
|
+
if @api_client.config.debugging
|
1333
|
+
@api_client.config.logger.debug "Calling API: OrderApi.update ..."
|
1334
|
+
end
|
1335
|
+
# verify the required parameter 'direction' is set
|
1336
|
+
fail ArgumentError, "Missing the required parameter 'direction' when calling OrderApi.update" if direction.nil?
|
1337
|
+
# verify the required parameter 'order_id' is set
|
1338
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.update" if order_id.nil?
|
1339
|
+
# verify the required parameter 'order' is set
|
1340
|
+
fail ArgumentError, "Missing the required parameter 'order' when calling OrderApi.update" if order.nil?
|
1341
|
+
# resource path
|
1342
|
+
local_var_path = "/orders/{direction}/{orderID}".sub('{format}','json').sub('{' + 'direction' + '}', direction.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
1343
|
+
|
1344
|
+
# query parameters
|
1345
|
+
query_params = {}
|
1346
|
+
|
1347
|
+
# header parameters
|
1348
|
+
header_params = {}
|
1349
|
+
|
1350
|
+
# HTTP header 'Accept' (if needed)
|
1351
|
+
local_header_accept = ['application/json']
|
1352
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1353
|
+
|
1354
|
+
# HTTP header 'Content-Type'
|
1355
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
1356
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1357
|
+
|
1358
|
+
# form parameters
|
1359
|
+
form_params = {}
|
1360
|
+
|
1361
|
+
# http body (model)
|
1362
|
+
post_body = @api_client.object_to_http_body(order)
|
1363
|
+
auth_names = ['oauth2']
|
1364
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1365
|
+
:header_params => header_params,
|
1366
|
+
:query_params => query_params,
|
1367
|
+
:form_params => form_params,
|
1368
|
+
:body => post_body,
|
1369
|
+
:auth_names => auth_names,
|
1370
|
+
:return_type => 'Order')
|
1371
|
+
if @api_client.config.debugging
|
1372
|
+
@api_client.config.logger.debug "API called: OrderApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1373
|
+
end
|
1374
|
+
return data, status_code, headers
|
1375
|
+
end
|
1376
|
+
end
|
1377
|
+
end
|