zsgf_client 1.0.18
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/Gemfile +9 -0
- data/README.md +430 -0
- data/Rakefile +10 -0
- data/docs/AccessTokenApi.md +307 -0
- data/docs/AccessTokenListResult.md +20 -0
- data/docs/AccessTokenListResultApiResponse.md +22 -0
- data/docs/AccessTokenPostRequest.md +28 -0
- data/docs/AccessTokenPutRequest.md +26 -0
- data/docs/AlipayApi.md +453 -0
- data/docs/AlipayCreateOrderPagePayRequest.md +24 -0
- data/docs/AlipayCreateOrderRequest.md +24 -0
- data/docs/AlipayCreateOrderWapPayRequest.md +24 -0
- data/docs/AlipayTradeQueryResponse.md +154 -0
- data/docs/AlipayTradeQueryResponseApiResponse.md +22 -0
- data/docs/AlipayTradeRefundResponse.md +76 -0
- data/docs/AlipayTradeRefundResponseApiResponse.md +22 -0
- data/docs/App.md +50 -0
- data/docs/AppApi.md +735 -0
- data/docs/AppApiResponse.md +22 -0
- data/docs/AppCheckVersionResult.md +20 -0
- data/docs/AppCheckVersionResultApiResponse.md +22 -0
- data/docs/AppInfoItem.md +32 -0
- data/docs/AppInfoResult.md +20 -0
- data/docs/AppInfoResultApiResponse.md +22 -0
- data/docs/AppListResult.md +20 -0
- data/docs/AppListResultApiResponse.md +22 -0
- data/docs/AppPostResult.md +20 -0
- data/docs/AppPostResultApiResponse.md +22 -0
- data/docs/AppProperty.md +22 -0
- data/docs/AppSetting.md +36 -0
- data/docs/AppSettingApi.md +1495 -0
- data/docs/AppSettingApiResponse.md +22 -0
- data/docs/AppSettingGroupPostResult.md +18 -0
- data/docs/AppSettingGroupPostResultApiResponse.md +22 -0
- data/docs/AppSettingItemPostResult.md +18 -0
- data/docs/AppSettingItemPostResultApiResponse.md +22 -0
- data/docs/AppSettingListApiResponse.md +22 -0
- data/docs/AppSettingProviderPostResult.md +18 -0
- data/docs/AppSettingProviderPostResultApiResponse.md +22 -0
- data/docs/AppSettingSettingPostResult.md +18 -0
- data/docs/AppSettingSettingPostResultApiResponse.md +22 -0
- data/docs/AppUserConsentModel.md +30 -0
- data/docs/AppUserConsentModelListApiResponse.md +22 -0
- data/docs/AppUserListResponse.md +40 -0
- data/docs/AppUserResetPwdRequest.md +24 -0
- data/docs/AuthorizePolicy.md +28 -0
- data/docs/AuthorizePolicyApi.md +377 -0
- data/docs/AuthorizePolicyApiResponse.md +22 -0
- data/docs/AuthorizePolicyListApiResponse.md +22 -0
- data/docs/AuthorizeResult.md +26 -0
- data/docs/AuthorizeResultApiResponse.md +22 -0
- data/docs/BkAgentRespInfo.md +26 -0
- data/docs/BooleanApiResponse.md +22 -0
- data/docs/ChargeInfo.md +30 -0
- data/docs/CommonFriendModel.md +22 -0
- data/docs/ContributeDetail.md +20 -0
- data/docs/CreateOrderRequest.md +24 -0
- data/docs/CreateOrderResult.md +20 -0
- data/docs/CreateOrderResultApiResponse.md +22 -0
- data/docs/CreatePostResult.md +18 -0
- data/docs/CreatePostResultApiResponse.md +22 -0
- data/docs/Currency.md +48 -0
- data/docs/CurrencyApi.md +677 -0
- data/docs/CurrencyApiResponse.md +22 -0
- data/docs/CurrencyConsumeRequest.md +26 -0
- data/docs/CurrencyExchangeRate.md +30 -0
- data/docs/CurrencyExchangeRateApiResponse.md +22 -0
- data/docs/CurrencyListApiResponse.md +22 -0
- data/docs/CurrencyTransaction.md +40 -0
- data/docs/CurrencyTransactionListApiResponse.md +22 -0
- data/docs/DingTalkApi.md +81 -0
- data/docs/DirectoryItem.md +24 -0
- data/docs/EmailSignInRequest.md +22 -0
- data/docs/EmailSignUpRequest.md +32 -0
- data/docs/EnterprisePayInfo.md +22 -0
- data/docs/ExchangeCurrencyRequest.md +28 -0
- data/docs/ExchangeRatePutRequest.md +22 -0
- data/docs/ExecuteFunctionRequest.md +18 -0
- data/docs/FileApi.md +385 -0
- data/docs/FileItem.md +24 -0
- data/docs/FileListResult.md +26 -0
- data/docs/FileListResultApiResponse.md +22 -0
- data/docs/FollowerModel.md +40 -0
- data/docs/FollowerPutModel.md +28 -0
- data/docs/FulfillmentDetail.md +22 -0
- data/docs/GeoLocationModel.md +58 -0
- data/docs/GeoLocationModelApiResponse.md +22 -0
- data/docs/GeoLocationResponseModel.md +60 -0
- data/docs/GoodsDetail.md +38 -0
- data/docs/GrantRequest.md +32 -0
- data/docs/GrantResult.md +24 -0
- data/docs/GrantResultApiResponse.md +22 -0
- data/docs/HbFqPayInfo.md +20 -0
- data/docs/Int64ApiResponse.md +22 -0
- data/docs/IntactChargeInfo.md +40 -0
- data/docs/ListResponseItem.md +36 -0
- data/docs/ListResponseItemListApiResponse.md +22 -0
- data/docs/OAuthAccountBindRequest.md +26 -0
- data/docs/OAuthAccountPutBindRequest.md +22 -0
- data/docs/OAuthAccountSignInRequest.md +22 -0
- data/docs/OAuthApi.md +361 -0
- data/docs/ObjectApiResponse.md +22 -0
- data/docs/ObjectListApiResponse.md +22 -0
- data/docs/Order.md +54 -0
- data/docs/OrderApi.md +243 -0
- data/docs/OrderApiResponse.md +22 -0
- data/docs/OrderListResult.md +20 -0
- data/docs/OrderListResultApiResponse.md +22 -0
- data/docs/PaymentInfoWithId.md +20 -0
- data/docs/PhoneSignInRequest.md +22 -0
- data/docs/PhoneSignUpRequest.md +32 -0
- data/docs/PostIndexRequest.md +20 -0
- data/docs/PostResult.md +18 -0
- data/docs/PostResultApiResponse.md +22 -0
- data/docs/PresetPayToolInfo.md +20 -0
- data/docs/ProfileResult.md +44 -0
- data/docs/ProfileResultApiResponse.md +22 -0
- data/docs/Project.md +34 -0
- data/docs/ProjectApi.md +367 -0
- data/docs/ProjectApiResponse.md +22 -0
- data/docs/ProjectListResult.md +20 -0
- data/docs/ProjectListResultApiResponse.md +22 -0
- data/docs/QRCodePreSignInRequest.md +22 -0
- data/docs/QRCodeScanRequest.md +18 -0
- data/docs/QRCodeSignInRequest.md +18 -0
- data/docs/QRCodeSignUpRequest.md +34 -0
- data/docs/RechargePointRequest.md +26 -0
- data/docs/RecommendFriend.md +36 -0
- data/docs/RefundChargeInfo.md +24 -0
- data/docs/RefundSubFee.md +20 -0
- data/docs/ReturnPageNotifyRequest.md +40 -0
- data/docs/SendEmailCodeRequest.md +20 -0
- data/docs/SendSMSCodeRequest.md +20 -0
- data/docs/ServiceGroup.md +36 -0
- data/docs/ServiceGroupApiResponse.md +22 -0
- data/docs/ServiceGroupListApiResponse.md +22 -0
- data/docs/ServiceItem.md +48 -0
- data/docs/ServiceItemApiResponse.md +22 -0
- data/docs/ServiceItemListApiResponse.md +22 -0
- data/docs/ServiceProvider.md +38 -0
- data/docs/ServiceProviderApiResponse.md +22 -0
- data/docs/ServiceProviderListApiResponse.md +22 -0
- data/docs/ServiceSettingApi.md +1459 -0
- data/docs/ServiceSettingGroupPostResult.md +18 -0
- data/docs/ServiceSettingGroupPostResultApiResponse.md +22 -0
- data/docs/ServiceSettingItemPostResult.md +18 -0
- data/docs/ServiceSettingItemPostResultApiResponse.md +22 -0
- data/docs/ServiceSettingProviderPostResult.md +18 -0
- data/docs/ServiceSettingProviderPostResultApiResponse.md +22 -0
- data/docs/ServiceSettingSettingPostResult.md +18 -0
- data/docs/ServiceSettingSettingPostResultApiResponse.md +22 -0
- data/docs/Settings.md +40 -0
- data/docs/SettingsApiResponse.md +22 -0
- data/docs/SettingsListApiResponse.md +22 -0
- data/docs/SetupCode.md +22 -0
- data/docs/SetupCodeApiResponse.md +22 -0
- data/docs/SignInRequest.md +22 -0
- data/docs/SignUpRequest.md +34 -0
- data/docs/StorageApi.md +1229 -0
- data/docs/StorageListResult.md +26 -0
- data/docs/StorageListResultApiResponse.md +22 -0
- data/docs/StringApiResponse.md +22 -0
- data/docs/StringListApiResponse.md +22 -0
- data/docs/SubFee.md +22 -0
- data/docs/SystemDirectoryItem.md +24 -0
- data/docs/SystemFileApi.md +371 -0
- data/docs/SystemFileItem.md +24 -0
- data/docs/SystemFileListResult.md +22 -0
- data/docs/SystemFileListResultApiResponse.md +22 -0
- data/docs/TapPayInfo.md +18 -0
- data/docs/Team.md +36 -0
- data/docs/TeamApi.md +297 -0
- data/docs/TokenModel.md +22 -0
- data/docs/TokenModelApiResponse.md +22 -0
- data/docs/TradeFundBill.md +26 -0
- data/docs/TradeSettleDetail.md +32 -0
- data/docs/TradeSettleInfo.md +20 -0
- data/docs/UnionIDSignInRequest.md +22 -0
- data/docs/UnionIDSignUpRequest.md +38 -0
- data/docs/UpdateProfileRequest.md +50 -0
- data/docs/User.md +90 -0
- data/docs/UserAccessToken.md +38 -0
- data/docs/UserApi.md +3303 -0
- data/docs/UserApiResponse.md +22 -0
- data/docs/UserCommonInterestsResult.md +20 -0
- data/docs/UserCommonInterestsResultApiResponse.md +22 -0
- data/docs/UserCurrency.md +24 -0
- data/docs/UserCurrencyApi.md +403 -0
- data/docs/UserCurrencyCurrencyTransResult.md +20 -0
- data/docs/UserCurrencyCurrencyTransResultApiResponse.md +22 -0
- data/docs/UserCurrencyListApiResponse.md +22 -0
- data/docs/UserFollowersResult.md +20 -0
- data/docs/UserFollowersResultApiResponse.md +22 -0
- data/docs/UserFollowingResult.md +20 -0
- data/docs/UserFollowingResultApiResponse.md +22 -0
- data/docs/UserFriendsNearByResult.md +20 -0
- data/docs/UserFriendsNearByResultApiResponse.md +22 -0
- data/docs/UserListResult.md +20 -0
- data/docs/UserListResultApiResponse.md +22 -0
- data/docs/UserLocationPostResult.md +18 -0
- data/docs/UserLocationPostResultApiResponse.md +22 -0
- data/docs/UserLocationsResult.md +20 -0
- data/docs/UserLocationsResultApiResponse.md +22 -0
- data/docs/UserLogins.md +36 -0
- data/docs/UserLoginsListApiResponse.md +22 -0
- data/docs/UserMutualFollowersResult.md +20 -0
- data/docs/UserMutualFollowersResultApiResponse.md +22 -0
- data/docs/UserMutualFollowingsResult.md +20 -0
- data/docs/UserMutualFollowingsResultApiResponse.md +22 -0
- data/docs/UserProfileResult.md +48 -0
- data/docs/UserProfileResultApiResponse.md +22 -0
- data/docs/UserQRCodeScanResult.md +34 -0
- data/docs/UserQRCodeScanResultApiResponse.md +22 -0
- data/docs/UserSetting.md +38 -0
- data/docs/UserSettingApi.md +379 -0
- data/docs/UserSettingApiResponse.md +22 -0
- data/docs/UserSettingListApiResponse.md +22 -0
- data/docs/UserSettingPostResult.md +18 -0
- data/docs/UserSettingPostResultApiResponse.md +22 -0
- data/docs/VoucherDetail.md +40 -0
- data/docs/WechatApi.md +751 -0
- data/docs/WechatJSConfigResult.md +26 -0
- data/docs/WechatJSConfigResultApiResponse.md +22 -0
- data/lib/zsgf_client/api/access_token_api.rb +309 -0
- data/lib/zsgf_client/api/alipay_api.rb +437 -0
- data/lib/zsgf_client/api/app_api.rb +675 -0
- data/lib/zsgf_client/api/app_setting_api.rb +1446 -0
- data/lib/zsgf_client/api/authorize_policy_api.rb +375 -0
- data/lib/zsgf_client/api/currency_api.rb +667 -0
- data/lib/zsgf_client/api/ding_talk_api.rb +88 -0
- data/lib/zsgf_client/api/file_api.rb +369 -0
- data/lib/zsgf_client/api/o_auth_api.rb +349 -0
- data/lib/zsgf_client/api/order_api.rb +251 -0
- data/lib/zsgf_client/api/project_api.rb +345 -0
- data/lib/zsgf_client/api/service_setting_api.rb +1340 -0
- data/lib/zsgf_client/api/storage_api.rb +1311 -0
- data/lib/zsgf_client/api/system_file_api.rb +333 -0
- data/lib/zsgf_client/api/team_api.rb +282 -0
- data/lib/zsgf_client/api/user_api.rb +3164 -0
- data/lib/zsgf_client/api/user_currency_api.rb +445 -0
- data/lib/zsgf_client/api/user_setting_api.rb +378 -0
- data/lib/zsgf_client/api/wechat_api.rb +712 -0
- data/lib/zsgf_client/api_client.rb +393 -0
- data/lib/zsgf_client/api_error.rb +58 -0
- data/lib/zsgf_client/configuration.rb +312 -0
- data/lib/zsgf_client/models/access_token_list_result.rb +232 -0
- data/lib/zsgf_client/models/access_token_list_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/access_token_post_request.rb +322 -0
- data/lib/zsgf_client/models/access_token_put_request.rb +299 -0
- data/lib/zsgf_client/models/alipay_create_order_page_pay_request.rb +330 -0
- data/lib/zsgf_client/models/alipay_create_order_request.rb +330 -0
- data/lib/zsgf_client/models/alipay_create_order_wap_pay_request.rb +330 -0
- data/lib/zsgf_client/models/alipay_trade_query_response.rb +909 -0
- data/lib/zsgf_client/models/alipay_trade_query_response_api_response.rb +245 -0
- data/lib/zsgf_client/models/alipay_trade_refund_response.rb +515 -0
- data/lib/zsgf_client/models/alipay_trade_refund_response_api_response.rb +245 -0
- data/lib/zsgf_client/models/app.rb +583 -0
- data/lib/zsgf_client/models/app_api_response.rb +245 -0
- data/lib/zsgf_client/models/app_check_version_result.rb +235 -0
- data/lib/zsgf_client/models/app_check_version_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/app_info_item.rb +289 -0
- data/lib/zsgf_client/models/app_info_result.rb +232 -0
- data/lib/zsgf_client/models/app_info_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/app_list_result.rb +232 -0
- data/lib/zsgf_client/models/app_list_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/app_post_result.rb +230 -0
- data/lib/zsgf_client/models/app_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/app_property.rb +241 -0
- data/lib/zsgf_client/models/app_setting.rb +437 -0
- data/lib/zsgf_client/models/app_setting_api_response.rb +245 -0
- data/lib/zsgf_client/models/app_setting_group_post_result.rb +220 -0
- data/lib/zsgf_client/models/app_setting_group_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/app_setting_item_post_result.rb +220 -0
- data/lib/zsgf_client/models/app_setting_item_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/app_setting_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/app_setting_provider_post_result.rb +220 -0
- data/lib/zsgf_client/models/app_setting_provider_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/app_setting_setting_post_result.rb +220 -0
- data/lib/zsgf_client/models/app_setting_setting_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/app_user_consent_model.rb +278 -0
- data/lib/zsgf_client/models/app_user_consent_model_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/app_user_list_response.rb +327 -0
- data/lib/zsgf_client/models/app_user_reset_pwd_request.rb +323 -0
- data/lib/zsgf_client/models/authorize_policy.rb +290 -0
- data/lib/zsgf_client/models/authorize_policy_api_response.rb +245 -0
- data/lib/zsgf_client/models/authorize_policy_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/authorize_result.rb +259 -0
- data/lib/zsgf_client/models/authorize_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/bk_agent_resp_info.rb +261 -0
- data/lib/zsgf_client/models/boolean_api_response.rb +246 -0
- data/lib/zsgf_client/models/charge_info.rb +283 -0
- data/lib/zsgf_client/models/common_friend_model.rb +240 -0
- data/lib/zsgf_client/models/contribute_detail.rb +231 -0
- data/lib/zsgf_client/models/create_order_request.rb +351 -0
- data/lib/zsgf_client/models/create_order_result.rb +230 -0
- data/lib/zsgf_client/models/create_order_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/create_post_result.rb +220 -0
- data/lib/zsgf_client/models/create_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/currency.rb +484 -0
- data/lib/zsgf_client/models/currency_api_response.rb +245 -0
- data/lib/zsgf_client/models/currency_consume_request.rb +307 -0
- data/lib/zsgf_client/models/currency_exchange_rate.rb +330 -0
- data/lib/zsgf_client/models/currency_exchange_rate_api_response.rb +245 -0
- data/lib/zsgf_client/models/currency_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/currency_transaction.rb +413 -0
- data/lib/zsgf_client/models/currency_transaction_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/directory_item.rb +249 -0
- data/lib/zsgf_client/models/email_sign_in_request.rb +303 -0
- data/lib/zsgf_client/models/email_sign_up_request.rb +452 -0
- data/lib/zsgf_client/models/enterprise_pay_info.rb +240 -0
- data/lib/zsgf_client/models/exchange_currency_request.rb +343 -0
- data/lib/zsgf_client/models/exchange_rate_put_request.rb +240 -0
- data/lib/zsgf_client/models/execute_function_request.rb +222 -0
- data/lib/zsgf_client/models/file_item.rb +249 -0
- data/lib/zsgf_client/models/file_list_result.rb +262 -0
- data/lib/zsgf_client/models/file_list_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/follower_model.rb +325 -0
- data/lib/zsgf_client/models/follower_put_model.rb +269 -0
- data/lib/zsgf_client/models/fulfillment_detail.rb +241 -0
- data/lib/zsgf_client/models/geo_location_model.rb +436 -0
- data/lib/zsgf_client/models/geo_location_model_api_response.rb +245 -0
- data/lib/zsgf_client/models/geo_location_response_model.rb +446 -0
- data/lib/zsgf_client/models/goods_detail.rb +320 -0
- data/lib/zsgf_client/models/grant_request.rb +387 -0
- data/lib/zsgf_client/models/grant_result.rb +249 -0
- data/lib/zsgf_client/models/grant_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/hb_fq_pay_info.rb +231 -0
- data/lib/zsgf_client/models/int64_api_response.rb +246 -0
- data/lib/zsgf_client/models/intact_charge_info.rb +330 -0
- data/lib/zsgf_client/models/list_response_item.rb +308 -0
- data/lib/zsgf_client/models/list_response_item_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/o_auth_account_bind_request.rb +336 -0
- data/lib/zsgf_client/models/o_auth_account_put_bind_request.rb +243 -0
- data/lib/zsgf_client/models/o_auth_account_sign_in_request.rb +292 -0
- data/lib/zsgf_client/models/object_api_response.rb +247 -0
- data/lib/zsgf_client/models/object_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/order.rb +547 -0
- data/lib/zsgf_client/models/order_api_response.rb +245 -0
- data/lib/zsgf_client/models/order_list_result.rb +232 -0
- data/lib/zsgf_client/models/order_list_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/payment_info_with_id.rb +233 -0
- data/lib/zsgf_client/models/phone_sign_in_request.rb +292 -0
- data/lib/zsgf_client/models/phone_sign_up_request.rb +471 -0
- data/lib/zsgf_client/models/post_index_request.rb +251 -0
- data/lib/zsgf_client/models/post_result.rb +220 -0
- data/lib/zsgf_client/models/post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/preset_pay_tool_info.rb +233 -0
- data/lib/zsgf_client/models/profile_result.rb +346 -0
- data/lib/zsgf_client/models/profile_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/project.rb +353 -0
- data/lib/zsgf_client/models/project_api_response.rb +245 -0
- data/lib/zsgf_client/models/project_list_result.rb +232 -0
- data/lib/zsgf_client/models/project_list_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/qr_code_pre_sign_in_request.rb +241 -0
- data/lib/zsgf_client/models/qr_code_scan_request.rb +237 -0
- data/lib/zsgf_client/models/qr_code_sign_in_request.rb +237 -0
- data/lib/zsgf_client/models/qr_code_sign_up_request.rb +454 -0
- data/lib/zsgf_client/models/recharge_point_request.rb +307 -0
- data/lib/zsgf_client/models/recommend_friend.rb +306 -0
- data/lib/zsgf_client/models/refund_charge_info.rb +253 -0
- data/lib/zsgf_client/models/refund_sub_fee.rb +231 -0
- data/lib/zsgf_client/models/return_page_notify_request.rb +344 -0
- data/lib/zsgf_client/models/send_email_code_request.rb +282 -0
- data/lib/zsgf_client/models/send_sms_code_request.rb +283 -0
- data/lib/zsgf_client/models/service_group.rb +361 -0
- data/lib/zsgf_client/models/service_group_api_response.rb +245 -0
- data/lib/zsgf_client/models/service_group_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/service_item.rb +502 -0
- data/lib/zsgf_client/models/service_item_api_response.rb +245 -0
- data/lib/zsgf_client/models/service_item_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/service_provider.rb +403 -0
- data/lib/zsgf_client/models/service_provider_api_response.rb +245 -0
- data/lib/zsgf_client/models/service_provider_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/service_setting_group_post_result.rb +220 -0
- data/lib/zsgf_client/models/service_setting_group_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/service_setting_item_post_result.rb +220 -0
- data/lib/zsgf_client/models/service_setting_item_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/service_setting_provider_post_result.rb +220 -0
- data/lib/zsgf_client/models/service_setting_provider_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/service_setting_setting_post_result.rb +220 -0
- data/lib/zsgf_client/models/service_setting_setting_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/settings.rb +445 -0
- data/lib/zsgf_client/models/settings_api_response.rb +245 -0
- data/lib/zsgf_client/models/settings_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/setup_code.rb +241 -0
- data/lib/zsgf_client/models/setup_code_api_response.rb +245 -0
- data/lib/zsgf_client/models/sign_in_request.rb +292 -0
- data/lib/zsgf_client/models/sign_up_request.rb +482 -0
- data/lib/zsgf_client/models/storage_list_result.rb +258 -0
- data/lib/zsgf_client/models/storage_list_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/string_api_response.rb +247 -0
- data/lib/zsgf_client/models/string_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/sub_fee.rb +241 -0
- data/lib/zsgf_client/models/system_directory_item.rb +249 -0
- data/lib/zsgf_client/models/system_file_item.rb +249 -0
- data/lib/zsgf_client/models/system_file_list_result.rb +244 -0
- data/lib/zsgf_client/models/system_file_list_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/tap_pay_info.rb +221 -0
- data/lib/zsgf_client/models/team.rb +376 -0
- data/lib/zsgf_client/models/token_model.rb +240 -0
- data/lib/zsgf_client/models/token_model_api_response.rb +245 -0
- data/lib/zsgf_client/models/trade_fund_bill.rb +261 -0
- data/lib/zsgf_client/models/trade_settle_detail.rb +291 -0
- data/lib/zsgf_client/models/trade_settle_info.rb +233 -0
- data/lib/zsgf_client/models/union_id_sign_in_request.rb +292 -0
- data/lib/zsgf_client/models/union_id_sign_up_request.rb +549 -0
- data/lib/zsgf_client/models/update_profile_request.rb +608 -0
- data/lib/zsgf_client/models/user.rb +906 -0
- data/lib/zsgf_client/models/user_access_token.rb +357 -0
- data/lib/zsgf_client/models/user_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_common_interests_result.rb +232 -0
- data/lib/zsgf_client/models/user_common_interests_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_currency.rb +268 -0
- data/lib/zsgf_client/models/user_currency_currency_trans_result.rb +232 -0
- data/lib/zsgf_client/models/user_currency_currency_trans_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_currency_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/user_followers_result.rb +232 -0
- data/lib/zsgf_client/models/user_followers_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_following_result.rb +232 -0
- data/lib/zsgf_client/models/user_following_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_friends_near_by_result.rb +232 -0
- data/lib/zsgf_client/models/user_friends_near_by_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_list_result.rb +232 -0
- data/lib/zsgf_client/models/user_list_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_location_post_result.rb +220 -0
- data/lib/zsgf_client/models/user_location_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_locations_result.rb +232 -0
- data/lib/zsgf_client/models/user_locations_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_logins.rb +377 -0
- data/lib/zsgf_client/models/user_logins_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/user_mutual_followers_result.rb +232 -0
- data/lib/zsgf_client/models/user_mutual_followers_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_mutual_followings_result.rb +232 -0
- data/lib/zsgf_client/models/user_mutual_followings_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_profile_result.rb +368 -0
- data/lib/zsgf_client/models/user_profile_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_qr_code_scan_result.rb +300 -0
- data/lib/zsgf_client/models/user_qr_code_scan_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_setting.rb +464 -0
- data/lib/zsgf_client/models/user_setting_api_response.rb +245 -0
- data/lib/zsgf_client/models/user_setting_list_api_response.rb +249 -0
- data/lib/zsgf_client/models/user_setting_post_result.rb +220 -0
- data/lib/zsgf_client/models/user_setting_post_result_api_response.rb +245 -0
- data/lib/zsgf_client/models/voucher_detail.rb +333 -0
- data/lib/zsgf_client/models/wechat_js_config_result.rb +263 -0
- data/lib/zsgf_client/models/wechat_js_config_result_api_response.rb +245 -0
- data/lib/zsgf_client/version.rb +15 -0
- data/lib/zsgf_client.rb +259 -0
- data/spec/api/access_token_api_spec.rb +90 -0
- data/spec/api/alipay_api_spec.rb +114 -0
- data/spec/api/app_api_spec.rb +162 -0
- data/spec/api/app_setting_api_spec.rb +307 -0
- data/spec/api/authorize_policy_api_spec.rb +102 -0
- data/spec/api/currency_api_spec.rb +159 -0
- data/spec/api/ding_talk_api_spec.rb +48 -0
- data/spec/api/file_api_spec.rb +104 -0
- data/spec/api/o_auth_api_spec.rb +95 -0
- data/spec/api/order_api_spec.rb +82 -0
- data/spec/api/project_api_spec.rb +97 -0
- data/spec/api/service_setting_api_spec.rb +289 -0
- data/spec/api/storage_api_spec.rb +268 -0
- data/spec/api/system_file_api_spec.rb +97 -0
- data/spec/api/team_api_spec.rb +85 -0
- data/spec/api/user_api_spec.rb +639 -0
- data/spec/api/user_currency_api_spec.rb +114 -0
- data/spec/api/user_setting_api_spec.rb +103 -0
- data/spec/api/wechat_api_spec.rb +167 -0
- data/spec/models/access_token_list_result_api_response_spec.rb +48 -0
- data/spec/models/access_token_list_result_spec.rb +42 -0
- data/spec/models/access_token_post_request_spec.rb +66 -0
- data/spec/models/access_token_put_request_spec.rb +60 -0
- data/spec/models/alipay_create_order_page_pay_request_spec.rb +54 -0
- data/spec/models/alipay_create_order_request_spec.rb +54 -0
- data/spec/models/alipay_create_order_wap_pay_request_spec.rb +54 -0
- data/spec/models/alipay_trade_query_response_api_response_spec.rb +48 -0
- data/spec/models/alipay_trade_query_response_spec.rb +444 -0
- data/spec/models/alipay_trade_refund_response_api_response_spec.rb +48 -0
- data/spec/models/alipay_trade_refund_response_spec.rb +210 -0
- data/spec/models/app_api_response_spec.rb +48 -0
- data/spec/models/app_check_version_result_api_response_spec.rb +48 -0
- data/spec/models/app_check_version_result_spec.rb +42 -0
- data/spec/models/app_info_item_spec.rb +78 -0
- data/spec/models/app_info_result_api_response_spec.rb +48 -0
- data/spec/models/app_info_result_spec.rb +42 -0
- data/spec/models/app_list_result_api_response_spec.rb +48 -0
- data/spec/models/app_list_result_spec.rb +42 -0
- data/spec/models/app_post_result_api_response_spec.rb +48 -0
- data/spec/models/app_post_result_spec.rb +42 -0
- data/spec/models/app_property_spec.rb +48 -0
- data/spec/models/app_setting_api_response_spec.rb +48 -0
- data/spec/models/app_setting_group_post_result_api_response_spec.rb +48 -0
- data/spec/models/app_setting_group_post_result_spec.rb +36 -0
- data/spec/models/app_setting_item_post_result_api_response_spec.rb +48 -0
- data/spec/models/app_setting_item_post_result_spec.rb +36 -0
- data/spec/models/app_setting_list_api_response_spec.rb +48 -0
- data/spec/models/app_setting_provider_post_result_api_response_spec.rb +48 -0
- data/spec/models/app_setting_provider_post_result_spec.rb +36 -0
- data/spec/models/app_setting_setting_post_result_api_response_spec.rb +48 -0
- data/spec/models/app_setting_setting_post_result_spec.rb +36 -0
- data/spec/models/app_setting_spec.rb +90 -0
- data/spec/models/app_spec.rb +132 -0
- data/spec/models/app_user_consent_model_list_api_response_spec.rb +48 -0
- data/spec/models/app_user_consent_model_spec.rb +72 -0
- data/spec/models/app_user_list_response_spec.rb +102 -0
- data/spec/models/app_user_reset_pwd_request_spec.rb +54 -0
- data/spec/models/authorize_policy_api_response_spec.rb +48 -0
- data/spec/models/authorize_policy_list_api_response_spec.rb +48 -0
- data/spec/models/authorize_policy_spec.rb +66 -0
- data/spec/models/authorize_result_api_response_spec.rb +48 -0
- data/spec/models/authorize_result_spec.rb +60 -0
- data/spec/models/bk_agent_resp_info_spec.rb +60 -0
- data/spec/models/boolean_api_response_spec.rb +48 -0
- data/spec/models/charge_info_spec.rb +72 -0
- data/spec/models/common_friend_model_spec.rb +48 -0
- data/spec/models/contribute_detail_spec.rb +42 -0
- data/spec/models/create_order_request_spec.rb +54 -0
- data/spec/models/create_order_result_api_response_spec.rb +48 -0
- data/spec/models/create_order_result_spec.rb +42 -0
- data/spec/models/create_post_result_api_response_spec.rb +48 -0
- data/spec/models/create_post_result_spec.rb +36 -0
- data/spec/models/currency_api_response_spec.rb +48 -0
- data/spec/models/currency_consume_request_spec.rb +60 -0
- data/spec/models/currency_exchange_rate_api_response_spec.rb +48 -0
- data/spec/models/currency_exchange_rate_spec.rb +72 -0
- data/spec/models/currency_list_api_response_spec.rb +48 -0
- data/spec/models/currency_spec.rb +126 -0
- data/spec/models/currency_transaction_list_api_response_spec.rb +48 -0
- data/spec/models/currency_transaction_spec.rb +102 -0
- data/spec/models/directory_item_spec.rb +54 -0
- data/spec/models/email_sign_in_request_spec.rb +48 -0
- data/spec/models/email_sign_up_request_spec.rb +78 -0
- data/spec/models/enterprise_pay_info_spec.rb +48 -0
- data/spec/models/exchange_currency_request_spec.rb +66 -0
- data/spec/models/exchange_rate_put_request_spec.rb +48 -0
- data/spec/models/execute_function_request_spec.rb +36 -0
- data/spec/models/file_item_spec.rb +54 -0
- data/spec/models/file_list_result_api_response_spec.rb +48 -0
- data/spec/models/file_list_result_spec.rb +60 -0
- data/spec/models/follower_model_spec.rb +102 -0
- data/spec/models/follower_put_model_spec.rb +66 -0
- data/spec/models/fulfillment_detail_spec.rb +48 -0
- data/spec/models/geo_location_model_api_response_spec.rb +48 -0
- data/spec/models/geo_location_model_spec.rb +156 -0
- data/spec/models/geo_location_response_model_spec.rb +162 -0
- data/spec/models/goods_detail_spec.rb +96 -0
- data/spec/models/grant_request_spec.rb +78 -0
- data/spec/models/grant_result_api_response_spec.rb +48 -0
- data/spec/models/grant_result_spec.rb +54 -0
- data/spec/models/hb_fq_pay_info_spec.rb +42 -0
- data/spec/models/int64_api_response_spec.rb +48 -0
- data/spec/models/intact_charge_info_spec.rb +102 -0
- data/spec/models/list_response_item_list_api_response_spec.rb +48 -0
- data/spec/models/list_response_item_spec.rb +90 -0
- data/spec/models/o_auth_account_bind_request_spec.rb +60 -0
- data/spec/models/o_auth_account_put_bind_request_spec.rb +48 -0
- data/spec/models/o_auth_account_sign_in_request_spec.rb +48 -0
- data/spec/models/object_api_response_spec.rb +48 -0
- data/spec/models/object_list_api_response_spec.rb +48 -0
- data/spec/models/order_api_response_spec.rb +48 -0
- data/spec/models/order_list_result_api_response_spec.rb +48 -0
- data/spec/models/order_list_result_spec.rb +42 -0
- data/spec/models/order_spec.rb +144 -0
- data/spec/models/payment_info_with_id_spec.rb +42 -0
- data/spec/models/phone_sign_in_request_spec.rb +48 -0
- data/spec/models/phone_sign_up_request_spec.rb +78 -0
- data/spec/models/post_index_request_spec.rb +42 -0
- data/spec/models/post_result_api_response_spec.rb +48 -0
- data/spec/models/post_result_spec.rb +36 -0
- data/spec/models/preset_pay_tool_info_spec.rb +42 -0
- data/spec/models/profile_result_api_response_spec.rb +48 -0
- data/spec/models/profile_result_spec.rb +114 -0
- data/spec/models/project_api_response_spec.rb +48 -0
- data/spec/models/project_list_result_api_response_spec.rb +48 -0
- data/spec/models/project_list_result_spec.rb +42 -0
- data/spec/models/project_spec.rb +84 -0
- data/spec/models/qr_code_pre_sign_in_request_spec.rb +48 -0
- data/spec/models/qr_code_scan_request_spec.rb +36 -0
- data/spec/models/qr_code_sign_in_request_spec.rb +36 -0
- data/spec/models/qr_code_sign_up_request_spec.rb +84 -0
- data/spec/models/recharge_point_request_spec.rb +60 -0
- data/spec/models/recommend_friend_spec.rb +90 -0
- data/spec/models/refund_charge_info_spec.rb +54 -0
- data/spec/models/refund_sub_fee_spec.rb +42 -0
- data/spec/models/return_page_notify_request_spec.rb +102 -0
- data/spec/models/send_email_code_request_spec.rb +42 -0
- data/spec/models/send_sms_code_request_spec.rb +42 -0
- data/spec/models/service_group_api_response_spec.rb +48 -0
- data/spec/models/service_group_list_api_response_spec.rb +48 -0
- data/spec/models/service_group_spec.rb +90 -0
- data/spec/models/service_item_api_response_spec.rb +48 -0
- data/spec/models/service_item_list_api_response_spec.rb +48 -0
- data/spec/models/service_item_spec.rb +126 -0
- data/spec/models/service_provider_api_response_spec.rb +48 -0
- data/spec/models/service_provider_list_api_response_spec.rb +48 -0
- data/spec/models/service_provider_spec.rb +96 -0
- data/spec/models/service_setting_group_post_result_api_response_spec.rb +48 -0
- data/spec/models/service_setting_group_post_result_spec.rb +36 -0
- data/spec/models/service_setting_item_post_result_api_response_spec.rb +48 -0
- data/spec/models/service_setting_item_post_result_spec.rb +36 -0
- data/spec/models/service_setting_provider_post_result_api_response_spec.rb +48 -0
- data/spec/models/service_setting_provider_post_result_spec.rb +36 -0
- data/spec/models/service_setting_setting_post_result_api_response_spec.rb +48 -0
- data/spec/models/service_setting_setting_post_result_spec.rb +36 -0
- data/spec/models/settings_api_response_spec.rb +48 -0
- data/spec/models/settings_list_api_response_spec.rb +48 -0
- data/spec/models/settings_spec.rb +102 -0
- data/spec/models/setup_code_api_response_spec.rb +48 -0
- data/spec/models/setup_code_spec.rb +48 -0
- data/spec/models/sign_in_request_spec.rb +48 -0
- data/spec/models/sign_up_request_spec.rb +84 -0
- data/spec/models/storage_list_result_api_response_spec.rb +48 -0
- data/spec/models/storage_list_result_spec.rb +60 -0
- data/spec/models/string_api_response_spec.rb +48 -0
- data/spec/models/string_list_api_response_spec.rb +48 -0
- data/spec/models/sub_fee_spec.rb +48 -0
- data/spec/models/system_directory_item_spec.rb +54 -0
- data/spec/models/system_file_item_spec.rb +54 -0
- data/spec/models/system_file_list_result_api_response_spec.rb +48 -0
- data/spec/models/system_file_list_result_spec.rb +48 -0
- data/spec/models/tap_pay_info_spec.rb +36 -0
- data/spec/models/team_spec.rb +90 -0
- data/spec/models/token_model_api_response_spec.rb +48 -0
- data/spec/models/token_model_spec.rb +48 -0
- data/spec/models/trade_fund_bill_spec.rb +60 -0
- data/spec/models/trade_settle_detail_spec.rb +78 -0
- data/spec/models/trade_settle_info_spec.rb +42 -0
- data/spec/models/union_id_sign_in_request_spec.rb +48 -0
- data/spec/models/union_id_sign_up_request_spec.rb +96 -0
- data/spec/models/update_profile_request_spec.rb +132 -0
- data/spec/models/user_access_token_spec.rb +96 -0
- data/spec/models/user_api_response_spec.rb +48 -0
- data/spec/models/user_common_interests_result_api_response_spec.rb +48 -0
- data/spec/models/user_common_interests_result_spec.rb +42 -0
- data/spec/models/user_currency_currency_trans_result_api_response_spec.rb +48 -0
- data/spec/models/user_currency_currency_trans_result_spec.rb +42 -0
- data/spec/models/user_currency_list_api_response_spec.rb +48 -0
- data/spec/models/user_currency_spec.rb +54 -0
- data/spec/models/user_followers_result_api_response_spec.rb +48 -0
- data/spec/models/user_followers_result_spec.rb +42 -0
- data/spec/models/user_following_result_api_response_spec.rb +48 -0
- data/spec/models/user_following_result_spec.rb +42 -0
- data/spec/models/user_friends_near_by_result_api_response_spec.rb +48 -0
- data/spec/models/user_friends_near_by_result_spec.rb +42 -0
- data/spec/models/user_list_result_api_response_spec.rb +48 -0
- data/spec/models/user_list_result_spec.rb +42 -0
- data/spec/models/user_location_post_result_api_response_spec.rb +48 -0
- data/spec/models/user_location_post_result_spec.rb +36 -0
- data/spec/models/user_locations_result_api_response_spec.rb +48 -0
- data/spec/models/user_locations_result_spec.rb +42 -0
- data/spec/models/user_logins_list_api_response_spec.rb +48 -0
- data/spec/models/user_logins_spec.rb +90 -0
- data/spec/models/user_mutual_followers_result_api_response_spec.rb +48 -0
- data/spec/models/user_mutual_followers_result_spec.rb +42 -0
- data/spec/models/user_mutual_followings_result_api_response_spec.rb +48 -0
- data/spec/models/user_mutual_followings_result_spec.rb +42 -0
- data/spec/models/user_profile_result_api_response_spec.rb +48 -0
- data/spec/models/user_profile_result_spec.rb +126 -0
- data/spec/models/user_qr_code_scan_result_api_response_spec.rb +48 -0
- data/spec/models/user_qr_code_scan_result_spec.rb +84 -0
- data/spec/models/user_setting_api_response_spec.rb +48 -0
- data/spec/models/user_setting_list_api_response_spec.rb +48 -0
- data/spec/models/user_setting_post_result_api_response_spec.rb +48 -0
- data/spec/models/user_setting_post_result_spec.rb +36 -0
- data/spec/models/user_setting_spec.rb +96 -0
- data/spec/models/user_spec.rb +252 -0
- data/spec/models/voucher_detail_spec.rb +102 -0
- data/spec/models/wechat_js_config_result_api_response_spec.rb +48 -0
- data/spec/models/wechat_js_config_result_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- data/zsgf_client.gemspec +39 -0
- metadata +974 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#全部 API 文档
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.13.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ZSGFClient
|
|
17
|
+
class CurrencyListApiResponse
|
|
18
|
+
# 状态码
|
|
19
|
+
attr_accessor :code
|
|
20
|
+
|
|
21
|
+
# 响应数据
|
|
22
|
+
attr_accessor :data
|
|
23
|
+
|
|
24
|
+
# 错误信息
|
|
25
|
+
attr_accessor :error
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'code' => :'code',
|
|
31
|
+
:'data' => :'data',
|
|
32
|
+
:'error' => :'error'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'code' => :'Integer',
|
|
50
|
+
:'data' => :'Array<Currency>',
|
|
51
|
+
:'error' => :'String'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
:'data',
|
|
59
|
+
:'error'
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ZSGFClient::CurrencyListApiResponse` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ZSGFClient::CurrencyListApiResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
75
|
+
end
|
|
76
|
+
h[k.to_sym] = v
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'code')
|
|
80
|
+
self.code = attributes[:'code']
|
|
81
|
+
else
|
|
82
|
+
self.code = 200
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'data')
|
|
86
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
87
|
+
self.data = value
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'error')
|
|
92
|
+
self.error = attributes[:'error']
|
|
93
|
+
else
|
|
94
|
+
self.error = ''
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
99
|
+
# @return Array for valid properties with the reasons
|
|
100
|
+
def list_invalid_properties
|
|
101
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
102
|
+
invalid_properties = Array.new
|
|
103
|
+
invalid_properties
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Check to see if the all the properties in the model are valid
|
|
107
|
+
# @return true if the model is valid
|
|
108
|
+
def valid?
|
|
109
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
110
|
+
true
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Checks equality by comparing each attribute.
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def ==(o)
|
|
116
|
+
return true if self.equal?(o)
|
|
117
|
+
self.class == o.class &&
|
|
118
|
+
code == o.code &&
|
|
119
|
+
data == o.data &&
|
|
120
|
+
error == o.error
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def eql?(o)
|
|
126
|
+
self == o
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Calculates hash code according to all attributes.
|
|
130
|
+
# @return [Integer] Hash code
|
|
131
|
+
def hash
|
|
132
|
+
[code, data, error].hash
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Builds the object from hash
|
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
|
+
# @return [Object] Returns the model itself
|
|
138
|
+
def self.build_from_hash(attributes)
|
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
|
140
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
141
|
+
transformed_hash = {}
|
|
142
|
+
openapi_types.each_pair do |key, type|
|
|
143
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = nil
|
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
146
|
+
# check to ensure the input is an array given that the attribute
|
|
147
|
+
# is documented as an array but the input is not
|
|
148
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
149
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
150
|
+
end
|
|
151
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
new(transformed_hash)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Deserializes the data based on type
|
|
159
|
+
# @param string type Data type
|
|
160
|
+
# @param string value Value to be deserialized
|
|
161
|
+
# @return [Object] Deserialized data
|
|
162
|
+
def self._deserialize(type, value)
|
|
163
|
+
case type.to_sym
|
|
164
|
+
when :Time
|
|
165
|
+
Time.parse(value)
|
|
166
|
+
when :Date
|
|
167
|
+
Date.parse(value)
|
|
168
|
+
when :String
|
|
169
|
+
value.to_s
|
|
170
|
+
when :Integer
|
|
171
|
+
value.to_i
|
|
172
|
+
when :Float
|
|
173
|
+
value.to_f
|
|
174
|
+
when :Boolean
|
|
175
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
176
|
+
true
|
|
177
|
+
else
|
|
178
|
+
false
|
|
179
|
+
end
|
|
180
|
+
when :Object
|
|
181
|
+
# generic object (usually a Hash), return directly
|
|
182
|
+
value
|
|
183
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
184
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
185
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
186
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
187
|
+
k_type = Regexp.last_match[:k_type]
|
|
188
|
+
v_type = Regexp.last_match[:v_type]
|
|
189
|
+
{}.tap do |hash|
|
|
190
|
+
value.each do |k, v|
|
|
191
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
else # model
|
|
195
|
+
# models (e.g. Pet) or oneOf
|
|
196
|
+
klass = ZSGFClient.const_get(type)
|
|
197
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Returns the string representation of the object
|
|
202
|
+
# @return [String] String presentation of the object
|
|
203
|
+
def to_s
|
|
204
|
+
to_hash.to_s
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
|
209
|
+
def to_body
|
|
210
|
+
to_hash
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Returns the object in the form of hash
|
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
|
215
|
+
def to_hash
|
|
216
|
+
hash = {}
|
|
217
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
218
|
+
value = self.send(attr)
|
|
219
|
+
if value.nil?
|
|
220
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
221
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
hash[param] = _to_hash(value)
|
|
225
|
+
end
|
|
226
|
+
hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Outputs non-array value in the form of hash
|
|
230
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
231
|
+
# @param [Object] value Any valid value
|
|
232
|
+
# @return [Hash] Returns the value in the form of hash
|
|
233
|
+
def _to_hash(value)
|
|
234
|
+
if value.is_a?(Array)
|
|
235
|
+
value.compact.map { |v| _to_hash(v) }
|
|
236
|
+
elsif value.is_a?(Hash)
|
|
237
|
+
{}.tap do |hash|
|
|
238
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
239
|
+
end
|
|
240
|
+
elsif value.respond_to? :to_hash
|
|
241
|
+
value.to_hash
|
|
242
|
+
else
|
|
243
|
+
value
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
end
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#全部 API 文档
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.13.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ZSGFClient
|
|
17
|
+
# 货币交易记录实体,用于记录用户的货币交易详情。
|
|
18
|
+
class CurrencyTransaction
|
|
19
|
+
# 货币交易记录的唯一标识符。
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# 发起交易的发送方用户ID,若为转账交易时必填。
|
|
23
|
+
attr_accessor :from_user_id
|
|
24
|
+
|
|
25
|
+
# 进行货币交易的用户ID。
|
|
26
|
+
attr_accessor :user_id
|
|
27
|
+
|
|
28
|
+
# 货币交易的类型,例如 '消费', '奖励', '兑换', '转账' 等。
|
|
29
|
+
attr_accessor :transaction_type
|
|
30
|
+
|
|
31
|
+
# 交易的货币类型,例如 'USD', 'CNY' 等。
|
|
32
|
+
attr_accessor :currency_type
|
|
33
|
+
|
|
34
|
+
# 货币的变动数量,正数表示增加,负数表示减少。
|
|
35
|
+
attr_accessor :currency_change
|
|
36
|
+
|
|
37
|
+
# 交易完成后的货币余额。
|
|
38
|
+
attr_accessor :currency_balance
|
|
39
|
+
|
|
40
|
+
# 描述货币变动的具体原因或相关交易详情。
|
|
41
|
+
attr_accessor :description
|
|
42
|
+
|
|
43
|
+
# 货币交易的当前状态,例如 '成功', '失败', '待审核' 等。
|
|
44
|
+
attr_accessor :status
|
|
45
|
+
|
|
46
|
+
# 交易的额外信息或管理员的备注。
|
|
47
|
+
attr_accessor :remark
|
|
48
|
+
|
|
49
|
+
# 用于分类或标记交易的标签。
|
|
50
|
+
attr_accessor :tags
|
|
51
|
+
|
|
52
|
+
# 货币交易发生的时间,默认为当前时间。
|
|
53
|
+
attr_accessor :create_date
|
|
54
|
+
|
|
55
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
|
+
def self.attribute_map
|
|
57
|
+
{
|
|
58
|
+
:'id' => :'id',
|
|
59
|
+
:'from_user_id' => :'fromUserID',
|
|
60
|
+
:'user_id' => :'userID',
|
|
61
|
+
:'transaction_type' => :'transactionType',
|
|
62
|
+
:'currency_type' => :'currencyType',
|
|
63
|
+
:'currency_change' => :'currencyChange',
|
|
64
|
+
:'currency_balance' => :'currencyBalance',
|
|
65
|
+
:'description' => :'description',
|
|
66
|
+
:'status' => :'status',
|
|
67
|
+
:'remark' => :'remark',
|
|
68
|
+
:'tags' => :'tags',
|
|
69
|
+
:'create_date' => :'createDate'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns attribute mapping this model knows about
|
|
74
|
+
def self.acceptable_attribute_map
|
|
75
|
+
attribute_map
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns all the JSON keys this model knows about
|
|
79
|
+
def self.acceptable_attributes
|
|
80
|
+
acceptable_attribute_map.values
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Attribute type mapping.
|
|
84
|
+
def self.openapi_types
|
|
85
|
+
{
|
|
86
|
+
:'id' => :'Integer',
|
|
87
|
+
:'from_user_id' => :'Integer',
|
|
88
|
+
:'user_id' => :'Integer',
|
|
89
|
+
:'transaction_type' => :'String',
|
|
90
|
+
:'currency_type' => :'String',
|
|
91
|
+
:'currency_change' => :'Integer',
|
|
92
|
+
:'currency_balance' => :'Float',
|
|
93
|
+
:'description' => :'String',
|
|
94
|
+
:'status' => :'String',
|
|
95
|
+
:'remark' => :'String',
|
|
96
|
+
:'tags' => :'String',
|
|
97
|
+
:'create_date' => :'Time'
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# List of attributes with nullable: true
|
|
102
|
+
def self.openapi_nullable
|
|
103
|
+
Set.new([
|
|
104
|
+
:'transaction_type',
|
|
105
|
+
:'currency_type',
|
|
106
|
+
:'description',
|
|
107
|
+
:'status',
|
|
108
|
+
:'remark',
|
|
109
|
+
:'tags',
|
|
110
|
+
])
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Initializes the object
|
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
115
|
+
def initialize(attributes = {})
|
|
116
|
+
if (!attributes.is_a?(Hash))
|
|
117
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ZSGFClient::CurrencyTransaction` initialize method"
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
121
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
122
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
123
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
124
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ZSGFClient::CurrencyTransaction`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
125
|
+
end
|
|
126
|
+
h[k.to_sym] = v
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'id')
|
|
130
|
+
self.id = attributes[:'id']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'from_user_id')
|
|
134
|
+
self.from_user_id = attributes[:'from_user_id']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'user_id')
|
|
138
|
+
self.user_id = attributes[:'user_id']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'transaction_type')
|
|
142
|
+
self.transaction_type = attributes[:'transaction_type']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'currency_type')
|
|
146
|
+
self.currency_type = attributes[:'currency_type']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'currency_change')
|
|
150
|
+
self.currency_change = attributes[:'currency_change']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'currency_balance')
|
|
154
|
+
self.currency_balance = attributes[:'currency_balance']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'description')
|
|
158
|
+
self.description = attributes[:'description']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'status')
|
|
162
|
+
self.status = attributes[:'status']
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'remark')
|
|
166
|
+
self.remark = attributes[:'remark']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'tags')
|
|
170
|
+
self.tags = attributes[:'tags']
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'create_date')
|
|
174
|
+
self.create_date = attributes[:'create_date']
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
179
|
+
# @return Array for valid properties with the reasons
|
|
180
|
+
def list_invalid_properties
|
|
181
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
182
|
+
invalid_properties = Array.new
|
|
183
|
+
if !@transaction_type.nil? && @transaction_type.to_s.length > 50
|
|
184
|
+
invalid_properties.push('invalid value for "transaction_type", the character length must be smaller than or equal to 50.')
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if !@currency_type.nil? && @currency_type.to_s.length > 50
|
|
188
|
+
invalid_properties.push('invalid value for "currency_type", the character length must be smaller than or equal to 50.')
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if !@status.nil? && @status.to_s.length > 50
|
|
192
|
+
invalid_properties.push('invalid value for "status", the character length must be smaller than or equal to 50.')
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if !@remark.nil? && @remark.to_s.length > 255
|
|
196
|
+
invalid_properties.push('invalid value for "remark", the character length must be smaller than or equal to 255.')
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if !@tags.nil? && @tags.to_s.length > 255
|
|
200
|
+
invalid_properties.push('invalid value for "tags", the character length must be smaller than or equal to 255.')
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
invalid_properties
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Check to see if the all the properties in the model are valid
|
|
207
|
+
# @return true if the model is valid
|
|
208
|
+
def valid?
|
|
209
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
210
|
+
return false if !@transaction_type.nil? && @transaction_type.to_s.length > 50
|
|
211
|
+
return false if !@currency_type.nil? && @currency_type.to_s.length > 50
|
|
212
|
+
return false if !@status.nil? && @status.to_s.length > 50
|
|
213
|
+
return false if !@remark.nil? && @remark.to_s.length > 255
|
|
214
|
+
return false if !@tags.nil? && @tags.to_s.length > 255
|
|
215
|
+
true
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Custom attribute writer method with validation
|
|
219
|
+
# @param [Object] transaction_type Value to be assigned
|
|
220
|
+
def transaction_type=(transaction_type)
|
|
221
|
+
if !transaction_type.nil? && transaction_type.to_s.length > 50
|
|
222
|
+
fail ArgumentError, 'invalid value for "transaction_type", the character length must be smaller than or equal to 50.'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
@transaction_type = transaction_type
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Custom attribute writer method with validation
|
|
229
|
+
# @param [Object] currency_type Value to be assigned
|
|
230
|
+
def currency_type=(currency_type)
|
|
231
|
+
if !currency_type.nil? && currency_type.to_s.length > 50
|
|
232
|
+
fail ArgumentError, 'invalid value for "currency_type", the character length must be smaller than or equal to 50.'
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
@currency_type = currency_type
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Custom attribute writer method with validation
|
|
239
|
+
# @param [Object] status Value to be assigned
|
|
240
|
+
def status=(status)
|
|
241
|
+
if !status.nil? && status.to_s.length > 50
|
|
242
|
+
fail ArgumentError, 'invalid value for "status", the character length must be smaller than or equal to 50.'
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
@status = status
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Custom attribute writer method with validation
|
|
249
|
+
# @param [Object] remark Value to be assigned
|
|
250
|
+
def remark=(remark)
|
|
251
|
+
if !remark.nil? && remark.to_s.length > 255
|
|
252
|
+
fail ArgumentError, 'invalid value for "remark", the character length must be smaller than or equal to 255.'
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
@remark = remark
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Custom attribute writer method with validation
|
|
259
|
+
# @param [Object] tags Value to be assigned
|
|
260
|
+
def tags=(tags)
|
|
261
|
+
if !tags.nil? && tags.to_s.length > 255
|
|
262
|
+
fail ArgumentError, 'invalid value for "tags", the character length must be smaller than or equal to 255.'
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
@tags = tags
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Checks equality by comparing each attribute.
|
|
269
|
+
# @param [Object] Object to be compared
|
|
270
|
+
def ==(o)
|
|
271
|
+
return true if self.equal?(o)
|
|
272
|
+
self.class == o.class &&
|
|
273
|
+
id == o.id &&
|
|
274
|
+
from_user_id == o.from_user_id &&
|
|
275
|
+
user_id == o.user_id &&
|
|
276
|
+
transaction_type == o.transaction_type &&
|
|
277
|
+
currency_type == o.currency_type &&
|
|
278
|
+
currency_change == o.currency_change &&
|
|
279
|
+
currency_balance == o.currency_balance &&
|
|
280
|
+
description == o.description &&
|
|
281
|
+
status == o.status &&
|
|
282
|
+
remark == o.remark &&
|
|
283
|
+
tags == o.tags &&
|
|
284
|
+
create_date == o.create_date
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# @see the `==` method
|
|
288
|
+
# @param [Object] Object to be compared
|
|
289
|
+
def eql?(o)
|
|
290
|
+
self == o
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Calculates hash code according to all attributes.
|
|
294
|
+
# @return [Integer] Hash code
|
|
295
|
+
def hash
|
|
296
|
+
[id, from_user_id, user_id, transaction_type, currency_type, currency_change, currency_balance, description, status, remark, tags, create_date].hash
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Builds the object from hash
|
|
300
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
301
|
+
# @return [Object] Returns the model itself
|
|
302
|
+
def self.build_from_hash(attributes)
|
|
303
|
+
return nil unless attributes.is_a?(Hash)
|
|
304
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
305
|
+
transformed_hash = {}
|
|
306
|
+
openapi_types.each_pair do |key, type|
|
|
307
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
308
|
+
transformed_hash["#{key}"] = nil
|
|
309
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
310
|
+
# check to ensure the input is an array given that the attribute
|
|
311
|
+
# is documented as an array but the input is not
|
|
312
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
313
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
314
|
+
end
|
|
315
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
316
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
new(transformed_hash)
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# Deserializes the data based on type
|
|
323
|
+
# @param string type Data type
|
|
324
|
+
# @param string value Value to be deserialized
|
|
325
|
+
# @return [Object] Deserialized data
|
|
326
|
+
def self._deserialize(type, value)
|
|
327
|
+
case type.to_sym
|
|
328
|
+
when :Time
|
|
329
|
+
Time.parse(value)
|
|
330
|
+
when :Date
|
|
331
|
+
Date.parse(value)
|
|
332
|
+
when :String
|
|
333
|
+
value.to_s
|
|
334
|
+
when :Integer
|
|
335
|
+
value.to_i
|
|
336
|
+
when :Float
|
|
337
|
+
value.to_f
|
|
338
|
+
when :Boolean
|
|
339
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
340
|
+
true
|
|
341
|
+
else
|
|
342
|
+
false
|
|
343
|
+
end
|
|
344
|
+
when :Object
|
|
345
|
+
# generic object (usually a Hash), return directly
|
|
346
|
+
value
|
|
347
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
348
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
349
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
350
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
351
|
+
k_type = Regexp.last_match[:k_type]
|
|
352
|
+
v_type = Regexp.last_match[:v_type]
|
|
353
|
+
{}.tap do |hash|
|
|
354
|
+
value.each do |k, v|
|
|
355
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
356
|
+
end
|
|
357
|
+
end
|
|
358
|
+
else # model
|
|
359
|
+
# models (e.g. Pet) or oneOf
|
|
360
|
+
klass = ZSGFClient.const_get(type)
|
|
361
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Returns the string representation of the object
|
|
366
|
+
# @return [String] String presentation of the object
|
|
367
|
+
def to_s
|
|
368
|
+
to_hash.to_s
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
372
|
+
# @return [Hash] Returns the object in the form of hash
|
|
373
|
+
def to_body
|
|
374
|
+
to_hash
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# Returns the object in the form of hash
|
|
378
|
+
# @return [Hash] Returns the object in the form of hash
|
|
379
|
+
def to_hash
|
|
380
|
+
hash = {}
|
|
381
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
382
|
+
value = self.send(attr)
|
|
383
|
+
if value.nil?
|
|
384
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
385
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
hash[param] = _to_hash(value)
|
|
389
|
+
end
|
|
390
|
+
hash
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Outputs non-array value in the form of hash
|
|
394
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
395
|
+
# @param [Object] value Any valid value
|
|
396
|
+
# @return [Hash] Returns the value in the form of hash
|
|
397
|
+
def _to_hash(value)
|
|
398
|
+
if value.is_a?(Array)
|
|
399
|
+
value.compact.map { |v| _to_hash(v) }
|
|
400
|
+
elsif value.is_a?(Hash)
|
|
401
|
+
{}.tap do |hash|
|
|
402
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
403
|
+
end
|
|
404
|
+
elsif value.respond_to? :to_hash
|
|
405
|
+
value.to_hash
|
|
406
|
+
else
|
|
407
|
+
value
|
|
408
|
+
end
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
end
|