genesis_ruby 0.3.1 → 0.3.2

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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/.kiro/specs/f2025112509-add_managed_recurring_api/.config.kiro +1 -0
  3. data/.kiro/specs/f2025112509-add_managed_recurring_api/design.md +332 -0
  4. data/.kiro/specs/f2025112509-add_managed_recurring_api/requirements.md +91 -0
  5. data/.kiro/specs/f2025112509-add_managed_recurring_api/tasks.md +139 -0
  6. data/.kiro/specs/f2025112603-add_reverify_endpoint_to_payee_account/.config.kiro +1 -0
  7. data/.kiro/specs/f2025112603-add_reverify_endpoint_to_payee_account/design.md +148 -0
  8. data/.kiro/specs/f2025112603-add_reverify_endpoint_to_payee_account/requirements.md +81 -0
  9. data/.kiro/specs/f2025112603-add_reverify_endpoint_to_payee_account/tasks.md +48 -0
  10. data/.kiro/specs/f2025112606-add_list_payees_trx_request/.config.kiro +1 -0
  11. data/.kiro/specs/f2025112606-add_list_payees_trx_request/design.md +112 -0
  12. data/.kiro/specs/f2025112606-add_list_payees_trx_request/requirements.md +74 -0
  13. data/.kiro/specs/f2025112606-add_list_payees_trx_request/tasks.md +38 -0
  14. data/.kiro/specs/f2025112609_update_payee_request_params/design.md +86 -0
  15. data/.kiro/specs/f2025112609_update_payee_request_params/requirements.md +86 -0
  16. data/.kiro/specs/f2025112609_update_payee_request_params/tasks.md +40 -0
  17. data/.kiro/specs/f2025112612-add_payee_owner_documents_and_verification_requests/.config.kiro +1 -0
  18. data/.kiro/specs/f2025112612-add_payee_owner_documents_and_verification_requests/design.md +246 -0
  19. data/.kiro/specs/f2025112612-add_payee_owner_documents_and_verification_requests/requirements.md +287 -0
  20. data/.kiro/specs/f2025112612-add_payee_owner_documents_and_verification_requests/tasks.md +76 -0
  21. data/.kiro/specs/f2025112614-add_money_transfer_payout_attributes_to_payout_rq/design.md +84 -0
  22. data/.kiro/specs/f2025112614-add_money_transfer_payout_attributes_to_payout_rq/requirements.md +88 -0
  23. data/.kiro/specs/f2025112614-add_money_transfer_payout_attributes_to_payout_rq/tasks.md +38 -0
  24. data/.kiro/steering/product.md +15 -0
  25. data/.kiro/steering/spec-folder-naming.md +16 -0
  26. data/.kiro/steering/structure.md +96 -0
  27. data/.kiro/steering/tech.md +66 -0
  28. data/CHANGELOG.md +23 -0
  29. data/Gemfile.lock +4 -4
  30. data/README.md +33 -0
  31. data/VERSION +1 -1
  32. data/lib/genesis_ruby/api/constants/non_financial/kyc/address_document_supported_types.rb +81 -0
  33. data/lib/genesis_ruby/api/constants/non_financial/payee/document_types.rb +57 -0
  34. data/lib/genesis_ruby/api/constants/non_financial/payee/owner_types.rb +30 -0
  35. data/lib/genesis_ruby/api/constants/transactions/parameters/money_transfer/purpose_of_payments.rb +50 -0
  36. data/lib/genesis_ruby/api/constants/transactions/parameters/money_transfer/sender_account_number_types.rb +50 -0
  37. data/lib/genesis_ruby/api/constants/transactions/parameters/money_transfer/source_of_funds.rb +44 -0
  38. data/lib/genesis_ruby/api/constants/transactions/parameters/money_transfer/types.rb +26 -0
  39. data/lib/genesis_ruby/api/constants/transactions/parameters/non_financial/billing_api/statement_response_fields.rb +37 -0
  40. data/lib/genesis_ruby/api/mixins/requests/financial/cards/mpi_attributes.rb +0 -10
  41. data/lib/genesis_ruby/api/mixins/requests/financial/money_transfer_payout_attributes.rb +131 -0
  42. data/lib/genesis_ruby/api/mixins/requests/non_financial/date_attributes.rb +87 -5
  43. data/lib/genesis_ruby/api/mixins/requests/non_financial/kyc/business_attributes.rb +42 -0
  44. data/lib/genesis_ruby/api/mixins/requests/non_financial/kyc/document_attributes.rb +8 -7
  45. data/lib/genesis_ruby/api/request.rb +15 -9
  46. data/lib/genesis_ruby/api/requests/base/non_financial/billing_api/base.rb +108 -0
  47. data/lib/genesis_ruby/api/requests/base/non_financial/payee/base.rb +54 -0
  48. data/lib/genesis_ruby/api/requests/financial/cards/authorize3d.rb +1 -3
  49. data/lib/genesis_ruby/api/requests/financial/cards/payout.rb +3 -1
  50. data/lib/genesis_ruby/api/requests/financial/cards/sale3d.rb +1 -3
  51. data/lib/genesis_ruby/api/requests/non_financial/billing_api/statement.rb +170 -0
  52. data/lib/genesis_ruby/api/requests/non_financial/billing_api/transactions.rb +20 -60
  53. data/lib/genesis_ruby/api/requests/non_financial/kyc/business/create.rb +45 -0
  54. data/lib/genesis_ruby/api/requests/non_financial/kyc/business/document.rb +60 -0
  55. data/lib/genesis_ruby/api/requests/non_financial/kyc/business/document_list.rb +59 -0
  56. data/lib/genesis_ruby/api/requests/non_financial/kyc/business/verification.rb +52 -0
  57. data/lib/genesis_ruby/api/requests/non_financial/kyc/verifications/address_by_document_proof.rb +92 -0
  58. data/lib/genesis_ruby/api/requests/non_financial/kyc/verifications/create.rb +4 -1
  59. data/lib/genesis_ruby/api/requests/non_financial/managed_recurring/cancel.rb +63 -0
  60. data/lib/genesis_ruby/api/requests/non_financial/managed_recurring/fetch.rb +63 -0
  61. data/lib/genesis_ruby/api/requests/non_financial/managed_recurring/fetch_all.rb +37 -0
  62. data/lib/genesis_ruby/api/requests/non_financial/payee/account/reverify.rb +61 -0
  63. data/lib/genesis_ruby/api/requests/non_financial/payee/associate_payee_with_owners.rb +105 -0
  64. data/lib/genesis_ruby/api/requests/non_financial/payee/create.rb +37 -7
  65. data/lib/genesis_ruby/api/requests/non_financial/payee/create_payee_document.rb +61 -0
  66. data/lib/genesis_ruby/api/requests/non_financial/payee/dissociate_payee_with_owners.rb +94 -0
  67. data/lib/genesis_ruby/api/requests/non_financial/payee/list.rb +38 -0
  68. data/lib/genesis_ruby/api/requests/non_financial/payee/list_payee_documents.rb +57 -0
  69. data/lib/genesis_ruby/api/requests/non_financial/payee/list_payee_owners.rb +70 -0
  70. data/lib/genesis_ruby/api/requests/non_financial/payee/owners/associate_owner_with_owners.rb +109 -0
  71. data/lib/genesis_ruby/api/requests/non_financial/payee/owners/create.rb +71 -0
  72. data/lib/genesis_ruby/api/requests/non_financial/payee/owners/create_owner_document.rb +63 -0
  73. data/lib/genesis_ruby/api/requests/non_financial/payee/owners/delete.rb +54 -0
  74. data/lib/genesis_ruby/api/requests/non_financial/payee/owners/dissociate_owners.rb +96 -0
  75. data/lib/genesis_ruby/api/requests/non_financial/payee/owners/list_owner_documents.rb +59 -0
  76. data/lib/genesis_ruby/api/requests/non_financial/payee/owners/list_owners.rb +46 -0
  77. data/lib/genesis_ruby/api/requests/non_financial/payee/owners/retrieve.rb +59 -0
  78. data/lib/genesis_ruby/api/requests/non_financial/payee/owners/retrieve_owner_document.rb +62 -0
  79. data/lib/genesis_ruby/api/requests/non_financial/payee/owners/update.rb +66 -0
  80. data/lib/genesis_ruby/api/requests/non_financial/payee/retrieve_payee_document.rb +60 -0
  81. data/lib/genesis_ruby/api/requests/non_financial/payee/update.rb +34 -4
  82. data/lib/genesis_ruby/api/requests/non_financial/payee/verifications/create_payee_verification.rb +58 -0
  83. data/lib/genesis_ruby/api/requests/non_financial/payee/verifications/list_payee_verifications.rb +59 -0
  84. data/lib/genesis_ruby/api/requests/non_financial/payee/verifications/retrieve_payee_verification.rb +62 -0
  85. data/lib/genesis_ruby/api/requests/non_financial/tokenization/retokenize.rb +45 -0
  86. data/lib/genesis_ruby/api/requests/wpf/create.rb +19 -0
  87. data/lib/genesis_ruby/api/response.rb +15 -0
  88. data/lib/genesis_ruby/dependencies.rb +2 -0
  89. data/lib/genesis_ruby/network/adapter/net_http_adapter.rb +31 -5
  90. data/lib/genesis_ruby/network/base_network.rb +5 -0
  91. data/lib/genesis_ruby/network/net_http.rb +16 -4
  92. data/lib/genesis_ruby/utils/options/api_config.rb +43 -32
  93. data/lib/genesis_ruby/utils/options/network_adapter_config.rb +1 -1
  94. data/lib/genesis_ruby/version.rb +1 -1
  95. metadata +72 -3
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Requests
6
+ module NonFinancial
7
+ module Payee
8
+ # Retrieve the details of all Owner records that belongs to specific Payee.
9
+ class ListPayeeOwners < Base::NonFinancial::Payee::Base
10
+
11
+ attr_accessor :payee_unique_id, :type
12
+
13
+ # List Payee Owners initialization
14
+ def initialize(configuration, _builder_interface = nil)
15
+ super configuration
16
+
17
+ self.request_path = 'payee/:payee_unique_id/owners'
18
+ end
19
+
20
+ protected
21
+
22
+ # Override default Versioned Network configuration
23
+ def init_configuration
24
+ super
25
+
26
+ init_get_configuration
27
+ end
28
+
29
+ # Sets the request field validations
30
+ def init_field_validations
31
+ super
32
+
33
+ required_fields.push *%i[
34
+ payee_unique_id
35
+ ]
36
+ end
37
+
38
+ # Returns the request structure
39
+ def request_structure
40
+ {}
41
+ end
42
+
43
+ # Override API endpoint configuration
44
+ def process_request_parameters
45
+ processed_path = request_path.dup.gsub(':payee_unique_id', payee_unique_id.to_s)
46
+
47
+ query_params = build_query_params
48
+ processed_path += "?#{query_params}" unless query_params.empty?
49
+
50
+ init_api_service_configuration request_path: processed_path, include_token: false
51
+
52
+ super
53
+ end
54
+
55
+ private
56
+
57
+ # Build query parameters from filter fields
58
+ def build_query_params
59
+ params = {}
60
+ params['type'] = type if type
61
+
62
+ URI.encode_www_form(params)
63
+ end
64
+
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,109 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Requests
6
+ module NonFinancial
7
+ module Payee
8
+ module Owners
9
+ # Associate Owners with a specific Owner.
10
+ class AssociateOwnerWithOwners < Base::NonFinancial::Payee::Base
11
+
12
+ attr_accessor :owner_unique_id
13
+
14
+ # Associate Owner With Owners initialization
15
+ def initialize(configuration, _builder_interface = nil)
16
+ super configuration
17
+
18
+ self.request_path = 'payee/owners/:owner_unique_id/owners'
19
+ end
20
+
21
+ # Add a single owner to the owners collection
22
+ def add_owner(unique_id:, **options)
23
+ unless unique_id.is_a?(String)
24
+ raise GenesisRuby::InvalidArgumentError, 'Owner unique_id must be a String'
25
+ end
26
+ raise GenesisRuby::InvalidArgumentError, 'Owner unique_id is required' if unique_id.empty?
27
+
28
+ validate_percent_ownership(options[:percent_ownership]) if options.key?(:percent_ownership)
29
+
30
+ owners << { unique_id: unique_id }.merge(options)
31
+ end
32
+
33
+ # Assign owners collection with validation
34
+ def owners=(value)
35
+ if value.nil?
36
+ @owners = nil
37
+ elsif !value.is_a?(Array)
38
+ raise GenesisRuby::InvalidArgumentError, 'Owners must be an Array'
39
+ else
40
+ validate_owners_collection(value)
41
+ @owners = value
42
+ end
43
+ end
44
+
45
+ protected
46
+
47
+ # Owners collection
48
+ def owners
49
+ @owners ||= []
50
+ end
51
+
52
+ # Sets the request field validations
53
+ def init_field_validations
54
+ super
55
+
56
+ required_fields.push *%i[
57
+ owner_unique_id
58
+ owners
59
+ ]
60
+ end
61
+
62
+ private
63
+
64
+ # Validate the owners collection entries
65
+ def validate_owners_collection(value)
66
+ value.each_with_index do |owner, index|
67
+ unless owner.is_a?(Hash) && owner[:unique_id].is_a?(String) && !owner[:unique_id].empty?
68
+ raise GenesisRuby::InvalidArgumentError,
69
+ "Owner at index #{index} must be a Hash with a non-empty String unique_id"
70
+ end
71
+
72
+ validate_percent_ownership(owner[:percent_ownership]) if owner.key?(:percent_ownership)
73
+ end
74
+ end
75
+
76
+ # Validate percent_ownership value when provided
77
+ def validate_percent_ownership(value)
78
+ return if value.nil?
79
+
80
+ raise GenesisRuby::InvalidArgumentError, 'percent_ownership must be numeric' unless value.is_a?(Numeric)
81
+
82
+ return if value >= 0.0 && value <= 100.0
83
+
84
+ raise GenesisRuby::InvalidArgumentError, 'percent_ownership must be between 0.0 and 100.0'
85
+ end
86
+
87
+ # Returns the request structure
88
+ def request_structure
89
+ {
90
+ owners: owners
91
+ }
92
+ end
93
+
94
+ # Override API endpoint configuration
95
+ def process_request_parameters
96
+ super
97
+
98
+ processed_path = request_path.dup.gsub(':owner_unique_id', owner_unique_id.to_s)
99
+
100
+ init_api_service_configuration request_path: processed_path, include_token: false
101
+ end
102
+
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'genesis_ruby/api/constants/non_financial/payee/owner_types'
4
+
5
+ module GenesisRuby
6
+ module Api
7
+ module Requests
8
+ module NonFinancial
9
+ module Payee
10
+ module Owners
11
+ # Create an Owner entity.
12
+ class Create < Base::NonFinancial::Payee::Base
13
+
14
+ attr_accessor :owner_type, :owner_name, :owner_country, :owner_date,
15
+ :notification_url, :registration_number, :owner_address,
16
+ :payees, :owners
17
+
18
+ # Create Owner initialization
19
+ def initialize(configuration, _builder_interface = nil)
20
+ super configuration
21
+
22
+ self.request_path = 'payee/owners'
23
+ end
24
+
25
+ protected
26
+
27
+ # Sets the request field validations
28
+ def init_field_validations
29
+ super
30
+
31
+ required_fields.push *%i[
32
+ owner_type
33
+ owner_name
34
+ owner_country
35
+ ]
36
+
37
+ field_values.merge! owner_type: GenesisRuby::Api::Constants::NonFinancial::Payee::OwnerTypes.all,
38
+ owner_country: GenesisRuby::Utils::Country::COUNTRIES.keys
39
+ end
40
+
41
+ # Returns the request structure
42
+ def request_structure # rubocop:disable Metrics/MethodLength
43
+ {
44
+ owner: {
45
+ type: owner_type,
46
+ name: owner_name,
47
+ country: owner_country,
48
+ date: owner_date,
49
+ notification_url: notification_url,
50
+ registration_number: registration_number,
51
+ address: owner_address,
52
+ payees: payees,
53
+ owners: owners
54
+ }
55
+ }
56
+ end
57
+
58
+ # Override API endpoint configuration
59
+ def process_request_parameters
60
+ super
61
+
62
+ init_api_service_configuration request_path: request_path, include_token: false
63
+ end
64
+
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'genesis_ruby/api/constants/non_financial/payee/document_types'
4
+
5
+ module GenesisRuby
6
+ module Api
7
+ module Requests
8
+ module NonFinancial
9
+ module Payee
10
+ module Owners
11
+ # Create a Document for a specific Owner.
12
+ class CreateOwnerDocument < Base::NonFinancial::Payee::Base
13
+
14
+ attr_accessor :owner_unique_id, :document_type, :file
15
+
16
+ # Create Owner Document initialization
17
+ def initialize(configuration, _builder_interface = nil)
18
+ super configuration
19
+
20
+ self.request_path = 'payee/owners/:owner_unique_id/documents'
21
+ end
22
+
23
+ protected
24
+
25
+ # Sets the request field validations
26
+ def init_field_validations
27
+ super
28
+
29
+ required_fields.push *%i[
30
+ owner_unique_id
31
+ document_type
32
+ file
33
+ ]
34
+
35
+ field_values.merge! document_type: GenesisRuby::Api::Constants::NonFinancial::Payee::DocumentTypes.all
36
+ end
37
+
38
+ # Returns the request structure
39
+ def request_structure
40
+ {
41
+ document: {
42
+ document_type: document_type,
43
+ file: file
44
+ }
45
+ }
46
+ end
47
+
48
+ # Override API endpoint configuration
49
+ def process_request_parameters
50
+ super
51
+
52
+ processed_path = request_path.dup.gsub(':owner_unique_id', owner_unique_id.to_s)
53
+
54
+ init_api_service_configuration request_path: processed_path, include_token: false
55
+ end
56
+
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Requests
6
+ module NonFinancial
7
+ module Payee
8
+ module Owners
9
+ # Delete an Owner entity.
10
+ class Delete < Base::NonFinancial::Payee::Base
11
+
12
+ attr_accessor :owner_unique_id
13
+
14
+ # Delete Owner initialization
15
+ def initialize(configuration, _builder_interface = nil)
16
+ super configuration
17
+
18
+ self.request_path = 'payee/owners/:owner_unique_id'
19
+
20
+ init_delete_configuration
21
+ end
22
+
23
+ protected
24
+
25
+ # Sets the request field validations
26
+ def init_field_validations
27
+ super
28
+
29
+ required_fields.push *%i[
30
+ owner_unique_id
31
+ ]
32
+ end
33
+
34
+ # Returns the request structure
35
+ def request_structure
36
+ {}
37
+ end
38
+
39
+ # Override API endpoint configuration
40
+ def process_request_parameters
41
+ super
42
+
43
+ processed_path = request_path.dup.gsub(':owner_unique_id', owner_unique_id.to_s)
44
+
45
+ init_api_service_configuration request_path: processed_path, include_token: false
46
+ end
47
+
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Requests
6
+ module NonFinancial
7
+ module Payee
8
+ module Owners
9
+ # Dissociate Owners from a specific Owner.
10
+ class DissociateOwners < Base::NonFinancial::Payee::Base
11
+
12
+ attr_accessor :owner_unique_id
13
+
14
+ # Dissociate Owners initialization
15
+ def initialize(configuration, _builder_interface = nil)
16
+ super configuration
17
+
18
+ self.request_path = 'payee/owners/:owner_unique_id/owners'
19
+
20
+ init_delete_configuration
21
+ end
22
+
23
+ # Add a unique_id to the collection of owners to dissociate
24
+ def add_unique_id(value)
25
+ raise GenesisRuby::InvalidArgumentError, 'Unique ID must be a String' unless value.is_a?(String)
26
+ raise GenesisRuby::InvalidArgumentError, 'Unique ID is required' if value.empty?
27
+
28
+ unique_ids << value
29
+ end
30
+
31
+ # Assign unique_ids collection with validation
32
+ def unique_ids=(value)
33
+ if value.nil?
34
+ @unique_ids = nil
35
+ elsif !value.is_a?(Array)
36
+ raise GenesisRuby::InvalidArgumentError, 'Unique IDs must be an Array'
37
+ else
38
+ validate_unique_ids_collection(value)
39
+ @unique_ids = value
40
+ end
41
+ end
42
+
43
+ protected
44
+
45
+ # Unique IDs collection
46
+ def unique_ids
47
+ @unique_ids ||= []
48
+ end
49
+
50
+ # Sets the request field validations
51
+ def init_field_validations
52
+ super
53
+
54
+ required_fields.push *%i[
55
+ owner_unique_id
56
+ unique_ids
57
+ ]
58
+ end
59
+
60
+ # Returns the request structure
61
+ def request_structure
62
+ {
63
+ owners: {
64
+ unique_ids: unique_ids
65
+ }
66
+ }
67
+ end
68
+
69
+ # Override API endpoint configuration
70
+ def process_request_parameters
71
+ super
72
+
73
+ processed_path = request_path.dup.gsub(':owner_unique_id', owner_unique_id.to_s)
74
+
75
+ init_api_service_configuration request_path: processed_path, include_token: false
76
+ end
77
+
78
+ private
79
+
80
+ # Validate unique_ids collection entries
81
+ def validate_unique_ids_collection(value)
82
+ value.each_with_index do |uid, index|
83
+ unless uid.is_a?(String) && !uid.empty?
84
+ raise GenesisRuby::InvalidArgumentError,
85
+ "Unique ID at index #{index} must be a non-empty String"
86
+ end
87
+ end
88
+ end
89
+
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Requests
6
+ module NonFinancial
7
+ module Payee
8
+ module Owners
9
+ # Retrieve the details of all Document records that belongs to specific Owner.
10
+ class ListOwnerDocuments < Base::NonFinancial::Payee::Base
11
+
12
+ attr_accessor :owner_unique_id
13
+
14
+ # List Owner Documents initialization
15
+ def initialize(configuration, _builder_interface = nil)
16
+ super configuration
17
+
18
+ self.request_path = 'payee/owners/:owner_unique_id/documents'
19
+ end
20
+
21
+ protected
22
+
23
+ # Override default Versioned Network configuration
24
+ def init_configuration
25
+ super
26
+
27
+ init_get_configuration
28
+ end
29
+
30
+ # Sets the request field validations
31
+ def init_field_validations
32
+ super
33
+
34
+ required_fields.push *%i[
35
+ owner_unique_id
36
+ ]
37
+ end
38
+
39
+ # Returns the request structure
40
+ def request_structure
41
+ {}
42
+ end
43
+
44
+ # Override API endpoint configuration
45
+ def process_request_parameters
46
+ processed_path = request_path.dup.gsub(':owner_unique_id', owner_unique_id.to_s)
47
+
48
+ init_api_service_configuration request_path: processed_path, include_token: false
49
+
50
+ super
51
+ end
52
+
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Requests
6
+ module NonFinancial
7
+ module Payee
8
+ module Owners
9
+ # Retrieve the details of all Owner records.
10
+ class ListOwners < Base::NonFinancial::Payee::Base
11
+
12
+ # List Owners initialization
13
+ def initialize(configuration, _builder_interface = nil)
14
+ super configuration
15
+
16
+ self.request_path = 'payee/owners'
17
+ end
18
+
19
+ protected
20
+
21
+ # Override default Versioned Network configuration
22
+ def init_configuration
23
+ super
24
+
25
+ init_get_configuration
26
+ end
27
+
28
+ # Returns the request structure
29
+ def request_structure
30
+ {}
31
+ end
32
+
33
+ # Override API endpoint configuration
34
+ def process_request_parameters
35
+ init_api_service_configuration request_path: request_path, include_token: false
36
+
37
+ super
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Requests
6
+ module NonFinancial
7
+ module Payee
8
+ module Owners
9
+ # Retrieve the details of a specific Owner.
10
+ class Retrieve < Base::NonFinancial::Payee::Base
11
+
12
+ attr_accessor :owner_unique_id
13
+
14
+ # Retrieve Owner initialization
15
+ def initialize(configuration, _builder_interface = nil)
16
+ super configuration
17
+
18
+ self.request_path = 'payee/owners/:owner_unique_id'
19
+ end
20
+
21
+ protected
22
+
23
+ # Override default Versioned Network configuration
24
+ def init_configuration
25
+ super
26
+
27
+ init_get_configuration
28
+ end
29
+
30
+ # Sets the request field validations
31
+ def init_field_validations
32
+ super
33
+
34
+ required_fields.push *%i[
35
+ owner_unique_id
36
+ ]
37
+ end
38
+
39
+ # Returns the request structure
40
+ def request_structure
41
+ {}
42
+ end
43
+
44
+ # Override API endpoint configuration
45
+ def process_request_parameters
46
+ processed_path = request_path.dup.gsub(':owner_unique_id', owner_unique_id.to_s)
47
+
48
+ init_api_service_configuration request_path: processed_path, include_token: false
49
+
50
+ super
51
+ end
52
+
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenesisRuby
4
+ module Api
5
+ module Requests
6
+ module NonFinancial
7
+ module Payee
8
+ module Owners
9
+ # Retrieve the details of a specific Document for a specific Owner.
10
+ class RetrieveOwnerDocument < Base::NonFinancial::Payee::Base
11
+
12
+ attr_accessor :owner_unique_id, :document_unique_id
13
+
14
+ # Retrieve Owner Document initialization
15
+ def initialize(configuration, _builder_interface = nil)
16
+ super configuration
17
+
18
+ self.request_path = 'payee/owners/:owner_unique_id/documents/:document_unique_id'
19
+ end
20
+
21
+ protected
22
+
23
+ # Override default Versioned Network configuration
24
+ def init_configuration
25
+ super
26
+
27
+ init_get_configuration
28
+ end
29
+
30
+ # Sets the request field validations
31
+ def init_field_validations
32
+ super
33
+
34
+ required_fields.push *%i[
35
+ owner_unique_id
36
+ document_unique_id
37
+ ]
38
+ end
39
+
40
+ # Returns the request structure
41
+ def request_structure
42
+ {}
43
+ end
44
+
45
+ # Override API endpoint configuration
46
+ def process_request_parameters
47
+ processed_path = request_path.dup
48
+ .gsub(':owner_unique_id', owner_unique_id.to_s)
49
+ .gsub(':document_unique_id', document_unique_id.to_s)
50
+
51
+ init_api_service_configuration request_path: processed_path, include_token: false
52
+
53
+ super
54
+ end
55
+
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end