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,287 @@
1
+ # Requirements Document
2
+
3
+ ## Introduction
4
+
5
+ Extend the genesis_ruby SDK with missing Payee API request classes for Owner management, Document management, and Verification management. These 20 new non-financial request classes follow the established patterns of the existing Payee and Payee Account request classes, inheriting from `Base::Versioned` and using JSON request/response format against the emerchantpay Versioned API. Additionally, the SDK must be extended with HTTP DELETE method support since the existing codebase only supports POST, GET, PUT, and PATCH.
6
+
7
+ ## Glossary
8
+
9
+ - **SDK**: The genesis_ruby Ruby gem that wraps the emerchantpay payment gateway API
10
+ - **Versioned_API**: The emerchantpay API service accessed via `staging.api.emerchantpay.net` using versioned paths (e.g., `/v1/...`)
11
+ - **Request_Class**: A Ruby class inheriting from `Base::Versioned` that encapsulates a single API endpoint call
12
+ - **Payee**: A merchant entity registered in the emerchantpay system, identified by `payee_unique_id`
13
+ - **Owner**: An entity (company, person, director, or ultimate beneficial owner) associated with a Payee, identified by `owner_unique_id`
14
+ - **Owner_Type**: One of: `company`, `person`, `director`, `ultimate_beneficial_owner`
15
+ - **Document**: A file (encoded in base64) associated with a Payee or Owner, identified by `document_unique_id`
16
+ - **Document_Type**: The classification of a document, one of: `poi`, `passport`, `id_card`, `driving_license`, `poa`, `utility_bill`, `bank_statement`, `company_registration`, `tax_return`, `memorandum_of_association`, `shareholder_register`, `board_resolution`, `proof_of_address`
17
+ - **Verification**: A KYC verification process for a Payee, identified by `verification_unique_id`
18
+ - **Field_Validation**: The mechanism using `required_fields`, `field_values`, and `field_value_dependencies` to enforce parameter constraints before sending a request
19
+ - **Path_Placeholder**: A token in the request path (e.g., `:payee_unique_id`) that is replaced with the actual value during `process_request_parameters`
20
+ - **Query_Parameter**: An optional filter appended to the URL as a query string for GET list endpoints
21
+ - **Delete_Configuration**: A new HTTP method configuration pattern for DELETE requests, analogous to `init_get_configuration` and `init_patch_configuration`
22
+
23
+ ## Requirements
24
+
25
+ ### Requirement 1: HTTP DELETE Method Support
26
+
27
+ **User Story:** As a developer using the SDK, I want the SDK to support HTTP DELETE requests, so that I can call API endpoints that require the DELETE method.
28
+
29
+ #### Acceptance Criteria
30
+
31
+ 1. THE SDK SHALL define a `METHOD_DELETE` constant with value `'DELETE'` in the `Api::Request` class.
32
+ 2. THE SDK SHALL provide a `load_delete_config` method in `Utils::Options::ApiConfig` that configures the request type to `METHOD_DELETE`, format to `Builder::JSON`, and authorization to `AUTH_TYPE_BASIC`.
33
+ 3. THE SDK SHALL provide an `init_delete_configuration` method in `Api::Request` that calls `@api_config.load_delete_config`.
34
+ 4. THE SDK SHALL handle the DELETE format in `NetworkAdapterConfig#fetch_content_type` returning `'application/json'`.
35
+
36
+ ### Requirement 2: List Payee Owners
37
+
38
+ **User Story:** As a developer, I want to list all owners associated with a specific payee, so that I can retrieve ownership information.
39
+
40
+ #### Acceptance Criteria
41
+
42
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/:payee_unique_id/owners'`.
43
+ 2. THE Request_Class SHALL use GET HTTP method via `init_get_configuration`.
44
+ 3. THE Request_Class SHALL require `payee_unique_id` as a required field.
45
+ 4. WHEN an optional `type` query parameter is provided, THE Request_Class SHALL append it to the URL as a query string.
46
+ 5. THE Request_Class SHALL return an empty request structure.
47
+ 6. THE Request_Class SHALL replace the `:payee_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
48
+
49
+ ### Requirement 3: Associate Payee with Owners
50
+
51
+ **User Story:** As a developer, I want to associate owners with a payee, so that I can establish ownership relationships.
52
+
53
+ #### Acceptance Criteria
54
+
55
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/:payee_unique_id/owners'`.
56
+ 2. THE Request_Class SHALL use POST HTTP method (default).
57
+ 3. THE Request_Class SHALL require `payee_unique_id` as a required field.
58
+ 4. THE Request_Class SHALL accept an `owners` array parameter where each element contains `unique_id` and `percent_ownership`.
59
+ 5. THE Request_Class SHALL return a request structure containing the `owners` array.
60
+ 6. THE Request_Class SHALL replace the `:payee_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
61
+
62
+ ### Requirement 4: Dissociate Payee from Owners
63
+
64
+ **User Story:** As a developer, I want to dissociate owners from a payee, so that I can remove ownership relationships.
65
+
66
+ #### Acceptance Criteria
67
+
68
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/:payee_unique_id/owners'`.
69
+ 2. THE Request_Class SHALL use DELETE HTTP method via `init_delete_configuration`.
70
+ 3. THE Request_Class SHALL require `payee_unique_id` as a required field.
71
+ 4. THE Request_Class SHALL accept an `owners` array parameter containing owner `unique_id` values.
72
+ 5. THE Request_Class SHALL return a request structure containing the `owners` array.
73
+ 6. THE Request_Class SHALL replace the `:payee_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
74
+
75
+ ### Requirement 5: Create Payee Document
76
+
77
+ **User Story:** As a developer, I want to create a document for a payee, so that I can upload verification documents.
78
+
79
+ #### Acceptance Criteria
80
+
81
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/:payee_unique_id/documents'`.
82
+ 2. THE Request_Class SHALL use POST HTTP method (default).
83
+ 3. THE Request_Class SHALL require `payee_unique_id`, `document_type`, and `file` as required fields.
84
+ 4. THE Request_Class SHALL validate `document_type` against the allowed Document_Type values.
85
+ 5. THE Request_Class SHALL return a request structure containing `document_type` and `file` (base64 encoded) nested under a `document` key.
86
+ 6. THE Request_Class SHALL replace the `:payee_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
87
+
88
+ ### Requirement 6: Retrieve Payee Document
89
+
90
+ **User Story:** As a developer, I want to retrieve a specific document for a payee, so that I can access uploaded document details.
91
+
92
+ #### Acceptance Criteria
93
+
94
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/:payee_unique_id/documents/:document_unique_id'`.
95
+ 2. THE Request_Class SHALL use GET HTTP method via `init_get_configuration`.
96
+ 3. THE Request_Class SHALL require `payee_unique_id` and `document_unique_id` as required fields.
97
+ 4. THE Request_Class SHALL return an empty request structure.
98
+ 5. THE Request_Class SHALL replace both `:payee_unique_id` and `:document_unique_id` placeholders and call `init_api_service_configuration` with `include_token: false`.
99
+
100
+ ### Requirement 7: List Payee Documents
101
+
102
+ **User Story:** As a developer, I want to list all documents for a payee, so that I can view all uploaded documents.
103
+
104
+ #### Acceptance Criteria
105
+
106
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/:payee_unique_id/documents'`.
107
+ 2. THE Request_Class SHALL use GET HTTP method via `init_get_configuration`.
108
+ 3. THE Request_Class SHALL require `payee_unique_id` as a required field.
109
+ 4. THE Request_Class SHALL return an empty request structure.
110
+ 5. THE Request_Class SHALL replace the `:payee_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
111
+
112
+ ### Requirement 8: Create Payee Verification
113
+
114
+ **User Story:** As a developer, I want to create a verification for a payee, so that I can initiate the KYC verification process.
115
+
116
+ #### Acceptance Criteria
117
+
118
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/:payee_unique_id/verifications'`.
119
+ 2. THE Request_Class SHALL use POST HTTP method (default).
120
+ 3. THE Request_Class SHALL require `payee_unique_id` as a required field.
121
+ 4. THE Request_Class SHALL accept optional `notification_url`, `redirect_url`, and `with_checks_retry` parameters.
122
+ 5. THE Request_Class SHALL return a request structure containing `notification_url`, `redirect_url`, and `with_checks_retry` nested under a `verification` key.
123
+ 6. THE Request_Class SHALL replace the `:payee_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
124
+
125
+ ### Requirement 9: Retrieve Payee Verification
126
+
127
+ **User Story:** As a developer, I want to retrieve a specific verification for a payee, so that I can check verification status.
128
+
129
+ #### Acceptance Criteria
130
+
131
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/:payee_unique_id/verifications/:verification_unique_id'`.
132
+ 2. THE Request_Class SHALL use GET HTTP method via `init_get_configuration`.
133
+ 3. THE Request_Class SHALL require `payee_unique_id` and `verification_unique_id` as required fields.
134
+ 4. THE Request_Class SHALL return an empty request structure.
135
+ 5. THE Request_Class SHALL replace both `:payee_unique_id` and `:verification_unique_id` placeholders and call `init_api_service_configuration` with `include_token: false`.
136
+
137
+ ### Requirement 10: List Payee Verifications
138
+
139
+ **User Story:** As a developer, I want to list all verifications for a payee, so that I can view the verification history.
140
+
141
+ #### Acceptance Criteria
142
+
143
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/:payee_unique_id/verifications'`.
144
+ 2. THE Request_Class SHALL use GET HTTP method via `init_get_configuration`.
145
+ 3. THE Request_Class SHALL require `payee_unique_id` as a required field.
146
+ 4. THE Request_Class SHALL return an empty request structure.
147
+ 5. THE Request_Class SHALL replace the `:payee_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
148
+
149
+ ### Requirement 11: Create Owner
150
+
151
+ **User Story:** As a developer, I want to create an owner entity, so that I can register companies, persons, directors, or ultimate beneficial owners.
152
+
153
+ #### Acceptance Criteria
154
+
155
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/owners'`.
156
+ 2. THE Request_Class SHALL use POST HTTP method (default).
157
+ 3. THE Request_Class SHALL require `owner_type`, `owner_name`, and `owner_country` as required fields.
158
+ 4. THE Request_Class SHALL validate `owner_type` against the allowed Owner_Type values (`company`, `person`, `director`, `ultimate_beneficial_owner`).
159
+ 5. THE Request_Class SHALL validate `owner_country` against `GenesisRuby::Utils::Country::COUNTRIES.keys`.
160
+ 6. THE Request_Class SHALL accept optional parameters: `owner_date`, `notification_url`, `registration_number`, `owner_address` (hash with `first_line`, `second_line`, `city`, `zip_code`, `state`), `payees` array, and `owners` array.
161
+ 7. THE Request_Class SHALL return a request structure containing all owner fields nested under an `owner` key.
162
+ 8. THE Request_Class SHALL call `init_api_service_configuration` with `include_token: false`.
163
+
164
+ ### Requirement 12: Retrieve Owner
165
+
166
+ **User Story:** As a developer, I want to retrieve a specific owner, so that I can access owner details.
167
+
168
+ #### Acceptance Criteria
169
+
170
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/owners/:owner_unique_id'`.
171
+ 2. THE Request_Class SHALL use GET HTTP method via `init_get_configuration`.
172
+ 3. THE Request_Class SHALL require `owner_unique_id` as a required field.
173
+ 4. THE Request_Class SHALL return an empty request structure.
174
+ 5. THE Request_Class SHALL replace the `:owner_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
175
+
176
+ ### Requirement 13: Update Owner
177
+
178
+ **User Story:** As a developer, I want to update an existing owner, so that I can modify owner details.
179
+
180
+ #### Acceptance Criteria
181
+
182
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/owners/:owner_unique_id'`.
183
+ 2. THE Request_Class SHALL use PATCH HTTP method via `init_patch_configuration`.
184
+ 3. THE Request_Class SHALL require `owner_unique_id` as a required field.
185
+ 4. THE Request_Class SHALL accept optional parameters: `owner_name`, `owner_country`, `owner_date`, `notification_url`, `registration_number`, and `owner_address`.
186
+ 5. THE Request_Class SHALL validate `owner_country` against `GenesisRuby::Utils::Country::COUNTRIES.keys` when provided.
187
+ 6. THE Request_Class SHALL return a request structure containing the updatable fields nested under an `owner` key.
188
+ 7. THE Request_Class SHALL replace the `:owner_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
189
+
190
+ ### Requirement 14: Delete Owner
191
+
192
+ **User Story:** As a developer, I want to delete an owner, so that I can remove owner entities from the system.
193
+
194
+ #### Acceptance Criteria
195
+
196
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/owners/:owner_unique_id'`.
197
+ 2. THE Request_Class SHALL use DELETE HTTP method via `init_delete_configuration`.
198
+ 3. THE Request_Class SHALL require `owner_unique_id` as a required field.
199
+ 4. THE Request_Class SHALL return an empty request structure.
200
+ 5. THE Request_Class SHALL replace the `:owner_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
201
+
202
+ ### Requirement 15: List Owners
203
+
204
+ **User Story:** As a developer, I want to list all owners, so that I can retrieve all registered owner entities.
205
+
206
+ #### Acceptance Criteria
207
+
208
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/owners'`.
209
+ 2. THE Request_Class SHALL use GET HTTP method via `init_get_configuration`.
210
+ 3. THE Request_Class SHALL return an empty request structure.
211
+ 4. THE Request_Class SHALL call `init_api_service_configuration` with `include_token: false`.
212
+
213
+ ### Requirement 16: Associate Owner with Owners
214
+
215
+ **User Story:** As a developer, I want to associate owners with another owner, so that I can establish nested ownership hierarchies.
216
+
217
+ #### Acceptance Criteria
218
+
219
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/owners/:owner_unique_id/owners'`.
220
+ 2. THE Request_Class SHALL use POST HTTP method (default).
221
+ 3. THE Request_Class SHALL require `owner_unique_id` as a required field.
222
+ 4. THE Request_Class SHALL accept an `owners` array parameter where each element contains `unique_id` and `percent_ownership`.
223
+ 5. THE Request_Class SHALL return a request structure containing the `owners` array.
224
+ 6. THE Request_Class SHALL replace the `:owner_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
225
+
226
+ ### Requirement 17: Dissociate Owner from Owners
227
+
228
+ **User Story:** As a developer, I want to dissociate owners from another owner, so that I can remove nested ownership relationships.
229
+
230
+ #### Acceptance Criteria
231
+
232
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/owners/:owner_unique_id/owners'`.
233
+ 2. THE Request_Class SHALL use DELETE HTTP method via `init_delete_configuration`.
234
+ 3. THE Request_Class SHALL require `owner_unique_id` as a required field.
235
+ 4. THE Request_Class SHALL accept an `owners` array parameter containing owner `unique_id` values.
236
+ 5. THE Request_Class SHALL return a request structure containing the `owners` array.
237
+ 6. THE Request_Class SHALL replace the `:owner_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
238
+
239
+ ### Requirement 18: Create Owner Document
240
+
241
+ **User Story:** As a developer, I want to create a document for an owner, so that I can upload verification documents for owner entities.
242
+
243
+ #### Acceptance Criteria
244
+
245
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/owners/:owner_unique_id/documents'`.
246
+ 2. THE Request_Class SHALL use POST HTTP method (default).
247
+ 3. THE Request_Class SHALL require `owner_unique_id`, `document_type`, and `file` as required fields.
248
+ 4. THE Request_Class SHALL validate `document_type` against the allowed Document_Type values.
249
+ 5. THE Request_Class SHALL return a request structure containing `document_type` and `file` (base64 encoded) nested under a `document` key.
250
+ 6. THE Request_Class SHALL replace the `:owner_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
251
+
252
+ ### Requirement 19: Retrieve Owner Document
253
+
254
+ **User Story:** As a developer, I want to retrieve a specific document for an owner, so that I can access uploaded owner document details.
255
+
256
+ #### Acceptance Criteria
257
+
258
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/owners/:owner_unique_id/documents/:document_unique_id'`.
259
+ 2. THE Request_Class SHALL use GET HTTP method via `init_get_configuration`.
260
+ 3. THE Request_Class SHALL require `owner_unique_id` and `document_unique_id` as required fields.
261
+ 4. THE Request_Class SHALL return an empty request structure.
262
+ 5. THE Request_Class SHALL replace both `:owner_unique_id` and `:document_unique_id` placeholders and call `init_api_service_configuration` with `include_token: false`.
263
+
264
+ ### Requirement 20: List Owner Documents
265
+
266
+ **User Story:** As a developer, I want to list all documents for an owner, so that I can view all uploaded owner documents.
267
+
268
+ #### Acceptance Criteria
269
+
270
+ 1. THE Request_Class SHALL inherit from `Base::Versioned` and set `request_path` to `'payee/owners/:owner_unique_id/documents'`.
271
+ 2. THE Request_Class SHALL use GET HTTP method via `init_get_configuration`.
272
+ 3. THE Request_Class SHALL require `owner_unique_id` as a required field.
273
+ 4. THE Request_Class SHALL return an empty request structure.
274
+ 5. THE Request_Class SHALL replace the `:owner_unique_id` placeholder and call `init_api_service_configuration` with `include_token: false`.
275
+
276
+ ### Requirement 21: Consistent Pattern Compliance
277
+
278
+ **User Story:** As a developer, I want all new request classes to follow the established SDK patterns, so that the codebase remains consistent and maintainable.
279
+
280
+ #### Acceptance Criteria
281
+
282
+ 1. THE SDK SHALL place all new Request_Class files under `lib/genesis_ruby/api/requests/non_financial/payee/` following the directory structure: `owners/`, `documents/`, `verifications/`, `owner/`, `owner/owners/`, `owner/documents/`.
283
+ 2. THE SDK SHALL provide a corresponding RSpec test file for each new Request_Class under `spec/genesis_ruby/api/requests/non_financial/payee/` mirroring the source directory structure.
284
+ 3. WHEN a Request_Class uses path placeholders, THE Request_Class SHALL replace all placeholders in `process_request_parameters` before calling `init_api_service_configuration`.
285
+ 4. THE SDK SHALL include `'base request examples'` and `'versioned request examples'` shared example groups in each new spec file.
286
+ 5. WHEN a Request_Class accepts optional query parameters for list endpoints, THE Request_Class SHALL build a query string and append it to the processed path following the `Account::List` pattern.
287
+ 6. THE SDK SHALL validate country fields against `GenesisRuby::Utils::Country::COUNTRIES.keys` using `field_values` wherever a country parameter is accepted.
@@ -0,0 +1,76 @@
1
+ # Tasks
2
+
3
+ ## Task 1: HTTP DELETE Infrastructure
4
+
5
+ - [x] 1.1 Add `METHOD_DELETE = 'DELETE'` constant to `lib/genesis_ruby/api/request.rb` after `METHOD_PATCH`
6
+ - [x] 1.2 Add `load_delete_config` method to `lib/genesis_ruby/utils/options/api_config.rb` (type: METHOD_DELETE, format: Builder::JSON, authorization: AUTH_TYPE_BASIC)
7
+ - [x] 1.3 Add `init_delete_configuration` method to `lib/genesis_ruby/api/request.rb` that calls `@api_config.load_delete_config`
8
+ - [x] 1.4 Add DELETE case to `Network::Adapter::NetHttpAdapter#execute` — `when Api::Request::METHOD_DELETE then @response = @request.delete path, headers`
9
+ - [x] 1.5 Update `NetHttpAdapter#headers` to exclude payload headers for DELETE (same as GET)
10
+ - [x] 1.6 Add unit tests for DELETE infrastructure in existing spec files
11
+
12
+ ## Task 2: Constants for Owner Types and Document Types
13
+
14
+ - [x] 2.1 Create `lib/genesis_ruby/api/constants/non_financial/payee/owner_types.rb` with constants: COMPANY, PERSON, DIRECTOR, ULTIMATE_BENEFICIAL_OWNER
15
+ - [x] 2.2 Create `lib/genesis_ruby/api/constants/non_financial/payee/document_types.rb` with all document type constants
16
+
17
+ ## Task 3: Payee-level Owners Operations (flat in payee/)
18
+
19
+ - [x] 3.1 Create `lib/genesis_ruby/api/requests/non_financial/payee/list_payee_owners.rb` — GET with optional `type` query param
20
+ - [x] 3.2 Create `lib/genesis_ruby/api/requests/non_financial/payee/associate_payee_with_owners.rb` — POST with `owners` array body
21
+ - [x] 3.3 Create `lib/genesis_ruby/api/requests/non_financial/payee/dissociate_payee_with_owners.rb` — DELETE with `owners` array body
22
+ - [x] 3.4 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/list_payee_owners_spec.rb`
23
+ - [x] 3.5 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/associate_payee_with_owners_spec.rb`
24
+ - [x] 3.6 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/dissociate_payee_with_owners_spec.rb`
25
+
26
+ ## Task 4: Payee-level Documents Operations (flat in payee/)
27
+
28
+ - [x] 4.1 Create `lib/genesis_ruby/api/requests/non_financial/payee/create_payee_document.rb` — POST with document_type validation and file
29
+ - [x] 4.2 Create `lib/genesis_ruby/api/requests/non_financial/payee/retrieve_payee_document.rb` — GET with payee_unique_id and document_unique_id
30
+ - [x] 4.3 Create `lib/genesis_ruby/api/requests/non_financial/payee/list_payee_documents.rb` — GET with payee_unique_id
31
+ - [x] 4.4 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/create_payee_document_spec.rb`
32
+ - [x] 4.5 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/retrieve_payee_document_spec.rb`
33
+ - [x] 4.6 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/list_payee_documents_spec.rb`
34
+
35
+ ## Task 5: Payee Verifications (in payee/verifications/)
36
+
37
+ - [x] 5.1 Create `lib/genesis_ruby/api/requests/non_financial/payee/verifications/create_payee_verification.rb` — POST with optional notification_url, redirect_url, with_checks_retry
38
+ - [x] 5.2 Create `lib/genesis_ruby/api/requests/non_financial/payee/verifications/retrieve_payee_verification.rb` — GET with payee_unique_id and verification_unique_id
39
+ - [x] 5.3 Create `lib/genesis_ruby/api/requests/non_financial/payee/verifications/list_payee_verifications.rb` — GET with payee_unique_id
40
+ - [x] 5.4 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/verifications/create_payee_verification_spec.rb`
41
+ - [x] 5.5 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/verifications/retrieve_payee_verification_spec.rb`
42
+ - [x] 5.6 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/verifications/list_payee_verifications_spec.rb`
43
+
44
+ ## Task 6: Owner CRUD (in payee/owners/)
45
+
46
+ - [x] 6.1 Create `lib/genesis_ruby/api/requests/non_financial/payee/owners/create.rb` — POST with owner_type, owner_name, owner_country validations, optional address/payees/owners
47
+ - [x] 6.2 Create `lib/genesis_ruby/api/requests/non_financial/payee/owners/retrieve.rb` — GET with owner_unique_id
48
+ - [x] 6.3 Create `lib/genesis_ruby/api/requests/non_financial/payee/owners/update.rb` — PATCH with owner_unique_id, optional fields
49
+ - [x] 6.4 Create `lib/genesis_ruby/api/requests/non_financial/payee/owners/delete.rb` — DELETE with owner_unique_id
50
+ - [x] 6.5 Create `lib/genesis_ruby/api/requests/non_financial/payee/owners/list_owners.rb` — GET, no required fields
51
+ - [x] 6.6 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/owners/create_spec.rb`
52
+ - [x] 6.7 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/owners/retrieve_spec.rb`
53
+ - [x] 6.8 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/owners/update_spec.rb`
54
+ - [x] 6.9 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/owners/delete_spec.rb`
55
+ - [x] 6.10 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/owners/list_owners_spec.rb`
56
+
57
+ ## Task 7: Owner sub-operations — Owners Association (in payee/owners/)
58
+
59
+ - [x] 7.1 Create `lib/genesis_ruby/api/requests/non_financial/payee/owners/associate_owner_with_owners.rb` — POST with owners array
60
+ - [x] 7.2 Create `lib/genesis_ruby/api/requests/non_financial/payee/owners/dissociate_owners.rb` — DELETE with owners array
61
+ - [x] 7.3 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/owners/associate_owner_with_owners_spec.rb`
62
+ - [x] 7.4 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/owners/dissociate_owners_spec.rb`
63
+
64
+ ## Task 8: Owner sub-operations — Documents (in payee/owners/)
65
+
66
+ - [x] 8.1 Create `lib/genesis_ruby/api/requests/non_financial/payee/owners/create_owner_document.rb` — POST with document_type validation and file
67
+ - [x] 8.2 Create `lib/genesis_ruby/api/requests/non_financial/payee/owners/retrieve_owner_document.rb` — GET with owner_unique_id and document_unique_id
68
+ - [x] 8.3 Create `lib/genesis_ruby/api/requests/non_financial/payee/owners/list_owner_documents.rb` — GET with owner_unique_id
69
+ - [x] 8.4 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/owners/create_owner_document_spec.rb`
70
+ - [x] 8.5 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/owners/retrieve_owner_document_spec.rb`
71
+ - [x] 8.6 Create spec: `spec/genesis_ruby/api/requests/non_financial/payee/owners/list_owner_documents_spec.rb`
72
+
73
+ ## Task 9: Run Full Test Suite
74
+
75
+ - [x] 9.1 Run `bundle exec rspec` to verify all new and existing tests pass
76
+ - [x] 9.2 Fix any failures or regressions
@@ -0,0 +1,84 @@
1
+ # Design Document
2
+
3
+ ## Overview
4
+
5
+ This feature adds Money Transfer Payout attributes to the existing Payout transaction request. It follows the established SDK patterns: constants under `Api::Constants::Transactions::Parameters::MoneyTransfer::`, a mixin module under `Api::Mixins::Requests::Financial::`, and shared RSpec examples for test reuse.
6
+
7
+ ## Architecture
8
+
9
+ ### Constants (new directory: `money_transfer/`)
10
+
11
+ ```
12
+ lib/genesis_ruby/api/constants/transactions/parameters/money_transfer/
13
+ ├── types.rb # visa, mastercard
14
+ ├── sender_account_number_types.rb # iban, credit_debit_card, etc.
15
+ ├── purpose_of_payments.rb # family_support, education, etc.
16
+ └── source_of_funds.rb # current_account, credit_card, etc.
17
+ ```
18
+
19
+ Each constant class extends `Mixins::Constants::Common` providing `.all` and `.valid?` methods.
20
+
21
+ ### Mixin Module
22
+
23
+ ```
24
+ lib/genesis_ruby/api/mixins/requests/financial/money_transfer_payout_attributes.rb
25
+ ```
26
+
27
+ Pattern follows `FundingAttributes`:
28
+ - `attr_accessor` for plain string fields (no validation needed)
29
+ - `attr_reader` + custom setter with `allowed_options` for enum fields
30
+ - Custom getter/setter for date field using `parse_date`
31
+ - Protected `money_transfer_payout_attributes_structure` method returning the nested hash
32
+
33
+ ### Request Class Integration
34
+
35
+ The `Payout` class includes the mixin and adds `money_transfer: money_transfer_payout_attributes_structure` to its `payment_transaction_structure` hash.
36
+
37
+ ### XML Structure
38
+
39
+ ```xml
40
+ <money_transfer>
41
+ <type>mastercard</type>
42
+ <sender_account_number>123456</sender_account_number>
43
+ <sender_birth_date>15-06-1990</sender_birth_date>
44
+ <service_provider_name>Provider</service_provider_name>
45
+ <sender_account_number_type>iban</sender_account_number_type>
46
+ <purpose_of_payment>family_support</purpose_of_payment>
47
+ <source_of_funds>current_account</source_of_funds>
48
+ <sender_address>
49
+ <country>US</country>
50
+ <city>New York</city>
51
+ <line>123 Main St</line>
52
+ <state>NY</state>
53
+ <postal_code>10001</postal_code>
54
+ </sender_address>
55
+ <receiver>
56
+ <first_name>John</first_name>
57
+ <last_name>Doe</last_name>
58
+ <country>GB</country>
59
+ <city>London</city>
60
+ <line>456 High St</line>
61
+ <state>LDN</state>
62
+ <postal_code>EC1A</postal_code>
63
+ <account_number>987654</account_number>
64
+ <account_number_type>card</account_number_type>
65
+ </receiver>
66
+ </money_transfer>
67
+ ```
68
+
69
+ ## Validation Strategy
70
+
71
+ Enum fields use `allowed_options` in the setter (raises `InvalidArgumentError` immediately on invalid assignment). This differs from the `field_values` approach used by `FundingAttributes` (which validates at `build_document` time raising `ParameterError`). The setter-based approach was chosen to match `SourceOfFundsAttributes` and `PurposeOfPaymentAttributes` patterns already used on the same Payout class.
72
+
73
+ ## Test Strategy
74
+
75
+ Shared examples test:
76
+ 1. Empty state — no `money_transfer` node in output
77
+ 2. Valid enum values — correct XML nodes generated
78
+ 3. Invalid enum values — `InvalidArgumentError` raised at setter
79
+ 4. Nested structures — `sender_address` and `receiver` sub-nodes
80
+
81
+ ## Dependencies
82
+
83
+ - Auto-loaded by `dependencies.rb` glob pattern (no manual require needed beyond the mixin's own requires)
84
+ - No new gems or external dependencies
@@ -0,0 +1,88 @@
1
+ # Requirements Document
2
+
3
+ ## Introduction
4
+
5
+ Add Money Transfer Payout attributes support to the Payout transaction request class. The Money Transfer object is an optional nested structure on the Payout request that carries sender, receiver, and transfer metadata required by Visa and Mastercard for money transfer OCT (Original Credit Transaction) payouts.
6
+
7
+ ## Glossary
8
+
9
+ - **Payout**: A credit card transaction without a reference (OCT) — `GenesisRuby::Api::Requests::Financial::Cards::Payout`
10
+ - **Money Transfer**: An optional nested object within Payout carrying sender/receiver details for regulated money transfers
11
+ - **OCT**: Original Credit Transaction — a credit pushed to a cardholder without a prior debit
12
+ - **Mixin**: A Ruby module included into a request class to add attributes and structure
13
+ - **Restricted Setter**: A setter method that validates the assigned value against a list of allowed options
14
+
15
+ ## Requirements
16
+
17
+ ### Requirement 1: Money Transfer Type Constants
18
+
19
+ **User Story:** As a developer, I want a constant class defining allowed money transfer types, so that the SDK validates the `type` field.
20
+
21
+ #### Acceptance Criteria
22
+
23
+ 1. THE SDK SHALL define a `MoneyTransfer::Types` constant class at `Api::Constants::Transactions::Parameters::MoneyTransfer::Types`.
24
+ 2. THE class SHALL include values: `visa`, `mastercard`.
25
+ 3. THE class SHALL extend `Mixins::Constants::Common` to provide `.all` and `.valid?` methods.
26
+
27
+ ### Requirement 2: Money Transfer Sender Account Number Type Constants
28
+
29
+ **User Story:** As a developer, I want a constant class defining allowed sender account number types for money transfers.
30
+
31
+ #### Acceptance Criteria
32
+
33
+ 1. THE SDK SHALL define a `MoneyTransfer::SenderAccountNumberTypes` constant class.
34
+ 2. THE class SHALL include values: `iban`, `credit_debit_card`, `savings_checking_investment`, `social_networking_id`, `phone_number`, `bank_account_number_and_bic`, `wallet_id`, `unique_transaction_reference`, `national_id`, `other`.
35
+ 3. THE class SHALL extend `Mixins::Constants::Common`.
36
+
37
+ ### Requirement 3: Money Transfer Purpose of Payments Constants
38
+
39
+ **User Story:** As a developer, I want a constant class defining allowed purpose of payment values specific to money transfers.
40
+
41
+ #### Acceptance Criteria
42
+
43
+ 1. THE SDK SHALL define a `MoneyTransfer::PurposeOfPayments` constant class.
44
+ 2. THE class SHALL include values: `family_support`, `education`, `gift_and_donation`, `medical_treatment`, `maintenance`, `travel`, `small_value`, `liberalized`, `savings_investments`, `other`.
45
+ 3. THE class SHALL extend `Mixins::Constants::Common`.
46
+
47
+ ### Requirement 4: Money Transfer Source of Funds Constants
48
+
49
+ **User Story:** As a developer, I want a constant class defining allowed source of funds values specific to money transfers.
50
+
51
+ #### Acceptance Criteria
52
+
53
+ 1. THE SDK SHALL define a `MoneyTransfer::SourceOfFunds` constant class.
54
+ 2. THE class SHALL include values: `current_account`, `credit_card`, `savings_account`, `deposit_account`, `cash`, `prepaid`, `other_debit_account`, `other_credit_account`.
55
+ 3. THE class SHALL extend `Mixins::Constants::Common`.
56
+
57
+ ### Requirement 5: Money Transfer Payout Attributes Mixin
58
+
59
+ **User Story:** As a developer, I want a mixin module that provides all money transfer payout attributes with validation, so I can include it in the Payout request class.
60
+
61
+ #### Acceptance Criteria
62
+
63
+ 1. THE mixin SHALL be defined at `Api::Mixins::Requests::Financial::MoneyTransferPayoutAttributes`.
64
+ 2. THE mixin SHALL provide `attr_accessor` for plain text fields: `money_transfer_sender_account_number`, `money_transfer_service_provider_name`, sender address fields (`country`, `city`, `line`, `state`, `postal_code`), receiver fields (`first_name`, `last_name`, address fields, `account_number`, `account_number_type`).
65
+ 3. THE mixin SHALL provide validated setters (using `allowed_options`) for: `money_transfer_type`, `money_transfer_sender_account_number_type`, `money_transfer_purpose_of_payment`, `money_transfer_source_of_funds`.
66
+ 4. THE mixin SHALL provide a date setter/getter for `money_transfer_sender_birth_date` using `parse_date` with `DD_MM_YYYY_L_HYPHENS` format.
67
+ 5. THE mixin SHALL provide a protected `money_transfer_payout_attributes_structure` method returning the nested hash structure.
68
+ 6. ALL validated setters SHALL allow empty values (`allow_empty: true`).
69
+
70
+ ### Requirement 6: Integration with Payout Request Class
71
+
72
+ **User Story:** As a developer, I want the Payout request class to include the money transfer mixin, so that money transfer data is serialized in the XML request.
73
+
74
+ #### Acceptance Criteria
75
+
76
+ 1. THE Payout class SHALL include `Mixins::Requests::Financial::MoneyTransferPayoutAttributes`.
77
+ 2. THE `payment_transaction_structure` method SHALL include `money_transfer: money_transfer_payout_attributes_structure` in the returned hash.
78
+ 3. WHEN no money transfer attributes are set, THE serialized XML SHALL NOT contain a `money_transfer` node.
79
+
80
+ ### Requirement 7: Test Coverage
81
+
82
+ **User Story:** As a developer, I want shared RSpec examples for money transfer payout attributes, so that any request class including the mixin can be tested.
83
+
84
+ #### Acceptance Criteria
85
+
86
+ 1. THE SDK SHALL provide shared examples at `spec/genesis_ruby/shared_examples/api/requests/financial/money_transfer_payout_attributes_examples.rb`.
87
+ 2. THE shared examples SHALL test: valid type, invalid type (raises `InvalidArgumentError`), sender fields, sender_birth_date, sender_account_number_type validation, purpose_of_payment validation, source_of_funds validation, sender_address sub-fields, receiver sub-fields.
88
+ 3. THE Payout spec SHALL include the shared examples via `include_examples 'money transfer payout attributes examples'`.
@@ -0,0 +1,38 @@
1
+ # Implementation Tasks
2
+
3
+ ## Task 1: Create Money Transfer Constants [done]
4
+
5
+ - Create `lib/genesis_ruby/api/constants/transactions/parameters/money_transfer/types.rb`
6
+ - Create `lib/genesis_ruby/api/constants/transactions/parameters/money_transfer/sender_account_number_types.rb`
7
+ - Create `lib/genesis_ruby/api/constants/transactions/parameters/money_transfer/purpose_of_payments.rb`
8
+ - Create `lib/genesis_ruby/api/constants/transactions/parameters/money_transfer/source_of_funds.rb`
9
+
10
+ ## Task 2: Create MoneyTransferPayoutAttributes Mixin [done]
11
+
12
+ - Create `lib/genesis_ruby/api/mixins/requests/financial/money_transfer_payout_attributes.rb`
13
+ - Implement attr_accessors for plain fields
14
+ - Implement validated setters with `allowed_options` for enum fields
15
+ - Implement `money_transfer_sender_birth_date` getter/setter with date parsing
16
+ - Implement protected `money_transfer_payout_attributes_structure` method
17
+
18
+ ## Task 3: Integrate Mixin into Payout Class [done]
19
+
20
+ - Add `include Mixins::Requests::Financial::MoneyTransferPayoutAttributes` to Payout
21
+ - Add `money_transfer: money_transfer_payout_attributes_structure` to `payment_transaction_structure`
22
+
23
+ ## Task 4: Create Shared Examples [done]
24
+
25
+ - Create `spec/genesis_ruby/shared_examples/api/requests/financial/money_transfer_payout_attributes_examples.rb`
26
+ - Test empty state (no money_transfer node)
27
+ - Test valid/invalid enum values
28
+ - Test sender_address sub-fields
29
+ - Test receiver sub-fields
30
+
31
+ ## Task 5: Include Shared Examples in Payout Spec [done]
32
+
33
+ - Add `include_examples 'money transfer payout attributes examples'` to `payout_spec.rb`
34
+
35
+ ## Task 6: Validate [done]
36
+
37
+ - `bundle exec rake styles` — 0 offenses
38
+ - `bundle exec rake test` — 7107 examples, 0 failures
@@ -0,0 +1,15 @@
1
+ # Product Overview
2
+
3
+ genesis_ruby is an open-source Ruby SDK (gem) for integrating with the Genesis Payment Processing Gateway by emerchantpay.
4
+
5
+ It provides a client library for:
6
+ - Financial transactions (card payments, 3DS, mobile pay, online banking, vouchers, wallets, crypto, etc.)
7
+ - Non-financial operations (reconciliation, fraud management, tokenization, KYC, billing API, FX, SCA)
8
+ - Web Payment Form (WPF) creation and reconciliation
9
+ - Smart Router API for simplified gateway integration
10
+ - Notification handling for async payment callbacks
11
+
12
+ The SDK communicates with the Genesis API over HTTPS using XML/JSON request/response payloads. It supports staging and production environments for the emerchantpay and ecomprocessing endpoints.
13
+
14
+ Current version: defined in `VERSION` file and `lib/genesis_ruby/version.rb`.
15
+ License: MIT
@@ -0,0 +1,16 @@
1
+ ---
2
+ inclusion: auto
3
+ description: Enforces spec folder naming convention based on the current Git branch name
4
+ ---
5
+
6
+ # Spec Folder Naming Convention
7
+
8
+ When creating a new spec, derive the folder name from the current Git branch name:
9
+
10
+ 1. Get the current branch: `git rev-parse --abbrev-ref HEAD`
11
+ 2. Strip any prefix up to and including the first `/` (e.g. `feature/`, `bugfix/`, `hotfix/`)
12
+ 3. Use the remaining string as the spec folder name under `.kiro/specs/`
13
+
14
+ Example:
15
+ - Branch: `feature/f2026032402-fixes_on_product_pricing`
16
+ - Spec folder: `.kiro/specs/f2026032402-fixes_on_product_pricing/`