genesis_ruby 0.1.9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/Gemfile.lock +4 -4
- data/README.md +4 -0
- data/VERSION +1 -1
- data/lib/genesis_ruby/api/constants/date_time_formats.rb +4 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/cash_payments/cash_payment_types.rb +36 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/credential_on_files.rb +29 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/funding/business_application_identifier_types.rb +45 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/funding/identifier_types.rb +48 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/funding/receiver_account_types.rb +45 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_account_types.rb +30 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_code_currencies.rb +3 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_codes.rb +3 -0
- data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/payout_payment_types.rb +42 -0
- data/lib/genesis_ruby/api/constants/transactions.rb +4 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/cards/credential_on_file_attributes.rb +29 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/cards/mpi_attributes.rb +10 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/cards/ucof_attributes.rb +33 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/dynamic_descriptor_attributes.rb +32 -17
- data/lib/genesis_ruby/api/mixins/requests/financial/funding_attributes.rb +65 -0
- data/lib/genesis_ruby/api/mixins/requests/financial/online_banking_payments/pix_attributes.rb +28 -0
- data/lib/genesis_ruby/api/requests/base/financials/credit_card.rb +25 -2
- data/lib/genesis_ruby/api/requests/financial/cards/authorize.rb +5 -2
- data/lib/genesis_ruby/api/requests/financial/cards/authorize3d.rb +8 -3
- data/lib/genesis_ruby/api/requests/financial/cards/bancontact.rb +47 -0
- data/lib/genesis_ruby/api/requests/financial/cards/sale.rb +5 -2
- data/lib/genesis_ruby/api/requests/financial/cards/sale3d.rb +8 -3
- data/lib/genesis_ruby/api/requests/financial/cash_payments/cash.rb +56 -0
- data/lib/genesis_ruby/api/requests/financial/cash_payments/pix.rb +4 -8
- data/lib/genesis_ruby/api/requests/financial/mobile/apple_pay.rb +8 -2
- data/lib/genesis_ruby/api/requests/financial/mobile/google_pay.rb +9 -4
- data/lib/genesis_ruby/api/requests/financial/online_banking_payments/online_banking/pay_in.rb +4 -0
- data/lib/genesis_ruby/api/requests/financial/online_banking_payments/online_banking/pay_out.rb +129 -0
- data/lib/genesis_ruby/api/requests/wpf/create.rb +10 -7
- data/lib/genesis_ruby/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f29c5f143d903c4fb42a353861744b184de9a7d48dd8788e7ed53baedc11849a
|
4
|
+
data.tar.gz: 824210216d4e2f029faf1e8f1896d8c03ad28c4b79f8d7bdd647e73f169175a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a403425c5236e42412d7e103272a1a4895211e3ea5594f27396fdb330d1cef7d538807da4f08fcd9872f3edfd98fa836b30199d3c45080cce12579062c7d00b2
|
7
|
+
data.tar.gz: 8ea6cf3090a5346a6bdbf760d3ed91908e2b7bb609b050e66a5904b6f965b21defe9b0878cb4bea92772cb70447e5b80003547dcc8b1d9a8556eabc5ac3f8d79
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,32 @@
|
|
1
|
+
0.2.1
|
2
|
+
-----
|
3
|
+
**Features**:
|
4
|
+
|
5
|
+
* Added Online Banking PayOut transaction request
|
6
|
+
* Added Funding Parameters support to Google Pay and Apple Pay transaction requests
|
7
|
+
* Added Bancontact transaction request support
|
8
|
+
* Added Cash transaction request support
|
9
|
+
* Added COF and UCOF parameters support to the following transaction requests:
|
10
|
+
* Authorize
|
11
|
+
* Authorize 3D
|
12
|
+
* Sale
|
13
|
+
* Sale 3D
|
14
|
+
* Added Tokenized e-commerce payment support
|
15
|
+
|
16
|
+
0.2.0
|
17
|
+
-----
|
18
|
+
**Features**:
|
19
|
+
|
20
|
+
* Added Funding parameters support to the following transaction requests:
|
21
|
+
* Authorize
|
22
|
+
* Authorize 3D
|
23
|
+
* Sale
|
24
|
+
* Sale 3D
|
25
|
+
* Web Payment Form
|
26
|
+
* Added Dynamic Descriptor geo coordinates support
|
27
|
+
* Added POLI bank code and NZD currency support to Online Banking PayIn transaction request
|
28
|
+
* Added recurring type parameter support to Google Pay and Apple Pay transaction requests
|
29
|
+
|
1
30
|
0.1.9
|
2
31
|
-----
|
3
32
|
**Features**:
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
genesis_ruby (0.1
|
4
|
+
genesis_ruby (0.2.1)
|
5
5
|
net-http (~> 0.3.2)
|
6
6
|
nokogiri (~> 1.14)
|
7
7
|
|
@@ -41,13 +41,13 @@ GEM
|
|
41
41
|
json (2.7.2)
|
42
42
|
language_server-protocol (3.17.0.3)
|
43
43
|
mini_mime (1.1.5)
|
44
|
-
mini_portile2 (2.8.
|
44
|
+
mini_portile2 (2.8.8)
|
45
45
|
multi_xml (0.6.0)
|
46
46
|
mustermann (3.0.3)
|
47
47
|
ruby2_keywords (~> 0.0.1)
|
48
48
|
net-http (0.3.2)
|
49
49
|
uri
|
50
|
-
nokogiri (1.15.
|
50
|
+
nokogiri (1.15.7)
|
51
51
|
mini_portile2 (~> 2.8.2)
|
52
52
|
racc (~> 1.4)
|
53
53
|
octokit (7.2.0)
|
@@ -135,7 +135,7 @@ GEM
|
|
135
135
|
thor (1.3.2)
|
136
136
|
tilt (2.4.0)
|
137
137
|
unicode-display_width (2.6.0)
|
138
|
-
uri (0.
|
138
|
+
uri (1.0.3)
|
139
139
|
webmock (3.24.0)
|
140
140
|
addressable (>= 2.8.0)
|
141
141
|
crack (>= 0.3.2)
|
data/README.md
CHANGED
@@ -996,6 +996,7 @@ GenesisRuby::Api::Requests::Financial::Cards::Argencard
|
|
996
996
|
GenesisRuby::Api::Requests::Financial::Cards::Aura
|
997
997
|
GenesisRuby::Api::Requests::Financial::Cards::Authorize
|
998
998
|
GenesisRuby::Api::Requests::Financial::Cards::Authorize3d
|
999
|
+
GenesisRuby::Api::Requests::Financial::Cards::Bancontact
|
999
1000
|
GenesisRuby::Api::Requests::Financial::Cards::Cabal
|
1000
1001
|
GenesisRuby::Api::Requests::Financial::Cards::Cencosud
|
1001
1002
|
GenesisRuby::Api::Requests::Financial::Cards::Elo
|
@@ -1016,6 +1017,7 @@ GenesisRuby::Api::Requests::Financial::Wallets::PayPal
|
|
1016
1017
|
GenesisRuby::Api::Requests::Financial::CashPayments::Baloto
|
1017
1018
|
GenesisRuby::Api::Requests::Financial::CashPayments::BancoDeOccidente
|
1018
1019
|
GenesisRuby::Api::Requests::Financial::CashPayments::Boleto
|
1020
|
+
GenesisRuby::Api::Requests::Financial::CashPayments::Cash
|
1019
1021
|
GenesisRuby::Api::Requests::Financial::CashPayments::Efecty
|
1020
1022
|
GenesisRuby::Api::Requests::Financial::CashPayments::Oxxo
|
1021
1023
|
GenesisRuby::Api::Requests::Financial::CashPayments::PagoFacil
|
@@ -1039,6 +1041,8 @@ GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::Santander
|
|
1039
1041
|
GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::Webpay
|
1040
1042
|
# PayIn
|
1041
1043
|
GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::OnlineBanking::PayIn
|
1044
|
+
# PayOut
|
1045
|
+
GenesisRuby::Api::Requests::Financial::OnlineBankingPayments::OnlineBanking::PayOut
|
1042
1046
|
|
1043
1047
|
# References
|
1044
1048
|
GenesisRuby::Api::Requests::Financial::Capture
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1
|
1
|
+
0.2.1
|
@@ -24,6 +24,9 @@ module GenesisRuby
|
|
24
24
|
# Date Format ISO 8601
|
25
25
|
YYYY_MM_DD_ISO_8601 = '%Y-%m-%d'.freeze
|
26
26
|
|
27
|
+
# Date Format
|
28
|
+
MM_DD = '%m%d'.freeze
|
29
|
+
|
27
30
|
class << self
|
28
31
|
|
29
32
|
def all
|
@@ -33,6 +36,7 @@ module GenesisRuby
|
|
33
36
|
DD_MM_YYYY_L_SLASHES,
|
34
37
|
YYYY_MM_DD_H_I_S_ZULU,
|
35
38
|
YYYY_MM_DD_H_I_S,
|
39
|
+
MM_DD,
|
36
40
|
YYYY_MM_DD_ISO_8601 # Always keep it last!!!
|
37
41
|
]
|
38
42
|
end
|
data/lib/genesis_ruby/api/constants/transactions/parameters/cash_payments/cash_payment_types.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
module GenesisRuby
|
2
|
+
module Api
|
3
|
+
module Constants
|
4
|
+
module Transactions
|
5
|
+
module Parameters
|
6
|
+
module CashPayments
|
7
|
+
# Cash Payment Types allowed values
|
8
|
+
class CashPaymentTypes
|
9
|
+
|
10
|
+
extend Mixins::Constants::Common
|
11
|
+
|
12
|
+
# 7 Eleven
|
13
|
+
SEVEN_ELEVEN = 'seven_eleven'.freeze
|
14
|
+
|
15
|
+
# Bancomer
|
16
|
+
BANCOMER = 'bancomer'.freeze
|
17
|
+
|
18
|
+
# Farmacias del Dr. Ahorro
|
19
|
+
PHARMACIES_DEL_DR_AHORRO = 'pharmacies_del_dr_ahorro'.freeze
|
20
|
+
|
21
|
+
# Farmacias Santa Maria
|
22
|
+
PHARMACIES_SANTA_MARIA = 'pharmacies_santa_maria'.freeze
|
23
|
+
|
24
|
+
# OXXO
|
25
|
+
OXXO = 'oxxo'.freeze
|
26
|
+
|
27
|
+
# Scotiabank
|
28
|
+
SCOTIABANK = 'scotiabank'.freeze
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module GenesisRuby
|
2
|
+
module Api
|
3
|
+
module Constants
|
4
|
+
module Transactions
|
5
|
+
module Parameters
|
6
|
+
# Credential On Files allowed values
|
7
|
+
class CredentialOnFiles
|
8
|
+
|
9
|
+
extend Mixins::Constants::Common
|
10
|
+
|
11
|
+
# Initial transaction used to store payment credentials for future customer initiated payments while
|
12
|
+
# processing. Required for external tokenization, and optional for gateway-based tokenization
|
13
|
+
INITIAL_CUSTOMER_INITIATED = 'initial_customer_initiated'.freeze
|
14
|
+
|
15
|
+
# Subsequent customer initiated transaction using previously stored payment credentials.
|
16
|
+
# Required for external tokenization, and optional for gateway-based tokenization
|
17
|
+
SUBSEQUENT_CUSTOMER_INITIATED = 'subsequent_customer_initiated'.freeze
|
18
|
+
|
19
|
+
# For UCOF transaction, the scheme transaction identifier of the initial transaction must be sent in
|
20
|
+
# the transaction request. For MasterCard or Maestro UCOF, the scheme settlement date in MMDD format
|
21
|
+
# (e.g. 0107) of the initial transaction must be sent in the transaction request.
|
22
|
+
MERCHANT_UNSCHEDULED = 'merchant_unscheduled'.freeze
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module GenesisRuby
|
2
|
+
module Api
|
3
|
+
module Constants
|
4
|
+
module Transactions
|
5
|
+
module Parameters
|
6
|
+
module Funding
|
7
|
+
# Business Application Identifier Types allowed values
|
8
|
+
class BusinessApplicationIdentifierTypes
|
9
|
+
|
10
|
+
extend Api::Mixins::Constants::Common
|
11
|
+
|
12
|
+
# Type FUNDS_DISBURSEMENT
|
13
|
+
FUNDS_DISBURSEMENT = 'funds_disbursement'.freeze
|
14
|
+
|
15
|
+
# Type PENSION_DISBURSEMENT
|
16
|
+
PENSION_DISBURSEMENT = 'pension_disbursement'.freeze
|
17
|
+
|
18
|
+
# Type ACCOUNT_TO_ACCOUNT
|
19
|
+
ACCOUNT_TO_ACCOUNT = 'account_to_account'.freeze
|
20
|
+
|
21
|
+
# Type BANK_INITIATED
|
22
|
+
BANK_INITIATED = 'bank_initiated'.freeze
|
23
|
+
|
24
|
+
# Type FUND_TRANSFER
|
25
|
+
FUND_TRANSFER = 'fund_transfer'.freeze
|
26
|
+
|
27
|
+
# Type PERSON_TO_PERSON
|
28
|
+
PERSON_TO_PERSON = 'person_to_person'.freeze
|
29
|
+
|
30
|
+
# Type PREPAID_CARD_LOAD
|
31
|
+
PREPAID_CARD_LOAD = 'prepaid_card_load'.freeze
|
32
|
+
|
33
|
+
# Type WALLET_TRANSFER
|
34
|
+
WALLET_TRANSFER = 'wallet_transfer'.freeze
|
35
|
+
|
36
|
+
# Type LIQUID_ASSETS
|
37
|
+
LIQUID_ASSETS = 'liquid_assets'.freeze
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module GenesisRuby
|
2
|
+
module Api
|
3
|
+
module Constants
|
4
|
+
module Transactions
|
5
|
+
module Parameters
|
6
|
+
module Funding
|
7
|
+
# Funding Identifier Types allowed values
|
8
|
+
class IdentifierTypes
|
9
|
+
|
10
|
+
extend Api::Mixins::Constants::Common
|
11
|
+
|
12
|
+
# Required MCCs - 4829, 6538, 6540
|
13
|
+
GENERAL_PERSON_TO_PERSON = 'general_person_to_person'.freeze
|
14
|
+
|
15
|
+
# Required MCCs - 4829
|
16
|
+
PERSON_TO_PERSON_CARD_ACCOUNT = 'person_to_person_card_account'.freeze
|
17
|
+
|
18
|
+
# Required MCCs - 4829, 6051, 6211, 6538, 6540, 7800, 7801, 7802, 7994, 7995, 9406
|
19
|
+
OWN_ACCOUNT = 'own_account'.freeze
|
20
|
+
|
21
|
+
# Required MCCs - 4829, 6538
|
22
|
+
OWN_CREDIT_CARD_BILL = 'own_credit_card_bill'.freeze
|
23
|
+
|
24
|
+
# Required MCCs - any
|
25
|
+
BUSINESS_DISBURSEMENT = 'business_disbursement'.freeze
|
26
|
+
|
27
|
+
# Required MCCs - any
|
28
|
+
GOVERNMENT_OR_NON_PROFIT_DISBURSEMENT = 'government_or_non_profit_disbursement'.freeze
|
29
|
+
|
30
|
+
# Required MCCs - any
|
31
|
+
RAPID_MERCHANT_SETTLEMENT = 'rapid_merchant_settlement'.freeze
|
32
|
+
|
33
|
+
# Required MCCs - any
|
34
|
+
GENERAL_BUSINESS_TO_BUSINESS = 'general_business_to_business'.freeze
|
35
|
+
|
36
|
+
# Required MCCs - any
|
37
|
+
OWN_STAGED_DIGITAL_WALLET_ACCOUNT = 'own_staged_digital_wallet_account'.freeze
|
38
|
+
|
39
|
+
# Required MCCs - any
|
40
|
+
OWN_DEBIT_OR_PREPAID_CARD_ACCOUNT = 'own_debit_or_prepaid_card_account'.freeze
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module GenesisRuby
|
2
|
+
module Api
|
3
|
+
module Constants
|
4
|
+
module Transactions
|
5
|
+
module Parameters
|
6
|
+
module Funding
|
7
|
+
# Funding Receiver Account Types allowed values
|
8
|
+
class ReceiverAccountTypes
|
9
|
+
|
10
|
+
extend Api::Mixins::Constants::Common
|
11
|
+
|
12
|
+
# Routing Transit Number and Bank Account Number
|
13
|
+
RTN_AND_BANK_ACCOUNT_NUMBER = 'rtn_and_bank_account_number'.freeze
|
14
|
+
|
15
|
+
# International Bank Account Number
|
16
|
+
IBAN = 'iban'.freeze
|
17
|
+
|
18
|
+
# Card Account
|
19
|
+
CARD_ACCOUNT = 'card_account'.freeze
|
20
|
+
|
21
|
+
# Electronic Mail
|
22
|
+
EMAIL = 'email'.freeze
|
23
|
+
|
24
|
+
# Phone Number
|
25
|
+
PHONE_NUMBER = 'phone_number'.freeze
|
26
|
+
|
27
|
+
# Bank Account Number and Business Identifier Code
|
28
|
+
BANK_ACCOUNT_NUMBER_AND_BIC = 'bank_account_number_and_bic'.freeze
|
29
|
+
|
30
|
+
# Wallet ID
|
31
|
+
WALLET_ID = 'wallet_id'.freeze
|
32
|
+
|
33
|
+
# Unique Identifier for Social Network Application
|
34
|
+
SOCIAL_NETWORK_ID = 'social_network_id'.freeze
|
35
|
+
|
36
|
+
# Any other type
|
37
|
+
OTHER = 'other'.freeze
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/bank_account_types.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
module GenesisRuby
|
2
|
+
module Api
|
3
|
+
module Constants
|
4
|
+
module Transactions
|
5
|
+
module Parameters
|
6
|
+
module OnlineBanking
|
7
|
+
# Bank Payout Account Types allowed values
|
8
|
+
class BankAccountTypes
|
9
|
+
|
10
|
+
extend Mixins::Constants::Common
|
11
|
+
|
12
|
+
# Checking accounts
|
13
|
+
CHECKING = 'C'.freeze
|
14
|
+
|
15
|
+
# Savings accounts
|
16
|
+
SAVINGS = 'S'.freeze
|
17
|
+
|
18
|
+
# Maestra accounts(Only Peru)
|
19
|
+
MAESTRA = 'M'.freeze
|
20
|
+
|
21
|
+
# Payment accounts
|
22
|
+
PAYMENT = 'P'.freeze
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/genesis_ruby/api/constants/transactions/parameters/online_banking/payout_payment_types.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
module GenesisRuby
|
2
|
+
module Api
|
3
|
+
module Constants
|
4
|
+
module Transactions
|
5
|
+
module Parameters
|
6
|
+
module OnlineBanking
|
7
|
+
# Bank Payout Payment Types allowed values
|
8
|
+
class PayoutPaymentTypes
|
9
|
+
|
10
|
+
extend Api::Mixins::Constants::Common
|
11
|
+
|
12
|
+
# Bank to Bank
|
13
|
+
BANK_TO_BANK = 'bank_to_bank'.freeze
|
14
|
+
|
15
|
+
# PIX
|
16
|
+
PIX = 'pix'.freeze
|
17
|
+
|
18
|
+
# BSB
|
19
|
+
BSB = 'bsb'.freeze
|
20
|
+
|
21
|
+
# Pay ID
|
22
|
+
PAY_ID = 'pay_id'.freeze
|
23
|
+
|
24
|
+
# Bank to Bank, Business to Business
|
25
|
+
BANK_TO_BANK_B2B = 'bank_to_bank_b2b'.freeze
|
26
|
+
|
27
|
+
# PIX Business to Business
|
28
|
+
PIX_B2B = 'pix_b2b'.freeze
|
29
|
+
|
30
|
+
# Clabe
|
31
|
+
CLABE = 'clabe'.freeze
|
32
|
+
|
33
|
+
# Cellphone
|
34
|
+
CELLPHONE = 'cellphone'.freeze
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -79,6 +79,10 @@ module GenesisRuby
|
|
79
79
|
# Capture settles a transaction which has been authorized before.
|
80
80
|
CAPTURE = 'capture'.freeze
|
81
81
|
|
82
|
+
# Cash payment methods allow customers to pay bills and online purchases in cash at convenient
|
83
|
+
# physical locations such as stores, banks, ATMs, even pharmacies in some countries.
|
84
|
+
CASH = 'cash'.freeze
|
85
|
+
|
82
86
|
# Voucher-based payment
|
83
87
|
CASHU = 'cashu'.freeze
|
84
88
|
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'genesis_ruby/api/constants/transactions/parameters/credential_on_files'
|
2
|
+
|
3
|
+
module GenesisRuby
|
4
|
+
module Api
|
5
|
+
module Mixins
|
6
|
+
module Requests
|
7
|
+
module Financial
|
8
|
+
module Cards
|
9
|
+
# Credential On File shared attributes mixin
|
10
|
+
module CredentialOnFileAttributes
|
11
|
+
|
12
|
+
attr_accessor :credential_on_file
|
13
|
+
|
14
|
+
protected
|
15
|
+
|
16
|
+
# Credential on file allowed field values validations
|
17
|
+
def credential_on_file_field_validations
|
18
|
+
{
|
19
|
+
credential_on_file: Api::Constants::Transactions::Parameters::CredentialOnFiles.all
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -55,6 +55,16 @@ module GenesisRuby
|
|
55
55
|
}
|
56
56
|
end
|
57
57
|
|
58
|
+
# Field value dependencies for MPI parameters
|
59
|
+
def mpi_attributes_field_dependencies
|
60
|
+
{
|
61
|
+
mpi_protocol_version: Hash[
|
62
|
+
Api::Constants::Transactions::Parameters::MpiProtocolVersions::PROTOCOL_VERSION_2,
|
63
|
+
%w(mpi_directory_server_id)
|
64
|
+
]
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
58
68
|
end
|
59
69
|
end
|
60
70
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module GenesisRuby
|
2
|
+
module Api
|
3
|
+
module Mixins
|
4
|
+
module Requests
|
5
|
+
module Financial
|
6
|
+
module Cards
|
7
|
+
# UCOF shared attributes mixin
|
8
|
+
module UcofAttributes
|
9
|
+
|
10
|
+
attr_reader :credential_on_file_transaction_identifier
|
11
|
+
|
12
|
+
# UCOF Transaction Identifier
|
13
|
+
def credential_on_file_transaction_identifier=(value)
|
14
|
+
limited_string attribute: __method__, value: value.to_s, min: 15, max: 32
|
15
|
+
end
|
16
|
+
|
17
|
+
# UCOF Settlement Date
|
18
|
+
def credential_on_file_settlement_date
|
19
|
+
@credential_on_file_settlement_date&.strftime Api::Constants::DateTimeFormats::MM_DD
|
20
|
+
end
|
21
|
+
|
22
|
+
# UCOF Settlement Date
|
23
|
+
def credential_on_file_settlement_date=(value)
|
24
|
+
parse_date attribute: __method__, value: value, allow_empty: true
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -10,9 +10,10 @@ module GenesisRuby
|
|
10
10
|
:dynamic_descriptor_sub_merchant_id, :dynamic_descriptor_merchant_country,
|
11
11
|
:dynamic_descriptor_merchant_state, :dynamic_descriptor_merchant_zip_code,
|
12
12
|
:dynamic_descriptor_merchant_address, :dynamic_descriptor_merchant_url,
|
13
|
-
:dynamic_descriptor_merchant_phone, :
|
14
|
-
:
|
15
|
-
:
|
13
|
+
:dynamic_descriptor_merchant_phone, :dynamic_descriptor_merchant_geo_coordinates,
|
14
|
+
:dynamic_descriptor_merchant_service_city, :dynamic_descriptor_merchant_service_country,
|
15
|
+
:dynamic_descriptor_merchant_service_state, :dynamic_descriptor_merchant_service_zip_code,
|
16
|
+
:dynamic_descriptor_merchant_service_phone, :dynamic_descriptor_merchant_service_geo_coordinates
|
16
17
|
|
17
18
|
# Allows to dynamically override the charge descriptor
|
18
19
|
def dynamic_descriptor_merchant_name=(value)
|
@@ -59,6 +60,12 @@ module GenesisRuby
|
|
59
60
|
limited_string attribute: __method__, value: value.to_s.empty? ? nil : value.to_s, max: 16
|
60
61
|
end
|
61
62
|
|
63
|
+
# Merchant geographic coordinates. Length of geographic coordinates is a range of 15-20 symbols.
|
64
|
+
# Latitude and Longitude separated by a comma. Example: `40.73061,-73.93524`
|
65
|
+
def dynamic_descriptor_merchant_geo_coordinates=(value)
|
66
|
+
limited_string attribute: __method__, value: value.to_s.empty? ? nil : value.to_s, min: 15, max: 20
|
67
|
+
end
|
68
|
+
|
62
69
|
# Allows to dynamically override the merchant service city
|
63
70
|
def dynamic_descriptor_merchant_service_city=(value)
|
64
71
|
limited_string attribute: __method__, value: value.to_s.empty? ? nil : value.to_s, max: 13
|
@@ -84,25 +91,33 @@ module GenesisRuby
|
|
84
91
|
limited_string attribute: __method__, value: value.to_s.empty? ? nil : value.to_s, max: 16
|
85
92
|
end
|
86
93
|
|
94
|
+
# Merchant service geographic coordinates. Length of geographic coordinates is a range of 15-20 symbols.
|
95
|
+
# Latitude and Longitude separated by a comma. Example: `40.73061,-73.93524`
|
96
|
+
def dynamic_descriptor_merchant_service_geo_coordinates=(value)
|
97
|
+
limited_string attribute: __method__, value: value.to_s.empty? ? nil : value.to_s, min: 15, max: 20
|
98
|
+
end
|
99
|
+
|
87
100
|
protected
|
88
101
|
|
89
102
|
# Dynamic Descriptor Params structure
|
90
103
|
def dynamic_descriptor_structure # rubocop:disable Metrics/MethodLength
|
91
104
|
{
|
92
|
-
merchant_name:
|
93
|
-
merchant_city:
|
94
|
-
sub_merchant_id:
|
95
|
-
merchant_country:
|
96
|
-
merchant_state:
|
97
|
-
merchant_zip_code:
|
98
|
-
merchant_address:
|
99
|
-
merchant_url:
|
100
|
-
merchant_phone:
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
105
|
+
merchant_name: dynamic_descriptor_merchant_name,
|
106
|
+
merchant_city: dynamic_descriptor_merchant_city,
|
107
|
+
sub_merchant_id: dynamic_descriptor_sub_merchant_id,
|
108
|
+
merchant_country: dynamic_descriptor_merchant_country,
|
109
|
+
merchant_state: dynamic_descriptor_merchant_state,
|
110
|
+
merchant_zip_code: dynamic_descriptor_merchant_zip_code,
|
111
|
+
merchant_address: dynamic_descriptor_merchant_address,
|
112
|
+
merchant_url: dynamic_descriptor_merchant_url,
|
113
|
+
merchant_phone: dynamic_descriptor_merchant_phone,
|
114
|
+
merchant_geo_coordinates: dynamic_descriptor_merchant_geo_coordinates,
|
115
|
+
merchant_service_city: dynamic_descriptor_merchant_service_city,
|
116
|
+
merchant_service_country: dynamic_descriptor_merchant_service_country,
|
117
|
+
merchant_service_state: dynamic_descriptor_merchant_service_state,
|
118
|
+
merchant_service_zip_code: dynamic_descriptor_merchant_service_zip_code,
|
119
|
+
merchant_service_phone: dynamic_descriptor_merchant_service_phone,
|
120
|
+
merchant_service_geo_coordinates: dynamic_descriptor_merchant_service_geo_coordinates
|
106
121
|
}
|
107
122
|
end
|
108
123
|
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'genesis_ruby/api/constants/transactions/parameters/funding/business_application_identifier_types'
|
2
|
+
require 'genesis_ruby/api/constants/transactions/parameters/funding/identifier_types'
|
3
|
+
require 'genesis_ruby/api/constants/transactions/parameters/funding/receiver_account_types'
|
4
|
+
|
5
|
+
module GenesisRuby
|
6
|
+
module Api
|
7
|
+
module Mixins
|
8
|
+
module Requests
|
9
|
+
module Financial
|
10
|
+
# Mixin Funding Attributes
|
11
|
+
module FundingAttributes
|
12
|
+
|
13
|
+
attr_accessor :funding_identifier_type, :funding_business_application_identifier,
|
14
|
+
:funding_receiver_first_name, :funding_receiver_last_name, :funding_receiver_country,
|
15
|
+
:funding_receiver_account_number, :funding_receiver_account_number_type,
|
16
|
+
:funding_receiver_address, :funding_receiver_state, :funding_receiver_city,
|
17
|
+
:funding_sender_name, :funding_sender_reference_number, :funding_sender_country,
|
18
|
+
:funding_sender_address, :funding_sender_state, :funding_sender_city
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
# Provide a hash with the funding attributes field allowed values
|
23
|
+
def funding_attributes_field_validations
|
24
|
+
{
|
25
|
+
funding_identifier_type: Api::Constants::Transactions::Parameters::Funding::
|
26
|
+
IdentifierTypes.all,
|
27
|
+
funding_business_application_identifier: Api::Constants::Transactions::Parameters::Funding::
|
28
|
+
BusinessApplicationIdentifierTypes.all,
|
29
|
+
funding_receiver_account_number_type: Api::Constants::Transactions::Parameters::Funding::
|
30
|
+
ReceiverAccountTypes.all
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Funding Attributes Structure
|
35
|
+
def funding_attributes_structure # rubocop:disable Metrics/MethodLength
|
36
|
+
{
|
37
|
+
identifier_type: funding_identifier_type,
|
38
|
+
business_application_identifier: funding_business_application_identifier,
|
39
|
+
receiver: {
|
40
|
+
first_name: funding_receiver_first_name,
|
41
|
+
last_name: funding_receiver_last_name,
|
42
|
+
country: funding_receiver_country,
|
43
|
+
account_number: funding_receiver_account_number,
|
44
|
+
account_number_type: funding_receiver_account_number_type,
|
45
|
+
address: funding_receiver_address,
|
46
|
+
state: funding_receiver_state,
|
47
|
+
city: funding_receiver_city
|
48
|
+
},
|
49
|
+
sender: {
|
50
|
+
name: funding_sender_name,
|
51
|
+
reference_number: funding_sender_reference_number,
|
52
|
+
country: funding_sender_country,
|
53
|
+
address: funding_sender_address,
|
54
|
+
state: funding_sender_state,
|
55
|
+
city: funding_sender_city
|
56
|
+
}
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|