genesis_ruby 0.1.7 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/Gemfile.lock +45 -39
  4. data/README.md +246 -0
  5. data/VERSION +1 -1
  6. data/lib/genesis_ruby/api/constants/transactions/parameters/cash_payments/company_types.rb +45 -0
  7. data/lib/genesis_ruby/api/constants/transactions/parameters/cash_payments/genders.rb +27 -0
  8. data/lib/genesis_ruby/api/constants/transactions/parameters/cash_payments/marital_statuses.rb +39 -0
  9. data/lib/genesis_ruby/api/constants/transactions/parameters/mobile/apple_pay/payment_subtypes.rb +29 -0
  10. data/lib/genesis_ruby/api/constants/transactions/parameters/mobile/google_pay/payment_subtypes.rb +29 -0
  11. data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_code_currencies.rb +128 -0
  12. data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_codes.rb +600 -0
  13. data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/payment_types.rb +36 -0
  14. data/lib/genesis_ruby/api/constants/transactions/parameters/wallets/pay_pal/payment_types.rb +31 -0
  15. data/lib/genesis_ruby/api/mixins/requests/attribute_validation.rb +138 -4
  16. data/lib/genesis_ruby/api/mixins/requests/birth_date_attributes.rb +22 -0
  17. data/lib/genesis_ruby/api/mixins/requests/customer_address/billing_info_attributes.rb +11 -10
  18. data/lib/genesis_ruby/api/mixins/requests/customer_address/customer_info_attributes.rb +1 -1
  19. data/lib/genesis_ruby/api/mixins/requests/customer_address/shipping_info_attributes.rb +11 -10
  20. data/lib/genesis_ruby/api/mixins/requests/financial/cards/credit_card_attributes.rb +7 -0
  21. data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_attributes.rb +21 -20
  22. data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_indian_card_attributes.rb +15 -39
  23. data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/recurring_type_attributes.rb +15 -9
  24. data/lib/genesis_ruby/api/mixins/requests/financial/cards/tokenization_attributes.rb +9 -0
  25. data/lib/genesis_ruby/api/mixins/requests/financial/consumer_identifier_attributes.rb +26 -0
  26. data/lib/genesis_ruby/api/mixins/requests/financial/mobile/apple_pay_token_attributes.rb +51 -0
  27. data/lib/genesis_ruby/api/mixins/requests/financial/mobile/google_pay_token_attributes.rb +50 -0
  28. data/lib/genesis_ruby/api/mixins/requests/financial/online_banking_payments/virtual_payment_address_attributes.rb +27 -0
  29. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/browser.rb +11 -22
  30. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/card_holder_account.rb +81 -49
  31. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/common_attributes.rb +23 -0
  32. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/control.rb +13 -26
  33. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/merchant_risk.rb +21 -58
  34. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/purchase.rb +8 -11
  35. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/sdk.rb +10 -10
  36. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/wpf_attributes.rb +9 -0
  37. data/lib/genesis_ruby/api/request.rb +4 -2
  38. data/lib/genesis_ruby/api/requests/base/financials/credit_card.rb +6 -4
  39. data/lib/genesis_ruby/api/requests/base/financials/south_american_payments.rb +59 -0
  40. data/lib/genesis_ruby/api/requests/base/reference.rb +3 -2
  41. data/lib/genesis_ruby/api/requests/financial/cards/argencard.rb +26 -0
  42. data/lib/genesis_ruby/api/requests/financial/cards/aura.rb +26 -0
  43. data/lib/genesis_ruby/api/requests/financial/cards/authorize.rb +10 -2
  44. data/lib/genesis_ruby/api/requests/financial/cards/authorize3d.rb +19 -10
  45. data/lib/genesis_ruby/api/requests/financial/cards/cabal.rb +26 -0
  46. data/lib/genesis_ruby/api/requests/financial/cards/cencosud.rb +26 -0
  47. data/lib/genesis_ruby/api/requests/financial/cards/elo.rb +26 -0
  48. data/lib/genesis_ruby/api/requests/financial/cards/naranja.rb +26 -0
  49. data/lib/genesis_ruby/api/requests/financial/cards/nativa.rb +26 -0
  50. data/lib/genesis_ruby/api/requests/financial/cards/sale.rb +10 -2
  51. data/lib/genesis_ruby/api/requests/financial/cards/sale3d.rb +19 -10
  52. data/lib/genesis_ruby/api/requests/financial/cards/tarjeta_shopping.rb +26 -0
  53. data/lib/genesis_ruby/api/requests/financial/cards/threeds/v2/method_continue.rb +2 -2
  54. data/lib/genesis_ruby/api/requests/financial/cash_payments/baloto.rb +26 -0
  55. data/lib/genesis_ruby/api/requests/financial/cash_payments/banco_de_occidente.rb +26 -0
  56. data/lib/genesis_ruby/api/requests/financial/cash_payments/boleto.rb +26 -0
  57. data/lib/genesis_ruby/api/requests/financial/cash_payments/efecty.rb +26 -0
  58. data/lib/genesis_ruby/api/requests/financial/cash_payments/oxxo.rb +26 -0
  59. data/lib/genesis_ruby/api/requests/financial/cash_payments/pago_facil.rb +26 -0
  60. data/lib/genesis_ruby/api/requests/financial/cash_payments/pix.rb +92 -0
  61. data/lib/genesis_ruby/api/requests/financial/cash_payments/redpagos.rb +26 -0
  62. data/lib/genesis_ruby/api/requests/financial/mobile/apple_pay.rb +91 -0
  63. data/lib/genesis_ruby/api/requests/financial/mobile/google_pay.rb +108 -0
  64. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/bancomer.rb +33 -0
  65. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/bradesco.rb +33 -0
  66. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/davivienda.rb +34 -0
  67. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/itau.rb +33 -0
  68. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/online_banking/pay_in.rb +157 -0
  69. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/pse.rb +33 -0
  70. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/rapi_pago.rb +33 -0
  71. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/santander.rb +33 -0
  72. data/lib/genesis_ruby/api/requests/financial/online_banking_payments/webpay.rb +33 -0
  73. data/lib/genesis_ruby/api/requests/financial/void.rb +2 -2
  74. data/lib/genesis_ruby/api/requests/financial/wallets/pay_pay.rb +65 -0
  75. data/lib/genesis_ruby/api/requests/non_financial/reconcile/date_range.rb +2 -2
  76. data/lib/genesis_ruby/api/requests/wpf/create.rb +11 -15
  77. data/lib/genesis_ruby/api/requests/wpf/reconcile.rb +2 -2
  78. data/lib/genesis_ruby/dependencies.rb +1 -0
  79. data/lib/genesis_ruby/utils/common.rb +26 -0
  80. data/lib/genesis_ruby/version.rb +1 -1
  81. metadata +46 -3
@@ -0,0 +1,128 @@
1
+ require 'genesis_ruby/api/constants/transactions/parameters/online_banking/bank_codes'
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Constants
6
+ module Transactions
7
+ module Parameters
8
+ module OnlineBanking
9
+ # Bank Code Currencies allowed values
10
+ class BankCodeCurrencies # rubocop:disable Metrics/ClassLength
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ CURRENCIES = {
15
+ AUD: [
16
+ BankCodes::PID
17
+ ],
18
+ BRL: [
19
+ BankCodes::CA
20
+ ],
21
+ CAD: [
22
+ BankCodes::CPI
23
+ ],
24
+ CHF: [
25
+ BankCodes::PF
26
+ ],
27
+ CNY: [
28
+ BankCodes::ABC, BankCodes::BOB, BankCodes::BOC, BankCodes::BOCO, BankCodes::CCB, BankCodes::CCD,
29
+ BankCodes::CEB, BankCodes::CIB, BankCodes::CMB, BankCodes::CMBC, BankCodes::CITIC, BankCodes::ICBC,
30
+ BankCodes::GDB, BankCodes::HXB, BankCodes::PINGANBANK, BankCodes::PSBC, BankCodes::QUICKPAY,
31
+ BankCodes::SHB, BankCodes::SPABANK, BankCodes::SPDB, BankCodes::YLB
32
+ ],
33
+ CLP: [
34
+ BankCodes::SP
35
+ ],
36
+ EUR: [
37
+ BankCodes::PF, BankCodes::BCT, BankCodes::TRL
38
+ ],
39
+ THB: [
40
+ BankCodes::BBL_IB_U, BankCodes::KBANK_PAYPLUS, BankCodes::BAY_IB_U, BankCodes::KTB_IB_U,
41
+ BankCodes::SCB_IB_U
42
+ ],
43
+ USD: [
44
+ BankCodes::SN, BankCodes::IT, BankCodes::BR, BankCodes::BB, BankCodes::WP, BankCodes::BN,
45
+ BankCodes::PS, BankCodes::BO
46
+ ],
47
+ MYR: [
48
+ BankCodes::FPX_ABB, BankCodes::FPX_ABMB, BankCodes::FPX_AMB, BankCodes::FPX_BIMB, BankCodes::FPX_BMMB,
49
+ BankCodes::FPX_BKRM, BankCodes::FPX_BSN, BankCodes::FPX_CIMBCLICKS, BankCodes::FPX_HLB,
50
+ BankCodes::FPX_KFH, BankCodes::FPX_MB2U, BankCodes::FPX_OCBC, BankCodes::FPX_PBB, BankCodes::FPX_RHB,
51
+ BankCodes::FPX_SCB, BankCodes::FPX_UOB
52
+ ],
53
+ PEN: [
54
+ BankCodes::BC, BankCodes::IB, BankCodes::EF, BankCodes::BP
55
+ ],
56
+ PYG: [
57
+ BankCodes::PE
58
+ ],
59
+ IDR: [
60
+ BankCodes::DK_BCA_IB, BankCodes::DK_BRI_IB, BankCodes::DK_CIMBCLICKS_IB, BankCodes::DK_DANAMON_IB,
61
+ BankCodes::DK_PERMATANET_IB
62
+ ],
63
+ INR: [
64
+ BankCodes::ABPB, BankCodes::AIRP, BankCodes::ALLA, BankCodes::ANDB, BankCodes::BARB_R,
65
+ BankCodes::BBKM, BankCodes::BKDN, BankCodes::BKID, BankCodes::CBIN, BankCodes::CIUB, BankCodes::CNRB,
66
+ BankCodes::CORP, BankCodes::COSB, BankCodes::CSBK, BankCodes::DBSS, BankCodes::DCBL, BankCodes::DEUT,
67
+ BankCodes::DLXB, BankCodes::ESFB, BankCodes::FDRL, BankCodes::HDFC, BankCodes::IBKL, BankCodes::ICIC,
68
+ BankCodes::IDFB, BankCodes::IDIB, BankCodes::INDB, BankCodes::IOBA, BankCodes::JAKA, BankCodes::JSBP,
69
+ BankCodes::KARB, BankCodes::KKBK, BankCodes::KVBL, BankCodes::LAVB_C, BankCodes::LAVB_R,
70
+ BankCodes::MAHB, BankCodes::NKGS, BankCodes::ORBC, BankCodes::PMCB, BankCodes::PSIB,
71
+ BankCodes::PUNB_R, BankCodes::RATN, BankCodes::SBBJ, BankCodes::SBHY, BankCodes::SBIN,
72
+ BankCodes::SBMY, BankCodes::SBTR, BankCodes::SCBL, BankCodes::SIBL, BankCodes::SRCB, BankCodes::STBP,
73
+ BankCodes::SVCB, BankCodes::SYNB, BankCodes::TMBL, BankCodes::TNSC, BankCodes::UBIN, BankCodes::UCBA,
74
+ BankCodes::UTBI, BankCodes::UTIB, BankCodes::VIJB, BankCodes::YESB
75
+ ],
76
+ MXN: [
77
+ BankCodes::SE, BankCodes::BQ
78
+ ],
79
+ PHP: [
80
+ BankCodes::DRAGONPAY
81
+ ],
82
+ SGD: [
83
+ BankCodes::DBS, BankCodes::UOB, BankCodes::OCBC, BankCodes::SCB
84
+ ],
85
+ UYU: [
86
+ BankCodes::AI
87
+ ],
88
+ VND: [
89
+ BankCodes::VTCP_VPBANK, BankCodes::VTCP_ABBANK, BankCodes::VTCP_ACB, BankCodes::VTCP_AGRIBANK,
90
+ BankCodes::VTCP_BACABANK, BankCodes::VTCP_BIDV, BankCodes::VTCP_BVB, BankCodes::VTCP_DONGABANK,
91
+ BankCodes::VTCP_EXIMBANK, BankCodes::VTCP_GPBANK, BankCodes::VTCP_HDBANK, BankCodes::VTCP_LVPB,
92
+ BankCodes::VTCP_MB, BankCodes::VTCP_MARITIMEBANK, BankCodes::VTCP_NAMABANK, BankCodes::VTCP_NAVIBANK,
93
+ BankCodes::VTCP_OCEANBANK, BankCodes::VTCP_PGBANK, BankCodes::VTCP_PHUONGDONG, BankCodes::VTCP_SHB,
94
+ BankCodes::VTCP_SACOMBANK, BankCodes::VTCP_SAIGONBANK, BankCodes::VTCP_SEAABANK,
95
+ BankCodes::VTCP_TECHCOMBANK, BankCodes::VTCP_TIENPHONGBANK, BankCodes::VTCP_VIB,
96
+ BankCodes::VTCP_VIETABANK, BankCodes::VTCP_VIETCOMBANK, BankCodes::VTCP_VIETINBANK
97
+ ],
98
+ PLN: [
99
+ BankCodes::BLK
100
+ ],
101
+ GBP: [
102
+ BankCodes::TRL
103
+ ]
104
+ }.freeze
105
+
106
+ class << self
107
+
108
+ # Return All available allowed values
109
+ def all
110
+ CURRENCIES.keys.map { |currency| currency.to_s.downcase }
111
+ end
112
+
113
+ # Retrieve the allowed bank codes for the provided currency
114
+ def bank_codes_per_currency(currency)
115
+ return CURRENCIES[currency.to_s.upcase.to_sym] if CURRENCIES.key? currency.to_s.upcase.to_sym
116
+
117
+ []
118
+ end
119
+
120
+ end
121
+
122
+ end
123
+ end
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end