Class: Increase::Models::Entity::Joint::Individual

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/increase/models/entity.rb,
sig/increase/models/entity.rbs

Defined Under Namespace

Classes: Address, Identification

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(city:, country:, line1:, line2:, state:, zip:) ⇒ Object

The person's address.

Parameters:

  • city (String, nil)

    The city, district, town, or village of the address.

  • country (String)

    The two-letter ISO 3166-1 alpha-2 code for the country of the address.

  • line1 (String)

    The first line of the address.

  • line2 (String, nil)

    The second line of the address.

  • state (String, nil)

    The two-letter United States Postal Service (USPS) abbreviation for the US state, province, or region of the address.

  • zip (String, nil)

    The ZIP or postal code of the address.



813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
# File 'lib/increase/models/entity.rb', line 813

class Individual < Increase::Internal::Type::BaseModel
  # @!attribute address
  #   The person's address.
  #
  #   @return [Increase::Models::Entity::Joint::Individual::Address]
  required :address, -> { Increase::Entity::Joint::Individual::Address }

  # @!attribute date_of_birth
  #   The person's date of birth in YYYY-MM-DD format.
  #
  #   @return [Date]
  required :date_of_birth, Date

  # @!attribute identification
  #   A means of verifying the person's identity.
  #
  #   @return [Increase::Models::Entity::Joint::Individual::Identification, nil]
  required :identification, -> { Increase::Entity::Joint::Individual::Identification }, nil?: true

  # @!attribute name
  #   The person's legal name.
  #
  #   @return [String]
  required :name, String

  # @!method initialize(address:, date_of_birth:, identification:, name:)
  #   @param address [Increase::Models::Entity::Joint::Individual::Address] The person's address.
  #
  #   @param date_of_birth [Date] The person's date of birth in YYYY-MM-DD format.
  #
  #   @param identification [Increase::Models::Entity::Joint::Individual::Identification, nil]
  #     A means of verifying the person's identity.
  #
  #   @param name [String] The person's legal name.

  # @see Increase::Models::Entity::Joint::Individual#address
  class Address < Increase::Internal::Type::BaseModel
    # @!attribute city
    #   The city, district, town, or village of the address.
    #
    #   @return [String, nil]
    required :city, String, nil?: true

    # @!attribute country
    #   The two-letter ISO 3166-1 alpha-2 code for the country of the address.
    #
    #   @return [String]
    required :country, String

    # @!attribute line1
    #   The first line of the address.
    #
    #   @return [String]
    required :line1, String

    # @!attribute line2
    #   The second line of the address.
    #
    #   @return [String, nil]
    required :line2, String, nil?: true

    # @!attribute state
    #   The two-letter United States Postal Service (USPS) abbreviation for the US
    #   state, province, or region of the address.
    #
    #   @return [String, nil]
    required :state, String, nil?: true

    # @!attribute zip
    #   The ZIP or postal code of the address.
    #
    #   @return [String, nil]
    required :zip, String, nil?: true

    # @!method initialize(city:, country:, line1:, line2:, state:, zip:)
    #   The person's address.
    #
    #   @param city [String, nil] The city, district, town, or village of the address.
    #
    #   @param country [String] The two-letter ISO 3166-1 alpha-2 code for the country of the address.
    #
    #   @param line1 [String] The first line of the address.
    #
    #   @param line2 [String, nil] The second line of the address.
    #
    #   @param state [String, nil]
    #     The two-letter United States Postal Service (USPS) abbreviation for the US
    #     state, province, or region of the address.
    #
    #   @param zip [String, nil] The ZIP or postal code of the address.
  end

  # @see Increase::Models::Entity::Joint::Individual#identification
  class Identification < Increase::Internal::Type::BaseModel
    # @!attribute method_
    #   A method that can be used to verify the individual's identity.
    #
    #   @return [Symbol, Increase::Models::Entity::Joint::Individual::Identification::Method]
    required :method_,
             enum: -> { Increase::Entity::Joint::Individual::Identification::Method },
             api_name: :method

    # @!attribute number_last4
    #   The last 4 digits of the identification number that can be used to verify the
    #   individual's identity.
    #
    #   @return [String]
    required :number_last4, String

    # @!method initialize(method_:, number_last4:)
    #   A means of verifying the person's identity.
    #
    #   @param method_ [Symbol, Increase::Models::Entity::Joint::Individual::Identification::Method]
    #     A method that can be used to verify the individual's identity.
    #
    #   @param number_last4 [String]
    #     The last 4 digits of the identification number that can be used to verify the
    #     individual's identity.

    # A method that can be used to verify the individual's identity.
    #
    # @see Increase::Models::Entity::Joint::Individual::Identification#method_
    module Method
      extend Increase::Internal::Type::Enum

      # A social security number.
      SOCIAL_SECURITY_NUMBER = :social_security_number

      # An individual taxpayer identification number (ITIN).
      INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER = :individual_taxpayer_identification_number

      # A passport number.
      PASSPORT = :passport

      # A driver's license number.
      DRIVERS_LICENSE = :drivers_license

      # Another identifying document.
      OTHER = :other

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end
end

Instance Attribute Details

#addressIncrease::Models::Entity::Joint::Individual::Address

The person's address.

Parameters:

  • value (Increase::Entity::Joint::Individual::Address)

Returns:



818
# File 'lib/increase/models/entity.rb', line 818

required :address, -> { Increase::Entity::Joint::Individual::Address }

#date_of_birthDate

The person's date of birth in YYYY-MM-DD format.

Parameters:

  • value (Date)

Returns:

  • (Date)


824
# File 'lib/increase/models/entity.rb', line 824

required :date_of_birth, Date

#identificationIncrease::Models::Entity::Joint::Individual::Identification?

A means of verifying the person's identity.

Parameters:

  • value (Increase::Entity::Joint::Individual::Identification, nil)

Returns:



830
# File 'lib/increase/models/entity.rb', line 830

required :identification, -> { Increase::Entity::Joint::Individual::Identification }, nil?: true

#nameString

The person's legal name.

Parameters:

  • value (String)

Returns:

  • (String)


836
# File 'lib/increase/models/entity.rb', line 836

required :name, String

Instance Method Details

#to_hash{

Returns:

  • ({)


600
# File 'sig/increase/models/entity.rbs', line 600

def to_hash: -> {