increase 1.238.0 → 1.239.0

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.
@@ -0,0 +1,67 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Increase
4
+ module Resources
5
+ class BeneficialOwners
6
+ # Retrieve a Beneficial Owner
7
+ #
8
+ # @overload retrieve(entity_beneficial_owner_id, request_options: {})
9
+ #
10
+ # @param entity_beneficial_owner_id [String] The identifier of the Beneficial Owner to retrieve.
11
+ #
12
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
13
+ #
14
+ # @return [Increase::Models::EntityBeneficialOwner]
15
+ #
16
+ # @see Increase::Models::BeneficialOwnerRetrieveParams
17
+ def retrieve(entity_beneficial_owner_id, params = {})
18
+ @client.request(
19
+ method: :get,
20
+ path: ["entity_beneficial_owners/%1$s", entity_beneficial_owner_id],
21
+ model: Increase::EntityBeneficialOwner,
22
+ options: params[:request_options]
23
+ )
24
+ end
25
+
26
+ # Some parameter documentations has been truncated, see
27
+ # {Increase::Models::BeneficialOwnerListParams} for more details.
28
+ #
29
+ # List Beneficial Owners
30
+ #
31
+ # @overload list(entity_id:, cursor: nil, idempotency_key: nil, limit: nil, request_options: {})
32
+ #
33
+ # @param entity_id [String] The identifier of the Entity to list beneficial owners for. Only `corporation` e
34
+ #
35
+ # @param cursor [String] Return the page of entries after this one.
36
+ #
37
+ # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha
38
+ #
39
+ # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob
40
+ #
41
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
42
+ #
43
+ # @return [Increase::Internal::Page<Increase::Models::EntityBeneficialOwner>]
44
+ #
45
+ # @see Increase::Models::BeneficialOwnerListParams
46
+ def list(params)
47
+ parsed, options = Increase::BeneficialOwnerListParams.dump_request(params)
48
+ query = Increase::Internal::Util.encode_query_params(parsed)
49
+ @client.request(
50
+ method: :get,
51
+ path: "entity_beneficial_owners",
52
+ query: query,
53
+ page: Increase::Internal::Page,
54
+ model: Increase::EntityBeneficialOwner,
55
+ options: options
56
+ )
57
+ end
58
+
59
+ # @api private
60
+ #
61
+ # @param client [Increase::Client]
62
+ def initialize(client:)
63
+ @client = client
64
+ end
65
+ end
66
+ end
67
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Increase
4
- VERSION = "1.238.0"
4
+ VERSION = "1.239.0"
5
5
  end
data/lib/increase.rb CHANGED
@@ -85,6 +85,8 @@ require_relative "increase/models/ach_transfer_create_params"
85
85
  require_relative "increase/models/ach_transfer_list_params"
86
86
  require_relative "increase/models/ach_transfer_retrieve_params"
87
87
  require_relative "increase/models/balance_lookup"
88
+ require_relative "increase/models/beneficial_owner_list_params"
89
+ require_relative "increase/models/beneficial_owner_retrieve_params"
88
90
  require_relative "increase/models/bookkeeping_account"
89
91
  require_relative "increase/models/bookkeeping_account_balance_params"
90
92
  require_relative "increase/models/bookkeeping_account_create_params"
@@ -161,6 +163,7 @@ require_relative "increase/models/digital_wallet_token_retrieve_params"
161
163
  require_relative "increase/models/entity"
162
164
  require_relative "increase/models/entity_archive_beneficial_owner_params"
163
165
  require_relative "increase/models/entity_archive_params"
166
+ require_relative "increase/models/entity_beneficial_owner"
164
167
  require_relative "increase/models/entity_create_beneficial_owner_params"
165
168
  require_relative "increase/models/entity_create_params"
166
169
  require_relative "increase/models/entity_list_params"
@@ -359,6 +362,7 @@ require_relative "increase/resources/account_statements"
359
362
  require_relative "increase/resources/account_transfers"
360
363
  require_relative "increase/resources/ach_prenotifications"
361
364
  require_relative "increase/resources/ach_transfers"
365
+ require_relative "increase/resources/beneficial_owners"
362
366
  require_relative "increase/resources/bookkeeping_accounts"
363
367
  require_relative "increase/resources/bookkeeping_entries"
364
368
  require_relative "increase/resources/bookkeeping_entry_sets"
@@ -124,6 +124,9 @@ module Increase
124
124
  sig { returns(Increase::Resources::Entities) }
125
125
  attr_reader :entities
126
126
 
127
+ sig { returns(Increase::Resources::BeneficialOwners) }
128
+ attr_reader :beneficial_owners
129
+
127
130
  sig { returns(Increase::Resources::SupplementalDocuments) }
128
131
  attr_reader :supplemental_documents
129
132
 
@@ -0,0 +1,89 @@
1
+ # typed: strong
2
+
3
+ module Increase
4
+ module Models
5
+ class BeneficialOwnerListParams < Increase::Internal::Type::BaseModel
6
+ extend Increase::Internal::Type::RequestParameters::Converter
7
+ include Increase::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Increase::BeneficialOwnerListParams,
13
+ Increase::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The identifier of the Entity to list beneficial owners for. Only `corporation`
18
+ # entities have beneficial owners.
19
+ sig { returns(String) }
20
+ attr_accessor :entity_id
21
+
22
+ # Return the page of entries after this one.
23
+ sig { returns(T.nilable(String)) }
24
+ attr_reader :cursor
25
+
26
+ sig { params(cursor: String).void }
27
+ attr_writer :cursor
28
+
29
+ # Filter records to the one with the specified `idempotency_key` you chose for
30
+ # that object. This value is unique across Increase and is used to ensure that a
31
+ # request is only processed once. Learn more about
32
+ # [idempotency](https://increase.com/documentation/idempotency-keys).
33
+ sig { returns(T.nilable(String)) }
34
+ attr_reader :idempotency_key
35
+
36
+ sig { params(idempotency_key: String).void }
37
+ attr_writer :idempotency_key
38
+
39
+ # Limit the size of the list that is returned. The default (and maximum) is 100
40
+ # objects.
41
+ sig { returns(T.nilable(Integer)) }
42
+ attr_reader :limit
43
+
44
+ sig { params(limit: Integer).void }
45
+ attr_writer :limit
46
+
47
+ sig do
48
+ params(
49
+ entity_id: String,
50
+ cursor: String,
51
+ idempotency_key: String,
52
+ limit: Integer,
53
+ request_options: Increase::RequestOptions::OrHash
54
+ ).returns(T.attached_class)
55
+ end
56
+ def self.new(
57
+ # The identifier of the Entity to list beneficial owners for. Only `corporation`
58
+ # entities have beneficial owners.
59
+ entity_id:,
60
+ # Return the page of entries after this one.
61
+ cursor: nil,
62
+ # Filter records to the one with the specified `idempotency_key` you chose for
63
+ # that object. This value is unique across Increase and is used to ensure that a
64
+ # request is only processed once. Learn more about
65
+ # [idempotency](https://increase.com/documentation/idempotency-keys).
66
+ idempotency_key: nil,
67
+ # Limit the size of the list that is returned. The default (and maximum) is 100
68
+ # objects.
69
+ limit: nil,
70
+ request_options: {}
71
+ )
72
+ end
73
+
74
+ sig do
75
+ override.returns(
76
+ {
77
+ entity_id: String,
78
+ cursor: String,
79
+ idempotency_key: String,
80
+ limit: Integer,
81
+ request_options: Increase::RequestOptions
82
+ }
83
+ )
84
+ end
85
+ def to_hash
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,46 @@
1
+ # typed: strong
2
+
3
+ module Increase
4
+ module Models
5
+ class BeneficialOwnerRetrieveParams < Increase::Internal::Type::BaseModel
6
+ extend Increase::Internal::Type::RequestParameters::Converter
7
+ include Increase::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Increase::BeneficialOwnerRetrieveParams,
13
+ Increase::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The identifier of the Beneficial Owner to retrieve.
18
+ sig { returns(String) }
19
+ attr_accessor :entity_beneficial_owner_id
20
+
21
+ sig do
22
+ params(
23
+ entity_beneficial_owner_id: String,
24
+ request_options: Increase::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(
28
+ # The identifier of the Beneficial Owner to retrieve.
29
+ entity_beneficial_owner_id:,
30
+ request_options: {}
31
+ )
32
+ end
33
+
34
+ sig do
35
+ override.returns(
36
+ {
37
+ entity_beneficial_owner_id: String,
38
+ request_options: Increase::RequestOptions
39
+ }
40
+ )
41
+ end
42
+ def to_hash
43
+ end
44
+ end
45
+ end
46
+ end
@@ -255,9 +255,7 @@ module Increase
255
255
 
256
256
  # The identifying details of anyone controlling or owning 25% or more of the
257
257
  # corporation.
258
- sig do
259
- returns(T::Array[Increase::Entity::Corporation::BeneficialOwner])
260
- end
258
+ sig { returns(T::Array[Increase::EntityBeneficialOwner]) }
261
259
  attr_accessor :beneficial_owners
262
260
 
263
261
  # An email address for the business.
@@ -292,7 +290,7 @@ module Increase
292
290
  params(
293
291
  address: Increase::Entity::Corporation::Address::OrHash,
294
292
  beneficial_owners:
295
- T::Array[Increase::Entity::Corporation::BeneficialOwner::OrHash],
293
+ T::Array[Increase::EntityBeneficialOwner::OrHash],
296
294
  email: T.nilable(String),
297
295
  incorporation_state: T.nilable(String),
298
296
  industry_code: T.nilable(String),
@@ -328,8 +326,7 @@ module Increase
328
326
  override.returns(
329
327
  {
330
328
  address: Increase::Entity::Corporation::Address,
331
- beneficial_owners:
332
- T::Array[Increase::Entity::Corporation::BeneficialOwner],
329
+ beneficial_owners: T::Array[Increase::EntityBeneficialOwner],
333
330
  email: T.nilable(String),
334
331
  incorporation_state: T.nilable(String),
335
332
  industry_code: T.nilable(String),
@@ -411,403 +408,6 @@ module Increase
411
408
  def to_hash
412
409
  end
413
410
  end
414
-
415
- class BeneficialOwner < Increase::Internal::Type::BaseModel
416
- OrHash =
417
- T.type_alias do
418
- T.any(
419
- Increase::Entity::Corporation::BeneficialOwner,
420
- Increase::Internal::AnyHash
421
- )
422
- end
423
-
424
- # The identifier of this beneficial owner.
425
- sig { returns(String) }
426
- attr_accessor :id
427
-
428
- # This person's role or title within the entity.
429
- sig { returns(T.nilable(String)) }
430
- attr_accessor :company_title
431
-
432
- # Personal details for the beneficial owner.
433
- sig do
434
- returns(Increase::Entity::Corporation::BeneficialOwner::Individual)
435
- end
436
- attr_reader :individual
437
-
438
- sig do
439
- params(
440
- individual:
441
- Increase::Entity::Corporation::BeneficialOwner::Individual::OrHash
442
- ).void
443
- end
444
- attr_writer :individual
445
-
446
- # Why this person is considered a beneficial owner of the entity.
447
- sig do
448
- returns(
449
- T::Array[
450
- Increase::Entity::Corporation::BeneficialOwner::Prong::TaggedSymbol
451
- ]
452
- )
453
- end
454
- attr_accessor :prongs
455
-
456
- sig do
457
- params(
458
- id: String,
459
- company_title: T.nilable(String),
460
- individual:
461
- Increase::Entity::Corporation::BeneficialOwner::Individual::OrHash,
462
- prongs:
463
- T::Array[
464
- Increase::Entity::Corporation::BeneficialOwner::Prong::OrSymbol
465
- ]
466
- ).returns(T.attached_class)
467
- end
468
- def self.new(
469
- # The identifier of this beneficial owner.
470
- id:,
471
- # This person's role or title within the entity.
472
- company_title:,
473
- # Personal details for the beneficial owner.
474
- individual:,
475
- # Why this person is considered a beneficial owner of the entity.
476
- prongs:
477
- )
478
- end
479
-
480
- sig do
481
- override.returns(
482
- {
483
- id: String,
484
- company_title: T.nilable(String),
485
- individual:
486
- Increase::Entity::Corporation::BeneficialOwner::Individual,
487
- prongs:
488
- T::Array[
489
- Increase::Entity::Corporation::BeneficialOwner::Prong::TaggedSymbol
490
- ]
491
- }
492
- )
493
- end
494
- def to_hash
495
- end
496
-
497
- class Individual < Increase::Internal::Type::BaseModel
498
- OrHash =
499
- T.type_alias do
500
- T.any(
501
- Increase::Entity::Corporation::BeneficialOwner::Individual,
502
- Increase::Internal::AnyHash
503
- )
504
- end
505
-
506
- # The person's address.
507
- sig do
508
- returns(
509
- Increase::Entity::Corporation::BeneficialOwner::Individual::Address
510
- )
511
- end
512
- attr_reader :address
513
-
514
- sig do
515
- params(
516
- address:
517
- Increase::Entity::Corporation::BeneficialOwner::Individual::Address::OrHash
518
- ).void
519
- end
520
- attr_writer :address
521
-
522
- # The person's date of birth in YYYY-MM-DD format.
523
- sig { returns(Date) }
524
- attr_accessor :date_of_birth
525
-
526
- # A means of verifying the person's identity.
527
- sig do
528
- returns(
529
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification
530
- )
531
- end
532
- attr_reader :identification
533
-
534
- sig do
535
- params(
536
- identification:
537
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::OrHash
538
- ).void
539
- end
540
- attr_writer :identification
541
-
542
- # The person's legal name.
543
- sig { returns(String) }
544
- attr_accessor :name
545
-
546
- # Personal details for the beneficial owner.
547
- sig do
548
- params(
549
- address:
550
- Increase::Entity::Corporation::BeneficialOwner::Individual::Address::OrHash,
551
- date_of_birth: Date,
552
- identification:
553
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::OrHash,
554
- name: String
555
- ).returns(T.attached_class)
556
- end
557
- def self.new(
558
- # The person's address.
559
- address:,
560
- # The person's date of birth in YYYY-MM-DD format.
561
- date_of_birth:,
562
- # A means of verifying the person's identity.
563
- identification:,
564
- # The person's legal name.
565
- name:
566
- )
567
- end
568
-
569
- sig do
570
- override.returns(
571
- {
572
- address:
573
- Increase::Entity::Corporation::BeneficialOwner::Individual::Address,
574
- date_of_birth: Date,
575
- identification:
576
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification,
577
- name: String
578
- }
579
- )
580
- end
581
- def to_hash
582
- end
583
-
584
- class Address < Increase::Internal::Type::BaseModel
585
- OrHash =
586
- T.type_alias do
587
- T.any(
588
- Increase::Entity::Corporation::BeneficialOwner::Individual::Address,
589
- Increase::Internal::AnyHash
590
- )
591
- end
592
-
593
- # The city, district, town, or village of the address.
594
- sig { returns(T.nilable(String)) }
595
- attr_accessor :city
596
-
597
- # The two-letter ISO 3166-1 alpha-2 code for the country of the address.
598
- sig { returns(String) }
599
- attr_accessor :country
600
-
601
- # The first line of the address.
602
- sig { returns(String) }
603
- attr_accessor :line1
604
-
605
- # The second line of the address.
606
- sig { returns(T.nilable(String)) }
607
- attr_accessor :line2
608
-
609
- # The two-letter United States Postal Service (USPS) abbreviation for the US
610
- # state, province, or region of the address.
611
- sig { returns(T.nilable(String)) }
612
- attr_accessor :state
613
-
614
- # The ZIP or postal code of the address.
615
- sig { returns(T.nilable(String)) }
616
- attr_accessor :zip
617
-
618
- # The person's address.
619
- sig do
620
- params(
621
- city: T.nilable(String),
622
- country: String,
623
- line1: String,
624
- line2: T.nilable(String),
625
- state: T.nilable(String),
626
- zip: T.nilable(String)
627
- ).returns(T.attached_class)
628
- end
629
- def self.new(
630
- # The city, district, town, or village of the address.
631
- city:,
632
- # The two-letter ISO 3166-1 alpha-2 code for the country of the address.
633
- country:,
634
- # The first line of the address.
635
- line1:,
636
- # The second line of the address.
637
- line2:,
638
- # The two-letter United States Postal Service (USPS) abbreviation for the US
639
- # state, province, or region of the address.
640
- state:,
641
- # The ZIP or postal code of the address.
642
- zip:
643
- )
644
- end
645
-
646
- sig do
647
- override.returns(
648
- {
649
- city: T.nilable(String),
650
- country: String,
651
- line1: String,
652
- line2: T.nilable(String),
653
- state: T.nilable(String),
654
- zip: T.nilable(String)
655
- }
656
- )
657
- end
658
- def to_hash
659
- end
660
- end
661
-
662
- class Identification < Increase::Internal::Type::BaseModel
663
- OrHash =
664
- T.type_alias do
665
- T.any(
666
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification,
667
- Increase::Internal::AnyHash
668
- )
669
- end
670
-
671
- # A method that can be used to verify the individual's identity.
672
- sig do
673
- returns(
674
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol
675
- )
676
- end
677
- attr_accessor :method_
678
-
679
- # The last 4 digits of the identification number that can be used to verify the
680
- # individual's identity.
681
- sig { returns(String) }
682
- attr_accessor :number_last4
683
-
684
- # A means of verifying the person's identity.
685
- sig do
686
- params(
687
- method_:
688
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::OrSymbol,
689
- number_last4: String
690
- ).returns(T.attached_class)
691
- end
692
- def self.new(
693
- # A method that can be used to verify the individual's identity.
694
- method_:,
695
- # The last 4 digits of the identification number that can be used to verify the
696
- # individual's identity.
697
- number_last4:
698
- )
699
- end
700
-
701
- sig do
702
- override.returns(
703
- {
704
- method_:
705
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol,
706
- number_last4: String
707
- }
708
- )
709
- end
710
- def to_hash
711
- end
712
-
713
- # A method that can be used to verify the individual's identity.
714
- module Method
715
- extend Increase::Internal::Type::Enum
716
-
717
- TaggedSymbol =
718
- T.type_alias do
719
- T.all(
720
- Symbol,
721
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method
722
- )
723
- end
724
- OrSymbol = T.type_alias { T.any(Symbol, String) }
725
-
726
- # A social security number.
727
- SOCIAL_SECURITY_NUMBER =
728
- T.let(
729
- :social_security_number,
730
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol
731
- )
732
-
733
- # An individual taxpayer identification number (ITIN).
734
- INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER =
735
- T.let(
736
- :individual_taxpayer_identification_number,
737
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol
738
- )
739
-
740
- # A passport number.
741
- PASSPORT =
742
- T.let(
743
- :passport,
744
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol
745
- )
746
-
747
- # A driver's license number.
748
- DRIVERS_LICENSE =
749
- T.let(
750
- :drivers_license,
751
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol
752
- )
753
-
754
- # Another identifying document.
755
- OTHER =
756
- T.let(
757
- :other,
758
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol
759
- )
760
-
761
- sig do
762
- override.returns(
763
- T::Array[
764
- Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol
765
- ]
766
- )
767
- end
768
- def self.values
769
- end
770
- end
771
- end
772
- end
773
-
774
- module Prong
775
- extend Increase::Internal::Type::Enum
776
-
777
- TaggedSymbol =
778
- T.type_alias do
779
- T.all(
780
- Symbol,
781
- Increase::Entity::Corporation::BeneficialOwner::Prong
782
- )
783
- end
784
- OrSymbol = T.type_alias { T.any(Symbol, String) }
785
-
786
- # A person with 25% or greater direct or indirect ownership of the entity.
787
- OWNERSHIP =
788
- T.let(
789
- :ownership,
790
- Increase::Entity::Corporation::BeneficialOwner::Prong::TaggedSymbol
791
- )
792
-
793
- # A person who manages, directs, or has significant control of the entity.
794
- CONTROL =
795
- T.let(
796
- :control,
797
- Increase::Entity::Corporation::BeneficialOwner::Prong::TaggedSymbol
798
- )
799
-
800
- sig do
801
- override.returns(
802
- T::Array[
803
- Increase::Entity::Corporation::BeneficialOwner::Prong::TaggedSymbol
804
- ]
805
- )
806
- end
807
- def self.values
808
- end
809
- end
810
- end
811
411
  end
812
412
 
813
413
  class GovernmentAuthority < Increase::Internal::Type::BaseModel