order_cloud 1.0.45.pre.staging → 1.0.57
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +28 -0
- data/Gemfile.lock +34 -0
- data/LICENSE +201 -0
- data/README.md +552 -0
- data/Rakefile +31 -0
- data/docs/AccessToken.md +11 -0
- data/docs/Address.md +20 -0
- data/docs/AddressApi.md +520 -0
- data/docs/AddressAssignment.md +12 -0
- data/docs/AdminAddressApi.md +324 -0
- data/docs/AdminUserApi.md +324 -0
- data/docs/AdminUserGroupApi.md +482 -0
- data/docs/ApprovalRule.md +13 -0
- data/docs/ApprovalRuleApi.md +342 -0
- data/docs/BaseSpec.md +16 -0
- data/docs/Buyer.md +12 -0
- data/docs/BuyerAddress.md +23 -0
- data/docs/BuyerApi.md +324 -0
- data/docs/BuyerCreditCard.md +16 -0
- data/docs/BuyerProduct.md +23 -0
- data/docs/BuyerShipment.md +19 -0
- data/docs/BuyerSpec.md +17 -0
- data/docs/Catalog.md +13 -0
- data/docs/CatalogApi.md +640 -0
- data/docs/CatalogAssignment.md +11 -0
- data/docs/Category.md +15 -0
- data/docs/CategoryApi.md +690 -0
- data/docs/CategoryAssignment.md +12 -0
- data/docs/CategoryProductAssignment.md +10 -0
- data/docs/CostCenter.md +11 -0
- data/docs/CostCenterApi.md +516 -0
- data/docs/CostCenterAssignment.md +9 -0
- data/docs/CreditCard.md +15 -0
- data/docs/CreditCardApi.md +516 -0
- data/docs/CreditCardAssignment.md +10 -0
- data/docs/ImpersonateTokenRequest.md +9 -0
- data/docs/ImpersonationConfig.md +16 -0
- data/docs/ImpersonationConfigApi.md +324 -0
- data/docs/Inventory.md +13 -0
- data/docs/LineItem.md +24 -0
- data/docs/LineItemApi.md +478 -0
- data/docs/LineItemProduct.md +16 -0
- data/docs/LineItemSpec.md +11 -0
- data/docs/ListAddress.md +9 -0
- data/docs/ListAddressAssignment.md +9 -0
- data/docs/ListApprovalRule.md +9 -0
- data/docs/ListArgs.md +13 -0
- data/docs/ListBuyer.md +9 -0
- data/docs/ListBuyerAddress.md +9 -0
- data/docs/ListBuyerCreditCard.md +9 -0
- data/docs/ListBuyerProduct.md +9 -0
- data/docs/ListBuyerShipment.md +9 -0
- data/docs/ListBuyerSpec.md +9 -0
- data/docs/ListCatalog.md +9 -0
- data/docs/ListCatalogAssignment.md +9 -0
- data/docs/ListCategory.md +9 -0
- data/docs/ListCategoryAssignment.md +9 -0
- data/docs/ListCategoryProductAssignment.md +9 -0
- data/docs/ListCostCenter.md +9 -0
- data/docs/ListCostCenterAssignment.md +9 -0
- data/docs/ListCreditCard.md +9 -0
- data/docs/ListCreditCardAssignment.md +9 -0
- data/docs/ListImpersonationConfig.md +9 -0
- data/docs/ListLineItem.md +9 -0
- data/docs/ListMessageCCListenerAssignment.md +9 -0
- data/docs/ListMessageConfig.md +9 -0
- data/docs/ListMessageSender.md +9 -0
- data/docs/ListMessageSenderAssignment.md +9 -0
- data/docs/ListOrder.md +9 -0
- data/docs/ListOrderApproval.md +9 -0
- data/docs/ListOrderPromotion.md +9 -0
- data/docs/ListPayment.md +9 -0
- data/docs/ListPriceSchedule.md +9 -0
- data/docs/ListProduct.md +9 -0
- data/docs/ListProductAssignment.md +9 -0
- data/docs/ListProductCatalogAssignment.md +9 -0
- data/docs/ListPromotion.md +9 -0
- data/docs/ListPromotionAssignment.md +9 -0
- data/docs/ListSecurityProfile.md +9 -0
- data/docs/ListSecurityProfileAssignment.md +9 -0
- data/docs/ListShipment.md +9 -0
- data/docs/ListShipmentItem.md +9 -0
- data/docs/ListSpec.md +9 -0
- data/docs/ListSpecOption.md +9 -0
- data/docs/ListSpecProductAssignment.md +9 -0
- data/docs/ListSpendingAccount.md +9 -0
- data/docs/ListSpendingAccountAssignment.md +9 -0
- data/docs/ListSupplier.md +9 -0
- data/docs/ListUser.md +9 -0
- data/docs/ListUserGroup.md +9 -0
- data/docs/ListUserGroupAssignment.md +9 -0
- data/docs/ListVariant.md +9 -0
- data/docs/MeApi.md +2002 -0
- data/docs/MeBuyer.md +9 -0
- data/docs/MeUser.md +19 -0
- data/docs/MessageCCListenerAssignment.md +13 -0
- data/docs/MessageConfig.md +14 -0
- data/docs/MessageSender.md +10 -0
- data/docs/MessageSenderAssignment.md +11 -0
- data/docs/MessageSendersApi.md +398 -0
- data/docs/Meta.md +12 -0
- data/docs/Order.md +30 -0
- data/docs/OrderApi.md +1161 -0
- data/docs/OrderApproval.md +14 -0
- data/docs/OrderApprovalInfo.md +9 -0
- data/docs/OrderPromotion.md +22 -0
- data/docs/PasswordReset.md +10 -0
- data/docs/PasswordResetApi.md +109 -0
- data/docs/PasswordResetRequest.md +11 -0
- data/docs/Payment.md +17 -0
- data/docs/PaymentApi.md +418 -0
- data/docs/PaymentTransaction.md +15 -0
- data/docs/PriceBreak.md +9 -0
- data/docs/PriceSchedule.md +17 -0
- data/docs/PriceScheduleApi.md +429 -0
- data/docs/Product.md +23 -0
- data/docs/ProductApi.md +953 -0
- data/docs/ProductAssignment.md +11 -0
- data/docs/ProductBase.md +22 -0
- data/docs/ProductCatalogAssignment.md +9 -0
- data/docs/Promotion.md +21 -0
- data/docs/PromotionApi.md +494 -0
- data/docs/PromotionAssignment.md +10 -0
- data/docs/SecurityProfile.md +10 -0
- data/docs/SecurityProfileApi.md +292 -0
- data/docs/SecurityProfileAssignment.md +12 -0
- data/docs/Shipment.md +20 -0
- data/docs/ShipmentApi.md +554 -0
- data/docs/ShipmentItem.md +16 -0
- data/docs/Spec.md +17 -0
- data/docs/SpecApi.md +820 -0
- data/docs/SpecOption.md +14 -0
- data/docs/SpecProductAssignment.md +11 -0
- data/docs/SpendingAccount.md +15 -0
- data/docs/SpendingAccountApi.md +516 -0
- data/docs/SpendingAccountAssignment.md +11 -0
- data/docs/Supplier.md +11 -0
- data/docs/SupplierApi.md +324 -0
- data/docs/SupplierUserApi.md +400 -0
- data/docs/SupplierUserGroupApi.md +509 -0
- data/docs/TokenPasswordReset.md +8 -0
- data/docs/User.md +18 -0
- data/docs/UserApi.md +400 -0
- data/docs/UserGroup.md +11 -0
- data/docs/UserGroupApi.md +509 -0
- data/docs/UserGroupAssignment.md +9 -0
- data/docs/Variant.md +12 -0
- data/git_push.sh +67 -0
- data/lib/order_cloud.rb +193 -0
- data/lib/order_cloud/api/address_api.rb +628 -0
- data/lib/order_cloud/api/admin_address_api.rb +397 -0
- data/lib/order_cloud/api/admin_user_api.rb +397 -0
- data/lib/order_cloud/api/admin_user_group_api.rb +578 -0
- data/lib/order_cloud/api/approval_rule_api.rb +421 -0
- data/lib/order_cloud/api/auth_api.rb +138 -0
- data/lib/order_cloud/api/buyer_api.rb +397 -0
- data/lib/order_cloud/api/catalog_api.rb +760 -0
- data/lib/order_cloud/api/category_api.rb +826 -0
- data/lib/order_cloud/api/cost_center_api.rb +622 -0
- data/lib/order_cloud/api/credit_card_api.rb +622 -0
- data/lib/order_cloud/api/impersonation_config_api.rb +397 -0
- data/lib/order_cloud/api/line_item_api.rb +583 -0
- data/lib/order_cloud/api/me_api.rb +2345 -0
- data/lib/order_cloud/api/message_senders_api.rb +484 -0
- data/lib/order_cloud/api/order_api.rb +1377 -0
- data/lib/order_cloud/api/password_reset_api.rb +150 -0
- data/lib/order_cloud/api/payment_api.rb +513 -0
- data/lib/order_cloud/api/price_schedule_api.rb +519 -0
- data/lib/order_cloud/api/product_api.rb +1126 -0
- data/lib/order_cloud/api/promotion_api.rb +594 -0
- data/lib/order_cloud/api/security_profile_api.rb +363 -0
- data/lib/order_cloud/api/shipment_api.rb +665 -0
- data/lib/order_cloud/api/spec_api.rb +971 -0
- data/lib/order_cloud/api/spending_account_api.rb +622 -0
- data/lib/order_cloud/api/supplier_api.rb +397 -0
- data/lib/order_cloud/api/supplier_user_api.rb +489 -0
- data/lib/order_cloud/api/supplier_user_group_api.rb +614 -0
- data/lib/order_cloud/api/user_api.rb +489 -0
- data/lib/order_cloud/api/user_group_api.rb +614 -0
- data/lib/order_cloud/api_client.rb +385 -0
- data/lib/order_cloud/api_error.rb +47 -0
- data/lib/order_cloud/configuration.rb +245 -0
- data/lib/order_cloud/models/access_token.rb +226 -0
- data/lib/order_cloud/models/address.rb +307 -0
- data/lib/order_cloud/models/address_assignment.rb +235 -0
- data/lib/order_cloud/models/approval_rule.rb +244 -0
- data/lib/order_cloud/models/base_spec.rb +271 -0
- data/lib/order_cloud/models/buyer.rb +235 -0
- data/lib/order_cloud/models/buyer_address.rb +334 -0
- data/lib/order_cloud/models/buyer_credit_card.rb +271 -0
- data/lib/order_cloud/models/buyer_product.rb +334 -0
- data/lib/order_cloud/models/buyer_shipment.rb +298 -0
- data/lib/order_cloud/models/buyer_spec.rb +282 -0
- data/lib/order_cloud/models/catalog.rb +244 -0
- data/lib/order_cloud/models/catalog_assignment.rb +226 -0
- data/lib/order_cloud/models/category.rb +262 -0
- data/lib/order_cloud/models/category_assignment.rb +235 -0
- data/lib/order_cloud/models/category_product_assignment.rb +217 -0
- data/lib/order_cloud/models/cost_center.rb +226 -0
- data/lib/order_cloud/models/cost_center_assignment.rb +208 -0
- data/lib/order_cloud/models/credit_card.rb +262 -0
- data/lib/order_cloud/models/credit_card_assignment.rb +217 -0
- data/lib/order_cloud/models/impersonate_token_request.rb +210 -0
- data/lib/order_cloud/models/impersonation_config.rb +271 -0
- data/lib/order_cloud/models/inventory.rb +244 -0
- data/lib/order_cloud/models/line_item.rb +345 -0
- data/lib/order_cloud/models/line_item_product.rb +271 -0
- data/lib/order_cloud/models/line_item_spec.rb +226 -0
- data/lib/order_cloud/models/list_address.rb +210 -0
- data/lib/order_cloud/models/list_address_assignment.rb +210 -0
- data/lib/order_cloud/models/list_approval_rule.rb +210 -0
- data/lib/order_cloud/models/list_args.rb +248 -0
- data/lib/order_cloud/models/list_buyer.rb +210 -0
- data/lib/order_cloud/models/list_buyer_address.rb +210 -0
- data/lib/order_cloud/models/list_buyer_credit_card.rb +210 -0
- data/lib/order_cloud/models/list_buyer_product.rb +210 -0
- data/lib/order_cloud/models/list_buyer_shipment.rb +210 -0
- data/lib/order_cloud/models/list_buyer_spec.rb +210 -0
- data/lib/order_cloud/models/list_catalog.rb +210 -0
- data/lib/order_cloud/models/list_catalog_assignment.rb +210 -0
- data/lib/order_cloud/models/list_category.rb +210 -0
- data/lib/order_cloud/models/list_category_assignment.rb +210 -0
- data/lib/order_cloud/models/list_category_product_assignment.rb +210 -0
- data/lib/order_cloud/models/list_cost_center.rb +210 -0
- data/lib/order_cloud/models/list_cost_center_assignment.rb +210 -0
- data/lib/order_cloud/models/list_credit_card.rb +210 -0
- data/lib/order_cloud/models/list_credit_card_assignment.rb +210 -0
- data/lib/order_cloud/models/list_impersonation_config.rb +210 -0
- data/lib/order_cloud/models/list_line_item.rb +210 -0
- data/lib/order_cloud/models/list_message_cc_listener_assignment.rb +210 -0
- data/lib/order_cloud/models/list_message_config.rb +210 -0
- data/lib/order_cloud/models/list_message_sender.rb +210 -0
- data/lib/order_cloud/models/list_message_sender_assignment.rb +210 -0
- data/lib/order_cloud/models/list_order.rb +210 -0
- data/lib/order_cloud/models/list_order_approval.rb +210 -0
- data/lib/order_cloud/models/list_order_promotion.rb +210 -0
- data/lib/order_cloud/models/list_payment.rb +210 -0
- data/lib/order_cloud/models/list_price_schedule.rb +210 -0
- data/lib/order_cloud/models/list_product.rb +210 -0
- data/lib/order_cloud/models/list_product_assignment.rb +210 -0
- data/lib/order_cloud/models/list_product_catalog_assignment.rb +210 -0
- data/lib/order_cloud/models/list_promotion.rb +210 -0
- data/lib/order_cloud/models/list_promotion_assignment.rb +210 -0
- data/lib/order_cloud/models/list_security_profile.rb +210 -0
- data/lib/order_cloud/models/list_security_profile_assignment.rb +210 -0
- data/lib/order_cloud/models/list_shipment.rb +210 -0
- data/lib/order_cloud/models/list_shipment_item.rb +210 -0
- data/lib/order_cloud/models/list_spec.rb +210 -0
- data/lib/order_cloud/models/list_spec_option.rb +210 -0
- data/lib/order_cloud/models/list_spec_product_assignment.rb +210 -0
- data/lib/order_cloud/models/list_spending_account.rb +210 -0
- data/lib/order_cloud/models/list_spending_account_assignment.rb +210 -0
- data/lib/order_cloud/models/list_supplier.rb +210 -0
- data/lib/order_cloud/models/list_user.rb +210 -0
- data/lib/order_cloud/models/list_user_group.rb +210 -0
- data/lib/order_cloud/models/list_user_group_assignment.rb +210 -0
- data/lib/order_cloud/models/list_variant.rb +210 -0
- data/lib/order_cloud/models/me_buyer.rb +208 -0
- data/lib/order_cloud/models/me_user.rb +300 -0
- data/lib/order_cloud/models/message_cc_listener_assignment.rb +244 -0
- data/lib/order_cloud/models/message_config.rb +255 -0
- data/lib/order_cloud/models/message_sender.rb +219 -0
- data/lib/order_cloud/models/message_sender_assignment.rb +226 -0
- data/lib/order_cloud/models/meta.rb +237 -0
- data/lib/order_cloud/models/order.rb +397 -0
- data/lib/order_cloud/models/order_approval.rb +253 -0
- data/lib/order_cloud/models/order_approval_info.rb +208 -0
- data/lib/order_cloud/models/order_promotion.rb +325 -0
- data/lib/order_cloud/models/password_reset.rb +217 -0
- data/lib/order_cloud/models/password_reset_request.rb +226 -0
- data/lib/order_cloud/models/payment.rb +282 -0
- data/lib/order_cloud/models/payment_transaction.rb +262 -0
- data/lib/order_cloud/models/price_break.rb +208 -0
- data/lib/order_cloud/models/price_schedule.rb +282 -0
- data/lib/order_cloud/models/product.rb +334 -0
- data/lib/order_cloud/models/product_assignment.rb +226 -0
- data/lib/order_cloud/models/product_base.rb +325 -0
- data/lib/order_cloud/models/product_catalog_assignment.rb +208 -0
- data/lib/order_cloud/models/promotion.rb +316 -0
- data/lib/order_cloud/models/promotion_assignment.rb +217 -0
- data/lib/order_cloud/models/security_profile.rb +219 -0
- data/lib/order_cloud/models/security_profile_assignment.rb +235 -0
- data/lib/order_cloud/models/shipment.rb +307 -0
- data/lib/order_cloud/models/shipment_item.rb +273 -0
- data/lib/order_cloud/models/spec.rb +280 -0
- data/lib/order_cloud/models/spec_option.rb +253 -0
- data/lib/order_cloud/models/spec_product_assignment.rb +226 -0
- data/lib/order_cloud/models/spending_account.rb +262 -0
- data/lib/order_cloud/models/spending_account_assignment.rb +226 -0
- data/lib/order_cloud/models/supplier.rb +226 -0
- data/lib/order_cloud/models/token_password_reset.rb +199 -0
- data/lib/order_cloud/models/user.rb +291 -0
- data/lib/order_cloud/models/user_group.rb +226 -0
- data/lib/order_cloud/models/user_group_assignment.rb +208 -0
- data/lib/order_cloud/models/variant.rb +235 -0
- data/lib/order_cloud/version.rb +26 -0
- data/order_cloud-1.0.56.gem +0 -0
- data/order_cloud.gemspec +56 -0
- data/spec/api/address_api_spec.rb +179 -0
- data/spec/api/admin_address_api_spec.rb +125 -0
- data/spec/api/admin_user_api_spec.rb +125 -0
- data/spec/api/admin_user_group_api_spec.rb +165 -0
- data/spec/api/approval_rule_api_spec.rb +131 -0
- data/spec/api/auth_api_spec.rb +165 -0
- data/spec/api/buyer_api_spec.rb +125 -0
- data/spec/api/catalog_api_spec.rb +205 -0
- data/spec/api/category_api_spec.rb +223 -0
- data/spec/api/cost_center_api_spec.rb +177 -0
- data/spec/api/credit_card_api_spec.rb +177 -0
- data/spec/api/impersonation_config_api_spec.rb +125 -0
- data/spec/api/line_item_api_spec.rb +167 -0
- data/spec/api/me_api_spec.rb +568 -0
- data/spec/api/message_senders_api_spec.rb +149 -0
- data/spec/api/order_api_spec.rb +344 -0
- data/spec/api/password_reset_api_spec.rb +71 -0
- data/spec/api/payment_api_spec.rb +152 -0
- data/spec/api/price_schedule_api_spec.rb +151 -0
- data/spec/api/product_api_spec.rb +290 -0
- data/spec/api/promotion_api_spec.rb +170 -0
- data/spec/api/security_profile_api_spec.rb +122 -0
- data/spec/api/shipment_api_spec.rb +185 -0
- data/spec/api/spec_api_spec.rb +252 -0
- data/spec/api/spending_account_api_spec.rb +177 -0
- data/spec/api/supplier_api_spec.rb +125 -0
- data/spec/api/supplier_user_api_spec.rb +146 -0
- data/spec/api/supplier_user_group_api_spec.rb +174 -0
- data/spec/api/user_api_spec.rb +146 -0
- data/spec/api/user_group_api_spec.rb +174 -0
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +80 -0
- data/spec/models/access_token_spec.rb +71 -0
- data/spec/models/address_assignment_spec.rb +77 -0
- data/spec/models/address_spec.rb +125 -0
- data/spec/models/approval_rule_spec.rb +83 -0
- data/spec/models/base_spec_spec.rb +101 -0
- data/spec/models/buyer_address_spec.rb +143 -0
- data/spec/models/buyer_credit_card_spec.rb +101 -0
- data/spec/models/buyer_product_spec.rb +143 -0
- data/spec/models/buyer_shipment_spec.rb +119 -0
- data/spec/models/buyer_spec.rb +77 -0
- data/spec/models/buyer_spec_spec.rb +107 -0
- data/spec/models/catalog_assignment_spec.rb +71 -0
- data/spec/models/catalog_spec.rb +83 -0
- data/spec/models/category_assignment_spec.rb +77 -0
- data/spec/models/category_product_assignment_spec.rb +65 -0
- data/spec/models/category_spec.rb +95 -0
- data/spec/models/cost_center_assignment_spec.rb +59 -0
- data/spec/models/cost_center_spec.rb +71 -0
- data/spec/models/credit_card_assignment_spec.rb +65 -0
- data/spec/models/credit_card_spec.rb +95 -0
- data/spec/models/impersonate_token_request_spec.rb +59 -0
- data/spec/models/impersonation_config_spec.rb +101 -0
- data/spec/models/inventory_spec.rb +83 -0
- data/spec/models/line_item_product_spec.rb +101 -0
- data/spec/models/line_item_spec.rb +149 -0
- data/spec/models/line_item_spec_spec.rb +71 -0
- data/spec/models/list_address_assignment_spec.rb +59 -0
- data/spec/models/list_address_spec.rb +59 -0
- data/spec/models/list_approval_rule_spec.rb +59 -0
- data/spec/models/list_args_spec.rb +83 -0
- data/spec/models/list_buyer_address_spec.rb +59 -0
- data/spec/models/list_buyer_credit_card_spec.rb +59 -0
- data/spec/models/list_buyer_product_spec.rb +59 -0
- data/spec/models/list_buyer_shipment_spec.rb +59 -0
- data/spec/models/list_buyer_spec.rb +59 -0
- data/spec/models/list_buyer_spec_spec.rb +59 -0
- data/spec/models/list_catalog_assignment_spec.rb +59 -0
- data/spec/models/list_catalog_spec.rb +59 -0
- data/spec/models/list_category_assignment_spec.rb +59 -0
- data/spec/models/list_category_product_assignment_spec.rb +59 -0
- data/spec/models/list_category_spec.rb +59 -0
- data/spec/models/list_cost_center_assignment_spec.rb +59 -0
- data/spec/models/list_cost_center_spec.rb +59 -0
- data/spec/models/list_credit_card_assignment_spec.rb +59 -0
- data/spec/models/list_credit_card_spec.rb +59 -0
- data/spec/models/list_impersonation_config_spec.rb +59 -0
- data/spec/models/list_line_item_spec.rb +59 -0
- data/spec/models/list_message_cc_listener_assignment_spec.rb +59 -0
- data/spec/models/list_message_config_spec.rb +59 -0
- data/spec/models/list_message_sender_assignment_spec.rb +59 -0
- data/spec/models/list_message_sender_spec.rb +59 -0
- data/spec/models/list_order_approval_spec.rb +59 -0
- data/spec/models/list_order_promotion_spec.rb +59 -0
- data/spec/models/list_order_spec.rb +59 -0
- data/spec/models/list_payment_spec.rb +59 -0
- data/spec/models/list_price_schedule_spec.rb +59 -0
- data/spec/models/list_product_assignment_spec.rb +59 -0
- data/spec/models/list_product_catalog_assignment_spec.rb +59 -0
- data/spec/models/list_product_spec.rb +59 -0
- data/spec/models/list_promotion_assignment_spec.rb +59 -0
- data/spec/models/list_promotion_spec.rb +59 -0
- data/spec/models/list_security_profile_assignment_spec.rb +59 -0
- data/spec/models/list_security_profile_spec.rb +59 -0
- data/spec/models/list_shipment_item_spec.rb +59 -0
- data/spec/models/list_shipment_spec.rb +59 -0
- data/spec/models/list_spec_option_spec.rb +59 -0
- data/spec/models/list_spec_product_assignment_spec.rb +59 -0
- data/spec/models/list_spec_spec.rb +59 -0
- data/spec/models/list_spending_account_assignment_spec.rb +59 -0
- data/spec/models/list_spending_account_spec.rb +59 -0
- data/spec/models/list_supplier_spec.rb +59 -0
- data/spec/models/list_user_group_assignment_spec.rb +59 -0
- data/spec/models/list_user_group_spec.rb +59 -0
- data/spec/models/list_user_spec.rb +59 -0
- data/spec/models/list_variant_spec.rb +59 -0
- data/spec/models/me_buyer_spec.rb +59 -0
- data/spec/models/me_user_spec.rb +119 -0
- data/spec/models/message_cc_listener_assignment_spec.rb +83 -0
- data/spec/models/message_config_spec.rb +89 -0
- data/spec/models/message_sender_assignment_spec.rb +71 -0
- data/spec/models/message_sender_spec.rb +65 -0
- data/spec/models/meta_spec.rb +77 -0
- data/spec/models/order_approval_info_spec.rb +59 -0
- data/spec/models/order_approval_spec.rb +89 -0
- data/spec/models/order_promotion_spec.rb +137 -0
- data/spec/models/order_spec.rb +185 -0
- data/spec/models/password_reset_request_spec.rb +71 -0
- data/spec/models/password_reset_spec.rb +65 -0
- data/spec/models/payment_spec.rb +107 -0
- data/spec/models/payment_transaction_spec.rb +95 -0
- data/spec/models/price_break_spec.rb +59 -0
- data/spec/models/price_schedule_spec.rb +107 -0
- data/spec/models/product_assignment_spec.rb +71 -0
- data/spec/models/product_base_spec.rb +137 -0
- data/spec/models/product_catalog_assignment_spec.rb +59 -0
- data/spec/models/product_spec.rb +143 -0
- data/spec/models/promotion_assignment_spec.rb +65 -0
- data/spec/models/promotion_spec.rb +131 -0
- data/spec/models/security_profile_assignment_spec.rb +77 -0
- data/spec/models/security_profile_spec.rb +65 -0
- data/spec/models/shipment_item_spec.rb +101 -0
- data/spec/models/shipment_spec.rb +125 -0
- data/spec/models/spec_option_spec.rb +89 -0
- data/spec/models/spec_product_assignment_spec.rb +71 -0
- data/spec/models/spec_spec.rb +107 -0
- data/spec/models/spending_account_assignment_spec.rb +71 -0
- data/spec/models/spending_account_spec.rb +95 -0
- data/spec/models/supplier_spec.rb +71 -0
- data/spec/models/token_password_reset_spec.rb +53 -0
- data/spec/models/user_group_assignment_spec.rb +59 -0
- data/spec/models/user_group_spec.rb +71 -0
- data/spec/models/user_spec.rb +113 -0
- data/spec/models/variant_spec.rb +77 -0
- data/spec/spec_helper.rb +122 -0
- metadata +596 -6
@@ -0,0 +1,397 @@
|
|
1
|
+
=begin
|
2
|
+
#OrderCloud
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
Contact: ordercloud@four51.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'date'
|
25
|
+
|
26
|
+
module OrderCloud
|
27
|
+
|
28
|
+
class Order
|
29
|
+
attr_accessor :id
|
30
|
+
|
31
|
+
attr_accessor :from_user
|
32
|
+
|
33
|
+
attr_accessor :from_company_id
|
34
|
+
|
35
|
+
attr_accessor :from_user_id
|
36
|
+
|
37
|
+
attr_accessor :billing_address_id
|
38
|
+
|
39
|
+
attr_accessor :billing_address
|
40
|
+
|
41
|
+
attr_accessor :shipping_address_id
|
42
|
+
|
43
|
+
attr_accessor :comments
|
44
|
+
|
45
|
+
attr_accessor :line_item_count
|
46
|
+
|
47
|
+
attr_accessor :status
|
48
|
+
|
49
|
+
attr_accessor :date_created
|
50
|
+
|
51
|
+
attr_accessor :date_submitted
|
52
|
+
|
53
|
+
attr_accessor :date_approved
|
54
|
+
|
55
|
+
attr_accessor :date_declined
|
56
|
+
|
57
|
+
attr_accessor :date_canceled
|
58
|
+
|
59
|
+
attr_accessor :date_completed
|
60
|
+
|
61
|
+
attr_accessor :subtotal
|
62
|
+
|
63
|
+
attr_accessor :shipping_cost
|
64
|
+
|
65
|
+
attr_accessor :tax_cost
|
66
|
+
|
67
|
+
attr_accessor :promotion_discount
|
68
|
+
|
69
|
+
attr_accessor :total
|
70
|
+
|
71
|
+
attr_accessor :is_submitted
|
72
|
+
|
73
|
+
attr_accessor :xp
|
74
|
+
|
75
|
+
|
76
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
77
|
+
def self.attribute_map
|
78
|
+
{
|
79
|
+
:'id' => :'ID',
|
80
|
+
:'from_user' => :'FromUser',
|
81
|
+
:'from_company_id' => :'FromCompanyID',
|
82
|
+
:'from_user_id' => :'FromUserID',
|
83
|
+
:'billing_address_id' => :'BillingAddressID',
|
84
|
+
:'billing_address' => :'BillingAddress',
|
85
|
+
:'shipping_address_id' => :'ShippingAddressID',
|
86
|
+
:'comments' => :'Comments',
|
87
|
+
:'line_item_count' => :'LineItemCount',
|
88
|
+
:'status' => :'Status',
|
89
|
+
:'date_created' => :'DateCreated',
|
90
|
+
:'date_submitted' => :'DateSubmitted',
|
91
|
+
:'date_approved' => :'DateApproved',
|
92
|
+
:'date_declined' => :'DateDeclined',
|
93
|
+
:'date_canceled' => :'DateCanceled',
|
94
|
+
:'date_completed' => :'DateCompleted',
|
95
|
+
:'subtotal' => :'Subtotal',
|
96
|
+
:'shipping_cost' => :'ShippingCost',
|
97
|
+
:'tax_cost' => :'TaxCost',
|
98
|
+
:'promotion_discount' => :'PromotionDiscount',
|
99
|
+
:'total' => :'Total',
|
100
|
+
:'is_submitted' => :'IsSubmitted',
|
101
|
+
:'xp' => :'xp'
|
102
|
+
}
|
103
|
+
end
|
104
|
+
|
105
|
+
# Attribute type mapping.
|
106
|
+
def self.swagger_types
|
107
|
+
{
|
108
|
+
:'id' => :'String',
|
109
|
+
:'from_user' => :'User',
|
110
|
+
:'from_company_id' => :'String',
|
111
|
+
:'from_user_id' => :'String',
|
112
|
+
:'billing_address_id' => :'String',
|
113
|
+
:'billing_address' => :'Address',
|
114
|
+
:'shipping_address_id' => :'String',
|
115
|
+
:'comments' => :'String',
|
116
|
+
:'line_item_count' => :'Integer',
|
117
|
+
:'status' => :'String',
|
118
|
+
:'date_created' => :'String',
|
119
|
+
:'date_submitted' => :'String',
|
120
|
+
:'date_approved' => :'String',
|
121
|
+
:'date_declined' => :'String',
|
122
|
+
:'date_canceled' => :'String',
|
123
|
+
:'date_completed' => :'String',
|
124
|
+
:'subtotal' => :'Float',
|
125
|
+
:'shipping_cost' => :'Float',
|
126
|
+
:'tax_cost' => :'Float',
|
127
|
+
:'promotion_discount' => :'Float',
|
128
|
+
:'total' => :'Float',
|
129
|
+
:'is_submitted' => :'BOOLEAN',
|
130
|
+
:'xp' => :'Object'
|
131
|
+
}
|
132
|
+
end
|
133
|
+
|
134
|
+
# Initializes the object
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
136
|
+
def initialize(attributes = {})
|
137
|
+
return unless attributes.is_a?(Hash)
|
138
|
+
|
139
|
+
# convert string to symbol for hash key
|
140
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
141
|
+
|
142
|
+
if attributes.has_key?(:'ID')
|
143
|
+
self.id = attributes[:'ID']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.has_key?(:'FromUser')
|
147
|
+
self.from_user = attributes[:'FromUser']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.has_key?(:'FromCompanyID')
|
151
|
+
self.from_company_id = attributes[:'FromCompanyID']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.has_key?(:'FromUserID')
|
155
|
+
self.from_user_id = attributes[:'FromUserID']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.has_key?(:'BillingAddressID')
|
159
|
+
self.billing_address_id = attributes[:'BillingAddressID']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.has_key?(:'BillingAddress')
|
163
|
+
self.billing_address = attributes[:'BillingAddress']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.has_key?(:'ShippingAddressID')
|
167
|
+
self.shipping_address_id = attributes[:'ShippingAddressID']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.has_key?(:'Comments')
|
171
|
+
self.comments = attributes[:'Comments']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.has_key?(:'LineItemCount')
|
175
|
+
self.line_item_count = attributes[:'LineItemCount']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.has_key?(:'Status')
|
179
|
+
self.status = attributes[:'Status']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.has_key?(:'DateCreated')
|
183
|
+
self.date_created = attributes[:'DateCreated']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.has_key?(:'DateSubmitted')
|
187
|
+
self.date_submitted = attributes[:'DateSubmitted']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.has_key?(:'DateApproved')
|
191
|
+
self.date_approved = attributes[:'DateApproved']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.has_key?(:'DateDeclined')
|
195
|
+
self.date_declined = attributes[:'DateDeclined']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.has_key?(:'DateCanceled')
|
199
|
+
self.date_canceled = attributes[:'DateCanceled']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.has_key?(:'DateCompleted')
|
203
|
+
self.date_completed = attributes[:'DateCompleted']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.has_key?(:'Subtotal')
|
207
|
+
self.subtotal = attributes[:'Subtotal']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.has_key?(:'ShippingCost')
|
211
|
+
self.shipping_cost = attributes[:'ShippingCost']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.has_key?(:'TaxCost')
|
215
|
+
self.tax_cost = attributes[:'TaxCost']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.has_key?(:'PromotionDiscount')
|
219
|
+
self.promotion_discount = attributes[:'PromotionDiscount']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.has_key?(:'Total')
|
223
|
+
self.total = attributes[:'Total']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.has_key?(:'IsSubmitted')
|
227
|
+
self.is_submitted = attributes[:'IsSubmitted']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.has_key?(:'xp')
|
231
|
+
self.xp = attributes[:'xp']
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
235
|
+
|
236
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
237
|
+
# @return Array for valid properies with the reasons
|
238
|
+
def list_invalid_properties
|
239
|
+
invalid_properties = Array.new
|
240
|
+
return invalid_properties
|
241
|
+
end
|
242
|
+
|
243
|
+
# Check to see if the all the properties in the model are valid
|
244
|
+
# @return true if the model is valid
|
245
|
+
def valid?
|
246
|
+
return true
|
247
|
+
end
|
248
|
+
|
249
|
+
# Checks equality by comparing each attribute.
|
250
|
+
# @param [Object] Object to be compared
|
251
|
+
def ==(o)
|
252
|
+
return true if self.equal?(o)
|
253
|
+
self.class == o.class &&
|
254
|
+
id == o.id &&
|
255
|
+
from_user == o.from_user &&
|
256
|
+
from_company_id == o.from_company_id &&
|
257
|
+
from_user_id == o.from_user_id &&
|
258
|
+
billing_address_id == o.billing_address_id &&
|
259
|
+
billing_address == o.billing_address &&
|
260
|
+
shipping_address_id == o.shipping_address_id &&
|
261
|
+
comments == o.comments &&
|
262
|
+
line_item_count == o.line_item_count &&
|
263
|
+
status == o.status &&
|
264
|
+
date_created == o.date_created &&
|
265
|
+
date_submitted == o.date_submitted &&
|
266
|
+
date_approved == o.date_approved &&
|
267
|
+
date_declined == o.date_declined &&
|
268
|
+
date_canceled == o.date_canceled &&
|
269
|
+
date_completed == o.date_completed &&
|
270
|
+
subtotal == o.subtotal &&
|
271
|
+
shipping_cost == o.shipping_cost &&
|
272
|
+
tax_cost == o.tax_cost &&
|
273
|
+
promotion_discount == o.promotion_discount &&
|
274
|
+
total == o.total &&
|
275
|
+
is_submitted == o.is_submitted &&
|
276
|
+
xp == o.xp
|
277
|
+
end
|
278
|
+
|
279
|
+
# @see the `==` method
|
280
|
+
# @param [Object] Object to be compared
|
281
|
+
def eql?(o)
|
282
|
+
self == o
|
283
|
+
end
|
284
|
+
|
285
|
+
# Calculates hash code according to all attributes.
|
286
|
+
# @return [Fixnum] Hash code
|
287
|
+
def hash
|
288
|
+
[id, from_user, from_company_id, from_user_id, billing_address_id, billing_address, shipping_address_id, comments, line_item_count, status, date_created, date_submitted, date_approved, date_declined, date_canceled, date_completed, subtotal, shipping_cost, tax_cost, promotion_discount, total, is_submitted, xp].hash
|
289
|
+
end
|
290
|
+
|
291
|
+
# Builds the object from hash
|
292
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
293
|
+
# @return [Object] Returns the model itself
|
294
|
+
def build_from_hash(attributes)
|
295
|
+
return nil unless attributes.is_a?(Hash)
|
296
|
+
self.class.swagger_types.each_pair do |key, type|
|
297
|
+
if type =~ /^Array<(.*)>/i
|
298
|
+
# check to ensure the input is an array given that the the attribute
|
299
|
+
# is documented as an array but the input is not
|
300
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
301
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
302
|
+
end
|
303
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
304
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
305
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
306
|
+
end
|
307
|
+
|
308
|
+
self
|
309
|
+
end
|
310
|
+
|
311
|
+
# Deserializes the data based on type
|
312
|
+
# @param string type Data type
|
313
|
+
# @param string value Value to be deserialized
|
314
|
+
# @return [Object] Deserialized data
|
315
|
+
def _deserialize(type, value)
|
316
|
+
case type.to_sym
|
317
|
+
when :DateTime
|
318
|
+
DateTime.parse(value)
|
319
|
+
when :Date
|
320
|
+
Date.parse(value)
|
321
|
+
when :String
|
322
|
+
value.to_s
|
323
|
+
when :Integer
|
324
|
+
value.to_i
|
325
|
+
when :Float
|
326
|
+
value.to_f
|
327
|
+
when :BOOLEAN
|
328
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
329
|
+
true
|
330
|
+
else
|
331
|
+
false
|
332
|
+
end
|
333
|
+
when :Object
|
334
|
+
# generic object (usually a Hash), return directly
|
335
|
+
value
|
336
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
337
|
+
inner_type = Regexp.last_match[:inner_type]
|
338
|
+
value.map { |v| _deserialize(inner_type, v) }
|
339
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
340
|
+
k_type = Regexp.last_match[:k_type]
|
341
|
+
v_type = Regexp.last_match[:v_type]
|
342
|
+
{}.tap do |hash|
|
343
|
+
value.each do |k, v|
|
344
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
345
|
+
end
|
346
|
+
end
|
347
|
+
else # model
|
348
|
+
temp_model = OrderCloud.const_get(type).new
|
349
|
+
temp_model.build_from_hash(value)
|
350
|
+
end
|
351
|
+
end
|
352
|
+
|
353
|
+
# Returns the string representation of the object
|
354
|
+
# @return [String] String presentation of the object
|
355
|
+
def to_s
|
356
|
+
to_hash.to_s
|
357
|
+
end
|
358
|
+
|
359
|
+
# to_body is an alias to to_hash (backward compatibility)
|
360
|
+
# @return [Hash] Returns the object in the form of hash
|
361
|
+
def to_body
|
362
|
+
to_hash
|
363
|
+
end
|
364
|
+
|
365
|
+
# Returns the object in the form of hash
|
366
|
+
# @return [Hash] Returns the object in the form of hash
|
367
|
+
def to_hash
|
368
|
+
hash = {}
|
369
|
+
self.class.attribute_map.each_pair do |attr, param|
|
370
|
+
value = self.send(attr)
|
371
|
+
next if value.nil?
|
372
|
+
hash[param] = _to_hash(value)
|
373
|
+
end
|
374
|
+
hash
|
375
|
+
end
|
376
|
+
|
377
|
+
# Outputs non-array value in the form of hash
|
378
|
+
# For object, use to_hash. Otherwise, just return the value
|
379
|
+
# @param [Object] value Any valid value
|
380
|
+
# @return [Hash] Returns the value in the form of hash
|
381
|
+
def _to_hash(value)
|
382
|
+
if value.is_a?(Array)
|
383
|
+
value.compact.map{ |v| _to_hash(v) }
|
384
|
+
elsif value.is_a?(Hash)
|
385
|
+
{}.tap do |hash|
|
386
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
387
|
+
end
|
388
|
+
elsif value.respond_to? :to_hash
|
389
|
+
value.to_hash
|
390
|
+
else
|
391
|
+
value
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
end
|
396
|
+
|
397
|
+
end
|
@@ -0,0 +1,253 @@
|
|
1
|
+
=begin
|
2
|
+
#OrderCloud
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
Contact: ordercloud@four51.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'date'
|
25
|
+
|
26
|
+
module OrderCloud
|
27
|
+
|
28
|
+
class OrderApproval
|
29
|
+
attr_accessor :approval_rule_id
|
30
|
+
|
31
|
+
attr_accessor :approving_group_id
|
32
|
+
|
33
|
+
attr_accessor :status
|
34
|
+
|
35
|
+
attr_accessor :date_created
|
36
|
+
|
37
|
+
attr_accessor :date_completed
|
38
|
+
|
39
|
+
attr_accessor :approver
|
40
|
+
|
41
|
+
attr_accessor :comments
|
42
|
+
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'approval_rule_id' => :'ApprovalRuleID',
|
48
|
+
:'approving_group_id' => :'ApprovingGroupID',
|
49
|
+
:'status' => :'Status',
|
50
|
+
:'date_created' => :'DateCreated',
|
51
|
+
:'date_completed' => :'DateCompleted',
|
52
|
+
:'approver' => :'Approver',
|
53
|
+
:'comments' => :'Comments'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.swagger_types
|
59
|
+
{
|
60
|
+
:'approval_rule_id' => :'String',
|
61
|
+
:'approving_group_id' => :'String',
|
62
|
+
:'status' => :'String',
|
63
|
+
:'date_created' => :'String',
|
64
|
+
:'date_completed' => :'String',
|
65
|
+
:'approver' => :'User',
|
66
|
+
:'comments' => :'String'
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
# Initializes the object
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
72
|
+
def initialize(attributes = {})
|
73
|
+
return unless attributes.is_a?(Hash)
|
74
|
+
|
75
|
+
# convert string to symbol for hash key
|
76
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
77
|
+
|
78
|
+
if attributes.has_key?(:'ApprovalRuleID')
|
79
|
+
self.approval_rule_id = attributes[:'ApprovalRuleID']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.has_key?(:'ApprovingGroupID')
|
83
|
+
self.approving_group_id = attributes[:'ApprovingGroupID']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.has_key?(:'Status')
|
87
|
+
self.status = attributes[:'Status']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.has_key?(:'DateCreated')
|
91
|
+
self.date_created = attributes[:'DateCreated']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.has_key?(:'DateCompleted')
|
95
|
+
self.date_completed = attributes[:'DateCompleted']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'Approver')
|
99
|
+
self.approver = attributes[:'Approver']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.has_key?(:'Comments')
|
103
|
+
self.comments = attributes[:'Comments']
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
107
|
+
|
108
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
109
|
+
# @return Array for valid properies with the reasons
|
110
|
+
def list_invalid_properties
|
111
|
+
invalid_properties = Array.new
|
112
|
+
return invalid_properties
|
113
|
+
end
|
114
|
+
|
115
|
+
# Check to see if the all the properties in the model are valid
|
116
|
+
# @return true if the model is valid
|
117
|
+
def valid?
|
118
|
+
return true
|
119
|
+
end
|
120
|
+
|
121
|
+
# Checks equality by comparing each attribute.
|
122
|
+
# @param [Object] Object to be compared
|
123
|
+
def ==(o)
|
124
|
+
return true if self.equal?(o)
|
125
|
+
self.class == o.class &&
|
126
|
+
approval_rule_id == o.approval_rule_id &&
|
127
|
+
approving_group_id == o.approving_group_id &&
|
128
|
+
status == o.status &&
|
129
|
+
date_created == o.date_created &&
|
130
|
+
date_completed == o.date_completed &&
|
131
|
+
approver == o.approver &&
|
132
|
+
comments == o.comments
|
133
|
+
end
|
134
|
+
|
135
|
+
# @see the `==` method
|
136
|
+
# @param [Object] Object to be compared
|
137
|
+
def eql?(o)
|
138
|
+
self == o
|
139
|
+
end
|
140
|
+
|
141
|
+
# Calculates hash code according to all attributes.
|
142
|
+
# @return [Fixnum] Hash code
|
143
|
+
def hash
|
144
|
+
[approval_rule_id, approving_group_id, status, date_created, date_completed, approver, comments].hash
|
145
|
+
end
|
146
|
+
|
147
|
+
# Builds the object from hash
|
148
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
149
|
+
# @return [Object] Returns the model itself
|
150
|
+
def build_from_hash(attributes)
|
151
|
+
return nil unless attributes.is_a?(Hash)
|
152
|
+
self.class.swagger_types.each_pair do |key, type|
|
153
|
+
if type =~ /^Array<(.*)>/i
|
154
|
+
# check to ensure the input is an array given that the the attribute
|
155
|
+
# is documented as an array but the input is not
|
156
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
157
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
158
|
+
end
|
159
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
160
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
161
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
162
|
+
end
|
163
|
+
|
164
|
+
self
|
165
|
+
end
|
166
|
+
|
167
|
+
# Deserializes the data based on type
|
168
|
+
# @param string type Data type
|
169
|
+
# @param string value Value to be deserialized
|
170
|
+
# @return [Object] Deserialized data
|
171
|
+
def _deserialize(type, value)
|
172
|
+
case type.to_sym
|
173
|
+
when :DateTime
|
174
|
+
DateTime.parse(value)
|
175
|
+
when :Date
|
176
|
+
Date.parse(value)
|
177
|
+
when :String
|
178
|
+
value.to_s
|
179
|
+
when :Integer
|
180
|
+
value.to_i
|
181
|
+
when :Float
|
182
|
+
value.to_f
|
183
|
+
when :BOOLEAN
|
184
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
185
|
+
true
|
186
|
+
else
|
187
|
+
false
|
188
|
+
end
|
189
|
+
when :Object
|
190
|
+
# generic object (usually a Hash), return directly
|
191
|
+
value
|
192
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
193
|
+
inner_type = Regexp.last_match[:inner_type]
|
194
|
+
value.map { |v| _deserialize(inner_type, v) }
|
195
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
196
|
+
k_type = Regexp.last_match[:k_type]
|
197
|
+
v_type = Regexp.last_match[:v_type]
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each do |k, v|
|
200
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
else # model
|
204
|
+
temp_model = OrderCloud.const_get(type).new
|
205
|
+
temp_model.build_from_hash(value)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
# Returns the string representation of the object
|
210
|
+
# @return [String] String presentation of the object
|
211
|
+
def to_s
|
212
|
+
to_hash.to_s
|
213
|
+
end
|
214
|
+
|
215
|
+
# to_body is an alias to to_hash (backward compatibility)
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
217
|
+
def to_body
|
218
|
+
to_hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Returns the object in the form of hash
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
223
|
+
def to_hash
|
224
|
+
hash = {}
|
225
|
+
self.class.attribute_map.each_pair do |attr, param|
|
226
|
+
value = self.send(attr)
|
227
|
+
next if value.nil?
|
228
|
+
hash[param] = _to_hash(value)
|
229
|
+
end
|
230
|
+
hash
|
231
|
+
end
|
232
|
+
|
233
|
+
# Outputs non-array value in the form of hash
|
234
|
+
# For object, use to_hash. Otherwise, just return the value
|
235
|
+
# @param [Object] value Any valid value
|
236
|
+
# @return [Hash] Returns the value in the form of hash
|
237
|
+
def _to_hash(value)
|
238
|
+
if value.is_a?(Array)
|
239
|
+
value.compact.map{ |v| _to_hash(v) }
|
240
|
+
elsif value.is_a?(Hash)
|
241
|
+
{}.tap do |hash|
|
242
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
243
|
+
end
|
244
|
+
elsif value.respond_to? :to_hash
|
245
|
+
value.to_hash
|
246
|
+
else
|
247
|
+
value
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
end
|
252
|
+
|
253
|
+
end
|