modern_treasury 0.29.1 → 0.29.3

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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/modern_treasury/client.rb +12 -0
  5. data/lib/modern_treasury/models/case_.rb +318 -0
  6. data/lib/modern_treasury/models/case_list_params.rb +73 -0
  7. data/lib/modern_treasury/models/case_retrieve_params.rb +20 -0
  8. data/lib/modern_treasury/models/child_legal_entity.rb +24 -1
  9. data/lib/modern_treasury/models/child_legal_entity_create.rb +24 -1
  10. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +26 -1
  11. data/lib/modern_treasury/models/counterparty_create_params.rb +24 -1
  12. data/lib/modern_treasury/models/internal_account_update_params.rb +12 -1
  13. data/lib/modern_treasury/models/journal_source_list_params.rb +62 -0
  14. data/lib/modern_treasury/models/journal_source_retrieve_params.rb +20 -0
  15. data/lib/modern_treasury/models/legal_entity.rb +26 -1
  16. data/lib/modern_treasury/models/legal_entity_association.rb +1 -0
  17. data/lib/modern_treasury/models/legal_entity_association_create_params.rb +74 -0
  18. data/lib/modern_treasury/models/legal_entity_association_delete_params.rb +20 -0
  19. data/lib/modern_treasury/models/legal_entity_create_params.rb +22 -1
  20. data/lib/modern_treasury/models/legal_entity_update_params.rb +22 -1
  21. data/lib/modern_treasury/models/legal_entity_update_status_params.rb +46 -0
  22. data/lib/modern_treasury/models/virtual_account_create_params.rb +17 -1
  23. data/lib/modern_treasury/models/virtual_account_setting.rb +57 -0
  24. data/lib/modern_treasury/models/virtual_account_setting_create_params.rb +81 -0
  25. data/lib/modern_treasury/models/virtual_account_setting_list_params.rb +36 -0
  26. data/lib/modern_treasury/models.rb +22 -0
  27. data/lib/modern_treasury/resources/cases.rb +66 -0
  28. data/lib/modern_treasury/resources/internal_accounts.rb +3 -1
  29. data/lib/modern_treasury/resources/journal_sources.rb +67 -0
  30. data/lib/modern_treasury/resources/legal_entities.rb +33 -2
  31. data/lib/modern_treasury/resources/legal_entity_associations.rb +52 -0
  32. data/lib/modern_treasury/resources/virtual_account_settings.rb +81 -0
  33. data/lib/modern_treasury/resources/virtual_accounts.rb +5 -1
  34. data/lib/modern_treasury/version.rb +1 -1
  35. data/lib/modern_treasury.rb +14 -0
  36. data/rbi/modern_treasury/client.rbi +9 -0
  37. data/rbi/modern_treasury/models/case_.rbi +521 -0
  38. data/rbi/modern_treasury/models/case_list_params.rbi +145 -0
  39. data/rbi/modern_treasury/models/case_retrieve_params.rbi +38 -0
  40. data/rbi/modern_treasury/models/child_legal_entity.rbi +52 -0
  41. data/rbi/modern_treasury/models/child_legal_entity_create.rbi +55 -0
  42. data/rbi/modern_treasury/models/connection_legal_entity_create_params.rbi +55 -0
  43. data/rbi/modern_treasury/models/counterparty_create_params.rbi +55 -0
  44. data/rbi/modern_treasury/models/internal_account_update_params.rbi +17 -0
  45. data/rbi/modern_treasury/models/journal_source_list_params.rbi +104 -0
  46. data/rbi/modern_treasury/models/journal_source_retrieve_params.rbi +38 -0
  47. data/rbi/modern_treasury/models/legal_entity.rbi +52 -0
  48. data/rbi/modern_treasury/models/legal_entity_association_create_params.rbi +146 -0
  49. data/rbi/modern_treasury/models/legal_entity_association_delete_params.rbi +38 -0
  50. data/rbi/modern_treasury/models/legal_entity_create_params.rbi +55 -0
  51. data/rbi/modern_treasury/models/legal_entity_update_params.rbi +55 -0
  52. data/rbi/modern_treasury/models/legal_entity_update_status_params.rbi +96 -0
  53. data/rbi/modern_treasury/models/virtual_account_create_params.rbi +22 -0
  54. data/rbi/modern_treasury/models/virtual_account_setting.rbi +74 -0
  55. data/rbi/modern_treasury/models/virtual_account_setting_create_params.rbi +102 -0
  56. data/rbi/modern_treasury/models/virtual_account_setting_list_params.rbi +64 -0
  57. data/rbi/modern_treasury/models.rbi +28 -0
  58. data/rbi/modern_treasury/resources/cases.rbi +50 -0
  59. data/rbi/modern_treasury/resources/internal_accounts.rbi +6 -0
  60. data/rbi/modern_treasury/resources/journal_sources.rbi +55 -0
  61. data/rbi/modern_treasury/resources/legal_entities.rbi +31 -0
  62. data/rbi/modern_treasury/resources/legal_entity_associations.rbi +45 -0
  63. data/rbi/modern_treasury/resources/virtual_account_settings.rbi +67 -0
  64. data/rbi/modern_treasury/resources/virtual_accounts.rbi +6 -0
  65. data/sig/modern_treasury/client.rbs +6 -0
  66. data/sig/modern_treasury/models/case_.rbs +266 -0
  67. data/sig/modern_treasury/models/case_list_params.rbs +79 -0
  68. data/sig/modern_treasury/models/case_retrieve_params.rbs +23 -0
  69. data/sig/modern_treasury/models/child_legal_entity.rbs +17 -0
  70. data/sig/modern_treasury/models/child_legal_entity_create.rbs +17 -0
  71. data/sig/modern_treasury/models/connection_legal_entity_create_params.rbs +17 -0
  72. data/sig/modern_treasury/models/counterparty_create_params.rbs +17 -0
  73. data/sig/modern_treasury/models/internal_account_update_params.rbs +9 -0
  74. data/sig/modern_treasury/models/journal_source_list_params.rbs +63 -0
  75. data/sig/modern_treasury/models/journal_source_retrieve_params.rbs +23 -0
  76. data/sig/modern_treasury/models/legal_entity.rbs +17 -0
  77. data/sig/modern_treasury/models/legal_entity_association_create_params.rbs +70 -0
  78. data/sig/modern_treasury/models/legal_entity_association_delete_params.rbs +23 -0
  79. data/sig/modern_treasury/models/legal_entity_create_params.rbs +17 -0
  80. data/sig/modern_treasury/models/legal_entity_update_params.rbs +17 -0
  81. data/sig/modern_treasury/models/legal_entity_update_status_params.rbs +43 -0
  82. data/sig/modern_treasury/models/virtual_account_create_params.rbs +15 -1
  83. data/sig/modern_treasury/models/virtual_account_setting.rbs +45 -0
  84. data/sig/modern_treasury/models/virtual_account_setting_create_params.rbs +61 -0
  85. data/sig/modern_treasury/models/virtual_account_setting_list_params.rbs +36 -0
  86. data/sig/modern_treasury/models.rbs +22 -0
  87. data/sig/modern_treasury/resources/cases.rbs +21 -0
  88. data/sig/modern_treasury/resources/internal_accounts.rbs +1 -0
  89. data/sig/modern_treasury/resources/journal_sources.rbs +22 -0
  90. data/sig/modern_treasury/resources/legal_entities.rbs +8 -0
  91. data/sig/modern_treasury/resources/legal_entity_associations.rbs +15 -0
  92. data/sig/modern_treasury/resources/virtual_account_settings.rbs +26 -0
  93. data/sig/modern_treasury/resources/virtual_accounts.rbs +2 -0
  94. metadata +44 -2
@@ -445,6 +445,14 @@ module ModernTreasury
445
445
  # @return [String, nil]
446
446
  optional :business_description, String, nil?: true
447
447
 
448
+ # @!attribute business_designation
449
+ # Legal designation associated with the business.
450
+ #
451
+ # @return [Symbol, ModernTreasury::Models::CounterpartyCreateParams::LegalEntity::BusinessDesignation, nil]
452
+ optional :business_designation,
453
+ enum: -> { ModernTreasury::CounterpartyCreateParams::LegalEntity::BusinessDesignation },
454
+ nil?: true
455
+
448
456
  # @!attribute business_name
449
457
  # The business's legal business name.
450
458
  #
@@ -701,7 +709,7 @@ module ModernTreasury
701
709
  # @return [String, nil]
702
710
  optional :website, String, nil?: true
703
711
 
704
- # @!method initialize(legal_entity_type:, addresses: nil, bank_settings: nil, business_description: nil, business_name: nil, citizenship_country: nil, compliance_details: nil, connection_id: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, documents: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_entity_associations: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, terms_of_use: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil)
712
+ # @!method initialize(legal_entity_type:, addresses: nil, bank_settings: nil, business_description: nil, business_designation: nil, business_name: nil, citizenship_country: nil, compliance_details: nil, connection_id: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, documents: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_entity_associations: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, terms_of_use: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil)
705
713
  # Some parameter documentations has been truncated, see
706
714
  # {ModernTreasury::Models::CounterpartyCreateParams::LegalEntity} for more
707
715
  # details.
@@ -714,6 +722,8 @@ module ModernTreasury
714
722
  #
715
723
  # @param business_description [String, nil] A description of the business.
716
724
  #
725
+ # @param business_designation [Symbol, ModernTreasury::Models::CounterpartyCreateParams::LegalEntity::BusinessDesignation, nil] Legal designation associated with the business.
726
+ #
717
727
  # @param business_name [String, nil] The business's legal business name.
718
728
  #
719
729
  # @param citizenship_country [String, nil] The country of citizenship for an individual.
@@ -803,6 +813,19 @@ module ModernTreasury
803
813
  # @return [Array<Symbol>]
804
814
  end
805
815
 
816
+ # Legal designation associated with the business.
817
+ #
818
+ # @see ModernTreasury::Models::CounterpartyCreateParams::LegalEntity#business_designation
819
+ module BusinessDesignation
820
+ extend ModernTreasury::Internal::Type::Enum
821
+
822
+ EXEMPT_FINANCIAL_INSTITUTION = :exempt_financial_institution
823
+ NON_OPERATING_BUSINESS = :non_operating_business
824
+
825
+ # @!method self.values
826
+ # @return [Array<Symbol>]
827
+ end
828
+
806
829
  class Document < ModernTreasury::Internal::Type::BaseModel
807
830
  # @!attribute document_type
808
831
  # A category given to the document, can be `null`.
@@ -55,6 +55,15 @@ module ModernTreasury
55
55
  # @return [String, nil]
56
56
  optional :parent_account_id, String
57
57
 
58
+ # @!attribute party_address
59
+ # The address associated with the owner of the internal account. Updating this
60
+ # value does not guarantee that the new address matches the address on record with
61
+ # the account's bank; you are responsible for verifying that the address is
62
+ # accurate.
63
+ #
64
+ # @return [ModernTreasury::Models::AddressRequest, nil]
65
+ optional :party_address, -> { ModernTreasury::AddressRequest }
66
+
58
67
  # @!attribute status
59
68
  # Requests closure of the internal account. The resulting status may be `closed`
60
69
  # for vendors that close synchronously.
@@ -62,7 +71,7 @@ module ModernTreasury
62
71
  # @return [Symbol, ModernTreasury::Models::InternalAccountUpdateParams::Status, nil]
63
72
  optional :status, enum: -> { ModernTreasury::InternalAccountUpdateParams::Status }
64
73
 
65
- # @!method initialize(id:, contra_ledger_account_id: nil, counterparty_id: nil, external_id: nil, ledger_account_id: nil, metadata: nil, name: nil, parent_account_id: nil, status: nil, request_options: {})
74
+ # @!method initialize(id:, contra_ledger_account_id: nil, counterparty_id: nil, external_id: nil, ledger_account_id: nil, metadata: nil, name: nil, parent_account_id: nil, party_address: nil, status: nil, request_options: {})
66
75
  # Some parameter documentations has been truncated, see
67
76
  # {ModernTreasury::Models::InternalAccountUpdateParams} for more details.
68
77
  #
@@ -82,6 +91,8 @@ module ModernTreasury
82
91
  #
83
92
  # @param parent_account_id [String] The parent internal account for this account.
84
93
  #
94
+ # @param party_address [ModernTreasury::Models::AddressRequest] The address associated with the owner of the internal account. Updating this val
95
+ #
85
96
  # @param status [Symbol, ModernTreasury::Models::InternalAccountUpdateParams::Status] Requests closure of the internal account. The resulting status may be `closed` f
86
97
  #
87
98
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::JournalSources#list
6
+ class JournalSourceListParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!attribute journal_entry_id
11
+ # The ID of the journal entry
12
+ #
13
+ # @return [String, nil]
14
+ optional :journal_entry_id, String
15
+
16
+ # @!attribute journal_report_id
17
+ # The ID of the journal report
18
+ #
19
+ # @return [String, nil]
20
+ optional :journal_report_id, String
21
+
22
+ # @!attribute page
23
+ # Page number for pagination
24
+ #
25
+ # @return [Integer, nil]
26
+ optional :page, Integer
27
+
28
+ # @!attribute per_page
29
+ # Number of items per page
30
+ #
31
+ # @return [Integer, nil]
32
+ optional :per_page, Integer
33
+
34
+ # @!attribute source_id
35
+ # The ID of the source object
36
+ #
37
+ # @return [String, nil]
38
+ optional :source_id, String
39
+
40
+ # @!attribute source_type
41
+ # The type of the source object
42
+ #
43
+ # @return [String, nil]
44
+ optional :source_type, String
45
+
46
+ # @!method initialize(journal_entry_id: nil, journal_report_id: nil, page: nil, per_page: nil, source_id: nil, source_type: nil, request_options: {})
47
+ # @param journal_entry_id [String] The ID of the journal entry
48
+ #
49
+ # @param journal_report_id [String] The ID of the journal report
50
+ #
51
+ # @param page [Integer] Page number for pagination
52
+ #
53
+ # @param per_page [Integer] Number of items per page
54
+ #
55
+ # @param source_id [String] The ID of the source object
56
+ #
57
+ # @param source_type [String] The type of the source object
58
+ #
59
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::JournalSources#retrieve
6
+ class JournalSourceRetrieveParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
15
+ # @!method initialize(id:, request_options: {})
16
+ # @param id [String]
17
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -26,6 +26,16 @@ module ModernTreasury
26
26
  # @return [String, nil]
27
27
  required :business_description, String, nil?: true
28
28
 
29
+ # @!attribute business_designation
30
+ # Legal designation associated with the business.
31
+ #
32
+ # @return [Symbol, ModernTreasury::Models::LegalEntity::BusinessDesignation, nil]
33
+ required :business_designation,
34
+ enum: -> {
35
+ ModernTreasury::LegalEntity::BusinessDesignation
36
+ },
37
+ nil?: true
38
+
29
39
  # @!attribute business_name
30
40
  # The business's legal business name.
31
41
  #
@@ -299,7 +309,7 @@ module ModernTreasury
299
309
  -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::LegalEntityAssociation] },
300
310
  nil?: true
301
311
 
302
- # @!method initialize(id:, addresses:, bank_settings:, business_description:, business_name:, citizenship_country:, compliance_details:, country_of_incorporation:, created_at:, date_formed:, date_of_birth:, discarded_at:, documents:, doing_business_as_names:, email:, expected_activity_volume:, external_id:, first_name:, identifications:, industry_classifications:, intended_use:, last_name:, legal_entity_type:, legal_structure:, listed_exchange:, live_mode:, metadata:, middle_name:, object:, operating_jurisdictions:, phone_numbers:, politically_exposed_person:, preferred_name:, prefix:, primary_social_media_sites:, regulators:, risk_rating:, service_provider_legal_entity_id:, status:, suffix:, terms_of_use:, third_party_verification:, third_party_verifications:, ticker_symbol:, updated_at:, wealth_and_employment_details:, website:, legal_entity_associations: nil)
312
+ # @!method initialize(id:, addresses:, bank_settings:, business_description:, business_designation:, business_name:, citizenship_country:, compliance_details:, country_of_incorporation:, created_at:, date_formed:, date_of_birth:, discarded_at:, documents:, doing_business_as_names:, email:, expected_activity_volume:, external_id:, first_name:, identifications:, industry_classifications:, intended_use:, last_name:, legal_entity_type:, legal_structure:, listed_exchange:, live_mode:, metadata:, middle_name:, object:, operating_jurisdictions:, phone_numbers:, politically_exposed_person:, preferred_name:, prefix:, primary_social_media_sites:, regulators:, risk_rating:, service_provider_legal_entity_id:, status:, suffix:, terms_of_use:, third_party_verification:, third_party_verifications:, ticker_symbol:, updated_at:, wealth_and_employment_details:, website:, legal_entity_associations: nil)
303
313
  # Some parameter documentations has been truncated, see
304
314
  # {ModernTreasury::Models::LegalEntity} for more details.
305
315
  #
@@ -311,6 +321,8 @@ module ModernTreasury
311
321
  #
312
322
  # @param business_description [String, nil] A description of the business.
313
323
  #
324
+ # @param business_designation [Symbol, ModernTreasury::Models::LegalEntity::BusinessDesignation, nil] Legal designation associated with the business.
325
+ #
314
326
  # @param business_name [String, nil] The business's legal business name.
315
327
  #
316
328
  # @param citizenship_country [String, nil] The country of citizenship for an individual.
@@ -530,6 +542,19 @@ module ModernTreasury
530
542
  end
531
543
  end
532
544
 
545
+ # Legal designation associated with the business.
546
+ #
547
+ # @see ModernTreasury::Models::LegalEntity#business_designation
548
+ module BusinessDesignation
549
+ extend ModernTreasury::Internal::Type::Enum
550
+
551
+ EXEMPT_FINANCIAL_INSTITUTION = :exempt_financial_institution
552
+ NON_OPERATING_BUSINESS = :non_operating_business
553
+
554
+ # @!method self.values
555
+ # @return [Array<Symbol>]
556
+ end
557
+
533
558
  class Identification < ModernTreasury::Internal::Type::BaseModel
534
559
  # @!attribute id
535
560
  #
@@ -2,6 +2,7 @@
2
2
 
3
3
  module ModernTreasury
4
4
  module Models
5
+ # @see ModernTreasury::Resources::LegalEntityAssociations#create
5
6
  class LegalEntityAssociation < ModernTreasury::Internal::Type::BaseModel
6
7
  # @!attribute id
7
8
  #
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::LegalEntityAssociations#create
6
+ class LegalEntityAssociationCreateParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!attribute parent_legal_entity_id
11
+ # The ID of the parent legal entity. This must be a business legal entity.
12
+ #
13
+ # @return [String]
14
+ required :parent_legal_entity_id, String
15
+
16
+ # @!attribute relationship_types
17
+ #
18
+ # @return [Array<Symbol, ModernTreasury::Models::LegalEntityAssociationCreateParams::RelationshipType>]
19
+ required :relationship_types,
20
+ -> { ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LegalEntityAssociationCreateParams::RelationshipType] }
21
+
22
+ # @!attribute child_legal_entity
23
+ # The child legal entity.
24
+ #
25
+ # @return [ModernTreasury::Models::ChildLegalEntityCreate, nil]
26
+ optional :child_legal_entity, -> { ModernTreasury::ChildLegalEntityCreate }
27
+
28
+ # @!attribute child_legal_entity_id
29
+ # The ID of the child legal entity.
30
+ #
31
+ # @return [String, nil]
32
+ optional :child_legal_entity_id, String
33
+
34
+ # @!attribute ownership_percentage
35
+ # The child entity's ownership percentage iff they are a beneficial owner.
36
+ #
37
+ # @return [Integer, nil]
38
+ optional :ownership_percentage, Integer, nil?: true
39
+
40
+ # @!attribute title
41
+ # The job title of the child entity at the parent entity.
42
+ #
43
+ # @return [String, nil]
44
+ optional :title, String, nil?: true
45
+
46
+ # @!method initialize(parent_legal_entity_id:, relationship_types:, child_legal_entity: nil, child_legal_entity_id: nil, ownership_percentage: nil, title: nil, request_options: {})
47
+ # @param parent_legal_entity_id [String] The ID of the parent legal entity. This must be a business legal entity.
48
+ #
49
+ # @param relationship_types [Array<Symbol, ModernTreasury::Models::LegalEntityAssociationCreateParams::RelationshipType>]
50
+ #
51
+ # @param child_legal_entity [ModernTreasury::Models::ChildLegalEntityCreate] The child legal entity.
52
+ #
53
+ # @param child_legal_entity_id [String] The ID of the child legal entity.
54
+ #
55
+ # @param ownership_percentage [Integer, nil] The child entity's ownership percentage iff they are a beneficial owner.
56
+ #
57
+ # @param title [String, nil] The job title of the child entity at the parent entity.
58
+ #
59
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
60
+
61
+ # A list of relationship types for how the child entity relates to parent entity.
62
+ module RelationshipType
63
+ extend ModernTreasury::Internal::Type::Enum
64
+
65
+ AUTHORIZED_SIGNER = :authorized_signer
66
+ BENEFICIAL_OWNER = :beneficial_owner
67
+ CONTROL_PERSON = :control_person
68
+
69
+ # @!method self.values
70
+ # @return [Array<Symbol>]
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::LegalEntityAssociations#delete
6
+ class LegalEntityAssociationDeleteParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
15
+ # @!method initialize(id:, request_options: {})
16
+ # @param id [String]
17
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -31,6 +31,14 @@ module ModernTreasury
31
31
  # @return [String, nil]
32
32
  optional :business_description, String, nil?: true
33
33
 
34
+ # @!attribute business_designation
35
+ # Legal designation associated with the business.
36
+ #
37
+ # @return [Symbol, ModernTreasury::Models::LegalEntityCreateParams::BusinessDesignation, nil]
38
+ optional :business_designation,
39
+ enum: -> { ModernTreasury::LegalEntityCreateParams::BusinessDesignation },
40
+ nil?: true
41
+
34
42
  # @!attribute business_name
35
43
  # The business's legal business name.
36
44
  #
@@ -283,7 +291,7 @@ module ModernTreasury
283
291
  # @return [String, nil]
284
292
  optional :website, String, nil?: true
285
293
 
286
- # @!method initialize(legal_entity_type:, addresses: nil, bank_settings: nil, business_description: nil, business_name: nil, citizenship_country: nil, compliance_details: nil, connection_id: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, documents: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_entity_associations: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, terms_of_use: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil, request_options: {})
294
+ # @!method initialize(legal_entity_type:, addresses: nil, bank_settings: nil, business_description: nil, business_designation: nil, business_name: nil, citizenship_country: nil, compliance_details: nil, connection_id: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, documents: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_entity_associations: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, terms_of_use: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil, request_options: {})
287
295
  # Some parameter documentations has been truncated, see
288
296
  # {ModernTreasury::Models::LegalEntityCreateParams} for more details.
289
297
  #
@@ -295,6 +303,8 @@ module ModernTreasury
295
303
  #
296
304
  # @param business_description [String, nil] A description of the business.
297
305
  #
306
+ # @param business_designation [Symbol, ModernTreasury::Models::LegalEntityCreateParams::BusinessDesignation, nil] Legal designation associated with the business.
307
+ #
298
308
  # @param business_name [String, nil] The business's legal business name.
299
309
  #
300
310
  # @param citizenship_country [String, nil] The country of citizenship for an individual.
@@ -384,6 +394,17 @@ module ModernTreasury
384
394
  # @return [Array<Symbol>]
385
395
  end
386
396
 
397
+ # Legal designation associated with the business.
398
+ module BusinessDesignation
399
+ extend ModernTreasury::Internal::Type::Enum
400
+
401
+ EXEMPT_FINANCIAL_INSTITUTION = :exempt_financial_institution
402
+ NON_OPERATING_BUSINESS = :non_operating_business
403
+
404
+ # @!method self.values
405
+ # @return [Array<Symbol>]
406
+ end
407
+
387
408
  class Document < ModernTreasury::Internal::Type::BaseModel
388
409
  # @!attribute document_type
389
410
  # A category given to the document, can be `null`.
@@ -30,6 +30,14 @@ module ModernTreasury
30
30
  # @return [String, nil]
31
31
  optional :business_description, String, nil?: true
32
32
 
33
+ # @!attribute business_designation
34
+ # Legal designation associated with the business.
35
+ #
36
+ # @return [Symbol, ModernTreasury::Models::LegalEntityUpdateParams::BusinessDesignation, nil]
37
+ optional :business_designation,
38
+ enum: -> { ModernTreasury::LegalEntityUpdateParams::BusinessDesignation },
39
+ nil?: true
40
+
33
41
  # @!attribute business_name
34
42
  # The business's legal business name.
35
43
  #
@@ -248,7 +256,7 @@ module ModernTreasury
248
256
  # @return [String, nil]
249
257
  optional :website, String, nil?: true
250
258
 
251
- # @!method initialize(id:, addresses: nil, bank_settings: nil, business_description: nil, business_name: nil, citizenship_country: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, terms_of_use: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil, request_options: {})
259
+ # @!method initialize(id:, addresses: nil, bank_settings: nil, business_description: nil, business_designation: nil, business_name: nil, citizenship_country: nil, country_of_incorporation: nil, date_formed: nil, date_of_birth: nil, doing_business_as_names: nil, email: nil, expected_activity_volume: nil, external_id: nil, first_name: nil, identifications: nil, industry_classifications: nil, intended_use: nil, last_name: nil, legal_structure: nil, listed_exchange: nil, metadata: nil, middle_name: nil, operating_jurisdictions: nil, phone_numbers: nil, politically_exposed_person: nil, preferred_name: nil, prefix: nil, primary_social_media_sites: nil, regulators: nil, risk_rating: nil, service_provider_legal_entity_id: nil, suffix: nil, terms_of_use: nil, third_party_verification: nil, third_party_verifications: nil, ticker_symbol: nil, wealth_and_employment_details: nil, website: nil, request_options: {})
252
260
  # Some parameter documentations has been truncated, see
253
261
  # {ModernTreasury::Models::LegalEntityUpdateParams} for more details.
254
262
  #
@@ -260,6 +268,8 @@ module ModernTreasury
260
268
  #
261
269
  # @param business_description [String, nil] A description of the business.
262
270
  #
271
+ # @param business_designation [Symbol, ModernTreasury::Models::LegalEntityUpdateParams::BusinessDesignation, nil] Legal designation associated with the business.
272
+ #
263
273
  # @param business_name [String, nil] The business's legal business name.
264
274
  #
265
275
  # @param citizenship_country [String, nil] The country of citizenship for an individual.
@@ -330,6 +340,17 @@ module ModernTreasury
330
340
  #
331
341
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
332
342
 
343
+ # Legal designation associated with the business.
344
+ module BusinessDesignation
345
+ extend ModernTreasury::Internal::Type::Enum
346
+
347
+ EXEMPT_FINANCIAL_INSTITUTION = :exempt_financial_institution
348
+ NON_OPERATING_BUSINESS = :non_operating_business
349
+
350
+ # @!method self.values
351
+ # @return [Array<Symbol>]
352
+ end
353
+
333
354
  # The business's legal structure.
334
355
  module LegalStructure
335
356
  extend ModernTreasury::Internal::Type::Enum
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::LegalEntities#update_status
6
+ class LegalEntityUpdateStatusParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
15
+ # @!attribute status
16
+ # The target status for the legal entity. One of `active`, `suspended`, or
17
+ # `denied`. Valid transitions depend on the current status.
18
+ #
19
+ # @return [Symbol, ModernTreasury::Models::LegalEntityUpdateStatusParams::Status]
20
+ required :status, enum: -> { ModernTreasury::LegalEntityUpdateStatusParams::Status }
21
+
22
+ # @!method initialize(id:, status:, request_options: {})
23
+ # Some parameter documentations has been truncated, see
24
+ # {ModernTreasury::Models::LegalEntityUpdateStatusParams} for more details.
25
+ #
26
+ # @param id [String]
27
+ #
28
+ # @param status [Symbol, ModernTreasury::Models::LegalEntityUpdateStatusParams::Status] The target status for the legal entity. One of `active`, `suspended`, or `denied
29
+ #
30
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
31
+
32
+ # The target status for the legal entity. One of `active`, `suspended`, or
33
+ # `denied`. Valid transitions depend on the current status.
34
+ module Status
35
+ extend ModernTreasury::Internal::Type::Enum
36
+
37
+ ACTIVE = :active
38
+ SUSPENDED = :suspended
39
+ DENIED = :denied
40
+
41
+ # @!method self.values
42
+ # @return [Array<Symbol>]
43
+ end
44
+ end
45
+ end
46
+ end
@@ -62,6 +62,12 @@ module ModernTreasury
62
62
  # @return [ModernTreasury::Models::LedgerAccountCreateRequest, nil]
63
63
  optional :ledger_account, -> { ModernTreasury::LedgerAccountCreateRequest }
64
64
 
65
+ # @!attribute ledger_account_id
66
+ # The ledger account that you'd like to link to the virtual account.
67
+ #
68
+ # @return [String, nil]
69
+ optional :ledger_account_id, String
70
+
65
71
  # @!attribute metadata
66
72
  # Additional data represented as key-value pairs. Both the key and value must be
67
73
  # strings.
@@ -76,7 +82,13 @@ module ModernTreasury
76
82
  optional :routing_details,
77
83
  -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::VirtualAccountCreateParams::RoutingDetail] }
78
84
 
79
- # @!method initialize(internal_account_id:, name:, account_details: nil, counterparty_id: nil, credit_ledger_account_id: nil, debit_ledger_account_id: nil, description: nil, ledger_account: nil, metadata: nil, routing_details: nil, request_options: {})
85
+ # @!attribute virtual_account_setting_id
86
+ # The ID of the virtual account setting used to allocate this virtual account.
87
+ #
88
+ # @return [String, nil]
89
+ optional :virtual_account_setting_id, String
90
+
91
+ # @!method initialize(internal_account_id:, name:, account_details: nil, counterparty_id: nil, credit_ledger_account_id: nil, debit_ledger_account_id: nil, description: nil, ledger_account: nil, ledger_account_id: nil, metadata: nil, routing_details: nil, virtual_account_setting_id: nil, request_options: {})
80
92
  # Some parameter documentations has been truncated, see
81
93
  # {ModernTreasury::Models::VirtualAccountCreateParams} for more details.
82
94
  #
@@ -96,10 +108,14 @@ module ModernTreasury
96
108
  #
97
109
  # @param ledger_account [ModernTreasury::Models::LedgerAccountCreateRequest] Specifies a ledger account object that will be created with the virtual account.
98
110
  #
111
+ # @param ledger_account_id [String] The ledger account that you'd like to link to the virtual account.
112
+ #
99
113
  # @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
100
114
  #
101
115
  # @param routing_details [Array<ModernTreasury::Models::VirtualAccountCreateParams::RoutingDetail>] An array of routing detail objects.
102
116
  #
117
+ # @param virtual_account_setting_id [String] The ID of the virtual account setting used to allocate this virtual account.
118
+ #
103
119
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
104
120
 
105
121
  class AccountDetail < ModernTreasury::Internal::Type::BaseModel
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::VirtualAccountSettings#create
6
+ class VirtualAccountSetting < ModernTreasury::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute created_at
13
+ #
14
+ # @return [Time]
15
+ required :created_at, Time
16
+
17
+ # @!attribute external_id
18
+ # A user-defined identifier for the virtual account setting.
19
+ #
20
+ # @return [String, nil]
21
+ required :external_id, String, nil?: true
22
+
23
+ # @!attribute live_mode
24
+ # This field will be true if this object exists in the live environment or false
25
+ # if it exists in the test environment.
26
+ #
27
+ # @return [Boolean]
28
+ required :live_mode, ModernTreasury::Internal::Type::Boolean
29
+
30
+ # @!attribute object
31
+ #
32
+ # @return [String]
33
+ required :object, String
34
+
35
+ # @!attribute updated_at
36
+ #
37
+ # @return [Time]
38
+ required :updated_at, Time
39
+
40
+ # @!method initialize(id:, created_at:, external_id:, live_mode:, object:, updated_at:)
41
+ # Some parameter documentations has been truncated, see
42
+ # {ModernTreasury::Models::VirtualAccountSetting} for more details.
43
+ #
44
+ # @param id [String]
45
+ #
46
+ # @param created_at [Time]
47
+ #
48
+ # @param external_id [String, nil] A user-defined identifier for the virtual account setting.
49
+ #
50
+ # @param live_mode [Boolean] This field will be true if this object exists in the live environment or false i
51
+ #
52
+ # @param object [String]
53
+ #
54
+ # @param updated_at [Time]
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ModernTreasury
4
+ module Models
5
+ # @see ModernTreasury::Resources::VirtualAccountSettings#create
6
+ class VirtualAccountSettingCreateParams < ModernTreasury::Internal::Type::BaseModel
7
+ extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
+ include ModernTreasury::Internal::Type::RequestParameters
9
+
10
+ # @!attribute allocation_type
11
+ # The method used to allocate virtual account numbers.
12
+ #
13
+ # @return [String]
14
+ required :allocation_type, String
15
+
16
+ # @!attribute internal_account_id
17
+ # The ID of the internal account for the virtual account setting.
18
+ #
19
+ # @return [String]
20
+ required :internal_account_id, String
21
+
22
+ # @!attribute allocation_identifier
23
+ # The prefix, suffix, or bank-assigned identifier for the virtual account numbers.
24
+ #
25
+ # @return [String, nil]
26
+ optional :allocation_identifier, String, nil?: true
27
+
28
+ # @!attribute allocation_length
29
+ # The total length of generated virtual account numbers.
30
+ #
31
+ # @return [Integer, nil]
32
+ optional :allocation_length, Integer, nil?: true
33
+
34
+ # @!attribute allocation_range_end
35
+ # The inclusive end of the virtual account number range.
36
+ #
37
+ # @return [String, nil]
38
+ optional :allocation_range_end, String, nil?: true
39
+
40
+ # @!attribute allocation_range_start
41
+ # The inclusive start of the virtual account number range.
42
+ #
43
+ # @return [String, nil]
44
+ optional :allocation_range_start, String, nil?: true
45
+
46
+ # @!attribute external_id
47
+ # A user-defined identifier for the virtual account setting.
48
+ #
49
+ # @return [String, nil]
50
+ optional :external_id, String, nil?: true
51
+
52
+ # @!attribute generated_allocation_identifier_length
53
+ # The length of a generated virtual account setting prefix.
54
+ #
55
+ # @return [Integer, nil]
56
+ optional :generated_allocation_identifier_length, Integer, nil?: true
57
+
58
+ # @!method initialize(allocation_type:, internal_account_id:, allocation_identifier: nil, allocation_length: nil, allocation_range_end: nil, allocation_range_start: nil, external_id: nil, generated_allocation_identifier_length: nil, request_options: {})
59
+ # Some parameter documentations has been truncated, see
60
+ # {ModernTreasury::Models::VirtualAccountSettingCreateParams} for more details.
61
+ #
62
+ # @param allocation_type [String] The method used to allocate virtual account numbers.
63
+ #
64
+ # @param internal_account_id [String] The ID of the internal account for the virtual account setting.
65
+ #
66
+ # @param allocation_identifier [String, nil] The prefix, suffix, or bank-assigned identifier for the virtual account numbers.
67
+ #
68
+ # @param allocation_length [Integer, nil] The total length of generated virtual account numbers.
69
+ #
70
+ # @param allocation_range_end [String, nil] The inclusive end of the virtual account number range.
71
+ #
72
+ # @param allocation_range_start [String, nil] The inclusive start of the virtual account number range.
73
+ #
74
+ # @param external_id [String, nil] A user-defined identifier for the virtual account setting.
75
+ #
76
+ # @param generated_allocation_identifier_length [Integer, nil] The length of a generated virtual account setting prefix.
77
+ #
78
+ # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
79
+ end
80
+ end
81
+ end