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,283 @@
|
|
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 EmailTemplateApi
|
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 email_template_type Email template type of the email template. Possible values: OrderSubmittedForApproval, CustomerOrderSubmitted, OrderToApprove, OrderDeclined, OrderApproved, PriceRequestSubmitted, CustomerOrderShipped, ProductRequiresAttachment, InventoryPointReached, LineItemExceedsInventory, PriceRequestResponse, CustomerOrderUpdated, OrderCanceled, PriceRequestCanceled, NewOrderReceived, ApprovalNotification, EmailLoginVerificationCode.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [EmailTemplate]
|
40
|
+
def get(buyer_id, email_template_type, opts = {})
|
41
|
+
data, _status_code, _headers = get_with_http_info(buyer_id, email_template_type, opts)
|
42
|
+
return data
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
#
|
47
|
+
# @param buyer_id ID of the buyer.
|
48
|
+
# @param email_template_type Email template type of the email template. Possible values: OrderSubmittedForApproval, CustomerOrderSubmitted, OrderToApprove, OrderDeclined, OrderApproved, PriceRequestSubmitted, CustomerOrderShipped, ProductRequiresAttachment, InventoryPointReached, LineItemExceedsInventory, PriceRequestResponse, CustomerOrderUpdated, OrderCanceled, PriceRequestCanceled, NewOrderReceived, ApprovalNotification, EmailLoginVerificationCode.
|
49
|
+
# @param [Hash] opts the optional parameters
|
50
|
+
# @return [Array<(EmailTemplate, Fixnum, Hash)>] EmailTemplate data, response status code and response headers
|
51
|
+
def get_with_http_info(buyer_id, email_template_type, opts = {})
|
52
|
+
if @api_client.config.debugging
|
53
|
+
@api_client.config.logger.debug "Calling API: EmailTemplateApi.get ..."
|
54
|
+
end
|
55
|
+
# verify the required parameter 'buyer_id' is set
|
56
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling EmailTemplateApi.get" if buyer_id.nil?
|
57
|
+
# verify the required parameter 'email_template_type' is set
|
58
|
+
fail ArgumentError, "Missing the required parameter 'email_template_type' when calling EmailTemplateApi.get" if email_template_type.nil?
|
59
|
+
# resource path
|
60
|
+
local_var_path = "/buyers/{buyerID}/emailtemplates/{emailTemplateType}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'emailTemplateType' + '}', email_template_type.to_s)
|
61
|
+
|
62
|
+
# query parameters
|
63
|
+
query_params = {}
|
64
|
+
|
65
|
+
# header parameters
|
66
|
+
header_params = {}
|
67
|
+
|
68
|
+
# HTTP header 'Accept' (if needed)
|
69
|
+
local_header_accept = ['application/json']
|
70
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
71
|
+
|
72
|
+
# HTTP header 'Content-Type'
|
73
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
74
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
75
|
+
|
76
|
+
# form parameters
|
77
|
+
form_params = {}
|
78
|
+
|
79
|
+
# http body (model)
|
80
|
+
post_body = nil
|
81
|
+
auth_names = ['oauth2']
|
82
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
83
|
+
:header_params => header_params,
|
84
|
+
:query_params => query_params,
|
85
|
+
:form_params => form_params,
|
86
|
+
:body => post_body,
|
87
|
+
:auth_names => auth_names,
|
88
|
+
:return_type => 'EmailTemplate')
|
89
|
+
if @api_client.config.debugging
|
90
|
+
@api_client.config.logger.debug "API called: EmailTemplateApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
91
|
+
end
|
92
|
+
return data, status_code, headers
|
93
|
+
end
|
94
|
+
|
95
|
+
#
|
96
|
+
#
|
97
|
+
# @param buyer_id ID of the buyer.
|
98
|
+
# @param email_template_type Email template type of the email template. Possible values: OrderSubmittedForApproval, CustomerOrderSubmitted, OrderToApprove, OrderDeclined, OrderApproved, PriceRequestSubmitted, CustomerOrderShipped, ProductRequiresAttachment, InventoryPointReached, LineItemExceedsInventory, PriceRequestResponse, CustomerOrderUpdated, OrderCanceled, PriceRequestCanceled, NewOrderReceived, ApprovalNotification, EmailLoginVerificationCode.
|
99
|
+
# @param email_template
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [nil]
|
102
|
+
def patch(buyer_id, email_template_type, email_template, opts = {})
|
103
|
+
patch_with_http_info(buyer_id, email_template_type, email_template, opts)
|
104
|
+
return nil
|
105
|
+
end
|
106
|
+
|
107
|
+
#
|
108
|
+
#
|
109
|
+
# @param buyer_id ID of the buyer.
|
110
|
+
# @param email_template_type Email template type of the email template. Possible values: OrderSubmittedForApproval, CustomerOrderSubmitted, OrderToApprove, OrderDeclined, OrderApproved, PriceRequestSubmitted, CustomerOrderShipped, ProductRequiresAttachment, InventoryPointReached, LineItemExceedsInventory, PriceRequestResponse, CustomerOrderUpdated, OrderCanceled, PriceRequestCanceled, NewOrderReceived, ApprovalNotification, EmailLoginVerificationCode.
|
111
|
+
# @param email_template
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
114
|
+
def patch_with_http_info(buyer_id, email_template_type, email_template, opts = {})
|
115
|
+
if @api_client.config.debugging
|
116
|
+
@api_client.config.logger.debug "Calling API: EmailTemplateApi.patch ..."
|
117
|
+
end
|
118
|
+
# verify the required parameter 'buyer_id' is set
|
119
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling EmailTemplateApi.patch" if buyer_id.nil?
|
120
|
+
# verify the required parameter 'email_template_type' is set
|
121
|
+
fail ArgumentError, "Missing the required parameter 'email_template_type' when calling EmailTemplateApi.patch" if email_template_type.nil?
|
122
|
+
# verify the required parameter 'email_template' is set
|
123
|
+
fail ArgumentError, "Missing the required parameter 'email_template' when calling EmailTemplateApi.patch" if email_template.nil?
|
124
|
+
# resource path
|
125
|
+
local_var_path = "/buyers/{buyerID}/emailtemplates/{emailTemplateType}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'emailTemplateType' + '}', email_template_type.to_s)
|
126
|
+
|
127
|
+
# query parameters
|
128
|
+
query_params = {}
|
129
|
+
|
130
|
+
# header parameters
|
131
|
+
header_params = {}
|
132
|
+
|
133
|
+
# HTTP header 'Accept' (if needed)
|
134
|
+
local_header_accept = ['application/json']
|
135
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
136
|
+
|
137
|
+
# HTTP header 'Content-Type'
|
138
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
139
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
140
|
+
|
141
|
+
# form parameters
|
142
|
+
form_params = {}
|
143
|
+
|
144
|
+
# http body (model)
|
145
|
+
post_body = @api_client.object_to_http_body(email_template)
|
146
|
+
auth_names = ['oauth2']
|
147
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
148
|
+
:header_params => header_params,
|
149
|
+
:query_params => query_params,
|
150
|
+
:form_params => form_params,
|
151
|
+
:body => post_body,
|
152
|
+
:auth_names => auth_names)
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug "API called: EmailTemplateApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
|
+
end
|
156
|
+
return data, status_code, headers
|
157
|
+
end
|
158
|
+
|
159
|
+
#
|
160
|
+
#
|
161
|
+
# @param buyer_id ID of the buyer.
|
162
|
+
# @param email_template_type Email template type of the email template. Possible values: OrderSubmittedForApproval, CustomerOrderSubmitted, OrderToApprove, OrderDeclined, OrderApproved, PriceRequestSubmitted, CustomerOrderShipped, ProductRequiresAttachment, InventoryPointReached, LineItemExceedsInventory, PriceRequestResponse, CustomerOrderUpdated, OrderCanceled, PriceRequestCanceled, NewOrderReceived, ApprovalNotification, EmailLoginVerificationCode.
|
163
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @return [nil]
|
165
|
+
def reset_to_default(buyer_id, email_template_type, opts = {})
|
166
|
+
reset_to_default_with_http_info(buyer_id, email_template_type, opts)
|
167
|
+
return nil
|
168
|
+
end
|
169
|
+
|
170
|
+
#
|
171
|
+
#
|
172
|
+
# @param buyer_id ID of the buyer.
|
173
|
+
# @param email_template_type Email template type of the email template. Possible values: OrderSubmittedForApproval, CustomerOrderSubmitted, OrderToApprove, OrderDeclined, OrderApproved, PriceRequestSubmitted, CustomerOrderShipped, ProductRequiresAttachment, InventoryPointReached, LineItemExceedsInventory, PriceRequestResponse, CustomerOrderUpdated, OrderCanceled, PriceRequestCanceled, NewOrderReceived, ApprovalNotification, EmailLoginVerificationCode.
|
174
|
+
# @param [Hash] opts the optional parameters
|
175
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
176
|
+
def reset_to_default_with_http_info(buyer_id, email_template_type, opts = {})
|
177
|
+
if @api_client.config.debugging
|
178
|
+
@api_client.config.logger.debug "Calling API: EmailTemplateApi.reset_to_default ..."
|
179
|
+
end
|
180
|
+
# verify the required parameter 'buyer_id' is set
|
181
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling EmailTemplateApi.reset_to_default" if buyer_id.nil?
|
182
|
+
# verify the required parameter 'email_template_type' is set
|
183
|
+
fail ArgumentError, "Missing the required parameter 'email_template_type' when calling EmailTemplateApi.reset_to_default" if email_template_type.nil?
|
184
|
+
# resource path
|
185
|
+
local_var_path = "/buyers/{buyerID}/emailtemplates/{emailTemplateType}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'emailTemplateType' + '}', email_template_type.to_s)
|
186
|
+
|
187
|
+
# query parameters
|
188
|
+
query_params = {}
|
189
|
+
|
190
|
+
# header parameters
|
191
|
+
header_params = {}
|
192
|
+
|
193
|
+
# HTTP header 'Accept' (if needed)
|
194
|
+
local_header_accept = ['application/json']
|
195
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
196
|
+
|
197
|
+
# HTTP header 'Content-Type'
|
198
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
199
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
200
|
+
|
201
|
+
# form parameters
|
202
|
+
form_params = {}
|
203
|
+
|
204
|
+
# http body (model)
|
205
|
+
post_body = nil
|
206
|
+
auth_names = ['oauth2']
|
207
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
208
|
+
:header_params => header_params,
|
209
|
+
:query_params => query_params,
|
210
|
+
:form_params => form_params,
|
211
|
+
:body => post_body,
|
212
|
+
:auth_names => auth_names)
|
213
|
+
if @api_client.config.debugging
|
214
|
+
@api_client.config.logger.debug "API called: EmailTemplateApi#reset_to_default\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
215
|
+
end
|
216
|
+
return data, status_code, headers
|
217
|
+
end
|
218
|
+
|
219
|
+
#
|
220
|
+
#
|
221
|
+
# @param buyer_id ID of the buyer.
|
222
|
+
# @param email_template_type Email template type of the email template. Possible values: OrderSubmittedForApproval, CustomerOrderSubmitted, OrderToApprove, OrderDeclined, OrderApproved, PriceRequestSubmitted, CustomerOrderShipped, ProductRequiresAttachment, InventoryPointReached, LineItemExceedsInventory, PriceRequestResponse, CustomerOrderUpdated, OrderCanceled, PriceRequestCanceled, NewOrderReceived, ApprovalNotification, EmailLoginVerificationCode.
|
223
|
+
# @param email_template
|
224
|
+
# @param [Hash] opts the optional parameters
|
225
|
+
# @return [nil]
|
226
|
+
def update(buyer_id, email_template_type, email_template, opts = {})
|
227
|
+
update_with_http_info(buyer_id, email_template_type, email_template, opts)
|
228
|
+
return nil
|
229
|
+
end
|
230
|
+
|
231
|
+
#
|
232
|
+
#
|
233
|
+
# @param buyer_id ID of the buyer.
|
234
|
+
# @param email_template_type Email template type of the email template. Possible values: OrderSubmittedForApproval, CustomerOrderSubmitted, OrderToApprove, OrderDeclined, OrderApproved, PriceRequestSubmitted, CustomerOrderShipped, ProductRequiresAttachment, InventoryPointReached, LineItemExceedsInventory, PriceRequestResponse, CustomerOrderUpdated, OrderCanceled, PriceRequestCanceled, NewOrderReceived, ApprovalNotification, EmailLoginVerificationCode.
|
235
|
+
# @param email_template
|
236
|
+
# @param [Hash] opts the optional parameters
|
237
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
238
|
+
def update_with_http_info(buyer_id, email_template_type, email_template, opts = {})
|
239
|
+
if @api_client.config.debugging
|
240
|
+
@api_client.config.logger.debug "Calling API: EmailTemplateApi.update ..."
|
241
|
+
end
|
242
|
+
# verify the required parameter 'buyer_id' is set
|
243
|
+
fail ArgumentError, "Missing the required parameter 'buyer_id' when calling EmailTemplateApi.update" if buyer_id.nil?
|
244
|
+
# verify the required parameter 'email_template_type' is set
|
245
|
+
fail ArgumentError, "Missing the required parameter 'email_template_type' when calling EmailTemplateApi.update" if email_template_type.nil?
|
246
|
+
# verify the required parameter 'email_template' is set
|
247
|
+
fail ArgumentError, "Missing the required parameter 'email_template' when calling EmailTemplateApi.update" if email_template.nil?
|
248
|
+
# resource path
|
249
|
+
local_var_path = "/buyers/{buyerID}/emailtemplates/{emailTemplateType}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'emailTemplateType' + '}', email_template_type.to_s)
|
250
|
+
|
251
|
+
# query parameters
|
252
|
+
query_params = {}
|
253
|
+
|
254
|
+
# header parameters
|
255
|
+
header_params = {}
|
256
|
+
|
257
|
+
# HTTP header 'Accept' (if needed)
|
258
|
+
local_header_accept = ['application/json']
|
259
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
260
|
+
|
261
|
+
# HTTP header 'Content-Type'
|
262
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
263
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
264
|
+
|
265
|
+
# form parameters
|
266
|
+
form_params = {}
|
267
|
+
|
268
|
+
# http body (model)
|
269
|
+
post_body = @api_client.object_to_http_body(email_template)
|
270
|
+
auth_names = ['oauth2']
|
271
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
272
|
+
:header_params => header_params,
|
273
|
+
:query_params => query_params,
|
274
|
+
:form_params => form_params,
|
275
|
+
:body => post_body,
|
276
|
+
:auth_names => auth_names)
|
277
|
+
if @api_client.config.debugging
|
278
|
+
@api_client.config.logger.debug "API called: EmailTemplateApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
279
|
+
end
|
280
|
+
return data, status_code, headers
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
@@ -0,0 +1,206 @@
|
|
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 FileApi
|
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 file_id ID of the file.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [File]
|
39
|
+
def get(file_id, opts = {})
|
40
|
+
data, _status_code, _headers = get_with_http_info(file_id, opts)
|
41
|
+
return data
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
#
|
46
|
+
# @param file_id ID of the file.
|
47
|
+
# @param [Hash] opts the optional parameters
|
48
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
49
|
+
def get_with_http_info(file_id, opts = {})
|
50
|
+
if @api_client.config.debugging
|
51
|
+
@api_client.config.logger.debug "Calling API: FileApi.get ..."
|
52
|
+
end
|
53
|
+
# verify the required parameter 'file_id' is set
|
54
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling FileApi.get" if file_id.nil?
|
55
|
+
# resource path
|
56
|
+
local_var_path = "/files/{fileID}".sub('{format}','json').sub('{' + 'fileID' + '}', file_id.to_s)
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = {}
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = {}
|
63
|
+
|
64
|
+
# HTTP header 'Accept' (if needed)
|
65
|
+
local_header_accept = ['application/json']
|
66
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
67
|
+
|
68
|
+
# HTTP header 'Content-Type'
|
69
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
70
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
71
|
+
|
72
|
+
# form parameters
|
73
|
+
form_params = {}
|
74
|
+
|
75
|
+
# http body (model)
|
76
|
+
post_body = nil
|
77
|
+
auth_names = ['oauth2']
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
79
|
+
:header_params => header_params,
|
80
|
+
:query_params => query_params,
|
81
|
+
:form_params => form_params,
|
82
|
+
:body => post_body,
|
83
|
+
:auth_names => auth_names,
|
84
|
+
:return_type => 'File')
|
85
|
+
if @api_client.config.debugging
|
86
|
+
@api_client.config.logger.debug "API called: FileApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
87
|
+
end
|
88
|
+
return data, status_code, headers
|
89
|
+
end
|
90
|
+
|
91
|
+
#
|
92
|
+
#
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
95
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
96
|
+
# @return [ListFile]
|
97
|
+
def list(opts = {})
|
98
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
99
|
+
return data
|
100
|
+
end
|
101
|
+
|
102
|
+
#
|
103
|
+
#
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @option opts [Integer] :page Page of results to return. Default: 1
|
106
|
+
# @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
|
107
|
+
# @return [Array<(ListFile, Fixnum, Hash)>] ListFile data, response status code and response headers
|
108
|
+
def list_with_http_info(opts = {})
|
109
|
+
if @api_client.config.debugging
|
110
|
+
@api_client.config.logger.debug "Calling API: FileApi.list ..."
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = "/files".sub('{format}','json')
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = {}
|
117
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
118
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
119
|
+
|
120
|
+
# header parameters
|
121
|
+
header_params = {}
|
122
|
+
|
123
|
+
# HTTP header 'Accept' (if needed)
|
124
|
+
local_header_accept = ['application/json']
|
125
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
126
|
+
|
127
|
+
# HTTP header 'Content-Type'
|
128
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
129
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
130
|
+
|
131
|
+
# form parameters
|
132
|
+
form_params = {}
|
133
|
+
|
134
|
+
# http body (model)
|
135
|
+
post_body = nil
|
136
|
+
auth_names = ['oauth2']
|
137
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
138
|
+
:header_params => header_params,
|
139
|
+
:query_params => query_params,
|
140
|
+
:form_params => form_params,
|
141
|
+
:body => post_body,
|
142
|
+
:auth_names => auth_names,
|
143
|
+
:return_type => 'ListFile')
|
144
|
+
if @api_client.config.debugging
|
145
|
+
@api_client.config.logger.debug "API called: FileApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
146
|
+
end
|
147
|
+
return data, status_code, headers
|
148
|
+
end
|
149
|
+
|
150
|
+
#
|
151
|
+
#
|
152
|
+
# @param [Hash] opts the optional parameters
|
153
|
+
# @option opts [String] :filename Filename of the file.
|
154
|
+
# @return [File]
|
155
|
+
def post_file_data(opts = {})
|
156
|
+
data, _status_code, _headers = post_file_data_with_http_info(opts)
|
157
|
+
return data
|
158
|
+
end
|
159
|
+
|
160
|
+
#
|
161
|
+
#
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @option opts [String] :filename Filename of the file.
|
164
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
165
|
+
def post_file_data_with_http_info(opts = {})
|
166
|
+
if @api_client.config.debugging
|
167
|
+
@api_client.config.logger.debug "Calling API: FileApi.post_file_data ..."
|
168
|
+
end
|
169
|
+
# resource path
|
170
|
+
local_var_path = "/files".sub('{format}','json')
|
171
|
+
|
172
|
+
# query parameters
|
173
|
+
query_params = {}
|
174
|
+
query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil?
|
175
|
+
|
176
|
+
# header parameters
|
177
|
+
header_params = {}
|
178
|
+
|
179
|
+
# HTTP header 'Accept' (if needed)
|
180
|
+
local_header_accept = ['application/json']
|
181
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
182
|
+
|
183
|
+
# HTTP header 'Content-Type'
|
184
|
+
local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
|
185
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
186
|
+
|
187
|
+
# form parameters
|
188
|
+
form_params = {}
|
189
|
+
|
190
|
+
# http body (model)
|
191
|
+
post_body = nil
|
192
|
+
auth_names = ['oauth2']
|
193
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
194
|
+
:header_params => header_params,
|
195
|
+
:query_params => query_params,
|
196
|
+
:form_params => form_params,
|
197
|
+
:body => post_body,
|
198
|
+
:auth_names => auth_names,
|
199
|
+
:return_type => 'File')
|
200
|
+
if @api_client.config.debugging
|
201
|
+
@api_client.config.logger.debug "API called: FileApi#post_file_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
202
|
+
end
|
203
|
+
return data, status_code, headers
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|