diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4de84746..d7296d40 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.250.0" + ".": "1.251.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 3528901c..47042c86 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 237 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2c11248a841117464c3d87ee8069761f8fdf1a235557bbc885bcfa13de4107c4.yml -openapi_spec_hash: 6bcd6b02eaff96080fc9f57fd5942502 -config_hash: 81fdd83e44056d1f623e280bc106245d +configured_endpoints: 236 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-842d7a1e6cff968c70110dc90a9e51da05e2f781e902d6f5ca71940e4b9688e1.yml +openapi_spec_hash: c3aabecf5bb2135391d6b8faef4ac1b3 +config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c7a5941..21e313f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 1.251.0 (2026-03-12) + +Full Changelog: [v1.250.0...v1.251.0](https://github.com/Increase/increase-ruby/compare/v1.250.0...v1.251.0) + +### Features + +* **api:** api update ([126d145](https://github.com/Increase/increase-ruby/commit/126d145166fd0f4da6a9e5ec8e5c7a6569053b40)) +* **api:** api update ([8dd3d2c](https://github.com/Increase/increase-ruby/commit/8dd3d2ccf94223fcae18ecc4511be427e699d54c)) +* **api:** api update ([0612b83](https://github.com/Increase/increase-ruby/commit/0612b830875e4ad90e04d28b6c84c9222f5c0d43)) +* **api:** api update ([dbebe41](https://github.com/Increase/increase-ruby/commit/dbebe4189586870bb68e3987ba30a5827438670c)) + ## 1.250.0 (2026-03-12) Full Changelog: [v1.249.0...v1.250.0](https://github.com/Increase/increase-ruby/compare/v1.249.0...v1.250.0) diff --git a/Gemfile.lock b/Gemfile.lock index bb47e570..29b87720 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.250.0) + increase (1.251.0) cgi connection_pool standardwebhooks diff --git a/README.md b/README.md index e79c470d..d1283310 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "increase", "~> 1.250.0" +gem "increase", "~> 1.251.0" ``` diff --git a/lib/increase.rb b/lib/increase.rb index 69549f06..8f35b287 100644 --- a/lib/increase.rb +++ b/lib/increase.rb @@ -167,7 +167,6 @@ require_relative "increase/models/entity" require_relative "increase/models/entity_archive_params" require_relative "increase/models/entity_beneficial_owner" -require_relative "increase/models/entity_create_beneficial_owner_params" require_relative "increase/models/entity_create_params" require_relative "increase/models/entity_list_params" require_relative "increase/models/entity_retrieve_params" diff --git a/lib/increase/models.rb b/lib/increase/models.rb index f9927812..3aa59485 100644 --- a/lib/increase/models.rb +++ b/lib/increase/models.rb @@ -265,8 +265,6 @@ module Increase EntityBeneficialOwner = Increase::Models::EntityBeneficialOwner - EntityCreateBeneficialOwnerParams = Increase::Models::EntityCreateBeneficialOwnerParams - EntityCreateParams = Increase::Models::EntityCreateParams EntityListParams = Increase::Models::EntityListParams diff --git a/lib/increase/models/card_push_transfer.rb b/lib/increase/models/card_push_transfer.rb index 279b04dd..73abe909 100644 --- a/lib/increase/models/card_push_transfer.rb +++ b/lib/increase/models/card_push_transfer.rb @@ -46,6 +46,12 @@ class CardPushTransfer < Increase::Internal::Type::BaseModel # @return [Increase::Models::CardPushTransfer::Cancellation, nil] required :cancellation, -> { Increase::CardPushTransfer::Cancellation }, nil?: true + # @!attribute card_token_id + # The ID of the Card Token that was used to validate the card. + # + # @return [String] + required :card_token_id, String + # @!attribute created_at # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which # the transfer was created. @@ -186,7 +192,7 @@ class CardPushTransfer < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::CardPushTransfer::Type] required :type, enum: -> { Increase::CardPushTransfer::Type } - # @!method initialize(id:, acceptance:, account_id:, approval:, business_application_identifier:, cancellation:, created_at:, created_by:, decline:, idempotency_key:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_name_prefix:, merchant_postal_code:, merchant_state:, presentment_amount:, recipient_name:, sender_address_city:, sender_address_line1:, sender_address_postal_code:, sender_address_state:, sender_name:, source_account_number_id:, status:, submission:, type:) + # @!method initialize(id:, acceptance:, account_id:, approval:, business_application_identifier:, cancellation:, card_token_id:, created_at:, created_by:, decline:, idempotency_key:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_name_prefix:, merchant_postal_code:, merchant_state:, presentment_amount:, recipient_name:, sender_address_city:, sender_address_line1:, sender_address_postal_code:, sender_address_state:, sender_name:, source_account_number_id:, status:, submission:, type:) # Some parameter documentations has been truncated, see # {Increase::Models::CardPushTransfer} for more details. # @@ -204,6 +210,8 @@ class CardPushTransfer < Increase::Internal::Type::BaseModel # # @param cancellation [Increase::Models::CardPushTransfer::Cancellation, nil] If your account requires approvals for transfers and the transfer was not approv # + # @param card_token_id [String] The ID of the Card Token that was used to validate the card. + # # @param created_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th # # @param created_by [Increase::Models::CardPushTransfer::CreatedBy, nil] What object created the transfer, either via the API or the dashboard. diff --git a/lib/increase/models/entity.rb b/lib/increase/models/entity.rb index 9c5b887e..b76dfb6a 100644 --- a/lib/increase/models/entity.rb +++ b/lib/increase/models/entity.rb @@ -174,8 +174,9 @@ class Corporation < Increase::Internal::Type::BaseModel # The identifying details of anyone controlling or owning 25% or more of the # corporation. # - # @return [Array] - required :beneficial_owners, -> { Increase::Internal::Type::ArrayOf[Increase::EntityBeneficialOwner] } + # @return [Array] + required :beneficial_owners, + -> { Increase::Internal::Type::ArrayOf[Increase::Entity::Corporation::BeneficialOwner] } # @!attribute email # An email address for the business. @@ -224,7 +225,7 @@ class Corporation < Increase::Internal::Type::BaseModel # # @param address [Increase::Models::Entity::Corporation::Address] The corporation's address. # - # @param beneficial_owners [Array] The identifying details of anyone controlling or owning 25% or more of the corpo + # @param beneficial_owners [Array] The identifying details of anyone controlling or owning 25% or more of the corpo # # @param email [String, nil] An email address for the business. # @@ -287,6 +288,209 @@ class Address < Increase::Internal::Type::BaseModel # # @param zip [String] The ZIP code of the address. end + + class BeneficialOwner < Increase::Internal::Type::BaseModel + # @!attribute id + # The identifier of this beneficial owner. + # + # @return [String] + required :id, String + + # @!attribute company_title + # This person's role or title within the entity. + # + # @return [String, nil] + required :company_title, String, nil?: true + + # @!attribute individual + # Personal details for the beneficial owner. + # + # @return [Increase::Models::Entity::Corporation::BeneficialOwner::Individual] + required :individual, -> { Increase::Entity::Corporation::BeneficialOwner::Individual } + + # @!attribute prongs + # Why this person is considered a beneficial owner of the entity. + # + # @return [Array] + required :prongs, + -> { Increase::Internal::Type::ArrayOf[enum: Increase::Entity::Corporation::BeneficialOwner::Prong] } + + # @!method initialize(id:, company_title:, individual:, prongs:) + # @param id [String] The identifier of this beneficial owner. + # + # @param company_title [String, nil] This person's role or title within the entity. + # + # @param individual [Increase::Models::Entity::Corporation::BeneficialOwner::Individual] Personal details for the beneficial owner. + # + # @param prongs [Array] Why this person is considered a beneficial owner of the entity. + + # @see Increase::Models::Entity::Corporation::BeneficialOwner#individual + class Individual < Increase::Internal::Type::BaseModel + # @!attribute address + # The person's address. + # + # @return [Increase::Models::Entity::Corporation::BeneficialOwner::Individual::Address] + required :address, -> { Increase::Entity::Corporation::BeneficialOwner::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::Corporation::BeneficialOwner::Individual::Identification] + required :identification, + -> { Increase::Entity::Corporation::BeneficialOwner::Individual::Identification } + + # @!attribute name + # The person's legal name. + # + # @return [String] + required :name, String + + # @!method initialize(address:, date_of_birth:, identification:, name:) + # Personal details for the beneficial owner. + # + # @param address [Increase::Models::Entity::Corporation::BeneficialOwner::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::Corporation::BeneficialOwner::Individual::Identification] A means of verifying the person's identity. + # + # @param name [String] The person's legal name. + + # @see Increase::Models::Entity::Corporation::BeneficialOwner::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:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Entity::Corporation::BeneficialOwner::Individual::Address} + # for more details. + # + # 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 + # + # @param zip [String, nil] The ZIP or postal code of the address. + end + + # @see Increase::Models::Entity::Corporation::BeneficialOwner::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::Corporation::BeneficialOwner::Individual::Identification::Method] + required :method_, + enum: -> { + Increase::Entity::Corporation::BeneficialOwner::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:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Entity::Corporation::BeneficialOwner::Individual::Identification} + # for more details. + # + # A means of verifying the person's identity. + # + # @param method_ [Symbol, Increase::Models::Entity::Corporation::BeneficialOwner::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 in + + # A method that can be used to verify the individual's identity. + # + # @see Increase::Models::Entity::Corporation::BeneficialOwner::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] + end + end + end + + module Prong + extend Increase::Internal::Type::Enum + + # A person with 25% or greater direct or indirect ownership of the entity. + OWNERSHIP = :ownership + + # A person who manages, directs, or has significant control of the entity. + CONTROL = :control + + # @!method self.values + # @return [Array] + end + end end # @see Increase::Models::Entity#government_authority diff --git a/lib/increase/models/entity_beneficial_owner.rb b/lib/increase/models/entity_beneficial_owner.rb index e143ebed..a1f83ec9 100644 --- a/lib/increase/models/entity_beneficial_owner.rb +++ b/lib/increase/models/entity_beneficial_owner.rb @@ -23,6 +23,12 @@ class EntityBeneficialOwner < Increase::Internal::Type::BaseModel # @return [Time] required :created_at, Time + # @!attribute entity_id + # The identifier of the Entity to which this beneficial owner belongs. + # + # @return [String] + required :entity_id, String + # @!attribute idempotency_key # The idempotency key you chose for this object. This value is unique across # Increase and is used to ensure that a request is only processed once. Learn more @@ -50,7 +56,7 @@ class EntityBeneficialOwner < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::EntityBeneficialOwner::Type] required :type, enum: -> { Increase::EntityBeneficialOwner::Type } - # @!method initialize(id:, company_title:, created_at:, idempotency_key:, individual:, prongs:, type:) + # @!method initialize(id:, company_title:, created_at:, entity_id:, idempotency_key:, individual:, prongs:, type:) # Some parameter documentations has been truncated, see # {Increase::Models::EntityBeneficialOwner} for more details. # @@ -66,6 +72,8 @@ class EntityBeneficialOwner < Increase::Internal::Type::BaseModel # # @param created_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Benefic # + # @param entity_id [String] The identifier of the Entity to which this beneficial owner belongs. + # # @param idempotency_key [String, nil] The idempotency key you chose for this object. This value is unique across Incre # # @param individual [Increase::Models::EntityBeneficialOwner::Individual] Personal details for the beneficial owner. diff --git a/lib/increase/models/entity_create_beneficial_owner_params.rb b/lib/increase/models/entity_create_beneficial_owner_params.rb deleted file mode 100644 index a5f1a9b9..00000000 --- a/lib/increase/models/entity_create_beneficial_owner_params.rb +++ /dev/null @@ -1,414 +0,0 @@ -# frozen_string_literal: true - -module Increase - module Models - # @see Increase::Resources::Entities#create_beneficial_owner - class EntityCreateBeneficialOwnerParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - # @!attribute entity_id - # The identifier of the Entity to associate with the new Beneficial Owner. - # - # @return [String] - required :entity_id, String - - # @!attribute beneficial_owner - # The identifying details of anyone controlling or owning 25% or more of the - # corporation. - # - # @return [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner] - required :beneficial_owner, -> { Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner } - - # @!method initialize(entity_id:, beneficial_owner:, request_options: {}) - # Some parameter documentations has been truncated, see - # {Increase::Models::EntityCreateBeneficialOwnerParams} for more details. - # - # @param entity_id [String] The identifier of the Entity to associate with the new Beneficial Owner. - # - # @param beneficial_owner [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner] The identifying details of anyone controlling or owning 25% or more of the corpo - # - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] - - class BeneficialOwner < Increase::Internal::Type::BaseModel - # @!attribute individual - # Personal details for the beneficial owner. - # - # @return [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual] - required :individual, -> { Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual } - - # @!attribute prongs - # Why this person is considered a beneficial owner of the entity. At least one - # option is required, if a person is both a control person and owner, submit an - # array containing both. - # - # @return [Array] - required :prongs, - -> { Increase::Internal::Type::ArrayOf[enum: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Prong] } - - # @!attribute company_title - # This person's role or title within the entity. - # - # @return [String, nil] - optional :company_title, String - - # @!method initialize(individual:, prongs:, company_title: nil) - # Some parameter documentations has been truncated, see - # {Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner} for more - # details. - # - # The identifying details of anyone controlling or owning 25% or more of the - # corporation. - # - # @param individual [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual] Personal details for the beneficial owner. - # - # @param prongs [Array] Why this person is considered a beneficial owner of the entity. At least one opt - # - # @param company_title [String] This person's role or title within the entity. - - # @see Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner#individual - class Individual < Increase::Internal::Type::BaseModel - # @!attribute address - # The individual's physical address. Mail receiving locations like PO Boxes and - # PMB's are disallowed. - # - # @return [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address] - required :address, - -> { Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::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::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification] - required :identification, - -> { Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification } - - # @!attribute name - # The person's legal name. - # - # @return [String] - required :name, String - - # @!attribute confirmed_no_us_tax_id - # The identification method for an individual can only be a passport, driver's - # license, or other document if you've confirmed the individual does not have a US - # tax id (either a Social Security Number or Individual Taxpayer Identification - # Number). - # - # @return [Boolean, nil] - optional :confirmed_no_us_tax_id, Increase::Internal::Type::Boolean - - # @!method initialize(address:, date_of_birth:, identification:, name:, confirmed_no_us_tax_id: nil) - # Some parameter documentations has been truncated, see - # {Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual} - # for more details. - # - # Personal details for the beneficial owner. - # - # @param address [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address] The individual's physical address. Mail receiving locations like PO Boxes and PM - # - # @param date_of_birth [Date] The person's date of birth in YYYY-MM-DD format. - # - # @param identification [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification] A means of verifying the person's identity. - # - # @param name [String] The person's legal name. - # - # @param confirmed_no_us_tax_id [Boolean] The identification method for an individual can only be a passport, driver's lic - - # @see Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual#address - class Address < Increase::Internal::Type::BaseModel - # @!attribute city - # The city, district, town, or village of the address. - # - # @return [String] - required :city, String - - # @!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. This is usually the street number and street. - # - # @return [String] - required :line1, String - - # @!attribute line2 - # The second line of the address. This might be the floor or room number. - # - # @return [String, nil] - optional :line2, String - - # @!attribute state - # The two-letter United States Postal Service (USPS) abbreviation for the US - # state, province, or region of the address. Required in certain countries. - # - # @return [String, nil] - optional :state, String - - # @!attribute zip - # The ZIP or postal code of the address. Required in certain countries. - # - # @return [String, nil] - optional :zip, String - - # @!method initialize(city:, country:, line1:, line2: nil, state: nil, zip: nil) - # Some parameter documentations has been truncated, see - # {Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address} - # for more details. - # - # The individual's physical address. Mail receiving locations like PO Boxes and - # PMB's are disallowed. - # - # @param city [String] 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. This is usually the street number and street. - # - # @param line2 [String] The second line of the address. This might be the floor or room number. - # - # @param state [String] The two-letter United States Postal Service (USPS) abbreviation for the US state - # - # @param zip [String] The ZIP or postal code of the address. Required in certain countries. - end - - # @see Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::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::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method] - required :method_, - enum: -> { - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method - }, - api_name: :method - - # @!attribute number - # An identification number that can be used to verify the individual's identity, - # such as a social security number. - # - # @return [String] - required :number, String - - # @!attribute drivers_license - # Information about the United States driver's license used for identification. - # Required if `method` is equal to `drivers_license`. - # - # @return [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense, nil] - optional :drivers_license, - -> { Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense } - - # @!attribute other - # Information about the identification document provided. Required if `method` is - # equal to `other`. - # - # @return [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other, nil] - optional :other, - -> { Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other } - - # @!attribute passport - # Information about the passport used for identification. Required if `method` is - # equal to `passport`. - # - # @return [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport, nil] - optional :passport, - -> { Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport } - - # @!method initialize(method_:, number:, drivers_license: nil, other: nil, passport: nil) - # Some parameter documentations has been truncated, see - # {Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification} - # for more details. - # - # A means of verifying the person's identity. - # - # @param method_ [Symbol, Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method] A method that can be used to verify the individual's identity. - # - # @param number [String] An identification number that can be used to verify the individual's identity, s - # - # @param drivers_license [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense] Information about the United States driver's license used for identification. Re - # - # @param other [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other] Information about the identification document provided. Required if `method` is - # - # @param passport [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport] Information about the passport used for identification. Required if `method` is - - # A method that can be used to verify the individual's identity. - # - # @see Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::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] - end - - # @see Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification#drivers_license - class DriversLicense < Increase::Internal::Type::BaseModel - # @!attribute expiration_date - # The driver's license's expiration date in YYYY-MM-DD format. - # - # @return [Date] - required :expiration_date, Date - - # @!attribute file_id - # The identifier of the File containing the front of the driver's license. - # - # @return [String] - required :file_id, String - - # @!attribute state - # The state that issued the provided driver's license. - # - # @return [String] - required :state, String - - # @!attribute back_file_id - # The identifier of the File containing the back of the driver's license. - # - # @return [String, nil] - optional :back_file_id, String - - # @!method initialize(expiration_date:, file_id:, state:, back_file_id: nil) - # Information about the United States driver's license used for identification. - # Required if `method` is equal to `drivers_license`. - # - # @param expiration_date [Date] The driver's license's expiration date in YYYY-MM-DD format. - # - # @param file_id [String] The identifier of the File containing the front of the driver's license. - # - # @param state [String] The state that issued the provided driver's license. - # - # @param back_file_id [String] The identifier of the File containing the back of the driver's license. - end - - # @see Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification#other - class Other < Increase::Internal::Type::BaseModel - # @!attribute country - # The two-character ISO 3166-1 code representing the country that issued the - # document (e.g., `US`). - # - # @return [String] - required :country, String - - # @!attribute description - # A description of the document submitted. - # - # @return [String] - required :description, String - - # @!attribute file_id - # The identifier of the File containing the front of the document. - # - # @return [String] - required :file_id, String - - # @!attribute back_file_id - # The identifier of the File containing the back of the document. Not every - # document has a reverse side. - # - # @return [String, nil] - optional :back_file_id, String - - # @!attribute expiration_date - # The document's expiration date in YYYY-MM-DD format. - # - # @return [Date, nil] - optional :expiration_date, Date - - # @!method initialize(country:, description:, file_id:, back_file_id: nil, expiration_date: nil) - # Some parameter documentations has been truncated, see - # {Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other} - # for more details. - # - # Information about the identification document provided. Required if `method` is - # equal to `other`. - # - # @param country [String] The two-character ISO 3166-1 code representing the country that issued the docum - # - # @param description [String] A description of the document submitted. - # - # @param file_id [String] The identifier of the File containing the front of the document. - # - # @param back_file_id [String] The identifier of the File containing the back of the document. Not every docume - # - # @param expiration_date [Date] The document's expiration date in YYYY-MM-DD format. - end - - # @see Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification#passport - class Passport < Increase::Internal::Type::BaseModel - # @!attribute country - # The two-character ISO 3166-1 code representing the country that issued the - # document (e.g., `US`). - # - # @return [String] - required :country, String - - # @!attribute expiration_date - # The passport's expiration date in YYYY-MM-DD format. - # - # @return [Date] - required :expiration_date, Date - - # @!attribute file_id - # The identifier of the File containing the passport. - # - # @return [String] - required :file_id, String - - # @!method initialize(country:, expiration_date:, file_id:) - # Some parameter documentations has been truncated, see - # {Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport} - # for more details. - # - # Information about the passport used for identification. Required if `method` is - # equal to `passport`. - # - # @param country [String] The two-character ISO 3166-1 code representing the country that issued the docum - # - # @param expiration_date [Date] The passport's expiration date in YYYY-MM-DD format. - # - # @param file_id [String] The identifier of the File containing the passport. - end - end - end - - module Prong - extend Increase::Internal::Type::Enum - - # A person with 25% or greater direct or indirect ownership of the entity. - OWNERSHIP = :ownership - - # A person who manages, directs, or has significant control of the entity. - CONTROL = :control - - # @!method self.values - # @return [Array] - end - end - end - end -end diff --git a/lib/increase/resources/entities.rb b/lib/increase/resources/entities.rb index a097de89..ada83cac 100644 --- a/lib/increase/resources/entities.rb +++ b/lib/increase/resources/entities.rb @@ -165,33 +165,6 @@ def archive(entity_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {Increase::Models::EntityCreateBeneficialOwnerParams} for more details. - # - # Create a beneficial owner for a corporate Entity - # - # @overload create_beneficial_owner(entity_id, beneficial_owner:, request_options: {}) - # - # @param entity_id [String] The identifier of the Entity to associate with the new Beneficial Owner. - # - # @param beneficial_owner [Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner] The identifying details of anyone controlling or owning 25% or more of the corpo - # - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [Increase::Models::Entity] - # - # @see Increase::Models::EntityCreateBeneficialOwnerParams - def create_beneficial_owner(entity_id, params) - parsed, options = Increase::EntityCreateBeneficialOwnerParams.dump_request(params) - @client.request( - method: :post, - path: ["entities/%1$s/create_beneficial_owner", entity_id], - body: parsed, - model: Increase::Entity, - options: options - ) - end - # @api private # # @param client [Increase::Client] diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 640f4305..0ac38b8e 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.250.0" + VERSION = "1.251.0" end diff --git a/rbi/increase/models.rbi b/rbi/increase/models.rbi index 5bdf7731..f533a37b 100644 --- a/rbi/increase/models.rbi +++ b/rbi/increase/models.rbi @@ -253,9 +253,6 @@ module Increase EntityBeneficialOwner = Increase::Models::EntityBeneficialOwner - EntityCreateBeneficialOwnerParams = - Increase::Models::EntityCreateBeneficialOwnerParams - EntityCreateParams = Increase::Models::EntityCreateParams EntityListParams = Increase::Models::EntityListParams diff --git a/rbi/increase/models/card_push_transfer.rbi b/rbi/increase/models/card_push_transfer.rbi index 52d67c98..77e6a6bf 100644 --- a/rbi/increase/models/card_push_transfer.rbi +++ b/rbi/increase/models/card_push_transfer.rbi @@ -63,6 +63,10 @@ module Increase end attr_writer :cancellation + # The ID of the Card Token that was used to validate the card. + sig { returns(String) } + attr_accessor :card_token_id + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which # the transfer was created. sig { returns(Time) } @@ -201,6 +205,7 @@ module Increase Increase::CardPushTransfer::BusinessApplicationIdentifier::OrSymbol, cancellation: T.nilable(Increase::CardPushTransfer::Cancellation::OrHash), + card_token_id: String, created_at: Time, created_by: T.nilable(Increase::CardPushTransfer::CreatedBy::OrHash), decline: T.nilable(Increase::CardPushTransfer::Decline::OrHash), @@ -243,6 +248,8 @@ module Increase # If your account requires approvals for transfers and the transfer was not # approved, this will contain details of the cancellation. cancellation:, + # The ID of the Card Token that was used to validate the card. + card_token_id:, # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which # the transfer was created. created_at:, @@ -312,6 +319,7 @@ module Increase business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol, cancellation: T.nilable(Increase::CardPushTransfer::Cancellation), + card_token_id: String, created_at: Time, created_by: T.nilable(Increase::CardPushTransfer::CreatedBy), decline: T.nilable(Increase::CardPushTransfer::Decline), diff --git a/rbi/increase/models/entity.rbi b/rbi/increase/models/entity.rbi index 2b69109e..b59f0a6a 100644 --- a/rbi/increase/models/entity.rbi +++ b/rbi/increase/models/entity.rbi @@ -255,7 +255,9 @@ module Increase # The identifying details of anyone controlling or owning 25% or more of the # corporation. - sig { returns(T::Array[Increase::EntityBeneficialOwner]) } + sig do + returns(T::Array[Increase::Entity::Corporation::BeneficialOwner]) + end attr_accessor :beneficial_owners # An email address for the business. @@ -290,7 +292,7 @@ module Increase params( address: Increase::Entity::Corporation::Address::OrHash, beneficial_owners: - T::Array[Increase::EntityBeneficialOwner::OrHash], + T::Array[Increase::Entity::Corporation::BeneficialOwner::OrHash], email: T.nilable(String), incorporation_state: T.nilable(String), industry_code: T.nilable(String), @@ -326,7 +328,8 @@ module Increase override.returns( { address: Increase::Entity::Corporation::Address, - beneficial_owners: T::Array[Increase::EntityBeneficialOwner], + beneficial_owners: + T::Array[Increase::Entity::Corporation::BeneficialOwner], email: T.nilable(String), incorporation_state: T.nilable(String), industry_code: T.nilable(String), @@ -408,6 +411,403 @@ module Increase def to_hash end end + + class BeneficialOwner < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Entity::Corporation::BeneficialOwner, + Increase::Internal::AnyHash + ) + end + + # The identifier of this beneficial owner. + sig { returns(String) } + attr_accessor :id + + # This person's role or title within the entity. + sig { returns(T.nilable(String)) } + attr_accessor :company_title + + # Personal details for the beneficial owner. + sig do + returns(Increase::Entity::Corporation::BeneficialOwner::Individual) + end + attr_reader :individual + + sig do + params( + individual: + Increase::Entity::Corporation::BeneficialOwner::Individual::OrHash + ).void + end + attr_writer :individual + + # Why this person is considered a beneficial owner of the entity. + sig do + returns( + T::Array[ + Increase::Entity::Corporation::BeneficialOwner::Prong::TaggedSymbol + ] + ) + end + attr_accessor :prongs + + sig do + params( + id: String, + company_title: T.nilable(String), + individual: + Increase::Entity::Corporation::BeneficialOwner::Individual::OrHash, + prongs: + T::Array[ + Increase::Entity::Corporation::BeneficialOwner::Prong::OrSymbol + ] + ).returns(T.attached_class) + end + def self.new( + # The identifier of this beneficial owner. + id:, + # This person's role or title within the entity. + company_title:, + # Personal details for the beneficial owner. + individual:, + # Why this person is considered a beneficial owner of the entity. + prongs: + ) + end + + sig do + override.returns( + { + id: String, + company_title: T.nilable(String), + individual: + Increase::Entity::Corporation::BeneficialOwner::Individual, + prongs: + T::Array[ + Increase::Entity::Corporation::BeneficialOwner::Prong::TaggedSymbol + ] + } + ) + end + def to_hash + end + + class Individual < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Entity::Corporation::BeneficialOwner::Individual, + Increase::Internal::AnyHash + ) + end + + # The person's address. + sig do + returns( + Increase::Entity::Corporation::BeneficialOwner::Individual::Address + ) + end + attr_reader :address + + sig do + params( + address: + Increase::Entity::Corporation::BeneficialOwner::Individual::Address::OrHash + ).void + end + attr_writer :address + + # The person's date of birth in YYYY-MM-DD format. + sig { returns(Date) } + attr_accessor :date_of_birth + + # A means of verifying the person's identity. + sig do + returns( + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification + ) + end + attr_reader :identification + + sig do + params( + identification: + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::OrHash + ).void + end + attr_writer :identification + + # The person's legal name. + sig { returns(String) } + attr_accessor :name + + # Personal details for the beneficial owner. + sig do + params( + address: + Increase::Entity::Corporation::BeneficialOwner::Individual::Address::OrHash, + date_of_birth: Date, + identification: + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::OrHash, + name: String + ).returns(T.attached_class) + end + def self.new( + # The person's address. + address:, + # The person's date of birth in YYYY-MM-DD format. + date_of_birth:, + # A means of verifying the person's identity. + identification:, + # The person's legal name. + name: + ) + end + + sig do + override.returns( + { + address: + Increase::Entity::Corporation::BeneficialOwner::Individual::Address, + date_of_birth: Date, + identification: + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification, + name: String + } + ) + end + def to_hash + end + + class Address < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Entity::Corporation::BeneficialOwner::Individual::Address, + Increase::Internal::AnyHash + ) + end + + # The city, district, town, or village of the address. + sig { returns(T.nilable(String)) } + attr_accessor :city + + # The two-letter ISO 3166-1 alpha-2 code for the country of the address. + sig { returns(String) } + attr_accessor :country + + # The first line of the address. + sig { returns(String) } + attr_accessor :line1 + + # The second line of the address. + sig { returns(T.nilable(String)) } + attr_accessor :line2 + + # The two-letter United States Postal Service (USPS) abbreviation for the US + # state, province, or region of the address. + sig { returns(T.nilable(String)) } + attr_accessor :state + + # The ZIP or postal code of the address. + sig { returns(T.nilable(String)) } + attr_accessor :zip + + # The person's address. + sig do + params( + city: T.nilable(String), + country: String, + line1: String, + line2: T.nilable(String), + state: T.nilable(String), + zip: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The city, district, town, or village of the address. + city:, + # The two-letter ISO 3166-1 alpha-2 code for the country of the address. + country:, + # The first line of the address. + line1:, + # The second line of the address. + line2:, + # The two-letter United States Postal Service (USPS) abbreviation for the US + # state, province, or region of the address. + state:, + # The ZIP or postal code of the address. + zip: + ) + end + + sig do + override.returns( + { + city: T.nilable(String), + country: String, + line1: String, + line2: T.nilable(String), + state: T.nilable(String), + zip: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Identification < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification, + Increase::Internal::AnyHash + ) + end + + # A method that can be used to verify the individual's identity. + sig do + returns( + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol + ) + end + attr_accessor :method_ + + # The last 4 digits of the identification number that can be used to verify the + # individual's identity. + sig { returns(String) } + attr_accessor :number_last4 + + # A means of verifying the person's identity. + sig do + params( + method_: + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::OrSymbol, + number_last4: String + ).returns(T.attached_class) + end + def self.new( + # A method that can be used to verify the individual's identity. + method_:, + # The last 4 digits of the identification number that can be used to verify the + # individual's identity. + number_last4: + ) + end + + sig do + override.returns( + { + method_: + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol, + number_last4: String + } + ) + end + def to_hash + end + + # A method that can be used to verify the individual's identity. + module Method + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # A social security number. + SOCIAL_SECURITY_NUMBER = + T.let( + :social_security_number, + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol + ) + + # An individual taxpayer identification number (ITIN). + INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER = + T.let( + :individual_taxpayer_identification_number, + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol + ) + + # A passport number. + PASSPORT = + T.let( + :passport, + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol + ) + + # A driver's license number. + DRIVERS_LICENSE = + T.let( + :drivers_license, + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol + ) + + # Another identifying document. + OTHER = + T.let( + :other, + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Entity::Corporation::BeneficialOwner::Individual::Identification::Method::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + module Prong + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Entity::Corporation::BeneficialOwner::Prong + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # A person with 25% or greater direct or indirect ownership of the entity. + OWNERSHIP = + T.let( + :ownership, + Increase::Entity::Corporation::BeneficialOwner::Prong::TaggedSymbol + ) + + # A person who manages, directs, or has significant control of the entity. + CONTROL = + T.let( + :control, + Increase::Entity::Corporation::BeneficialOwner::Prong::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Entity::Corporation::BeneficialOwner::Prong::TaggedSymbol + ] + ) + end + def self.values + end + end + end end class GovernmentAuthority < Increase::Internal::Type::BaseModel diff --git a/rbi/increase/models/entity_beneficial_owner.rbi b/rbi/increase/models/entity_beneficial_owner.rbi index f36a0e85..e9de87be 100644 --- a/rbi/increase/models/entity_beneficial_owner.rbi +++ b/rbi/increase/models/entity_beneficial_owner.rbi @@ -21,6 +21,10 @@ module Increase sig { returns(Time) } attr_accessor :created_at + # The identifier of the Entity to which this beneficial owner belongs. + sig { returns(String) } + attr_accessor :entity_id + # The idempotency key you chose for this object. This value is unique across # Increase and is used to ensure that a request is only processed once. Learn more # about [idempotency](https://increase.com/documentation/idempotency-keys). @@ -59,6 +63,7 @@ module Increase id: String, company_title: T.nilable(String), created_at: Time, + entity_id: String, idempotency_key: T.nilable(String), individual: Increase::EntityBeneficialOwner::Individual::OrHash, prongs: T::Array[Increase::EntityBeneficialOwner::Prong::OrSymbol], @@ -73,6 +78,8 @@ module Increase # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the # Beneficial Owner was created. created_at:, + # The identifier of the Entity to which this beneficial owner belongs. + entity_id:, # The idempotency key you chose for this object. This value is unique across # Increase and is used to ensure that a request is only processed once. Learn more # about [idempotency](https://increase.com/documentation/idempotency-keys). @@ -93,6 +100,7 @@ module Increase id: String, company_title: T.nilable(String), created_at: Time, + entity_id: String, idempotency_key: T.nilable(String), individual: Increase::EntityBeneficialOwner::Individual, prongs: diff --git a/rbi/increase/models/entity_create_beneficial_owner_params.rbi b/rbi/increase/models/entity_create_beneficial_owner_params.rbi deleted file mode 100644 index c2374352..00000000 --- a/rbi/increase/models/entity_create_beneficial_owner_params.rbi +++ /dev/null @@ -1,769 +0,0 @@ -# typed: strong - -module Increase - module Models - class EntityCreateBeneficialOwnerParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - Increase::EntityCreateBeneficialOwnerParams, - Increase::Internal::AnyHash - ) - end - - # The identifier of the Entity to associate with the new Beneficial Owner. - sig { returns(String) } - attr_accessor :entity_id - - # The identifying details of anyone controlling or owning 25% or more of the - # corporation. - sig do - returns(Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner) - end - attr_reader :beneficial_owner - - sig do - params( - beneficial_owner: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::OrHash - ).void - end - attr_writer :beneficial_owner - - sig do - params( - entity_id: String, - beneficial_owner: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::OrHash, - request_options: Increase::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - # The identifier of the Entity to associate with the new Beneficial Owner. - entity_id:, - # The identifying details of anyone controlling or owning 25% or more of the - # corporation. - beneficial_owner:, - request_options: {} - ) - end - - sig do - override.returns( - { - entity_id: String, - beneficial_owner: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner, - request_options: Increase::RequestOptions - } - ) - end - def to_hash - end - - class BeneficialOwner < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner, - Increase::Internal::AnyHash - ) - end - - # Personal details for the beneficial owner. - sig do - returns( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual - ) - end - attr_reader :individual - - sig do - params( - individual: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::OrHash - ).void - end - attr_writer :individual - - # Why this person is considered a beneficial owner of the entity. At least one - # option is required, if a person is both a control person and owner, submit an - # array containing both. - sig do - returns( - T::Array[ - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Prong::OrSymbol - ] - ) - end - attr_accessor :prongs - - # This person's role or title within the entity. - sig { returns(T.nilable(String)) } - attr_reader :company_title - - sig { params(company_title: String).void } - attr_writer :company_title - - # The identifying details of anyone controlling or owning 25% or more of the - # corporation. - sig do - params( - individual: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::OrHash, - prongs: - T::Array[ - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Prong::OrSymbol - ], - company_title: String - ).returns(T.attached_class) - end - def self.new( - # Personal details for the beneficial owner. - individual:, - # Why this person is considered a beneficial owner of the entity. At least one - # option is required, if a person is both a control person and owner, submit an - # array containing both. - prongs:, - # This person's role or title within the entity. - company_title: nil - ) - end - - sig do - override.returns( - { - individual: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual, - prongs: - T::Array[ - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Prong::OrSymbol - ], - company_title: String - } - ) - end - def to_hash - end - - class Individual < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual, - Increase::Internal::AnyHash - ) - end - - # The individual's physical address. Mail receiving locations like PO Boxes and - # PMB's are disallowed. - sig do - returns( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address - ) - end - attr_reader :address - - sig do - params( - address: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address::OrHash - ).void - end - attr_writer :address - - # The person's date of birth in YYYY-MM-DD format. - sig { returns(Date) } - attr_accessor :date_of_birth - - # A means of verifying the person's identity. - sig do - returns( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification - ) - end - attr_reader :identification - - sig do - params( - identification: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::OrHash - ).void - end - attr_writer :identification - - # The person's legal name. - sig { returns(String) } - attr_accessor :name - - # The identification method for an individual can only be a passport, driver's - # license, or other document if you've confirmed the individual does not have a US - # tax id (either a Social Security Number or Individual Taxpayer Identification - # Number). - sig { returns(T.nilable(T::Boolean)) } - attr_reader :confirmed_no_us_tax_id - - sig { params(confirmed_no_us_tax_id: T::Boolean).void } - attr_writer :confirmed_no_us_tax_id - - # Personal details for the beneficial owner. - sig do - params( - address: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address::OrHash, - date_of_birth: Date, - identification: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::OrHash, - name: String, - confirmed_no_us_tax_id: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # The individual's physical address. Mail receiving locations like PO Boxes and - # PMB's are disallowed. - address:, - # The person's date of birth in YYYY-MM-DD format. - date_of_birth:, - # A means of verifying the person's identity. - identification:, - # The person's legal name. - name:, - # The identification method for an individual can only be a passport, driver's - # license, or other document if you've confirmed the individual does not have a US - # tax id (either a Social Security Number or Individual Taxpayer Identification - # Number). - confirmed_no_us_tax_id: nil - ) - end - - sig do - override.returns( - { - address: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address, - date_of_birth: Date, - identification: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification, - name: String, - confirmed_no_us_tax_id: T::Boolean - } - ) - end - def to_hash - end - - class Address < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address, - Increase::Internal::AnyHash - ) - end - - # The city, district, town, or village of the address. - sig { returns(String) } - attr_accessor :city - - # The two-letter ISO 3166-1 alpha-2 code for the country of the address. - sig { returns(String) } - attr_accessor :country - - # The first line of the address. This is usually the street number and street. - sig { returns(String) } - attr_accessor :line1 - - # The second line of the address. This might be the floor or room number. - sig { returns(T.nilable(String)) } - attr_reader :line2 - - sig { params(line2: String).void } - attr_writer :line2 - - # The two-letter United States Postal Service (USPS) abbreviation for the US - # state, province, or region of the address. Required in certain countries. - sig { returns(T.nilable(String)) } - attr_reader :state - - sig { params(state: String).void } - attr_writer :state - - # The ZIP or postal code of the address. Required in certain countries. - sig { returns(T.nilable(String)) } - attr_reader :zip - - sig { params(zip: String).void } - attr_writer :zip - - # The individual's physical address. Mail receiving locations like PO Boxes and - # PMB's are disallowed. - sig do - params( - city: String, - country: String, - line1: String, - line2: String, - state: String, - zip: String - ).returns(T.attached_class) - end - def self.new( - # The city, district, town, or village of the address. - city:, - # The two-letter ISO 3166-1 alpha-2 code for the country of the address. - country:, - # The first line of the address. This is usually the street number and street. - line1:, - # The second line of the address. This might be the floor or room number. - line2: nil, - # The two-letter United States Postal Service (USPS) abbreviation for the US - # state, province, or region of the address. Required in certain countries. - state: nil, - # The ZIP or postal code of the address. Required in certain countries. - zip: nil - ) - end - - sig do - override.returns( - { - city: String, - country: String, - line1: String, - line2: String, - state: String, - zip: String - } - ) - end - def to_hash - end - end - - class Identification < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification, - Increase::Internal::AnyHash - ) - end - - # A method that can be used to verify the individual's identity. - sig do - returns( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method::OrSymbol - ) - end - attr_accessor :method_ - - # An identification number that can be used to verify the individual's identity, - # such as a social security number. - sig { returns(String) } - attr_accessor :number - - # Information about the United States driver's license used for identification. - # Required if `method` is equal to `drivers_license`. - sig do - returns( - T.nilable( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense - ) - ) - end - attr_reader :drivers_license - - sig do - params( - drivers_license: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense::OrHash - ).void - end - attr_writer :drivers_license - - # Information about the identification document provided. Required if `method` is - # equal to `other`. - sig do - returns( - T.nilable( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other - ) - ) - end - attr_reader :other - - sig do - params( - other: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other::OrHash - ).void - end - attr_writer :other - - # Information about the passport used for identification. Required if `method` is - # equal to `passport`. - sig do - returns( - T.nilable( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport - ) - ) - end - attr_reader :passport - - sig do - params( - passport: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport::OrHash - ).void - end - attr_writer :passport - - # A means of verifying the person's identity. - sig do - params( - method_: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method::OrSymbol, - number: String, - drivers_license: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense::OrHash, - other: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other::OrHash, - passport: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport::OrHash - ).returns(T.attached_class) - end - def self.new( - # A method that can be used to verify the individual's identity. - method_:, - # An identification number that can be used to verify the individual's identity, - # such as a social security number. - number:, - # Information about the United States driver's license used for identification. - # Required if `method` is equal to `drivers_license`. - drivers_license: nil, - # Information about the identification document provided. Required if `method` is - # equal to `other`. - other: nil, - # Information about the passport used for identification. Required if `method` is - # equal to `passport`. - passport: nil - ) - end - - sig do - override.returns( - { - method_: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method::OrSymbol, - number: String, - drivers_license: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense, - other: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other, - passport: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport - } - ) - end - def to_hash - end - - # A method that can be used to verify the individual's identity. - module Method - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # A social security number. - SOCIAL_SECURITY_NUMBER = - T.let( - :social_security_number, - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method::TaggedSymbol - ) - - # An individual taxpayer identification number (ITIN). - INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER = - T.let( - :individual_taxpayer_identification_number, - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method::TaggedSymbol - ) - - # A passport number. - PASSPORT = - T.let( - :passport, - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method::TaggedSymbol - ) - - # A driver's license number. - DRIVERS_LICENSE = - T.let( - :drivers_license, - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method::TaggedSymbol - ) - - # Another identifying document. - OTHER = - T.let( - :other, - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Method::TaggedSymbol - ] - ) - end - def self.values - end - end - - class DriversLicense < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense, - Increase::Internal::AnyHash - ) - end - - # The driver's license's expiration date in YYYY-MM-DD format. - sig { returns(Date) } - attr_accessor :expiration_date - - # The identifier of the File containing the front of the driver's license. - sig { returns(String) } - attr_accessor :file_id - - # The state that issued the provided driver's license. - sig { returns(String) } - attr_accessor :state - - # The identifier of the File containing the back of the driver's license. - sig { returns(T.nilable(String)) } - attr_reader :back_file_id - - sig { params(back_file_id: String).void } - attr_writer :back_file_id - - # Information about the United States driver's license used for identification. - # Required if `method` is equal to `drivers_license`. - sig do - params( - expiration_date: Date, - file_id: String, - state: String, - back_file_id: String - ).returns(T.attached_class) - end - def self.new( - # The driver's license's expiration date in YYYY-MM-DD format. - expiration_date:, - # The identifier of the File containing the front of the driver's license. - file_id:, - # The state that issued the provided driver's license. - state:, - # The identifier of the File containing the back of the driver's license. - back_file_id: nil - ) - end - - sig do - override.returns( - { - expiration_date: Date, - file_id: String, - state: String, - back_file_id: String - } - ) - end - def to_hash - end - end - - class Other < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other, - Increase::Internal::AnyHash - ) - end - - # The two-character ISO 3166-1 code representing the country that issued the - # document (e.g., `US`). - sig { returns(String) } - attr_accessor :country - - # A description of the document submitted. - sig { returns(String) } - attr_accessor :description - - # The identifier of the File containing the front of the document. - sig { returns(String) } - attr_accessor :file_id - - # The identifier of the File containing the back of the document. Not every - # document has a reverse side. - sig { returns(T.nilable(String)) } - attr_reader :back_file_id - - sig { params(back_file_id: String).void } - attr_writer :back_file_id - - # The document's expiration date in YYYY-MM-DD format. - sig { returns(T.nilable(Date)) } - attr_reader :expiration_date - - sig { params(expiration_date: Date).void } - attr_writer :expiration_date - - # Information about the identification document provided. Required if `method` is - # equal to `other`. - sig do - params( - country: String, - description: String, - file_id: String, - back_file_id: String, - expiration_date: Date - ).returns(T.attached_class) - end - def self.new( - # The two-character ISO 3166-1 code representing the country that issued the - # document (e.g., `US`). - country:, - # A description of the document submitted. - description:, - # The identifier of the File containing the front of the document. - file_id:, - # The identifier of the File containing the back of the document. Not every - # document has a reverse side. - back_file_id: nil, - # The document's expiration date in YYYY-MM-DD format. - expiration_date: nil - ) - end - - sig do - override.returns( - { - country: String, - description: String, - file_id: String, - back_file_id: String, - expiration_date: Date - } - ) - end - def to_hash - end - end - - class Passport < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport, - Increase::Internal::AnyHash - ) - end - - # The two-character ISO 3166-1 code representing the country that issued the - # document (e.g., `US`). - sig { returns(String) } - attr_accessor :country - - # The passport's expiration date in YYYY-MM-DD format. - sig { returns(Date) } - attr_accessor :expiration_date - - # The identifier of the File containing the passport. - sig { returns(String) } - attr_accessor :file_id - - # Information about the passport used for identification. Required if `method` is - # equal to `passport`. - sig do - params( - country: String, - expiration_date: Date, - file_id: String - ).returns(T.attached_class) - end - def self.new( - # The two-character ISO 3166-1 code representing the country that issued the - # document (e.g., `US`). - country:, - # The passport's expiration date in YYYY-MM-DD format. - expiration_date:, - # The identifier of the File containing the passport. - file_id: - ) - end - - sig do - override.returns( - { country: String, expiration_date: Date, file_id: String } - ) - end - def to_hash - end - end - end - end - - module Prong - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Prong - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # A person with 25% or greater direct or indirect ownership of the entity. - OWNERSHIP = - T.let( - :ownership, - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Prong::TaggedSymbol - ) - - # A person who manages, directs, or has significant control of the entity. - CONTROL = - T.let( - :control, - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Prong::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Prong::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end -end diff --git a/rbi/increase/resources/entities.rbi b/rbi/increase/resources/entities.rbi index 61f9adc2..2ace1884 100644 --- a/rbi/increase/resources/entities.rbi +++ b/rbi/increase/resources/entities.rbi @@ -167,25 +167,6 @@ module Increase ) end - # Create a beneficial owner for a corporate Entity - sig do - params( - entity_id: String, - beneficial_owner: - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::OrHash, - request_options: Increase::RequestOptions::OrHash - ).returns(Increase::Entity) - end - def create_beneficial_owner( - # The identifier of the Entity to associate with the new Beneficial Owner. - entity_id, - # The identifying details of anyone controlling or owning 25% or more of the - # corporation. - beneficial_owner:, - request_options: {} - ) - end - # @api private sig { params(client: Increase::Client).returns(T.attached_class) } def self.new(client:) diff --git a/sig/increase/models.rbs b/sig/increase/models.rbs index c943379c..b3b95ddb 100644 --- a/sig/increase/models.rbs +++ b/sig/increase/models.rbs @@ -225,8 +225,6 @@ module Increase class EntityBeneficialOwner = Increase::Models::EntityBeneficialOwner - class EntityCreateBeneficialOwnerParams = Increase::Models::EntityCreateBeneficialOwnerParams - class EntityCreateParams = Increase::Models::EntityCreateParams class EntityListParams = Increase::Models::EntityListParams diff --git a/sig/increase/models/card_push_transfer.rbs b/sig/increase/models/card_push_transfer.rbs index 2e3b292c..d02c9e00 100644 --- a/sig/increase/models/card_push_transfer.rbs +++ b/sig/increase/models/card_push_transfer.rbs @@ -8,6 +8,7 @@ module Increase approval: Increase::CardPushTransfer::Approval?, business_application_identifier: Increase::Models::CardPushTransfer::business_application_identifier, cancellation: Increase::CardPushTransfer::Cancellation?, + card_token_id: String, created_at: Time, created_by: Increase::CardPushTransfer::CreatedBy?, decline: Increase::CardPushTransfer::Decline?, @@ -44,6 +45,8 @@ module Increase attr_accessor cancellation: Increase::CardPushTransfer::Cancellation? + attr_accessor card_token_id: String + attr_accessor created_at: Time attr_accessor created_by: Increase::CardPushTransfer::CreatedBy? @@ -93,6 +96,7 @@ module Increase approval: Increase::CardPushTransfer::Approval?, business_application_identifier: Increase::Models::CardPushTransfer::business_application_identifier, cancellation: Increase::CardPushTransfer::Cancellation?, + card_token_id: String, created_at: Time, created_by: Increase::CardPushTransfer::CreatedBy?, decline: Increase::CardPushTransfer::Decline?, @@ -123,6 +127,7 @@ module Increase approval: Increase::CardPushTransfer::Approval?, business_application_identifier: Increase::Models::CardPushTransfer::business_application_identifier, cancellation: Increase::CardPushTransfer::Cancellation?, + card_token_id: String, created_at: Time, created_by: Increase::CardPushTransfer::CreatedBy?, decline: Increase::CardPushTransfer::Decline?, diff --git a/sig/increase/models/entity.rbs b/sig/increase/models/entity.rbs index ca8d167a..74cb124e 100644 --- a/sig/increase/models/entity.rbs +++ b/sig/increase/models/entity.rbs @@ -99,7 +99,7 @@ module Increase type corporation = { address: Increase::Entity::Corporation::Address, - beneficial_owners: ::Array[Increase::EntityBeneficialOwner], + beneficial_owners: ::Array[Increase::Entity::Corporation::BeneficialOwner], email: String?, incorporation_state: String?, industry_code: String?, @@ -111,7 +111,7 @@ module Increase class Corporation < Increase::Internal::Type::BaseModel attr_accessor address: Increase::Entity::Corporation::Address - attr_accessor beneficial_owners: ::Array[Increase::EntityBeneficialOwner] + attr_accessor beneficial_owners: ::Array[Increase::Entity::Corporation::BeneficialOwner] attr_accessor email: String? @@ -127,7 +127,7 @@ module Increase def initialize: ( address: Increase::Entity::Corporation::Address, - beneficial_owners: ::Array[Increase::EntityBeneficialOwner], + beneficial_owners: ::Array[Increase::Entity::Corporation::BeneficialOwner], email: String?, incorporation_state: String?, industry_code: String?, @@ -138,7 +138,7 @@ module Increase def to_hash: -> { address: Increase::Entity::Corporation::Address, - beneficial_owners: ::Array[Increase::EntityBeneficialOwner], + beneficial_owners: ::Array[Increase::Entity::Corporation::BeneficialOwner], email: String?, incorporation_state: String?, industry_code: String?, @@ -183,6 +183,176 @@ module Increase zip: String } end + + type beneficial_owner = + { + id: String, + company_title: String?, + individual: Increase::Entity::Corporation::BeneficialOwner::Individual, + prongs: ::Array[Increase::Models::Entity::Corporation::BeneficialOwner::prong] + } + + class BeneficialOwner < Increase::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor company_title: String? + + attr_accessor individual: Increase::Entity::Corporation::BeneficialOwner::Individual + + attr_accessor prongs: ::Array[Increase::Models::Entity::Corporation::BeneficialOwner::prong] + + def initialize: ( + id: String, + company_title: String?, + individual: Increase::Entity::Corporation::BeneficialOwner::Individual, + prongs: ::Array[Increase::Models::Entity::Corporation::BeneficialOwner::prong] + ) -> void + + def to_hash: -> { + id: String, + company_title: String?, + individual: Increase::Entity::Corporation::BeneficialOwner::Individual, + prongs: ::Array[Increase::Models::Entity::Corporation::BeneficialOwner::prong] + } + + type individual = + { + address: Increase::Entity::Corporation::BeneficialOwner::Individual::Address, + date_of_birth: Date, + identification: Increase::Entity::Corporation::BeneficialOwner::Individual::Identification, + name: String + } + + class Individual < Increase::Internal::Type::BaseModel + attr_accessor address: Increase::Entity::Corporation::BeneficialOwner::Individual::Address + + attr_accessor date_of_birth: Date + + attr_accessor identification: Increase::Entity::Corporation::BeneficialOwner::Individual::Identification + + attr_accessor name: String + + def initialize: ( + address: Increase::Entity::Corporation::BeneficialOwner::Individual::Address, + date_of_birth: Date, + identification: Increase::Entity::Corporation::BeneficialOwner::Individual::Identification, + name: String + ) -> void + + def to_hash: -> { + address: Increase::Entity::Corporation::BeneficialOwner::Individual::Address, + date_of_birth: Date, + identification: Increase::Entity::Corporation::BeneficialOwner::Individual::Identification, + name: String + } + + type address = + { + city: String?, + country: String, + :line1 => String, + :line2 => String?, + state: String?, + zip: String? + } + + class Address < Increase::Internal::Type::BaseModel + attr_accessor city: String? + + attr_accessor country: String + + attr_accessor line1: String + + attr_accessor line2: String? + + attr_accessor state: String? + + attr_accessor zip: String? + + def initialize: ( + city: String?, + country: String, + line1: String, + line2: String?, + state: String?, + zip: String? + ) -> void + + def to_hash: -> { + city: String?, + country: String, + :line1 => String, + :line2 => String?, + state: String?, + zip: String? + } + end + + type identification = + { + method_: Increase::Models::Entity::Corporation::BeneficialOwner::Individual::Identification::method_, + :number_last4 => String + } + + class Identification < Increase::Internal::Type::BaseModel + attr_accessor method_: Increase::Models::Entity::Corporation::BeneficialOwner::Individual::Identification::method_ + + attr_accessor number_last4: String + + def initialize: ( + method_: Increase::Models::Entity::Corporation::BeneficialOwner::Individual::Identification::method_, + number_last4: String + ) -> void + + def to_hash: -> { + method_: Increase::Models::Entity::Corporation::BeneficialOwner::Individual::Identification::method_, + :number_last4 => String + } + + type method_ = + :social_security_number + | :individual_taxpayer_identification_number + | :passport + | :drivers_license + | :other + + 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 + + def self?.values: -> ::Array[Increase::Models::Entity::Corporation::BeneficialOwner::Individual::Identification::method_] + end + end + end + + type prong = :ownership | :control + + module Prong + extend Increase::Internal::Type::Enum + + # A person with 25% or greater direct or indirect ownership of the entity. + OWNERSHIP: :ownership + + # A person who manages, directs, or has significant control of the entity. + CONTROL: :control + + def self?.values: -> ::Array[Increase::Models::Entity::Corporation::BeneficialOwner::prong] + end + end end type government_authority = diff --git a/sig/increase/models/entity_beneficial_owner.rbs b/sig/increase/models/entity_beneficial_owner.rbs index 7be1fdf5..0c19685d 100644 --- a/sig/increase/models/entity_beneficial_owner.rbs +++ b/sig/increase/models/entity_beneficial_owner.rbs @@ -5,6 +5,7 @@ module Increase id: String, company_title: String?, created_at: Time, + entity_id: String, idempotency_key: String?, individual: Increase::EntityBeneficialOwner::Individual, prongs: ::Array[Increase::Models::EntityBeneficialOwner::prong], @@ -18,6 +19,8 @@ module Increase attr_accessor created_at: Time + attr_accessor entity_id: String + attr_accessor idempotency_key: String? attr_accessor individual: Increase::EntityBeneficialOwner::Individual @@ -30,6 +33,7 @@ module Increase id: String, company_title: String?, created_at: Time, + entity_id: String, idempotency_key: String?, individual: Increase::EntityBeneficialOwner::Individual, prongs: ::Array[Increase::Models::EntityBeneficialOwner::prong], @@ -40,6 +44,7 @@ module Increase id: String, company_title: String?, created_at: Time, + entity_id: String, idempotency_key: String?, individual: Increase::EntityBeneficialOwner::Individual, prongs: ::Array[Increase::Models::EntityBeneficialOwner::prong], diff --git a/sig/increase/models/entity_create_beneficial_owner_params.rbs b/sig/increase/models/entity_create_beneficial_owner_params.rbs deleted file mode 100644 index 01be99db..00000000 --- a/sig/increase/models/entity_create_beneficial_owner_params.rbs +++ /dev/null @@ -1,336 +0,0 @@ -module Increase - module Models - type entity_create_beneficial_owner_params = - { - entity_id: String, - beneficial_owner: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner - } - & Increase::Internal::Type::request_parameters - - class EntityCreateBeneficialOwnerParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - attr_accessor entity_id: String - - attr_accessor beneficial_owner: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner - - def initialize: ( - entity_id: String, - beneficial_owner: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner, - ?request_options: Increase::request_opts - ) -> void - - def to_hash: -> { - entity_id: String, - beneficial_owner: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner, - request_options: Increase::RequestOptions - } - - type beneficial_owner = - { - individual: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual, - prongs: ::Array[Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::prong], - company_title: String - } - - class BeneficialOwner < Increase::Internal::Type::BaseModel - attr_accessor individual: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual - - attr_accessor prongs: ::Array[Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::prong] - - attr_reader company_title: String? - - def company_title=: (String) -> String - - def initialize: ( - individual: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual, - prongs: ::Array[Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::prong], - ?company_title: String - ) -> void - - def to_hash: -> { - individual: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual, - prongs: ::Array[Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::prong], - company_title: String - } - - type individual = - { - address: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address, - date_of_birth: Date, - identification: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification, - name: String, - confirmed_no_us_tax_id: bool - } - - class Individual < Increase::Internal::Type::BaseModel - attr_accessor address: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address - - attr_accessor date_of_birth: Date - - attr_accessor identification: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification - - attr_accessor name: String - - attr_reader confirmed_no_us_tax_id: bool? - - def confirmed_no_us_tax_id=: (bool) -> bool - - def initialize: ( - address: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address, - date_of_birth: Date, - identification: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification, - name: String, - ?confirmed_no_us_tax_id: bool - ) -> void - - def to_hash: -> { - address: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Address, - date_of_birth: Date, - identification: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification, - name: String, - confirmed_no_us_tax_id: bool - } - - type address = - { - city: String, - country: String, - :line1 => String, - :line2 => String, - state: String, - zip: String - } - - class Address < Increase::Internal::Type::BaseModel - attr_accessor city: String - - attr_accessor country: String - - attr_accessor line1: String - - attr_reader line2: String? - - def line2=: (String) -> String - - attr_reader state: String? - - def state=: (String) -> String - - attr_reader zip: String? - - def zip=: (String) -> String - - def initialize: ( - city: String, - country: String, - line1: String, - ?line2: String, - ?state: String, - ?zip: String - ) -> void - - def to_hash: -> { - city: String, - country: String, - :line1 => String, - :line2 => String, - state: String, - zip: String - } - end - - type identification = - { - method_: Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::method_, - number: String, - drivers_license: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense, - other: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other, - passport: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport - } - - class Identification < Increase::Internal::Type::BaseModel - attr_accessor method_: Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::method_ - - attr_accessor number: String - - attr_reader drivers_license: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense? - - def drivers_license=: ( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense - ) -> Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense - - attr_reader other: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other? - - def other=: ( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other - ) -> Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other - - attr_reader passport: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport? - - def passport=: ( - Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport - ) -> Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport - - def initialize: ( - method_: Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::method_, - number: String, - ?drivers_license: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense, - ?other: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other, - ?passport: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport - ) -> void - - def to_hash: -> { - method_: Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::method_, - number: String, - drivers_license: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::DriversLicense, - other: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Other, - passport: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::Passport - } - - type method_ = - :social_security_number - | :individual_taxpayer_identification_number - | :passport - | :drivers_license - | :other - - 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 - - def self?.values: -> ::Array[Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::Individual::Identification::method_] - end - - type drivers_license = - { - expiration_date: Date, - file_id: String, - state: String, - back_file_id: String - } - - class DriversLicense < Increase::Internal::Type::BaseModel - attr_accessor expiration_date: Date - - attr_accessor file_id: String - - attr_accessor state: String - - attr_reader back_file_id: String? - - def back_file_id=: (String) -> String - - def initialize: ( - expiration_date: Date, - file_id: String, - state: String, - ?back_file_id: String - ) -> void - - def to_hash: -> { - expiration_date: Date, - file_id: String, - state: String, - back_file_id: String - } - end - - type other = - { - country: String, - description: String, - file_id: String, - back_file_id: String, - expiration_date: Date - } - - class Other < Increase::Internal::Type::BaseModel - attr_accessor country: String - - attr_accessor description: String - - attr_accessor file_id: String - - attr_reader back_file_id: String? - - def back_file_id=: (String) -> String - - attr_reader expiration_date: Date? - - def expiration_date=: (Date) -> Date - - def initialize: ( - country: String, - description: String, - file_id: String, - ?back_file_id: String, - ?expiration_date: Date - ) -> void - - def to_hash: -> { - country: String, - description: String, - file_id: String, - back_file_id: String, - expiration_date: Date - } - end - - type passport = - { country: String, expiration_date: Date, file_id: String } - - class Passport < Increase::Internal::Type::BaseModel - attr_accessor country: String - - attr_accessor expiration_date: Date - - attr_accessor file_id: String - - def initialize: ( - country: String, - expiration_date: Date, - file_id: String - ) -> void - - def to_hash: -> { - country: String, - expiration_date: Date, - file_id: String - } - end - end - end - - type prong = :ownership | :control - - module Prong - extend Increase::Internal::Type::Enum - - # A person with 25% or greater direct or indirect ownership of the entity. - OWNERSHIP: :ownership - - # A person who manages, directs, or has significant control of the entity. - CONTROL: :control - - def self?.values: -> ::Array[Increase::Models::EntityCreateBeneficialOwnerParams::BeneficialOwner::prong] - end - end - end - end -end diff --git a/sig/increase/resources/entities.rbs b/sig/increase/resources/entities.rbs index 8bb36bba..94568422 100644 --- a/sig/increase/resources/entities.rbs +++ b/sig/increase/resources/entities.rbs @@ -47,12 +47,6 @@ module Increase ?request_options: Increase::request_opts ) -> Increase::Entity - def create_beneficial_owner: ( - String entity_id, - beneficial_owner: Increase::EntityCreateBeneficialOwnerParams::BeneficialOwner, - ?request_options: Increase::request_opts - ) -> Increase::Entity - def initialize: (client: Increase::Client) -> void end end diff --git a/test/increase/resources/beneficial_owners_test.rb b/test/increase/resources/beneficial_owners_test.rb index bc40a662..087750d6 100644 --- a/test/increase/resources/beneficial_owners_test.rb +++ b/test/increase/resources/beneficial_owners_test.rb @@ -25,6 +25,7 @@ def test_create_required_params id: String, company_title: String | nil, created_at: Time, + entity_id: String, idempotency_key: String | nil, individual: Increase::EntityBeneficialOwner::Individual, prongs: ^(Increase::Internal::Type::ArrayOf[enum: Increase::EntityBeneficialOwner::Prong]), @@ -46,6 +47,7 @@ def test_retrieve id: String, company_title: String | nil, created_at: Time, + entity_id: String, idempotency_key: String | nil, individual: Increase::EntityBeneficialOwner::Individual, prongs: ^(Increase::Internal::Type::ArrayOf[enum: Increase::EntityBeneficialOwner::Prong]), @@ -67,6 +69,7 @@ def test_update id: String, company_title: String | nil, created_at: Time, + entity_id: String, idempotency_key: String | nil, individual: Increase::EntityBeneficialOwner::Individual, prongs: ^(Increase::Internal::Type::ArrayOf[enum: Increase::EntityBeneficialOwner::Prong]), @@ -94,6 +97,7 @@ def test_list_required_params id: String, company_title: String | nil, created_at: Time, + entity_id: String, idempotency_key: String | nil, individual: Increase::EntityBeneficialOwner::Individual, prongs: ^(Increase::Internal::Type::ArrayOf[enum: Increase::EntityBeneficialOwner::Prong]), @@ -115,6 +119,7 @@ def test_archive id: String, company_title: String | nil, created_at: Time, + entity_id: String, idempotency_key: String | nil, individual: Increase::EntityBeneficialOwner::Individual, prongs: ^(Increase::Internal::Type::ArrayOf[enum: Increase::EntityBeneficialOwner::Prong]), diff --git a/test/increase/resources/card_push_transfers_test.rb b/test/increase/resources/card_push_transfers_test.rb index 0b49f77e..b3a1eca6 100644 --- a/test/increase/resources/card_push_transfers_test.rb +++ b/test/increase/resources/card_push_transfers_test.rb @@ -36,6 +36,7 @@ def test_create_required_params approval: Increase::CardPushTransfer::Approval | nil, business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier, cancellation: Increase::CardPushTransfer::Cancellation | nil, + card_token_id: String, created_at: Time, created_by: Increase::CardPushTransfer::CreatedBy | nil, decline: Increase::CardPushTransfer::Decline | nil, @@ -76,6 +77,7 @@ def test_retrieve approval: Increase::CardPushTransfer::Approval | nil, business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier, cancellation: Increase::CardPushTransfer::Cancellation | nil, + card_token_id: String, created_at: Time, created_by: Increase::CardPushTransfer::CreatedBy | nil, decline: Increase::CardPushTransfer::Decline | nil, @@ -123,6 +125,7 @@ def test_list approval: Increase::CardPushTransfer::Approval | nil, business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier, cancellation: Increase::CardPushTransfer::Cancellation | nil, + card_token_id: String, created_at: Time, created_by: Increase::CardPushTransfer::CreatedBy | nil, decline: Increase::CardPushTransfer::Decline | nil, @@ -163,6 +166,7 @@ def test_approve approval: Increase::CardPushTransfer::Approval | nil, business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier, cancellation: Increase::CardPushTransfer::Cancellation | nil, + card_token_id: String, created_at: Time, created_by: Increase::CardPushTransfer::CreatedBy | nil, decline: Increase::CardPushTransfer::Decline | nil, @@ -203,6 +207,7 @@ def test_cancel approval: Increase::CardPushTransfer::Approval | nil, business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier, cancellation: Increase::CardPushTransfer::Cancellation | nil, + card_token_id: String, created_at: Time, created_by: Increase::CardPushTransfer::CreatedBy | nil, decline: Increase::CardPushTransfer::Decline | nil, diff --git a/test/increase/resources/entities_test.rb b/test/increase/resources/entities_test.rb index 04757bc0..527db9c1 100644 --- a/test/increase/resources/entities_test.rb +++ b/test/increase/resources/entities_test.rb @@ -159,46 +159,4 @@ def test_archive } end end - - def test_create_beneficial_owner_required_params - response = - @increase.entities.create_beneficial_owner( - "entity_n8y8tnk2p9339ti393yi", - beneficial_owner: { - individual: { - address: {city: "New York", country: "US", line1: "33 Liberty Street"}, - date_of_birth: "1970-01-31", - identification: {method: :social_security_number, number: "078051120"}, - name: "Ian Crease" - }, - prongs: [:control] - } - ) - - assert_pattern do - response => Increase::Entity - end - - assert_pattern do - response => { - id: String, - corporation: Increase::Entity::Corporation | nil, - created_at: Time, - description: String | nil, - details_confirmed_at: Time | nil, - government_authority: Increase::Entity::GovernmentAuthority | nil, - idempotency_key: String | nil, - joint: Increase::Entity::Joint | nil, - natural_person: Increase::Entity::NaturalPerson | nil, - risk_rating: Increase::Entity::RiskRating | nil, - status: Increase::Entity::Status, - structure: Increase::Entity::Structure, - supplemental_documents: ^(Increase::Internal::Type::ArrayOf[Increase::EntitySupplementalDocument]), - terms_agreements: ^(Increase::Internal::Type::ArrayOf[Increase::Entity::TermsAgreement]), - third_party_verification: Increase::Entity::ThirdPartyVerification | nil, - trust: Increase::Entity::Trust | nil, - type: Increase::Entity::Type - } - end - end end