yapstone-so 1.0.0

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