yapstone-so 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +79 -0
- data/README.md +260 -0
- data/Rakefile +10 -0
- data/docs/AbstractEntity.md +17 -0
- data/docs/ActionResource.md +25 -0
- data/docs/ActionStatusResource.md +21 -0
- data/docs/AddressResource.md +31 -0
- data/docs/ApplicantConsentRequest.md +25 -0
- data/docs/ApplicantConsentResource.md +27 -0
- data/docs/ApplicantConsentType.md +16 -0
- data/docs/ApplicantResource.md +39 -0
- data/docs/AssetRequest.md +25 -0
- data/docs/AssetRequestAllOf.md +17 -0
- data/docs/AssetRequestCommon.md +23 -0
- data/docs/AssetResource.md +29 -0
- data/docs/AssetResourceAllOf.md +19 -0
- data/docs/AssetUpdateRequest.md +27 -0
- data/docs/AssetUpdateRequestAllOf.md +19 -0
- data/docs/AssetsApi.md +276 -0
- data/docs/AssetsResource.md +19 -0
- data/docs/AssetsResourceAllOf.md +17 -0
- data/docs/AuthenticationApi.md +58 -0
- data/docs/BankAccountDataResource.md +23 -0
- data/docs/BankAccountResource.md +25 -0
- data/docs/BeneficialOwnerRequest.md +27 -0
- data/docs/BeneficialOwnerResource.md +31 -0
- data/docs/BeneficialOwnersPatch.md +21 -0
- data/docs/BusinessApplicantAdminFieldsResource.md +17 -0
- data/docs/BusinessApplicantAdminResource.md +49 -0
- data/docs/BusinessApplicantRequest.md +39 -0
- data/docs/BusinessApplicantResource.md +23 -0
- data/docs/BusinessApplicantResourceAllOf.md +23 -0
- data/docs/BusinessApplicantUpdateRequest.md +41 -0
- data/docs/BusinessApplicantsApi.md +276 -0
- data/docs/BusinessApplicantsResource.md +19 -0
- data/docs/BusinessApplicantsResourceAllOf.md +17 -0
- data/docs/BusinessIdType.md +16 -0
- data/docs/BusinessIdentificationResource.md +25 -0
- data/docs/BusinessOwnerResource.md +17 -0
- data/docs/BusinessProfileResource.md +33 -0
- data/docs/BusinessUpdateIdentificationResource.md +25 -0
- data/docs/CapabilityResource.md +19 -0
- data/docs/CardDataResource.md +35 -0
- data/docs/Consent.md +25 -0
- data/docs/ConsentRequest.md +25 -0
- data/docs/ConsentResource.md +27 -0
- data/docs/ConsentType.md +16 -0
- data/docs/ContractCreateRequest.md +21 -0
- data/docs/ContractResource.md +23 -0
- data/docs/ContractResourceDTO.md +17 -0
- data/docs/ContractResourceDTOAllOf.md +17 -0
- data/docs/ContractUpdateRequest.md +19 -0
- data/docs/ContractsApi.md +227 -0
- data/docs/CustomerHistoryResource.md +19 -0
- data/docs/DeactivateRequest.md +19 -0
- data/docs/DeactivateResponse.md +21 -0
- data/docs/DirectDebitConsentResource.md +19 -0
- data/docs/DirectDebitFrequencyType.md +16 -0
- data/docs/DirectDebitSchemeType.md +16 -0
- data/docs/DirectDebtCapabilityResource.md +23 -0
- data/docs/EntitiesResource.md +17 -0
- data/docs/EntityHistoryResource.md +17 -0
- data/docs/EntityProductStatusResource.md +19 -0
- data/docs/EntityUpdateEvent.md +23 -0
- data/docs/EntityUpdatedAttribute.md +21 -0
- data/docs/Errors.md +19 -0
- data/docs/ExpirationDateResource.md +19 -0
- data/docs/Gender.md +16 -0
- data/docs/GovIdentificationResource.md +29 -0
- data/docs/GovIdentificationUpdateResource.md +29 -0
- data/docs/GovernmentIdType.md +16 -0
- data/docs/IndividualApplicantAdminFieldsResource.md +17 -0
- data/docs/IndividualApplicantAdminResource.md +43 -0
- data/docs/IndividualApplicantRequest.md +33 -0
- data/docs/IndividualApplicantResource.md +17 -0
- data/docs/IndividualApplicantUpdateRequest.md +35 -0
- data/docs/IndividualApplicantsApi.md +276 -0
- data/docs/IndividualApplicantsResource.md +19 -0
- data/docs/IndividualApplicantsResourceAllOf.md +17 -0
- data/docs/IndividualOwnerResource.md +19 -0
- data/docs/InlineResponse200.md +25 -0
- data/docs/InstrumentsApi.md +274 -0
- data/docs/IssuerScope.md +16 -0
- data/docs/MarketPlaceApplicantResource.md +17 -0
- data/docs/MarketPlacePropertyResource.md +27 -0
- data/docs/MarketplaceProductAdd.md +27 -0
- data/docs/MarketplaceProductBasic.md +23 -0
- data/docs/MarketplaceProductExtra.md +33 -0
- data/docs/MarketplaceProductExtraAllOf.md +25 -0
- data/docs/MarketplaceProductPayoutInstrumentResource.md +19 -0
- data/docs/MarketplaceProductPayoutInstrumentUpdate.md +21 -0
- data/docs/MarketplaceProductResource.md +39 -0
- data/docs/MarketplaceProductSubResource.md +37 -0
- data/docs/MarketplaceProductUpdate.md +37 -0
- data/docs/MarketplaceProductsApi.md +116 -0
- data/docs/MarketplacesApi.md +227 -0
- data/docs/Meta.md +21 -0
- data/docs/MoneyResource.md +19 -0
- data/docs/NameResource.md +27 -0
- data/docs/OwnerRequest.md +21 -0
- data/docs/OwnerResource.md +23 -0
- data/docs/Pagination.md +21 -0
- data/docs/PatchOperation.md +16 -0
- data/docs/PayoutInstrumentRequest.md +29 -0
- data/docs/PayoutInstrumentResource.md +35 -0
- data/docs/PayoutInstrumentResourceCommonEntities.md +23 -0
- data/docs/PayoutInstrumentUpdateRequest.md +31 -0
- data/docs/PayoutInstrumentsApi.md +274 -0
- data/docs/PayoutInstrumentsResource.md +19 -0
- data/docs/PayoutInstrumentsResourceAllOf.md +17 -0
- data/docs/PayoutProductAdd.md +19 -0
- data/docs/PayoutProductResource.md +27 -0
- data/docs/PayoutProductSubResource.md +25 -0
- data/docs/PayoutProductSubResourceAllOf.md +23 -0
- data/docs/PayoutProductsApi.md +61 -0
- data/docs/PayoutsApi.md +227 -0
- data/docs/PhoneResource.md +19 -0
- data/docs/PriceSettingResource.md +29 -0
- data/docs/PrimaryContactResource.md +35 -0
- data/docs/Product.md +16 -0
- data/docs/ProductRead.md +17 -0
- data/docs/ProductWrite.md +17 -0
- data/docs/ProfileResource.md +35 -0
- data/docs/PropertyHistoryResource.md +27 -0
- data/docs/PropertyInfoResource.md +23 -0
- data/docs/PropertyOwnerResource.md +31 -0
- data/docs/PropertyResource.md +27 -0
- data/docs/PropertyTrackerResource.md +23 -0
- data/docs/RegistrationResource.md +21 -0
- data/docs/ReservationSettingResource.md +19 -0
- data/docs/Resource.md +17 -0
- data/docs/SocialNetworkResource.md +19 -0
- data/docs/StatusReasonResource.md +23 -0
- data/docs/StatusRequest.md +17 -0
- data/docs/StatusResource.md +21 -0
- data/docs/StaySettingResource.md +19 -0
- data/docs/SuspensionReasonResource.md +17 -0
- data/docs/TravelerResource.md +23 -0
- data/git_push.sh +55 -0
- data/lib/yapstone-so/api/assets_api.rb +335 -0
- data/lib/yapstone-so/api/authentication_api.rb +92 -0
- data/lib/yapstone-so/api/business_applicants_api.rb +339 -0
- data/lib/yapstone-so/api/contracts_api.rb +284 -0
- data/lib/yapstone-so/api/individual_applicants_api.rb +339 -0
- data/lib/yapstone-so/api/instruments_api.rb +332 -0
- data/lib/yapstone-so/api/marketplace_products_api.rb +154 -0
- data/lib/yapstone-so/api/marketplaces_api.rb +304 -0
- data/lib/yapstone-so/api/payout_instruments_api.rb +332 -0
- data/lib/yapstone-so/api/payout_products_api.rb +84 -0
- data/lib/yapstone-so/api/payouts_api.rb +304 -0
- data/lib/yapstone-so/api_client.rb +386 -0
- data/lib/yapstone-so/api_error.rb +57 -0
- data/lib/yapstone-so/configuration.rb +249 -0
- data/lib/yapstone-so/models/abstract_entity.rb +232 -0
- data/lib/yapstone-so/models/action_resource.rb +238 -0
- data/lib/yapstone-so/models/action_status_resource.rb +260 -0
- data/lib/yapstone-so/models/address_resource.rb +444 -0
- data/lib/yapstone-so/models/applicant_consent_request.rb +317 -0
- data/lib/yapstone-so/models/applicant_consent_resource.rb +271 -0
- data/lib/yapstone-so/models/applicant_consent_type.rb +39 -0
- data/lib/yapstone-so/models/applicant_resource.rb +391 -0
- data/lib/yapstone-so/models/asset_request.rb +325 -0
- data/lib/yapstone-so/models/asset_request_all_of.rb +199 -0
- data/lib/yapstone-so/models/asset_request_common.rb +305 -0
- data/lib/yapstone-so/models/asset_resource.rb +344 -0
- data/lib/yapstone-so/models/asset_resource_all_of.rb +206 -0
- data/lib/yapstone-so/models/asset_update_request.rb +334 -0
- data/lib/yapstone-so/models/asset_update_request_all_of.rb +208 -0
- data/lib/yapstone-so/models/assets_resource.rb +225 -0
- data/lib/yapstone-so/models/assets_resource_all_of.rb +204 -0
- data/lib/yapstone-so/models/bank_account_data_resource.rb +228 -0
- data/lib/yapstone-so/models/bank_account_resource.rb +334 -0
- data/lib/yapstone-so/models/beneficial_owner_request.rb +293 -0
- data/lib/yapstone-so/models/beneficial_owner_resource.rb +312 -0
- data/lib/yapstone-so/models/beneficial_owners_patch.rb +221 -0
- data/lib/yapstone-so/models/business_applicant_admin_fields_resource.rb +198 -0
- data/lib/yapstone-so/models/business_applicant_admin_resource.rb +442 -0
- data/lib/yapstone-so/models/business_applicant_request.rb +375 -0
- data/lib/yapstone-so/models/business_applicant_resource.rb +239 -0
- data/lib/yapstone-so/models/business_applicant_resource_all_of.rb +226 -0
- data/lib/yapstone-so/models/business_applicant_update_request.rb +360 -0
- data/lib/yapstone-so/models/business_applicants_resource.rb +225 -0
- data/lib/yapstone-so/models/business_applicants_resource_all_of.rb +204 -0
- data/lib/yapstone-so/models/business_id_type.rb +37 -0
- data/lib/yapstone-so/models/business_identification_resource.rb +267 -0
- data/lib/yapstone-so/models/business_owner_resource.rb +231 -0
- data/lib/yapstone-so/models/business_profile_resource.rb +416 -0
- data/lib/yapstone-so/models/business_update_identification_resource.rb +253 -0
- data/lib/yapstone-so/models/capability_resource.rb +249 -0
- data/lib/yapstone-so/models/card_data_resource.rb +382 -0
- data/lib/yapstone-so/models/consent.rb +329 -0
- data/lib/yapstone-so/models/consent_request.rb +318 -0
- data/lib/yapstone-so/models/consent_resource.rb +272 -0
- data/lib/yapstone-so/models/consent_type.rb +36 -0
- data/lib/yapstone-so/models/contract_create_request.rb +260 -0
- data/lib/yapstone-so/models/contract_resource.rb +270 -0
- data/lib/yapstone-so/models/contract_resource_dto.rb +205 -0
- data/lib/yapstone-so/models/contract_resource_dto_all_of.rb +198 -0
- data/lib/yapstone-so/models/contract_update_request.rb +250 -0
- data/lib/yapstone-so/models/customer_history_resource.rb +206 -0
- data/lib/yapstone-so/models/deactivate_request.rb +228 -0
- data/lib/yapstone-so/models/deactivate_response.rb +221 -0
- data/lib/yapstone-so/models/direct_debit_consent_resource.rb +252 -0
- data/lib/yapstone-so/models/direct_debit_frequency_type.rb +36 -0
- data/lib/yapstone-so/models/direct_debit_scheme_type.rb +37 -0
- data/lib/yapstone-so/models/direct_debt_capability_resource.rb +283 -0
- data/lib/yapstone-so/models/entities_resource.rb +202 -0
- data/lib/yapstone-so/models/entity_history_resource.rb +200 -0
- data/lib/yapstone-so/models/entity_product_status_resource.rb +206 -0
- data/lib/yapstone-so/models/entity_update_event.rb +230 -0
- data/lib/yapstone-so/models/entity_updated_attribute.rb +218 -0
- data/lib/yapstone-so/models/errors.rb +205 -0
- data/lib/yapstone-so/models/expiration_date_resource.rb +238 -0
- data/lib/yapstone-so/models/gender.rb +37 -0
- data/lib/yapstone-so/models/gov_identification_resource.rb +336 -0
- data/lib/yapstone-so/models/gov_identification_update_resource.rb +322 -0
- data/lib/yapstone-so/models/government_id_type.rb +43 -0
- data/lib/yapstone-so/models/individual_applicant_admin_fields_resource.rb +198 -0
- data/lib/yapstone-so/models/individual_applicant_admin_resource.rb +411 -0
- data/lib/yapstone-so/models/individual_applicant_request.rb +345 -0
- data/lib/yapstone-so/models/individual_applicant_resource.rb +207 -0
- data/lib/yapstone-so/models/individual_applicant_update_request.rb +330 -0
- data/lib/yapstone-so/models/individual_applicants_resource.rb +225 -0
- data/lib/yapstone-so/models/individual_applicants_resource_all_of.rb +204 -0
- data/lib/yapstone-so/models/individual_owner_resource.rb +296 -0
- data/lib/yapstone-so/models/inline_response200.rb +232 -0
- data/lib/yapstone-so/models/issuer_scope.rb +39 -0
- data/lib/yapstone-so/models/market_place_applicant_resource.rb +197 -0
- data/lib/yapstone-so/models/market_place_property_resource.rb +261 -0
- data/lib/yapstone-so/models/marketplace_product_add.rb +293 -0
- data/lib/yapstone-so/models/marketplace_product_basic.rb +261 -0
- data/lib/yapstone-so/models/marketplace_product_extra.rb +328 -0
- data/lib/yapstone-so/models/marketplace_product_extra_all_of.rb +268 -0
- data/lib/yapstone-so/models/marketplace_product_payout_instrument_resource.rb +217 -0
- data/lib/yapstone-so/models/marketplace_product_payout_instrument_update.rb +233 -0
- data/lib/yapstone-so/models/marketplace_product_resource.rb +363 -0
- data/lib/yapstone-so/models/marketplace_product_sub_resource.rb +353 -0
- data/lib/yapstone-so/models/marketplace_product_update.rb +352 -0
- data/lib/yapstone-so/models/meta.rb +231 -0
- data/lib/yapstone-so/models/money_resource.rb +218 -0
- data/lib/yapstone-so/models/name_resource.rb +444 -0
- data/lib/yapstone-so/models/owner_request.rb +305 -0
- data/lib/yapstone-so/models/owner_resource.rb +315 -0
- data/lib/yapstone-so/models/pagination.rb +224 -0
- data/lib/yapstone-so/models/patch_operation.rb +37 -0
- data/lib/yapstone-so/models/payout_instrument_request.rb +340 -0
- data/lib/yapstone-so/models/payout_instrument_resource.rb +371 -0
- data/lib/yapstone-so/models/payout_instrument_resource_common_entities.rb +300 -0
- data/lib/yapstone-so/models/payout_instrument_update_request.rb +349 -0
- data/lib/yapstone-so/models/payout_instruments_resource.rb +225 -0
- data/lib/yapstone-so/models/payout_instruments_resource_all_of.rb +204 -0
- data/lib/yapstone-so/models/payout_product_add.rb +217 -0
- data/lib/yapstone-so/models/payout_product_resource.rb +255 -0
- data/lib/yapstone-so/models/payout_product_sub_resource.rb +245 -0
- data/lib/yapstone-so/models/payout_product_sub_resource_all_of.rb +224 -0
- data/lib/yapstone-so/models/phone_resource.rb +228 -0
- data/lib/yapstone-so/models/price_setting_resource.rb +301 -0
- data/lib/yapstone-so/models/primary_contact_resource.rb +417 -0
- data/lib/yapstone-so/models/product.rb +36 -0
- data/lib/yapstone-so/models/product_read.rb +199 -0
- data/lib/yapstone-so/models/product_write.rb +199 -0
- data/lib/yapstone-so/models/profile_resource.rb +422 -0
- data/lib/yapstone-so/models/property_history_resource.rb +245 -0
- data/lib/yapstone-so/models/property_info_resource.rb +229 -0
- data/lib/yapstone-so/models/property_owner_resource.rb +341 -0
- data/lib/yapstone-so/models/property_resource.rb +315 -0
- data/lib/yapstone-so/models/property_tracker_resource.rb +228 -0
- data/lib/yapstone-so/models/registration_resource.rb +253 -0
- data/lib/yapstone-so/models/reservation_setting_resource.rb +206 -0
- data/lib/yapstone-so/models/resource.rb +198 -0
- data/lib/yapstone-so/models/social_network_resource.rb +291 -0
- data/lib/yapstone-so/models/status_reason_resource.rb +267 -0
- data/lib/yapstone-so/models/status_request.rb +232 -0
- data/lib/yapstone-so/models/status_resource.rb +259 -0
- data/lib/yapstone-so/models/stay_setting_resource.rb +208 -0
- data/lib/yapstone-so/models/suspension_reason_resource.rb +198 -0
- data/lib/yapstone-so/models/traveler_resource.rb +278 -0
- data/lib/yapstone-so/version.rb +15 -0
- data/lib/yapstone-so.rb +174 -0
- data/spec/api/assets_api_spec.rb +93 -0
- data/spec/api/authentication_api_spec.rb +48 -0
- data/spec/api/business_applicants_api_spec.rb +93 -0
- data/spec/api/contracts_api_spec.rb +84 -0
- data/spec/api/individual_applicants_api_spec.rb +93 -0
- data/spec/api/instruments_api_spec.rb +92 -0
- data/spec/api/marketplace_products_api_spec.rb +60 -0
- data/spec/api/marketplaces_api_spec.rb +85 -0
- data/spec/api/payout_instruments_api_spec.rb +92 -0
- data/spec/api/payout_products_api_spec.rb +47 -0
- data/spec/api/payouts_api_spec.rb +85 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/abstract_entity_spec.rb +41 -0
- data/spec/models/action_resource_spec.rb +65 -0
- data/spec/models/action_status_resource_spec.rb +57 -0
- data/spec/models/address_resource_spec.rb +83 -0
- data/spec/models/applicant_consent_request_spec.rb +65 -0
- data/spec/models/applicant_consent_resource_spec.rb +71 -0
- data/spec/models/applicant_consent_type_spec.rb +35 -0
- data/spec/models/applicant_resource_spec.rb +107 -0
- data/spec/models/asset_request_all_of_spec.rb +41 -0
- data/spec/models/asset_request_common_spec.rb +63 -0
- data/spec/models/asset_request_spec.rb +69 -0
- data/spec/models/asset_resource_all_of_spec.rb +47 -0
- data/spec/models/asset_resource_spec.rb +81 -0
- data/spec/models/asset_update_request_all_of_spec.rb +47 -0
- data/spec/models/asset_update_request_spec.rb +75 -0
- data/spec/models/assets_resource_all_of_spec.rb +41 -0
- data/spec/models/assets_resource_spec.rb +47 -0
- data/spec/models/bank_account_data_resource_spec.rb +59 -0
- data/spec/models/bank_account_resource_spec.rb +69 -0
- data/spec/models/beneficial_owner_request_spec.rb +71 -0
- data/spec/models/beneficial_owner_resource_spec.rb +83 -0
- data/spec/models/beneficial_owners_patch_spec.rb +53 -0
- data/spec/models/business_applicant_admin_fields_resource_spec.rb +41 -0
- data/spec/models/business_applicant_admin_resource_spec.rb +137 -0
- data/spec/models/business_applicant_request_spec.rb +107 -0
- data/spec/models/business_applicant_resource_all_of_spec.rb +59 -0
- data/spec/models/business_applicant_resource_spec.rb +59 -0
- data/spec/models/business_applicant_update_request_spec.rb +113 -0
- data/spec/models/business_applicants_resource_all_of_spec.rb +41 -0
- data/spec/models/business_applicants_resource_spec.rb +47 -0
- data/spec/models/business_id_type_spec.rb +35 -0
- data/spec/models/business_identification_resource_spec.rb +65 -0
- data/spec/models/business_owner_resource_spec.rb +41 -0
- data/spec/models/business_profile_resource_spec.rb +93 -0
- data/spec/models/business_update_identification_resource_spec.rb +65 -0
- data/spec/models/capability_resource_spec.rb +51 -0
- data/spec/models/card_data_resource_spec.rb +107 -0
- data/spec/models/consent_request_spec.rb +65 -0
- data/spec/models/consent_resource_spec.rb +71 -0
- data/spec/models/consent_spec.rb +69 -0
- data/spec/models/consent_type_spec.rb +35 -0
- data/spec/models/contract_create_request_spec.rb +53 -0
- data/spec/models/contract_resource_dto_all_of_spec.rb +41 -0
- data/spec/models/contract_resource_dto_spec.rb +41 -0
- data/spec/models/contract_resource_spec.rb +59 -0
- data/spec/models/contract_update_request_spec.rb +47 -0
- data/spec/models/customer_history_resource_spec.rb +47 -0
- data/spec/models/deactivate_request_spec.rb +47 -0
- data/spec/models/deactivate_response_spec.rb +53 -0
- data/spec/models/direct_debit_consent_resource_spec.rb +51 -0
- data/spec/models/direct_debit_frequency_type_spec.rb +35 -0
- data/spec/models/direct_debit_scheme_type_spec.rb +35 -0
- data/spec/models/direct_debt_capability_resource_spec.rb +67 -0
- data/spec/models/entities_resource_spec.rb +41 -0
- data/spec/models/entity_history_resource_spec.rb +41 -0
- data/spec/models/entity_product_status_resource_spec.rb +47 -0
- data/spec/models/entity_update_event_spec.rb +59 -0
- data/spec/models/entity_updated_attribute_spec.rb +53 -0
- data/spec/models/errors_spec.rb +47 -0
- data/spec/models/expiration_date_resource_spec.rb +47 -0
- data/spec/models/gender_spec.rb +35 -0
- data/spec/models/gov_identification_resource_spec.rb +77 -0
- data/spec/models/gov_identification_update_resource_spec.rb +77 -0
- data/spec/models/government_id_type_spec.rb +35 -0
- data/spec/models/individual_applicant_admin_fields_resource_spec.rb +41 -0
- data/spec/models/individual_applicant_admin_resource_spec.rb +119 -0
- data/spec/models/individual_applicant_request_spec.rb +89 -0
- data/spec/models/individual_applicant_resource_spec.rb +41 -0
- data/spec/models/individual_applicant_update_request_spec.rb +95 -0
- data/spec/models/individual_applicants_resource_all_of_spec.rb +41 -0
- data/spec/models/individual_applicants_resource_spec.rb +47 -0
- data/spec/models/individual_owner_resource_spec.rb +47 -0
- data/spec/models/inline_response200_spec.rb +65 -0
- data/spec/models/issuer_scope_spec.rb +35 -0
- data/spec/models/market_place_applicant_resource_spec.rb +41 -0
- data/spec/models/market_place_property_resource_spec.rb +71 -0
- data/spec/models/marketplace_product_add_spec.rb +75 -0
- data/spec/models/marketplace_product_basic_spec.rb +63 -0
- data/spec/models/marketplace_product_extra_all_of_spec.rb +69 -0
- data/spec/models/marketplace_product_extra_spec.rb +97 -0
- data/spec/models/marketplace_product_payout_instrument_resource_spec.rb +47 -0
- data/spec/models/marketplace_product_payout_instrument_update_spec.rb +53 -0
- data/spec/models/marketplace_product_resource_spec.rb +115 -0
- data/spec/models/marketplace_product_sub_resource_spec.rb +109 -0
- data/spec/models/marketplace_product_update_spec.rb +109 -0
- data/spec/models/meta_spec.rb +53 -0
- data/spec/models/money_resource_spec.rb +47 -0
- data/spec/models/name_resource_spec.rb +75 -0
- data/spec/models/owner_request_spec.rb +53 -0
- data/spec/models/owner_resource_spec.rb +59 -0
- data/spec/models/pagination_spec.rb +53 -0
- data/spec/models/patch_operation_spec.rb +35 -0
- data/spec/models/payout_instrument_request_spec.rb +81 -0
- data/spec/models/payout_instrument_resource_common_entities_spec.rb +63 -0
- data/spec/models/payout_instrument_resource_spec.rb +99 -0
- data/spec/models/payout_instrument_update_request_spec.rb +87 -0
- data/spec/models/payout_instruments_resource_all_of_spec.rb +41 -0
- data/spec/models/payout_instruments_resource_spec.rb +47 -0
- data/spec/models/payout_product_add_spec.rb +47 -0
- data/spec/models/payout_product_resource_spec.rb +71 -0
- data/spec/models/payout_product_sub_resource_all_of_spec.rb +59 -0
- data/spec/models/payout_product_sub_resource_spec.rb +65 -0
- data/spec/models/phone_resource_spec.rb +47 -0
- data/spec/models/price_setting_resource_spec.rb +85 -0
- data/spec/models/primary_contact_resource_spec.rb +95 -0
- data/spec/models/product_read_spec.rb +41 -0
- data/spec/models/product_spec.rb +35 -0
- data/spec/models/product_write_spec.rb +41 -0
- data/spec/models/profile_resource_spec.rb +95 -0
- data/spec/models/property_history_resource_spec.rb +71 -0
- data/spec/models/property_info_resource_spec.rb +59 -0
- data/spec/models/property_owner_resource_spec.rb +83 -0
- data/spec/models/property_resource_spec.rb +71 -0
- data/spec/models/property_tracker_resource_spec.rb +59 -0
- data/spec/models/registration_resource_spec.rb +53 -0
- data/spec/models/reservation_setting_resource_spec.rb +47 -0
- data/spec/models/resource_spec.rb +41 -0
- data/spec/models/social_network_resource_spec.rb +51 -0
- data/spec/models/status_reason_resource_spec.rb +63 -0
- data/spec/models/status_request_spec.rb +45 -0
- data/spec/models/status_resource_spec.rb +57 -0
- data/spec/models/stay_setting_resource_spec.rb +47 -0
- data/spec/models/suspension_reason_resource_spec.rb +41 -0
- data/spec/models/traveler_resource_spec.rb +59 -0
- data/spec/spec_helper.rb +111 -0
- data/yapstone-so.gemspec +45 -0
- metadata +781 -0
@@ -0,0 +1,391 @@
|
|
1
|
+
=begin
|
2
|
+
#Yapstone Staged On-Boarding Services
|
3
|
+
|
4
|
+
#Set of API's that allow clients to onboard with Yapstone.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Yapstone
|
16
|
+
# The Applicant resource contains information about the person.
|
17
|
+
class ApplicantResource
|
18
|
+
# The resource identifier for the applicant.
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
attr_accessor :status
|
22
|
+
|
23
|
+
attr_accessor :type
|
24
|
+
|
25
|
+
# The partners externalId id for the Applicant.
|
26
|
+
attr_accessor :external_id
|
27
|
+
|
28
|
+
attr_accessor :mkt_place_applicant
|
29
|
+
|
30
|
+
# A list of social networks the applicant belongs to.
|
31
|
+
attr_accessor :social_networks
|
32
|
+
|
33
|
+
# supported language
|
34
|
+
attr_accessor :language
|
35
|
+
|
36
|
+
# brand id
|
37
|
+
attr_accessor :brand
|
38
|
+
|
39
|
+
attr_accessor :consents
|
40
|
+
|
41
|
+
# The reportingTag for the applicant.
|
42
|
+
attr_accessor :reporting_tag
|
43
|
+
|
44
|
+
# At the time of creation, value is defaulted to False.
|
45
|
+
attr_accessor :no_post_booking
|
46
|
+
|
47
|
+
# Products requested by marketplace.
|
48
|
+
attr_accessor :products
|
49
|
+
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
51
|
+
def self.attribute_map
|
52
|
+
{
|
53
|
+
:'id' => :'id',
|
54
|
+
:'status' => :'status',
|
55
|
+
:'type' => :'type',
|
56
|
+
:'external_id' => :'externalId',
|
57
|
+
:'mkt_place_applicant' => :'mktPlaceApplicant',
|
58
|
+
:'social_networks' => :'socialNetworks',
|
59
|
+
:'language' => :'language',
|
60
|
+
:'brand' => :'brand',
|
61
|
+
:'consents' => :'consents',
|
62
|
+
:'reporting_tag' => :'reportingTag',
|
63
|
+
:'no_post_booking' => :'noPostBooking',
|
64
|
+
:'products' => :'products'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.openapi_types
|
70
|
+
{
|
71
|
+
:'id' => :'String',
|
72
|
+
:'status' => :'EntityProductStatusResource',
|
73
|
+
:'type' => :'String',
|
74
|
+
:'external_id' => :'String',
|
75
|
+
:'mkt_place_applicant' => :'MarketPlaceApplicantResource',
|
76
|
+
:'social_networks' => :'Array<SocialNetworkResource>',
|
77
|
+
:'language' => :'String',
|
78
|
+
:'brand' => :'String',
|
79
|
+
:'consents' => :'Array<ApplicantConsentResource>',
|
80
|
+
:'reporting_tag' => :'String',
|
81
|
+
:'no_post_booking' => :'Boolean',
|
82
|
+
:'products' => :'Array<Product>'
|
83
|
+
}
|
84
|
+
end
|
85
|
+
|
86
|
+
# discriminator's property name in OpenAPI v3
|
87
|
+
def self.openapi_discriminator_name
|
88
|
+
:'type'
|
89
|
+
end
|
90
|
+
|
91
|
+
# Initializes the object
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
+
def initialize(attributes = {})
|
94
|
+
if (!attributes.is_a?(Hash))
|
95
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Yapstone::ApplicantResource` initialize method"
|
96
|
+
end
|
97
|
+
|
98
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
99
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
100
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
101
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Yapstone::ApplicantResource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
102
|
+
end
|
103
|
+
h[k.to_sym] = v
|
104
|
+
}
|
105
|
+
|
106
|
+
if attributes.key?(:'id')
|
107
|
+
self.id = attributes[:'id']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'status')
|
111
|
+
self.status = attributes[:'status']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'type')
|
115
|
+
self.type = attributes[:'type']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'external_id')
|
119
|
+
self.external_id = attributes[:'external_id']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'mkt_place_applicant')
|
123
|
+
self.mkt_place_applicant = attributes[:'mkt_place_applicant']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'social_networks')
|
127
|
+
if (value = attributes[:'social_networks']).is_a?(Array)
|
128
|
+
self.social_networks = value
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'language')
|
133
|
+
self.language = attributes[:'language']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'brand')
|
137
|
+
self.brand = attributes[:'brand']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'consents')
|
141
|
+
if (value = attributes[:'consents']).is_a?(Array)
|
142
|
+
self.consents = value
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.key?(:'reporting_tag')
|
147
|
+
self.reporting_tag = attributes[:'reporting_tag']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.key?(:'no_post_booking')
|
151
|
+
self.no_post_booking = attributes[:'no_post_booking']
|
152
|
+
else
|
153
|
+
self.no_post_booking = false
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'products')
|
157
|
+
if (value = attributes[:'products']).is_a?(Array)
|
158
|
+
self.products = value
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
164
|
+
# @return Array for valid properties with the reasons
|
165
|
+
def list_invalid_properties
|
166
|
+
invalid_properties = Array.new
|
167
|
+
if @type.nil?
|
168
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
169
|
+
end
|
170
|
+
|
171
|
+
if !@external_id.nil? && @external_id.to_s.length > 255
|
172
|
+
invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 255.')
|
173
|
+
end
|
174
|
+
|
175
|
+
if !@external_id.nil? && @external_id.to_s.length < 1
|
176
|
+
invalid_properties.push('invalid value for "external_id", the character length must be great than or equal to 1.')
|
177
|
+
end
|
178
|
+
|
179
|
+
pattern = Regexp.new(/.*[^\s].*/)
|
180
|
+
if !@external_id.nil? && @external_id !~ pattern
|
181
|
+
invalid_properties.push("invalid value for \"external_id\", must conform to the pattern #{pattern}.")
|
182
|
+
end
|
183
|
+
|
184
|
+
if @language.nil?
|
185
|
+
invalid_properties.push('invalid value for "language", language cannot be nil.')
|
186
|
+
end
|
187
|
+
|
188
|
+
if @brand.nil?
|
189
|
+
invalid_properties.push('invalid value for "brand", brand cannot be nil.')
|
190
|
+
end
|
191
|
+
|
192
|
+
if !@reporting_tag.nil? && @reporting_tag.to_s.length > 100
|
193
|
+
invalid_properties.push('invalid value for "reporting_tag", the character length must be smaller than or equal to 100.')
|
194
|
+
end
|
195
|
+
|
196
|
+
if !@reporting_tag.nil? && @reporting_tag.to_s.length < 2
|
197
|
+
invalid_properties.push('invalid value for "reporting_tag", the character length must be great than or equal to 2.')
|
198
|
+
end
|
199
|
+
|
200
|
+
invalid_properties
|
201
|
+
end
|
202
|
+
|
203
|
+
# Check to see if the all the properties in the model are valid
|
204
|
+
# @return true if the model is valid
|
205
|
+
def valid?
|
206
|
+
return false if @type.nil?
|
207
|
+
return false if !@external_id.nil? && @external_id.to_s.length > 255
|
208
|
+
return false if !@external_id.nil? && @external_id.to_s.length < 1
|
209
|
+
return false if !@external_id.nil? && @external_id !~ Regexp.new(/.*[^\s].*/)
|
210
|
+
return false if @language.nil?
|
211
|
+
return false if @brand.nil?
|
212
|
+
return false if !@reporting_tag.nil? && @reporting_tag.to_s.length > 100
|
213
|
+
return false if !@reporting_tag.nil? && @reporting_tag.to_s.length < 2
|
214
|
+
true
|
215
|
+
end
|
216
|
+
|
217
|
+
# Custom attribute writer method with validation
|
218
|
+
# @param [Object] external_id Value to be assigned
|
219
|
+
def external_id=(external_id)
|
220
|
+
if !external_id.nil? && external_id.to_s.length > 255
|
221
|
+
fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 255.'
|
222
|
+
end
|
223
|
+
|
224
|
+
if !external_id.nil? && external_id.to_s.length < 1
|
225
|
+
fail ArgumentError, 'invalid value for "external_id", the character length must be great than or equal to 1.'
|
226
|
+
end
|
227
|
+
|
228
|
+
pattern = Regexp.new(/.*[^\s].*/)
|
229
|
+
if !external_id.nil? && external_id !~ pattern
|
230
|
+
fail ArgumentError, "invalid value for \"external_id\", must conform to the pattern #{pattern}."
|
231
|
+
end
|
232
|
+
|
233
|
+
@external_id = external_id
|
234
|
+
end
|
235
|
+
|
236
|
+
# Custom attribute writer method with validation
|
237
|
+
# @param [Object] reporting_tag Value to be assigned
|
238
|
+
def reporting_tag=(reporting_tag)
|
239
|
+
if !reporting_tag.nil? && reporting_tag.to_s.length > 100
|
240
|
+
fail ArgumentError, 'invalid value for "reporting_tag", the character length must be smaller than or equal to 100.'
|
241
|
+
end
|
242
|
+
|
243
|
+
if !reporting_tag.nil? && reporting_tag.to_s.length < 2
|
244
|
+
fail ArgumentError, 'invalid value for "reporting_tag", the character length must be great than or equal to 2.'
|
245
|
+
end
|
246
|
+
|
247
|
+
@reporting_tag = reporting_tag
|
248
|
+
end
|
249
|
+
|
250
|
+
# Checks equality by comparing each attribute.
|
251
|
+
# @param [Object] Object to be compared
|
252
|
+
def ==(o)
|
253
|
+
return true if self.equal?(o)
|
254
|
+
self.class == o.class &&
|
255
|
+
id == o.id &&
|
256
|
+
status == o.status &&
|
257
|
+
type == o.type &&
|
258
|
+
external_id == o.external_id &&
|
259
|
+
mkt_place_applicant == o.mkt_place_applicant &&
|
260
|
+
social_networks == o.social_networks &&
|
261
|
+
language == o.language &&
|
262
|
+
brand == o.brand &&
|
263
|
+
consents == o.consents &&
|
264
|
+
reporting_tag == o.reporting_tag &&
|
265
|
+
no_post_booking == o.no_post_booking &&
|
266
|
+
products == o.products
|
267
|
+
end
|
268
|
+
|
269
|
+
# @see the `==` method
|
270
|
+
# @param [Object] Object to be compared
|
271
|
+
def eql?(o)
|
272
|
+
self == o
|
273
|
+
end
|
274
|
+
|
275
|
+
# Calculates hash code according to all attributes.
|
276
|
+
# @return [Integer] Hash code
|
277
|
+
def hash
|
278
|
+
[id, status, type, external_id, mkt_place_applicant, social_networks, language, brand, consents, reporting_tag, no_post_booking, products].hash
|
279
|
+
end
|
280
|
+
|
281
|
+
# Builds the object from hash
|
282
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
283
|
+
# @return [Object] Returns the model itself
|
284
|
+
def self.build_from_hash(attributes)
|
285
|
+
new.build_from_hash(attributes)
|
286
|
+
end
|
287
|
+
|
288
|
+
# Builds the object from hash
|
289
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
290
|
+
# @return [Object] Returns the model itself
|
291
|
+
def build_from_hash(attributes)
|
292
|
+
return nil unless attributes.is_a?(Hash)
|
293
|
+
self.class.openapi_types.each_pair do |key, type|
|
294
|
+
if type =~ /\AArray<(.*)>/i
|
295
|
+
# check to ensure the input is an array given that the attribute
|
296
|
+
# is documented as an array but the input is not
|
297
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
298
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
299
|
+
end
|
300
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
301
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
302
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
303
|
+
end
|
304
|
+
|
305
|
+
self
|
306
|
+
end
|
307
|
+
|
308
|
+
# Deserializes the data based on type
|
309
|
+
# @param string type Data type
|
310
|
+
# @param string value Value to be deserialized
|
311
|
+
# @return [Object] Deserialized data
|
312
|
+
def _deserialize(type, value)
|
313
|
+
case type.to_sym
|
314
|
+
when :DateTime
|
315
|
+
DateTime.parse(value)
|
316
|
+
when :Date
|
317
|
+
Date.parse(value)
|
318
|
+
when :String
|
319
|
+
value.to_s
|
320
|
+
when :Integer
|
321
|
+
value.to_i
|
322
|
+
when :Float
|
323
|
+
value.to_f
|
324
|
+
when :Boolean
|
325
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
326
|
+
true
|
327
|
+
else
|
328
|
+
false
|
329
|
+
end
|
330
|
+
when :Object
|
331
|
+
# generic object (usually a Hash), return directly
|
332
|
+
value
|
333
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
334
|
+
inner_type = Regexp.last_match[:inner_type]
|
335
|
+
value.map { |v| _deserialize(inner_type, v) }
|
336
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
337
|
+
k_type = Regexp.last_match[:k_type]
|
338
|
+
v_type = Regexp.last_match[:v_type]
|
339
|
+
{}.tap do |hash|
|
340
|
+
value.each do |k, v|
|
341
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
342
|
+
end
|
343
|
+
end
|
344
|
+
else # model
|
345
|
+
Yapstone.const_get(type).build_from_hash(value)
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
# Returns the string representation of the object
|
350
|
+
# @return [String] String presentation of the object
|
351
|
+
def to_s
|
352
|
+
to_hash.to_s
|
353
|
+
end
|
354
|
+
|
355
|
+
# to_body is an alias to to_hash (backward compatibility)
|
356
|
+
# @return [Hash] Returns the object in the form of hash
|
357
|
+
def to_body
|
358
|
+
to_hash
|
359
|
+
end
|
360
|
+
|
361
|
+
# Returns the object in the form of hash
|
362
|
+
# @return [Hash] Returns the object in the form of hash
|
363
|
+
def to_hash
|
364
|
+
hash = {}
|
365
|
+
self.class.attribute_map.each_pair do |attr, param|
|
366
|
+
value = self.send(attr)
|
367
|
+
next if value.nil?
|
368
|
+
hash[param] = _to_hash(value)
|
369
|
+
end
|
370
|
+
hash
|
371
|
+
end
|
372
|
+
|
373
|
+
# Outputs non-array value in the form of hash
|
374
|
+
# For object, use to_hash. Otherwise, just return the value
|
375
|
+
# @param [Object] value Any valid value
|
376
|
+
# @return [Hash] Returns the value in the form of hash
|
377
|
+
def _to_hash(value)
|
378
|
+
if value.is_a?(Array)
|
379
|
+
value.compact.map { |v| _to_hash(v) }
|
380
|
+
elsif value.is_a?(Hash)
|
381
|
+
{}.tap do |hash|
|
382
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
383
|
+
end
|
384
|
+
elsif value.respond_to? :to_hash
|
385
|
+
value.to_hash
|
386
|
+
else
|
387
|
+
value
|
388
|
+
end
|
389
|
+
end
|
390
|
+
end
|
391
|
+
end
|
@@ -0,0 +1,325 @@
|
|
1
|
+
=begin
|
2
|
+
#Yapstone Staged On-Boarding Services
|
3
|
+
|
4
|
+
#Set of API's that allow clients to onboard with Yapstone.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Yapstone
|
16
|
+
# The Internal Asset request.
|
17
|
+
class AssetRequest
|
18
|
+
attr_accessor :owner
|
19
|
+
|
20
|
+
# The type of asset [PROPERTY]
|
21
|
+
attr_accessor :type
|
22
|
+
|
23
|
+
# The partners externalId id for the Asset.
|
24
|
+
attr_accessor :external_id
|
25
|
+
|
26
|
+
attr_accessor :property
|
27
|
+
|
28
|
+
# Products requested by marketplace.
|
29
|
+
attr_accessor :products
|
30
|
+
|
31
|
+
class EnumAttributeValidator
|
32
|
+
attr_reader :datatype
|
33
|
+
attr_reader :allowable_values
|
34
|
+
|
35
|
+
def initialize(datatype, allowable_values)
|
36
|
+
@allowable_values = allowable_values.map do |value|
|
37
|
+
case datatype.to_s
|
38
|
+
when /Integer/i
|
39
|
+
value.to_i
|
40
|
+
when /Float/i
|
41
|
+
value.to_f
|
42
|
+
else
|
43
|
+
value
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def valid?(value)
|
49
|
+
!value || allowable_values.include?(value)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
54
|
+
def self.attribute_map
|
55
|
+
{
|
56
|
+
:'owner' => :'owner',
|
57
|
+
:'type' => :'type',
|
58
|
+
:'external_id' => :'externalId',
|
59
|
+
:'property' => :'property',
|
60
|
+
:'products' => :'products'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.openapi_types
|
66
|
+
{
|
67
|
+
:'owner' => :'IndividualOwnerResource',
|
68
|
+
:'type' => :'String',
|
69
|
+
:'external_id' => :'String',
|
70
|
+
:'property' => :'PropertyResource',
|
71
|
+
:'products' => :'Array<Product>'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# List of class defined in allOf (OpenAPI v3)
|
76
|
+
def self.openapi_all_of
|
77
|
+
[
|
78
|
+
:'AssetRequestAllOf',
|
79
|
+
:'AssetRequestCommon'
|
80
|
+
]
|
81
|
+
end
|
82
|
+
|
83
|
+
# Initializes the object
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
85
|
+
def initialize(attributes = {})
|
86
|
+
if (!attributes.is_a?(Hash))
|
87
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Yapstone::AssetRequest` initialize method"
|
88
|
+
end
|
89
|
+
|
90
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
92
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Yapstone::AssetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
94
|
+
end
|
95
|
+
h[k.to_sym] = v
|
96
|
+
}
|
97
|
+
|
98
|
+
if attributes.key?(:'owner')
|
99
|
+
self.owner = attributes[:'owner']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'type')
|
103
|
+
self.type = attributes[:'type']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'external_id')
|
107
|
+
self.external_id = attributes[:'external_id']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'property')
|
111
|
+
self.property = attributes[:'property']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'products')
|
115
|
+
if (value = attributes[:'products']).is_a?(Array)
|
116
|
+
self.products = value
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
122
|
+
# @return Array for valid properties with the reasons
|
123
|
+
def list_invalid_properties
|
124
|
+
invalid_properties = Array.new
|
125
|
+
if @type.nil?
|
126
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
127
|
+
end
|
128
|
+
|
129
|
+
if !@external_id.nil? && @external_id.to_s.length > 255
|
130
|
+
invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 255.')
|
131
|
+
end
|
132
|
+
|
133
|
+
if !@external_id.nil? && @external_id.to_s.length < 1
|
134
|
+
invalid_properties.push('invalid value for "external_id", the character length must be great than or equal to 1.')
|
135
|
+
end
|
136
|
+
|
137
|
+
pattern = Regexp.new(/.*[^\s].*/)
|
138
|
+
if !@external_id.nil? && @external_id !~ pattern
|
139
|
+
invalid_properties.push("invalid value for \"external_id\", must conform to the pattern #{pattern}.")
|
140
|
+
end
|
141
|
+
|
142
|
+
if @property.nil?
|
143
|
+
invalid_properties.push('invalid value for "property", property cannot be nil.')
|
144
|
+
end
|
145
|
+
|
146
|
+
invalid_properties
|
147
|
+
end
|
148
|
+
|
149
|
+
# Check to see if the all the properties in the model are valid
|
150
|
+
# @return true if the model is valid
|
151
|
+
def valid?
|
152
|
+
return false if @type.nil?
|
153
|
+
type_validator = EnumAttributeValidator.new('String', ["PROPERTY"])
|
154
|
+
return false unless type_validator.valid?(@type)
|
155
|
+
return false if !@external_id.nil? && @external_id.to_s.length > 255
|
156
|
+
return false if !@external_id.nil? && @external_id.to_s.length < 1
|
157
|
+
return false if !@external_id.nil? && @external_id !~ Regexp.new(/.*[^\s].*/)
|
158
|
+
return false if @property.nil?
|
159
|
+
true
|
160
|
+
end
|
161
|
+
|
162
|
+
# Custom attribute writer method checking allowed values (enum).
|
163
|
+
# @param [Object] type Object to be assigned
|
164
|
+
def type=(type)
|
165
|
+
validator = EnumAttributeValidator.new('String', ["PROPERTY"])
|
166
|
+
unless validator.valid?(type)
|
167
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
168
|
+
end
|
169
|
+
@type = type
|
170
|
+
end
|
171
|
+
|
172
|
+
# Custom attribute writer method with validation
|
173
|
+
# @param [Object] external_id Value to be assigned
|
174
|
+
def external_id=(external_id)
|
175
|
+
if !external_id.nil? && external_id.to_s.length > 255
|
176
|
+
fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 255.'
|
177
|
+
end
|
178
|
+
|
179
|
+
if !external_id.nil? && external_id.to_s.length < 1
|
180
|
+
fail ArgumentError, 'invalid value for "external_id", the character length must be great than or equal to 1.'
|
181
|
+
end
|
182
|
+
|
183
|
+
pattern = Regexp.new(/.*[^\s].*/)
|
184
|
+
if !external_id.nil? && external_id !~ pattern
|
185
|
+
fail ArgumentError, "invalid value for \"external_id\", must conform to the pattern #{pattern}."
|
186
|
+
end
|
187
|
+
|
188
|
+
@external_id = external_id
|
189
|
+
end
|
190
|
+
|
191
|
+
# Checks equality by comparing each attribute.
|
192
|
+
# @param [Object] Object to be compared
|
193
|
+
def ==(o)
|
194
|
+
return true if self.equal?(o)
|
195
|
+
self.class == o.class &&
|
196
|
+
owner == o.owner &&
|
197
|
+
type == o.type &&
|
198
|
+
external_id == o.external_id &&
|
199
|
+
property == o.property &&
|
200
|
+
products == o.products
|
201
|
+
end
|
202
|
+
|
203
|
+
# @see the `==` method
|
204
|
+
# @param [Object] Object to be compared
|
205
|
+
def eql?(o)
|
206
|
+
self == o
|
207
|
+
end
|
208
|
+
|
209
|
+
# Calculates hash code according to all attributes.
|
210
|
+
# @return [Integer] Hash code
|
211
|
+
def hash
|
212
|
+
[owner, type, external_id, property, products].hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Builds the object from hash
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
217
|
+
# @return [Object] Returns the model itself
|
218
|
+
def self.build_from_hash(attributes)
|
219
|
+
new.build_from_hash(attributes)
|
220
|
+
end
|
221
|
+
|
222
|
+
# Builds the object from hash
|
223
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
224
|
+
# @return [Object] Returns the model itself
|
225
|
+
def build_from_hash(attributes)
|
226
|
+
return nil unless attributes.is_a?(Hash)
|
227
|
+
self.class.openapi_types.each_pair do |key, type|
|
228
|
+
if type =~ /\AArray<(.*)>/i
|
229
|
+
# check to ensure the input is an array given that the attribute
|
230
|
+
# is documented as an array but the input is not
|
231
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
232
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
233
|
+
end
|
234
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
235
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
236
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
237
|
+
end
|
238
|
+
|
239
|
+
self
|
240
|
+
end
|
241
|
+
|
242
|
+
# Deserializes the data based on type
|
243
|
+
# @param string type Data type
|
244
|
+
# @param string value Value to be deserialized
|
245
|
+
# @return [Object] Deserialized data
|
246
|
+
def _deserialize(type, value)
|
247
|
+
case type.to_sym
|
248
|
+
when :DateTime
|
249
|
+
DateTime.parse(value)
|
250
|
+
when :Date
|
251
|
+
Date.parse(value)
|
252
|
+
when :String
|
253
|
+
value.to_s
|
254
|
+
when :Integer
|
255
|
+
value.to_i
|
256
|
+
when :Float
|
257
|
+
value.to_f
|
258
|
+
when :Boolean
|
259
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
260
|
+
true
|
261
|
+
else
|
262
|
+
false
|
263
|
+
end
|
264
|
+
when :Object
|
265
|
+
# generic object (usually a Hash), return directly
|
266
|
+
value
|
267
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
268
|
+
inner_type = Regexp.last_match[:inner_type]
|
269
|
+
value.map { |v| _deserialize(inner_type, v) }
|
270
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
271
|
+
k_type = Regexp.last_match[:k_type]
|
272
|
+
v_type = Regexp.last_match[:v_type]
|
273
|
+
{}.tap do |hash|
|
274
|
+
value.each do |k, v|
|
275
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
276
|
+
end
|
277
|
+
end
|
278
|
+
else # model
|
279
|
+
Yapstone.const_get(type).build_from_hash(value)
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
# Returns the string representation of the object
|
284
|
+
# @return [String] String presentation of the object
|
285
|
+
def to_s
|
286
|
+
to_hash.to_s
|
287
|
+
end
|
288
|
+
|
289
|
+
# to_body is an alias to to_hash (backward compatibility)
|
290
|
+
# @return [Hash] Returns the object in the form of hash
|
291
|
+
def to_body
|
292
|
+
to_hash
|
293
|
+
end
|
294
|
+
|
295
|
+
# Returns the object in the form of hash
|
296
|
+
# @return [Hash] Returns the object in the form of hash
|
297
|
+
def to_hash
|
298
|
+
hash = {}
|
299
|
+
self.class.attribute_map.each_pair do |attr, param|
|
300
|
+
value = self.send(attr)
|
301
|
+
next if value.nil?
|
302
|
+
hash[param] = _to_hash(value)
|
303
|
+
end
|
304
|
+
hash
|
305
|
+
end
|
306
|
+
|
307
|
+
# Outputs non-array value in the form of hash
|
308
|
+
# For object, use to_hash. Otherwise, just return the value
|
309
|
+
# @param [Object] value Any valid value
|
310
|
+
# @return [Hash] Returns the value in the form of hash
|
311
|
+
def _to_hash(value)
|
312
|
+
if value.is_a?(Array)
|
313
|
+
value.compact.map { |v| _to_hash(v) }
|
314
|
+
elsif value.is_a?(Hash)
|
315
|
+
{}.tap do |hash|
|
316
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
317
|
+
end
|
318
|
+
elsif value.respond_to? :to_hash
|
319
|
+
value.to_hash
|
320
|
+
else
|
321
|
+
value
|
322
|
+
end
|
323
|
+
end
|
324
|
+
end
|
325
|
+
end
|