first_data_gateway 1.5.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (909) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +260 -25
  4. data/docs/ACSResponse.md +17 -0
  5. data/docs/AVSResponse.md +3 -1
  6. data/docs/AccessTokenRequest.md +21 -0
  7. data/docs/AccessTokenResponse.md +13 -5
  8. data/docs/AccountInfoLookupRequest.md +19 -0
  9. data/docs/AccountVerificationRequest.md +25 -0
  10. data/docs/AchCreditTransaction.md +17 -0
  11. data/docs/AchPostAuthTransaction.md +17 -0
  12. data/docs/AchPostAuthTransactionAllOf.md +17 -0
  13. data/docs/AchPreAuthTransaction.md +17 -0
  14. data/docs/AchPreAuthTransactionAllOf.md +17 -0
  15. data/docs/{Secure3dAuthenticationRequest.md → AchRecurringType.md} +2 -2
  16. data/docs/AchResponse.md +25 -0
  17. data/docs/AchReturnTransaction.md +17 -0
  18. data/docs/AchSaleTransaction.md +17 -0
  19. data/docs/AchVoidTransaction.md +17 -0
  20. data/docs/AdditionalDetails.md +15 -1
  21. data/docs/AdditionalTransactionDetails.md +3 -1
  22. data/docs/Amount.md +1 -1
  23. data/docs/AmountComponents.md +2 -2
  24. data/docs/AuthenticationApi.md +5 -3
  25. data/docs/AuthenticationRequest.md +17 -0
  26. data/docs/AuthenticationResult.md +17 -0
  27. data/docs/AuthenticationUpdateRequest.md +21 -0
  28. data/docs/Background.md +23 -0
  29. data/docs/BackgroundColor.md +21 -0
  30. data/docs/Body.md +17 -0
  31. data/docs/Borders.md +17 -0
  32. data/docs/BrandingStyleConfigurationRequest.md +17 -0
  33. data/docs/BrandingStyleConfigurationResponse.md +23 -0
  34. data/docs/BrandingStyleConfigurationResult.md +19 -0
  35. data/docs/Button.md +19 -0
  36. data/docs/ChinaDomestic.md +3 -1
  37. data/docs/ClassicMode.md +35 -0
  38. data/docs/ClearingDetails.md +25 -0
  39. data/docs/ClearingElement.md +21 -0
  40. data/docs/CombinedMode.md +23 -0
  41. data/docs/ConnectMode.md +16 -0
  42. data/docs/Content.md +17 -0
  43. data/docs/CurrencyConversionResponse.md +19 -0
  44. data/docs/DCCExchangeRateRequest.md +1 -1
  45. data/docs/DCCExchangeRateRequestAllOf.md +1 -1
  46. data/docs/DecryptedApplePay.md +2 -6
  47. data/docs/DecryptedGooglePay.md +2 -6
  48. data/docs/DecryptedSamsungPay.md +2 -6
  49. data/docs/DeleteBrandingStyleConfigurationResponse.md +25 -0
  50. data/docs/EmailNotificationData.md +25 -0
  51. data/docs/EndpointResponse.md +21 -0
  52. data/docs/ExchangeRateDetails.md +33 -0
  53. data/docs/ExchangeRateResponse.md +4 -20
  54. data/docs/Expiration.md +1 -1
  55. data/docs/FontFace.md +16 -0
  56. data/docs/FontProperties.md +23 -0
  57. data/docs/FontWeight.md +16 -0
  58. data/docs/Footer.md +17 -0
  59. data/docs/FraudOrder.md +3 -1
  60. data/docs/FraudOrderItems.md +4 -4
  61. data/docs/Header.md +17 -0
  62. data/docs/Hover.md +17 -0
  63. data/docs/IdInfo.md +19 -0
  64. data/docs/IndustrySpecificExtensions.md +3 -1
  65. data/docs/InformationLookupApi.md +132 -0
  66. data/docs/InitiateClearingResponse.md +27 -0
  67. data/docs/InitiateClearingResponseAllOf.md +21 -0
  68. data/docs/Logo.md +21 -0
  69. data/docs/MasterpassWalletPaymentMethod.md +19 -0
  70. data/docs/MasterpassWalletPaymentMethodAllOf.md +19 -0
  71. data/docs/Mcc6012.md +27 -0
  72. data/docs/Mobile.md +19 -0
  73. data/docs/MobileHeaderArea.md +17 -0
  74. data/docs/OrderApi.md +2 -2
  75. data/docs/PaymentApi.md +14 -14
  76. data/docs/PaymentCard.md +0 -2
  77. data/docs/PaymentCardInfoLookupRequest.md +17 -0
  78. data/docs/PaymentCardInfoLookupRequestAllOf.md +17 -0
  79. data/docs/PaymentCardPaymentTokenUpdateRequest.md +21 -0
  80. data/docs/PaymentCardPreAuthTransaction.md +7 -1
  81. data/docs/PaymentCardPreAuthTransactionAllOf.md +7 -1
  82. data/docs/PaymentCardSaleTransaction.md +5 -1
  83. data/docs/PaymentCardSaleTransactionAllOf.md +5 -1
  84. data/docs/PaymentCardVerificationRequest.md +17 -0
  85. data/docs/PaymentCardVerificationRequestAllOf.md +17 -0
  86. data/docs/PaymentDevicePreAuthTransaction.md +3 -1
  87. data/docs/PaymentDevicePreAuthTransactionAllOf.md +3 -1
  88. data/docs/PaymentTokenApi.md +130 -0
  89. data/docs/PaymentTokenInfoLookupRequest.md +17 -0
  90. data/docs/PaymentTokenInfoLookupRequestAllOf.md +17 -0
  91. data/docs/PaymentTokenPreAuthTransaction.md +7 -1
  92. data/docs/PaymentTokenPreAuthTransactionAllOf.md +7 -1
  93. data/docs/PaymentTokenSaleTransaction.md +5 -1
  94. data/docs/PaymentTokenSaleTransactionAllOf.md +5 -1
  95. data/docs/PaymentTokenUpdateResponse.md +27 -0
  96. data/docs/PaymentTokenVerificationRequest.md +17 -0
  97. data/docs/PaymentTokenVerificationRequestAllOf.md +17 -0
  98. data/docs/PaymentTokenizationErrorResponse.md +4 -0
  99. data/docs/PaymentTokenizationRequest.md +5 -1
  100. data/docs/PaymentTokenizationResponse.md +5 -1
  101. data/docs/PaymentURLApi.md +2 -2
  102. data/docs/PaymentUrlRequest.md +1 -1
  103. data/docs/Primary.md +17 -0
  104. data/docs/ProcessorData.md +3 -1
  105. data/docs/Properties.md +25 -0
  106. data/docs/Receipt.md +19 -0
  107. data/docs/ReceiptRequestInfo.md +21 -0
  108. data/docs/ResponseAmountComponents.md +2 -2
  109. data/docs/ScoreOnlyResponse.md +3 -5
  110. data/docs/ScoreOnlyResponseFraudScore.md +3 -1
  111. data/docs/SecondaryTransaction.md +5 -1
  112. data/docs/Secure3D10AuthenticationRequest.md +16 -0
  113. data/docs/{Secure3dAuthenticationVerificationRequest.md → Secure3D10AuthenticationUpdateRequest.md} +5 -3
  114. data/docs/{Secure3dAuthenticationVerificationRequestAllOf.md → Secure3D10AuthenticationUpdateRequestAllOf.md} +5 -3
  115. data/docs/Secure3D21AuthenticationRequest.md +23 -0
  116. data/docs/Secure3D21AuthenticationRequestAllOf.md +23 -0
  117. data/docs/Secure3D21AuthenticationResult.md +2 -2
  118. data/docs/Secure3D21AuthenticationResultAllOf.md +2 -2
  119. data/docs/Secure3D21AuthenticationUpdateRequest.md +19 -0
  120. data/docs/Secure3D21AuthenticationUpdateRequestAllOf.md +19 -0
  121. data/docs/Secure3DAuthenticationResponse.md +23 -0
  122. data/docs/Secure3DAuthenticationResponseParams.md +27 -0
  123. data/docs/Secure3DAuthenticationResponseSecure3dMethod.md +35 -0
  124. data/docs/SoftDescriptor.md +5 -1
  125. data/docs/StoreBrandingStyleConfiguration.md +21 -0
  126. data/docs/StoreEmailSettings.md +19 -0
  127. data/docs/StoreEmailSettingsResult.md +19 -0
  128. data/docs/StoredCredential.md +1 -1
  129. data/docs/TeleCheckAchPaymentMethod.md +53 -0
  130. data/docs/TeleCheckAchPaymentMethodAchBillTo.md +35 -0
  131. data/docs/TeleCheckCBPPaymentMethod.md +16 -0
  132. data/docs/TeleCheckICAPaymentMethod.md +21 -0
  133. data/docs/TeleCheckICAPaymentMethodAllOf.md +21 -0
  134. data/docs/Text.md +19 -0
  135. data/docs/Title.md +17 -0
  136. data/docs/TopBar.md +17 -0
  137. data/docs/TransactionErrorResponse.md +10 -4
  138. data/docs/TransactionResponse.md +11 -5
  139. data/docs/UnionPayAuthenticationUpdateRequest.md +19 -0
  140. data/docs/UnionPayAuthenticationUpdateRequestAllOf.md +19 -0
  141. data/docs/UpdateEmailSettingsRequest.md +17 -0
  142. data/docs/UpdateEmailSettingsResponse.md +23 -0
  143. data/docs/UpdatePaymentToken.md +23 -0
  144. data/docs/VerificationApi.md +132 -0
  145. data/docs/VoidPreAuthTransactions.md +16 -0
  146. data/docs/WalletPreAuthTransaction.md +3 -1
  147. data/docs/WalletPreAuthTransactionAllOf.md +3 -1
  148. data/first_data_gateway.gemspec +6 -7
  149. data/git_push.sh +10 -7
  150. data/lib/openapi_client.rb +96 -13
  151. data/lib/openapi_client/.DS_Store +0 -0
  152. data/lib/openapi_client/api/authentication_api.rb +17 -9
  153. data/lib/openapi_client/api/currency_conversion_api.rb +6 -6
  154. data/lib/openapi_client/api/fraud_detect_api.rb +14 -20
  155. data/lib/openapi_client/api/information_lookup_api.rb +228 -0
  156. data/lib/openapi_client/api/order_api.rb +11 -12
  157. data/lib/openapi_client/api/payment_api.rb +36 -40
  158. data/lib/openapi_client/api/payment_schedules_api.rb +16 -17
  159. data/lib/openapi_client/api/payment_token_api.rb +222 -10
  160. data/lib/openapi_client/api/payment_url_api.rb +14 -14
  161. data/lib/openapi_client/api/verification_api.rb +228 -0
  162. data/lib/openapi_client/api_client.rb +15 -29
  163. data/lib/openapi_client/api_error.rb +2 -2
  164. data/lib/openapi_client/configuration.rb +3 -4
  165. data/lib/openapi_client/models/access_token_request.rb +242 -0
  166. data/lib/openapi_client/models/access_token_response.rb +81 -66
  167. data/lib/openapi_client/models/{authentication_verification_request.rb → account_info_lookup_request.rb} +39 -49
  168. data/lib/openapi_client/models/account_updater_response.rb +21 -12
  169. data/lib/openapi_client/models/account_verification_request.rb +285 -0
  170. data/lib/openapi_client/models/ach_credit_transaction.rb +223 -0
  171. data/lib/openapi_client/models/ach_post_auth_transaction.rb +223 -0
  172. data/lib/openapi_client/models/{funding_transaction_type_all_of.rb → ach_post_auth_transaction_all_of.rb} +36 -41
  173. data/lib/openapi_client/models/ach_pre_auth_transaction.rb +223 -0
  174. data/lib/openapi_client/models/ach_pre_auth_transaction_all_of.rb +210 -0
  175. data/lib/openapi_client/models/ach_recurring_type.rb +36 -0
  176. data/lib/openapi_client/models/ach_response.rb +307 -0
  177. data/lib/openapi_client/models/ach_return_transaction.rb +223 -0
  178. data/lib/openapi_client/models/ach_sale_transaction.rb +223 -0
  179. data/lib/openapi_client/models/ach_void_transaction.rb +223 -0
  180. data/lib/openapi_client/models/acs_response.rb +207 -0
  181. data/lib/openapi_client/models/additional_amount_rate.rb +21 -12
  182. data/lib/openapi_client/models/additional_details.rb +198 -16
  183. data/lib/openapi_client/models/additional_transaction_details.rb +39 -18
  184. data/lib/openapi_client/models/address.rb +21 -12
  185. data/lib/openapi_client/models/airline.rb +21 -12
  186. data/lib/openapi_client/models/airline_ancillary_service_category.rb +21 -12
  187. data/lib/openapi_client/models/airline_travel_route.rb +21 -12
  188. data/lib/openapi_client/models/ali_pay.rb +21 -12
  189. data/lib/openapi_client/models/ali_pay_payment_method.rb +21 -12
  190. data/lib/openapi_client/models/ali_pay_payment_method_all_of.rb +21 -12
  191. data/lib/openapi_client/models/ali_pay_sale_transaction.rb +24 -102
  192. data/lib/openapi_client/models/ali_pay_sale_transaction_all_of.rb +22 -100
  193. data/lib/openapi_client/models/amount.rb +41 -13
  194. data/lib/openapi_client/models/amount_components.rb +21 -12
  195. data/lib/openapi_client/models/authentication_request.rb +217 -0
  196. data/lib/openapi_client/models/authentication_result.rb +217 -0
  197. data/lib/openapi_client/models/authentication_update_request.rb +251 -0
  198. data/lib/openapi_client/models/avs_response.rb +35 -16
  199. data/lib/openapi_client/models/background.rb +233 -0
  200. data/lib/openapi_client/models/{authentication_redirect_params.rb → background_color.rb} +44 -38
  201. data/lib/openapi_client/models/bancontact_qr.rb +21 -12
  202. data/lib/openapi_client/models/basic_response.rb +21 -12
  203. data/lib/openapi_client/models/billing.rb +21 -12
  204. data/lib/openapi_client/models/billing_address.rb +21 -12
  205. data/lib/openapi_client/models/block_card.rb +21 -12
  206. data/lib/openapi_client/models/block_domain.rb +21 -12
  207. data/lib/openapi_client/models/block_ip_address.rb +21 -12
  208. data/lib/openapi_client/models/block_name.rb +21 -12
  209. data/lib/openapi_client/models/blocked_card_number.rb +21 -12
  210. data/lib/openapi_client/models/blocked_items.rb +21 -12
  211. data/lib/openapi_client/models/body.rb +223 -0
  212. data/lib/openapi_client/models/borders.rb +223 -0
  213. data/lib/openapi_client/models/branding_style_configuration_request.rb +208 -0
  214. data/lib/openapi_client/models/branding_style_configuration_response.rb +243 -0
  215. data/lib/openapi_client/models/{disbursement_transaction_type_all_of.rb → branding_style_configuration_result.rb} +39 -38
  216. data/lib/openapi_client/models/button.rb +215 -0
  217. data/lib/openapi_client/models/car_rental.rb +21 -12
  218. data/lib/openapi_client/models/car_rental_extra_charges.rb +21 -12
  219. data/lib/openapi_client/models/card.rb +21 -12
  220. data/lib/openapi_client/models/card_function.rb +2 -2
  221. data/lib/openapi_client/models/card_info.rb +21 -12
  222. data/lib/openapi_client/models/card_info_lookup_request.rb +21 -12
  223. data/lib/openapi_client/models/card_info_lookup_response.rb +21 -12
  224. data/lib/openapi_client/models/card_verification_request.rb +21 -12
  225. data/lib/openapi_client/models/china_domestic.rb +50 -16
  226. data/lib/openapi_client/models/china_domestic_payment_method.rb +21 -12
  227. data/lib/openapi_client/models/china_domestic_payment_method_all_of.rb +21 -12
  228. data/lib/openapi_client/models/china_pn_r_sale_transaction.rb +24 -102
  229. data/lib/openapi_client/models/china_pn_r_sale_transaction_all_of.rb +22 -100
  230. data/lib/openapi_client/models/classic_mode.rb +287 -0
  231. data/lib/openapi_client/models/clearing_details.rb +338 -0
  232. data/lib/openapi_client/models/clearing_element.rb +227 -0
  233. data/lib/openapi_client/models/client_locale.rb +21 -12
  234. data/lib/openapi_client/models/client_registration.rb +21 -12
  235. data/lib/openapi_client/models/combined_mode.rb +233 -0
  236. data/lib/openapi_client/models/connect_mode.rb +36 -0
  237. data/lib/openapi_client/models/contact.rb +21 -12
  238. data/lib/openapi_client/models/content.rb +223 -0
  239. data/lib/openapi_client/models/country_profile.rb +21 -12
  240. data/lib/openapi_client/models/create_payment_token.rb +21 -12
  241. data/lib/openapi_client/models/currency_conversion.rb +21 -12
  242. data/lib/openapi_client/models/currency_conversion_response.rb +216 -0
  243. data/lib/openapi_client/models/customer.rb +21 -12
  244. data/lib/openapi_client/models/customer_address.rb +21 -12
  245. data/lib/openapi_client/models/dcc.rb +24 -52
  246. data/lib/openapi_client/models/dcc_all_of.rb +22 -50
  247. data/lib/openapi_client/models/dcc_exchange_rate_request.rb +25 -61
  248. data/lib/openapi_client/models/dcc_exchange_rate_request_all_of.rb +23 -59
  249. data/lib/openapi_client/models/decrypted_apple_pay.rb +31 -91
  250. data/lib/openapi_client/models/decrypted_apple_pay_wallet_payment_method.rb +24 -25
  251. data/lib/openapi_client/models/decrypted_apple_pay_wallet_payment_method_all_of.rb +22 -23
  252. data/lib/openapi_client/models/decrypted_google_pay.rb +31 -91
  253. data/lib/openapi_client/models/decrypted_google_pay_wallet_payment_method.rb +24 -25
  254. data/lib/openapi_client/models/decrypted_google_pay_wallet_payment_method_all_of.rb +22 -23
  255. data/lib/openapi_client/models/decrypted_samsung_pay.rb +31 -91
  256. data/lib/openapi_client/models/decrypted_samsung_pay_wallet_payment_method.rb +24 -25
  257. data/lib/openapi_client/models/decrypted_samsung_pay_wallet_payment_method_all_of.rb +22 -23
  258. data/lib/openapi_client/models/delete_branding_style_configuration_response.rb +252 -0
  259. data/lib/openapi_client/models/device.rb +21 -12
  260. data/lib/openapi_client/models/disbursement.rb +21 -12
  261. data/lib/openapi_client/models/disbursement_transaction_type.rb +26 -46
  262. data/lib/openapi_client/models/document.rb +21 -12
  263. data/lib/openapi_client/models/dynamic_pricing.rb +24 -52
  264. data/lib/openapi_client/models/dynamic_pricing_all_of.rb +22 -50
  265. data/lib/openapi_client/models/dynamic_pricing_exchange_rate_request.rb +24 -60
  266. data/lib/openapi_client/models/dynamic_pricing_exchange_rate_request_all_of.rb +22 -58
  267. data/lib/openapi_client/models/email_notification_data.rb +247 -0
  268. data/lib/openapi_client/models/encrypted_apple_pay.rb +21 -12
  269. data/lib/openapi_client/models/encrypted_apple_pay_header.rb +21 -12
  270. data/lib/openapi_client/models/encrypted_apple_pay_wallet_payment_method.rb +24 -25
  271. data/lib/openapi_client/models/encrypted_apple_pay_wallet_payment_method_all_of.rb +22 -23
  272. data/lib/openapi_client/models/encrypted_google_pay.rb +21 -12
  273. data/lib/openapi_client/models/encrypted_google_pay_data.rb +21 -12
  274. data/lib/openapi_client/models/encrypted_google_pay_wallet_payment_method.rb +24 -25
  275. data/lib/openapi_client/models/encrypted_google_pay_wallet_payment_method_all_of.rb +22 -23
  276. data/lib/openapi_client/models/encrypted_samsung_pay.rb +21 -12
  277. data/lib/openapi_client/models/encrypted_samsung_pay_wallet_payment_method.rb +24 -25
  278. data/lib/openapi_client/models/encrypted_samsung_pay_wallet_payment_method_all_of.rb +22 -23
  279. data/lib/openapi_client/models/endpoint_response.rb +261 -0
  280. data/lib/openapi_client/models/error.rb +21 -12
  281. data/lib/openapi_client/models/error_details.rb +21 -12
  282. data/lib/openapi_client/models/error_message.rb +21 -12
  283. data/lib/openapi_client/models/error_response.rb +21 -12
  284. data/lib/openapi_client/models/exchange_rate_details.rb +287 -0
  285. data/lib/openapi_client/models/exchange_rate_request.rb +21 -12
  286. data/lib/openapi_client/models/exchange_rate_response.rb +29 -101
  287. data/lib/openapi_client/models/expiration.rb +25 -16
  288. data/lib/openapi_client/models/font_face.rb +39 -0
  289. data/lib/openapi_client/models/font_properties.rb +252 -0
  290. data/lib/openapi_client/models/font_weight.rb +36 -0
  291. data/lib/openapi_client/models/footer.rb +223 -0
  292. data/lib/openapi_client/models/fraud_address.rb +21 -12
  293. data/lib/openapi_client/models/fraud_order.rb +32 -13
  294. data/lib/openapi_client/models/fraud_order_items.rb +26 -15
  295. data/lib/openapi_client/models/fraud_registration.rb +21 -12
  296. data/lib/openapi_client/models/fraud_registration_card.rb +21 -12
  297. data/lib/openapi_client/models/fraud_registration_device.rb +21 -12
  298. data/lib/openapi_client/models/fraud_registration_device_items.rb +21 -12
  299. data/lib/openapi_client/models/fraud_registration_error.rb +21 -12
  300. data/lib/openapi_client/models/fraud_registration_response.rb +22 -13
  301. data/lib/openapi_client/models/fraud_score.rb +21 -12
  302. data/lib/openapi_client/models/fraud_settings.rb +21 -12
  303. data/lib/openapi_client/models/fraud_settings_response.rb +21 -12
  304. data/lib/openapi_client/models/frequency.rb +21 -12
  305. data/lib/openapi_client/models/funding_transaction_type.rb +26 -46
  306. data/lib/openapi_client/models/header.rb +223 -0
  307. data/lib/openapi_client/models/hover.rb +223 -0
  308. data/lib/openapi_client/models/id_info.rb +256 -0
  309. data/lib/openapi_client/models/industry_specific_extensions.rb +34 -16
  310. data/lib/openapi_client/models/initiate_clearing_response.rb +298 -0
  311. data/lib/openapi_client/models/initiate_clearing_response_all_of.rb +261 -0
  312. data/lib/openapi_client/models/installment_options.rb +21 -12
  313. data/lib/openapi_client/models/issuer_response.rb +21 -12
  314. data/lib/openapi_client/models/items.rb +21 -12
  315. data/lib/openapi_client/models/location.rb +21 -12
  316. data/lib/openapi_client/models/lockout_time.rb +21 -12
  317. data/lib/openapi_client/models/lodging.rb +21 -12
  318. data/lib/openapi_client/models/lodging_extra_charges.rb +21 -12
  319. data/lib/openapi_client/models/logo.rb +276 -0
  320. data/lib/openapi_client/models/loyalty.rb +21 -12
  321. data/lib/openapi_client/models/masterpass_wallet_payment_method.rb +268 -0
  322. data/lib/openapi_client/models/masterpass_wallet_payment_method_all_of.rb +255 -0
  323. data/lib/openapi_client/models/maximum_purchase_amount.rb +21 -12
  324. data/lib/openapi_client/models/mcc6012.rb +347 -0
  325. data/lib/openapi_client/models/merchant.rb +21 -12
  326. data/lib/openapi_client/models/method.rb +21 -12
  327. data/lib/openapi_client/models/mobile.rb +216 -0
  328. data/lib/openapi_client/models/mobile_header_area.rb +223 -0
  329. data/lib/openapi_client/models/order.rb +21 -12
  330. data/lib/openapi_client/models/order_error_response.rb +21 -12
  331. data/lib/openapi_client/models/order_response.rb +21 -12
  332. data/lib/openapi_client/models/pay_pal.rb +21 -12
  333. data/lib/openapi_client/models/pay_pal_payment_method.rb +21 -12
  334. data/lib/openapi_client/models/pay_pal_payment_method_all_of.rb +21 -12
  335. data/lib/openapi_client/models/payment.rb +21 -12
  336. data/lib/openapi_client/models/payment_card.rb +22 -22
  337. data/lib/openapi_client/models/payment_card_credit_transaction.rb +24 -102
  338. data/lib/openapi_client/models/payment_card_disbursement_transaction.rb +24 -102
  339. data/lib/openapi_client/models/payment_card_disbursement_transaction_all_of.rb +22 -100
  340. data/lib/openapi_client/models/payment_card_forced_ticket_transaction.rb +24 -102
  341. data/lib/openapi_client/models/payment_card_forced_ticket_transaction_all_of.rb +22 -100
  342. data/lib/openapi_client/models/payment_card_info_lookup_request.rb +223 -0
  343. data/lib/openapi_client/models/payment_card_info_lookup_request_all_of.rb +210 -0
  344. data/lib/openapi_client/models/payment_card_payer_auth_transaction.rb +24 -102
  345. data/lib/openapi_client/models/payment_card_payer_auth_transaction_all_of.rb +22 -100
  346. data/lib/openapi_client/models/payment_card_payment_method.rb +21 -12
  347. data/lib/openapi_client/models/payment_card_payment_method_all_of.rb +21 -12
  348. data/lib/openapi_client/models/{void_transaction_all_of.rb → payment_card_payment_token_update_request.rb} +52 -25
  349. data/lib/openapi_client/models/payment_card_payment_tokenization_request.rb +24 -80
  350. data/lib/openapi_client/models/payment_card_payment_tokenization_request_all_of.rb +22 -78
  351. data/lib/openapi_client/models/payment_card_pre_auth_transaction.rb +58 -105
  352. data/lib/openapi_client/models/payment_card_pre_auth_transaction_all_of.rb +55 -103
  353. data/lib/openapi_client/models/payment_card_sale_transaction.rb +47 -105
  354. data/lib/openapi_client/models/payment_card_sale_transaction_all_of.rb +43 -103
  355. data/lib/openapi_client/models/payment_card_verification_request.rb +223 -0
  356. data/lib/openapi_client/models/payment_card_verification_request_all_of.rb +210 -0
  357. data/lib/openapi_client/models/payment_device.rb +21 -12
  358. data/lib/openapi_client/models/payment_device_credit_transaction.rb +24 -102
  359. data/lib/openapi_client/models/payment_device_credit_transaction_all_of.rb +22 -100
  360. data/lib/openapi_client/models/payment_device_disbursement_transaction.rb +24 -102
  361. data/lib/openapi_client/models/payment_device_disbursement_transaction_all_of.rb +22 -100
  362. data/lib/openapi_client/models/payment_device_payment_method.rb +21 -12
  363. data/lib/openapi_client/models/payment_device_payment_method_all_of.rb +21 -12
  364. data/lib/openapi_client/models/payment_device_payment_tokenization_request.rb +24 -80
  365. data/lib/openapi_client/models/payment_device_payment_tokenization_request_all_of.rb +22 -78
  366. data/lib/openapi_client/models/payment_device_pre_auth_transaction.rb +39 -105
  367. data/lib/openapi_client/models/payment_device_pre_auth_transaction_all_of.rb +37 -103
  368. data/lib/openapi_client/models/payment_device_sale_transaction.rb +24 -102
  369. data/lib/openapi_client/models/payment_device_sale_transaction_all_of.rb +22 -100
  370. data/lib/openapi_client/models/payment_facilitator.rb +21 -12
  371. data/lib/openapi_client/models/payment_method_details.rb +21 -12
  372. data/lib/openapi_client/models/payment_method_payment_schedules_request.rb +24 -232
  373. data/lib/openapi_client/models/payment_method_payment_schedules_request_all_of.rb +22 -230
  374. data/lib/openapi_client/models/payment_method_type.rb +3 -2
  375. data/lib/openapi_client/models/payment_registration.rb +21 -12
  376. data/lib/openapi_client/models/payment_schedules_error_response.rb +21 -12
  377. data/lib/openapi_client/models/payment_schedules_request.rb +21 -12
  378. data/lib/openapi_client/models/payment_schedules_response.rb +21 -12
  379. data/lib/openapi_client/models/payment_token_credit_transaction.rb +24 -102
  380. data/lib/openapi_client/models/payment_token_credit_transaction_all_of.rb +22 -100
  381. data/lib/openapi_client/models/payment_token_details.rb +21 -12
  382. data/lib/openapi_client/models/payment_token_details_all_of.rb +22 -47
  383. data/lib/openapi_client/models/payment_token_disbursement_transaction.rb +24 -102
  384. data/lib/openapi_client/models/payment_token_disbursement_transaction_all_of.rb +22 -100
  385. data/lib/openapi_client/models/payment_token_info_lookup_request.rb +223 -0
  386. data/lib/openapi_client/models/{secure3d_authentication_request_all_of.rb → payment_token_info_lookup_request_all_of.rb} +36 -23
  387. data/lib/openapi_client/models/payment_token_payment_method.rb +21 -12
  388. data/lib/openapi_client/models/payment_token_payment_method_all_of.rb +21 -12
  389. data/lib/openapi_client/models/payment_token_pre_auth_transaction.rb +57 -105
  390. data/lib/openapi_client/models/payment_token_pre_auth_transaction_all_of.rb +55 -103
  391. data/lib/openapi_client/models/payment_token_sale_transaction.rb +45 -105
  392. data/lib/openapi_client/models/payment_token_sale_transaction_all_of.rb +43 -103
  393. data/lib/openapi_client/models/payment_token_update_response.rb +297 -0
  394. data/lib/openapi_client/models/payment_token_verification_request.rb +223 -0
  395. data/lib/openapi_client/models/payment_token_verification_request_all_of.rb +210 -0
  396. data/lib/openapi_client/models/payment_tokenization_error_response.rb +72 -13
  397. data/lib/openapi_client/models/payment_tokenization_request.rb +59 -16
  398. data/lib/openapi_client/models/payment_tokenization_response.rb +75 -16
  399. data/lib/openapi_client/models/payment_url_detail.rb +21 -12
  400. data/lib/openapi_client/models/payment_url_detail_response.rb +21 -12
  401. data/lib/openapi_client/models/payment_url_error_response.rb +21 -12
  402. data/lib/openapi_client/models/payment_url_request.rb +21 -12
  403. data/lib/openapi_client/models/payment_url_response.rb +21 -12
  404. data/lib/openapi_client/models/payment_url_status.rb +2 -2
  405. data/lib/openapi_client/models/paypal_credit_transaction.rb +24 -102
  406. data/lib/openapi_client/models/paypal_credit_transaction_all_of.rb +22 -100
  407. data/lib/openapi_client/models/phone.rb +21 -12
  408. data/lib/openapi_client/models/post_auth_transaction.rb +24 -60
  409. data/lib/openapi_client/models/post_auth_transaction_all_of.rb +22 -58
  410. data/lib/openapi_client/models/primary.rb +223 -0
  411. data/lib/openapi_client/models/primary_transaction.rb +21 -12
  412. data/lib/openapi_client/models/processor_data.rb +35 -16
  413. data/lib/openapi_client/models/properties.rb +279 -0
  414. data/lib/openapi_client/models/purchase_cards.rb +21 -12
  415. data/lib/openapi_client/models/purchase_cards_level2.rb +21 -12
  416. data/lib/openapi_client/models/purchase_cards_level3.rb +21 -12
  417. data/lib/openapi_client/models/purchase_cards_level3_line_items.rb +21 -12
  418. data/lib/openapi_client/models/{authentication_redirect.rb → receipt.rb} +48 -36
  419. data/lib/openapi_client/models/receipt_request_info.rb +268 -0
  420. data/lib/openapi_client/models/receiver_info.rb +59 -41
  421. data/lib/openapi_client/models/recurring_payment_details.rb +21 -12
  422. data/lib/openapi_client/models/recurring_payment_details_response.rb +21 -12
  423. data/lib/openapi_client/models/referenced_order_payment_schedules_request.rb +24 -232
  424. data/lib/openapi_client/models/referenced_order_payment_schedules_request_all_of.rb +22 -230
  425. data/lib/openapi_client/models/referenced_order_payment_tokenization_request.rb +24 -80
  426. data/lib/openapi_client/models/referenced_order_payment_tokenization_request_all_of.rb +22 -78
  427. data/lib/openapi_client/models/registration_method.rb +21 -12
  428. data/lib/openapi_client/models/remove_fraud_blocked_items_response.rb +21 -12
  429. data/lib/openapi_client/models/response_amount_components.rb +21 -12
  430. data/lib/openapi_client/models/response_amount_components_all_of.rb +22 -73
  431. data/lib/openapi_client/models/response_type.rb +2 -3
  432. data/lib/openapi_client/models/return_transaction.rb +24 -60
  433. data/lib/openapi_client/models/return_transaction_all_of.rb +22 -58
  434. data/lib/openapi_client/models/score_only_request.rb +21 -12
  435. data/lib/openapi_client/models/score_only_response.rb +31 -32
  436. data/lib/openapi_client/models/score_only_response_fraud_score.rb +28 -19
  437. data/lib/openapi_client/models/score_only_response_fraud_score_explanations.rb +21 -12
  438. data/lib/openapi_client/models/secondary_transaction.rb +59 -16
  439. data/lib/openapi_client/models/{secure3d_authentication_request.rb → secure3_d10_authentication_request.rb} +30 -32
  440. data/lib/openapi_client/models/secure3_d10_authentication_result.rb +26 -27
  441. data/lib/openapi_client/models/secure3_d10_authentication_result_all_of.rb +22 -23
  442. data/lib/openapi_client/models/{secure3d_authentication_verification_request.rb → secure3_d10_authentication_update_request.rb} +43 -78
  443. data/lib/openapi_client/models/{secure3d_authentication_verification_request_all_of.rb → secure3_d10_authentication_update_request_all_of.rb} +38 -73
  444. data/lib/openapi_client/models/secure3_d21_authentication_request.rb +297 -0
  445. data/lib/openapi_client/models/secure3_d21_authentication_request_all_of.rb +284 -0
  446. data/lib/openapi_client/models/secure3_d21_authentication_result.rb +30 -29
  447. data/lib/openapi_client/models/secure3_d21_authentication_result_all_of.rb +25 -24
  448. data/lib/openapi_client/models/secure3_d21_authentication_update_request.rb +262 -0
  449. data/lib/openapi_client/models/secure3_d21_authentication_update_request_all_of.rb +249 -0
  450. data/lib/openapi_client/models/secure3_d_authentication_response.rb +281 -0
  451. data/lib/openapi_client/models/secure3_d_authentication_response_params.rb +257 -0
  452. data/lib/openapi_client/models/secure3_d_authentication_response_secure3d_method.rb +217 -0
  453. data/lib/openapi_client/models/secure3d_response.rb +21 -12
  454. data/lib/openapi_client/models/sender_info.rb +59 -41
  455. data/lib/openapi_client/models/sepa.rb +21 -12
  456. data/lib/openapi_client/models/sepa_mandate.rb +21 -12
  457. data/lib/openapi_client/models/sepa_payment_method.rb +21 -12
  458. data/lib/openapi_client/models/sepa_payment_method_all_of.rb +21 -12
  459. data/lib/openapi_client/models/sepa_sale_transaction.rb +24 -102
  460. data/lib/openapi_client/models/sepa_sale_transaction_all_of.rb +22 -100
  461. data/lib/openapi_client/models/shared_secret_configuration_request.rb +21 -12
  462. data/lib/openapi_client/models/shared_secret_configuration_response.rb +21 -12
  463. data/lib/openapi_client/models/ship_to_address.rb +21 -12
  464. data/lib/openapi_client/models/shipping.rb +21 -12
  465. data/lib/openapi_client/models/soft_descriptor.rb +70 -16
  466. data/lib/openapi_client/models/split_shipment.rb +21 -12
  467. data/lib/openapi_client/models/store_branding_style_configuration.rb +229 -0
  468. data/lib/openapi_client/models/store_email_settings.rb +226 -0
  469. data/lib/openapi_client/models/store_email_settings_result.rb +217 -0
  470. data/lib/openapi_client/models/store_fraud_settings.rb +21 -12
  471. data/lib/openapi_client/models/store_fraud_settings_result.rb +21 -12
  472. data/lib/openapi_client/models/store_url_configuration.rb +21 -12
  473. data/lib/openapi_client/models/store_url_configuration_request.rb +21 -12
  474. data/lib/openapi_client/models/store_url_configuration_response.rb +21 -12
  475. data/lib/openapi_client/models/store_url_configuration_result.rb +21 -12
  476. data/lib/openapi_client/models/stored_credential.rb +27 -18
  477. data/lib/openapi_client/models/sub_merchant_data.rb +21 -12
  478. data/lib/openapi_client/models/sub_merchant_split.rb +21 -12
  479. data/lib/openapi_client/models/tele_check_ach_payment_method.rb +784 -0
  480. data/lib/openapi_client/models/tele_check_ach_payment_method_ach_bill_to.rb +611 -0
  481. data/lib/openapi_client/models/tele_check_cbp_payment_method.rb +230 -0
  482. data/lib/openapi_client/models/tele_check_ica_payment_method.rb +321 -0
  483. data/lib/openapi_client/models/tele_check_ica_payment_method_all_of.rb +286 -0
  484. data/lib/openapi_client/models/{authentication.rb → text.rb} +41 -34
  485. data/lib/openapi_client/models/title.rb +223 -0
  486. data/lib/openapi_client/models/token_identifier.rb +21 -12
  487. data/lib/openapi_client/models/top_bar.rb +223 -0
  488. data/lib/openapi_client/models/transaction_error_response.rb +73 -21
  489. data/lib/openapi_client/models/transaction_origin.rb +2 -2
  490. data/lib/openapi_client/models/transaction_response.rb +76 -24
  491. data/lib/openapi_client/models/transaction_type.rb +2 -2
  492. data/lib/openapi_client/models/union_pay_authentication_request.rb +26 -27
  493. data/lib/openapi_client/models/union_pay_authentication_request_all_of.rb +22 -23
  494. data/lib/openapi_client/models/{union_pay_authentication_verification_request.rb → union_pay_authentication_update_request.rb} +40 -75
  495. data/lib/openapi_client/models/{union_pay_authentication_verification_request_all_of.rb → union_pay_authentication_update_request_all_of.rb} +35 -70
  496. data/lib/openapi_client/models/update_email_settings_request.rb +213 -0
  497. data/lib/openapi_client/models/update_email_settings_response.rb +244 -0
  498. data/lib/openapi_client/models/update_fraud_settings_request.rb +21 -12
  499. data/lib/openapi_client/models/update_fraud_settings_response.rb +21 -12
  500. data/lib/openapi_client/models/update_payment_token.rb +250 -0
  501. data/lib/openapi_client/models/use_payment_token.rb +21 -12
  502. data/lib/openapi_client/models/verification3ds.rb +21 -12
  503. data/lib/openapi_client/models/verification_avs.rb +21 -12
  504. data/lib/openapi_client/models/verification_cvv.rb +21 -12
  505. data/lib/openapi_client/models/void_pre_auth_transactions.rb +208 -0
  506. data/lib/openapi_client/models/void_transaction.rb +26 -63
  507. data/lib/openapi_client/models/wallet_payment_method.rb +22 -13
  508. data/lib/openapi_client/models/wallet_pre_auth_transaction.rb +39 -105
  509. data/lib/openapi_client/models/wallet_pre_auth_transaction_all_of.rb +37 -103
  510. data/lib/openapi_client/models/wallet_sale_transaction.rb +24 -102
  511. data/lib/openapi_client/models/wallet_sale_transaction_all_of.rb +22 -100
  512. data/lib/openapi_client/version.rb +3 -3
  513. data/lib/simple/gateway.rb +76 -8
  514. data/spec/api/authentication_api_spec.rb +3 -2
  515. data/spec/api/card_info_lookup_api_spec.rb +1 -1
  516. data/spec/api/card_verification_api_spec.rb +1 -1
  517. data/spec/api/currency_conversion_api_spec.rb +2 -2
  518. data/spec/api/fraud_detect_api_spec.rb +2 -2
  519. data/spec/api/information_lookup_api_spec.rb +71 -0
  520. data/spec/api/order_api_spec.rb +3 -3
  521. data/spec/api/payment_api_spec.rb +8 -8
  522. data/spec/api/payment_schedules_api_spec.rb +2 -2
  523. data/spec/api/payment_token_api_spec.rb +41 -2
  524. data/spec/api/payment_url_api_spec.rb +3 -3
  525. data/spec/api/verification_api_spec.rb +71 -0
  526. data/spec/api_client_spec.rb +3 -3
  527. data/spec/configuration_spec.rb +2 -2
  528. data/spec/models/access_token_request_spec.rb +53 -0
  529. data/spec/models/access_token_response_spec.rb +29 -9
  530. data/spec/models/account_info_lookup_request_spec.rb +47 -0
  531. data/spec/models/account_updater_response_spec.rb +2 -2
  532. data/spec/models/{authentication_verification_request_spec.rb → account_verification_request_spec.rb} +12 -12
  533. data/spec/models/ach_credit_transaction_spec.rb +41 -0
  534. data/spec/models/ach_post_auth_transaction_all_of_spec.rb +41 -0
  535. data/spec/models/ach_post_auth_transaction_spec.rb +41 -0
  536. data/spec/models/ach_pre_auth_transaction_all_of_spec.rb +41 -0
  537. data/spec/models/ach_pre_auth_transaction_spec.rb +41 -0
  538. data/spec/models/{secure3d_authentication_request_spec.rb → ach_recurring_type_spec.rb} +8 -8
  539. data/spec/models/ach_response_spec.rb +65 -0
  540. data/spec/models/ach_return_transaction_spec.rb +41 -0
  541. data/spec/models/ach_sale_transaction_spec.rb +41 -0
  542. data/spec/models/ach_void_transaction_spec.rb +41 -0
  543. data/spec/models/acs_response_spec.rb +41 -0
  544. data/spec/models/additional_amount_rate_spec.rb +2 -2
  545. data/spec/models/additional_details_spec.rb +26 -2
  546. data/spec/models/additional_transaction_details_spec.rb +3 -3
  547. data/spec/models/address_spec.rb +2 -2
  548. data/spec/models/airline_ancillary_service_category_spec.rb +2 -2
  549. data/spec/models/airline_spec.rb +2 -2
  550. data/spec/models/airline_travel_route_spec.rb +2 -2
  551. data/spec/models/ali_pay_payment_method_all_of_spec.rb +2 -2
  552. data/spec/models/ali_pay_payment_method_spec.rb +2 -2
  553. data/spec/models/ali_pay_sale_transaction_all_of_spec.rb +2 -2
  554. data/spec/models/ali_pay_sale_transaction_spec.rb +2 -2
  555. data/spec/models/ali_pay_spec.rb +2 -2
  556. data/spec/models/amount_components_spec.rb +2 -2
  557. data/spec/models/amount_spec.rb +2 -2
  558. data/spec/models/authentication_request_spec.rb +41 -0
  559. data/spec/models/{authentication_spec.rb → authentication_result_spec.rb} +9 -9
  560. data/spec/models/{authentication_redirect_params_spec.rb → authentication_update_request_spec.rb} +11 -11
  561. data/spec/models/avs_response_spec.rb +8 -2
  562. data/spec/models/background_color_spec.rb +53 -0
  563. data/spec/models/background_spec.rb +59 -0
  564. data/spec/models/bancontact_qr_spec.rb +2 -2
  565. data/spec/models/basic_response_spec.rb +2 -2
  566. data/spec/models/billing_address_spec.rb +2 -2
  567. data/spec/models/billing_spec.rb +2 -2
  568. data/spec/models/block_card_spec.rb +2 -2
  569. data/spec/models/block_domain_spec.rb +2 -2
  570. data/spec/models/block_ip_address_spec.rb +2 -2
  571. data/spec/models/block_name_spec.rb +2 -2
  572. data/spec/models/blocked_card_number_spec.rb +2 -2
  573. data/spec/models/blocked_items_spec.rb +2 -2
  574. data/spec/models/body_spec.rb +41 -0
  575. data/spec/models/borders_spec.rb +41 -0
  576. data/spec/models/branding_style_configuration_request_spec.rb +41 -0
  577. data/spec/models/branding_style_configuration_response_all_of_spec.rb +41 -0
  578. data/spec/models/branding_style_configuration_response_spec.rb +59 -0
  579. data/spec/models/branding_style_configuration_result_spec.rb +47 -0
  580. data/spec/models/button_spec.rb +47 -0
  581. data/spec/models/car_rental_extra_charges_spec.rb +2 -2
  582. data/spec/models/car_rental_spec.rb +2 -2
  583. data/spec/models/card_function_spec.rb +2 -2
  584. data/spec/models/card_info_lookup_request_spec.rb +2 -2
  585. data/spec/models/card_info_lookup_response_all_of_spec.rb +51 -0
  586. data/spec/models/card_info_lookup_response_spec.rb +2 -2
  587. data/spec/models/card_info_spec.rb +2 -2
  588. data/spec/models/card_spec.rb +2 -2
  589. data/spec/models/card_verification_request_spec.rb +2 -2
  590. data/spec/models/china_domestic_payment_method_all_of_spec.rb +2 -2
  591. data/spec/models/china_domestic_payment_method_spec.rb +2 -2
  592. data/spec/models/china_domestic_spec.rb +2 -2
  593. data/spec/models/china_pn_r_sale_transaction_all_of_spec.rb +2 -2
  594. data/spec/models/china_pn_r_sale_transaction_spec.rb +2 -2
  595. data/spec/models/classic_mode_spec.rb +95 -0
  596. data/spec/models/clearing_details_spec.rb +65 -0
  597. data/spec/models/clearing_element_spec.rb +53 -0
  598. data/spec/models/client_locale_spec.rb +2 -2
  599. data/spec/models/client_registration_all_of_spec.rb +41 -0
  600. data/spec/models/client_registration_spec.rb +2 -2
  601. data/spec/models/combined_mode_spec.rb +59 -0
  602. data/spec/models/connect_mode_spec.rb +35 -0
  603. data/spec/models/contact_spec.rb +2 -2
  604. data/spec/models/content_spec.rb +41 -0
  605. data/spec/models/country_profile_spec.rb +2 -2
  606. data/spec/models/create_payment_token_spec.rb +2 -2
  607. data/spec/models/currency_conversion_spec.rb +2 -2
  608. data/spec/models/customer_address_all_of_spec.rb +41 -0
  609. data/spec/models/customer_address_spec.rb +2 -2
  610. data/spec/models/customer_spec.rb +2 -2
  611. data/spec/models/dcc_all_of_spec.rb +2 -2
  612. data/spec/models/dcc_exchange_rate_request_all_of_spec.rb +2 -2
  613. data/spec/models/dcc_exchange_rate_request_spec.rb +2 -2
  614. data/spec/models/dcc_spec.rb +2 -2
  615. data/spec/models/decrypted_apple_pay_spec.rb +2 -2
  616. data/spec/models/decrypted_apple_pay_wallet_payment_method_all_of_spec.rb +2 -2
  617. data/spec/models/decrypted_apple_pay_wallet_payment_method_spec.rb +2 -2
  618. data/spec/models/decrypted_google_pay_spec.rb +2 -2
  619. data/spec/models/decrypted_google_pay_wallet_payment_method_all_of_spec.rb +2 -2
  620. data/spec/models/decrypted_google_pay_wallet_payment_method_spec.rb +2 -2
  621. data/spec/models/decrypted_samsung_pay_spec.rb +2 -2
  622. data/spec/models/decrypted_samsung_pay_wallet_payment_method_all_of_spec.rb +2 -2
  623. data/spec/models/decrypted_samsung_pay_wallet_payment_method_spec.rb +2 -2
  624. data/spec/models/delete_branding_style_configuration_response_all_of_spec.rb +47 -0
  625. data/spec/models/delete_branding_style_configuration_response_spec.rb +65 -0
  626. data/spec/models/device_spec.rb +2 -2
  627. data/spec/models/disbursement_spec.rb +2 -2
  628. data/spec/models/disbursement_transaction_type_all_of_spec.rb +41 -0
  629. data/spec/models/disbursement_transaction_type_spec.rb +8 -2
  630. data/spec/models/document_spec.rb +2 -2
  631. data/spec/models/dynamic_pricing_all_of_spec.rb +2 -2
  632. data/spec/models/dynamic_pricing_exchange_rate_request_all_of_spec.rb +2 -2
  633. data/spec/models/dynamic_pricing_exchange_rate_request_spec.rb +2 -2
  634. data/spec/models/dynamic_pricing_spec.rb +2 -2
  635. data/spec/models/email_notification_data_spec.rb +65 -0
  636. data/spec/models/encrypted_apple_pay_header_spec.rb +2 -2
  637. data/spec/models/encrypted_apple_pay_spec.rb +2 -2
  638. data/spec/models/encrypted_apple_pay_wallet_payment_method_all_of_spec.rb +2 -2
  639. data/spec/models/encrypted_apple_pay_wallet_payment_method_spec.rb +2 -2
  640. data/spec/models/encrypted_google_pay_data_spec.rb +2 -2
  641. data/spec/models/encrypted_google_pay_spec.rb +2 -2
  642. data/spec/models/encrypted_google_pay_wallet_payment_method_all_of_spec.rb +2 -2
  643. data/spec/models/encrypted_google_pay_wallet_payment_method_spec.rb +2 -2
  644. data/spec/models/encrypted_samsung_pay_spec.rb +2 -2
  645. data/spec/models/encrypted_samsung_pay_wallet_payment_method_all_of_spec.rb +2 -2
  646. data/spec/models/encrypted_samsung_pay_wallet_payment_method_spec.rb +2 -2
  647. data/spec/models/{authentication_redirect_spec.rb → endpoint_response_spec.rb} +15 -15
  648. data/spec/models/error_details_spec.rb +2 -2
  649. data/spec/models/error_message_spec.rb +2 -2
  650. data/spec/models/error_response_all_of_spec.rb +41 -0
  651. data/spec/models/error_response_spec.rb +2 -2
  652. data/spec/models/error_spec.rb +2 -2
  653. data/spec/models/exchange_rate_request_spec.rb +2 -2
  654. data/spec/models/exchange_rate_response_all_of_spec.rb +101 -0
  655. data/spec/models/exchange_rate_response_spec.rb +2 -2
  656. data/spec/models/expiration_spec.rb +2 -2
  657. data/spec/models/font_face_spec.rb +35 -0
  658. data/spec/models/font_properties_spec.rb +59 -0
  659. data/spec/models/font_weight_spec.rb +35 -0
  660. data/spec/models/footer_spec.rb +41 -0
  661. data/spec/models/fraud_address_spec.rb +2 -2
  662. data/spec/models/fraud_order_items_spec.rb +2 -2
  663. data/spec/models/fraud_order_spec.rb +2 -2
  664. data/spec/models/fraud_registration_card_spec.rb +2 -2
  665. data/spec/models/fraud_registration_device_items_spec.rb +2 -2
  666. data/spec/models/fraud_registration_device_spec.rb +2 -2
  667. data/spec/models/fraud_registration_error_spec.rb +2 -2
  668. data/spec/models/fraud_registration_response_spec.rb +2 -2
  669. data/spec/models/fraud_registration_spec.rb +2 -2
  670. data/spec/models/fraud_score_spec.rb +2 -2
  671. data/spec/models/fraud_settings_response_all_of_spec.rb +83 -0
  672. data/spec/models/fraud_settings_response_spec.rb +2 -2
  673. data/spec/models/fraud_settings_spec.rb +2 -2
  674. data/spec/models/frequency_spec.rb +2 -2
  675. data/spec/models/funding_transaction_type_all_of_spec.rb +41 -0
  676. data/spec/models/funding_transaction_type_spec.rb +8 -2
  677. data/spec/models/header_spec.rb +41 -0
  678. data/spec/models/hover_spec.rb +41 -0
  679. data/spec/models/id_info_spec.rb +47 -0
  680. data/spec/models/industry_specific_extensions_spec.rb +8 -2
  681. data/spec/models/initiate_clearing_response_all_of_spec.rb +57 -0
  682. data/spec/models/initiate_clearing_response_spec.rb +75 -0
  683. data/spec/models/installment_options_spec.rb +2 -2
  684. data/spec/models/issuer_response_spec.rb +2 -2
  685. data/spec/models/items_spec.rb +2 -2
  686. data/spec/models/location_spec.rb +2 -2
  687. data/spec/models/lockout_time_spec.rb +2 -2
  688. data/spec/models/lodging_extra_charges_spec.rb +2 -2
  689. data/spec/models/lodging_spec.rb +2 -2
  690. data/spec/models/logo_spec.rb +57 -0
  691. data/spec/models/loyalty_spec.rb +2 -2
  692. data/spec/models/masterpass_wallet_payment_method_all_of_spec.rb +47 -0
  693. data/spec/models/masterpass_wallet_payment_method_spec.rb +47 -0
  694. data/spec/models/maximum_purchase_amount_spec.rb +2 -2
  695. data/spec/models/mcc6012_spec.rb +71 -0
  696. data/spec/models/merchant_spec.rb +2 -2
  697. data/spec/models/method_spec.rb +2 -2
  698. data/spec/models/mobile_header_area_spec.rb +41 -0
  699. data/spec/models/mobile_spec.rb +47 -0
  700. data/spec/models/order_error_response_spec.rb +2 -2
  701. data/spec/models/order_response_all_of_spec.rb +65 -0
  702. data/spec/models/order_response_spec.rb +2 -2
  703. data/spec/models/order_spec.rb +2 -2
  704. data/spec/models/pay_pal_payment_method_all_of_spec.rb +2 -2
  705. data/spec/models/pay_pal_payment_method_spec.rb +2 -2
  706. data/spec/models/pay_pal_spec.rb +2 -2
  707. data/spec/models/payment_card_credit_transaction_spec.rb +2 -2
  708. data/spec/models/payment_card_disbursement_transaction_all_of_spec.rb +2 -2
  709. data/spec/models/payment_card_disbursement_transaction_spec.rb +2 -2
  710. data/spec/models/payment_card_forced_ticket_transaction_all_of_spec.rb +2 -2
  711. data/spec/models/payment_card_forced_ticket_transaction_spec.rb +2 -2
  712. data/spec/models/payment_card_info_lookup_request_all_of_spec.rb +41 -0
  713. data/spec/models/payment_card_info_lookup_request_spec.rb +41 -0
  714. data/spec/models/payment_card_payer_auth_transaction_all_of_spec.rb +2 -2
  715. data/spec/models/payment_card_payer_auth_transaction_spec.rb +2 -2
  716. data/spec/models/payment_card_payment_method_all_of_spec.rb +2 -2
  717. data/spec/models/payment_card_payment_method_spec.rb +2 -2
  718. data/spec/models/payment_card_payment_token_update_request_spec.rb +53 -0
  719. data/spec/models/payment_card_payment_tokenization_request_all_of_spec.rb +2 -2
  720. data/spec/models/payment_card_payment_tokenization_request_spec.rb +2 -2
  721. data/spec/models/payment_card_pre_auth_transaction_all_of_spec.rb +20 -2
  722. data/spec/models/payment_card_pre_auth_transaction_spec.rb +20 -2
  723. data/spec/models/payment_card_sale_transaction_all_of_spec.rb +20 -2
  724. data/spec/models/payment_card_sale_transaction_spec.rb +20 -2
  725. data/spec/models/payment_card_spec.rb +2 -8
  726. data/spec/models/payment_card_verification_request_all_of_spec.rb +41 -0
  727. data/spec/models/payment_card_verification_request_spec.rb +41 -0
  728. data/spec/models/payment_device_credit_transaction_all_of_spec.rb +2 -2
  729. data/spec/models/payment_device_credit_transaction_spec.rb +2 -2
  730. data/spec/models/payment_device_disbursement_transaction_all_of_spec.rb +2 -2
  731. data/spec/models/payment_device_disbursement_transaction_spec.rb +2 -2
  732. data/spec/models/payment_device_payment_method_all_of_spec.rb +2 -2
  733. data/spec/models/payment_device_payment_method_spec.rb +2 -2
  734. data/spec/models/payment_device_payment_tokenization_request_all_of_spec.rb +2 -2
  735. data/spec/models/payment_device_payment_tokenization_request_spec.rb +2 -2
  736. data/spec/models/payment_device_pre_auth_transaction_all_of_spec.rb +8 -2
  737. data/spec/models/payment_device_pre_auth_transaction_spec.rb +8 -2
  738. data/spec/models/payment_device_sale_transaction_all_of_spec.rb +2 -2
  739. data/spec/models/payment_device_sale_transaction_spec.rb +2 -2
  740. data/spec/models/payment_device_spec.rb +2 -2
  741. data/spec/models/payment_facilitator_spec.rb +2 -2
  742. data/spec/models/payment_method_details_spec.rb +2 -2
  743. data/spec/models/payment_method_payment_schedules_request_all_of_spec.rb +2 -2
  744. data/spec/models/payment_method_payment_schedules_request_spec.rb +2 -2
  745. data/spec/models/payment_method_type_spec.rb +2 -2
  746. data/spec/models/payment_registration_all_of_spec.rb +71 -0
  747. data/spec/models/payment_registration_spec.rb +2 -2
  748. data/spec/models/payment_schedules_error_response_spec.rb +2 -2
  749. data/spec/models/payment_schedules_request_spec.rb +2 -2
  750. data/spec/models/payment_schedules_response_all_of_spec.rb +57 -0
  751. data/spec/models/payment_schedules_response_spec.rb +2 -2
  752. data/spec/models/payment_spec.rb +2 -2
  753. data/spec/models/payment_token_credit_transaction_all_of_spec.rb +2 -2
  754. data/spec/models/payment_token_credit_transaction_spec.rb +2 -2
  755. data/spec/models/payment_token_details_all_of_spec.rb +2 -2
  756. data/spec/models/payment_token_details_spec.rb +2 -2
  757. data/spec/models/payment_token_disbursement_transaction_all_of_spec.rb +2 -2
  758. data/spec/models/payment_token_disbursement_transaction_spec.rb +2 -2
  759. data/spec/models/payment_token_info_lookup_request_all_of_spec.rb +41 -0
  760. data/spec/models/payment_token_info_lookup_request_spec.rb +41 -0
  761. data/spec/models/payment_token_payment_method_all_of_spec.rb +2 -2
  762. data/spec/models/payment_token_payment_method_spec.rb +2 -2
  763. data/spec/models/payment_token_pre_auth_transaction_all_of_spec.rb +20 -2
  764. data/spec/models/payment_token_pre_auth_transaction_spec.rb +20 -2
  765. data/spec/models/payment_token_sale_transaction_all_of_spec.rb +14 -2
  766. data/spec/models/payment_token_sale_transaction_spec.rb +14 -2
  767. data/spec/models/payment_token_update_response_all_of_spec.rb +57 -0
  768. data/spec/models/payment_token_update_response_spec.rb +75 -0
  769. data/spec/models/payment_token_verification_request_all_of_spec.rb +41 -0
  770. data/spec/models/payment_token_verification_request_spec.rb +41 -0
  771. data/spec/models/payment_tokenization_error_response_spec.rb +2 -2
  772. data/spec/models/payment_tokenization_request_spec.rb +8 -2
  773. data/spec/models/payment_tokenization_response_all_of_spec.rb +87 -0
  774. data/spec/models/payment_tokenization_response_spec.rb +2 -2
  775. data/spec/models/payment_url_detail_response_all_of_spec.rb +41 -0
  776. data/spec/models/payment_url_detail_response_spec.rb +2 -2
  777. data/spec/models/payment_url_detail_spec.rb +2 -2
  778. data/spec/models/payment_url_error_response_spec.rb +2 -2
  779. data/spec/models/payment_url_request_spec.rb +2 -2
  780. data/spec/models/payment_url_response_all_of_spec.rb +63 -0
  781. data/spec/models/payment_url_response_spec.rb +2 -2
  782. data/spec/models/payment_url_status_spec.rb +2 -2
  783. data/spec/models/paypal_credit_transaction_all_of_spec.rb +2 -2
  784. data/spec/models/paypal_credit_transaction_spec.rb +2 -2
  785. data/spec/models/phone_spec.rb +2 -2
  786. data/spec/models/post_auth_transaction_all_of_spec.rb +2 -2
  787. data/spec/models/post_auth_transaction_spec.rb +2 -2
  788. data/spec/models/primary_spec.rb +41 -0
  789. data/spec/models/primary_transaction_spec.rb +2 -2
  790. data/spec/models/processor_data_spec.rb +2 -2
  791. data/spec/models/properties_spec.rb +65 -0
  792. data/spec/models/purchase_cards_level2_spec.rb +2 -2
  793. data/spec/models/purchase_cards_level3_line_items_spec.rb +2 -2
  794. data/spec/models/purchase_cards_level3_spec.rb +2 -2
  795. data/spec/models/purchase_cards_spec.rb +2 -2
  796. data/spec/models/receiver_info_spec.rb +2 -2
  797. data/spec/models/recurring_payment_details_response_all_of_spec.rb +41 -0
  798. data/spec/models/recurring_payment_details_response_spec.rb +2 -2
  799. data/spec/models/recurring_payment_details_spec.rb +2 -2
  800. data/spec/models/referenced_order_payment_schedules_request_all_of_spec.rb +2 -2
  801. data/spec/models/referenced_order_payment_schedules_request_spec.rb +2 -2
  802. data/spec/models/referenced_order_payment_tokenization_request_all_of_spec.rb +2 -2
  803. data/spec/models/referenced_order_payment_tokenization_request_spec.rb +2 -2
  804. data/spec/models/registration_method_spec.rb +2 -2
  805. data/spec/models/remove_fraud_blocked_items_response_all_of_spec.rb +41 -0
  806. data/spec/models/remove_fraud_blocked_items_response_spec.rb +2 -2
  807. data/spec/models/response_amount_components_all_of_spec.rb +2 -2
  808. data/spec/models/response_amount_components_spec.rb +2 -2
  809. data/spec/models/response_type_spec.rb +2 -2
  810. data/spec/models/return_transaction_all_of_spec.rb +2 -2
  811. data/spec/models/return_transaction_spec.rb +2 -2
  812. data/spec/models/score_only_request_spec.rb +2 -2
  813. data/spec/models/score_only_response_fraud_score_explanations_spec.rb +2 -2
  814. data/spec/models/score_only_response_fraud_score_spec.rb +2 -2
  815. data/spec/models/score_only_response_spec.rb +2 -2
  816. data/spec/models/secondary_transaction_spec.rb +14 -2
  817. data/spec/models/secure3_d10_authentication_request_all_of_spec.rb +41 -0
  818. data/spec/models/secure3_d10_authentication_request_spec.rb +41 -0
  819. data/spec/models/secure3_d10_authentication_result_all_of_spec.rb +2 -2
  820. data/spec/models/secure3_d10_authentication_result_spec.rb +2 -2
  821. data/spec/models/{secure3d_authentication_verification_request_all_of_spec.rb → secure3_d10_authentication_update_request_all_of_spec.rb} +14 -8
  822. data/spec/models/{secure3d_authentication_verification_request_spec.rb → secure3_d10_authentication_update_request_spec.rb} +14 -8
  823. data/spec/models/secure3_d21_authentication_request_all_of_spec.rb +67 -0
  824. data/spec/models/secure3_d21_authentication_request_spec.rb +67 -0
  825. data/spec/models/secure3_d21_authentication_result_all_of_spec.rb +2 -2
  826. data/spec/models/secure3_d21_authentication_result_spec.rb +2 -2
  827. data/spec/models/secure3_d21_authentication_update_request_all_of_spec.rb +51 -0
  828. data/spec/models/secure3_d21_authentication_update_request_spec.rb +51 -0
  829. data/spec/models/secure3_d_authentication_response_params_spec.rb +71 -0
  830. data/spec/models/secure3_d_authentication_response_secure3d_method_spec.rb +47 -0
  831. data/spec/models/secure3_d_authentication_response_spec.rb +67 -0
  832. data/spec/models/secure3d_response_spec.rb +2 -2
  833. data/spec/models/sender_info_spec.rb +2 -2
  834. data/spec/models/sepa_mandate_spec.rb +2 -2
  835. data/spec/models/sepa_payment_method_all_of_spec.rb +2 -2
  836. data/spec/models/sepa_payment_method_spec.rb +2 -2
  837. data/spec/models/sepa_sale_transaction_all_of_spec.rb +2 -2
  838. data/spec/models/sepa_sale_transaction_spec.rb +2 -2
  839. data/spec/models/sepa_spec.rb +2 -2
  840. data/spec/models/shared_secret_configuration_request_spec.rb +2 -2
  841. data/spec/models/shared_secret_configuration_response_all_of_spec.rb +59 -0
  842. data/spec/models/shared_secret_configuration_response_spec.rb +2 -2
  843. data/spec/models/ship_to_address_spec.rb +2 -2
  844. data/spec/models/shipping_spec.rb +2 -2
  845. data/spec/models/soft_descriptor_spec.rb +2 -2
  846. data/spec/models/split_shipment_spec.rb +2 -2
  847. data/spec/models/store_branding_style_configuration_spec.rb +53 -0
  848. data/spec/models/store_email_settings_result_spec.rb +47 -0
  849. data/spec/models/store_email_settings_spec.rb +47 -0
  850. data/spec/models/store_fraud_settings_result_spec.rb +2 -2
  851. data/spec/models/store_fraud_settings_spec.rb +2 -2
  852. data/spec/models/store_url_configuration_request_spec.rb +2 -2
  853. data/spec/models/store_url_configuration_response_all_of_spec.rb +41 -0
  854. data/spec/models/store_url_configuration_response_spec.rb +2 -2
  855. data/spec/models/store_url_configuration_result_spec.rb +2 -2
  856. data/spec/models/store_url_configuration_spec.rb +2 -2
  857. data/spec/models/stored_credential_spec.rb +2 -2
  858. data/spec/models/sub_merchant_data_spec.rb +2 -2
  859. data/spec/models/sub_merchant_split_spec.rb +2 -2
  860. data/spec/models/tele_check_ach_payment_method_ach_bill_to_spec.rb +95 -0
  861. data/spec/models/tele_check_ach_payment_method_spec.rb +165 -0
  862. data/spec/models/tele_check_cbp_payment_method_all_of_spec.rb +41 -0
  863. data/spec/models/tele_check_cbp_payment_method_spec.rb +41 -0
  864. data/spec/models/tele_check_ica_payment_method_all_of_spec.rb +53 -0
  865. data/spec/models/tele_check_ica_payment_method_spec.rb +53 -0
  866. data/spec/models/text_spec.rb +47 -0
  867. data/spec/models/title_spec.rb +41 -0
  868. data/spec/models/token_identifier_spec.rb +2 -2
  869. data/spec/models/top_bar_spec.rb +41 -0
  870. data/spec/models/transaction_error_response_spec.rb +15 -3
  871. data/spec/models/transaction_origin_spec.rb +2 -2
  872. data/spec/models/transaction_response_all_of_spec.rb +175 -0
  873. data/spec/models/transaction_response_spec.rb +15 -3
  874. data/spec/models/transaction_type_spec.rb +2 -2
  875. data/spec/models/union_pay_authentication_request_all_of_spec.rb +2 -2
  876. data/spec/models/union_pay_authentication_request_spec.rb +2 -2
  877. data/spec/models/{union_pay_authentication_verification_request_all_of_spec.rb → union_pay_authentication_update_request_all_of_spec.rb} +14 -8
  878. data/spec/models/{union_pay_authentication_verification_request_spec.rb → union_pay_authentication_update_request_spec.rb} +14 -8
  879. data/spec/models/update_email_settings_request_spec.rb +41 -0
  880. data/spec/models/update_email_settings_response_all_of_spec.rb +41 -0
  881. data/spec/models/update_email_settings_response_spec.rb +59 -0
  882. data/spec/models/update_fraud_settings_request_spec.rb +2 -2
  883. data/spec/models/update_fraud_settings_response_all_of_spec.rb +41 -0
  884. data/spec/models/update_fraud_settings_response_spec.rb +2 -2
  885. data/spec/models/update_payment_token_spec.rb +59 -0
  886. data/spec/models/use_payment_token_spec.rb +2 -2
  887. data/spec/models/verification3ds_spec.rb +2 -2
  888. data/spec/models/verification_avs_spec.rb +2 -2
  889. data/spec/models/verification_cvv_spec.rb +2 -2
  890. data/spec/models/void_pre_auth_transactions_spec.rb +41 -0
  891. data/spec/models/void_transaction_all_of_spec.rb +41 -0
  892. data/spec/models/void_transaction_spec.rb +8 -2
  893. data/spec/models/wallet_payment_method_spec.rb +2 -2
  894. data/spec/models/wallet_pre_auth_transaction_all_of_spec.rb +8 -2
  895. data/spec/models/wallet_pre_auth_transaction_spec.rb +8 -2
  896. data/spec/models/wallet_sale_transaction_all_of_spec.rb +2 -2
  897. data/spec/models/wallet_sale_transaction_spec.rb +2 -2
  898. data/spec/spec_helper.rb +2 -2
  899. metadata +435 -55
  900. data/docs/Authentication.md +0 -17
  901. data/docs/AuthenticationRedirect.md +0 -21
  902. data/docs/AuthenticationRedirectParams.md +0 -21
  903. data/docs/AuthenticationVerificationRequest.md +0 -23
  904. data/docs/CardInfoLookupApi.md +0 -70
  905. data/docs/CardVerificationApi.md +0 -70
  906. data/docs/UnionPayAuthenticationVerificationRequest.md +0 -17
  907. data/docs/UnionPayAuthenticationVerificationRequestAllOf.md +0 -17
  908. data/lib/openapi_client/api/card_info_lookup_api.rb +0 -125
  909. data/lib/openapi_client/api/card_verification_api.rb +0 -125
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
5
5
 
6
- The version of the OpenAPI document: 6.9.1.20191223.002
6
+ The version of the OpenAPI document: 6.13.0.20200810.001
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: unset
9
+ OpenAPI Generator version: 4.1.1
10
10
 
11
11
  =end
12
12
 
@@ -214,17 +214,17 @@ module OpenapiClient
214
214
  # Builds the object from hash
215
215
  # @param [Hash] attributes Model attributes in the form of hash
216
216
  # @return [Object] Returns the model itself
217
- def build_from_hash(attributes)
217
+ def build_from_hash(attributes, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types)
218
218
  return nil unless attributes.is_a?(Hash)
219
- self.class.openapi_types.each_pair do |key, type|
219
+ openapi_types.each_pair do |key, type|
220
220
  if type =~ /\AArray<(.*)>/i
221
221
  # check to ensure the input is an array given that the attribute
222
222
  # is documented as an array but the input is not
223
- if attributes[self.class.attribute_map[key]].is_a?(Array)
224
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
223
+ if attributes[attribute_map[key]].is_a?(Array)
224
+ self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) })
225
225
  end
226
- elsif !attributes[self.class.attribute_map[key]].nil?
227
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
226
+ elsif !attributes[attribute_map[key]].nil?
227
+ self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]]))
228
228
  end # or else data not found in attributes(hash), not an issue as the data can be optional
229
229
  end
230
230
 
@@ -268,7 +268,12 @@ module OpenapiClient
268
268
  end
269
269
  end
270
270
  else # model
271
- OpenapiClient.const_get(type).build_from_hash(value)
271
+ klass = OpenapiClient.const_get(type)
272
+ if klass.respond_to?(:openapi_discriminator_name)
273
+ klass = OpenapiClient.const_get(value[klass.attribute_map[klass.openapi_discriminator_name]])
274
+ end
275
+
276
+ klass.build_from_hash(value)
272
277
  end
273
278
  end
274
279
 
@@ -286,11 +291,15 @@ module OpenapiClient
286
291
 
287
292
  # Returns the object in the form of hash
288
293
  # @return [Hash] Returns the object in the form of hash
289
- def to_hash
294
+ def to_hash(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([]))
290
295
  hash = {}
291
- self.class.attribute_map.each_pair do |attr, param|
296
+ attribute_map.each_pair do |attr, param|
292
297
  value = self.send(attr)
293
- next if value.nil?
298
+ if value.nil?
299
+ is_nullable = openapi_nullable.include?(attr)
300
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
301
+ end
302
+
294
303
  hash[param] = _to_hash(value)
295
304
  end
296
305
  hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
5
5
 
6
- The version of the OpenAPI document: 6.9.1.20191223.002
6
+ The version of the OpenAPI document: 6.13.0.20200810.001
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: unset
9
+ OpenAPI Generator version: 4.1.1
10
10
 
11
11
  =end
12
12
 
@@ -145,17 +145,17 @@ module OpenapiClient
145
145
  # Builds the object from hash
146
146
  # @param [Hash] attributes Model attributes in the form of hash
147
147
  # @return [Object] Returns the model itself
148
- def build_from_hash(attributes)
148
+ def build_from_hash(attributes, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types)
149
149
  return nil unless attributes.is_a?(Hash)
150
- self.class.openapi_types.each_pair do |key, type|
150
+ openapi_types.each_pair do |key, type|
151
151
  if type =~ /\AArray<(.*)>/i
152
152
  # check to ensure the input is an array given that the attribute
153
153
  # is documented as an array but the input is not
154
- if attributes[self.class.attribute_map[key]].is_a?(Array)
155
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
154
+ if attributes[attribute_map[key]].is_a?(Array)
155
+ self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) })
156
156
  end
157
- elsif !attributes[self.class.attribute_map[key]].nil?
158
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
157
+ elsif !attributes[attribute_map[key]].nil?
158
+ self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]]))
159
159
  end # or else data not found in attributes(hash), not an issue as the data can be optional
160
160
  end
161
161
 
@@ -199,7 +199,12 @@ module OpenapiClient
199
199
  end
200
200
  end
201
201
  else # model
202
- OpenapiClient.const_get(type).build_from_hash(value)
202
+ klass = OpenapiClient.const_get(type)
203
+ if klass.respond_to?(:openapi_discriminator_name)
204
+ klass = OpenapiClient.const_get(value[klass.attribute_map[klass.openapi_discriminator_name]])
205
+ end
206
+
207
+ klass.build_from_hash(value)
203
208
  end
204
209
  end
205
210
 
@@ -217,11 +222,15 @@ module OpenapiClient
217
222
 
218
223
  # Returns the object in the form of hash
219
224
  # @return [Hash] Returns the object in the form of hash
220
- def to_hash
225
+ def to_hash(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([]))
221
226
  hash = {}
222
- self.class.attribute_map.each_pair do |attr, param|
227
+ attribute_map.each_pair do |attr, param|
223
228
  value = self.send(attr)
224
- next if value.nil?
229
+ if value.nil?
230
+ is_nullable = openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
225
234
  hash[param] = _to_hash(value)
226
235
  end
227
236
  hash
@@ -0,0 +1,784 @@
1
+ =begin
2
+ #Payment Gateway API Specification.
3
+
4
+ #The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
5
+
6
+ The version of the OpenAPI document: 6.13.0.20200810.001
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module OpenapiClient
16
+ # ACH means automated clearing house. Contains properties common across TeleCheck message types. Abstract class, do not use this class directly, use one of its children.
17
+ class TeleCheckAchPaymentMethod
18
+ # ACH application type values will be one of either TeleCheckICAPaymentMethod or TeleCheckCBPPaymentMethod.
19
+ attr_accessor :ach_type
20
+
21
+ # Bank routing number.
22
+ attr_accessor :routing_number
23
+
24
+ # Bank account number.
25
+ attr_accessor :account_number
26
+
27
+ # Identifies if the account type is checking or savings.
28
+ attr_accessor :account_type
29
+
30
+ # Check number.
31
+ attr_accessor :check_number
32
+
33
+ # Identifies if the check type is personal or company.
34
+ attr_accessor :check_type
35
+
36
+ # Identifies the product code in the transaction.
37
+ attr_accessor :product_code
38
+
39
+ attr_accessor :manual_id_info
40
+
41
+ attr_accessor :supplement_id_info
42
+
43
+ # Used to track the agent transaction activity.
44
+ attr_accessor :agent_id
45
+
46
+ # Identifies the register or lane number where the original sale transaction occurred.
47
+ attr_accessor :terminal_id
48
+
49
+ # Unique ID assigned by the merchant for the consumer (never recycled). It is an additional level of authentication. To use this feature, the merchant must work with TeleCheck Risk to discuss. Registration IDs must not be generated for an existing or returning consumer returns. The single registration ID must be unique per consumer.
50
+ attr_accessor :registration_id
51
+
52
+ # Date the consumer originally registered in format MMDDYYYY.
53
+ attr_accessor :registration_date
54
+
55
+ # Release type is used as a risk variable to gauge risk level when the merchant is releasing the purchased merchandise.
56
+ attr_accessor :release_type
57
+
58
+ # Flags a transaction as a VIP order (based on merchant criteria). This field should not be sent for non-VIP orders.
59
+ attr_accessor :vip_customer
60
+
61
+ # Session identifier.
62
+ attr_accessor :session_id
63
+
64
+ # Identifies the US state or territory where the original sale transaction occurred.
65
+ attr_accessor :terminal_state
66
+
67
+ # Identifies the city where the original sale transaction occurred.
68
+ attr_accessor :terminal_city
69
+
70
+ attr_accessor :ach_bill_to
71
+
72
+ class EnumAttributeValidator
73
+ attr_reader :datatype
74
+ attr_reader :allowable_values
75
+
76
+ def initialize(datatype, allowable_values)
77
+ @allowable_values = allowable_values.map do |value|
78
+ case datatype.to_s
79
+ when /Integer/i
80
+ value.to_i
81
+ when /Float/i
82
+ value.to_f
83
+ else
84
+ value
85
+ end
86
+ end
87
+ end
88
+
89
+ def valid?(value)
90
+ !value || allowable_values.include?(value)
91
+ end
92
+ end
93
+
94
+ # Attribute mapping from ruby-style variable name to JSON key.
95
+ def self.attribute_map
96
+ {
97
+ :'ach_type' => :'achType',
98
+ :'routing_number' => :'routingNumber',
99
+ :'account_number' => :'accountNumber',
100
+ :'account_type' => :'accountType',
101
+ :'check_number' => :'checkNumber',
102
+ :'check_type' => :'checkType',
103
+ :'product_code' => :'productCode',
104
+ :'manual_id_info' => :'manualIdInfo',
105
+ :'supplement_id_info' => :'supplementIdInfo',
106
+ :'agent_id' => :'agentId',
107
+ :'terminal_id' => :'terminalId',
108
+ :'registration_id' => :'registrationId',
109
+ :'registration_date' => :'registrationDate',
110
+ :'release_type' => :'releaseType',
111
+ :'vip_customer' => :'vipCustomer',
112
+ :'session_id' => :'sessionId',
113
+ :'terminal_state' => :'terminalState',
114
+ :'terminal_city' => :'terminalCity',
115
+ :'ach_bill_to' => :'achBillTo'
116
+ }
117
+ end
118
+
119
+ # Attribute type mapping.
120
+ def self.openapi_types
121
+ {
122
+ :'ach_type' => :'String',
123
+ :'routing_number' => :'String',
124
+ :'account_number' => :'String',
125
+ :'account_type' => :'String',
126
+ :'check_number' => :'String',
127
+ :'check_type' => :'String',
128
+ :'product_code' => :'String',
129
+ :'manual_id_info' => :'IdInfo',
130
+ :'supplement_id_info' => :'IdInfo',
131
+ :'agent_id' => :'String',
132
+ :'terminal_id' => :'String',
133
+ :'registration_id' => :'String',
134
+ :'registration_date' => :'Date',
135
+ :'release_type' => :'String',
136
+ :'vip_customer' => :'String',
137
+ :'session_id' => :'String',
138
+ :'terminal_state' => :'String',
139
+ :'terminal_city' => :'String',
140
+ :'ach_bill_to' => :'TeleCheckAchPaymentMethodAchBillTo'
141
+ }
142
+ end
143
+
144
+ # discriminator's property name in OpenAPI v3
145
+ def self.openapi_discriminator_name
146
+ :'ach_type'
147
+ end
148
+
149
+ # Initializes the object
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ def initialize(attributes = {})
152
+ if (!attributes.is_a?(Hash))
153
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::TeleCheckAchPaymentMethod` initialize method"
154
+ end
155
+
156
+ # check to see if the attribute exists and convert string to symbol for hash key
157
+ attributes = attributes.each_with_object({}) { |(k, v), h|
158
+ if (!self.class.attribute_map.key?(k.to_sym))
159
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::TeleCheckAchPaymentMethod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
160
+ end
161
+ h[k.to_sym] = v
162
+ }
163
+
164
+ if attributes.key?(:'ach_type')
165
+ self.ach_type = attributes[:'ach_type']
166
+ end
167
+
168
+ if attributes.key?(:'routing_number')
169
+ self.routing_number = attributes[:'routing_number']
170
+ end
171
+
172
+ if attributes.key?(:'account_number')
173
+ self.account_number = attributes[:'account_number']
174
+ end
175
+
176
+ if attributes.key?(:'account_type')
177
+ self.account_type = attributes[:'account_type']
178
+ end
179
+
180
+ if attributes.key?(:'check_number')
181
+ self.check_number = attributes[:'check_number']
182
+ end
183
+
184
+ if attributes.key?(:'check_type')
185
+ self.check_type = attributes[:'check_type']
186
+ end
187
+
188
+ if attributes.key?(:'product_code')
189
+ self.product_code = attributes[:'product_code']
190
+ end
191
+
192
+ if attributes.key?(:'manual_id_info')
193
+ self.manual_id_info = attributes[:'manual_id_info']
194
+ end
195
+
196
+ if attributes.key?(:'supplement_id_info')
197
+ self.supplement_id_info = attributes[:'supplement_id_info']
198
+ end
199
+
200
+ if attributes.key?(:'agent_id')
201
+ self.agent_id = attributes[:'agent_id']
202
+ end
203
+
204
+ if attributes.key?(:'terminal_id')
205
+ self.terminal_id = attributes[:'terminal_id']
206
+ end
207
+
208
+ if attributes.key?(:'registration_id')
209
+ self.registration_id = attributes[:'registration_id']
210
+ end
211
+
212
+ if attributes.key?(:'registration_date')
213
+ self.registration_date = attributes[:'registration_date']
214
+ end
215
+
216
+ if attributes.key?(:'release_type')
217
+ self.release_type = attributes[:'release_type']
218
+ end
219
+
220
+ if attributes.key?(:'vip_customer')
221
+ self.vip_customer = attributes[:'vip_customer']
222
+ end
223
+
224
+ if attributes.key?(:'session_id')
225
+ self.session_id = attributes[:'session_id']
226
+ end
227
+
228
+ if attributes.key?(:'terminal_state')
229
+ self.terminal_state = attributes[:'terminal_state']
230
+ end
231
+
232
+ if attributes.key?(:'terminal_city')
233
+ self.terminal_city = attributes[:'terminal_city']
234
+ end
235
+
236
+ if attributes.key?(:'ach_bill_to')
237
+ self.ach_bill_to = attributes[:'ach_bill_to']
238
+ end
239
+ end
240
+
241
+ # Show invalid properties with the reasons. Usually used together with valid?
242
+ # @return Array for valid properties with the reasons
243
+ def list_invalid_properties
244
+ invalid_properties = Array.new
245
+ if @ach_type.nil?
246
+ invalid_properties.push('invalid value for "ach_type", ach_type cannot be nil.')
247
+ end
248
+
249
+ if @routing_number.nil?
250
+ invalid_properties.push('invalid value for "routing_number", routing_number cannot be nil.')
251
+ end
252
+
253
+ if @routing_number.to_s.length > 9
254
+ invalid_properties.push('invalid value for "routing_number", the character length must be smaller than or equal to 9.')
255
+ end
256
+
257
+ if @routing_number.to_s.length < 9
258
+ invalid_properties.push('invalid value for "routing_number", the character length must be great than or equal to 9.')
259
+ end
260
+
261
+ pattern = Regexp.new(/^[0-9]+$/)
262
+ if @routing_number !~ pattern
263
+ invalid_properties.push("invalid value for \"routing_number\", must conform to the pattern #{pattern}.")
264
+ end
265
+
266
+ if @account_number.nil?
267
+ invalid_properties.push('invalid value for "account_number", account_number cannot be nil.')
268
+ end
269
+
270
+ if @account_number.to_s.length > 56
271
+ invalid_properties.push('invalid value for "account_number", the character length must be smaller than or equal to 56.')
272
+ end
273
+
274
+ if @account_number.to_s.length < 1
275
+ invalid_properties.push('invalid value for "account_number", the character length must be great than or equal to 1.')
276
+ end
277
+
278
+ pattern = Regexp.new(/^[0-9]+$/)
279
+ if @account_number !~ pattern
280
+ invalid_properties.push("invalid value for \"account_number\", must conform to the pattern #{pattern}.")
281
+ end
282
+
283
+ if @account_type.nil?
284
+ invalid_properties.push('invalid value for "account_type", account_type cannot be nil.')
285
+ end
286
+
287
+ if !@check_number.nil? && @check_number.to_s.length > 10
288
+ invalid_properties.push('invalid value for "check_number", the character length must be smaller than or equal to 10.')
289
+ end
290
+
291
+ pattern = Regexp.new(/^[0-9]+$/)
292
+ if !@check_number.nil? && @check_number !~ pattern
293
+ invalid_properties.push("invalid value for \"check_number\", must conform to the pattern #{pattern}.")
294
+ end
295
+
296
+ if @check_type.nil?
297
+ invalid_properties.push('invalid value for "check_type", check_type cannot be nil.')
298
+ end
299
+
300
+ if !@product_code.nil? && @product_code.to_s.length > 6
301
+ invalid_properties.push('invalid value for "product_code", the character length must be smaller than or equal to 6.')
302
+ end
303
+
304
+ pattern = Regexp.new(/^[0-9]+$/)
305
+ if !@product_code.nil? && @product_code !~ pattern
306
+ invalid_properties.push("invalid value for \"product_code\", must conform to the pattern #{pattern}.")
307
+ end
308
+
309
+ if !@agent_id.nil? && @agent_id.to_s.length > 6
310
+ invalid_properties.push('invalid value for "agent_id", the character length must be smaller than or equal to 6.')
311
+ end
312
+
313
+ pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/)
314
+ if !@agent_id.nil? && @agent_id !~ pattern
315
+ invalid_properties.push("invalid value for \"agent_id\", must conform to the pattern #{pattern}.")
316
+ end
317
+
318
+ if !@terminal_id.nil? && @terminal_id.to_s.length > 10
319
+ invalid_properties.push('invalid value for "terminal_id", the character length must be smaller than or equal to 10.')
320
+ end
321
+
322
+ pattern = Regexp.new(/^[0-9]+$/)
323
+ if !@terminal_id.nil? && @terminal_id !~ pattern
324
+ invalid_properties.push("invalid value for \"terminal_id\", must conform to the pattern #{pattern}.")
325
+ end
326
+
327
+ if !@registration_id.nil? && @registration_id.to_s.length > 50
328
+ invalid_properties.push('invalid value for "registration_id", the character length must be smaller than or equal to 50.')
329
+ end
330
+
331
+ pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/)
332
+ if !@registration_id.nil? && @registration_id !~ pattern
333
+ invalid_properties.push("invalid value for \"registration_id\", must conform to the pattern #{pattern}.")
334
+ end
335
+
336
+ if @session_id.nil?
337
+ invalid_properties.push('invalid value for "session_id", session_id cannot be nil.')
338
+ end
339
+
340
+ if @session_id.to_s.length > 128
341
+ invalid_properties.push('invalid value for "session_id", the character length must be smaller than or equal to 128.')
342
+ end
343
+
344
+ pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/)
345
+ if @session_id !~ pattern
346
+ invalid_properties.push("invalid value for \"session_id\", must conform to the pattern #{pattern}.")
347
+ end
348
+
349
+ if !@terminal_state.nil? && @terminal_state.to_s.length > 2
350
+ invalid_properties.push('invalid value for "terminal_state", the character length must be smaller than or equal to 2.')
351
+ end
352
+
353
+ pattern = Regexp.new(/^[A-Z]{2}$/)
354
+ if !@terminal_state.nil? && @terminal_state !~ pattern
355
+ invalid_properties.push("invalid value for \"terminal_state\", must conform to the pattern #{pattern}.")
356
+ end
357
+
358
+ if !@terminal_city.nil? && @terminal_city.to_s.length > 16
359
+ invalid_properties.push('invalid value for "terminal_city", the character length must be smaller than or equal to 16.')
360
+ end
361
+
362
+ pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/)
363
+ if !@terminal_city.nil? && @terminal_city !~ pattern
364
+ invalid_properties.push("invalid value for \"terminal_city\", must conform to the pattern #{pattern}.")
365
+ end
366
+
367
+ if @ach_bill_to.nil?
368
+ invalid_properties.push('invalid value for "ach_bill_to", ach_bill_to cannot be nil.')
369
+ end
370
+
371
+ invalid_properties
372
+ end
373
+
374
+ # Check to see if the all the properties in the model are valid
375
+ # @return true if the model is valid
376
+ def valid?
377
+ return false if @ach_type.nil?
378
+ return false if @routing_number.nil?
379
+ return false if @routing_number.to_s.length > 9
380
+ return false if @routing_number.to_s.length < 9
381
+ return false if @routing_number !~ Regexp.new(/^[0-9]+$/)
382
+ return false if @account_number.nil?
383
+ return false if @account_number.to_s.length > 56
384
+ return false if @account_number.to_s.length < 1
385
+ return false if @account_number !~ Regexp.new(/^[0-9]+$/)
386
+ return false if @account_type.nil?
387
+ account_type_validator = EnumAttributeValidator.new('String', ["C", "S"])
388
+ return false unless account_type_validator.valid?(@account_type)
389
+ return false if !@check_number.nil? && @check_number.to_s.length > 10
390
+ return false if !@check_number.nil? && @check_number !~ Regexp.new(/^[0-9]+$/)
391
+ return false if @check_type.nil?
392
+ check_type_validator = EnumAttributeValidator.new('String', ["P", "C"])
393
+ return false unless check_type_validator.valid?(@check_type)
394
+ return false if !@product_code.nil? && @product_code.to_s.length > 6
395
+ return false if !@product_code.nil? && @product_code !~ Regexp.new(/^[0-9]+$/)
396
+ return false if !@agent_id.nil? && @agent_id.to_s.length > 6
397
+ return false if !@agent_id.nil? && @agent_id !~ Regexp.new(/(?=.*[^\s])^[^|]+$/)
398
+ return false if !@terminal_id.nil? && @terminal_id.to_s.length > 10
399
+ return false if !@terminal_id.nil? && @terminal_id !~ Regexp.new(/^[0-9]+$/)
400
+ return false if !@registration_id.nil? && @registration_id.to_s.length > 50
401
+ return false if !@registration_id.nil? && @registration_id !~ Regexp.new(/(?=.*[^\s])^[^|]+$/)
402
+ release_type_validator = EnumAttributeValidator.new('String', ["C", "D", "P", "T"])
403
+ return false unless release_type_validator.valid?(@release_type)
404
+ vip_customer_validator = EnumAttributeValidator.new('String', ["Y", "N"])
405
+ return false unless vip_customer_validator.valid?(@vip_customer)
406
+ return false if @session_id.nil?
407
+ return false if @session_id.to_s.length > 128
408
+ return false if @session_id !~ Regexp.new(/(?=.*[^\s])^[^|]+$/)
409
+ return false if !@terminal_state.nil? && @terminal_state.to_s.length > 2
410
+ return false if !@terminal_state.nil? && @terminal_state !~ Regexp.new(/^[A-Z]{2}$/)
411
+ return false if !@terminal_city.nil? && @terminal_city.to_s.length > 16
412
+ return false if !@terminal_city.nil? && @terminal_city !~ Regexp.new(/(?=.*[^\s])^[^|]+$/)
413
+ return false if @ach_bill_to.nil?
414
+ true
415
+ end
416
+
417
+ # Custom attribute writer method with validation
418
+ # @param [Object] routing_number Value to be assigned
419
+ def routing_number=(routing_number)
420
+ if routing_number.nil?
421
+ fail ArgumentError, 'routing_number cannot be nil'
422
+ end
423
+
424
+ if routing_number.to_s.length > 9
425
+ fail ArgumentError, 'invalid value for "routing_number", the character length must be smaller than or equal to 9.'
426
+ end
427
+
428
+ if routing_number.to_s.length < 9
429
+ fail ArgumentError, 'invalid value for "routing_number", the character length must be great than or equal to 9.'
430
+ end
431
+
432
+ pattern = Regexp.new(/^[0-9]+$/)
433
+ if routing_number !~ pattern
434
+ fail ArgumentError, "invalid value for \"routing_number\", must conform to the pattern #{pattern}."
435
+ end
436
+
437
+ @routing_number = routing_number
438
+ end
439
+
440
+ # Custom attribute writer method with validation
441
+ # @param [Object] account_number Value to be assigned
442
+ def account_number=(account_number)
443
+ if account_number.nil?
444
+ fail ArgumentError, 'account_number cannot be nil'
445
+ end
446
+
447
+ if account_number.to_s.length > 56
448
+ fail ArgumentError, 'invalid value for "account_number", the character length must be smaller than or equal to 56.'
449
+ end
450
+
451
+ if account_number.to_s.length < 1
452
+ fail ArgumentError, 'invalid value for "account_number", the character length must be great than or equal to 1.'
453
+ end
454
+
455
+ pattern = Regexp.new(/^[0-9]+$/)
456
+ if account_number !~ pattern
457
+ fail ArgumentError, "invalid value for \"account_number\", must conform to the pattern #{pattern}."
458
+ end
459
+
460
+ @account_number = account_number
461
+ end
462
+
463
+ # Custom attribute writer method checking allowed values (enum).
464
+ # @param [Object] account_type Object to be assigned
465
+ def account_type=(account_type)
466
+ validator = EnumAttributeValidator.new('String', ["C", "S"])
467
+ unless validator.valid?(account_type)
468
+ fail ArgumentError, "invalid value for \"account_type\", must be one of #{validator.allowable_values}."
469
+ end
470
+ @account_type = account_type
471
+ end
472
+
473
+ # Custom attribute writer method with validation
474
+ # @param [Object] check_number Value to be assigned
475
+ def check_number=(check_number)
476
+ if !check_number.nil? && check_number.to_s.length > 10
477
+ fail ArgumentError, 'invalid value for "check_number", the character length must be smaller than or equal to 10.'
478
+ end
479
+
480
+ pattern = Regexp.new(/^[0-9]+$/)
481
+ if !check_number.nil? && check_number !~ pattern
482
+ fail ArgumentError, "invalid value for \"check_number\", must conform to the pattern #{pattern}."
483
+ end
484
+
485
+ @check_number = check_number
486
+ end
487
+
488
+ # Custom attribute writer method checking allowed values (enum).
489
+ # @param [Object] check_type Object to be assigned
490
+ def check_type=(check_type)
491
+ validator = EnumAttributeValidator.new('String', ["P", "C"])
492
+ unless validator.valid?(check_type)
493
+ fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
494
+ end
495
+ @check_type = check_type
496
+ end
497
+
498
+ # Custom attribute writer method with validation
499
+ # @param [Object] product_code Value to be assigned
500
+ def product_code=(product_code)
501
+ if !product_code.nil? && product_code.to_s.length > 6
502
+ fail ArgumentError, 'invalid value for "product_code", the character length must be smaller than or equal to 6.'
503
+ end
504
+
505
+ pattern = Regexp.new(/^[0-9]+$/)
506
+ if !product_code.nil? && product_code !~ pattern
507
+ fail ArgumentError, "invalid value for \"product_code\", must conform to the pattern #{pattern}."
508
+ end
509
+
510
+ @product_code = product_code
511
+ end
512
+
513
+ # Custom attribute writer method with validation
514
+ # @param [Object] agent_id Value to be assigned
515
+ def agent_id=(agent_id)
516
+ if !agent_id.nil? && agent_id.to_s.length > 6
517
+ fail ArgumentError, 'invalid value for "agent_id", the character length must be smaller than or equal to 6.'
518
+ end
519
+
520
+ pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/)
521
+ if !agent_id.nil? && agent_id !~ pattern
522
+ fail ArgumentError, "invalid value for \"agent_id\", must conform to the pattern #{pattern}."
523
+ end
524
+
525
+ @agent_id = agent_id
526
+ end
527
+
528
+ # Custom attribute writer method with validation
529
+ # @param [Object] terminal_id Value to be assigned
530
+ def terminal_id=(terminal_id)
531
+ if !terminal_id.nil? && terminal_id.to_s.length > 10
532
+ fail ArgumentError, 'invalid value for "terminal_id", the character length must be smaller than or equal to 10.'
533
+ end
534
+
535
+ pattern = Regexp.new(/^[0-9]+$/)
536
+ if !terminal_id.nil? && terminal_id !~ pattern
537
+ fail ArgumentError, "invalid value for \"terminal_id\", must conform to the pattern #{pattern}."
538
+ end
539
+
540
+ @terminal_id = terminal_id
541
+ end
542
+
543
+ # Custom attribute writer method with validation
544
+ # @param [Object] registration_id Value to be assigned
545
+ def registration_id=(registration_id)
546
+ if !registration_id.nil? && registration_id.to_s.length > 50
547
+ fail ArgumentError, 'invalid value for "registration_id", the character length must be smaller than or equal to 50.'
548
+ end
549
+
550
+ pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/)
551
+ if !registration_id.nil? && registration_id !~ pattern
552
+ fail ArgumentError, "invalid value for \"registration_id\", must conform to the pattern #{pattern}."
553
+ end
554
+
555
+ @registration_id = registration_id
556
+ end
557
+
558
+ # Custom attribute writer method checking allowed values (enum).
559
+ # @param [Object] release_type Object to be assigned
560
+ def release_type=(release_type)
561
+ validator = EnumAttributeValidator.new('String', ["C", "D", "P", "T"])
562
+ unless validator.valid?(release_type)
563
+ fail ArgumentError, "invalid value for \"release_type\", must be one of #{validator.allowable_values}."
564
+ end
565
+ @release_type = release_type
566
+ end
567
+
568
+ # Custom attribute writer method checking allowed values (enum).
569
+ # @param [Object] vip_customer Object to be assigned
570
+ def vip_customer=(vip_customer)
571
+ validator = EnumAttributeValidator.new('String', ["Y", "N"])
572
+ unless validator.valid?(vip_customer)
573
+ fail ArgumentError, "invalid value for \"vip_customer\", must be one of #{validator.allowable_values}."
574
+ end
575
+ @vip_customer = vip_customer
576
+ end
577
+
578
+ # Custom attribute writer method with validation
579
+ # @param [Object] session_id Value to be assigned
580
+ def session_id=(session_id)
581
+ if session_id.nil?
582
+ fail ArgumentError, 'session_id cannot be nil'
583
+ end
584
+
585
+ if session_id.to_s.length > 128
586
+ fail ArgumentError, 'invalid value for "session_id", the character length must be smaller than or equal to 128.'
587
+ end
588
+
589
+ pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/)
590
+ if session_id !~ pattern
591
+ fail ArgumentError, "invalid value for \"session_id\", must conform to the pattern #{pattern}."
592
+ end
593
+
594
+ @session_id = session_id
595
+ end
596
+
597
+ # Custom attribute writer method with validation
598
+ # @param [Object] terminal_state Value to be assigned
599
+ def terminal_state=(terminal_state)
600
+ if !terminal_state.nil? && terminal_state.to_s.length > 2
601
+ fail ArgumentError, 'invalid value for "terminal_state", the character length must be smaller than or equal to 2.'
602
+ end
603
+
604
+ pattern = Regexp.new(/^[A-Z]{2}$/)
605
+ if !terminal_state.nil? && terminal_state !~ pattern
606
+ fail ArgumentError, "invalid value for \"terminal_state\", must conform to the pattern #{pattern}."
607
+ end
608
+
609
+ @terminal_state = terminal_state
610
+ end
611
+
612
+ # Custom attribute writer method with validation
613
+ # @param [Object] terminal_city Value to be assigned
614
+ def terminal_city=(terminal_city)
615
+ if !terminal_city.nil? && terminal_city.to_s.length > 16
616
+ fail ArgumentError, 'invalid value for "terminal_city", the character length must be smaller than or equal to 16.'
617
+ end
618
+
619
+ pattern = Regexp.new(/(?=.*[^\s])^[^|]+$/)
620
+ if !terminal_city.nil? && terminal_city !~ pattern
621
+ fail ArgumentError, "invalid value for \"terminal_city\", must conform to the pattern #{pattern}."
622
+ end
623
+
624
+ @terminal_city = terminal_city
625
+ end
626
+
627
+ # Checks equality by comparing each attribute.
628
+ # @param [Object] Object to be compared
629
+ def ==(o)
630
+ return true if self.equal?(o)
631
+ self.class == o.class &&
632
+ ach_type == o.ach_type &&
633
+ routing_number == o.routing_number &&
634
+ account_number == o.account_number &&
635
+ account_type == o.account_type &&
636
+ check_number == o.check_number &&
637
+ check_type == o.check_type &&
638
+ product_code == o.product_code &&
639
+ manual_id_info == o.manual_id_info &&
640
+ supplement_id_info == o.supplement_id_info &&
641
+ agent_id == o.agent_id &&
642
+ terminal_id == o.terminal_id &&
643
+ registration_id == o.registration_id &&
644
+ registration_date == o.registration_date &&
645
+ release_type == o.release_type &&
646
+ vip_customer == o.vip_customer &&
647
+ session_id == o.session_id &&
648
+ terminal_state == o.terminal_state &&
649
+ terminal_city == o.terminal_city &&
650
+ ach_bill_to == o.ach_bill_to
651
+ end
652
+
653
+ # @see the `==` method
654
+ # @param [Object] Object to be compared
655
+ def eql?(o)
656
+ self == o
657
+ end
658
+
659
+ # Calculates hash code according to all attributes.
660
+ # @return [Integer] Hash code
661
+ def hash
662
+ [ach_type, routing_number, account_number, account_type, check_number, check_type, product_code, manual_id_info, supplement_id_info, agent_id, terminal_id, registration_id, registration_date, release_type, vip_customer, session_id, terminal_state, terminal_city, ach_bill_to].hash
663
+ end
664
+
665
+ # Builds the object from hash
666
+ # @param [Hash] attributes Model attributes in the form of hash
667
+ # @return [Object] Returns the model itself
668
+ def self.build_from_hash(attributes)
669
+ new.build_from_hash(attributes)
670
+ end
671
+
672
+ # Builds the object from hash
673
+ # @param [Hash] attributes Model attributes in the form of hash
674
+ # @return [Object] Returns the model itself
675
+ def build_from_hash(attributes, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types)
676
+ return nil unless attributes.is_a?(Hash)
677
+ openapi_types.each_pair do |key, type|
678
+ if type =~ /\AArray<(.*)>/i
679
+ # check to ensure the input is an array given that the attribute
680
+ # is documented as an array but the input is not
681
+ if attributes[attribute_map[key]].is_a?(Array)
682
+ self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) })
683
+ end
684
+ elsif !attributes[attribute_map[key]].nil?
685
+ self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]]))
686
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
687
+ end
688
+
689
+ self
690
+ end
691
+
692
+ # Deserializes the data based on type
693
+ # @param string type Data type
694
+ # @param string value Value to be deserialized
695
+ # @return [Object] Deserialized data
696
+ def _deserialize(type, value)
697
+ case type.to_sym
698
+ when :DateTime
699
+ DateTime.parse(value)
700
+ when :Date
701
+ Date.parse(value)
702
+ when :String
703
+ value.to_s
704
+ when :Integer
705
+ value.to_i
706
+ when :Float
707
+ value.to_f
708
+ when :Boolean
709
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
710
+ true
711
+ else
712
+ false
713
+ end
714
+ when :Object
715
+ # generic object (usually a Hash), return directly
716
+ value
717
+ when /\AArray<(?<inner_type>.+)>\z/
718
+ inner_type = Regexp.last_match[:inner_type]
719
+ value.map { |v| _deserialize(inner_type, v) }
720
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
721
+ k_type = Regexp.last_match[:k_type]
722
+ v_type = Regexp.last_match[:v_type]
723
+ {}.tap do |hash|
724
+ value.each do |k, v|
725
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
726
+ end
727
+ end
728
+ else # model
729
+ klass = OpenapiClient.const_get(type)
730
+ if klass.respond_to?(:openapi_discriminator_name)
731
+ klass = OpenapiClient.const_get(value[klass.attribute_map[klass.openapi_discriminator_name]])
732
+ end
733
+
734
+ klass.build_from_hash(value)
735
+ end
736
+ end
737
+
738
+ # Returns the string representation of the object
739
+ # @return [String] String presentation of the object
740
+ def to_s
741
+ to_hash.to_s
742
+ end
743
+
744
+ # to_body is an alias to to_hash (backward compatibility)
745
+ # @return [Hash] Returns the object in the form of hash
746
+ def to_body
747
+ to_hash
748
+ end
749
+
750
+ # Returns the object in the form of hash
751
+ # @return [Hash] Returns the object in the form of hash
752
+ def to_hash(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([]))
753
+ hash = {}
754
+ attribute_map.each_pair do |attr, param|
755
+ value = self.send(attr)
756
+ if value.nil?
757
+ is_nullable = openapi_nullable.include?(attr)
758
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
759
+ end
760
+
761
+ hash[param] = _to_hash(value)
762
+ end
763
+ hash
764
+ end
765
+
766
+ # Outputs non-array value in the form of hash
767
+ # For object, use to_hash. Otherwise, just return the value
768
+ # @param [Object] value Any valid value
769
+ # @return [Hash] Returns the value in the form of hash
770
+ def _to_hash(value)
771
+ if value.is_a?(Array)
772
+ value.compact.map { |v| _to_hash(v) }
773
+ elsif value.is_a?(Hash)
774
+ {}.tap do |hash|
775
+ value.each { |k, v| hash[k] = _to_hash(v) }
776
+ end
777
+ elsif value.respond_to? :to_hash
778
+ value.to_hash
779
+ else
780
+ value
781
+ end
782
+ end
783
+ end
784
+ end