yapstone-payments 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (310) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +203 -0
  5. data/Rakefile +10 -0
  6. data/docs/APM.md +29 -0
  7. data/docs/APMSpecInParameters.md +19 -0
  8. data/docs/Action.md +16 -0
  9. data/docs/Address.md +29 -0
  10. data/docs/Amount.md +21 -0
  11. data/docs/AuthResponse.md +19 -0
  12. data/docs/AuthTokenRequest.md +19 -0
  13. data/docs/AuthTokenResponse.md +17 -0
  14. data/docs/AuthenticationApi.md +58 -0
  15. data/docs/BankAccount.md +37 -0
  16. data/docs/BillingAddress.md +29 -0
  17. data/docs/BookingInfo.md +31 -0
  18. data/docs/CapturePaymentRequest.md +21 -0
  19. data/docs/Card.md +27 -0
  20. data/docs/CardResponse.md +21 -0
  21. data/docs/Consent.md +21 -0
  22. data/docs/CreditCardAuthResponse.md +25 -0
  23. data/docs/Customer.md +29 -0
  24. data/docs/CustomerData.md +19 -0
  25. data/docs/CustomerDetails.md +23 -0
  26. data/docs/Deposit.md +23 -0
  27. data/docs/DepositDetails.md +17 -0
  28. data/docs/DisburseLineItemsReq.md +19 -0
  29. data/docs/DisburseTransaction.md +19 -0
  30. data/docs/DisburseTransactionReq.md +17 -0
  31. data/docs/Disbursement.md +17 -0
  32. data/docs/DisbursementAllOf.md +17 -0
  33. data/docs/DisbursementDetails.md +17 -0
  34. data/docs/DisbursementRequest.md +16 -0
  35. data/docs/DisbursementRequests.md +17 -0
  36. data/docs/DisbursementResponse.md +17 -0
  37. data/docs/DisbursementsApi.md +138 -0
  38. data/docs/Error.md +25 -0
  39. data/docs/ErrorResponse.md +19 -0
  40. data/docs/Fields.md +17 -0
  41. data/docs/GovIdentification.md +29 -0
  42. data/docs/Guest.md +29 -0
  43. data/docs/GuestInfoResponse.md +19 -0
  44. data/docs/Href.md +17 -0
  45. data/docs/InlineResponse200.md +25 -0
  46. data/docs/InstallmentPlan.md +19 -0
  47. data/docs/Instrument.md +21 -0
  48. data/docs/InstrumentVerificationResponse.md +31 -0
  49. data/docs/KYC.md +21 -0
  50. data/docs/LeaseInfo.md +21 -0
  51. data/docs/LineItemDetails.md +25 -0
  52. data/docs/MarketplaceData.md +23 -0
  53. data/docs/Merketplace.md +17 -0
  54. data/docs/Money.md +19 -0
  55. data/docs/Name.md +27 -0
  56. data/docs/OfferingDetails.md +21 -0
  57. data/docs/OrderTransactions.md +25 -0
  58. data/docs/Payment.md +21 -0
  59. data/docs/PaymentCancelResponse.md +23 -0
  60. data/docs/PaymentCancelTransactionResponse.md +21 -0
  61. data/docs/PaymentDetails.md +29 -0
  62. data/docs/PaymentInstrument.md +27 -0
  63. data/docs/PaymentInstrumentCard.md +19 -0
  64. data/docs/PaymentInstrumentResponse.md +19 -0
  65. data/docs/PaymentPayment.md +27 -0
  66. data/docs/PaymentPaymentAllOf.md +27 -0
  67. data/docs/PaymentResponse.md +33 -0
  68. data/docs/PaymentsApi.md +447 -0
  69. data/docs/Phone.md +21 -0
  70. data/docs/ProcessPayment.md +29 -0
  71. data/docs/PropertyInfo.md +21 -0
  72. data/docs/PropertyInfoResponse.md +19 -0
  73. data/docs/RefundAction.md +16 -0
  74. data/docs/RefundCancelResponse.md +21 -0
  75. data/docs/RefundCancelTransactionResponse.md +19 -0
  76. data/docs/RefundRequest.md +25 -0
  77. data/docs/RefundResponse.md +29 -0
  78. data/docs/RefundStatus.md +16 -0
  79. data/docs/RefundTransactions.md +27 -0
  80. data/docs/RefundsApi.md +378 -0
  81. data/docs/RentalInfo.md +21 -0
  82. data/docs/Renter.md +29 -0
  83. data/docs/Resolution.md +17 -0
  84. data/docs/Result.md +21 -0
  85. data/docs/RiskStatus.md +17 -0
  86. data/docs/SanctionedEntities.md +19 -0
  87. data/docs/SearchApi.md +132 -0
  88. data/docs/SearchPaymentResponse.md +17 -0
  89. data/docs/StackTraceElement.md +25 -0
  90. data/docs/Status.md +16 -0
  91. data/docs/Throwable.md +21 -0
  92. data/docs/ToEntityRef.md +19 -0
  93. data/docs/Token.md +19 -0
  94. data/docs/TokenApi.md +134 -0
  95. data/docs/TokenReq.md +19 -0
  96. data/docs/TokenRequest.md +17 -0
  97. data/docs/TokenResponse.md +17 -0
  98. data/docs/Transaction.md +21 -0
  99. data/docs/TransactionResponse.md +27 -0
  100. data/docs/Triggers.md +21 -0
  101. data/docs/VacationRentalInfo.md +19 -0
  102. data/docs/VacationRentalInfoRequest.md +21 -0
  103. data/docs/VerifyInstrumentRequest.md +21 -0
  104. data/git_push.sh +55 -0
  105. data/lib/yapstone-payments.rb +137 -0
  106. data/lib/yapstone-payments/api/authentication_api.rb +92 -0
  107. data/lib/yapstone-payments/api/disbursements_api.rb +202 -0
  108. data/lib/yapstone-payments/api/payments_api.rb +598 -0
  109. data/lib/yapstone-payments/api/refunds_api.rb +507 -0
  110. data/lib/yapstone-payments/api/search_api.rb +187 -0
  111. data/lib/yapstone-payments/api/token_api.rb +182 -0
  112. data/lib/yapstone-payments/api_client.rb +386 -0
  113. data/lib/yapstone-payments/api_error.rb +57 -0
  114. data/lib/yapstone-payments/configuration.rb +249 -0
  115. data/lib/yapstone-payments/models/action.rb +39 -0
  116. data/lib/yapstone-payments/models/address.rb +258 -0
  117. data/lib/yapstone-payments/models/amount.rb +218 -0
  118. data/lib/yapstone-payments/models/apm.rb +292 -0
  119. data/lib/yapstone-payments/models/apm_spec_in_parameters.rb +208 -0
  120. data/lib/yapstone-payments/models/auth_response.rb +217 -0
  121. data/lib/yapstone-payments/models/auth_token_request.rb +205 -0
  122. data/lib/yapstone-payments/models/auth_token_response.rb +196 -0
  123. data/lib/yapstone-payments/models/bank_account.rb +347 -0
  124. data/lib/yapstone-payments/models/billing_address.rb +258 -0
  125. data/lib/yapstone-payments/models/booking_info.rb +266 -0
  126. data/lib/yapstone-payments/models/capture_payment_request.rb +252 -0
  127. data/lib/yapstone-payments/models/card.rb +247 -0
  128. data/lib/yapstone-payments/models/card_response.rb +217 -0
  129. data/lib/yapstone-payments/models/consent.rb +248 -0
  130. data/lib/yapstone-payments/models/credit_card_auth_response.rb +267 -0
  131. data/lib/yapstone-payments/models/customer.rb +256 -0
  132. data/lib/yapstone-payments/models/customer_data.rb +208 -0
  133. data/lib/yapstone-payments/models/customer_details.rb +226 -0
  134. data/lib/yapstone-payments/models/deposit.rb +228 -0
  135. data/lib/yapstone-payments/models/deposit_details.rb +199 -0
  136. data/lib/yapstone-payments/models/disburse_line_items_req.rb +208 -0
  137. data/lib/yapstone-payments/models/disburse_transaction.rb +208 -0
  138. data/lib/yapstone-payments/models/disburse_transaction_req.rb +199 -0
  139. data/lib/yapstone-payments/models/disbursement.rb +203 -0
  140. data/lib/yapstone-payments/models/disbursement_all_of.rb +197 -0
  141. data/lib/yapstone-payments/models/disbursement_details.rb +200 -0
  142. data/lib/yapstone-payments/models/disbursement_request.rb +187 -0
  143. data/lib/yapstone-payments/models/disbursement_requests.rb +198 -0
  144. data/lib/yapstone-payments/models/disbursement_response.rb +198 -0
  145. data/lib/yapstone-payments/models/error.rb +241 -0
  146. data/lib/yapstone-payments/models/error_response.rb +218 -0
  147. data/lib/yapstone-payments/models/fields.rb +196 -0
  148. data/lib/yapstone-payments/models/gov_identification.rb +292 -0
  149. data/lib/yapstone-payments/models/guest.rb +257 -0
  150. data/lib/yapstone-payments/models/guest_info_response.rb +208 -0
  151. data/lib/yapstone-payments/models/href.rb +196 -0
  152. data/lib/yapstone-payments/models/inline_response200.rb +232 -0
  153. data/lib/yapstone-payments/models/installment_plan.rb +208 -0
  154. data/lib/yapstone-payments/models/instrument.rb +250 -0
  155. data/lib/yapstone-payments/models/instrument_verification_response.rb +260 -0
  156. data/lib/yapstone-payments/models/kyc.rb +215 -0
  157. data/lib/yapstone-payments/models/lease_info.rb +218 -0
  158. data/lib/yapstone-payments/models/line_item_details.rb +236 -0
  159. data/lib/yapstone-payments/models/marketplace_data.rb +260 -0
  160. data/lib/yapstone-payments/models/merketplace.rb +197 -0
  161. data/lib/yapstone-payments/models/money.rb +207 -0
  162. data/lib/yapstone-payments/models/name.rb +248 -0
  163. data/lib/yapstone-payments/models/offering_details.rb +216 -0
  164. data/lib/yapstone-payments/models/order_transactions.rb +235 -0
  165. data/lib/yapstone-payments/models/payment.rb +216 -0
  166. data/lib/yapstone-payments/models/payment_cancel_response.rb +227 -0
  167. data/lib/yapstone-payments/models/payment_cancel_transaction_response.rb +218 -0
  168. data/lib/yapstone-payments/models/payment_details.rb +319 -0
  169. data/lib/yapstone-payments/models/payment_instrument.rb +277 -0
  170. data/lib/yapstone-payments/models/payment_instrument_card.rb +241 -0
  171. data/lib/yapstone-payments/models/payment_instrument_response.rb +205 -0
  172. data/lib/yapstone-payments/models/payment_payment.rb +257 -0
  173. data/lib/yapstone-payments/models/payment_payment_all_of.rb +250 -0
  174. data/lib/yapstone-payments/models/payment_response.rb +275 -0
  175. data/lib/yapstone-payments/models/phone.rb +218 -0
  176. data/lib/yapstone-payments/models/process_payment.rb +304 -0
  177. data/lib/yapstone-payments/models/property_info.rb +216 -0
  178. data/lib/yapstone-payments/models/property_info_response.rb +207 -0
  179. data/lib/yapstone-payments/models/refund_action.rb +35 -0
  180. data/lib/yapstone-payments/models/refund_cancel_response.rb +217 -0
  181. data/lib/yapstone-payments/models/refund_cancel_transaction_response.rb +207 -0
  182. data/lib/yapstone-payments/models/refund_request.rb +285 -0
  183. data/lib/yapstone-payments/models/refund_response.rb +253 -0
  184. data/lib/yapstone-payments/models/refund_status.rb +90 -0
  185. data/lib/yapstone-payments/models/refund_transactions.rb +245 -0
  186. data/lib/yapstone-payments/models/rental_info.rb +215 -0
  187. data/lib/yapstone-payments/models/renter.rb +254 -0
  188. data/lib/yapstone-payments/models/resolution.rb +196 -0
  189. data/lib/yapstone-payments/models/result.rb +218 -0
  190. data/lib/yapstone-payments/models/risk_status.rb +196 -0
  191. data/lib/yapstone-payments/models/sanctioned_entities.rb +207 -0
  192. data/lib/yapstone-payments/models/search_payment_response.rb +196 -0
  193. data/lib/yapstone-payments/models/stack_trace_element.rb +238 -0
  194. data/lib/yapstone-payments/models/status.rb +91 -0
  195. data/lib/yapstone-payments/models/throwable.rb +220 -0
  196. data/lib/yapstone-payments/models/to_entity_ref.rb +207 -0
  197. data/lib/yapstone-payments/models/token.rb +207 -0
  198. data/lib/yapstone-payments/models/token_req.rb +206 -0
  199. data/lib/yapstone-payments/models/token_request.rb +196 -0
  200. data/lib/yapstone-payments/models/token_response.rb +196 -0
  201. data/lib/yapstone-payments/models/transaction.rb +218 -0
  202. data/lib/yapstone-payments/models/transaction_response.rb +248 -0
  203. data/lib/yapstone-payments/models/triggers.rb +216 -0
  204. data/lib/yapstone-payments/models/vacation_rental_info.rb +205 -0
  205. data/lib/yapstone-payments/models/vacation_rental_info_request.rb +215 -0
  206. data/lib/yapstone-payments/models/verify_instrument_request.rb +215 -0
  207. data/lib/yapstone-payments/version.rb +15 -0
  208. data/spec/api/authentication_api_spec.rb +48 -0
  209. data/spec/api/disbursements_api_spec.rb +69 -0
  210. data/spec/api/payments_api_spec.rb +146 -0
  211. data/spec/api/refunds_api_spec.rb +127 -0
  212. data/spec/api/search_api_spec.rb +66 -0
  213. data/spec/api/token_api_spec.rb +67 -0
  214. data/spec/api_client_spec.rb +226 -0
  215. data/spec/configuration_spec.rb +42 -0
  216. data/spec/models/action_spec.rb +35 -0
  217. data/spec/models/address_spec.rb +77 -0
  218. data/spec/models/amount_spec.rb +53 -0
  219. data/spec/models/apm_spec.rb +81 -0
  220. data/spec/models/apm_spec_in_parameters_spec.rb +47 -0
  221. data/spec/models/auth_response_spec.rb +47 -0
  222. data/spec/models/auth_token_request_spec.rb +47 -0
  223. data/spec/models/auth_token_response_spec.rb +41 -0
  224. data/spec/models/bank_account_spec.rb +105 -0
  225. data/spec/models/billing_address_spec.rb +77 -0
  226. data/spec/models/booking_info_spec.rb +83 -0
  227. data/spec/models/capture_payment_request_spec.rb +57 -0
  228. data/spec/models/card_response_spec.rb +53 -0
  229. data/spec/models/card_spec.rb +71 -0
  230. data/spec/models/consent_spec.rb +57 -0
  231. data/spec/models/credit_card_auth_response_spec.rb +69 -0
  232. data/spec/models/customer_data_spec.rb +47 -0
  233. data/spec/models/customer_details_spec.rb +59 -0
  234. data/spec/models/customer_spec.rb +77 -0
  235. data/spec/models/deposit_details_spec.rb +41 -0
  236. data/spec/models/deposit_spec.rb +59 -0
  237. data/spec/models/disburse_line_items_req_spec.rb +47 -0
  238. data/spec/models/disburse_transaction_req_spec.rb +41 -0
  239. data/spec/models/disburse_transaction_spec.rb +47 -0
  240. data/spec/models/disbursement_all_of_spec.rb +41 -0
  241. data/spec/models/disbursement_details_spec.rb +41 -0
  242. data/spec/models/disbursement_request_spec.rb +35 -0
  243. data/spec/models/disbursement_requests_spec.rb +41 -0
  244. data/spec/models/disbursement_response_spec.rb +41 -0
  245. data/spec/models/disbursement_spec.rb +41 -0
  246. data/spec/models/error_response_spec.rb +47 -0
  247. data/spec/models/error_spec.rb +65 -0
  248. data/spec/models/fields_spec.rb +41 -0
  249. data/spec/models/gov_identification_spec.rb +81 -0
  250. data/spec/models/guest_info_response_spec.rb +47 -0
  251. data/spec/models/guest_spec.rb +77 -0
  252. data/spec/models/href_spec.rb +41 -0
  253. data/spec/models/inline_response200_spec.rb +65 -0
  254. data/spec/models/installment_plan_spec.rb +47 -0
  255. data/spec/models/instrument_spec.rb +57 -0
  256. data/spec/models/instrument_verification_response_spec.rb +83 -0
  257. data/spec/models/kyc_spec.rb +53 -0
  258. data/spec/models/lease_info_spec.rb +53 -0
  259. data/spec/models/line_item_details_spec.rb +65 -0
  260. data/spec/models/marketplace_data_spec.rb +63 -0
  261. data/spec/models/merketplace_spec.rb +41 -0
  262. data/spec/models/money_spec.rb +47 -0
  263. data/spec/models/name_spec.rb +71 -0
  264. data/spec/models/offering_details_spec.rb +53 -0
  265. data/spec/models/order_transactions_spec.rb +65 -0
  266. data/spec/models/payment_cancel_response_spec.rb +59 -0
  267. data/spec/models/payment_cancel_transaction_response_spec.rb +53 -0
  268. data/spec/models/payment_details_spec.rb +81 -0
  269. data/spec/models/payment_instrument_card_spec.rb +51 -0
  270. data/spec/models/payment_instrument_response_spec.rb +47 -0
  271. data/spec/models/payment_instrument_spec.rb +75 -0
  272. data/spec/models/payment_payment_all_of_spec.rb +71 -0
  273. data/spec/models/payment_payment_spec.rb +71 -0
  274. data/spec/models/payment_response_spec.rb +89 -0
  275. data/spec/models/payment_spec.rb +53 -0
  276. data/spec/models/phone_spec.rb +53 -0
  277. data/spec/models/process_payment_spec.rb +77 -0
  278. data/spec/models/property_info_response_spec.rb +47 -0
  279. data/spec/models/property_info_spec.rb +53 -0
  280. data/spec/models/refund_action_spec.rb +35 -0
  281. data/spec/models/refund_cancel_response_spec.rb +53 -0
  282. data/spec/models/refund_cancel_transaction_response_spec.rb +47 -0
  283. data/spec/models/refund_request_spec.rb +65 -0
  284. data/spec/models/refund_response_spec.rb +77 -0
  285. data/spec/models/refund_status_spec.rb +35 -0
  286. data/spec/models/refund_transactions_spec.rb +71 -0
  287. data/spec/models/rental_info_spec.rb +53 -0
  288. data/spec/models/renter_spec.rb +77 -0
  289. data/spec/models/resolution_spec.rb +41 -0
  290. data/spec/models/result_spec.rb +53 -0
  291. data/spec/models/risk_status_spec.rb +41 -0
  292. data/spec/models/sanctioned_entities_spec.rb +47 -0
  293. data/spec/models/search_payment_response_spec.rb +41 -0
  294. data/spec/models/stack_trace_element_spec.rb +65 -0
  295. data/spec/models/status_spec.rb +35 -0
  296. data/spec/models/throwable_spec.rb +53 -0
  297. data/spec/models/to_entity_ref_spec.rb +47 -0
  298. data/spec/models/token_req_spec.rb +47 -0
  299. data/spec/models/token_request_spec.rb +41 -0
  300. data/spec/models/token_response_spec.rb +41 -0
  301. data/spec/models/token_spec.rb +47 -0
  302. data/spec/models/transaction_response_spec.rb +71 -0
  303. data/spec/models/transaction_spec.rb +53 -0
  304. data/spec/models/triggers_spec.rb +53 -0
  305. data/spec/models/vacation_rental_info_request_spec.rb +53 -0
  306. data/spec/models/vacation_rental_info_spec.rb +47 -0
  307. data/spec/models/verify_instrument_request_spec.rb +53 -0
  308. data/spec/spec_helper.rb +111 -0
  309. data/yapstone-payments.gemspec +45 -0
  310. metadata +633 -0
@@ -0,0 +1,216 @@
1
+ =begin
2
+ #Payments Orchestrator
3
+
4
+ #\"REST API for Payments Orchestrator\"
5
+
6
+ The version of the OpenAPI document: 1.6.4-SNAPSHOT
7
+ Contact: test@yapstone.com
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
+ # If this payment is related to a physical property (e.g. a vacation rental or hotel booking), provide the information about the property being booked.
17
+ class PropertyInfo
18
+ attr_accessor :address
19
+
20
+ # Unique identifier for a property.
21
+ attr_accessor :external_property_id
22
+
23
+ attr_accessor :property_name
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'address' => :'address',
29
+ :'external_property_id' => :'externalPropertyId',
30
+ :'property_name' => :'propertyName'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.openapi_types
36
+ {
37
+ :'address' => :'Address',
38
+ :'external_property_id' => :'String',
39
+ :'property_name' => :'String'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Yapstone::PropertyInfo` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Yapstone::PropertyInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'address')
59
+ self.address = attributes[:'address']
60
+ end
61
+
62
+ if attributes.key?(:'external_property_id')
63
+ self.external_property_id = attributes[:'external_property_id']
64
+ end
65
+
66
+ if attributes.key?(:'property_name')
67
+ self.property_name = attributes[:'property_name']
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
+ invalid_properties
76
+ end
77
+
78
+ # Check to see if the all the properties in the model are valid
79
+ # @return true if the model is valid
80
+ def valid?
81
+ true
82
+ end
83
+
84
+ # Checks equality by comparing each attribute.
85
+ # @param [Object] Object to be compared
86
+ def ==(o)
87
+ return true if self.equal?(o)
88
+ self.class == o.class &&
89
+ address == o.address &&
90
+ external_property_id == o.external_property_id &&
91
+ property_name == o.property_name
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [address, external_property_id, property_name].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ new.build_from_hash(attributes)
111
+ end
112
+
113
+ # Builds the object from hash
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ # @return [Object] Returns the model itself
116
+ def build_from_hash(attributes)
117
+ return nil unless attributes.is_a?(Hash)
118
+ self.class.openapi_types.each_pair do |key, type|
119
+ if type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the attribute
121
+ # is documented as an array but the input is not
122
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
123
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
+ end
125
+ elsif !attributes[self.class.attribute_map[key]].nil?
126
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
128
+ end
129
+
130
+ self
131
+ end
132
+
133
+ # Deserializes the data based on type
134
+ # @param string type Data type
135
+ # @param string value Value to be deserialized
136
+ # @return [Object] Deserialized data
137
+ def _deserialize(type, value)
138
+ case type.to_sym
139
+ when :DateTime
140
+ DateTime.parse(value)
141
+ when :Date
142
+ Date.parse(value)
143
+ when :String
144
+ value.to_s
145
+ when :Integer
146
+ value.to_i
147
+ when :Float
148
+ value.to_f
149
+ when :Boolean
150
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
151
+ true
152
+ else
153
+ false
154
+ end
155
+ when :Object
156
+ # generic object (usually a Hash), return directly
157
+ value
158
+ when /\AArray<(?<inner_type>.+)>\z/
159
+ inner_type = Regexp.last_match[:inner_type]
160
+ value.map { |v| _deserialize(inner_type, v) }
161
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
162
+ k_type = Regexp.last_match[:k_type]
163
+ v_type = Regexp.last_match[:v_type]
164
+ {}.tap do |hash|
165
+ value.each do |k, v|
166
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
167
+ end
168
+ end
169
+ else # model
170
+ Yapstone.const_get(type).build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ next if value.nil?
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+ end
216
+ end
@@ -0,0 +1,207 @@
1
+ =begin
2
+ #Payments Orchestrator
3
+
4
+ #\"REST API for Payments Orchestrator\"
5
+
6
+ The version of the OpenAPI document: 1.6.4-SNAPSHOT
7
+ Contact: test@yapstone.com
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
+ # Property information object
17
+ class PropertyInfoResponse
18
+ # Optionally provide your system's internal identifier for this entity, for use later if you need to correlate data across systems or consolidate records.
19
+ attr_accessor :external_property_id
20
+
21
+ attr_accessor :property_id
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'external_property_id' => :'externalPropertyId',
27
+ :'property_id' => :'propertyId'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'external_property_id' => :'String',
35
+ :'property_id' => :'String'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Yapstone::PropertyInfoResponse` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Yapstone::PropertyInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'external_property_id')
55
+ self.external_property_id = attributes[:'external_property_id']
56
+ end
57
+
58
+ if attributes.key?(:'property_id')
59
+ self.property_id = attributes[:'property_id']
60
+ end
61
+ end
62
+
63
+ # Show invalid properties with the reasons. Usually used together with valid?
64
+ # @return Array for valid properties with the reasons
65
+ def list_invalid_properties
66
+ invalid_properties = Array.new
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ true
74
+ end
75
+
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ external_property_id == o.external_property_id &&
82
+ property_id == o.property_id
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [external_property_id, property_id].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def self.build_from_hash(attributes)
101
+ new.build_from_hash(attributes)
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.openapi_types.each_pair do |key, type|
110
+ if type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
114
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115
+ end
116
+ elsif !attributes[self.class.attribute_map[key]].nil?
117
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ Yapstone.const_get(type).build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ # Returns the string representation of the object
166
+ # @return [String] String presentation of the object
167
+ def to_s
168
+ to_hash.to_s
169
+ end
170
+
171
+ # to_body is an alias to to_hash (backward compatibility)
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ next if value.nil?
184
+ hash[param] = _to_hash(value)
185
+ end
186
+ hash
187
+ end
188
+
189
+ # Outputs non-array value in the form of hash
190
+ # For object, use to_hash. Otherwise, just return the value
191
+ # @param [Object] value Any valid value
192
+ # @return [Hash] Returns the value in the form of hash
193
+ def _to_hash(value)
194
+ if value.is_a?(Array)
195
+ value.compact.map { |v| _to_hash(v) }
196
+ elsif value.is_a?(Hash)
197
+ {}.tap do |hash|
198
+ value.each { |k, v| hash[k] = _to_hash(v) }
199
+ end
200
+ elsif value.respond_to? :to_hash
201
+ value.to_hash
202
+ else
203
+ value
204
+ end
205
+ end
206
+ end
207
+ end
@@ -0,0 +1,35 @@
1
+ =begin
2
+ #Payments Orchestrator
3
+
4
+ #\"REST API for Payments Orchestrator\"
5
+
6
+ The version of the OpenAPI document: 1.6.4-SNAPSHOT
7
+ Contact: test@yapstone.com
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
+ class RefundAction
17
+ REFUND_CREATED = "REFUND_CREATED".freeze
18
+
19
+ # Builds the enum from string
20
+ # @param [String] The enum value in the form of the string
21
+ # @return [String] The enum value
22
+ def self.build_from_hash(value)
23
+ new.build_from_hash(value)
24
+ end
25
+
26
+ # Builds the enum from string
27
+ # @param [String] The enum value in the form of the string
28
+ # @return [String] The enum value
29
+ def build_from_hash(value)
30
+ constantValues = RefundAction.constants.select { |c| RefundAction::const_get(c) == value }
31
+ raise "Invalid ENUM value #{value} for class #RefundAction" if constantValues.empty?
32
+ value
33
+ end
34
+ end
35
+ end