genesis_ruby 0.2.5 → 0.2.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23c3f5ca68fa323f565fdd6c719727c8766e5c48c8c0493565b1ddb94548bbc7
4
- data.tar.gz: c0c05e008139fb2b329d85a35abfa6208687291e8774e2be883f146cdb5fa8f4
3
+ metadata.gz: 71e80020085f54f73f761fc4edf086d35cd4036def2240f164bf43297bb26655
4
+ data.tar.gz: df18d10bfd5256ea4b1c8b795de95d96b81dc94b92d5bfb79fb97cf03dfd723a
5
5
  SHA512:
6
- metadata.gz: a4dae27aed3ece2f4dd94a591bc4f6c3835bc778545f288df1cccf933f6ada91548c13a1792e728ff7d56fdb2a122d9c8caa90ad77406a526a49aeb0b335b531
7
- data.tar.gz: 0141ea62ea869aa01ab8cc12d44937d3f6264c4d6e1e360c213d251a3b33a360e5e3e4f4142acbbf071cf4e858cd865eadfae0f46ee65db4c4643c3fe58567d9
6
+ metadata.gz: 88e6ed6cca766a04e74c18e304357e6badca5ca2313aa481705ead6228c740c1df0b8aaacb47f362d5cb4d3dc327823454b919271b50c54c6bd5a672cdf24de2
7
+ data.tar.gz: 7138775c1ca35e2704383b2b764f7c6460566472f4c9e5e3b67a286ea7ca6631e69903b0812d2f85cd2b1b838cab6325e97cbb7df3650165a449d48c0c48ec67
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ 0.2.6
2
+ -----
3
+ **Features**:
4
+
5
+ * Added Partial Reversal transaction request support
6
+ * Added KYC Remote Identity Verification API request support
7
+ * Added KYC Update Consumer Registration API request support
8
+
1
9
  0.2.5
2
10
  -----
3
11
  **Features**:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- genesis_ruby (0.2.5)
4
+ genesis_ruby (0.2.6)
5
5
  net-http (~> 0.3.2)
6
6
  nokogiri (~> 1.14)
7
7
 
@@ -42,7 +42,7 @@ GEM
42
42
  language_server-protocol (3.17.0.4)
43
43
  lint_roller (1.1.0)
44
44
  mini_mime (1.1.5)
45
- mini_portile2 (2.8.8)
45
+ mini_portile2 (2.8.9)
46
46
  multi_xml (0.6.0)
47
47
  mustermann (3.0.3)
48
48
  ruby2_keywords (~> 0.0.1)
data/README.md CHANGED
@@ -1009,6 +1009,7 @@ GenesisRuby::Api::Requests::Financial::Cards::TarjetaShopping
1009
1009
 
1010
1010
  ## Preauthorizations
1011
1011
  GenesisRuby::Api::Requests::Financial::Preauthorizations::IncrementalAuthorize
1012
+ GenesisRuby::Api::Requests::Financial::Preauthorizations::PartialReversal
1012
1013
 
1013
1014
  ## Mobile
1014
1015
  GenesisRuby::Api::Requests::Financial::Mobile::ApplePay
@@ -1135,6 +1136,8 @@ GenesisRuby::Api::Requests::NonFinancial::Tokenization::GetCard
1135
1136
 
1136
1137
  ## KYC Know Your Customer API
1137
1138
  GenesisRuby::Api::Requests::NonFinancial::Kyc::ConsumerRegistration::Create
1139
+ GenesisRuby::Api::Requests::NonFinancial::Kyc::ConsumerRegistration::Update
1140
+ GenesisRuby::Api::Requests::NonFinancial::Kyc::Verifications::RemoteIdentity
1138
1141
 
1139
1142
  ## Chargeback API
1140
1143
  GenesisRuby::Api::Requests::NonFinancial::Fraud::Chargeback::Transaction
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.2.6
@@ -0,0 +1,28 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module NonFinancial
5
+ module Kyc
6
+ # This class provides a mapping of supported document types for KYC procedures.
7
+ class DocumentSupportedTypes
8
+
9
+ extend Mixins::Constants::Common
10
+
11
+ # Passport document type
12
+ PASSPORT = 'passport'.freeze
13
+
14
+ # ID card document type
15
+ ID_CARD = 'id_card'.freeze
16
+
17
+ # Driving license document type
18
+ DRIVING_LICENSE = 'driving_license'.freeze
19
+
20
+ # Credit or Debit card document type
21
+ CREDIT_OR_DEBIT_CARD = 'credit_or_debit_card'.freeze
22
+
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,25 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Constants
4
+ module NonFinancial
5
+ module Kyc
6
+ # Profile current statuses
7
+ class ProfileCurrentStatuses
8
+
9
+ extend Mixins::Constants::Common
10
+
11
+ # Undefined
12
+ UNDEFINED = 0
13
+ # Review
14
+ REVIEW = 1
15
+ # Denied
16
+ DENIED = 2
17
+ # Approved
18
+ APPROVED = 3
19
+
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,60 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Mixins
4
+ module Requests
5
+ module NonFinancial
6
+ module Kyc
7
+ # Document Attributes mixin
8
+ module DocumentAttributes
9
+
10
+ attr_accessor :proof, :full_address
11
+ attr_reader :first_name, :middle_name, :last_name
12
+
13
+ # Gets date of birth for the document attributes
14
+ def date_of_birth
15
+ @date_of_birth&.strftime(
16
+ GenesisRuby::Api::Constants::DateTimeFormats::YYYY_MM_DD_ISO_8601
17
+ )
18
+ end
19
+
20
+ # Sets date of birth for the document attributes
21
+ def date_of_birth=(value)
22
+ parse_date attribute: __method__, value: value, allow_empty: true
23
+ end
24
+
25
+ # Sets the first name for the document attributes
26
+ def first_name=(value)
27
+ limited_string attribute: __method__, value: value.to_s.empty? ? nil : value.to_s, max: 32
28
+ end
29
+
30
+ # Sets the middle name for the document attributes
31
+ def middle_name=(value)
32
+ limited_string attribute: __method__, value: value.to_s.empty? ? nil : value.to_s, max: 32
33
+ end
34
+
35
+ # Sets the last name for the document attributes
36
+ def last_name=(value)
37
+ limited_string attribute: __method__, value: value.to_s.empty? ? nil : value.to_s, max: 32
38
+ end
39
+
40
+ protected
41
+
42
+ # Defines the structure of the document attributes
43
+ def document_attributes_structure
44
+ {
45
+ proof: proof,
46
+ date_of_birth: date_of_birth,
47
+ first_name: first_name,
48
+ middle_name: middle_name,
49
+ last_name: last_name,
50
+ full_address: full_address
51
+ }
52
+ end
53
+
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,24 @@
1
+ module GenesisRuby
2
+ module Api
3
+ module Requests
4
+ module Financial
5
+ module Preauthorizations
6
+ # Partial Reversal transaction type
7
+ class PartialReversal < Base::Reference
8
+
9
+ # Partial Reversal transaction type
10
+ def transaction_type
11
+ Constants::Transactions::PARTIAL_REVERSAL
12
+ end
13
+
14
+ # Returns the transaction structure
15
+ def reference_transaction_structure
16
+ {}
17
+ end
18
+
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -51,7 +51,6 @@ module GenesisRuby
51
51
  super
52
52
 
53
53
  required_fields.push *%i[
54
- customer_information_structure
55
54
  customer_unique_id
56
55
  customer_registration_date
57
56
  customer_registration_ip_address
@@ -59,7 +58,8 @@ module GenesisRuby
59
58
 
60
59
  field_values.merge! device_fingerprint_type: [1, 2, 3],
61
60
  profile_action_type: [1, 2],
62
- profile_current_status: [0, 1, 2, 3],
61
+ profile_current_status:
62
+ GenesisRuby::Api::Constants::NonFinancial::Kyc::ProfileCurrentStatuses.all,
63
63
  industry_type: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
64
64
  field_values.merge! customer_information_required_field_values
65
65
  end
@@ -0,0 +1,50 @@
1
+ require 'genesis_ruby/api/constants/non_financial/kyc/profile_current_statuses'
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Requests
6
+ module NonFinancial
7
+ module Kyc
8
+ module ConsumerRegistration
9
+ # Update Consumer Registration Request class for KYC Non-Financial API services
10
+ class Update < Api::Requests::Base::NonFinancial::Kyc::Base
11
+
12
+ attr_accessor :reference_id, :profile_current_status, :status_reason
13
+
14
+ def initialize(configuration, _builder_interface = nil)
15
+ super configuration
16
+
17
+ self.request_path = 'update_consumer'
18
+ end
19
+
20
+ protected
21
+
22
+ # Sets the request field validations
23
+ def init_field_validations
24
+ super
25
+
26
+ required_fields.push *%i[
27
+ reference_id
28
+ profile_current_status
29
+ ]
30
+
31
+ field_values.merge! profile_current_status:
32
+ GenesisRuby::Api::Constants::NonFinancial::Kyc::ProfileCurrentStatuses.all
33
+ end
34
+
35
+ # Defines the request structure
36
+ def request_structure
37
+ {
38
+ reference_id: reference_id,
39
+ profile_current_status: profile_current_status,
40
+ status_reason: status_reason
41
+ }
42
+ end
43
+
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,91 @@
1
+ require 'genesis_ruby/api/constants/non_financial/kyc/document_supported_types'
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Requests
6
+ module NonFinancial
7
+ module Kyc
8
+ module Verifications
9
+ # Remote Identity Verification Request class for KYC Non-Financial API services
10
+ class RemoteIdentity < Api::Requests::Base::NonFinancial::Kyc::Base
11
+
12
+ include Api::Mixins::Requests::NonFinancial::Kyc::DocumentAttributes
13
+
14
+ # Initializes the Remote Identity Verification Request
15
+ def initialize(configuration, _builder_interface = nil)
16
+ super configuration
17
+
18
+ self.request_path = 'verifications'
19
+ end
20
+
21
+ attr_accessor :reference_id, :country, :backside_proof_required
22
+ attr_reader :email
23
+
24
+ # Sets the email address for the Remote Identity verification
25
+ def email=(value)
26
+ raise InvalidArgumentError unless value =~ /\A.+@.+\..+\Z/
27
+
28
+ @email = value
29
+ end
30
+
31
+ # Gets the expiry date for the Remote Identity verification
32
+ def expiry_date
33
+ @expiry_date&.strftime(
34
+ Api::Constants::DateTimeFormats::YYYY_MM_DD_ISO_8601
35
+ )
36
+ end
37
+
38
+ # Sets the expiry date for the Remote Identity verification
39
+ def expiry_date=(value)
40
+ parse_date attribute: __method__, value: value, allow_empty: true
41
+ end
42
+
43
+ # Sets the document supported types for the Remote Identity verification
44
+ def document_supported_types=(value)
45
+ parse_array_of_strings attribute: __method__,
46
+ value: value,
47
+ allowed: Api::Constants::NonFinancial::Kyc::DocumentSupportedTypes.all
48
+ end
49
+
50
+ # Returns the document supported types for the Remote Identity verification
51
+ def document_supported_types
52
+ @document_supported_types || []
53
+ end
54
+
55
+ # Initializes field validations for the Remote Identity verification request
56
+ def init_field_validations
57
+ super
58
+
59
+ field_values.merge! country: GenesisRuby::Utils::Country::COUNTRIES.keys.map(&:upcase),
60
+ backside_proof_required: [true, false]
61
+ end
62
+
63
+ protected
64
+
65
+ # Performs validation checks for the Remote Identity verification request
66
+ def check_requirements
67
+ raise ParameterError, 'Either email or reference_id field has to be set.' if email.nil? && reference_id.nil? # rubocop:disable Layout/LineLength
68
+
69
+ super
70
+ end
71
+
72
+ # Returns request structure for the Remote Identity verification
73
+ def request_structure
74
+ {
75
+ email: email,
76
+ reference_id: reference_id,
77
+ country: country,
78
+ backside_proof_required: backside_proof_required,
79
+ expiry_date: expiry_date,
80
+ document_supported_types: document_supported_types,
81
+ document: document_attributes_structure
82
+ }
83
+ end
84
+
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
@@ -1,5 +1,5 @@
1
1
  module GenesisRuby
2
2
 
3
- VERSION = '0.2.5'.freeze
3
+ VERSION = '0.2.6'.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.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - emerchantpay Ltd.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-05-13 00:00:00.000000000 Z
11
+ date: 2025-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-http
@@ -241,8 +241,10 @@ files:
241
241
  - lib/genesis_ruby/api/constants/endpoints.rb
242
242
  - lib/genesis_ruby/api/constants/environments.rb
243
243
  - lib/genesis_ruby/api/constants/i18n.rb
244
+ - lib/genesis_ruby/api/constants/non_financial/kyc/document_supported_types.rb
244
245
  - lib/genesis_ruby/api/constants/non_financial/kyc/document_types.rb
245
246
  - lib/genesis_ruby/api/constants/non_financial/kyc/genders.rb
247
+ - lib/genesis_ruby/api/constants/non_financial/kyc/profile_current_statuses.rb
246
248
  - lib/genesis_ruby/api/constants/states.rb
247
249
  - lib/genesis_ruby/api/constants/states/state.rb
248
250
  - lib/genesis_ruby/api/constants/transactions.rb
@@ -387,6 +389,7 @@ files:
387
389
  - lib/genesis_ruby/api/mixins/requests/non_financial/fx/id_attributes.rb
388
390
  - lib/genesis_ruby/api/mixins/requests/non_financial/fx/tier_id_attributes.rb
389
391
  - lib/genesis_ruby/api/mixins/requests/non_financial/kyc/customer_information_attributes.rb
392
+ - lib/genesis_ruby/api/mixins/requests/non_financial/kyc/document_attributes.rb
390
393
  - lib/genesis_ruby/api/mixins/requests/non_financial/mode_attributes.rb
391
394
  - lib/genesis_ruby/api/mixins/requests/non_financial/paging_attributes.rb
392
395
  - lib/genesis_ruby/api/mixins/requests/non_financial/tokenization/card_data_attributes.rb
@@ -404,7 +407,6 @@ files:
404
407
  - lib/genesis_ruby/api/requests/base/non_financial/kyc/base.rb
405
408
  - lib/genesis_ruby/api/requests/base/reference.rb
406
409
  - lib/genesis_ruby/api/requests/base/versioned.rb
407
- - lib/genesis_ruby/api/requests/financial/Preauthorizations/incremental_authorize.rb
408
410
  - lib/genesis_ruby/api/requests/financial/capture.rb
409
411
  - lib/genesis_ruby/api/requests/financial/cards/argencard.rb
410
412
  - lib/genesis_ruby/api/requests/financial/cards/aura.rb
@@ -466,6 +468,8 @@ files:
466
468
  - lib/genesis_ruby/api/requests/financial/online_banking_payments/upi.rb
467
469
  - lib/genesis_ruby/api/requests/financial/online_banking_payments/webpay.rb
468
470
  - lib/genesis_ruby/api/requests/financial/online_banking_payments/wechat.rb
471
+ - lib/genesis_ruby/api/requests/financial/preauthorizations/incremental_authorize.rb
472
+ - lib/genesis_ruby/api/requests/financial/preauthorizations/partial_reversal.rb
469
473
  - lib/genesis_ruby/api/requests/financial/refund.rb
470
474
  - lib/genesis_ruby/api/requests/financial/sdd/recurring/init_recurring_sale.rb
471
475
  - lib/genesis_ruby/api/requests/financial/sdd/recurring/recurring_sale.rb
@@ -496,6 +500,8 @@ files:
496
500
  - lib/genesis_ruby/api/requests/non_financial/installments/fetch.rb
497
501
  - lib/genesis_ruby/api/requests/non_financial/installments/show.rb
498
502
  - lib/genesis_ruby/api/requests/non_financial/kyc/consumer_registration/create.rb
503
+ - lib/genesis_ruby/api/requests/non_financial/kyc/consumer_registration/update.rb
504
+ - lib/genesis_ruby/api/requests/non_financial/kyc/verifications/remote_identity.rb
499
505
  - lib/genesis_ruby/api/requests/non_financial/processed_transactions/date_range.rb
500
506
  - lib/genesis_ruby/api/requests/non_financial/processed_transactions/post_date_range.rb
501
507
  - lib/genesis_ruby/api/requests/non_financial/processed_transactions/transaction.rb