genesis_ruby 0.1.6 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/Gemfile.lock +42 -38
- data/README.md +305 -3
- data/VERSION +1 -1
- data/lib/genesis_ruby/api/constants/transactions/parameters/mobile/apple_pay/payment_subtypes.rb +29 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/mobile/google_pay/payment_subtypes.rb +29 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/mpi_protocol_sub_versions.rb +43 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_code_currencies.rb +128 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_codes.rb +600 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/payment_types.rb +36 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/travel_data/ancillary_charges_types.rb +43 -0
- data/lib/genesis_ruby/api/constants/transactions.rb +1 -5
- data/lib/genesis_ruby/api/mixins/requests/attribute_validation.rb +138 -4
- data/lib/genesis_ruby/api/mixins/requests/birth_date_attributes.rb +22 -0
- data/lib/genesis_ruby/api/mixins/requests/customer_address/customer_info_attributes.rb +1 -1
- data/lib/genesis_ruby/api/mixins/requests/financial/cards/credit_card_attributes.rb +7 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/cards/mpi_attributes.rb +14 -4
- data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_attributes.rb +23 -20
- data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_indian_card_attributes.rb +19 -39
- data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/recurring_type_attributes.rb +15 -9
- data/lib/genesis_ruby/api/mixins/requests/financial/cards/tokenization_attributes.rb +9 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/mobile/apple_pay_token_attributes.rb +51 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/mobile/google_pay_token_attributes.rb +50 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/online_banking_payments/virtual_payment_address_attributes.rb +27 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/browser.rb +11 -22
- data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/card_holder_account.rb +81 -49
- data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/common_attributes.rb +23 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/control.rb +13 -26
- data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/merchant_risk.rb +21 -58
- data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/purchase.rb +8 -11
- data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/sdk.rb +10 -10
- data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/wpf_attributes.rb +9 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/travel_data/airline_itinerary_attributes.rb +166 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/travel_data/car_rental_attributes.rb +119 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/travel_data/hotel_rental_attributes.rb +77 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/travel_data/reference_ticket_attributes.rb +75 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/travel_data/travel_attributes.rb +34 -0
- data/lib/genesis_ruby/api/request.rb +4 -2
- data/lib/genesis_ruby/api/requests/base/financials/credit_card.rb +6 -4
- data/lib/genesis_ruby/api/requests/base/reference.rb +3 -2
- data/lib/genesis_ruby/api/requests/financial/capture.rb +3 -1
- data/lib/genesis_ruby/api/requests/financial/cards/authorize.rb +13 -3
- data/lib/genesis_ruby/api/requests/financial/cards/authorize3d.rb +22 -11
- data/lib/genesis_ruby/api/requests/financial/cards/sale.rb +13 -3
- data/lib/genesis_ruby/api/requests/financial/cards/sale3d.rb +22 -11
- data/lib/genesis_ruby/api/requests/financial/cards/threeds/v2/method_continue.rb +2 -2
- data/lib/genesis_ruby/api/requests/financial/mobile/apple_pay.rb +91 -0
- data/lib/genesis_ruby/api/requests/financial/mobile/google_pay.rb +108 -0
- data/lib/genesis_ruby/api/requests/financial/online_banking_payments/online_banking/pay_in.rb +157 -0
- data/lib/genesis_ruby/api/requests/financial/void.rb +2 -2
- data/lib/genesis_ruby/api/requests/non_financial/reconcile/date_range.rb +2 -2
- data/lib/genesis_ruby/api/requests/wpf/create.rb +11 -15
- data/lib/genesis_ruby/api/requests/wpf/reconcile.rb +2 -2
- data/lib/genesis_ruby/builders/xml.rb +6 -0
- data/lib/genesis_ruby/utils/common.rb +26 -0
- data/lib/genesis_ruby/utils/transactions/financial_types.rb +1 -1
- data/lib/genesis_ruby/utils/transactions/references/refundable_types.rb +1 -1
- data/lib/genesis_ruby/utils/transactions/travel_data/airline_itinerary/base.rb +33 -0
- data/lib/genesis_ruby/utils/transactions/travel_data/airline_itinerary/leg.rb +97 -0
- data/lib/genesis_ruby/utils/transactions/travel_data/airline_itinerary/tax.rb +42 -0
- data/lib/genesis_ruby/utils/transactions/wpf_types.rb +1 -1
- data/lib/genesis_ruby/version.rb +1 -1
- metadata +24 -2
data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_code_currencies.rb
ADDED
@@ -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
|