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,583 @@
|
|
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 LineItemApi
|
28
|
+
attr_accessor :api_client
|
29
|
+
|
30
|
+
def initialize(api_client = ApiClient.default)
|
31
|
+
@api_client = api_client
|
32
|
+
end
|
33
|
+
|
34
|
+
#
|
35
|
+
#
|
36
|
+
# @param buyer_id ID of the buyer.
|
37
|
+
# @param order_id ID of the order.
|
38
|
+
# @param line_item
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [LineItem]
|
41
|
+
def create(buyer_id, order_id, line_item, opts = {})
|
42
|
+
data, _status_code, _headers = create_with_http_info(buyer_id, order_id, line_item, opts)
|
43
|
+
return data
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
#
|
48
|
+
# @param buyer_id ID of the buyer.
|
49
|
+
# @param order_id ID of the order.
|
50
|
+
# @param line_item
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @return [Array<(LineItem, Fixnum, Hash)>] LineItem data, response status code and response headers
|
53
|
+
def create_with_http_info(buyer_id, order_id, line_item, opts = {})
|
54
|
+
if @api_client.config.debugging
|
55
|
+
@api_client.config.logger.debug "Calling API: LineItemApi.create ..."
|
56
|
+
end
|
57
|
+
# verify the required parameter 'buyer_id' is set
|
58
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling LineItemApi.create" if buyer_id.nil?
|
59
|
+
# verify the required parameter 'order_id' is set
|
60
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling LineItemApi.create" if order_id.nil?
|
61
|
+
# verify the required parameter 'line_item' is set
|
62
|
+
fail ArgumentError, "Missing the required parameter 'line_item' when calling LineItemApi.create" if line_item.nil?
|
63
|
+
# resource path
|
64
|
+
local_var_path = "/buyers/{buyerID}/orders/{orderID}/lineitems".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.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 = @api_client.object_to_http_body(line_item)
|
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 => 'LineItem')
|
93
|
+
if @api_client.config.debugging
|
94
|
+
@api_client.config.logger.debug "API called: LineItemApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
95
|
+
end
|
96
|
+
return data, status_code, headers
|
97
|
+
end
|
98
|
+
|
99
|
+
#
|
100
|
+
#
|
101
|
+
# @param buyer_id ID of the buyer.
|
102
|
+
# @param order_id ID of the order.
|
103
|
+
# @param line_item_id ID of the line item.
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @return [nil]
|
106
|
+
def delete(buyer_id, order_id, line_item_id, opts = {})
|
107
|
+
delete_with_http_info(buyer_id, order_id, line_item_id, opts)
|
108
|
+
return nil
|
109
|
+
end
|
110
|
+
|
111
|
+
#
|
112
|
+
#
|
113
|
+
# @param buyer_id ID of the buyer.
|
114
|
+
# @param order_id ID of the order.
|
115
|
+
# @param line_item_id ID of the line item.
|
116
|
+
# @param [Hash] opts the optional parameters
|
117
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
118
|
+
def delete_with_http_info(buyer_id, order_id, line_item_id, opts = {})
|
119
|
+
if @api_client.config.debugging
|
120
|
+
@api_client.config.logger.debug "Calling API: LineItemApi.delete ..."
|
121
|
+
end
|
122
|
+
# verify the required parameter 'buyer_id' is set
|
123
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling LineItemApi.delete" if buyer_id.nil?
|
124
|
+
# verify the required parameter 'order_id' is set
|
125
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling LineItemApi.delete" if order_id.nil?
|
126
|
+
# verify the required parameter 'line_item_id' is set
|
127
|
+
fail ArgumentError, "Missing the required parameter 'line_item_id' when calling LineItemApi.delete" if line_item_id.nil?
|
128
|
+
# resource path
|
129
|
+
local_var_path = "/buyers/{buyerID}/orders/{orderID}/lineitems/{lineItemID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'lineItemID' + '}', line_item_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 = nil
|
150
|
+
auth_names = ['oauth2']
|
151
|
+
data, status_code, headers = @api_client.call_api(:DELETE, 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
|
+
if @api_client.config.debugging
|
158
|
+
@api_client.config.logger.debug "API called: LineItemApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
159
|
+
end
|
160
|
+
return data, status_code, headers
|
161
|
+
end
|
162
|
+
|
163
|
+
#
|
164
|
+
#
|
165
|
+
# @param buyer_id ID of the buyer.
|
166
|
+
# @param order_id ID of the order.
|
167
|
+
# @param line_item_id ID of the line item.
|
168
|
+
# @param [Hash] opts the optional parameters
|
169
|
+
# @return [LineItem]
|
170
|
+
def get(buyer_id, order_id, line_item_id, opts = {})
|
171
|
+
data, _status_code, _headers = get_with_http_info(buyer_id, order_id, line_item_id, opts)
|
172
|
+
return data
|
173
|
+
end
|
174
|
+
|
175
|
+
#
|
176
|
+
#
|
177
|
+
# @param buyer_id ID of the buyer.
|
178
|
+
# @param order_id ID of the order.
|
179
|
+
# @param line_item_id ID of the line item.
|
180
|
+
# @param [Hash] opts the optional parameters
|
181
|
+
# @return [Array<(LineItem, Fixnum, Hash)>] LineItem data, response status code and response headers
|
182
|
+
def get_with_http_info(buyer_id, order_id, line_item_id, opts = {})
|
183
|
+
if @api_client.config.debugging
|
184
|
+
@api_client.config.logger.debug "Calling API: LineItemApi.get ..."
|
185
|
+
end
|
186
|
+
# verify the required parameter 'buyer_id' is set
|
187
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling LineItemApi.get" if buyer_id.nil?
|
188
|
+
# verify the required parameter 'order_id' is set
|
189
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling LineItemApi.get" if order_id.nil?
|
190
|
+
# verify the required parameter 'line_item_id' is set
|
191
|
+
fail ArgumentError, "Missing the required parameter 'line_item_id' when calling LineItemApi.get" if line_item_id.nil?
|
192
|
+
# resource path
|
193
|
+
local_var_path = "/buyers/{buyerID}/orders/{orderID}/lineitems/{lineItemID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'lineItemID' + '}', line_item_id.to_s)
|
194
|
+
|
195
|
+
# query parameters
|
196
|
+
query_params = {}
|
197
|
+
|
198
|
+
# header parameters
|
199
|
+
header_params = {}
|
200
|
+
|
201
|
+
# HTTP header 'Accept' (if needed)
|
202
|
+
local_header_accept = ['application/json']
|
203
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
204
|
+
|
205
|
+
# HTTP header 'Content-Type'
|
206
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
207
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
208
|
+
|
209
|
+
# form parameters
|
210
|
+
form_params = {}
|
211
|
+
|
212
|
+
# http body (model)
|
213
|
+
post_body = nil
|
214
|
+
auth_names = ['oauth2']
|
215
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
216
|
+
:header_params => header_params,
|
217
|
+
:query_params => query_params,
|
218
|
+
:form_params => form_params,
|
219
|
+
:body => post_body,
|
220
|
+
:auth_names => auth_names,
|
221
|
+
:return_type => 'LineItem')
|
222
|
+
if @api_client.config.debugging
|
223
|
+
@api_client.config.logger.debug "API called: LineItemApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
224
|
+
end
|
225
|
+
return data, status_code, headers
|
226
|
+
end
|
227
|
+
|
228
|
+
#
|
229
|
+
#
|
230
|
+
# @param buyer_id ID of the buyer.
|
231
|
+
# @param order_id ID of the order.
|
232
|
+
# @param [Hash] opts the optional parameters
|
233
|
+
# @option opts [String] :search Word or phrase to search for.
|
234
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
235
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
236
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
237
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
238
|
+
# @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.???'
|
239
|
+
# @return [ListLineItem]
|
240
|
+
def list(buyer_id, order_id, opts = {})
|
241
|
+
data, _status_code, _headers = list_with_http_info(buyer_id, order_id, opts)
|
242
|
+
return data
|
243
|
+
end
|
244
|
+
|
245
|
+
#
|
246
|
+
#
|
247
|
+
# @param buyer_id ID of the buyer.
|
248
|
+
# @param order_id ID of the order.
|
249
|
+
# @param [Hash] opts the optional parameters
|
250
|
+
# @option opts [String] :search Word or phrase to search for.
|
251
|
+
# @option opts [String] :search_on Comma-delimited list of fields to search on.
|
252
|
+
# @option opts [String] :sort_by Comma-delimited list of fields to sort by.
|
253
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
254
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
255
|
+
# @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.???'
|
256
|
+
# @return [Array<(ListLineItem, Fixnum, Hash)>] ListLineItem data, response status code and response headers
|
257
|
+
def list_with_http_info(buyer_id, order_id, opts = {})
|
258
|
+
if @api_client.config.debugging
|
259
|
+
@api_client.config.logger.debug "Calling API: LineItemApi.list ..."
|
260
|
+
end
|
261
|
+
# verify the required parameter 'buyer_id' is set
|
262
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling LineItemApi.list" if buyer_id.nil?
|
263
|
+
# verify the required parameter 'order_id' is set
|
264
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling LineItemApi.list" if order_id.nil?
|
265
|
+
# resource path
|
266
|
+
local_var_path = "/buyers/{buyerID}/orders/{orderID}/lineitems".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
|
267
|
+
|
268
|
+
# query parameters
|
269
|
+
query_params = {}
|
270
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
271
|
+
query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
|
272
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
273
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
274
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
275
|
+
query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
|
276
|
+
|
277
|
+
# header parameters
|
278
|
+
header_params = {}
|
279
|
+
|
280
|
+
# HTTP header 'Accept' (if needed)
|
281
|
+
local_header_accept = ['application/json']
|
282
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
283
|
+
|
284
|
+
# HTTP header 'Content-Type'
|
285
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
286
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
287
|
+
|
288
|
+
# form parameters
|
289
|
+
form_params = {}
|
290
|
+
|
291
|
+
# http body (model)
|
292
|
+
post_body = nil
|
293
|
+
auth_names = ['oauth2']
|
294
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
295
|
+
:header_params => header_params,
|
296
|
+
:query_params => query_params,
|
297
|
+
:form_params => form_params,
|
298
|
+
:body => post_body,
|
299
|
+
:auth_names => auth_names,
|
300
|
+
:return_type => 'ListLineItem')
|
301
|
+
if @api_client.config.debugging
|
302
|
+
@api_client.config.logger.debug "API called: LineItemApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
303
|
+
end
|
304
|
+
return data, status_code, headers
|
305
|
+
end
|
306
|
+
|
307
|
+
#
|
308
|
+
#
|
309
|
+
# @param buyer_id ID of the buyer.
|
310
|
+
# @param order_id ID of the order.
|
311
|
+
# @param line_item_id ID of the line item.
|
312
|
+
# @param partial_line_item
|
313
|
+
# @param [Hash] opts the optional parameters
|
314
|
+
# @return [LineItem]
|
315
|
+
def patch(buyer_id, order_id, line_item_id, partial_line_item, opts = {})
|
316
|
+
data, _status_code, _headers = patch_with_http_info(buyer_id, order_id, line_item_id, partial_line_item, opts)
|
317
|
+
return data
|
318
|
+
end
|
319
|
+
|
320
|
+
#
|
321
|
+
#
|
322
|
+
# @param buyer_id ID of the buyer.
|
323
|
+
# @param order_id ID of the order.
|
324
|
+
# @param line_item_id ID of the line item.
|
325
|
+
# @param partial_line_item
|
326
|
+
# @param [Hash] opts the optional parameters
|
327
|
+
# @return [Array<(LineItem, Fixnum, Hash)>] LineItem data, response status code and response headers
|
328
|
+
def patch_with_http_info(buyer_id, order_id, line_item_id, partial_line_item, opts = {})
|
329
|
+
if @api_client.config.debugging
|
330
|
+
@api_client.config.logger.debug "Calling API: LineItemApi.patch ..."
|
331
|
+
end
|
332
|
+
# verify the required parameter 'buyer_id' is set
|
333
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling LineItemApi.patch" if buyer_id.nil?
|
334
|
+
# verify the required parameter 'order_id' is set
|
335
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling LineItemApi.patch" if order_id.nil?
|
336
|
+
# verify the required parameter 'line_item_id' is set
|
337
|
+
fail ArgumentError, "Missing the required parameter 'line_item_id' when calling LineItemApi.patch" if line_item_id.nil?
|
338
|
+
# verify the required parameter 'partial_line_item' is set
|
339
|
+
fail ArgumentError, "Missing the required parameter 'partial_line_item' when calling LineItemApi.patch" if partial_line_item.nil?
|
340
|
+
# resource path
|
341
|
+
local_var_path = "/buyers/{buyerID}/orders/{orderID}/lineitems/{lineItemID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'lineItemID' + '}', line_item_id.to_s)
|
342
|
+
|
343
|
+
# query parameters
|
344
|
+
query_params = {}
|
345
|
+
|
346
|
+
# header parameters
|
347
|
+
header_params = {}
|
348
|
+
|
349
|
+
# HTTP header 'Accept' (if needed)
|
350
|
+
local_header_accept = ['application/json']
|
351
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
352
|
+
|
353
|
+
# HTTP header 'Content-Type'
|
354
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
355
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
356
|
+
|
357
|
+
# form parameters
|
358
|
+
form_params = {}
|
359
|
+
|
360
|
+
# http body (model)
|
361
|
+
post_body = @api_client.object_to_http_body(partial_line_item)
|
362
|
+
auth_names = ['oauth2']
|
363
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
364
|
+
:header_params => header_params,
|
365
|
+
:query_params => query_params,
|
366
|
+
:form_params => form_params,
|
367
|
+
:body => post_body,
|
368
|
+
:auth_names => auth_names,
|
369
|
+
:return_type => 'LineItem')
|
370
|
+
if @api_client.config.debugging
|
371
|
+
@api_client.config.logger.debug "API called: LineItemApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
372
|
+
end
|
373
|
+
return data, status_code, headers
|
374
|
+
end
|
375
|
+
|
376
|
+
#
|
377
|
+
#
|
378
|
+
# @param buyer_id ID of the buyer.
|
379
|
+
# @param order_id ID of the order.
|
380
|
+
# @param line_item_id ID of the line item.
|
381
|
+
# @param partial_address
|
382
|
+
# @param [Hash] opts the optional parameters
|
383
|
+
# @return [LineItem]
|
384
|
+
def patch_shipping_address(buyer_id, order_id, line_item_id, partial_address, opts = {})
|
385
|
+
data, _status_code, _headers = patch_shipping_address_with_http_info(buyer_id, order_id, line_item_id, partial_address, opts)
|
386
|
+
return data
|
387
|
+
end
|
388
|
+
|
389
|
+
#
|
390
|
+
#
|
391
|
+
# @param buyer_id ID of the buyer.
|
392
|
+
# @param order_id ID of the order.
|
393
|
+
# @param line_item_id ID of the line item.
|
394
|
+
# @param partial_address
|
395
|
+
# @param [Hash] opts the optional parameters
|
396
|
+
# @return [Array<(LineItem, Fixnum, Hash)>] LineItem data, response status code and response headers
|
397
|
+
def patch_shipping_address_with_http_info(buyer_id, order_id, line_item_id, partial_address, opts = {})
|
398
|
+
if @api_client.config.debugging
|
399
|
+
@api_client.config.logger.debug "Calling API: LineItemApi.patch_shipping_address ..."
|
400
|
+
end
|
401
|
+
# verify the required parameter 'buyer_id' is set
|
402
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling LineItemApi.patch_shipping_address" if buyer_id.nil?
|
403
|
+
# verify the required parameter 'order_id' is set
|
404
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling LineItemApi.patch_shipping_address" if order_id.nil?
|
405
|
+
# verify the required parameter 'line_item_id' is set
|
406
|
+
fail ArgumentError, "Missing the required parameter 'line_item_id' when calling LineItemApi.patch_shipping_address" if line_item_id.nil?
|
407
|
+
# verify the required parameter 'partial_address' is set
|
408
|
+
fail ArgumentError, "Missing the required parameter 'partial_address' when calling LineItemApi.patch_shipping_address" if partial_address.nil?
|
409
|
+
# resource path
|
410
|
+
local_var_path = "/buyers/{buyerID}/orders/{orderID}/lineitems/{lineItemID}/shipto".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'lineItemID' + '}', line_item_id.to_s)
|
411
|
+
|
412
|
+
# query parameters
|
413
|
+
query_params = {}
|
414
|
+
|
415
|
+
# header parameters
|
416
|
+
header_params = {}
|
417
|
+
|
418
|
+
# HTTP header 'Accept' (if needed)
|
419
|
+
local_header_accept = ['application/json']
|
420
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
421
|
+
|
422
|
+
# HTTP header 'Content-Type'
|
423
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
424
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
425
|
+
|
426
|
+
# form parameters
|
427
|
+
form_params = {}
|
428
|
+
|
429
|
+
# http body (model)
|
430
|
+
post_body = @api_client.object_to_http_body(partial_address)
|
431
|
+
auth_names = ['oauth2']
|
432
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
433
|
+
:header_params => header_params,
|
434
|
+
:query_params => query_params,
|
435
|
+
:form_params => form_params,
|
436
|
+
:body => post_body,
|
437
|
+
:auth_names => auth_names,
|
438
|
+
:return_type => 'LineItem')
|
439
|
+
if @api_client.config.debugging
|
440
|
+
@api_client.config.logger.debug "API called: LineItemApi#patch_shipping_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
441
|
+
end
|
442
|
+
return data, status_code, headers
|
443
|
+
end
|
444
|
+
|
445
|
+
#
|
446
|
+
#
|
447
|
+
# @param buyer_id ID of the buyer.
|
448
|
+
# @param order_id ID of the order.
|
449
|
+
# @param line_item_id ID of the line item.
|
450
|
+
# @param address
|
451
|
+
# @param [Hash] opts the optional parameters
|
452
|
+
# @return [LineItem]
|
453
|
+
def set_shipping_address(buyer_id, order_id, line_item_id, address, opts = {})
|
454
|
+
data, _status_code, _headers = set_shipping_address_with_http_info(buyer_id, order_id, line_item_id, address, opts)
|
455
|
+
return data
|
456
|
+
end
|
457
|
+
|
458
|
+
#
|
459
|
+
#
|
460
|
+
# @param buyer_id ID of the buyer.
|
461
|
+
# @param order_id ID of the order.
|
462
|
+
# @param line_item_id ID of the line item.
|
463
|
+
# @param address
|
464
|
+
# @param [Hash] opts the optional parameters
|
465
|
+
# @return [Array<(LineItem, Fixnum, Hash)>] LineItem data, response status code and response headers
|
466
|
+
def set_shipping_address_with_http_info(buyer_id, order_id, line_item_id, address, opts = {})
|
467
|
+
if @api_client.config.debugging
|
468
|
+
@api_client.config.logger.debug "Calling API: LineItemApi.set_shipping_address ..."
|
469
|
+
end
|
470
|
+
# verify the required parameter 'buyer_id' is set
|
471
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling LineItemApi.set_shipping_address" if buyer_id.nil?
|
472
|
+
# verify the required parameter 'order_id' is set
|
473
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling LineItemApi.set_shipping_address" if order_id.nil?
|
474
|
+
# verify the required parameter 'line_item_id' is set
|
475
|
+
fail ArgumentError, "Missing the required parameter 'line_item_id' when calling LineItemApi.set_shipping_address" if line_item_id.nil?
|
476
|
+
# verify the required parameter 'address' is set
|
477
|
+
fail ArgumentError, "Missing the required parameter 'address' when calling LineItemApi.set_shipping_address" if address.nil?
|
478
|
+
# resource path
|
479
|
+
local_var_path = "/buyers/{buyerID}/orders/{orderID}/lineitems/{lineItemID}/shipto".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'lineItemID' + '}', line_item_id.to_s)
|
480
|
+
|
481
|
+
# query parameters
|
482
|
+
query_params = {}
|
483
|
+
|
484
|
+
# header parameters
|
485
|
+
header_params = {}
|
486
|
+
|
487
|
+
# HTTP header 'Accept' (if needed)
|
488
|
+
local_header_accept = ['application/json']
|
489
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
490
|
+
|
491
|
+
# HTTP header 'Content-Type'
|
492
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
493
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
494
|
+
|
495
|
+
# form parameters
|
496
|
+
form_params = {}
|
497
|
+
|
498
|
+
# http body (model)
|
499
|
+
post_body = @api_client.object_to_http_body(address)
|
500
|
+
auth_names = ['oauth2']
|
501
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
502
|
+
:header_params => header_params,
|
503
|
+
:query_params => query_params,
|
504
|
+
:form_params => form_params,
|
505
|
+
:body => post_body,
|
506
|
+
:auth_names => auth_names,
|
507
|
+
:return_type => 'LineItem')
|
508
|
+
if @api_client.config.debugging
|
509
|
+
@api_client.config.logger.debug "API called: LineItemApi#set_shipping_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
510
|
+
end
|
511
|
+
return data, status_code, headers
|
512
|
+
end
|
513
|
+
|
514
|
+
#
|
515
|
+
#
|
516
|
+
# @param buyer_id ID of the buyer.
|
517
|
+
# @param order_id ID of the order.
|
518
|
+
# @param line_item_id ID of the line item.
|
519
|
+
# @param line_item
|
520
|
+
# @param [Hash] opts the optional parameters
|
521
|
+
# @return [LineItem]
|
522
|
+
def update(buyer_id, order_id, line_item_id, line_item, opts = {})
|
523
|
+
data, _status_code, _headers = update_with_http_info(buyer_id, order_id, line_item_id, line_item, opts)
|
524
|
+
return data
|
525
|
+
end
|
526
|
+
|
527
|
+
#
|
528
|
+
#
|
529
|
+
# @param buyer_id ID of the buyer.
|
530
|
+
# @param order_id ID of the order.
|
531
|
+
# @param line_item_id ID of the line item.
|
532
|
+
# @param line_item
|
533
|
+
# @param [Hash] opts the optional parameters
|
534
|
+
# @return [Array<(LineItem, Fixnum, Hash)>] LineItem data, response status code and response headers
|
535
|
+
def update_with_http_info(buyer_id, order_id, line_item_id, line_item, opts = {})
|
536
|
+
if @api_client.config.debugging
|
537
|
+
@api_client.config.logger.debug "Calling API: LineItemApi.update ..."
|
538
|
+
end
|
539
|
+
# verify the required parameter 'buyer_id' is set
|
540
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling LineItemApi.update" if buyer_id.nil?
|
541
|
+
# verify the required parameter 'order_id' is set
|
542
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling LineItemApi.update" if order_id.nil?
|
543
|
+
# verify the required parameter 'line_item_id' is set
|
544
|
+
fail ArgumentError, "Missing the required parameter 'line_item_id' when calling LineItemApi.update" if line_item_id.nil?
|
545
|
+
# verify the required parameter 'line_item' is set
|
546
|
+
fail ArgumentError, "Missing the required parameter 'line_item' when calling LineItemApi.update" if line_item.nil?
|
547
|
+
# resource path
|
548
|
+
local_var_path = "/buyers/{buyerID}/orders/{orderID}/lineitems/{lineItemID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'lineItemID' + '}', line_item_id.to_s)
|
549
|
+
|
550
|
+
# query parameters
|
551
|
+
query_params = {}
|
552
|
+
|
553
|
+
# header parameters
|
554
|
+
header_params = {}
|
555
|
+
|
556
|
+
# HTTP header 'Accept' (if needed)
|
557
|
+
local_header_accept = ['application/json']
|
558
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
559
|
+
|
560
|
+
# HTTP header 'Content-Type'
|
561
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
562
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
563
|
+
|
564
|
+
# form parameters
|
565
|
+
form_params = {}
|
566
|
+
|
567
|
+
# http body (model)
|
568
|
+
post_body = @api_client.object_to_http_body(line_item)
|
569
|
+
auth_names = ['oauth2']
|
570
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
571
|
+
:header_params => header_params,
|
572
|
+
:query_params => query_params,
|
573
|
+
:form_params => form_params,
|
574
|
+
:body => post_body,
|
575
|
+
:auth_names => auth_names,
|
576
|
+
:return_type => 'LineItem')
|
577
|
+
if @api_client.config.debugging
|
578
|
+
@api_client.config.logger.debug "API called: LineItemApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
579
|
+
end
|
580
|
+
return data, status_code, headers
|
581
|
+
end
|
582
|
+
end
|
583
|
+
end
|