genesis_ruby 0.1.0

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.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +11 -0
  3. data/Gemfile +6 -0
  4. data/Gemfile.lock +158 -0
  5. data/LICENSE +21 -0
  6. data/README.md +343 -0
  7. data/Rakefile +12 -0
  8. data/VERSION +1 -0
  9. data/genesis_ruby.gemspec +43 -0
  10. data/lib/genesis_ruby/api/constants/currencies/iso4217.rb +1106 -0
  11. data/lib/genesis_ruby/api/constants/date_time_formats.rb +45 -0
  12. data/lib/genesis_ruby/api/constants/endpoints.rb +18 -0
  13. data/lib/genesis_ruby/api/constants/environments.rb +17 -0
  14. data/lib/genesis_ruby/api/constants/states/state.rb +43 -0
  15. data/lib/genesis_ruby/api/constants/states.rb +86 -0
  16. data/lib/genesis_ruby/api/constants/transactions/parameters/business/payment_types.rb +24 -0
  17. data/lib/genesis_ruby/api/constants/transactions/parameters/recurring/categories.rb +24 -0
  18. data/lib/genesis_ruby/api/constants/transactions/parameters/recurring/types.rb +28 -0
  19. data/lib/genesis_ruby/api/constants/transactions/parameters/sca_exemptions.rb +34 -0
  20. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/browser/color_depths.rb +46 -0
  21. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/card_holder_account/password_change_indicators.rb +37 -0
  22. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/card_holder_account/registration_indicators.rb +37 -0
  23. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/card_holder_account/shipping_address_usage_indicators.rb +34 -0
  24. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/card_holder_account/suspicious_activity_indicators.rb +28 -0
  25. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/card_holder_account/update_indicators.rb +34 -0
  26. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/control/challenge_indicators.rb +34 -0
  27. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/control/challenge_window_sizes.rb +37 -0
  28. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/control/device_types.rb +28 -0
  29. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/merchant_risk/delivery_timeframes.rb +34 -0
  30. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/merchant_risk/pre_order_purchase_indicators.rb +28 -0
  31. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/merchant_risk/reorder_item_indicators.rb +28 -0
  32. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/merchant_risk/shipping_indicators.rb +46 -0
  33. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/purchase/categories.rb +43 -0
  34. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/sdk/interfaces.rb +31 -0
  35. data/lib/genesis_ruby/api/constants/transactions/parameters/threeds/version2/sdk/ui_types.rb +37 -0
  36. data/lib/genesis_ruby/api/constants/transactions.rb +371 -0
  37. data/lib/genesis_ruby/api/mixins/constants/common.rb +27 -0
  38. data/lib/genesis_ruby/api/mixins/requests/address_info_attributes.rb +20 -0
  39. data/lib/genesis_ruby/api/mixins/requests/customer_address/billing_info_attributes.rb +33 -0
  40. data/lib/genesis_ruby/api/mixins/requests/customer_address/customer_info_attributes.rb +26 -0
  41. data/lib/genesis_ruby/api/mixins/requests/customer_address/shipping_info_attributes.rb +33 -0
  42. data/lib/genesis_ruby/api/mixins/requests/document_attributes.rb +14 -0
  43. data/lib/genesis_ruby/api/mixins/requests/financial/async_attributes.rb +34 -0
  44. data/lib/genesis_ruby/api/mixins/requests/financial/base_attributes.rb +16 -0
  45. data/lib/genesis_ruby/api/mixins/requests/financial/business/airlines_air_carriers_attributes.rb +60 -0
  46. data/lib/genesis_ruby/api/mixins/requests/financial/business/business_attributes.rb +56 -0
  47. data/lib/genesis_ruby/api/mixins/requests/financial/business/car_plane_and_boat_rentals_attributes.rb +53 -0
  48. data/lib/genesis_ruby/api/mixins/requests/financial/business/cruise_lines_attributes.rb +50 -0
  49. data/lib/genesis_ruby/api/mixins/requests/financial/business/event_management_attributes.rb +54 -0
  50. data/lib/genesis_ruby/api/mixins/requests/financial/business/furniture_attributes.rb +53 -0
  51. data/lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb +53 -0
  52. data/lib/genesis_ruby/api/mixins/requests/financial/business/travel_agencies_attributes.rb +88 -0
  53. data/lib/genesis_ruby/api/mixins/requests/financial/cards/credit_card_attributes.rb +31 -0
  54. data/lib/genesis_ruby/api/mixins/requests/financial/cards/fx_rate_attributes.rb +18 -0
  55. data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/recurring_category_attributes.rb +31 -0
  56. data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/recurring_type_attributes.rb +31 -0
  57. data/lib/genesis_ruby/api/mixins/requests/financial/cards/tokenization_attributes.rb +39 -0
  58. data/lib/genesis_ruby/api/mixins/requests/financial/crypto_attributes.rb +25 -0
  59. data/lib/genesis_ruby/api/mixins/requests/financial/dynamic_descriptor_attributes.rb +114 -0
  60. data/lib/genesis_ruby/api/mixins/requests/financial/gaming_attributes.rb +25 -0
  61. data/lib/genesis_ruby/api/mixins/requests/financial/moto_attributes.rb +25 -0
  62. data/lib/genesis_ruby/api/mixins/requests/financial/notification_attributes.rb +25 -0
  63. data/lib/genesis_ruby/api/mixins/requests/financial/payment_attributes.rb +32 -0
  64. data/lib/genesis_ruby/api/mixins/requests/financial/pending_payment_attributes.rb +25 -0
  65. data/lib/genesis_ruby/api/mixins/requests/financial/reference_attributes.rb +16 -0
  66. data/lib/genesis_ruby/api/mixins/requests/financial/risk_attributes.rb +47 -0
  67. data/lib/genesis_ruby/api/mixins/requests/financial/sca_attributes.rb +37 -0
  68. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/browser.rb +92 -0
  69. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/card_holder_account.rb +183 -0
  70. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/common_attributes.rb +52 -0
  71. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/control.rb +61 -0
  72. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/merchant_risk.rb +114 -0
  73. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/method.rb +44 -0
  74. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/purchase.rb +42 -0
  75. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/recurring.rb +49 -0
  76. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/sdk.rb +107 -0
  77. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/wpf_attributes.rb +61 -0
  78. data/lib/genesis_ruby/api/mixins/requests/restricted_setter.rb +75 -0
  79. data/lib/genesis_ruby/api/request.rb +171 -0
  80. data/lib/genesis_ruby/api/requests/base/financial.rb +44 -0
  81. data/lib/genesis_ruby/api/requests/base/financials/credit_card.rb +27 -0
  82. data/lib/genesis_ruby/api/requests/financial/cards/authorize.rb +60 -0
  83. data/lib/genesis_ruby/api/requests/financial/cards/authorize3d.rb +76 -0
  84. data/lib/genesis_ruby/api/requests/financial/cards/sale.rb +59 -0
  85. data/lib/genesis_ruby/api/requests/financial/cards/sale3d.rb +75 -0
  86. data/lib/genesis_ruby/api/requests/wpf/create.rb +142 -0
  87. data/lib/genesis_ruby/api/response.rb +91 -0
  88. data/lib/genesis_ruby/builder.rb +42 -0
  89. data/lib/genesis_ruby/builders/base.rb +18 -0
  90. data/lib/genesis_ruby/builders/xml.rb +95 -0
  91. data/lib/genesis_ruby/configuration.rb +177 -0
  92. data/lib/genesis_ruby/connection.rb +20 -0
  93. data/lib/genesis_ruby/dependencies.rb +19 -0
  94. data/lib/genesis_ruby/errors/builder_error.rb +14 -0
  95. data/lib/genesis_ruby/errors/endpoint_not_set_error.rb +14 -0
  96. data/lib/genesis_ruby/errors/error.rb +18 -0
  97. data/lib/genesis_ruby/errors/invalid_argument_error.rb +14 -0
  98. data/lib/genesis_ruby/errors/network_error.rb +14 -0
  99. data/lib/genesis_ruby/errors/object_formatter_error.rb +14 -0
  100. data/lib/genesis_ruby/errors/parameter_error.rb +12 -0
  101. data/lib/genesis_ruby/errors/parser_error.rb +14 -0
  102. data/lib/genesis_ruby/errors/response_error.rb +14 -0
  103. data/lib/genesis_ruby/network/adapter/base_adapter.rb +31 -0
  104. data/lib/genesis_ruby/network/adapter/net_http_adapter.rb +92 -0
  105. data/lib/genesis_ruby/network/base_network.rb +83 -0
  106. data/lib/genesis_ruby/network/net_http.rb +28 -0
  107. data/lib/genesis_ruby/parser.rb +44 -0
  108. data/lib/genesis_ruby/parsers/base.rb +25 -0
  109. data/lib/genesis_ruby/parsers/xml.rb +120 -0
  110. data/lib/genesis_ruby/utils/common.rb +108 -0
  111. data/lib/genesis_ruby/utils/formatters/base.rb +40 -0
  112. data/lib/genesis_ruby/utils/formatters/response/definitions.rb +21 -0
  113. data/lib/genesis_ruby/utils/formatters/response/formats/amount.rb +34 -0
  114. data/lib/genesis_ruby/utils/formatters/response/formats/timestamp.rb +29 -0
  115. data/lib/genesis_ruby/utils/formatters/response/loader.rb +42 -0
  116. data/lib/genesis_ruby/utils/money/base/strategy.rb +38 -0
  117. data/lib/genesis_ruby/utils/money/conversions/amount_to_exponent.rb +22 -0
  118. data/lib/genesis_ruby/utils/money/conversions/exponent_to_amount.rb +22 -0
  119. data/lib/genesis_ruby/utils/money/format.rb +34 -0
  120. data/lib/genesis_ruby/utils/money_format.rb +39 -0
  121. data/lib/genesis_ruby/utils/object_formatter.rb +67 -0
  122. data/lib/genesis_ruby/utils/options/api_config.rb +36 -0
  123. data/lib/genesis_ruby/utils/options/base.rb +35 -0
  124. data/lib/genesis_ruby/utils/options/network_adapter_config.rb +41 -0
  125. data/lib/genesis_ruby/utils/transactions/financial_types.rb +50 -0
  126. data/lib/genesis_ruby/utils/transactions/references/capturable_types.rb +52 -0
  127. data/lib/genesis_ruby/utils/transactions/references/refundable_types.rb +70 -0
  128. data/lib/genesis_ruby/utils/transactions/references/voidable_types.rb +49 -0
  129. data/lib/genesis_ruby/utils/transactions/wpf_types.rb +43 -0
  130. data/lib/genesis_ruby/version.rb +5 -0
  131. data/lib/genesis_ruby.rb +57 -0
  132. metadata +372 -0
@@ -0,0 +1,45 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ # Date Time string representation formats
5
+ class DateTimeFormats
6
+
7
+ extend Mixins::Constants::Common
8
+
9
+ # Little endian(day, month, year) system with hyphens in between
10
+ DD_MM_YYYY_L_HYPHENS = '%d-%m-%Y'.freeze
11
+
12
+ # Little endian(day, month, year) system with dots in between
13
+ DD_MM_YYYY_L_DOTS = '%d.%m.%Y'.freeze
14
+
15
+ # Little endian(day, month, year) system with dots in between
16
+ DD_MM_YYYY_L_SLASHES = '%d/%m/%Y'.freeze
17
+
18
+ # Zulu timestamp
19
+ YYYY_MM_DD_H_I_S_ZULU = '%Y-%m-%dT%H:%M:%S%z'.freeze
20
+
21
+ # Modified Zulu timestamp
22
+ YYYY_MM_DD_H_I_S = '%Y-%m-%d %H:%M:%S'.freeze
23
+
24
+ # Date Format ISO 8601
25
+ YYYY_MM_DD_ISO_8601 = '%Y-%m-%d'.freeze
26
+
27
+ class << self
28
+
29
+ def all
30
+ [
31
+ DD_MM_YYYY_L_HYPHENS,
32
+ DD_MM_YYYY_L_DOTS,
33
+ DD_MM_YYYY_L_SLASHES,
34
+ YYYY_MM_DD_H_I_S_ZULU,
35
+ YYYY_MM_DD_H_I_S,
36
+ YYYY_MM_DD_ISO_8601 # Always keep it last!!!
37
+ ]
38
+ end
39
+
40
+ end
41
+
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,18 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ # List of possible Genesis Endpoints
5
+ class Endpoints
6
+
7
+ # Domain for E-ComProcessing's Genesis instance
8
+ # http://www.e-comprocessing.com/
9
+ ECOMPROCESSING = 'e-comprocessing.net'.freeze
10
+
11
+ # Domain for emerchantpay's Genesis instance
12
+ # https://www.emerchantpay.com
13
+ EMERCHANTPAY = 'emerchantpay.net'.freeze
14
+
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ # List of server environments
5
+ class Environments
6
+
7
+ # Live (Production) environment
8
+ PRODUCTION = 'production'.freeze
9
+
10
+ # Staging/Test environment
11
+ # NO MONEY are being transferred
12
+ STAGING = 'sandbox'.freeze
13
+
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,43 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module States
5
+ # Genesis Response Status definitions
6
+ class State
7
+
8
+ # Helper method for defining available dynamic methods
9
+ def self.handle_respond_to_states(symbol)
10
+ name = symbol.to_s.downcase
11
+
12
+ name.slice!('?') == '?' && GenesisRuby::Api::Constants::States.valid?(name)
13
+ end
14
+
15
+ attr_accessor :state
16
+
17
+ def initialize(state)
18
+ @state = state
19
+ end
20
+
21
+ # States dynamic methods. Must be valid Genesis Transaction State
22
+ # Ex. new?, approved?
23
+ def method_missing(symbol, *args)
24
+ name = symbol.to_s.upcase
25
+
26
+ super unless GenesisRuby::Api::Constants::States::State.handle_respond_to_states(name)
27
+
28
+ name.chomp! '?'
29
+
30
+ GenesisRuby::Api::Constants::States.valid?(name) &&
31
+ state == GenesisRuby::Api::Constants::States.const_get(name)
32
+ end
33
+
34
+ # Respond to missing implementation
35
+ def respond_to_missing?(symbol, include_private = false)
36
+ GenesisRuby::Api::Constants::States::State.handle_respond_to_states(symbol) || super
37
+ end
38
+
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,86 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ # Genesis Response States
5
+ module States
6
+
7
+ extend Mixins::Constants::Common
8
+
9
+ # Transaction was approved by the schemes and is successful.
10
+ APPROVED = 'approved'.freeze
11
+
12
+ # Transaction was declined by the schemes or risk management.
13
+ DECLINED = 'declined'.freeze
14
+
15
+ # The outcome of the transaction could not be determined, e.g. at a timeout situation.
16
+ # Transaction state will eventually change, so make a reconcile after a certain time frame.
17
+ PENDING = 'pending'.freeze
18
+
19
+ # An asynchronous transaction (3-D secure payment) has been initiated and is waiting for user
20
+ # input.
21
+ # Updates of this state will be sent to the notification url specified in request.
22
+ PENDING_ASYNC = 'pending_async'.freeze
23
+
24
+ # Transaction is in-progress
25
+ IN_PROGRESS = 'in_progress'.freeze
26
+
27
+ # Once an approved transaction is refunded the state changes to refunded.
28
+ REFUNDED = 'refunded'.freeze
29
+
30
+ # Transaction was authorized, but later the merchant canceled it.
31
+ VOIDED = 'voided'.freeze
32
+
33
+ # An error has occurred while negotiating with the schemes.
34
+ ERROR = 'error'.freeze
35
+
36
+ # Transaction failed, but it was not declined
37
+ UNSUCCESSFUL = 'unsuccessful'.freeze
38
+
39
+ # WPF initial status
40
+ NEW = 'new'.freeze
41
+
42
+ # WPF in-progress status
43
+ USER = 'user'.freeze
44
+
45
+ # WPF timeout has occurred
46
+ TIMEOUT = 'timeout'.freeze
47
+
48
+ # Once an approved transaction is chargeback the state changes to change- backed.
49
+ #
50
+ # Chargeback is the state of rejecting an accepted transaction (with funds transferred)
51
+ # by the cardholder or the issuer
52
+ CHARGEBACKED = 'chargebacked'.freeze
53
+
54
+ # Once a chargebacked transaction is charged, the state changes to charge- back reversed.
55
+ #
56
+ # Chargeback has been canceled.
57
+ CHARGEBACK_REVERSED = 'chargeback_reversed'.freeze
58
+
59
+ # Once a chargeback reversed transaction is chargebacked the state changes to pre arbitrated.
60
+ PRE_ARBITRATED = 'pre_arbitrated'.freeze
61
+
62
+ # Status of the consumer from Consumer API
63
+ ENABLED = 'enabled'.freeze
64
+
65
+ # Status of the consumer from Consumer API
66
+ DISABLED = 'disabled'.freeze
67
+
68
+ # Transaction API success status
69
+ SUCCESS = 'success'.freeze
70
+
71
+ # WPF status represent submitted form
72
+ SUBMITTED = 'submitted'.freeze
73
+
74
+ # An asynchronous transaction has been finalized by user but is waiting final update from provider.
75
+ PENDING_HOLD = 'pending_hold'.freeze
76
+
77
+ # Once a chargeback_reversed/represented transaction is chargebacked the state changes to second chargebacked.
78
+ SECOND_CHARGEBACKED = 'second_chargebacked'.freeze
79
+
80
+ # Once a chargebacked transaction is charged, the state changes to represented. Chargeback has been canceled.
81
+ REPRESENTED = 'represented'.freeze
82
+
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,24 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Business
7
+ # Business Attributes Payment Types
8
+ class PaymentTypes
9
+
10
+ extend Mixins::Constants::Common
11
+
12
+ # Deposit
13
+ DEPOSIT = 'deposit'.freeze
14
+
15
+ # Balance
16
+ BALANCE = 'balance'.freeze
17
+
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Recurring
7
+ # Recurring Categories
8
+ class Categories
9
+
10
+ extend Mixins::Constants::Common
11
+
12
+ # Recurring Category Subscription - fixed amount, fixed intervals
13
+ SUBSCRIPTION = 'subscription'.freeze
14
+
15
+ # Recurring Category Standing Order - varying amount, fixed intervals
16
+ STANDING_ORDER = 'standing_order'.freeze
17
+
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,28 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Recurring
7
+ # Recurring Types
8
+ class Types
9
+
10
+ extend Mixins::Constants::Common
11
+
12
+ # Indication for an Initial Recurring Transaction. Respond to Init_Recurring
13
+ INITIAL = 'initial'.freeze
14
+
15
+ # Indication for a Managed Recurring Transaction. Respond to Managed Recurring transactions.
16
+ MANAGED = 'managed'.freeze
17
+
18
+ # Indication for a Subsequent Transaction on the Initial Recurring.
19
+ # Respond to subsequent Recurring payments.
20
+ SUBSEQUENT = 'subsequent'.freeze
21
+
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,34 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ # SCA Exemptions
7
+ class ScaExemptions
8
+
9
+ extend Mixins::Constants::Common
10
+
11
+ # Exemption Low Value
12
+ LOW_VALUE = 'low_value'.freeze
13
+
14
+ # Exemption Low Risk
15
+ LOW_RISK = 'low_risk'.freeze
16
+
17
+ # Exemption Trusted Merchant
18
+ TRUSTED_MERCHANT = 'trusted_merchant'.freeze
19
+
20
+ # Exemption Corporate Payment
21
+ CORPORATE_PAYMENT = 'corporate_payment'.freeze
22
+
23
+ # Exemption Delegated Authentication
24
+ DELEGATED_AUTHENTICATION = 'delegated_authentication'.freeze
25
+
26
+ # Exemption Auth Network Outage
27
+ AUTH_NETWORK_OUTAGE = 'auth_network_outage'.freeze
28
+
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,46 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Threeds
7
+ module Version2
8
+ module Browser
9
+ # Threeds Version2 Browser ColorDepths
10
+ class ColorDepths
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # Color Depth 1
15
+ BIT_1 = 1
16
+
17
+ # Color Depth 4
18
+ BITS_4 = 4
19
+
20
+ # Color Depth 8
21
+ BITS_8 = 8
22
+
23
+ # Color Depth 15
24
+ BITS_15 = 15
25
+
26
+ # Color Depth 16
27
+ BITS_16 = 16
28
+
29
+ # Color Depth 24
30
+ BITS_24 = 24
31
+
32
+ # Color Depth 32
33
+ BITS_32 = 32
34
+
35
+ # Color Depth 48
36
+ BITS_48 = 48
37
+
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,37 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Threeds
7
+ module Version2
8
+ module CardHolderAccount
9
+ # Threeds Version2 Card Holder Account Password Change Indicators
10
+ class PasswordChangeIndicators
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # No change
15
+ NO_CHANGE = 'no_change'.freeze
16
+
17
+ # During Transaction
18
+ DURING_TRANSACTION = 'during_transaction'.freeze
19
+
20
+ # Less than 30 days
21
+ LESS_THAN_30DAYS = 'less_than_30days'.freeze
22
+
23
+ # From 30 to 60 days
24
+ FROM_30_TO_60_DAYS = '30_to_60_days'.freeze
25
+
26
+ # More than 60 days
27
+ MORE_THAN_60DAYS = 'more_than_60days'.freeze
28
+
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,37 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Threeds
7
+ module Version2
8
+ module CardHolderAccount
9
+ # Threeds Version2 Card Holder Account Registration Indicators
10
+ class RegistrationIndicators
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # Guest Checkout
15
+ GUEST_CHECKOUT = 'guest_checkout'.freeze
16
+
17
+ # Current Transaction
18
+ CURRENT_TRANSACTION = 'current_transaction'.freeze
19
+
20
+ # Less than 30 days
21
+ LESS_THAN_30DAYS = 'less_than_30days'.freeze
22
+
23
+ # From 30 to 60 days
24
+ FROM_30_TO_60_DAYS = '30_to_60_days'.freeze
25
+
26
+ # More than 60 days
27
+ MORE_THAN_60DAYS = 'more_than_60days'.freeze
28
+
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,34 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Threeds
7
+ module Version2
8
+ module CardHolderAccount
9
+ # Threeds Version2 Card Holder Shipping Address Usage Indicators
10
+ class ShippingAddressUsageIndicators
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # Current Transaction
15
+ CURRENT_TRANSACTION = 'current_transaction'.freeze
16
+
17
+ # Less than 30 days
18
+ LESS_THAN_30DAYS = 'less_than_30days'.freeze
19
+
20
+ # From 30 to 60 days
21
+ FROM_30_TO_60_DAYS = '30_to_60_days'.freeze
22
+
23
+ # More than 60 days
24
+ MORE_THAN_60DAYS = 'more_than_60days'.freeze
25
+
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,28 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Threeds
7
+ module Version2
8
+ module CardHolderAccount
9
+ # Threeds Version2 Card Holder Shipping Address Usage Indicators
10
+ class SuspiciousActivityIndicators
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # No Suspicious Observed
15
+ NO_SUSPICIOUS_OBSERVED = 'no_suspicious_observed'.freeze
16
+
17
+ # Suspicious Observed
18
+ SUSPICIOUS_OBSERVED = 'suspicious_observed'.freeze
19
+
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,34 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Threeds
7
+ module Version2
8
+ module CardHolderAccount
9
+ # Threeds Version2 Card Holder Update Indicators
10
+ class UpdateIndicators
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # Current Transaction
15
+ CURRENT_TRANSACTION = 'current_transaction'.freeze
16
+
17
+ # Less than 30 days
18
+ LESS_THAN_30DAYS = 'less_than_30days'.freeze
19
+
20
+ # From 30 to 60 days
21
+ FROM_30_TO_60_DAYS = '30_to_60_days'.freeze
22
+
23
+ # More than 60 days
24
+ MORE_THAN_60DAYS = 'more_than_60days'.freeze
25
+
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Threeds
7
+ module Version2
8
+ module Control
9
+ # Threeds Version2 Control Challenge Indicators
10
+ class ChallengeIndicators
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # Don't have any preferences related to the Challenge flow (default)
15
+ NO_PREFERENCE = 'no_preference'.freeze
16
+
17
+ # I prefer that a Challenge flow does not take place
18
+ NO_CHALLENGE_REQUESTED = 'no_challenge_requested'.freeze
19
+
20
+ # A request for the Challenge flow to take place
21
+ PREFERENCE = 'preference'.freeze
22
+
23
+ # A Challenge flow must take place to fulfill a mandate
24
+ MANDATE = 'mandate'.freeze
25
+
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,37 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Threeds
7
+ module Version2
8
+ module Control
9
+ # Threeds Version2 Control Challenge Window Sizes
10
+ class ChallengeWindowSizes
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # Challenge Window Size 250x400
15
+ SIZE_250X400 = '250x400'.freeze
16
+
17
+ # Challenge Window Size 390x400
18
+ SIZE_390X400 = '390x400'.freeze
19
+
20
+ # Challenge Window Size 500x600
21
+ SIZE_500X600 = '500x600'.freeze
22
+
23
+ # Challenge Window Size 600x400
24
+ SIZE_600X400 = '600x400'.freeze
25
+
26
+ # Challenge Window Size Full Screen
27
+ FULLSCREEN = 'full_screen'.freeze
28
+
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,28 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Threeds
7
+ module Version2
8
+ module Control
9
+ # Threeds Version2 Control Device Types
10
+ class DeviceTypes
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # Browser-based consumer interface. All the browser parameters are required.
15
+ BROWSER = 'browser'.freeze
16
+
17
+ # Application
18
+ APPLICATION = 'application'.freeze
19
+
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,34 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module Threeds
7
+ module Version2
8
+ module MerchantRisk
9
+ # Threeds Version2 Merchant Risk Delivery Timeframes
10
+ class DeliveryTimeframes
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # Electronics
15
+ ELECTRONICS = 'electronic'.freeze
16
+
17
+ # Same Day
18
+ SAME_DAY = 'same_day'.freeze
19
+
20
+ # Over Night
21
+ OVER_NIGHT = 'over_night'.freeze
22
+
23
+ # Another Day
24
+ ANOTHER_DAY = 'another_day'.freeze
25
+
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end