genesis_ruby 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/Gemfile.lock +4 -1
  4. data/README.md +2 -0
  5. data/Rakefile +15 -3
  6. data/VERSION +1 -1
  7. data/genesis_ruby.gemspec +1 -0
  8. data/lib/genesis_ruby/api/constants/transactions/parameters/managed_recurring/amount_types.rb +24 -0
  9. data/lib/genesis_ruby/api/constants/transactions/parameters/managed_recurring/frequencies.rb +56 -0
  10. data/lib/genesis_ruby/api/constants/transactions/parameters/managed_recurring/intervals.rb +24 -0
  11. data/lib/genesis_ruby/api/constants/transactions/parameters/managed_recurring/modes.rb +24 -0
  12. data/lib/genesis_ruby/api/constants/transactions/parameters/managed_recurring/payment_types.rb +30 -0
  13. data/lib/genesis_ruby/api/constants/transactions/parameters/mpi_protocol_versions.rb +22 -0
  14. data/lib/genesis_ruby/api/mixins/requests/financial/cards/account_owner_attributes.rb +53 -0
  15. data/lib/genesis_ruby/api/mixins/requests/financial/cards/mpi_attributes.rb +54 -0
  16. data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_attributes.rb +90 -0
  17. data/lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_indian_card_attributes.rb +78 -0
  18. data/lib/genesis_ruby/api/mixins/requests/financial/threeds/version2/common_attributes.rb +1 -1
  19. data/lib/genesis_ruby/api/requests/base/financials/credit_card.rb +6 -2
  20. data/lib/genesis_ruby/api/requests/financial/cards/authorize.rb +4 -2
  21. data/lib/genesis_ruby/api/requests/financial/cards/authorize3d.rb +5 -1
  22. data/lib/genesis_ruby/api/requests/financial/cards/sale.rb +4 -2
  23. data/lib/genesis_ruby/api/requests/financial/cards/sale3d.rb +5 -1
  24. data/lib/genesis_ruby/api/requests/wpf/create.rb +3 -13
  25. data/lib/genesis_ruby/version.rb +1 -1
  26. metadata +26 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8cc160e0cdb5cb22dd4726e2471a9d85ba199c4ee2bdd2e8cbd57b057657ce8
4
- data.tar.gz: 824dc704419375ffd6276a45d757f1b45e40f6e5d542462d73b18c207392df9e
3
+ metadata.gz: 02dff613f2499bed46dee4d66d10fb64ea987d663d14e1097bb6ab36a444336a
4
+ data.tar.gz: bc89246c16d0b2e5b70dbd11c2b35421874ec749e0e6dd2926135850bf37faa7
5
5
  SHA512:
6
- metadata.gz: 4cd6c2db4ec7da458a87d82ad550af947585fea23158117d5458f324aa966db882601fba8490357a349ae551c528825bf6d1e52381e3e3d06c24746a25af3ef3
7
- data.tar.gz: 253fe2aaaec0df2023a6a2d37c74b04dd12eba99da1d376ff01f5566084449dbdbd3d4fe33560eb6d68e7ba98119baf33caa235879ffad9af743c2dc392ebd66
6
+ metadata.gz: 8eacfb3b669fee18642bbeadb3d291ee4e8fd18e45fd45486c954646f3dc7f1cc146321b64cfef6d8bdce9a91c58e13d6e3a4c4a44eb71154a366d54a58a5e6c
7
+ data.tar.gz: 7d8eff36538c46f41671c90d71af6af9d8d432c52ddb2238a5b64699956be0a9eabf68fd19c52a03e2310738ce9eb6f918d1c4b1d12dd23c06265cb2c0d7cb2b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ 0.1.4
2
+ -----
3
+ **Features**:
4
+
5
+ * Added Account Owner attributes support to the following transaction requests:
6
+ * Authorize
7
+ * Authorize 3D
8
+ * Sale
9
+ * Sale 3D
10
+ * Web Payment Form
11
+ * Added MPI attributes support to the following transaction requests:
12
+ * Authorize 3D
13
+ * Sale 3D
14
+ * Removed Recurring Type attribute from Web Payment Form transaction request
15
+ * Added Managed Recurring attributes support to the following transaction requests:
16
+ * Authorize
17
+ * Authorize 3D
18
+ * Sale
19
+ * Sale 3D
20
+
21
+ 0.1.3
22
+ -----
23
+ **Fixes**:
24
+
25
+ * Fixed 3DSv2 Method element name in the XML document
26
+
1
27
  0.1.2
2
28
  -----
3
29
  **Features**:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- genesis_ruby (0.1.2)
4
+ genesis_ruby (0.1.4)
5
5
  net-http (~> 0.3.2)
6
6
  nokogiri (~> 1.14)
7
7
 
@@ -86,6 +86,8 @@ GEM
86
86
  diff-lcs (>= 1.2.0, < 2.0)
87
87
  rspec-support (~> 3.12.0)
88
88
  rspec-support (3.12.1)
89
+ rspec_junit_formatter (0.6.0)
90
+ rspec-core (>= 2, < 4, != 2.12.0)
89
91
  rubocop (1.57.2)
90
92
  json (~> 2.3)
91
93
  language_server-protocol (>= 3.17.0)
@@ -147,6 +149,7 @@ DEPENDENCIES
147
149
  pronto-rubocop (~> 0.11)
148
150
  rake (~> 13.0)
149
151
  rspec (~> 3.0)
152
+ rspec_junit_formatter (~> 0.6)
150
153
  rubocop (~> 1.21)
151
154
  rubocop-faker (~> 1.1)
152
155
  rubocop-rspec (~> 2.13)
data/README.md CHANGED
@@ -67,6 +67,8 @@ begin
67
67
  request.add_transaction_type('authorize3d')
68
68
  # Transaction Type with Customer Attribute
69
69
  request.add_transaction_type('sale3d', { bin: '420000' })
70
+ # Transaction Type with Recurring V2
71
+ request.add_transaction_type('sale3d', { recurring_type: GenesisRuby::Api::Constants::Transactions::Parameters::Recurring::Types::INITIAL })
70
72
 
71
73
  # Tokenization Attributes
72
74
  request.consumer_id = '123456789'
data/Rakefile CHANGED
@@ -2,11 +2,23 @@ require 'bundler/gem_tasks'
2
2
  require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
+ RSpec::Core::RakeTask.new(:spec_junit) do |t|
6
+ t.rspec_opts = ['--format RspecJunitFormatter', '--out rspec_report.xml']
7
+ t.pattern = '**/*_spec.rb'
8
+ end
5
9
 
6
10
  require 'rubocop/rake_task'
7
11
 
12
+ RuboCop::RakeTask.new(:rubocop_default)
13
+ RuboCop::RakeTask.new(:rubocop_progress) do |t|
14
+ t.formatters = %w(progress)
15
+ t.options = %w(--out rubocop_report.txt)
16
+ end
17
+
8
18
  RuboCop::RakeTask.new
9
19
 
10
- task default: %i[spec rubocop]
11
- task test: :spec
12
- task styles: :rubocop
20
+ task default: %w(spec rubocop_default)
21
+ task test: :spec
22
+ task styles: :rubocop_default
23
+ task test_junit: :spec_junit
24
+ task style_progress: :rubocop_progress
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.4
data/genesis_ruby.gemspec CHANGED
@@ -38,6 +38,7 @@ Gem::Specification.new do |spec|
38
38
  spec.add_development_dependency 'pronto-rubocop', '~> 0.11'
39
39
  spec.add_development_dependency 'rake', '~> 13.0'
40
40
  spec.add_development_dependency 'rspec', '~> 3.0'
41
+ spec.add_development_dependency 'rspec_junit_formatter', '~> 0.6'
41
42
  spec.add_development_dependency 'rubocop', '~> 1.21'
42
43
  spec.add_development_dependency 'rubocop-faker', '~> 1.1'
43
44
  spec.add_development_dependency 'rubocop-rspec', '~> 2.13'
@@ -0,0 +1,24 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module ManagedRecurring
7
+ # Amount Type of the current recurring transaction. Values: fixed, max
8
+ class AmountTypes
9
+
10
+ extend Mixins::Constants::Common
11
+
12
+ # Amount Type FIXED
13
+ FIXED = 'fixed'.freeze
14
+
15
+ # Amount Type MAX
16
+ MAX = 'MAX'.freeze
17
+
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,56 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module ManagedRecurring
7
+ # Frequencies of the Frequency of the subsequent transactions.
8
+ # Values: daily, twice_weekly, weekly, ten_days, fortnightly, monthly, every_two_months, trimester,
9
+ # quarterly, twice_yearly, annually, unscheduled
10
+ class Frequencies
11
+
12
+ extend Mixins::Constants::Common
13
+
14
+ # Frequency DAILY
15
+ DAILY = 'daily'.freeze
16
+
17
+ # Frequency TWICE_WEEKLY
18
+ TWICE_WEEKLY = 'twice_weekly'.freeze
19
+
20
+ # Frequency WEEKLY
21
+ WEEKLY = 'weekly'.freeze
22
+
23
+ # Frequency TEN DAYS
24
+ TEN_DAYS = 'ten_days'.freeze
25
+
26
+ # Frequency FORTNIGHTLY
27
+ FORTNIGHTLY = 'fortnightly'.freeze
28
+
29
+ # Frequency MONTHLY
30
+ MONTHLY = 'monthly'.freeze
31
+
32
+ # Frequency EVERY TWO MONTHS
33
+ EVERY_TWO_MONTHS = 'every_two_months'.freeze
34
+
35
+ # Frequency TRIMESTER
36
+ TRIMESTER = 'trimester'.freeze
37
+
38
+ # Frequency QUARTERLY
39
+ QUARTERLY = 'quarterly'.freeze
40
+
41
+ # Frequency TWICE YEARLY
42
+ TWICE_YEARLY = 'twice_yearly'.freeze
43
+
44
+ # Frequency ANNUALLY
45
+ ANNUALLY = 'annually'.freeze
46
+
47
+ # Frequency UNSCHEDULED
48
+ UNSCHEDULED = 'unscheduled'.freeze
49
+
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,24 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module ManagedRecurring
7
+ # The interval type for the period: days or months. The default value is days
8
+ class Intervals
9
+
10
+ extend Mixins::Constants::Common
11
+
12
+ # Interval DAYS
13
+ DAYS = 'days'.freeze
14
+
15
+ # Interval MONTHS
16
+ MONTHS = 'months'.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 ManagedRecurring
7
+ # Modes indicates whether merchant will manage manual or automatic recurring transactions
8
+ class Modes
9
+
10
+ extend Mixins::Constants::Common
11
+
12
+ # Mode AUTOMATIC
13
+ AUTOMATIC = 'automatic'.freeze
14
+
15
+ # Mode MANUAL
16
+ MANUAL = 'manual'.freeze
17
+
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,30 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ module ManagedRecurring
7
+ # Payment Type of the current recurring transaction. Values: initial, subsequent, modification, cancellation
8
+ class PaymentTypes
9
+
10
+ extend Mixins::Constants::Common
11
+
12
+ # Payment Type INITIAL
13
+ INITIAL = 'initial'.freeze
14
+
15
+ # Payment Type SUBSEQUENT
16
+ SUBSEQUENT = 'subsequent'.freeze
17
+
18
+ # Payment Type MODIFICATION
19
+ MODIFICATION = 'modification'.freeze
20
+
21
+ # Payment Type CANCELLATION
22
+ CANCELLATION = 'cancellation'.freeze
23
+
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,22 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module Transactions
5
+ module Parameters
6
+ # Mpi Protocol Versions allowed values
7
+ class MpiProtocolVersions
8
+
9
+ extend Mixins::Constants::Common
10
+
11
+ # 3DSv1, Type of Protocol Version - 1
12
+ PROTOCOL_VERSION_1 = 1
13
+
14
+ # 3DSv2, Type of Protocol Version - 2
15
+ PROTOCOL_VERSION_2 = 2
16
+
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,53 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Mixins
4
+ module Requests
5
+ module Financial
6
+ module Cards
7
+ # Account Owner Attributes mixin
8
+ module AccountOwnerAttributes
9
+
10
+ ACCOUNT_NAME_LENGTH = 35
11
+
12
+ attr_reader :account_first_name, :account_middle_name, :account_last_name
13
+
14
+ # Account owner's first name.
15
+ def account_first_name=(value)
16
+ account_accessor __method__, value
17
+ end
18
+
19
+ # Account owner's middle name.
20
+ def account_middle_name=(value)
21
+ account_accessor __method__, value
22
+ end
23
+
24
+ # Account owner's last name.
25
+ def account_last_name=(value)
26
+ account_accessor __method__, value
27
+ end
28
+
29
+ protected
30
+
31
+ # Tokenization Attributes Structure
32
+ def account_owner_attributes_structure
33
+ {
34
+ first_name: account_first_name,
35
+ middle_name: account_middle_name,
36
+ last_name: account_last_name
37
+ }
38
+ end
39
+
40
+ private
41
+
42
+ # Account accessor common method
43
+ def account_accessor(method, value)
44
+ limited_string attribute: method, value: value.to_s, max: ACCOUNT_NAME_LENGTH
45
+ end
46
+
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,54 @@
1
+ require 'genesis_ruby/api/constants/transactions/parameters/mpi_protocol_versions'
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Mixins
6
+ module Requests
7
+ module Financial
8
+ module Cards
9
+ # Mixin Mpi Attributes
10
+ module MpiAttributes
11
+
12
+ attr_reader :mpi_threeds_challenge_indicator, :mpi_protocol_version
13
+ attr_accessor :mpi_cavv, :mpi_eci, :mpi_xid, :mpi_directory_server_id,
14
+ :mpi_asc_transaction_id
15
+
16
+ # The used 3DS protocol version. Default is 1 if not supplied.
17
+ def mpi_protocol_version=(value)
18
+ allowed_options(
19
+ attribute: __method__,
20
+ allowed: GenesisRuby::Api::Constants::Transactions::Parameters::MpiProtocolVersions.all,
21
+ value: value.to_i,
22
+ allow_empty: true
23
+ )
24
+ end
25
+
26
+ # Optional value for 3DS challenge indicator. Highly recommended to increase approve ratio.
27
+ def mpi_threeds_challenge_indicator=(value)
28
+ allowed_indicators = GenesisRuby::Api::Constants::Transactions::Parameters::Threeds::Version2::
29
+ Control::ChallengeIndicators.all
30
+
31
+ allowed_options attribute: __method__, allowed: allowed_indicators, value: value, allow_empty: true
32
+ end
33
+
34
+ protected
35
+
36
+ # Mpi Attributes Structure
37
+ def mpi_attributes_structure
38
+ {
39
+ eci: mpi_eci,
40
+ cavv: mpi_cavv,
41
+ protocol_version: mpi_protocol_version,
42
+ directory_server_id: mpi_directory_server_id,
43
+ acs_transaction_id: mpi_asc_transaction_id,
44
+ threeds_challenge_indicator: mpi_threeds_challenge_indicator
45
+ }
46
+ end
47
+
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,90 @@
1
+ require 'genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_indian_card_attributes'
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Mixins
6
+ module Requests
7
+ module Financial
8
+ module Cards
9
+ module Recurring
10
+ # Managed Recurring provides the option to automatically schedule recurring transactions for
11
+ # a specific day and time. Managed Recurring is available after additional configuration.
12
+ module ManagedRecurringAttributes
13
+
14
+ include Recurring::ManagedRecurringIndianCardAttributes
15
+
16
+ attr_reader :managed_recurring_mode, :managed_recurring_interval, :managed_recurring_time_of_day,
17
+ :managed_recurring_period, :managed_recurring_max_count
18
+ attr_accessor :managed_recurring_amount
19
+
20
+ # This indicates that the gateway will automatically manage the subsequent recurring transactions.
21
+ def managed_recurring_mode=(value)
22
+ allowed_options attribute: __method__,
23
+ allowed: GenesisRuby::Api::Constants::Transactions::Parameters::ManagedRecurring::
24
+ Modes.all,
25
+ value: value
26
+ end
27
+
28
+ # The interval type for the period: days or months. The default value is days
29
+ def managed_recurring_interval=(value)
30
+ allowed_options attribute: __method__,
31
+ allowed: GenesisRuby::Api::Constants::Transactions::Parameters::ManagedRecurring::
32
+ Intervals.all,
33
+ value: value,
34
+ allow_empty: true
35
+ end
36
+
37
+ # Specifies the date of the first recurring event in the future
38
+ # default value is date of creation + period.
39
+ def managed_recurring_first_date
40
+ @managed_recurring_first_date&.strftime(
41
+ GenesisRuby::Api::Constants::DateTimeFormats::YYYY_MM_DD_ISO_8601
42
+ )
43
+ end
44
+
45
+ # Specifies the date of the first recurring event in the future
46
+ # default value is date of creation + period.
47
+ def managed_recurring_first_date=(value)
48
+ parse_date attribute: __method__, value: value, allow_empty: true
49
+ end
50
+
51
+ # Specifies the UTC hour in the day for the execution of the recurring transaction, default value 0
52
+ def managed_recurring_time_of_day=(value)
53
+ parse_int attribute: __method__, value: value, allow_empty: true
54
+ end
55
+
56
+ # Rebill period in days(30) or months(12).
57
+ def managed_recurring_period=(value)
58
+ parse_int attribute: __method__, value: value, allow_empty: true
59
+ end
60
+
61
+ # Maximum number of times a recurring will occur. Omit this parameter for unlimited recurring
62
+ def managed_recurring_max_count=(value)
63
+ parse_int attribute: __method__, value: value, allow_empty: true
64
+ end
65
+
66
+ protected
67
+
68
+ # Managed Recurring attributes structure
69
+ def managed_recurring_attributes_structure
70
+ amount = managed_recurring_amount
71
+
72
+ {
73
+ mode: managed_recurring_mode,
74
+ interval: managed_recurring_interval,
75
+ first_date: managed_recurring_first_date,
76
+ time_of_day: managed_recurring_time_of_day,
77
+ period: managed_recurring_period,
78
+ amount: amount.nil? ? nil : Utils::MoneyFormat.amount_to_exponent(amount, currency),
79
+ max_count: managed_recurring_max_count
80
+ }.merge managed_recurring_indian_card_attributes_structure
81
+ end
82
+
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,78 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Mixins
4
+ module Requests
5
+ module Financial
6
+ module Cards
7
+ module Recurring
8
+ # Recurring transactions with cards issued in India are subject to special rules. Prior to requesting the
9
+ # recurring transaction, the merchant should register the recurring agreement as per the Reserve bank of
10
+ # India (RBI) regulations.
11
+ module ManagedRecurringIndianCardAttributes
12
+
13
+ attr_reader :managed_recurring_payment_type, :managed_recurring_amount_type,
14
+ :managed_recurring_frequency, :managed_recurring_validated
15
+
16
+ attr_accessor :managed_recurring_registration_reference_number, :managed_recurring_max_amount
17
+
18
+ # Payment Type of the current recurring transaction
19
+ def managed_recurring_payment_type=(value)
20
+ allowed_options attribute: __method__,
21
+ allowed: GenesisRuby::Api::Constants::Transactions::Parameters::ManagedRecurring::
22
+ PaymentTypes.all,
23
+ value: value.to_s,
24
+ allow_empty: true
25
+ end
26
+
27
+ # Amount Type of the current recurring transaction
28
+ def managed_recurring_amount_type=(value)
29
+ allowed_options attribute: __method__,
30
+ allowed: GenesisRuby::Api::Constants::Transactions::Parameters::ManagedRecurring::
31
+ AmountTypes.all,
32
+ value: value.to_s,
33
+ allow_empty: true
34
+ end
35
+
36
+ # Frequencies of the Frequency of the subsequent transactions
37
+ def managed_recurring_frequency=(value)
38
+ allowed_options attribute: __method__,
39
+ allowed: GenesisRuby::Api::Constants::Transactions::Parameters::ManagedRecurring::
40
+ Frequencies.all,
41
+ value: value.to_s,
42
+ allow_empty: true
43
+ end
44
+
45
+ # Indicates if the current transaction is valid as per the registered agreement. Values: true, false
46
+ def managed_recurring_validated=(value)
47
+ allowed_options attribute: __method__,
48
+ allowed: [true, false],
49
+ value: value,
50
+ allow_empty: true,
51
+ error_message: 'Accepts only boolean values'
52
+ end
53
+
54
+ protected
55
+
56
+ # Managed Recurring Indian Card attributes structure
57
+ def managed_recurring_indian_card_attributes_structure
58
+ max_amount = managed_recurring_max_amount
59
+ amount = max_amount.nil? ? nil : Utils::MoneyFormat.amount_to_exponent(max_amount, currency)
60
+
61
+ {
62
+ payment_type: managed_recurring_payment_type,
63
+ amount_type: managed_recurring_amount_type,
64
+ frequency: managed_recurring_frequency,
65
+ registration_reference_number: managed_recurring_registration_reference_number,
66
+ max_amount: amount,
67
+ validated: managed_recurring_validated || nil
68
+ }
69
+ end
70
+
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
@@ -31,7 +31,7 @@ module GenesisRuby
31
31
  # Threeds V2 Web Payment Form Attributes
32
32
  def threeds_v2_common_attributes_structure
33
33
  {
34
- method: method_attributes,
34
+ threeds_method: method_attributes,
35
35
  control: control_attributes,
36
36
  purchase: purchase_attributes,
37
37
  merchant_risk: merchant_risk_attributes,
@@ -6,15 +6,19 @@ module GenesisRuby
6
6
  # Base Class used for all transaction request containing Credit Card data
7
7
  class CreditCard < GenesisRuby::Api::Requests::Base::Financial
8
8
 
9
- include Mixins::Requests::Financial::PaymentAttributes
9
+ include Mixins::Requests::Financial::Cards::AccountOwnerAttributes
10
10
  include Mixins::Requests::Financial::Cards::CreditCardAttributes
11
11
  include Mixins::Requests::Financial::Cards::TokenizationAttributes
12
+ include Mixins::Requests::Financial::PaymentAttributes
12
13
 
13
14
  protected
14
15
 
15
16
  # Credit Card attributes
16
17
  def payment_transaction_structure
17
- payment_attributes_structure.merge credit_card_attributes_structure, tokenization_attributes_structure
18
+ payment_attributes_structure.merge(
19
+ credit_card_attributes_structure, tokenization_attributes_structure,
20
+ { account_owner: account_owner_attributes_structure }
21
+ )
18
22
  end
19
23
 
20
24
  end
@@ -13,6 +13,7 @@ module GenesisRuby
13
13
  include Mixins::Requests::DocumentAttributes
14
14
  include Mixins::Requests::Financial::Business::BusinessAttributes
15
15
  include Mixins::Requests::Financial::Cards::FxRateAttributes
16
+ include Mixins::Requests::Financial::Cards::Recurring::ManagedRecurringAttributes
16
17
  include Mixins::Requests::Financial::Cards::Recurring::RecurringCategoryAttributes
17
18
  include Mixins::Requests::Financial::Cards::Recurring::RecurringTypeAttributes
18
19
  include Mixins::Requests::Financial::CryptoAttributes
@@ -31,7 +32,7 @@ module GenesisRuby
31
32
  GenesisRuby::Api::Constants::Transactions::AUTHORIZE
32
33
  end
33
34
 
34
- def payment_transaction_structure # rubocop:disable Metrics/MethodLength
35
+ def payment_transaction_structure # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
35
36
  super.merge(
36
37
  gaming: gaming,
37
38
  moto: moto,
@@ -48,7 +49,8 @@ module GenesisRuby
48
49
  business_attributes: business_attributes_structure,
49
50
  recurring_type: recurring_type,
50
51
  recurring_category: recurring_category,
51
- sca_params: sca_attributes_structure
52
+ sca_params: sca_attributes_structure,
53
+ managed_recurring: managed_recurring_attributes_structure
52
54
  )
53
55
  end
54
56
 
@@ -14,6 +14,8 @@ module GenesisRuby
14
14
  include Mixins::Requests::Financial::AsyncAttributes
15
15
  include Mixins::Requests::Financial::Business::BusinessAttributes
16
16
  include Mixins::Requests::Financial::Cards::FxRateAttributes
17
+ include Mixins::Requests::Financial::Cards::MpiAttributes
18
+ include Mixins::Requests::Financial::Cards::Recurring::ManagedRecurringAttributes
17
19
  include Mixins::Requests::Financial::Cards::Recurring::RecurringCategoryAttributes
18
20
  include Mixins::Requests::Financial::Cards::Recurring::RecurringTypeAttributes
19
21
  include Mixins::Requests::Financial::CryptoAttributes
@@ -58,13 +60,15 @@ module GenesisRuby
58
60
  fx_rate_id: fx_rate_id,
59
61
  billing_address: billing_address_parameters_structure,
60
62
  shipping_address: shipping_address_parameters_structure,
63
+ mpi_params: mpi_attributes_structure,
61
64
  risk_params: risk_parameters_structure,
62
65
  dynamic_descriptor_params: dynamic_descriptor_structure,
63
66
  business_attributes: business_attributes_structure,
64
67
  recurring_type: recurring_type,
65
68
  recurring_category: recurring_category,
66
69
  sca_params: sca_attributes_structure,
67
- threeds_v2_params: threeds_v2_common_attributes_structure
70
+ threeds_v2_params: threeds_v2_common_attributes_structure,
71
+ managed_recurring: managed_recurring_attributes_structure
68
72
  )
69
73
  end
70
74
 
@@ -12,6 +12,7 @@ module GenesisRuby
12
12
  include Mixins::Requests::DocumentAttributes
13
13
  include Mixins::Requests::Financial::Business::BusinessAttributes
14
14
  include Mixins::Requests::Financial::Cards::FxRateAttributes
15
+ include Mixins::Requests::Financial::Cards::Recurring::ManagedRecurringAttributes
15
16
  include Mixins::Requests::Financial::Cards::Recurring::RecurringCategoryAttributes
16
17
  include Mixins::Requests::Financial::Cards::Recurring::RecurringTypeAttributes
17
18
  include Mixins::Requests::Financial::CryptoAttributes
@@ -30,7 +31,7 @@ module GenesisRuby
30
31
  GenesisRuby::Api::Constants::Transactions::SALE
31
32
  end
32
33
 
33
- def payment_transaction_structure # rubocop:disable Metrics/MethodLength
34
+ def payment_transaction_structure # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
34
35
  super.merge(
35
36
  gaming: gaming,
36
37
  moto: moto,
@@ -47,7 +48,8 @@ module GenesisRuby
47
48
  business_attributes: business_attributes_structure,
48
49
  recurring_type: recurring_type,
49
50
  recurring_category: recurring_category,
50
- sca_params: sca_attributes_structure
51
+ sca_params: sca_attributes_structure,
52
+ managed_recurring: managed_recurring_attributes_structure
51
53
  )
52
54
  end
53
55
 
@@ -13,6 +13,8 @@ module GenesisRuby
13
13
  include Mixins::Requests::Financial::AsyncAttributes
14
14
  include Mixins::Requests::Financial::Business::BusinessAttributes
15
15
  include Mixins::Requests::Financial::Cards::FxRateAttributes
16
+ include Mixins::Requests::Financial::Cards::MpiAttributes
17
+ include Mixins::Requests::Financial::Cards::Recurring::ManagedRecurringAttributes
16
18
  include Mixins::Requests::Financial::Cards::Recurring::RecurringCategoryAttributes
17
19
  include Mixins::Requests::Financial::Cards::Recurring::RecurringTypeAttributes
18
20
  include Mixins::Requests::Financial::CryptoAttributes
@@ -57,13 +59,15 @@ module GenesisRuby
57
59
  fx_rate_id: fx_rate_id,
58
60
  billing_address: billing_address_parameters_structure,
59
61
  shipping_address: shipping_address_parameters_structure,
62
+ mpi_params: mpi_attributes_structure,
60
63
  risk_params: risk_parameters_structure,
61
64
  dynamic_descriptor_params: dynamic_descriptor_structure,
62
65
  business_attributes: business_attributes_structure,
63
66
  recurring_type: recurring_type,
64
67
  recurring_category: recurring_category,
65
68
  sca_params: sca_attributes_structure,
66
- threeds_v2_params: threeds_v2_common_attributes_structure
69
+ threeds_v2_params: threeds_v2_common_attributes_structure,
70
+ managed_recurring: managed_recurring_attributes_structure
67
71
  )
68
72
  end
69
73
 
@@ -15,7 +15,7 @@ module GenesisRuby
15
15
  include Mixins::Requests::Financial::NotificationAttributes
16
16
  include Mixins::Requests::Financial::PendingPaymentAttributes
17
17
  include Mixins::Requests::Financial::Threeds::Version2::WpfAttributes
18
- include Mixins::Requests::Financial::Cards::Recurring::RecurringTypeAttributes
18
+ include Mixins::Requests::Financial::Cards::AccountOwnerAttributes
19
19
  include Mixins::Requests::Financial::Cards::Recurring::RecurringCategoryAttributes
20
20
  include Mixins::Requests::Financial::DynamicDescriptorAttributes
21
21
  include Mixins::Requests::Financial::RiskAttributes
@@ -60,16 +60,6 @@ module GenesisRuby
60
60
  allow_empty: true
61
61
  end
62
62
 
63
- # Specifies the recurring type of transaction
64
- def recurring_type=(value)
65
- allowed_values = [
66
- GenesisRuby::Api::Constants::Transactions::Parameters::Recurring::Types::INITIAL,
67
- GenesisRuby::Api::Constants::Transactions::Parameters::Recurring::Types::MANAGED
68
- ]
69
-
70
- allowed_options attribute: __method__, allowed: allowed_values, value: value, allow_empty: true
71
- end
72
-
73
63
  protected
74
64
 
75
65
  # Load base configuration
@@ -116,10 +106,10 @@ module GenesisRuby
116
106
  },
117
107
  threeds_v2_params: threeds_v2_wpf_attributes_structure,
118
108
  web_payment_form_id: web_payment_form_id,
119
- recurring_type: recurring_type,
120
109
  recurring_category: recurring_category,
121
110
  dynamic_descriptor_params: dynamic_descriptor_structure,
122
- risk_params: risk_parameters_structure
111
+ risk_params: risk_parameters_structure,
112
+ account_owner: account_owner_attributes_structure
123
113
  }
124
114
  }
125
115
  end
@@ -1,5 +1,5 @@
1
1
  module GenesisRuby
2
2
 
3
- VERSION = '0.1.2'.freeze
3
+ VERSION = '0.1.4'.freeze
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genesis_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - emerchantpay Ltd.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-23 00:00:00.000000000 Z
11
+ date: 2024-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-http
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '3.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rspec_junit_formatter
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.6'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.6'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: rubocop
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -230,6 +244,12 @@ files:
230
244
  - lib/genesis_ruby/api/constants/states/state.rb
231
245
  - lib/genesis_ruby/api/constants/transactions.rb
232
246
  - lib/genesis_ruby/api/constants/transactions/parameters/business/payment_types.rb
247
+ - lib/genesis_ruby/api/constants/transactions/parameters/managed_recurring/amount_types.rb
248
+ - lib/genesis_ruby/api/constants/transactions/parameters/managed_recurring/frequencies.rb
249
+ - lib/genesis_ruby/api/constants/transactions/parameters/managed_recurring/intervals.rb
250
+ - lib/genesis_ruby/api/constants/transactions/parameters/managed_recurring/modes.rb
251
+ - lib/genesis_ruby/api/constants/transactions/parameters/managed_recurring/payment_types.rb
252
+ - lib/genesis_ruby/api/constants/transactions/parameters/mpi_protocol_versions.rb
233
253
  - lib/genesis_ruby/api/constants/transactions/parameters/recurring/categories.rb
234
254
  - lib/genesis_ruby/api/constants/transactions/parameters/recurring/types.rb
235
255
  - lib/genesis_ruby/api/constants/transactions/parameters/refund/bank_account_types.rb
@@ -266,8 +286,12 @@ files:
266
286
  - lib/genesis_ruby/api/mixins/requests/financial/business/furniture_attributes.rb
267
287
  - lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
268
288
  - lib/genesis_ruby/api/mixins/requests/financial/business/travel_agencies_attributes.rb
289
+ - lib/genesis_ruby/api/mixins/requests/financial/cards/account_owner_attributes.rb
269
290
  - lib/genesis_ruby/api/mixins/requests/financial/cards/credit_card_attributes.rb
270
291
  - lib/genesis_ruby/api/mixins/requests/financial/cards/fx_rate_attributes.rb
292
+ - lib/genesis_ruby/api/mixins/requests/financial/cards/mpi_attributes.rb
293
+ - lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_attributes.rb
294
+ - lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/managed_recurring_indian_card_attributes.rb
271
295
  - lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/recurring_category_attributes.rb
272
296
  - lib/genesis_ruby/api/mixins/requests/financial/cards/recurring/recurring_type_attributes.rb
273
297
  - lib/genesis_ruby/api/mixins/requests/financial/cards/tokenization_attributes.rb