diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40c047002..2a8507963 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: - 'integrated/**' - 'stl-preview-head/**' - 'stl-preview-base/**' + pull_request: + branches-ignore: + - 'stl-preview-head/**' + - 'stl-preview-base/**' jobs: lint: diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fea345409..2601677b9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.0.0" + ".": "1.1.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 9417f9412..54fbc742d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ec09866b27548ccd02de1307a9444b383128950ae3e9b6d7f9664a0681807603.yml -openapi_spec_hash: f420ad94cfcf2d7b9409d4a84734a497 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d85c059af2ebfb614d1027bf04c10ddcb6188920c7e8a29b040968cd962124b6.yml +openapi_spec_hash: 3a5546d73dd733025e0d6d9d673bca04 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/CHANGELOG.md b/CHANGELOG.md index 72f7fbba8..47fbe8df7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 1.1.0 (2025-06-23) + +Full Changelog: [v1.0.0...v1.1.0](https://github.com/Increase/increase-ruby/compare/v1.0.0...v1.1.0) + +### Features + +* **api:** api update ([0f5e84f](https://github.com/Increase/increase-ruby/commit/0f5e84f8b0592dd7aceb782205d6001b88899729)) +* **api:** api update ([0bca37e](https://github.com/Increase/increase-ruby/commit/0bca37e04d7c3d25db73ac6d04b83bafc0871981)) +* **api:** api update ([af7da72](https://github.com/Increase/increase-ruby/commit/af7da7244c3be50d3324c81b45250de8dece0d66)) +* **api:** api update ([da619e1](https://github.com/Increase/increase-ruby/commit/da619e1bbda845ebdb6e947b31aa2f42680427b4)) +* **api:** api update ([448a80e](https://github.com/Increase/increase-ruby/commit/448a80e2f8d328b75f6d2f7e853b6ca3deca0a18)) +* **api:** api update ([fb4e2d4](https://github.com/Increase/increase-ruby/commit/fb4e2d4946295fa4d5d027ad82a06ee11f9002c5)) +* **api:** api update ([a1e1715](https://github.com/Increase/increase-ruby/commit/a1e17156bdd69cae745635ca7b6aa2aa290c5e54)) +* **api:** api update ([305a386](https://github.com/Increase/increase-ruby/commit/305a38617d22becf2b86bcae6beec3e95e5ca069)) + + +### Bug Fixes + +* issue where we cannot mutate arrays on base model derivatives ([52fb1fb](https://github.com/Increase/increase-ruby/commit/52fb1fbfae48eeb4431d5ed57969b9a4a24efe6d)) + + +### Chores + +* **ci:** enable for pull requests ([7002a0a](https://github.com/Increase/increase-ruby/commit/7002a0a60f51908f98e39f4daae7cb7af99fe98e)) + ## 1.0.0 (2025-06-16) Full Changelog: [v0.1.0-alpha.34...v1.0.0](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.34...v1.0.0) diff --git a/Gemfile.lock b/Gemfile.lock index 2cba50bee..5f0aab5d8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.0.0) + increase (1.1.0) connection_pool GEM diff --git a/README.md b/README.md index 31a4ccf87..7847ba5a6 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.0.0" +gem "increase", "~> 1.1.0" ``` diff --git a/lib/increase/errors.rb b/lib/increase/errors.rb index 8e865ff88..ae9d305c8 100644 --- a/lib/increase/errors.rb +++ b/lib/increase/errors.rb @@ -9,6 +9,28 @@ class Error < StandardError end class ConversionError < Increase::Errors::Error + # @return [StandardError, nil] + def cause = @cause.nil? ? super : @cause + + # @api private + # + # @param on [Class] + # @param method [Symbol] + # @param target [Object] + # @param value [Object] + # @param cause [StandardError, nil] + def initialize(on:, method:, target:, value:, cause: nil) + cls = on.name.split("::").last + + message = [ + "Failed to parse #{cls}.#{method} from #{value.class} to #{target.inspect}.", + "To get the unparsed API response, use #{cls}[#{method.inspect}].", + cause && "Cause: #{cause.message}" + ].filter(&:itself).join(" ") + + @cause = cause + super(message) + end end class APIError < Increase::Errors::Error diff --git a/lib/increase/internal/type/array_of.rb b/lib/increase/internal/type/array_of.rb index bce161c0f..0e73dee91 100644 --- a/lib/increase/internal/type/array_of.rb +++ b/lib/increase/internal/type/array_of.rb @@ -62,10 +62,14 @@ def hash = [self.class, item_type].hash # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Array, Object] @@ -74,6 +78,7 @@ def coerce(value, state:) unless value.is_a?(Array) exactness[:no] += 1 + state[:error] = TypeError.new("#{value.class} can't be coerced into #{Array}") return value end diff --git a/lib/increase/internal/type/base_model.rb b/lib/increase/internal/type/base_model.rb index 3fba8838c..b44e0fb8b 100644 --- a/lib/increase/internal/type/base_model.rb +++ b/lib/increase/internal/type/base_model.rb @@ -60,7 +60,7 @@ def fields [Increase::Internal::Type::Converter.type_info(type_info), type_info] end - setter = "#{name_sym}=" + setter = :"#{name_sym}=" api_name = info.fetch(:api_name, name_sym) nilable = info.fetch(:nil?, false) const = if required && !nilable @@ -84,30 +84,61 @@ def fields type_fn: type_fn } - define_method(setter) { @data.store(name_sym, _1) } + define_method(setter) do |value| + target = type_fn.call + state = Increase::Internal::Type::Converter.new_coerce_state(translate_names: false) + coerced = Increase::Internal::Type::Converter.coerce(target, value, state: state) + status = @coerced.store(name_sym, state.fetch(:error) || true) + stored = + case [target, status] + in [Increase::Internal::Type::Converter | Symbol, true] + coerced + else + value + end + @data.store(name_sym, stored) + end + # rubocop:disable Style/CaseEquality + # rubocop:disable Metrics/BlockLength define_method(name_sym) do target = type_fn.call - value = @data.fetch(name_sym) { const == Increase::Internal::OMIT ? nil : const } - state = {strictness: :strong, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} - if (nilable || !required) && value.nil? - nil - else - Increase::Internal::Type::Converter.coerce( - target, - value, - state: state + + case @coerced[name_sym] + in true | false if Increase::Internal::Type::Converter === target + @data.fetch(name_sym) + in ::StandardError => e + raise Increase::Errors::ConversionError.new( + on: self.class, + method: __method__, + target: target, + value: @data.fetch(name_sym), + cause: e ) + else + Kernel.then do + value = @data.fetch(name_sym) { const == Increase::Internal::OMIT ? nil : const } + state = Increase::Internal::Type::Converter.new_coerce_state(translate_names: false) + if (nilable || !required) && value.nil? + nil + else + Increase::Internal::Type::Converter.coerce( + target, value, state: state + ) + end + rescue StandardError => e + raise Increase::Errors::ConversionError.new( + on: self.class, + method: __method__, + target: target, + value: value, + cause: e + ) + end end - rescue StandardError => e - cls = self.class.name.split("::").last - message = [ - "Failed to parse #{cls}.#{__method__} from #{value.class} to #{target.inspect}.", - "To get the unparsed API response, use #{cls}[#{__method__.inspect}].", - "Cause: #{e.message}" - ].join(" ") - raise Increase::Errors::ConversionError.new(message) end + # rubocop:enable Metrics/BlockLength + # rubocop:enable Style/CaseEquality end # @api private @@ -207,23 +238,28 @@ class << self # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [self, Object] def coerce(value, state:) exactness = state.fetch(:exactness) - if value.is_a?(self.class) + if value.is_a?(self) exactness[:yes] += 1 return value end unless (val = Increase::Internal::Util.coerce_hash(value)).is_a?(Hash) exactness[:no] += 1 + state[:error] = TypeError.new("#{value.class} can't be coerced into #{Hash}") return value end exactness[:yes] += 1 @@ -231,13 +267,15 @@ def coerce(value, state:) keys = val.keys.to_set instance = new data = instance.to_h + status = instance.instance_variable_get(:@coerced) # rubocop:disable Metrics/BlockLength fields.each do |name, field| mode, required, target = field.fetch_values(:mode, :required, :type) api_name, nilable, const = field.fetch_values(:api_name, :nilable, :const) + src_name = state.fetch(:translate_names) ? api_name : name - unless val.key?(api_name) + unless val.key?(src_name) if required && mode != :dump && const == Increase::Internal::OMIT exactness[nilable ? :maybe : :no] += 1 else @@ -246,9 +284,10 @@ def coerce(value, state:) next end - item = val.fetch(api_name) - keys.delete(api_name) + item = val.fetch(src_name) + keys.delete(src_name) + state[:error] = nil converted = if item.nil? && (nilable || !required) exactness[nilable ? :yes : :maybe] += 1 @@ -262,6 +301,8 @@ def coerce(value, state:) item end end + + status.store(name, state.fetch(:error) || true) data.store(name, converted) end # rubocop:enable Metrics/BlockLength @@ -437,7 +478,18 @@ def to_yaml(*a) = Increase::Internal::Type::Converter.dump(self.class, self).to_ # Create a new instance of a model. # # @param data [Hash{Symbol=>Object}, self] - def initialize(data = {}) = (@data = Increase::Internal::Util.coerce_hash!(data).to_h) + def initialize(data = {}) + @data = {} + @coerced = {} + Increase::Internal::Util.coerce_hash!(data).each do + if self.class.known_fields.key?(_1) + public_send(:"#{_1}=", _2) + else + @data.store(_1, _2) + @coerced.store(_1, false) + end + end + end class << self # @api private diff --git a/lib/increase/internal/type/boolean.rb b/lib/increase/internal/type/boolean.rb index 9a2439226..a40a261f1 100644 --- a/lib/increase/internal/type/boolean.rb +++ b/lib/increase/internal/type/boolean.rb @@ -31,14 +31,20 @@ def self.==(other) = other.is_a?(Class) && other <= Increase::Internal::Type::Bo class << self # @api private # + # Coerce value to Boolean if possible, otherwise return the original value. + # # @param value [Boolean, Object] # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Boolean, Object] diff --git a/lib/increase/internal/type/converter.rb b/lib/increase/internal/type/converter.rb index 7dd0e4873..ab52c3c11 100644 --- a/lib/increase/internal/type/converter.rb +++ b/lib/increase/internal/type/converter.rb @@ -15,10 +15,14 @@ module Converter # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Object] @@ -94,6 +98,21 @@ def type_info(spec) end end + # @api private + # + # @param translate_names [Boolean] + # + # @return [Hash{Symbol=>Object}] + def new_coerce_state(translate_names: true) + { + translate_names: translate_names, + strictness: true, + exactness: {yes: 0, no: 0, maybe: 0}, + error: nil, + branched: 0 + } + end + # @api private # # Based on `target`, transform `value` into `target`, to the extent possible: @@ -110,14 +129,11 @@ def type_info(spec) # # @param value [Object] # - # @param state [Hash{Symbol=>Object}] The `strictness` is one of `true`, `false`, or `:strong`. This informs the - # coercion strategy when we have to decide between multiple possible conversion - # targets: + # @param state [Hash{Symbol=>Object}] The `strictness` is one of `true`, `false`. This informs the coercion strategy + # when we have to decide between multiple possible conversion targets: # # - `true`: the conversion must be exact, with minimum coercion. # - `false`: the conversion can be approximate, with some coercion. - # - `:strong`: the conversion must be exact, with no coercion, and raise an error - # if not possible. # # The `exactness` is `Hash` with keys being one of `yes`, `no`, or `maybe`. For # any given conversion attempt, the exactness will be updated based on how closely @@ -130,21 +146,20 @@ def type_info(spec) # # See implementation below for more details. # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Object] - def coerce( - target, - value, - state: {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} - ) - # rubocop:disable Lint/SuppressedException + def coerce(target, value, state: Increase::Internal::Type::Converter.new_coerce_state) # rubocop:disable Metrics/BlockNesting - strictness, exactness = state.fetch_values(:strictness, :exactness) + exactness = state.fetch(:exactness) case target in Increase::Internal::Type::Converter @@ -160,29 +175,26 @@ def coerce( exactness[value.nil? ? :yes : :maybe] += 1 return nil in -> { _1 <= Integer } - if value.is_a?(Integer) + case value + in Integer exactness[:yes] += 1 return value - elsif strictness == :strong && Integer(value, exception: false) != value - message = "no implicit conversion of #{value.class} into #{target.inspect}" - raise value.is_a?(Numeric) ? ArgumentError.new(message) : TypeError.new(message) else Kernel.then do return Integer(value).tap { exactness[:maybe] += 1 } - rescue ArgumentError, TypeError + rescue ArgumentError, TypeError => e + state[:error] = e end end in -> { _1 <= Float } if value.is_a?(Numeric) exactness[:yes] += 1 return Float(value) - elsif strictness == :strong - message = "no implicit conversion of #{value.class} into #{target.inspect}" - raise TypeError.new(message) else Kernel.then do return Float(value).tap { exactness[:maybe] += 1 } - rescue ArgumentError, TypeError + rescue ArgumentError, TypeError => e + state[:error] = e end end in -> { _1 <= String } @@ -194,16 +206,13 @@ def coerce( exactness[:yes] += 1 return value.string else - if strictness == :strong - message = "no implicit conversion of #{value.class} into #{target.inspect}" - raise TypeError.new(message) - end + state[:error] = TypeError.new("#{value.class} can't be coerced into #{String}") end in -> { _1 <= Date || _1 <= Time } Kernel.then do return target.parse(value).tap { exactness[:yes] += 1 } rescue ArgumentError, TypeError => e - raise e if strictness == :strong + state[:error] = e end in -> { _1 <= StringIO } if value.is_a?(String) exactness[:yes] += 1 @@ -221,10 +230,8 @@ def coerce( return value end else - if strictness == :strong - message = "cannot convert non-matching #{value.class} into #{target.inspect}" - raise ArgumentError.new(message) - end + message = "cannot convert non-matching #{value.class} into #{target.inspect}" + state[:error] = ArgumentError.new(message) end else end @@ -232,7 +239,6 @@ def coerce( exactness[:no] += 1 value # rubocop:enable Metrics/BlockNesting - # rubocop:enable Lint/SuppressedException end # @api private @@ -277,8 +283,10 @@ def inspect(target, depth:) define_sorbet_constant!(:CoerceState) do T.type_alias do { - strictness: T.any(T::Boolean, Symbol), + translate_names: T::Boolean, + strictness: T::Boolean, exactness: {yes: Integer, no: Integer, maybe: Integer}, + error: T::Class[StandardError], branched: Integer } end diff --git a/lib/increase/internal/type/enum.rb b/lib/increase/internal/type/enum.rb index 073351bd6..6a7730ed0 100644 --- a/lib/increase/internal/type/enum.rb +++ b/lib/increase/internal/type/enum.rb @@ -56,10 +56,14 @@ def hash = values.to_set.hash # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Symbol, Object] @@ -70,8 +74,12 @@ def coerce(value, state:) if values.include?(val) exactness[:yes] += 1 val + elsif values.first&.class == val.class + exactness[:maybe] += 1 + value else - exactness[values.first&.class == val.class ? :maybe : :no] += 1 + exactness[:no] += 1 + state[:error] = TypeError.new("#{value.class} can't be coerced into #{self}") value end end diff --git a/lib/increase/internal/type/file_input.rb b/lib/increase/internal/type/file_input.rb index 2096c1485..8ddde69d1 100644 --- a/lib/increase/internal/type/file_input.rb +++ b/lib/increase/internal/type/file_input.rb @@ -45,10 +45,14 @@ class << self # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [StringIO, Object] @@ -62,6 +66,7 @@ def coerce(value, state:) exactness[:yes] += 1 value else + state[:error] = TypeError.new("#{value.class} can't be coerced into #{StringIO}") exactness[:no] += 1 value end diff --git a/lib/increase/internal/type/hash_of.rb b/lib/increase/internal/type/hash_of.rb index b1b5d4f53..e44cca977 100644 --- a/lib/increase/internal/type/hash_of.rb +++ b/lib/increase/internal/type/hash_of.rb @@ -77,10 +77,14 @@ def hash = [self.class, item_type].hash # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Hash{Symbol=>Object}, Object] @@ -89,6 +93,7 @@ def coerce(value, state:) unless value.is_a?(Hash) exactness[:no] += 1 + state[:error] = TypeError.new("#{value.class} can't be coerced into #{Hash}") return value end diff --git a/lib/increase/internal/type/union.rb b/lib/increase/internal/type/union.rb index 27475fecf..1c23bae58 100644 --- a/lib/increase/internal/type/union.rb +++ b/lib/increase/internal/type/union.rb @@ -115,14 +115,23 @@ def hash = variants.hash # @api private # + # Tries to efficiently coerce the given value to one of the known variants. + # + # If the value cannot match any of the known variants, the coercion is considered + # non-viable and returns the original value. + # # @param value [Object] # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Object] @@ -133,7 +142,6 @@ def coerce(value, state:) strictness = state.fetch(:strictness) exactness = state.fetch(:exactness) - state[:strictness] = strictness == :strong ? true : strictness alternatives = [] known_variants.each do |_, variant_fn| @@ -152,13 +160,10 @@ def coerce(value, state:) end end - case alternatives.sort_by(&:first) + case alternatives.sort_by!(&:first) in [] exactness[:no] += 1 - if strictness == :strong - message = "no possible conversion of #{value.class} into a variant of #{target.inspect}" - raise ArgumentError.new(message) - end + state[:error] = ArgumentError.new("no matching variant for #{value.inspect}") value in [[_, exact, coerced], *] exact.each { exactness[_1] += _2 } diff --git a/lib/increase/internal/type/unknown.rb b/lib/increase/internal/type/unknown.rb index a07536ef7..dec58ead0 100644 --- a/lib/increase/internal/type/unknown.rb +++ b/lib/increase/internal/type/unknown.rb @@ -33,14 +33,20 @@ def self.==(other) = other.is_a?(Class) && other <= Increase::Internal::Type::Un class << self # @api private # + # No coercion needed for Unknown type. + # # @param value [Object] # # @param state [Hash{Symbol=>Object}] . # - # @option state [Boolean, :strong] :strictness + # @option state [Boolean] :translate_names + # + # @option state [Boolean] :strictness # # @option state [Hash{Symbol=>Object}] :exactness # + # @option state [Class] :error + # # @option state [Integer] :branched # # @return [Object] diff --git a/lib/increase/models/card_payment.rb b/lib/increase/models/card_payment.rb index 40932e0d4..0c9fae349 100644 --- a/lib/increase/models/card_payment.rb +++ b/lib/increase/models/card_payment.rb @@ -171,10 +171,10 @@ class Element < Increase::Internal::Type::BaseModel required :card_settlement, -> { Increase::CardPayment::Element::CardSettlement }, nil?: true # @!attribute card_validation - # A Card Validation object. This field will be present in the JSON response if and - # only if `category` is equal to `card_validation`. Card Validations are requests - # from a merchant to verify that a card number and optionally its address and/or - # Card Verification Value are valid. + # An Inbound Card Validation object. This field will be present in the JSON + # response if and only if `category` is equal to `card_validation`. Inbound Card + # Validations are requests from a merchant to verify that a card number and + # optionally its address and/or Card Verification Value are valid. # # @return [Increase::Models::CardPayment::Element::CardValidation, nil] required :card_validation, -> { Increase::CardPayment::Element::CardValidation }, nil?: true @@ -222,7 +222,7 @@ class Element < Increase::Internal::Type::BaseModel # # @param card_settlement [Increase::Models::CardPayment::Element::CardSettlement, nil] A Card Settlement object. This field will be present in the JSON response if and # - # @param card_validation [Increase::Models::CardPayment::Element::CardValidation, nil] A Card Validation object. This field will be present in the JSON response if and + # @param card_validation [Increase::Models::CardPayment::Element::CardValidation, nil] An Inbound Card Validation object. This field will be present in the JSON respon # # @param category [Symbol, Increase::Models::CardPayment::Element::Category] The type of the resource. We may add additional possible values for this enum ov # @@ -5880,7 +5880,7 @@ class CardValidation < Increase::Internal::Type::BaseModel # @!attribute type # A constant representing the object's type. For this resource it will always be - # `card_validation`. + # `inbound_card_validation`. # # @return [Symbol, Increase::Models::CardPayment::Element::CardValidation::Type] required :type, enum: -> { Increase::CardPayment::Element::CardValidation::Type } @@ -5895,10 +5895,10 @@ class CardValidation < Increase::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {Increase::Models::CardPayment::Element::CardValidation} for more details. # - # A Card Validation object. This field will be present in the JSON response if and - # only if `category` is equal to `card_validation`. Card Validations are requests - # from a merchant to verify that a card number and optionally its address and/or - # Card Verification Value are valid. + # An Inbound Card Validation object. This field will be present in the JSON + # response if and only if `category` is equal to `card_validation`. Inbound Card + # Validations are requests from a merchant to verify that a card number and + # optionally its address and/or Card Verification Value are valid. # # @param id [String] The Card Validation identifier. # @@ -6232,13 +6232,13 @@ class NetworkIdentifiers < Increase::Internal::Type::BaseModel end # A constant representing the object's type. For this resource it will always be - # `card_validation`. + # `inbound_card_validation`. # # @see Increase::Models::CardPayment::Element::CardValidation#type module Type extend Increase::Internal::Type::Enum - CARD_VALIDATION = :card_validation + INBOUND_CARD_VALIDATION = :inbound_card_validation # @!method self.values # @return [Array] @@ -6408,7 +6408,7 @@ module Category # Card Authentication: details will be under the `card_authentication` object. CARD_AUTHENTICATION = :card_authentication - # Card Validation: details will be under the `card_validation` object. + # Inbound Card Validation: details will be under the `card_validation` object. CARD_VALIDATION = :card_validation # Card Decline: details will be under the `card_decline` object. diff --git a/lib/increase/models/check_transfer.rb b/lib/increase/models/check_transfer.rb index a9d1c38b9..c30795d1c 100644 --- a/lib/increase/models/check_transfer.rb +++ b/lib/increase/models/check_transfer.rb @@ -473,6 +473,16 @@ class PhysicalCheck < Increase::Internal::Type::BaseModel # @return [String, nil] required :note, String, nil?: true + # @!attribute payer + # The payer of the check. This will be printed on the top-left portion of the + # check and defaults to the return address if unspecified. + # + # @return [Array] + required :payer, + -> { + Increase::Internal::Type::ArrayOf[Increase::CheckTransfer::PhysicalCheck::Payer] + } + # @!attribute recipient_name # The name that will be printed on the check. # @@ -511,7 +521,7 @@ class PhysicalCheck < Increase::Internal::Type::BaseModel Increase::Internal::Type::ArrayOf[Increase::CheckTransfer::PhysicalCheck::TrackingUpdate] } - # @!method initialize(attachment_file_id:, mailing_address:, memo:, note:, recipient_name:, return_address:, shipping_method:, signature_text:, tracking_updates:) + # @!method initialize(attachment_file_id:, mailing_address:, memo:, note:, payer:, recipient_name:, return_address:, shipping_method:, signature_text:, tracking_updates:) # Some parameter documentations has been truncated, see # {Increase::Models::CheckTransfer::PhysicalCheck} for more details. # @@ -526,6 +536,8 @@ class PhysicalCheck < Increase::Internal::Type::BaseModel # # @param note [String, nil] The descriptor that will be printed on the letter included with the check. # + # @param payer [Array] The payer of the check. This will be printed on the top-left portion of the chec + # # @param recipient_name [String] The name that will be printed on the check. # # @param return_address [Increase::Models::CheckTransfer::PhysicalCheck::ReturnAddress, nil] The return address to be printed on the check. @@ -590,6 +602,17 @@ class MailingAddress < Increase::Internal::Type::BaseModel # @param state [String, nil] The state of the check's destination. end + class Payer < Increase::Internal::Type::BaseModel + # @!attribute contents + # The contents of the line. + # + # @return [String] + required :contents, String + + # @!method initialize(contents:) + # @param contents [String] The contents of the line. + end + # @see Increase::Models::CheckTransfer::PhysicalCheck#return_address class ReturnAddress < Increase::Internal::Type::BaseModel # @!attribute city diff --git a/lib/increase/models/check_transfer_create_params.rb b/lib/increase/models/check_transfer_create_params.rb index 4ceb49bdd..c0da8b7a6 100644 --- a/lib/increase/models/check_transfer_create_params.rb +++ b/lib/increase/models/check_transfer_create_params.rb @@ -131,6 +131,17 @@ class PhysicalCheck < Increase::Internal::Type::BaseModel # @return [String, nil] optional :note, String + # @!attribute payer + # The payer of the check. This will be printed on the top-left portion of the + # check and defaults to the return address if unspecified. This should be an array + # of up to 4 elements, each of which represents a line of the payer. + # + # @return [Array, nil] + optional :payer, + -> { + Increase::Internal::Type::ArrayOf[Increase::CheckTransferCreateParams::PhysicalCheck::Payer] + } + # @!attribute return_address # The return address to be printed on the check. If omitted this will default to # an Increase-owned address that will mark checks as delivery failed and shred @@ -156,7 +167,7 @@ class PhysicalCheck < Increase::Internal::Type::BaseModel # @return [String, nil] optional :signature_text, String - # @!method initialize(mailing_address:, memo:, recipient_name:, attachment_file_id: nil, note: nil, return_address: nil, shipping_method: nil, signature_text: nil) + # @!method initialize(mailing_address:, memo:, recipient_name:, attachment_file_id: nil, note: nil, payer: nil, return_address: nil, shipping_method: nil, signature_text: nil) # Some parameter documentations has been truncated, see # {Increase::Models::CheckTransferCreateParams::PhysicalCheck} for more details. # @@ -174,6 +185,8 @@ class PhysicalCheck < Increase::Internal::Type::BaseModel # # @param note [String] The descriptor that will be printed on the letter included with the check. # + # @param payer [Array] The payer of the check. This will be printed on the top-left portion of the chec + # # @param return_address [Increase::Models::CheckTransferCreateParams::PhysicalCheck::ReturnAddress] The return address to be printed on the check. If omitted this will default to a # # @param shipping_method [Symbol, Increase::Models::CheckTransferCreateParams::PhysicalCheck::ShippingMethod] How to ship the check. For details on pricing, timing, and restrictions, see htt @@ -226,6 +239,17 @@ class MailingAddress < Increase::Internal::Type::BaseModel # @param line2 [String] The second line of the address component of the check's destination address. end + class Payer < Increase::Internal::Type::BaseModel + # @!attribute contents + # The contents of the line. + # + # @return [String] + required :contents, String + + # @!method initialize(contents:) + # @param contents [String] The contents of the line. + end + # @see Increase::Models::CheckTransferCreateParams::PhysicalCheck#return_address class ReturnAddress < Increase::Internal::Type::BaseModel # @!attribute city @@ -304,7 +328,7 @@ class ThirdParty < Increase::Internal::Type::BaseModel # @!attribute recipient_name # The pay-to name you will print on the check. If provided, this is used for # [Positive Pay](/documentation/positive-pay). If this is omitted, Increase will - # be unable to validate the payee name when the check is deposited. + # be unable to validate the payer name when the check is deposited. # # @return [String, nil] optional :recipient_name, String diff --git a/lib/increase/models/event.rb b/lib/increase/models/event.rb index 818032db6..f7059ba97 100644 --- a/lib/increase/models/event.rb +++ b/lib/increase/models/event.rb @@ -262,18 +262,30 @@ module Category # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED = :"oauth_connection.deactivated" - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED = :"outbound_card_push_transfer.created" - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = :"outbound_card_push_transfer.updated" - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED = :"outbound_card_validation.created" - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED = :"outbound_card_validation.updated" + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED = :"card_push_transfer.created" + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED = :"card_push_transfer.updated" + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED = :"card_validation.created" + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED = :"card_validation.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = :"pending_transaction.created" @@ -327,6 +339,12 @@ module Category # Occurs whenever a Real-Time Payments Request for Payment is updated. REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED = :"real_time_payments_request_for_payment.updated" + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED = :"swift_transfer.created" + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED = :"swift_transfer.updated" + # Occurs whenever a Transaction is created. TRANSACTION_CREATED = :"transaction.created" diff --git a/lib/increase/models/event_list_params.rb b/lib/increase/models/event_list_params.rb index 25ffc547c..3549088f6 100644 --- a/lib/increase/models/event_list_params.rb +++ b/lib/increase/models/event_list_params.rb @@ -264,18 +264,30 @@ module In # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED = :"oauth_connection.deactivated" - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED = :"outbound_card_push_transfer.created" - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = :"outbound_card_push_transfer.updated" - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED = :"outbound_card_validation.created" - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED = :"outbound_card_validation.updated" + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED = :"card_push_transfer.created" + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED = :"card_push_transfer.updated" + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED = :"card_validation.created" + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED = :"card_validation.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = :"pending_transaction.created" @@ -329,6 +341,12 @@ module In # Occurs whenever a Real-Time Payments Request for Payment is updated. REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED = :"real_time_payments_request_for_payment.updated" + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED = :"swift_transfer.created" + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED = :"swift_transfer.updated" + # Occurs whenever a Transaction is created. TRANSACTION_CREATED = :"transaction.created" diff --git a/lib/increase/models/event_subscription.rb b/lib/increase/models/event_subscription.rb index 535da61d0..ed4d3b492 100644 --- a/lib/increase/models/event_subscription.rb +++ b/lib/increase/models/event_subscription.rb @@ -285,18 +285,30 @@ module SelectedEventCategory # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED = :"oauth_connection.deactivated" - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED = :"outbound_card_push_transfer.created" - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = :"outbound_card_push_transfer.updated" - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED = :"outbound_card_validation.created" - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED = :"outbound_card_validation.updated" + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED = :"card_push_transfer.created" + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED = :"card_push_transfer.updated" + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED = :"card_validation.created" + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED = :"card_validation.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = :"pending_transaction.created" @@ -350,6 +362,12 @@ module SelectedEventCategory # Occurs whenever a Real-Time Payments Request for Payment is updated. REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED = :"real_time_payments_request_for_payment.updated" + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED = :"swift_transfer.created" + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED = :"swift_transfer.updated" + # Occurs whenever a Transaction is created. TRANSACTION_CREATED = :"transaction.created" diff --git a/lib/increase/models/event_subscription_create_params.rb b/lib/increase/models/event_subscription_create_params.rb index a4ee56e85..232abd10c 100644 --- a/lib/increase/models/event_subscription_create_params.rb +++ b/lib/increase/models/event_subscription_create_params.rb @@ -246,18 +246,30 @@ module SelectedEventCategory # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED = :"oauth_connection.deactivated" - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED = :"outbound_card_push_transfer.created" - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = :"outbound_card_push_transfer.updated" - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED = :"outbound_card_validation.created" - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED = :"outbound_card_validation.updated" + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED = :"card_push_transfer.created" + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED = :"card_push_transfer.updated" + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED = :"card_validation.created" + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED = :"card_validation.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = :"pending_transaction.created" @@ -311,6 +323,12 @@ module SelectedEventCategory # Occurs whenever a Real-Time Payments Request for Payment is updated. REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED = :"real_time_payments_request_for_payment.updated" + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED = :"swift_transfer.created" + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED = :"swift_transfer.updated" + # Occurs whenever a Transaction is created. TRANSACTION_CREATED = :"transaction.created" diff --git a/lib/increase/models/inbound_ach_transfer.rb b/lib/increase/models/inbound_ach_transfer.rb index 1be0ed0c3..b962130b2 100644 --- a/lib/increase/models/inbound_ach_transfer.rb +++ b/lib/increase/models/inbound_ach_transfer.rb @@ -72,13 +72,6 @@ class InboundACHTransfer < Increase::Internal::Type::BaseModel # @return [Date] required :effective_date, Date - # @!attribute expected_settlement_schedule - # The settlement schedule the transfer is expected to follow. - # - # @return [Symbol, Increase::Models::InboundACHTransfer::ExpectedSettlementSchedule] - required :expected_settlement_schedule, - enum: -> { Increase::InboundACHTransfer::ExpectedSettlementSchedule } - # @!attribute international_addenda # If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will # contain fields pertaining to the International ACH Transaction. @@ -142,6 +135,13 @@ class InboundACHTransfer < Increase::Internal::Type::BaseModel # @return [String, nil] required :receiver_name, String, nil?: true + # @!attribute settlement + # A subhash containing information about when and how the transfer settled at the + # Federal Reserve. + # + # @return [Increase::Models::InboundACHTransfer::Settlement] + required :settlement, -> { Increase::InboundACHTransfer::Settlement } + # @!attribute standard_entry_class_code # The Standard Entry Class (SEC) code of the transfer. # @@ -176,7 +176,7 @@ class InboundACHTransfer < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::InboundACHTransfer::Type] required :type, enum: -> { Increase::InboundACHTransfer::Type } - # @!method initialize(id:, acceptance:, account_id:, account_number_id:, addenda:, amount:, automatically_resolves_at:, created_at:, decline:, direction:, effective_date:, expected_settlement_schedule:, international_addenda:, notification_of_change:, originator_company_descriptive_date:, originator_company_discretionary_data:, originator_company_entry_description:, originator_company_id:, originator_company_name:, originator_routing_number:, receiver_id_number:, receiver_name:, standard_entry_class_code:, status:, trace_number:, transfer_return:, type:) + # @!method initialize(id:, acceptance:, account_id:, account_number_id:, addenda:, amount:, automatically_resolves_at:, created_at:, decline:, direction:, effective_date:, international_addenda:, notification_of_change:, originator_company_descriptive_date:, originator_company_discretionary_data:, originator_company_entry_description:, originator_company_id:, originator_company_name:, originator_routing_number:, receiver_id_number:, receiver_name:, settlement:, standard_entry_class_code:, status:, trace_number:, transfer_return:, type:) # Some parameter documentations has been truncated, see # {Increase::Models::InboundACHTransfer} for more details. # @@ -205,8 +205,6 @@ class InboundACHTransfer < Increase::Internal::Type::BaseModel # # @param effective_date [Date] The effective date of the transfer. This is sent by the sending bank and is a fa # - # @param expected_settlement_schedule [Symbol, Increase::Models::InboundACHTransfer::ExpectedSettlementSchedule] The settlement schedule the transfer is expected to follow. - # # @param international_addenda [Increase::Models::InboundACHTransfer::InternationalAddenda, nil] If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will co # # @param notification_of_change [Increase::Models::InboundACHTransfer::NotificationOfChange, nil] If you initiate a notification of change in response to the transfer, this will @@ -227,6 +225,8 @@ class InboundACHTransfer < Increase::Internal::Type::BaseModel # # @param receiver_name [String, nil] The name of the receiver of the transfer. # + # @param settlement [Increase::Models::InboundACHTransfer::Settlement] A subhash containing information about when and how the transfer settled at the + # # @param standard_entry_class_code [Symbol, Increase::Models::InboundACHTransfer::StandardEntryClassCode] The Standard Entry Class (SEC) code of the transfer. # # @param status [Symbol, Increase::Models::InboundACHTransfer::Status] The status of the transfer. @@ -431,22 +431,6 @@ module Direction # @return [Array] end - # The settlement schedule the transfer is expected to follow. - # - # @see Increase::Models::InboundACHTransfer#expected_settlement_schedule - module ExpectedSettlementSchedule - extend Increase::Internal::Type::Enum - - # The transfer is expected to settle same-day. - SAME_DAY = :same_day - - # The transfer is expected to settle on a future date. - FUTURE_DATED = :future_dated - - # @!method self.values - # @return [Array] - end - # @see Increase::Models::InboundACHTransfer#international_addenda class InternationalAddenda < Increase::Internal::Type::BaseModel # @!attribute destination_country_code @@ -926,6 +910,52 @@ class NotificationOfChange < Increase::Internal::Type::BaseModel # @param updated_routing_number [String, nil] The new account number provided in the notification of change. end + # @see Increase::Models::InboundACHTransfer#settlement + class Settlement < Increase::Internal::Type::BaseModel + # @!attribute settled_at + # When the funds for this transfer settle at the recipient bank at the Federal + # Reserve. + # + # @return [Time] + required :settled_at, Time + + # @!attribute settlement_schedule + # The settlement schedule this transfer follows. + # + # @return [Symbol, Increase::Models::InboundACHTransfer::Settlement::SettlementSchedule] + required :settlement_schedule, + enum: -> { + Increase::InboundACHTransfer::Settlement::SettlementSchedule + } + + # @!method initialize(settled_at:, settlement_schedule:) + # Some parameter documentations has been truncated, see + # {Increase::Models::InboundACHTransfer::Settlement} for more details. + # + # A subhash containing information about when and how the transfer settled at the + # Federal Reserve. + # + # @param settled_at [Time] When the funds for this transfer settle at the recipient bank at the Federal Res + # + # @param settlement_schedule [Symbol, Increase::Models::InboundACHTransfer::Settlement::SettlementSchedule] The settlement schedule this transfer follows. + + # The settlement schedule this transfer follows. + # + # @see Increase::Models::InboundACHTransfer::Settlement#settlement_schedule + module SettlementSchedule + extend Increase::Internal::Type::Enum + + # The transfer is expected to settle same-day. + SAME_DAY = :same_day + + # The transfer is expected to settle on a future date. + FUTURE_DATED = :future_dated + + # @!method self.values + # @return [Array] + end + end + # The Standard Entry Class (SEC) code of the transfer. # # @see Increase::Models::InboundACHTransfer#standard_entry_class_code diff --git a/lib/increase/models/inbound_mail_item.rb b/lib/increase/models/inbound_mail_item.rb index 310c3ef1e..4e74aecae 100644 --- a/lib/increase/models/inbound_mail_item.rb +++ b/lib/increase/models/inbound_mail_item.rb @@ -10,6 +10,12 @@ class InboundMailItem < Increase::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute checks + # The checks in the mail item. + # + # @return [Array] + required :checks, -> { Increase::Internal::Type::ArrayOf[Increase::InboundMailItem::Check] } + # @!attribute created_at # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Inbound # Mail Item was created. @@ -55,7 +61,7 @@ class InboundMailItem < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::InboundMailItem::Type] required :type, enum: -> { Increase::InboundMailItem::Type } - # @!method initialize(id:, created_at:, file_id:, lockbox_id:, recipient_name:, rejection_reason:, status:, type:) + # @!method initialize(id:, checks:, created_at:, file_id:, lockbox_id:, recipient_name:, rejection_reason:, status:, type:) # Some parameter documentations has been truncated, see # {Increase::Models::InboundMailItem} for more details. # @@ -63,6 +69,8 @@ class InboundMailItem < Increase::Internal::Type::BaseModel # # @param id [String] The Inbound Mail Item identifier. # + # @param checks [Array] The checks in the mail item. + # # @param created_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Inbound # # @param file_id [String] The identifier for the File containing the scanned contents of the mail item. @@ -77,6 +85,35 @@ class InboundMailItem < Increase::Internal::Type::BaseModel # # @param type [Symbol, Increase::Models::InboundMailItem::Type] A constant representing the object's type. For this resource it will always be ` + class Check < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount of the check. + # + # @return [Integer] + required :amount, Integer + + # @!attribute back_file_id + # The identifier for the File containing the back of the check. + # + # @return [String, nil] + required :back_file_id, String, nil?: true + + # @!attribute front_file_id + # The identifier for the File containing the front of the check. + # + # @return [String, nil] + required :front_file_id, String, nil?: true + + # @!method initialize(amount:, back_file_id:, front_file_id:) + # Inbound Mail Item Checks represent the checks in an Inbound Mail Item. + # + # @param amount [Integer] The amount of the check. + # + # @param back_file_id [String, nil] The identifier for the File containing the back of the check. + # + # @param front_file_id [String, nil] The identifier for the File containing the front of the check. + end + # If the mail item has been rejected, why it was rejected. # # @see Increase::Models::InboundMailItem#rejection_reason diff --git a/lib/increase/models/pending_transaction.rb b/lib/increase/models/pending_transaction.rb index f362130d3..4c4d1b58c 100644 --- a/lib/increase/models/pending_transaction.rb +++ b/lib/increase/models/pending_transaction.rb @@ -227,6 +227,15 @@ class Source < Increase::Internal::Type::BaseModel }, nil?: true + # @!attribute card_push_transfer_instruction + # A Card Push Transfer Instruction object. This field will be present in the JSON + # response if and only if `category` is equal to `card_push_transfer_instruction`. + # + # @return [Increase::Models::PendingTransaction::Source::CardPushTransferInstruction, nil] + required :card_push_transfer_instruction, + -> { Increase::PendingTransaction::Source::CardPushTransferInstruction }, + nil?: true + # @!attribute category # The type of the resource. We may add additional possible values for this enum # over time; your application should be able to handle such additions gracefully. @@ -283,16 +292,6 @@ class Source < Increase::Internal::Type::BaseModel # @return [Object, nil] required :other, Increase::Internal::Type::Unknown, nil?: true - # @!attribute outbound_card_push_transfer_instruction - # An Outbound Card Push Transfer Instruction object. This field will be present in - # the JSON response if and only if `category` is equal to - # `outbound_card_push_transfer_instruction`. - # - # @return [Increase::Models::PendingTransaction::Source::OutboundCardPushTransferInstruction, nil] - required :outbound_card_push_transfer_instruction, - -> { Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction }, - nil?: true - # @!attribute real_time_payments_transfer_instruction # A Real-Time Payments Transfer Instruction object. This field will be present in # the JSON response if and only if `category` is equal to @@ -329,7 +328,7 @@ class Source < Increase::Internal::Type::BaseModel -> { Increase::PendingTransaction::Source::WireTransferInstruction }, nil?: true - # @!method initialize(account_transfer_instruction:, ach_transfer_instruction:, card_authorization:, category:, check_deposit_instruction:, check_transfer_instruction:, inbound_funds_hold:, inbound_wire_transfer_reversal:, other:, outbound_card_push_transfer_instruction:, real_time_payments_transfer_instruction:, swift_transfer_instruction:, user_initiated_hold:, wire_transfer_instruction:) + # @!method initialize(account_transfer_instruction:, ach_transfer_instruction:, card_authorization:, card_push_transfer_instruction:, category:, check_deposit_instruction:, check_transfer_instruction:, inbound_funds_hold:, inbound_wire_transfer_reversal:, other:, real_time_payments_transfer_instruction:, swift_transfer_instruction:, user_initiated_hold:, wire_transfer_instruction:) # Some parameter documentations has been truncated, see # {Increase::Models::PendingTransaction::Source} for more details. # @@ -343,6 +342,8 @@ class Source < Increase::Internal::Type::BaseModel # # @param card_authorization [Increase::Models::PendingTransaction::Source::CardAuthorization, nil] A Card Authorization object. This field will be present in the JSON response if # + # @param card_push_transfer_instruction [Increase::Models::PendingTransaction::Source::CardPushTransferInstruction, nil] A Card Push Transfer Instruction object. This field will be present in the JSON + # # @param category [Symbol, Increase::Models::PendingTransaction::Source::Category] The type of the resource. We may add additional possible values for this enum ov # # @param check_deposit_instruction [Increase::Models::PendingTransaction::Source::CheckDepositInstruction, nil] A Check Deposit Instruction object. This field will be present in the JSON respo @@ -355,8 +356,6 @@ class Source < Increase::Internal::Type::BaseModel # # @param other [Object, nil] If the category of this Transaction source is equal to `other`, this field will # - # @param outbound_card_push_transfer_instruction [Increase::Models::PendingTransaction::Source::OutboundCardPushTransferInstruction, nil] An Outbound Card Push Transfer Instruction object. This field will be present in - # # @param real_time_payments_transfer_instruction [Increase::Models::PendingTransaction::Source::RealTimePaymentsTransferInstruction, nil] A Real-Time Payments Transfer Instruction object. This field will be present in # # @param swift_transfer_instruction [Increase::Models::PendingTransaction::Source::SwiftTransferInstruction, nil] A Swift Transfer Instruction object. This field will be present in the JSON resp @@ -1210,6 +1209,29 @@ module Result end end + # @see Increase::Models::PendingTransaction::Source#card_push_transfer_instruction + class CardPushTransferInstruction < Increase::Internal::Type::BaseModel + # @!attribute amount + # The transfer amount in USD cents. + # + # @return [Integer] + required :amount, Integer + + # @!attribute transfer_id + # The identifier of the Card Push Transfer that led to this Pending Transaction. + # + # @return [String] + required :transfer_id, String + + # @!method initialize(amount:, transfer_id:) + # A Card Push Transfer Instruction object. This field will be present in the JSON + # response if and only if `category` is equal to `card_push_transfer_instruction`. + # + # @param amount [Integer] The transfer amount in USD cents. + # + # @param transfer_id [String] The identifier of the Card Push Transfer that led to this Pending Transaction. + end + # The type of the resource. We may add additional possible values for this enum # over time; your application should be able to handle such additions gracefully. # @@ -1250,8 +1272,8 @@ module Category # Swift Transfer Instruction: details will be under the `swift_transfer_instruction` object. SWIFT_TRANSFER_INSTRUCTION = :swift_transfer_instruction - # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. - OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION = :outbound_card_push_transfer_instruction + # Card Push Transfer Instruction: details will be under the `card_push_transfer_instruction` object. + CARD_PUSH_TRANSFER_INSTRUCTION = :card_push_transfer_instruction # The Pending Transaction was made for an undocumented or deprecated reason. OTHER = :other @@ -1587,35 +1609,6 @@ class InboundWireTransferReversal < Increase::Internal::Type::BaseModel # @param inbound_wire_transfer_id [String] The ID of the Inbound Wire Transfer that is being reversed. end - # @see Increase::Models::PendingTransaction::Source#outbound_card_push_transfer_instruction - class OutboundCardPushTransferInstruction < Increase::Internal::Type::BaseModel - # @!attribute amount - # The transfer amount in USD cents. - # - # @return [Integer] - required :amount, Integer - - # @!attribute transfer_id - # The identifier of the Outbound Card Push Transfer that led to this Pending - # Transaction. - # - # @return [String] - required :transfer_id, String - - # @!method initialize(amount:, transfer_id:) - # Some parameter documentations has been truncated, see - # {Increase::Models::PendingTransaction::Source::OutboundCardPushTransferInstruction} - # for more details. - # - # An Outbound Card Push Transfer Instruction object. This field will be present in - # the JSON response if and only if `category` is equal to - # `outbound_card_push_transfer_instruction`. - # - # @param amount [Integer] The transfer amount in USD cents. - # - # @param transfer_id [String] The identifier of the Outbound Card Push Transfer that led to this Pending Trans - end - # @see Increase::Models::PendingTransaction::Source#real_time_payments_transfer_instruction class RealTimePaymentsTransferInstruction < Increase::Internal::Type::BaseModel # @!attribute amount diff --git a/lib/increase/models/pending_transaction_list_params.rb b/lib/increase/models/pending_transaction_list_params.rb index 938ea3d08..6771d3030 100644 --- a/lib/increase/models/pending_transaction_list_params.rb +++ b/lib/increase/models/pending_transaction_list_params.rb @@ -121,8 +121,8 @@ module In # Swift Transfer Instruction: details will be under the `swift_transfer_instruction` object. SWIFT_TRANSFER_INSTRUCTION = :swift_transfer_instruction - # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. - OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION = :outbound_card_push_transfer_instruction + # Card Push Transfer Instruction: details will be under the `card_push_transfer_instruction` object. + CARD_PUSH_TRANSFER_INSTRUCTION = :card_push_transfer_instruction # The Pending Transaction was made for an undocumented or deprecated reason. OTHER = :other diff --git a/lib/increase/models/transaction.rb b/lib/increase/models/transaction.rb index 182bc9916..a8e5529c1 100644 --- a/lib/increase/models/transaction.rb +++ b/lib/increase/models/transaction.rb @@ -221,6 +221,17 @@ class Source < Increase::Internal::Type::BaseModel # @return [Increase::Models::Transaction::Source::CardDisputeLoss, nil] required :card_dispute_loss, -> { Increase::Transaction::Source::CardDisputeLoss }, nil?: true + # @!attribute card_push_transfer_acceptance + # A Card Push Transfer Acceptance object. This field will be present in the JSON + # response if and only if `category` is equal to `card_push_transfer_acceptance`. + # A Card Push Transfer Acceptance is created when an Outbound Card Push Transfer + # sent from Increase is accepted by the receiving bank. + # + # @return [Increase::Models::Transaction::Source::CardPushTransferAcceptance, nil] + required :card_push_transfer_acceptance, + -> { Increase::Transaction::Source::CardPushTransferAcceptance }, + nil?: true + # @!attribute card_refund # A Card Refund object. This field will be present in the JSON response if and # only if `category` is equal to `card_refund`. Card Refunds move money back to @@ -430,18 +441,6 @@ class Source < Increase::Internal::Type::BaseModel # @return [Object, nil] required :other, Increase::Internal::Type::Unknown, nil?: true - # @!attribute outbound_card_push_transfer_acceptance - # An Outbound Card Push Transfer Acceptance object. This field will be present in - # the JSON response if and only if `category` is equal to - # `outbound_card_push_transfer_acceptance`. An Outbound Card Push Transfer - # Acceptance is created when an Outbound Card Push Transfer sent from Increase is - # accepted by the receiving bank. - # - # @return [Increase::Models::Transaction::Source::OutboundCardPushTransferAcceptance, nil] - required :outbound_card_push_transfer_acceptance, - -> { Increase::Transaction::Source::OutboundCardPushTransferAcceptance }, - nil?: true - # @!attribute real_time_payments_transfer_acknowledgement # A Real-Time Payments Transfer Acknowledgement object. This field will be present # in the JSON response if and only if `category` is equal to @@ -484,7 +483,7 @@ class Source < Increase::Internal::Type::BaseModel }, nil?: true - # @!method initialize(account_transfer_intention:, ach_transfer_intention:, ach_transfer_rejection:, ach_transfer_return:, card_dispute_acceptance:, card_dispute_loss:, card_refund:, card_revenue_payment:, card_settlement:, cashback_payment:, category:, check_deposit_acceptance:, check_deposit_return:, check_transfer_deposit:, fee_payment:, inbound_ach_transfer:, inbound_ach_transfer_return_intention:, inbound_check_adjustment:, inbound_check_deposit_return_intention:, inbound_real_time_payments_transfer_confirmation:, inbound_real_time_payments_transfer_decline:, inbound_wire_reversal:, inbound_wire_transfer:, inbound_wire_transfer_reversal:, interest_payment:, internal_source:, other:, outbound_card_push_transfer_acceptance:, real_time_payments_transfer_acknowledgement:, sample_funds:, swift_transfer_intention:, wire_transfer_intention:) + # @!method initialize(account_transfer_intention:, ach_transfer_intention:, ach_transfer_rejection:, ach_transfer_return:, card_dispute_acceptance:, card_dispute_loss:, card_push_transfer_acceptance:, card_refund:, card_revenue_payment:, card_settlement:, cashback_payment:, category:, check_deposit_acceptance:, check_deposit_return:, check_transfer_deposit:, fee_payment:, inbound_ach_transfer:, inbound_ach_transfer_return_intention:, inbound_check_adjustment:, inbound_check_deposit_return_intention:, inbound_real_time_payments_transfer_confirmation:, inbound_real_time_payments_transfer_decline:, inbound_wire_reversal:, inbound_wire_transfer:, inbound_wire_transfer_reversal:, interest_payment:, internal_source:, other:, real_time_payments_transfer_acknowledgement:, sample_funds:, swift_transfer_intention:, wire_transfer_intention:) # Some parameter documentations has been truncated, see # {Increase::Models::Transaction::Source} for more details. # @@ -505,6 +504,8 @@ class Source < Increase::Internal::Type::BaseModel # # @param card_dispute_loss [Increase::Models::Transaction::Source::CardDisputeLoss, nil] A Card Dispute Loss object. This field will be present in the JSON response if a # + # @param card_push_transfer_acceptance [Increase::Models::Transaction::Source::CardPushTransferAcceptance, nil] A Card Push Transfer Acceptance object. This field will be present in the JSON r + # # @param card_refund [Increase::Models::Transaction::Source::CardRefund, nil] A Card Refund object. This field will be present in the JSON response if and onl # # @param card_revenue_payment [Increase::Models::Transaction::Source::CardRevenuePayment, nil] A Card Revenue Payment object. This field will be present in the JSON response i @@ -547,8 +548,6 @@ class Source < Increase::Internal::Type::BaseModel # # @param other [Object, nil] If the category of this Transaction source is equal to `other`, this field will # - # @param outbound_card_push_transfer_acceptance [Increase::Models::Transaction::Source::OutboundCardPushTransferAcceptance, nil] An Outbound Card Push Transfer Acceptance object. This field will be present in - # # @param real_time_payments_transfer_acknowledgement [Increase::Models::Transaction::Source::RealTimePaymentsTransferAcknowledgement, nil] A Real-Time Payments Transfer Acknowledgement object. This field will be present # # @param sample_funds [Increase::Models::Transaction::Source::SampleFunds, nil] A Sample Funds object. This field will be present in the JSON response if and on @@ -1094,6 +1093,31 @@ class CardDisputeLoss < Increase::Internal::Type::BaseModel # @param transaction_id [String] The identifier of the Transaction that was created to debit the disputed funds f end + # @see Increase::Models::Transaction::Source#card_push_transfer_acceptance + class CardPushTransferAcceptance < Increase::Internal::Type::BaseModel + # @!attribute amount + # The transfer amount in USD cents. + # + # @return [Integer] + required :amount, Integer + + # @!attribute transfer_id + # The identifier of the Card Push Transfer that led to this Transaction. + # + # @return [String] + required :transfer_id, String + + # @!method initialize(amount:, transfer_id:) + # A Card Push Transfer Acceptance object. This field will be present in the JSON + # response if and only if `category` is equal to `card_push_transfer_acceptance`. + # A Card Push Transfer Acceptance is created when an Outbound Card Push Transfer + # sent from Increase is accepted by the receiving bank. + # + # @param amount [Integer] The transfer amount in USD cents. + # + # @param transfer_id [String] The identifier of the Card Push Transfer that led to this Transaction. + end + # @see Increase::Models::Transaction::Source#card_refund class CardRefund < Increase::Internal::Type::BaseModel # @!attribute id @@ -4085,8 +4109,8 @@ module Category # Swift Transfer Intention: details will be under the `swift_transfer_intention` object. SWIFT_TRANSFER_INTENTION = :swift_transfer_intention - # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. - OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE = :outbound_card_push_transfer_acceptance + # Card Push Transfer Acceptance: details will be under the `card_push_transfer_acceptance` object. + CARD_PUSH_TRANSFER_ACCEPTANCE = :card_push_transfer_acceptance # The Transaction was made for an undocumented or deprecated reason. OTHER = :other @@ -5649,32 +5673,6 @@ module Reason end end - # @see Increase::Models::Transaction::Source#outbound_card_push_transfer_acceptance - class OutboundCardPushTransferAcceptance < Increase::Internal::Type::BaseModel - # @!attribute amount - # The transfer amount in USD cents. - # - # @return [Integer] - required :amount, Integer - - # @!attribute transfer_id - # The identifier of the Outbound Card Push Transfer that led to this Transaction. - # - # @return [String] - required :transfer_id, String - - # @!method initialize(amount:, transfer_id:) - # An Outbound Card Push Transfer Acceptance object. This field will be present in - # the JSON response if and only if `category` is equal to - # `outbound_card_push_transfer_acceptance`. An Outbound Card Push Transfer - # Acceptance is created when an Outbound Card Push Transfer sent from Increase is - # accepted by the receiving bank. - # - # @param amount [Integer] The transfer amount in USD cents. - # - # @param transfer_id [String] The identifier of the Outbound Card Push Transfer that led to this Transaction. - end - # @see Increase::Models::Transaction::Source#real_time_payments_transfer_acknowledgement class RealTimePaymentsTransferAcknowledgement < Increase::Internal::Type::BaseModel # @!attribute amount diff --git a/lib/increase/models/transaction_list_params.rb b/lib/increase/models/transaction_list_params.rb index 21a8bfdfc..4de110e6a 100644 --- a/lib/increase/models/transaction_list_params.rb +++ b/lib/increase/models/transaction_list_params.rb @@ -169,8 +169,8 @@ module In # Swift Transfer Intention: details will be under the `swift_transfer_intention` object. SWIFT_TRANSFER_INTENTION = :swift_transfer_intention - # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. - OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE = :outbound_card_push_transfer_acceptance + # Card Push Transfer Acceptance: details will be under the `card_push_transfer_acceptance` object. + CARD_PUSH_TRANSFER_ACCEPTANCE = :card_push_transfer_acceptance # The Transaction was made for an undocumented or deprecated reason. OTHER = :other diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 02079dea7..fcc69a55d 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.0.0" + VERSION = "1.1.0" end diff --git a/rbi/increase/errors.rbi b/rbi/increase/errors.rbi index 3dd72be0f..21470c79d 100644 --- a/rbi/increase/errors.rbi +++ b/rbi/increase/errors.rbi @@ -8,6 +8,22 @@ module Increase end class ConversionError < Increase::Errors::Error + sig { returns(T.nilable(StandardError)) } + def cause + end + + # @api private + sig do + params( + on: T::Class[StandardError], + method: Symbol, + target: T.anything, + value: T.anything, + cause: T.nilable(StandardError) + ).returns(T.attached_class) + end + def self.new(on:, method:, target:, value:, cause: nil) + end end class APIError < Increase::Errors::Error diff --git a/rbi/increase/internal/type/boolean.rbi b/rbi/increase/internal/type/boolean.rbi index 9149d3238..21e45c1cb 100644 --- a/rbi/increase/internal/type/boolean.rbi +++ b/rbi/increase/internal/type/boolean.rbi @@ -22,6 +22,8 @@ module Increase class << self # @api private + # + # Coerce value to Boolean if possible, otherwise return the original value. sig do override .params( diff --git a/rbi/increase/internal/type/converter.rbi b/rbi/increase/internal/type/converter.rbi index 7610b8dad..b2f2d9a93 100644 --- a/rbi/increase/internal/type/converter.rbi +++ b/rbi/increase/internal/type/converter.rbi @@ -15,12 +15,14 @@ module Increase CoerceState = T.type_alias do { - strictness: T.any(T::Boolean, Symbol), + translate_names: T::Boolean, + strictness: T::Boolean, exactness: { yes: Integer, no: Integer, maybe: Integer }, + error: T::Class[StandardError], branched: Integer } end @@ -88,6 +90,15 @@ module Increase def self.type_info(spec) end + # @api private + sig do + params(translate_names: T::Boolean).returns( + Increase::Internal::Type::Converter::CoerceState + ) + end + def self.new_coerce_state(translate_names: true) + end + # @api private # # Based on `target`, transform `value` into `target`, to the extent possible: @@ -109,14 +120,11 @@ module Increase def self.coerce( target, value, - # The `strictness` is one of `true`, `false`, or `:strong`. This informs the - # coercion strategy when we have to decide between multiple possible conversion - # targets: + # The `strictness` is one of `true`, `false`. This informs the coercion strategy + # when we have to decide between multiple possible conversion targets: # # - `true`: the conversion must be exact, with minimum coercion. # - `false`: the conversion can be approximate, with some coercion. - # - `:strong`: the conversion must be exact, with no coercion, and raise an error - # if not possible. # # The `exactness` is `Hash` with keys being one of `yes`, `no`, or `maybe`. For # any given conversion attempt, the exactness will be updated based on how closely @@ -128,15 +136,7 @@ module Increase # - `no`: the value cannot be converted to the target type. # # See implementation below for more details. - state: { - strictness: true, - exactness: { - yes: 0, - no: 0, - maybe: 0 - }, - branched: 0 - } + state: Increase::Internal::Type::Converter.new_coerce_state ) end diff --git a/rbi/increase/internal/type/union.rbi b/rbi/increase/internal/type/union.rbi index bd7ef7c79..03d91aee5 100644 --- a/rbi/increase/internal/type/union.rbi +++ b/rbi/increase/internal/type/union.rbi @@ -78,6 +78,11 @@ module Increase end # @api private + # + # Tries to efficiently coerce the given value to one of the known variants. + # + # If the value cannot match any of the known variants, the coercion is considered + # non-viable and returns the original value. sig do override .params( diff --git a/rbi/increase/internal/type/unknown.rbi b/rbi/increase/internal/type/unknown.rbi index 67a9ef9bb..12e61d339 100644 --- a/rbi/increase/internal/type/unknown.rbi +++ b/rbi/increase/internal/type/unknown.rbi @@ -22,6 +22,8 @@ module Increase class << self # @api private + # + # No coercion needed for Unknown type. sig do override .params( diff --git a/rbi/increase/models/card_payment.rbi b/rbi/increase/models/card_payment.rbi index 91218a0a6..025a63107 100644 --- a/rbi/increase/models/card_payment.rbi +++ b/rbi/increase/models/card_payment.rbi @@ -270,10 +270,10 @@ module Increase end attr_writer :card_settlement - # A Card Validation object. This field will be present in the JSON response if and - # only if `category` is equal to `card_validation`. Card Validations are requests - # from a merchant to verify that a card number and optionally its address and/or - # Card Verification Value are valid. + # An Inbound Card Validation object. This field will be present in the JSON + # response if and only if `category` is equal to `card_validation`. Inbound Card + # Validations are requests from a merchant to verify that a card number and + # optionally its address and/or Card Verification Value are valid. sig do returns(T.nilable(Increase::CardPayment::Element::CardValidation)) end @@ -380,10 +380,10 @@ module Increase # preceded by an authorization, an acquirer can also directly clear a transaction # without first authorizing it. card_settlement:, - # A Card Validation object. This field will be present in the JSON response if and - # only if `category` is equal to `card_validation`. Card Validations are requests - # from a merchant to verify that a card number and optionally its address and/or - # Card Verification Value are valid. + # An Inbound Card Validation object. This field will be present in the JSON + # response if and only if `category` is equal to `card_validation`. Inbound Card + # Validations are requests from a merchant to verify that a card number and + # optionally its address and/or Card Verification Value are valid. card_validation:, # The type of the resource. We may add additional possible values for this enum # over time; your application should be able to handle such additions gracefully. @@ -10650,7 +10650,7 @@ module Increase attr_accessor :terminal_id # A constant representing the object's type. For this resource it will always be - # `card_validation`. + # `inbound_card_validation`. sig do returns( Increase::CardPayment::Element::CardValidation::Type::TaggedSymbol @@ -10674,10 +10674,10 @@ module Increase end attr_writer :verification - # A Card Validation object. This field will be present in the JSON response if and - # only if `category` is equal to `card_validation`. Card Validations are requests - # from a merchant to verify that a card number and optionally its address and/or - # Card Verification Value are valid. + # An Inbound Card Validation object. This field will be present in the JSON + # response if and only if `category` is equal to `card_validation`. Inbound Card + # Validations are requests from a merchant to verify that a card number and + # optionally its address and/or Card Verification Value are valid. sig do params( id: String, @@ -10756,7 +10756,7 @@ module Increase # is transacting with. terminal_id:, # A constant representing the object's type. For this resource it will always be - # `card_validation`. + # `inbound_card_validation`. type:, # Fields related to verification of cardholder-provided values. verification: @@ -11422,7 +11422,7 @@ module Increase end # A constant representing the object's type. For this resource it will always be - # `card_validation`. + # `inbound_card_validation`. module Type extend Increase::Internal::Type::Enum @@ -11435,9 +11435,9 @@ module Increase end OrSymbol = T.type_alias { T.any(Symbol, String) } - CARD_VALIDATION = + INBOUND_CARD_VALIDATION = T.let( - :card_validation, + :inbound_card_validation, Increase::CardPayment::Element::CardValidation::Type::TaggedSymbol ) @@ -11785,7 +11785,7 @@ module Increase Increase::CardPayment::Element::Category::TaggedSymbol ) - # Card Validation: details will be under the `card_validation` object. + # Inbound Card Validation: details will be under the `card_validation` object. CARD_VALIDATION = T.let( :card_validation, diff --git a/rbi/increase/models/check_transfer.rbi b/rbi/increase/models/check_transfer.rbi index 8e70c8837..f0bb3e704 100644 --- a/rbi/increase/models/check_transfer.rbi +++ b/rbi/increase/models/check_transfer.rbi @@ -772,6 +772,11 @@ module Increase sig { returns(T.nilable(String)) } attr_accessor :note + # The payer of the check. This will be printed on the top-left portion of the + # check and defaults to the return address if unspecified. + sig { returns(T::Array[Increase::CheckTransfer::PhysicalCheck::Payer]) } + attr_accessor :payer + # The name that will be printed on the check. sig { returns(String) } attr_accessor :recipient_name @@ -826,6 +831,8 @@ module Increase Increase::CheckTransfer::PhysicalCheck::MailingAddress::OrHash, memo: T.nilable(String), note: T.nilable(String), + payer: + T::Array[Increase::CheckTransfer::PhysicalCheck::Payer::OrHash], recipient_name: String, return_address: T.nilable( @@ -851,6 +858,9 @@ module Increase memo:, # The descriptor that will be printed on the letter included with the check. note:, + # The payer of the check. This will be printed on the top-left portion of the + # check and defaults to the return address if unspecified. + payer:, # The name that will be printed on the check. recipient_name:, # The return address to be printed on the check. @@ -873,6 +883,7 @@ module Increase Increase::CheckTransfer::PhysicalCheck::MailingAddress, memo: T.nilable(String), note: T.nilable(String), + payer: T::Array[Increase::CheckTransfer::PhysicalCheck::Payer], recipient_name: String, return_address: T.nilable( @@ -967,6 +978,31 @@ module Increase end end + class Payer < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CheckTransfer::PhysicalCheck::Payer, + Increase::Internal::AnyHash + ) + end + + # The contents of the line. + sig { returns(String) } + attr_accessor :contents + + sig { params(contents: String).returns(T.attached_class) } + def self.new( + # The contents of the line. + contents: + ) + end + + sig { override.returns({ contents: String }) } + def to_hash + end + end + class ReturnAddress < Increase::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/increase/models/check_transfer_create_params.rbi b/rbi/increase/models/check_transfer_create_params.rbi index 7bde20fd1..13d80174d 100644 --- a/rbi/increase/models/check_transfer_create_params.rbi +++ b/rbi/increase/models/check_transfer_create_params.rbi @@ -231,6 +231,30 @@ module Increase sig { params(note: String).void } attr_writer :note + # The payer of the check. This will be printed on the top-left portion of the + # check and defaults to the return address if unspecified. This should be an array + # of up to 4 elements, each of which represents a line of the payer. + sig do + returns( + T.nilable( + T::Array[ + Increase::CheckTransferCreateParams::PhysicalCheck::Payer + ] + ) + ) + end + attr_reader :payer + + sig do + params( + payer: + T::Array[ + Increase::CheckTransferCreateParams::PhysicalCheck::Payer::OrHash + ] + ).void + end + attr_writer :payer + # The return address to be printed on the check. If omitted this will default to # an Increase-owned address that will mark checks as delivery failed and shred # them. @@ -289,6 +313,10 @@ module Increase recipient_name: String, attachment_file_id: String, note: String, + payer: + T::Array[ + Increase::CheckTransferCreateParams::PhysicalCheck::Payer::OrHash + ], return_address: Increase::CheckTransferCreateParams::PhysicalCheck::ReturnAddress::OrHash, shipping_method: @@ -309,6 +337,10 @@ module Increase attachment_file_id: nil, # The descriptor that will be printed on the letter included with the check. note: nil, + # The payer of the check. This will be printed on the top-left portion of the + # check and defaults to the return address if unspecified. This should be an array + # of up to 4 elements, each of which represents a line of the payer. + payer: nil, # The return address to be printed on the check. If omitted this will default to # an Increase-owned address that will mark checks as delivery failed and shred # them. @@ -331,6 +363,10 @@ module Increase recipient_name: String, attachment_file_id: String, note: String, + payer: + T::Array[ + Increase::CheckTransferCreateParams::PhysicalCheck::Payer + ], return_address: Increase::CheckTransferCreateParams::PhysicalCheck::ReturnAddress, shipping_method: @@ -413,6 +449,31 @@ module Increase end end + class Payer < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CheckTransferCreateParams::PhysicalCheck::Payer, + Increase::Internal::AnyHash + ) + end + + # The contents of the line. + sig { returns(String) } + attr_accessor :contents + + sig { params(contents: String).returns(T.attached_class) } + def self.new( + # The contents of the line. + contents: + ) + end + + sig { override.returns({ contents: String }) } + def to_hash + end + end + class ReturnAddress < Increase::Internal::Type::BaseModel OrHash = T.type_alias do @@ -545,7 +606,7 @@ module Increase # The pay-to name you will print on the check. If provided, this is used for # [Positive Pay](/documentation/positive-pay). If this is omitted, Increase will - # be unable to validate the payee name when the check is deposited. + # be unable to validate the payer name when the check is deposited. sig { returns(T.nilable(String)) } attr_reader :recipient_name @@ -559,7 +620,7 @@ module Increase def self.new( # The pay-to name you will print on the check. If provided, this is used for # [Positive Pay](/documentation/positive-pay). If this is omitted, Increase will - # be unable to validate the payee name when the check is deposited. + # be unable to validate the payer name when the check is deposited. recipient_name: nil ) end diff --git a/rbi/increase/models/event.rbi b/rbi/increase/models/event.rbi index 6a5bab4b9..88b1e17e9 100644 --- a/rbi/increase/models/event.rbi +++ b/rbi/increase/models/event.rbi @@ -493,34 +493,62 @@ module Increase Increase::Event::Category::TaggedSymbol ) - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED = T.let( :"outbound_card_push_transfer.created", Increase::Event::Category::TaggedSymbol ) - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = T.let( :"outbound_card_push_transfer.updated", Increase::Event::Category::TaggedSymbol ) - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED = T.let( :"outbound_card_validation.created", Increase::Event::Category::TaggedSymbol ) - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED = T.let( :"outbound_card_validation.updated", Increase::Event::Category::TaggedSymbol ) + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED = + T.let( + :"card_push_transfer.created", + Increase::Event::Category::TaggedSymbol + ) + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED = + T.let( + :"card_push_transfer.updated", + Increase::Event::Category::TaggedSymbol + ) + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED = + T.let( + :"card_validation.created", + Increase::Event::Category::TaggedSymbol + ) + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED = + T.let( + :"card_validation.updated", + Increase::Event::Category::TaggedSymbol + ) + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = T.let( @@ -640,6 +668,20 @@ module Increase Increase::Event::Category::TaggedSymbol ) + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED = + T.let( + :"swift_transfer.created", + Increase::Event::Category::TaggedSymbol + ) + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED = + T.let( + :"swift_transfer.updated", + Increase::Event::Category::TaggedSymbol + ) + # Occurs whenever a Transaction is created. TRANSACTION_CREATED = T.let(:"transaction.created", Increase::Event::Category::TaggedSymbol) diff --git a/rbi/increase/models/event_list_params.rbi b/rbi/increase/models/event_list_params.rbi index 7bc443491..f84efffcd 100644 --- a/rbi/increase/models/event_list_params.rbi +++ b/rbi/increase/models/event_list_params.rbi @@ -592,34 +592,62 @@ module Increase Increase::EventListParams::Category::In::TaggedSymbol ) - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED = T.let( :"outbound_card_push_transfer.created", Increase::EventListParams::Category::In::TaggedSymbol ) - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = T.let( :"outbound_card_push_transfer.updated", Increase::EventListParams::Category::In::TaggedSymbol ) - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED = T.let( :"outbound_card_validation.created", Increase::EventListParams::Category::In::TaggedSymbol ) - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED = T.let( :"outbound_card_validation.updated", Increase::EventListParams::Category::In::TaggedSymbol ) + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED = + T.let( + :"card_push_transfer.created", + Increase::EventListParams::Category::In::TaggedSymbol + ) + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED = + T.let( + :"card_push_transfer.updated", + Increase::EventListParams::Category::In::TaggedSymbol + ) + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED = + T.let( + :"card_validation.created", + Increase::EventListParams::Category::In::TaggedSymbol + ) + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED = + T.let( + :"card_validation.updated", + Increase::EventListParams::Category::In::TaggedSymbol + ) + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = T.let( @@ -739,6 +767,20 @@ module Increase Increase::EventListParams::Category::In::TaggedSymbol ) + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED = + T.let( + :"swift_transfer.created", + Increase::EventListParams::Category::In::TaggedSymbol + ) + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED = + T.let( + :"swift_transfer.updated", + Increase::EventListParams::Category::In::TaggedSymbol + ) + # Occurs whenever a Transaction is created. TRANSACTION_CREATED = T.let( diff --git a/rbi/increase/models/event_subscription.rbi b/rbi/increase/models/event_subscription.rbi index 9896fef27..364c39167 100644 --- a/rbi/increase/models/event_subscription.rbi +++ b/rbi/increase/models/event_subscription.rbi @@ -576,34 +576,62 @@ module Increase Increase::EventSubscription::SelectedEventCategory::TaggedSymbol ) - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED = T.let( :"outbound_card_push_transfer.created", Increase::EventSubscription::SelectedEventCategory::TaggedSymbol ) - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = T.let( :"outbound_card_push_transfer.updated", Increase::EventSubscription::SelectedEventCategory::TaggedSymbol ) - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED = T.let( :"outbound_card_validation.created", Increase::EventSubscription::SelectedEventCategory::TaggedSymbol ) - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED = T.let( :"outbound_card_validation.updated", Increase::EventSubscription::SelectedEventCategory::TaggedSymbol ) + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED = + T.let( + :"card_push_transfer.created", + Increase::EventSubscription::SelectedEventCategory::TaggedSymbol + ) + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED = + T.let( + :"card_push_transfer.updated", + Increase::EventSubscription::SelectedEventCategory::TaggedSymbol + ) + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED = + T.let( + :"card_validation.created", + Increase::EventSubscription::SelectedEventCategory::TaggedSymbol + ) + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED = + T.let( + :"card_validation.updated", + Increase::EventSubscription::SelectedEventCategory::TaggedSymbol + ) + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = T.let( @@ -723,6 +751,20 @@ module Increase Increase::EventSubscription::SelectedEventCategory::TaggedSymbol ) + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED = + T.let( + :"swift_transfer.created", + Increase::EventSubscription::SelectedEventCategory::TaggedSymbol + ) + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED = + T.let( + :"swift_transfer.updated", + Increase::EventSubscription::SelectedEventCategory::TaggedSymbol + ) + # Occurs whenever a Transaction is created. TRANSACTION_CREATED = T.let( diff --git a/rbi/increase/models/event_subscription_create_params.rbi b/rbi/increase/models/event_subscription_create_params.rbi index 5f640ab84..6cd472e25 100644 --- a/rbi/increase/models/event_subscription_create_params.rbi +++ b/rbi/increase/models/event_subscription_create_params.rbi @@ -556,34 +556,62 @@ module Increase Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol ) - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED = T.let( :"outbound_card_push_transfer.created", Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol ) - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = T.let( :"outbound_card_push_transfer.updated", Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol ) - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED = T.let( :"outbound_card_validation.created", Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol ) - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED = T.let( :"outbound_card_validation.updated", Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol ) + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED = + T.let( + :"card_push_transfer.created", + Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol + ) + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED = + T.let( + :"card_push_transfer.updated", + Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol + ) + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED = + T.let( + :"card_validation.created", + Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol + ) + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED = + T.let( + :"card_validation.updated", + Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol + ) + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = T.let( @@ -703,6 +731,20 @@ module Increase Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol ) + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED = + T.let( + :"swift_transfer.created", + Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol + ) + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED = + T.let( + :"swift_transfer.updated", + Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol + ) + # Occurs whenever a Transaction is created. TRANSACTION_CREATED = T.let( diff --git a/rbi/increase/models/inbound_ach_transfer.rbi b/rbi/increase/models/inbound_ach_transfer.rbi index 255f03d35..232652251 100644 --- a/rbi/increase/models/inbound_ach_transfer.rbi +++ b/rbi/increase/models/inbound_ach_transfer.rbi @@ -76,14 +76,6 @@ module Increase sig { returns(Date) } attr_accessor :effective_date - # The settlement schedule the transfer is expected to follow. - sig do - returns( - Increase::InboundACHTransfer::ExpectedSettlementSchedule::TaggedSymbol - ) - end - attr_accessor :expected_settlement_schedule - # If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will # contain fields pertaining to the International ACH Transaction. sig do @@ -151,6 +143,18 @@ module Increase sig { returns(T.nilable(String)) } attr_accessor :receiver_name + # A subhash containing information about when and how the transfer settled at the + # Federal Reserve. + sig { returns(Increase::InboundACHTransfer::Settlement) } + attr_reader :settlement + + sig do + params( + settlement: Increase::InboundACHTransfer::Settlement::OrHash + ).void + end + attr_writer :settlement + # The Standard Entry Class (SEC) code of the transfer. sig do returns( @@ -203,8 +207,6 @@ module Increase decline: T.nilable(Increase::InboundACHTransfer::Decline::OrHash), direction: Increase::InboundACHTransfer::Direction::OrSymbol, effective_date: Date, - expected_settlement_schedule: - Increase::InboundACHTransfer::ExpectedSettlementSchedule::OrSymbol, international_addenda: T.nilable( Increase::InboundACHTransfer::InternationalAddenda::OrHash @@ -221,6 +223,7 @@ module Increase originator_routing_number: String, receiver_id_number: T.nilable(String), receiver_name: T.nilable(String), + settlement: Increase::InboundACHTransfer::Settlement::OrHash, standard_entry_class_code: Increase::InboundACHTransfer::StandardEntryClassCode::OrSymbol, status: Increase::InboundACHTransfer::Status::OrSymbol, @@ -255,8 +258,6 @@ module Increase # The effective date of the transfer. This is sent by the sending bank and is a # factor in determining funds availability. effective_date:, - # The settlement schedule the transfer is expected to follow. - expected_settlement_schedule:, # If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will # contain fields pertaining to the International ACH Transaction. international_addenda:, @@ -280,6 +281,9 @@ module Increase receiver_id_number:, # The name of the receiver of the transfer. receiver_name:, + # A subhash containing information about when and how the transfer settled at the + # Federal Reserve. + settlement:, # The Standard Entry Class (SEC) code of the transfer. standard_entry_class_code:, # The status of the transfer. @@ -311,8 +315,6 @@ module Increase decline: T.nilable(Increase::InboundACHTransfer::Decline), direction: Increase::InboundACHTransfer::Direction::TaggedSymbol, effective_date: Date, - expected_settlement_schedule: - Increase::InboundACHTransfer::ExpectedSettlementSchedule::TaggedSymbol, international_addenda: T.nilable(Increase::InboundACHTransfer::InternationalAddenda), notification_of_change: @@ -325,6 +327,7 @@ module Increase originator_routing_number: String, receiver_id_number: T.nilable(String), receiver_name: T.nilable(String), + settlement: Increase::InboundACHTransfer::Settlement, standard_entry_class_code: Increase::InboundACHTransfer::StandardEntryClassCode::TaggedSymbol, status: Increase::InboundACHTransfer::Status::TaggedSymbol, @@ -758,44 +761,6 @@ module Increase end end - # The settlement schedule the transfer is expected to follow. - module ExpectedSettlementSchedule - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::InboundACHTransfer::ExpectedSettlementSchedule - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # The transfer is expected to settle same-day. - SAME_DAY = - T.let( - :same_day, - Increase::InboundACHTransfer::ExpectedSettlementSchedule::TaggedSymbol - ) - - # The transfer is expected to settle on a future date. - FUTURE_DATED = - T.let( - :future_dated, - Increase::InboundACHTransfer::ExpectedSettlementSchedule::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::InboundACHTransfer::ExpectedSettlementSchedule::TaggedSymbol - ] - ) - end - def self.values - end - end - class InternationalAddenda < Increase::Internal::Type::BaseModel OrHash = T.type_alias do @@ -1552,6 +1517,97 @@ module Increase end end + class Settlement < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::InboundACHTransfer::Settlement, + Increase::Internal::AnyHash + ) + end + + # When the funds for this transfer settle at the recipient bank at the Federal + # Reserve. + sig { returns(Time) } + attr_accessor :settled_at + + # The settlement schedule this transfer follows. + sig do + returns( + Increase::InboundACHTransfer::Settlement::SettlementSchedule::TaggedSymbol + ) + end + attr_accessor :settlement_schedule + + # A subhash containing information about when and how the transfer settled at the + # Federal Reserve. + sig do + params( + settled_at: Time, + settlement_schedule: + Increase::InboundACHTransfer::Settlement::SettlementSchedule::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # When the funds for this transfer settle at the recipient bank at the Federal + # Reserve. + settled_at:, + # The settlement schedule this transfer follows. + settlement_schedule: + ) + end + + sig do + override.returns( + { + settled_at: Time, + settlement_schedule: + Increase::InboundACHTransfer::Settlement::SettlementSchedule::TaggedSymbol + } + ) + end + def to_hash + end + + # The settlement schedule this transfer follows. + module SettlementSchedule + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::InboundACHTransfer::Settlement::SettlementSchedule + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The transfer is expected to settle same-day. + SAME_DAY = + T.let( + :same_day, + Increase::InboundACHTransfer::Settlement::SettlementSchedule::TaggedSymbol + ) + + # The transfer is expected to settle on a future date. + FUTURE_DATED = + T.let( + :future_dated, + Increase::InboundACHTransfer::Settlement::SettlementSchedule::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::InboundACHTransfer::Settlement::SettlementSchedule::TaggedSymbol + ] + ) + end + def self.values + end + end + end + # The Standard Entry Class (SEC) code of the transfer. module StandardEntryClassCode extend Increase::Internal::Type::Enum diff --git a/rbi/increase/models/inbound_mail_item.rbi b/rbi/increase/models/inbound_mail_item.rbi index 2a35d8bf3..54405b3ce 100644 --- a/rbi/increase/models/inbound_mail_item.rbi +++ b/rbi/increase/models/inbound_mail_item.rbi @@ -12,6 +12,10 @@ module Increase sig { returns(String) } attr_accessor :id + # The checks in the mail item. + sig { returns(T::Array[Increase::InboundMailItem::Check]) } + attr_accessor :checks + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Inbound # Mail Item was created. sig { returns(Time) } @@ -51,6 +55,7 @@ module Increase sig do params( id: String, + checks: T::Array[Increase::InboundMailItem::Check::OrHash], created_at: Time, file_id: String, lockbox_id: T.nilable(String), @@ -64,6 +69,8 @@ module Increase def self.new( # The Inbound Mail Item identifier. id:, + # The checks in the mail item. + checks:, # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Inbound # Mail Item was created. created_at:, @@ -88,6 +95,7 @@ module Increase override.returns( { id: String, + checks: T::Array[Increase::InboundMailItem::Check], created_at: Time, file_id: String, lockbox_id: T.nilable(String), @@ -104,6 +112,55 @@ module Increase def to_hash end + class Check < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Increase::InboundMailItem::Check, Increase::Internal::AnyHash) + end + + # The amount of the check. + sig { returns(Integer) } + attr_accessor :amount + + # The identifier for the File containing the back of the check. + sig { returns(T.nilable(String)) } + attr_accessor :back_file_id + + # The identifier for the File containing the front of the check. + sig { returns(T.nilable(String)) } + attr_accessor :front_file_id + + # Inbound Mail Item Checks represent the checks in an Inbound Mail Item. + sig do + params( + amount: Integer, + back_file_id: T.nilable(String), + front_file_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The amount of the check. + amount:, + # The identifier for the File containing the back of the check. + back_file_id:, + # The identifier for the File containing the front of the check. + front_file_id: + ) + end + + sig do + override.returns( + { + amount: Integer, + back_file_id: T.nilable(String), + front_file_id: T.nilable(String) + } + ) + end + def to_hash + end + end + # If the mail item has been rejected, why it was rejected. module RejectionReason extend Increase::Internal::Type::Enum diff --git a/rbi/increase/models/pending_transaction.rbi b/rbi/increase/models/pending_transaction.rbi index 8a26d6fa0..0a5679525 100644 --- a/rbi/increase/models/pending_transaction.rbi +++ b/rbi/increase/models/pending_transaction.rbi @@ -344,6 +344,27 @@ module Increase end attr_writer :card_authorization + # A Card Push Transfer Instruction object. This field will be present in the JSON + # response if and only if `category` is equal to `card_push_transfer_instruction`. + sig do + returns( + T.nilable( + Increase::PendingTransaction::Source::CardPushTransferInstruction + ) + ) + end + attr_reader :card_push_transfer_instruction + + sig do + params( + card_push_transfer_instruction: + T.nilable( + Increase::PendingTransaction::Source::CardPushTransferInstruction::OrHash + ) + ).void + end + attr_writer :card_push_transfer_instruction + # The type of the resource. We may add additional possible values for this enum # over time; your application should be able to handle such additions gracefully. sig do @@ -442,28 +463,6 @@ module Increase sig { returns(T.nilable(T.anything)) } attr_accessor :other - # An Outbound Card Push Transfer Instruction object. This field will be present in - # the JSON response if and only if `category` is equal to - # `outbound_card_push_transfer_instruction`. - sig do - returns( - T.nilable( - Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction - ) - ) - end - attr_reader :outbound_card_push_transfer_instruction - - sig do - params( - outbound_card_push_transfer_instruction: - T.nilable( - Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction::OrHash - ) - ).void - end - attr_writer :outbound_card_push_transfer_instruction - # A Real-Time Payments Transfer Instruction object. This field will be present in # the JSON response if and only if `category` is equal to # `real_time_payments_transfer_instruction`. @@ -551,6 +550,10 @@ module Increase T.nilable( Increase::PendingTransaction::Source::CardAuthorization::OrHash ), + card_push_transfer_instruction: + T.nilable( + Increase::PendingTransaction::Source::CardPushTransferInstruction::OrHash + ), category: Increase::PendingTransaction::Source::Category::OrSymbol, check_deposit_instruction: T.nilable( @@ -569,10 +572,6 @@ module Increase Increase::PendingTransaction::Source::InboundWireTransferReversal::OrHash ), other: T.nilable(T.anything), - outbound_card_push_transfer_instruction: - T.nilable( - Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction::OrHash - ), real_time_payments_transfer_instruction: T.nilable( Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction::OrHash @@ -600,6 +599,9 @@ module Increase # temporary holds placed on a customers funds with the intent to later clear a # transaction. card_authorization:, + # A Card Push Transfer Instruction object. This field will be present in the JSON + # response if and only if `category` is equal to `card_push_transfer_instruction`. + card_push_transfer_instruction:, # The type of the resource. We may add additional possible values for this enum # over time; your application should be able to handle such additions gracefully. category:, @@ -622,10 +624,6 @@ module Increase # If the category of this Transaction source is equal to `other`, this field will # contain an empty object, otherwise it will contain null. other:, - # An Outbound Card Push Transfer Instruction object. This field will be present in - # the JSON response if and only if `category` is equal to - # `outbound_card_push_transfer_instruction`. - outbound_card_push_transfer_instruction:, # A Real-Time Payments Transfer Instruction object. This field will be present in # the JSON response if and only if `category` is equal to # `real_time_payments_transfer_instruction`. @@ -658,6 +656,10 @@ module Increase T.nilable( Increase::PendingTransaction::Source::CardAuthorization ), + card_push_transfer_instruction: + T.nilable( + Increase::PendingTransaction::Source::CardPushTransferInstruction + ), category: Increase::PendingTransaction::Source::Category::TaggedSymbol, check_deposit_instruction: @@ -677,10 +679,6 @@ module Increase Increase::PendingTransaction::Source::InboundWireTransferReversal ), other: T.nilable(T.anything), - outbound_card_push_transfer_instruction: - T.nilable( - Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction - ), real_time_payments_transfer_instruction: T.nilable( Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction @@ -2292,6 +2290,43 @@ module Increase end end + class CardPushTransferInstruction < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::PendingTransaction::Source::CardPushTransferInstruction, + Increase::Internal::AnyHash + ) + end + + # The transfer amount in USD cents. + sig { returns(Integer) } + attr_accessor :amount + + # The identifier of the Card Push Transfer that led to this Pending Transaction. + sig { returns(String) } + attr_accessor :transfer_id + + # A Card Push Transfer Instruction object. This field will be present in the JSON + # response if and only if `category` is equal to `card_push_transfer_instruction`. + sig do + params(amount: Integer, transfer_id: String).returns( + T.attached_class + ) + end + def self.new( + # The transfer amount in USD cents. + amount:, + # The identifier of the Card Push Transfer that led to this Pending Transaction. + transfer_id: + ) + end + + sig { override.returns({ amount: Integer, transfer_id: String }) } + def to_hash + end + end + # The type of the resource. We may add additional possible values for this enum # over time; your application should be able to handle such additions gracefully. module Category @@ -2380,10 +2415,10 @@ module Increase Increase::PendingTransaction::Source::Category::TaggedSymbol ) - # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. - OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION = + # Card Push Transfer Instruction: details will be under the `card_push_transfer_instruction` object. + CARD_PUSH_TRANSFER_INSTRUCTION = T.let( - :outbound_card_push_transfer_instruction, + :card_push_transfer_instruction, Increase::PendingTransaction::Source::Category::TaggedSymbol ) @@ -2987,46 +3022,6 @@ module Increase end end - class OutboundCardPushTransferInstruction < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction, - Increase::Internal::AnyHash - ) - end - - # The transfer amount in USD cents. - sig { returns(Integer) } - attr_accessor :amount - - # The identifier of the Outbound Card Push Transfer that led to this Pending - # Transaction. - sig { returns(String) } - attr_accessor :transfer_id - - # An Outbound Card Push Transfer Instruction object. This field will be present in - # the JSON response if and only if `category` is equal to - # `outbound_card_push_transfer_instruction`. - sig do - params(amount: Integer, transfer_id: String).returns( - T.attached_class - ) - end - def self.new( - # The transfer amount in USD cents. - amount:, - # The identifier of the Outbound Card Push Transfer that led to this Pending - # Transaction. - transfer_id: - ) - end - - sig { override.returns({ amount: Integer, transfer_id: String }) } - def to_hash - end - end - class RealTimePaymentsTransferInstruction < Increase::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/increase/models/pending_transaction_list_params.rbi b/rbi/increase/models/pending_transaction_list_params.rbi index acd2f44d2..442d3c790 100644 --- a/rbi/increase/models/pending_transaction_list_params.rbi +++ b/rbi/increase/models/pending_transaction_list_params.rbi @@ -272,10 +272,10 @@ module Increase Increase::PendingTransactionListParams::Category::In::TaggedSymbol ) - # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. - OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION = + # Card Push Transfer Instruction: details will be under the `card_push_transfer_instruction` object. + CARD_PUSH_TRANSFER_INSTRUCTION = T.let( - :outbound_card_push_transfer_instruction, + :card_push_transfer_instruction, Increase::PendingTransactionListParams::Category::In::TaggedSymbol ) diff --git a/rbi/increase/models/transaction.rbi b/rbi/increase/models/transaction.rbi index 96b0a0ed8..e4fb2acd3 100644 --- a/rbi/increase/models/transaction.rbi +++ b/rbi/increase/models/transaction.rbi @@ -324,6 +324,27 @@ module Increase end attr_writer :card_dispute_loss + # A Card Push Transfer Acceptance object. This field will be present in the JSON + # response if and only if `category` is equal to `card_push_transfer_acceptance`. + # A Card Push Transfer Acceptance is created when an Outbound Card Push Transfer + # sent from Increase is accepted by the receiving bank. + sig do + returns( + T.nilable(Increase::Transaction::Source::CardPushTransferAcceptance) + ) + end + attr_reader :card_push_transfer_acceptance + + sig do + params( + card_push_transfer_acceptance: + T.nilable( + Increase::Transaction::Source::CardPushTransferAcceptance::OrHash + ) + ).void + end + attr_writer :card_push_transfer_acceptance + # A Card Refund object. This field will be present in the JSON response if and # only if `category` is equal to `card_refund`. Card Refunds move money back to # the cardholder. While they are usually connected to a Card Settlement an @@ -711,30 +732,6 @@ module Increase sig { returns(T.nilable(T.anything)) } attr_accessor :other - # An Outbound Card Push Transfer Acceptance object. This field will be present in - # the JSON response if and only if `category` is equal to - # `outbound_card_push_transfer_acceptance`. An Outbound Card Push Transfer - # Acceptance is created when an Outbound Card Push Transfer sent from Increase is - # accepted by the receiving bank. - sig do - returns( - T.nilable( - Increase::Transaction::Source::OutboundCardPushTransferAcceptance - ) - ) - end - attr_reader :outbound_card_push_transfer_acceptance - - sig do - params( - outbound_card_push_transfer_acceptance: - T.nilable( - Increase::Transaction::Source::OutboundCardPushTransferAcceptance::OrHash - ) - ).void - end - attr_writer :outbound_card_push_transfer_acceptance - # A Real-Time Payments Transfer Acknowledgement object. This field will be present # in the JSON response if and only if `category` is equal to # `real_time_payments_transfer_acknowledgement`. A Real-Time Payments Transfer @@ -841,6 +838,10 @@ module Increase ), card_dispute_loss: T.nilable(Increase::Transaction::Source::CardDisputeLoss::OrHash), + card_push_transfer_acceptance: + T.nilable( + Increase::Transaction::Source::CardPushTransferAcceptance::OrHash + ), card_refund: T.nilable(Increase::Transaction::Source::CardRefund::OrHash), card_revenue_payment: @@ -907,10 +908,6 @@ module Increase internal_source: T.nilable(Increase::Transaction::Source::InternalSource::OrHash), other: T.nilable(T.anything), - outbound_card_push_transfer_acceptance: - T.nilable( - Increase::Transaction::Source::OutboundCardPushTransferAcceptance::OrHash - ), real_time_payments_transfer_acknowledgement: T.nilable( Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement::OrHash @@ -958,6 +955,11 @@ module Increase # and only if `category` is equal to `card_dispute_loss`. Contains the details of # a lost Card Dispute. card_dispute_loss:, + # A Card Push Transfer Acceptance object. This field will be present in the JSON + # response if and only if `category` is equal to `card_push_transfer_acceptance`. + # A Card Push Transfer Acceptance is created when an Outbound Card Push Transfer + # sent from Increase is accepted by the receiving bank. + card_push_transfer_acceptance:, # A Card Refund object. This field will be present in the JSON response if and # only if `category` is equal to `card_refund`. Card Refunds move money back to # the cardholder. While they are usually connected to a Card Settlement an @@ -1065,12 +1067,6 @@ module Increase # If the category of this Transaction source is equal to `other`, this field will # contain an empty object, otherwise it will contain null. other:, - # An Outbound Card Push Transfer Acceptance object. This field will be present in - # the JSON response if and only if `category` is equal to - # `outbound_card_push_transfer_acceptance`. An Outbound Card Push Transfer - # Acceptance is created when an Outbound Card Push Transfer sent from Increase is - # accepted by the receiving bank. - outbound_card_push_transfer_acceptance:, # A Real-Time Payments Transfer Acknowledgement object. This field will be present # in the JSON response if and only if `category` is equal to # `real_time_payments_transfer_acknowledgement`. A Real-Time Payments Transfer @@ -1109,6 +1105,10 @@ module Increase T.nilable(Increase::Transaction::Source::CardDisputeAcceptance), card_dispute_loss: T.nilable(Increase::Transaction::Source::CardDisputeLoss), + card_push_transfer_acceptance: + T.nilable( + Increase::Transaction::Source::CardPushTransferAcceptance + ), card_refund: T.nilable(Increase::Transaction::Source::CardRefund), card_revenue_payment: T.nilable(Increase::Transaction::Source::CardRevenuePayment), @@ -1161,10 +1161,6 @@ module Increase internal_source: T.nilable(Increase::Transaction::Source::InternalSource), other: T.nilable(T.anything), - outbound_card_push_transfer_acceptance: - T.nilable( - Increase::Transaction::Source::OutboundCardPushTransferAcceptance - ), real_time_payments_transfer_acknowledgement: T.nilable( Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement @@ -2179,6 +2175,45 @@ module Increase end end + class CardPushTransferAcceptance < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardPushTransferAcceptance, + Increase::Internal::AnyHash + ) + end + + # The transfer amount in USD cents. + sig { returns(Integer) } + attr_accessor :amount + + # The identifier of the Card Push Transfer that led to this Transaction. + sig { returns(String) } + attr_accessor :transfer_id + + # A Card Push Transfer Acceptance object. This field will be present in the JSON + # response if and only if `category` is equal to `card_push_transfer_acceptance`. + # A Card Push Transfer Acceptance is created when an Outbound Card Push Transfer + # sent from Increase is accepted by the receiving bank. + sig do + params(amount: Integer, transfer_id: String).returns( + T.attached_class + ) + end + def self.new( + # The transfer amount in USD cents. + amount:, + # The identifier of the Card Push Transfer that led to this Transaction. + transfer_id: + ) + end + + sig { override.returns({ amount: Integer, transfer_id: String }) } + def to_hash + end + end + class CardRefund < Increase::Internal::Type::BaseModel OrHash = T.type_alias do @@ -7558,10 +7593,10 @@ module Increase Increase::Transaction::Source::Category::TaggedSymbol ) - # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. - OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE = + # Card Push Transfer Acceptance: details will be under the `card_push_transfer_acceptance` object. + CARD_PUSH_TRANSFER_ACCEPTANCE = T.let( - :outbound_card_push_transfer_acceptance, + :card_push_transfer_acceptance, Increase::Transaction::Source::Category::TaggedSymbol ) @@ -10194,46 +10229,6 @@ module Increase end end - class OutboundCardPushTransferAcceptance < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::Transaction::Source::OutboundCardPushTransferAcceptance, - Increase::Internal::AnyHash - ) - end - - # The transfer amount in USD cents. - sig { returns(Integer) } - attr_accessor :amount - - # The identifier of the Outbound Card Push Transfer that led to this Transaction. - sig { returns(String) } - attr_accessor :transfer_id - - # An Outbound Card Push Transfer Acceptance object. This field will be present in - # the JSON response if and only if `category` is equal to - # `outbound_card_push_transfer_acceptance`. An Outbound Card Push Transfer - # Acceptance is created when an Outbound Card Push Transfer sent from Increase is - # accepted by the receiving bank. - sig do - params(amount: Integer, transfer_id: String).returns( - T.attached_class - ) - end - def self.new( - # The transfer amount in USD cents. - amount:, - # The identifier of the Outbound Card Push Transfer that led to this Transaction. - transfer_id: - ) - end - - sig { override.returns({ amount: Integer, transfer_id: String }) } - def to_hash - end - end - class RealTimePaymentsTransferAcknowledgement < Increase::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/increase/models/transaction_list_params.rbi b/rbi/increase/models/transaction_list_params.rbi index 9f47d8a2b..654d85ebb 100644 --- a/rbi/increase/models/transaction_list_params.rbi +++ b/rbi/increase/models/transaction_list_params.rbi @@ -369,10 +369,10 @@ module Increase Increase::TransactionListParams::Category::In::TaggedSymbol ) - # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. - OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE = + # Card Push Transfer Acceptance: details will be under the `card_push_transfer_acceptance` object. + CARD_PUSH_TRANSFER_ACCEPTANCE = T.let( - :outbound_card_push_transfer_acceptance, + :card_push_transfer_acceptance, Increase::TransactionListParams::Category::In::TaggedSymbol ) diff --git a/sig/increase/errors.rbs b/sig/increase/errors.rbs index eaf53c63b..f477a95bc 100644 --- a/sig/increase/errors.rbs +++ b/sig/increase/errors.rbs @@ -5,6 +5,15 @@ module Increase end class ConversionError < Increase::Errors::Error + def cause: -> StandardError? + + def initialize: ( + on: Class, + method: Symbol, + target: top, + value: top, + ?cause: StandardError? + ) -> void end class APIError < Increase::Errors::Error diff --git a/sig/increase/internal/type/converter.rbs b/sig/increase/internal/type/converter.rbs index 00f462ae8..1823ba30d 100644 --- a/sig/increase/internal/type/converter.rbs +++ b/sig/increase/internal/type/converter.rbs @@ -8,8 +8,10 @@ module Increase type coerce_state = { - strictness: bool | :strong, + translate_names: bool, + strictness: bool, exactness: { yes: Integer, no: Integer, maybe: Integer }, + error: Class, branched: Integer } @@ -37,6 +39,10 @@ module Increase | Increase::Internal::Type::Converter::input spec ) -> (^-> top) + def self.new_coerce_state: ( + ?translate_names: bool + ) -> Increase::Internal::Type::Converter::coerce_state + def self.coerce: ( Increase::Internal::Type::Converter::input target, top value, diff --git a/sig/increase/models/card_payment.rbs b/sig/increase/models/card_payment.rbs index 331645e40..e25a47831 100644 --- a/sig/increase/models/card_payment.rbs +++ b/sig/increase/models/card_payment.rbs @@ -4715,12 +4715,12 @@ module Increase } end - type type_ = :card_validation + type type_ = :inbound_card_validation module Type extend Increase::Internal::Type::Enum - CARD_VALIDATION: :card_validation + INBOUND_CARD_VALIDATION: :inbound_card_validation def self?.values: -> ::Array[Increase::Models::CardPayment::Element::CardValidation::type_] end @@ -4873,7 +4873,7 @@ module Increase # Card Authentication: details will be under the `card_authentication` object. CARD_AUTHENTICATION: :card_authentication - # Card Validation: details will be under the `card_validation` object. + # Inbound Card Validation: details will be under the `card_validation` object. CARD_VALIDATION: :card_validation # Card Decline: details will be under the `card_decline` object. diff --git a/sig/increase/models/check_transfer.rbs b/sig/increase/models/check_transfer.rbs index 67fa67f37..25fe77f3d 100644 --- a/sig/increase/models/check_transfer.rbs +++ b/sig/increase/models/check_transfer.rbs @@ -298,6 +298,7 @@ module Increase mailing_address: Increase::CheckTransfer::PhysicalCheck::MailingAddress, memo: String?, note: String?, + payer: ::Array[Increase::CheckTransfer::PhysicalCheck::Payer], recipient_name: String, return_address: Increase::CheckTransfer::PhysicalCheck::ReturnAddress?, shipping_method: Increase::Models::CheckTransfer::PhysicalCheck::shipping_method?, @@ -314,6 +315,8 @@ module Increase attr_accessor note: String? + attr_accessor payer: ::Array[Increase::CheckTransfer::PhysicalCheck::Payer] + attr_accessor recipient_name: String attr_accessor return_address: Increase::CheckTransfer::PhysicalCheck::ReturnAddress? @@ -329,6 +332,7 @@ module Increase mailing_address: Increase::CheckTransfer::PhysicalCheck::MailingAddress, memo: String?, note: String?, + payer: ::Array[Increase::CheckTransfer::PhysicalCheck::Payer], recipient_name: String, return_address: Increase::CheckTransfer::PhysicalCheck::ReturnAddress?, shipping_method: Increase::Models::CheckTransfer::PhysicalCheck::shipping_method?, @@ -341,6 +345,7 @@ module Increase mailing_address: Increase::CheckTransfer::PhysicalCheck::MailingAddress, memo: String?, note: String?, + payer: ::Array[Increase::CheckTransfer::PhysicalCheck::Payer], recipient_name: String, return_address: Increase::CheckTransfer::PhysicalCheck::ReturnAddress?, shipping_method: Increase::Models::CheckTransfer::PhysicalCheck::shipping_method?, @@ -390,6 +395,16 @@ module Increase } end + type payer = { contents: String } + + class Payer < Increase::Internal::Type::BaseModel + attr_accessor contents: String + + def initialize: (contents: String) -> void + + def to_hash: -> { contents: String } + end + type return_address = { city: String?, diff --git a/sig/increase/models/check_transfer_create_params.rbs b/sig/increase/models/check_transfer_create_params.rbs index b32c9041b..0e6bd38a8 100644 --- a/sig/increase/models/check_transfer_create_params.rbs +++ b/sig/increase/models/check_transfer_create_params.rbs @@ -90,6 +90,7 @@ module Increase recipient_name: String, attachment_file_id: String, note: String, + payer: ::Array[Increase::CheckTransferCreateParams::PhysicalCheck::Payer], return_address: Increase::CheckTransferCreateParams::PhysicalCheck::ReturnAddress, shipping_method: Increase::Models::CheckTransferCreateParams::PhysicalCheck::shipping_method, signature_text: String @@ -110,6 +111,12 @@ module Increase def note=: (String) -> String + attr_reader payer: ::Array[Increase::CheckTransferCreateParams::PhysicalCheck::Payer]? + + def payer=: ( + ::Array[Increase::CheckTransferCreateParams::PhysicalCheck::Payer] + ) -> ::Array[Increase::CheckTransferCreateParams::PhysicalCheck::Payer] + attr_reader return_address: Increase::CheckTransferCreateParams::PhysicalCheck::ReturnAddress? def return_address=: ( @@ -132,6 +139,7 @@ module Increase recipient_name: String, ?attachment_file_id: String, ?note: String, + ?payer: ::Array[Increase::CheckTransferCreateParams::PhysicalCheck::Payer], ?return_address: Increase::CheckTransferCreateParams::PhysicalCheck::ReturnAddress, ?shipping_method: Increase::Models::CheckTransferCreateParams::PhysicalCheck::shipping_method, ?signature_text: String @@ -143,6 +151,7 @@ module Increase recipient_name: String, attachment_file_id: String, note: String, + payer: ::Array[Increase::CheckTransferCreateParams::PhysicalCheck::Payer], return_address: Increase::CheckTransferCreateParams::PhysicalCheck::ReturnAddress, shipping_method: Increase::Models::CheckTransferCreateParams::PhysicalCheck::shipping_method, signature_text: String @@ -187,6 +196,16 @@ module Increase } end + type payer = { contents: String } + + class Payer < Increase::Internal::Type::BaseModel + attr_accessor contents: String + + def initialize: (contents: String) -> void + + def to_hash: -> { contents: String } + end + type return_address = { city: String, diff --git a/sig/increase/models/event.rbs b/sig/increase/models/event.rbs index 6f698b5b9..df38c855d 100644 --- a/sig/increase/models/event.rbs +++ b/sig/increase/models/event.rbs @@ -110,6 +110,10 @@ module Increase | :"outbound_card_push_transfer.updated" | :"outbound_card_validation.created" | :"outbound_card_validation.updated" + | :"card_push_transfer.created" + | :"card_push_transfer.updated" + | :"card_validation.created" + | :"card_validation.updated" | :"pending_transaction.created" | :"pending_transaction.updated" | :"physical_card.created" @@ -127,6 +131,8 @@ module Increase | :"real_time_payments_transfer.updated" | :"real_time_payments_request_for_payment.created" | :"real_time_payments_request_for_payment.updated" + | :"swift_transfer.created" + | :"swift_transfer.updated" | :"transaction.created" | :"wire_drawdown_request.created" | :"wire_drawdown_request.updated" @@ -328,18 +334,30 @@ module Increase # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED: :"oauth_connection.deactivated" - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED: :"outbound_card_push_transfer.created" - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED: :"outbound_card_push_transfer.updated" - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED: :"outbound_card_validation.created" - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED: :"outbound_card_validation.updated" + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED: :"card_push_transfer.created" + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED: :"card_push_transfer.updated" + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED: :"card_validation.created" + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED: :"card_validation.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED: :"pending_transaction.created" @@ -391,6 +409,12 @@ module Increase # Occurs whenever a Real-Time Payments Request for Payment is updated. REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED: :"real_time_payments_request_for_payment.updated" + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED: :"swift_transfer.created" + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED: :"swift_transfer.updated" + # Occurs whenever a Transaction is created. TRANSACTION_CREATED: :"transaction.created" diff --git a/sig/increase/models/event_list_params.rbs b/sig/increase/models/event_list_params.rbs index 8987c21e4..cc7e24bd5 100644 --- a/sig/increase/models/event_list_params.rbs +++ b/sig/increase/models/event_list_params.rbs @@ -143,6 +143,10 @@ module Increase | :"outbound_card_push_transfer.updated" | :"outbound_card_validation.created" | :"outbound_card_validation.updated" + | :"card_push_transfer.created" + | :"card_push_transfer.updated" + | :"card_validation.created" + | :"card_validation.updated" | :"pending_transaction.created" | :"pending_transaction.updated" | :"physical_card.created" @@ -160,6 +164,8 @@ module Increase | :"real_time_payments_transfer.updated" | :"real_time_payments_request_for_payment.created" | :"real_time_payments_request_for_payment.updated" + | :"swift_transfer.created" + | :"swift_transfer.updated" | :"transaction.created" | :"wire_drawdown_request.created" | :"wire_drawdown_request.updated" @@ -361,18 +367,30 @@ module Increase # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED: :"oauth_connection.deactivated" - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED: :"outbound_card_push_transfer.created" - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED: :"outbound_card_push_transfer.updated" - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED: :"outbound_card_validation.created" - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED: :"outbound_card_validation.updated" + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED: :"card_push_transfer.created" + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED: :"card_push_transfer.updated" + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED: :"card_validation.created" + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED: :"card_validation.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED: :"pending_transaction.created" @@ -424,6 +442,12 @@ module Increase # Occurs whenever a Real-Time Payments Request for Payment is updated. REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED: :"real_time_payments_request_for_payment.updated" + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED: :"swift_transfer.created" + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED: :"swift_transfer.updated" + # Occurs whenever a Transaction is created. TRANSACTION_CREATED: :"transaction.created" diff --git a/sig/increase/models/event_subscription.rbs b/sig/increase/models/event_subscription.rbs index feb63c0de..c9c420e11 100644 --- a/sig/increase/models/event_subscription.rbs +++ b/sig/increase/models/event_subscription.rbs @@ -120,6 +120,10 @@ module Increase | :"outbound_card_push_transfer.updated" | :"outbound_card_validation.created" | :"outbound_card_validation.updated" + | :"card_push_transfer.created" + | :"card_push_transfer.updated" + | :"card_validation.created" + | :"card_validation.updated" | :"pending_transaction.created" | :"pending_transaction.updated" | :"physical_card.created" @@ -137,6 +141,8 @@ module Increase | :"real_time_payments_transfer.updated" | :"real_time_payments_request_for_payment.created" | :"real_time_payments_request_for_payment.updated" + | :"swift_transfer.created" + | :"swift_transfer.updated" | :"transaction.created" | :"wire_drawdown_request.created" | :"wire_drawdown_request.updated" @@ -338,18 +344,30 @@ module Increase # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED: :"oauth_connection.deactivated" - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED: :"outbound_card_push_transfer.created" - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED: :"outbound_card_push_transfer.updated" - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED: :"outbound_card_validation.created" - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED: :"outbound_card_validation.updated" + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED: :"card_push_transfer.created" + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED: :"card_push_transfer.updated" + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED: :"card_validation.created" + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED: :"card_validation.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED: :"pending_transaction.created" @@ -401,6 +419,12 @@ module Increase # Occurs whenever a Real-Time Payments Request for Payment is updated. REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED: :"real_time_payments_request_for_payment.updated" + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED: :"swift_transfer.created" + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED: :"swift_transfer.updated" + # Occurs whenever a Transaction is created. TRANSACTION_CREATED: :"transaction.created" diff --git a/sig/increase/models/event_subscription_create_params.rbs b/sig/increase/models/event_subscription_create_params.rbs index bb942b57c..f57c38d02 100644 --- a/sig/increase/models/event_subscription_create_params.rbs +++ b/sig/increase/models/event_subscription_create_params.rbs @@ -114,6 +114,10 @@ module Increase | :"outbound_card_push_transfer.updated" | :"outbound_card_validation.created" | :"outbound_card_validation.updated" + | :"card_push_transfer.created" + | :"card_push_transfer.updated" + | :"card_validation.created" + | :"card_validation.updated" | :"pending_transaction.created" | :"pending_transaction.updated" | :"physical_card.created" @@ -131,6 +135,8 @@ module Increase | :"real_time_payments_transfer.updated" | :"real_time_payments_request_for_payment.created" | :"real_time_payments_request_for_payment.updated" + | :"swift_transfer.created" + | :"swift_transfer.updated" | :"transaction.created" | :"wire_drawdown_request.created" | :"wire_drawdown_request.updated" @@ -332,18 +338,30 @@ module Increase # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED: :"oauth_connection.deactivated" - # Occurs whenever an Outbound Card Push Transfer is created. + # Occurs whenever a Card Push Transfer is created. OUTBOUND_CARD_PUSH_TRANSFER_CREATED: :"outbound_card_push_transfer.created" - # Occurs whenever an Outbound Card Push Transfer is updated. + # Occurs whenever a Card Push Transfer is updated. OUTBOUND_CARD_PUSH_TRANSFER_UPDATED: :"outbound_card_push_transfer.updated" - # Occurs whenever an Outbound Card Validation is created. + # Occurs whenever a Card Validation is created. OUTBOUND_CARD_VALIDATION_CREATED: :"outbound_card_validation.created" - # Occurs whenever an Outbound Card Validation is updated. + # Occurs whenever a Card Validation is updated. OUTBOUND_CARD_VALIDATION_UPDATED: :"outbound_card_validation.updated" + # Occurs whenever a Card Push Transfer is created. + CARD_PUSH_TRANSFER_CREATED: :"card_push_transfer.created" + + # Occurs whenever a Card Push Transfer is updated. + CARD_PUSH_TRANSFER_UPDATED: :"card_push_transfer.updated" + + # Occurs whenever a Card Validation is created. + CARD_VALIDATION_CREATED: :"card_validation.created" + + # Occurs whenever a Card Validation is updated. + CARD_VALIDATION_UPDATED: :"card_validation.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED: :"pending_transaction.created" @@ -395,6 +413,12 @@ module Increase # Occurs whenever a Real-Time Payments Request for Payment is updated. REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED: :"real_time_payments_request_for_payment.updated" + # Occurs whenever a Swift Transfer is created. + SWIFT_TRANSFER_CREATED: :"swift_transfer.created" + + # Occurs whenever a Swift Transfer is updated. + SWIFT_TRANSFER_UPDATED: :"swift_transfer.updated" + # Occurs whenever a Transaction is created. TRANSACTION_CREATED: :"transaction.created" diff --git a/sig/increase/models/inbound_ach_transfer.rbs b/sig/increase/models/inbound_ach_transfer.rbs index 3d4e8f960..39fc5a35f 100644 --- a/sig/increase/models/inbound_ach_transfer.rbs +++ b/sig/increase/models/inbound_ach_transfer.rbs @@ -13,7 +13,6 @@ module Increase decline: Increase::InboundACHTransfer::Decline?, direction: Increase::Models::InboundACHTransfer::direction, effective_date: Date, - expected_settlement_schedule: Increase::Models::InboundACHTransfer::expected_settlement_schedule, international_addenda: Increase::InboundACHTransfer::InternationalAddenda?, notification_of_change: Increase::InboundACHTransfer::NotificationOfChange?, originator_company_descriptive_date: String?, @@ -24,6 +23,7 @@ module Increase originator_routing_number: String, receiver_id_number: String?, receiver_name: String?, + settlement: Increase::InboundACHTransfer::Settlement, standard_entry_class_code: Increase::Models::InboundACHTransfer::standard_entry_class_code, status: Increase::Models::InboundACHTransfer::status, trace_number: String, @@ -54,8 +54,6 @@ module Increase attr_accessor effective_date: Date - attr_accessor expected_settlement_schedule: Increase::Models::InboundACHTransfer::expected_settlement_schedule - attr_accessor international_addenda: Increase::InboundACHTransfer::InternationalAddenda? attr_accessor notification_of_change: Increase::InboundACHTransfer::NotificationOfChange? @@ -76,6 +74,8 @@ module Increase attr_accessor receiver_name: String? + attr_accessor settlement: Increase::InboundACHTransfer::Settlement + attr_accessor standard_entry_class_code: Increase::Models::InboundACHTransfer::standard_entry_class_code attr_accessor status: Increase::Models::InboundACHTransfer::status @@ -98,7 +98,6 @@ module Increase decline: Increase::InboundACHTransfer::Decline?, direction: Increase::Models::InboundACHTransfer::direction, effective_date: Date, - expected_settlement_schedule: Increase::Models::InboundACHTransfer::expected_settlement_schedule, international_addenda: Increase::InboundACHTransfer::InternationalAddenda?, notification_of_change: Increase::InboundACHTransfer::NotificationOfChange?, originator_company_descriptive_date: String?, @@ -109,6 +108,7 @@ module Increase originator_routing_number: String, receiver_id_number: String?, receiver_name: String?, + settlement: Increase::InboundACHTransfer::Settlement, standard_entry_class_code: Increase::Models::InboundACHTransfer::standard_entry_class_code, status: Increase::Models::InboundACHTransfer::status, trace_number: String, @@ -128,7 +128,6 @@ module Increase decline: Increase::InboundACHTransfer::Decline?, direction: Increase::Models::InboundACHTransfer::direction, effective_date: Date, - expected_settlement_schedule: Increase::Models::InboundACHTransfer::expected_settlement_schedule, international_addenda: Increase::InboundACHTransfer::InternationalAddenda?, notification_of_change: Increase::InboundACHTransfer::NotificationOfChange?, originator_company_descriptive_date: String?, @@ -139,6 +138,7 @@ module Increase originator_routing_number: String, receiver_id_number: String?, receiver_name: String?, + settlement: Increase::InboundACHTransfer::Settlement, standard_entry_class_code: Increase::Models::InboundACHTransfer::standard_entry_class_code, status: Increase::Models::InboundACHTransfer::status, trace_number: String, @@ -335,20 +335,6 @@ module Increase def self?.values: -> ::Array[Increase::Models::InboundACHTransfer::direction] end - type expected_settlement_schedule = :same_day | :future_dated - - module ExpectedSettlementSchedule - extend Increase::Internal::Type::Enum - - # The transfer is expected to settle same-day. - SAME_DAY: :same_day - - # The transfer is expected to settle on a future date. - FUTURE_DATED: :future_dated - - def self?.values: -> ::Array[Increase::Models::InboundACHTransfer::expected_settlement_schedule] - end - type international_addenda = { destination_country_code: String, @@ -705,6 +691,42 @@ module Increase } end + type settlement = + { + settled_at: Time, + settlement_schedule: Increase::Models::InboundACHTransfer::Settlement::settlement_schedule + } + + class Settlement < Increase::Internal::Type::BaseModel + attr_accessor settled_at: Time + + attr_accessor settlement_schedule: Increase::Models::InboundACHTransfer::Settlement::settlement_schedule + + def initialize: ( + settled_at: Time, + settlement_schedule: Increase::Models::InboundACHTransfer::Settlement::settlement_schedule + ) -> void + + def to_hash: -> { + settled_at: Time, + settlement_schedule: Increase::Models::InboundACHTransfer::Settlement::settlement_schedule + } + + type settlement_schedule = :same_day | :future_dated + + module SettlementSchedule + extend Increase::Internal::Type::Enum + + # The transfer is expected to settle same-day. + SAME_DAY: :same_day + + # The transfer is expected to settle on a future date. + FUTURE_DATED: :future_dated + + def self?.values: -> ::Array[Increase::Models::InboundACHTransfer::Settlement::settlement_schedule] + end + end + type standard_entry_class_code = :corporate_credit_or_debit | :corporate_trade_exchange diff --git a/sig/increase/models/inbound_mail_item.rbs b/sig/increase/models/inbound_mail_item.rbs index b64fa0b33..e45dd46cf 100644 --- a/sig/increase/models/inbound_mail_item.rbs +++ b/sig/increase/models/inbound_mail_item.rbs @@ -3,6 +3,7 @@ module Increase type inbound_mail_item = { id: String, + checks: ::Array[Increase::InboundMailItem::Check], created_at: Time, file_id: String, lockbox_id: String?, @@ -15,6 +16,8 @@ module Increase class InboundMailItem < Increase::Internal::Type::BaseModel attr_accessor id: String + attr_accessor checks: ::Array[Increase::InboundMailItem::Check] + attr_accessor created_at: Time attr_accessor file_id: String @@ -31,6 +34,7 @@ module Increase def initialize: ( id: String, + checks: ::Array[Increase::InboundMailItem::Check], created_at: Time, file_id: String, lockbox_id: String?, @@ -42,6 +46,7 @@ module Increase def to_hash: -> { id: String, + checks: ::Array[Increase::InboundMailItem::Check], created_at: Time, file_id: String, lockbox_id: String?, @@ -51,6 +56,29 @@ module Increase type: Increase::Models::InboundMailItem::type_ } + type check = + { amount: Integer, back_file_id: String?, front_file_id: String? } + + class Check < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor back_file_id: String? + + attr_accessor front_file_id: String? + + def initialize: ( + amount: Integer, + back_file_id: String?, + front_file_id: String? + ) -> void + + def to_hash: -> { + amount: Integer, + back_file_id: String?, + front_file_id: String? + } + end + type rejection_reason = :no_matching_lockbox | :no_check | :lockbox_not_active diff --git a/sig/increase/models/pending_transaction.rbs b/sig/increase/models/pending_transaction.rbs index c027de9e9..a66923f67 100644 --- a/sig/increase/models/pending_transaction.rbs +++ b/sig/increase/models/pending_transaction.rbs @@ -138,13 +138,13 @@ module Increase account_transfer_instruction: Increase::PendingTransaction::Source::AccountTransferInstruction?, ach_transfer_instruction: Increase::PendingTransaction::Source::ACHTransferInstruction?, card_authorization: Increase::PendingTransaction::Source::CardAuthorization?, + card_push_transfer_instruction: Increase::PendingTransaction::Source::CardPushTransferInstruction?, category: Increase::Models::PendingTransaction::Source::category, check_deposit_instruction: Increase::PendingTransaction::Source::CheckDepositInstruction?, check_transfer_instruction: Increase::PendingTransaction::Source::CheckTransferInstruction?, inbound_funds_hold: Increase::PendingTransaction::Source::InboundFundsHold?, inbound_wire_transfer_reversal: Increase::PendingTransaction::Source::InboundWireTransferReversal?, other: top?, - outbound_card_push_transfer_instruction: Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction?, real_time_payments_transfer_instruction: Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction?, swift_transfer_instruction: Increase::PendingTransaction::Source::SwiftTransferInstruction?, user_initiated_hold: top?, @@ -158,6 +158,8 @@ module Increase attr_accessor card_authorization: Increase::PendingTransaction::Source::CardAuthorization? + attr_accessor card_push_transfer_instruction: Increase::PendingTransaction::Source::CardPushTransferInstruction? + attr_accessor category: Increase::Models::PendingTransaction::Source::category attr_accessor check_deposit_instruction: Increase::PendingTransaction::Source::CheckDepositInstruction? @@ -170,8 +172,6 @@ module Increase attr_accessor other: top? - attr_accessor outbound_card_push_transfer_instruction: Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction? - attr_accessor real_time_payments_transfer_instruction: Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction? attr_accessor swift_transfer_instruction: Increase::PendingTransaction::Source::SwiftTransferInstruction? @@ -184,13 +184,13 @@ module Increase account_transfer_instruction: Increase::PendingTransaction::Source::AccountTransferInstruction?, ach_transfer_instruction: Increase::PendingTransaction::Source::ACHTransferInstruction?, card_authorization: Increase::PendingTransaction::Source::CardAuthorization?, + card_push_transfer_instruction: Increase::PendingTransaction::Source::CardPushTransferInstruction?, category: Increase::Models::PendingTransaction::Source::category, check_deposit_instruction: Increase::PendingTransaction::Source::CheckDepositInstruction?, check_transfer_instruction: Increase::PendingTransaction::Source::CheckTransferInstruction?, inbound_funds_hold: Increase::PendingTransaction::Source::InboundFundsHold?, inbound_wire_transfer_reversal: Increase::PendingTransaction::Source::InboundWireTransferReversal?, other: top?, - outbound_card_push_transfer_instruction: Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction?, real_time_payments_transfer_instruction: Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction?, swift_transfer_instruction: Increase::PendingTransaction::Source::SwiftTransferInstruction?, user_initiated_hold: top?, @@ -201,13 +201,13 @@ module Increase account_transfer_instruction: Increase::PendingTransaction::Source::AccountTransferInstruction?, ach_transfer_instruction: Increase::PendingTransaction::Source::ACHTransferInstruction?, card_authorization: Increase::PendingTransaction::Source::CardAuthorization?, + card_push_transfer_instruction: Increase::PendingTransaction::Source::CardPushTransferInstruction?, category: Increase::Models::PendingTransaction::Source::category, check_deposit_instruction: Increase::PendingTransaction::Source::CheckDepositInstruction?, check_transfer_instruction: Increase::PendingTransaction::Source::CheckTransferInstruction?, inbound_funds_hold: Increase::PendingTransaction::Source::InboundFundsHold?, inbound_wire_transfer_reversal: Increase::PendingTransaction::Source::InboundWireTransferReversal?, other: top?, - outbound_card_push_transfer_instruction: Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction?, real_time_payments_transfer_instruction: Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction?, swift_transfer_instruction: Increase::PendingTransaction::Source::SwiftTransferInstruction?, user_initiated_hold: top?, @@ -865,6 +865,19 @@ module Increase end end + type card_push_transfer_instruction = + { amount: Integer, transfer_id: String } + + class CardPushTransferInstruction < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor transfer_id: String + + def initialize: (amount: Integer, transfer_id: String) -> void + + def to_hash: -> { amount: Integer, transfer_id: String } + end + type category = :account_transfer_instruction | :ach_transfer_instruction @@ -877,7 +890,7 @@ module Increase | :wire_transfer_instruction | :inbound_wire_transfer_reversal | :swift_transfer_instruction - | :outbound_card_push_transfer_instruction + | :card_push_transfer_instruction | :other module Category @@ -916,8 +929,8 @@ module Increase # Swift Transfer Instruction: details will be under the `swift_transfer_instruction` object. SWIFT_TRANSFER_INSTRUCTION: :swift_transfer_instruction - # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. - OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION: :outbound_card_push_transfer_instruction + # Card Push Transfer Instruction: details will be under the `card_push_transfer_instruction` object. + CARD_PUSH_TRANSFER_INSTRUCTION: :card_push_transfer_instruction # The Pending Transaction was made for an undocumented or deprecated reason. OTHER: :other @@ -1164,19 +1177,6 @@ module Increase def to_hash: -> { inbound_wire_transfer_id: String } end - type outbound_card_push_transfer_instruction = - { amount: Integer, transfer_id: String } - - class OutboundCardPushTransferInstruction < Increase::Internal::Type::BaseModel - attr_accessor amount: Integer - - attr_accessor transfer_id: String - - def initialize: (amount: Integer, transfer_id: String) -> void - - def to_hash: -> { amount: Integer, transfer_id: String } - end - type real_time_payments_transfer_instruction = { amount: Integer, transfer_id: String } diff --git a/sig/increase/models/pending_transaction_list_params.rbs b/sig/increase/models/pending_transaction_list_params.rbs index c13d6187f..5a3d64422 100644 --- a/sig/increase/models/pending_transaction_list_params.rbs +++ b/sig/increase/models/pending_transaction_list_params.rbs @@ -104,7 +104,7 @@ module Increase | :wire_transfer_instruction | :inbound_wire_transfer_reversal | :swift_transfer_instruction - | :outbound_card_push_transfer_instruction + | :card_push_transfer_instruction | :other module In @@ -143,8 +143,8 @@ module Increase # Swift Transfer Instruction: details will be under the `swift_transfer_instruction` object. SWIFT_TRANSFER_INSTRUCTION: :swift_transfer_instruction - # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. - OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION: :outbound_card_push_transfer_instruction + # Card Push Transfer Instruction: details will be under the `card_push_transfer_instruction` object. + CARD_PUSH_TRANSFER_INSTRUCTION: :card_push_transfer_instruction # The Pending Transaction was made for an undocumented or deprecated reason. OTHER: :other diff --git a/sig/increase/models/transaction.rbs b/sig/increase/models/transaction.rbs index bedb9577d..c6b721d65 100644 --- a/sig/increase/models/transaction.rbs +++ b/sig/increase/models/transaction.rbs @@ -112,6 +112,7 @@ module Increase ach_transfer_return: Increase::Transaction::Source::ACHTransferReturn?, card_dispute_acceptance: Increase::Transaction::Source::CardDisputeAcceptance?, card_dispute_loss: Increase::Transaction::Source::CardDisputeLoss?, + card_push_transfer_acceptance: Increase::Transaction::Source::CardPushTransferAcceptance?, card_refund: Increase::Transaction::Source::CardRefund?, card_revenue_payment: Increase::Transaction::Source::CardRevenuePayment?, card_settlement: Increase::Transaction::Source::CardSettlement?, @@ -133,7 +134,6 @@ module Increase interest_payment: Increase::Transaction::Source::InterestPayment?, internal_source: Increase::Transaction::Source::InternalSource?, other: top?, - outbound_card_push_transfer_acceptance: Increase::Transaction::Source::OutboundCardPushTransferAcceptance?, real_time_payments_transfer_acknowledgement: Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement?, sample_funds: Increase::Transaction::Source::SampleFunds?, swift_transfer_intention: Increase::Transaction::Source::SwiftTransferIntention?, @@ -153,6 +153,8 @@ module Increase attr_accessor card_dispute_loss: Increase::Transaction::Source::CardDisputeLoss? + attr_accessor card_push_transfer_acceptance: Increase::Transaction::Source::CardPushTransferAcceptance? + attr_accessor card_refund: Increase::Transaction::Source::CardRefund? attr_accessor card_revenue_payment: Increase::Transaction::Source::CardRevenuePayment? @@ -195,8 +197,6 @@ module Increase attr_accessor other: top? - attr_accessor outbound_card_push_transfer_acceptance: Increase::Transaction::Source::OutboundCardPushTransferAcceptance? - attr_accessor real_time_payments_transfer_acknowledgement: Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement? attr_accessor sample_funds: Increase::Transaction::Source::SampleFunds? @@ -212,6 +212,7 @@ module Increase ach_transfer_return: Increase::Transaction::Source::ACHTransferReturn?, card_dispute_acceptance: Increase::Transaction::Source::CardDisputeAcceptance?, card_dispute_loss: Increase::Transaction::Source::CardDisputeLoss?, + card_push_transfer_acceptance: Increase::Transaction::Source::CardPushTransferAcceptance?, card_refund: Increase::Transaction::Source::CardRefund?, card_revenue_payment: Increase::Transaction::Source::CardRevenuePayment?, card_settlement: Increase::Transaction::Source::CardSettlement?, @@ -233,7 +234,6 @@ module Increase interest_payment: Increase::Transaction::Source::InterestPayment?, internal_source: Increase::Transaction::Source::InternalSource?, other: top?, - outbound_card_push_transfer_acceptance: Increase::Transaction::Source::OutboundCardPushTransferAcceptance?, real_time_payments_transfer_acknowledgement: Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement?, sample_funds: Increase::Transaction::Source::SampleFunds?, swift_transfer_intention: Increase::Transaction::Source::SwiftTransferIntention?, @@ -247,6 +247,7 @@ module Increase ach_transfer_return: Increase::Transaction::Source::ACHTransferReturn?, card_dispute_acceptance: Increase::Transaction::Source::CardDisputeAcceptance?, card_dispute_loss: Increase::Transaction::Source::CardDisputeLoss?, + card_push_transfer_acceptance: Increase::Transaction::Source::CardPushTransferAcceptance?, card_refund: Increase::Transaction::Source::CardRefund?, card_revenue_payment: Increase::Transaction::Source::CardRevenuePayment?, card_settlement: Increase::Transaction::Source::CardSettlement?, @@ -268,7 +269,6 @@ module Increase interest_payment: Increase::Transaction::Source::InterestPayment?, internal_source: Increase::Transaction::Source::InternalSource?, other: top?, - outbound_card_push_transfer_acceptance: Increase::Transaction::Source::OutboundCardPushTransferAcceptance?, real_time_payments_transfer_acknowledgement: Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement?, sample_funds: Increase::Transaction::Source::SampleFunds?, swift_transfer_intention: Increase::Transaction::Source::SwiftTransferIntention?, @@ -775,6 +775,19 @@ module Increase } end + type card_push_transfer_acceptance = + { amount: Integer, transfer_id: String } + + class CardPushTransferAcceptance < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor transfer_id: String + + def initialize: (amount: Integer, transfer_id: String) -> void + + def to_hash: -> { amount: Integer, transfer_id: String } + end + type card_refund = { id: String, @@ -2993,7 +3006,7 @@ module Increase | :sample_funds | :wire_transfer_intention | :swift_transfer_intention - | :outbound_card_push_transfer_acceptance + | :card_push_transfer_acceptance | :other module Category @@ -3086,8 +3099,8 @@ module Increase # Swift Transfer Intention: details will be under the `swift_transfer_intention` object. SWIFT_TRANSFER_INTENTION: :swift_transfer_intention - # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. - OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE: :outbound_card_push_transfer_acceptance + # Card Push Transfer Acceptance: details will be under the `card_push_transfer_acceptance` object. + CARD_PUSH_TRANSFER_ACCEPTANCE: :card_push_transfer_acceptance # The Transaction was made for an undocumented or deprecated reason. OTHER: :other @@ -4278,19 +4291,6 @@ module Increase end end - type outbound_card_push_transfer_acceptance = - { amount: Integer, transfer_id: String } - - class OutboundCardPushTransferAcceptance < Increase::Internal::Type::BaseModel - attr_accessor amount: Integer - - attr_accessor transfer_id: String - - def initialize: (amount: Integer, transfer_id: String) -> void - - def to_hash: -> { amount: Integer, transfer_id: String } - end - type real_time_payments_transfer_acknowledgement = { amount: Integer, diff --git a/sig/increase/models/transaction_list_params.rbs b/sig/increase/models/transaction_list_params.rbs index b6f20303b..58e60fe62 100644 --- a/sig/increase/models/transaction_list_params.rbs +++ b/sig/increase/models/transaction_list_params.rbs @@ -111,7 +111,7 @@ module Increase | :sample_funds | :wire_transfer_intention | :swift_transfer_intention - | :outbound_card_push_transfer_acceptance + | :card_push_transfer_acceptance | :other module In @@ -204,8 +204,8 @@ module Increase # Swift Transfer Intention: details will be under the `swift_transfer_intention` object. SWIFT_TRANSFER_INTENTION: :swift_transfer_intention - # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. - OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE: :outbound_card_push_transfer_acceptance + # Card Push Transfer Acceptance: details will be under the `card_push_transfer_acceptance` object. + CARD_PUSH_TRANSFER_ACCEPTANCE: :card_push_transfer_acceptance # The Transaction was made for an undocumented or deprecated reason. OTHER: :other diff --git a/test/increase/internal/type/base_model_test.rb b/test/increase/internal/type/base_model_test.rb index fcc31a56e..bbb861a06 100644 --- a/test/increase/internal/type/base_model_test.rb +++ b/test/increase/internal/type/base_model_test.rb @@ -66,7 +66,7 @@ def test_coerce cases.each do |lhs, rhs| target, input = lhs exactness, expect = rhs - state = {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} + state = Increase::Internal::Type::Converter.new_coerce_state assert_pattern do Increase::Internal::Type::Converter.coerce(target, input, state: state) => ^expect state.fetch(:exactness).filter { _2.nonzero? }.to_h => ^exactness @@ -108,18 +108,19 @@ def test_dump def test_coerce_errors cases = { - [Integer, "one"] => TypeError, - [Float, "one"] => TypeError, + [Integer, "one"] => ArgumentError, + [Float, "one"] => ArgumentError, [String, Time] => TypeError, [Date, "one"] => ArgumentError, [Time, "one"] => ArgumentError } - cases.each do - target, input = _1 - state = {strictness: :strong, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} - assert_raises(_2) do - Increase::Internal::Type::Converter.coerce(target, input, state: state) + cases.each do |testcase, expect| + target, input = testcase + state = Increase::Internal::Type::Converter.new_coerce_state + Increase::Internal::Type::Converter.coerce(target, input, state: state) + assert_pattern do + state => {error: ^expect} end end end @@ -217,7 +218,7 @@ def test_coerce cases.each do |lhs, rhs| target, input = lhs exactness, expect = rhs - state = {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} + state = Increase::Internal::Type::Converter.new_coerce_state assert_pattern do Increase::Internal::Type::Converter.coerce(target, input, state: state) => ^expect state.fetch(:exactness).filter { _2.nonzero? }.to_h => ^exactness @@ -291,7 +292,7 @@ def test_coerce cases.each do |lhs, rhs| target, input = lhs exactness, expect = rhs - state = {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} + state = Increase::Internal::Type::Converter.new_coerce_state assert_pattern do Increase::Internal::Type::Converter.coerce(target, input, state: state) => ^expect state.fetch(:exactness).filter { _2.nonzero? }.to_h => ^exactness @@ -340,6 +341,7 @@ class M5 < Increase::Internal::Type::BaseModel class M6 < M1 required :a, Increase::Internal::Type::ArrayOf[M6] + optional :b, M6 end def test_coerce @@ -365,13 +367,14 @@ def test_coerce [M5, {d: "d"}] => [{yes: 3}, {d: :d}], [M5, {d: nil}] => [{yes: 2, no: 1}, {d: nil}], - [M6, {a: [{a: []}]}] => [{yes: 4}, -> { _1 in {a: [M6]} }] + [M6, {a: [{a: []}]}] => [{yes: 6}, -> { _1 in {a: [M6]} }], + [M6, {b: {a: []}}] => [{yes: 4, no: 1}, -> { _1 in {b: M6} }] } cases.each do |lhs, rhs| target, input = lhs exactness, expect = rhs - state = {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} + state = Increase::Internal::Type::Converter.new_coerce_state assert_pattern do coerced = Increase::Internal::Type::Converter.coerce(target, input, state: state) assert_equal(coerced, coerced) @@ -410,20 +413,26 @@ def test_dump def test_accessors cases = { - M2.new({a: "1990-09-19", b: "1"}) => {a: Time.new(1990, 9, 19), b: TypeError}, - M2.new(a: "one", b: "one") => {a: ArgumentError, b: TypeError}, - M2.new(a: nil, b: 2.0) => {a: TypeError}, - M2.new(a: nil, b: 2.2) => {a: TypeError, b: ArgumentError}, + M2.new({a: "1990-09-19", b: "1"}) => [{a: "1990-09-19", b: "1"}, {a: Time.new(1990, 9, 19), b: 1}], + M2.new(a: "one", b: "one") => [{a: "one", b: "one"}, {a: ArgumentError, b: ArgumentError}], + M2.new(a: nil, b: 2.0) => [{a: nil, b: 2.0}, {a: TypeError}], + M2.new(a: nil, b: 2.2) => [{a: nil, b: 2.2}, {a: TypeError, b: 2}], - M3.new => {d: :d}, - M3.new(d: 1) => {d: ArgumentError}, + M3.new => [{}, {d: :d}], + M3.new(d: 1) => [{d: 1}, {d: ArgumentError}], - M5.new => {c: :c, d: :d} + M5.new => [{}, {c: :c, d: :d}] } cases.each do target = _1 - _2.each do |accessor, expect| + data, attributes = _2 + + assert_pattern do + target.to_h => ^data + end + + attributes.each do |accessor, expect| case expect in Class if expect <= StandardError tap do @@ -438,6 +447,24 @@ def test_accessors end end end + + def test_inplace_modification + m1 = M6.new(a: []) + m1.a << M6.new(a: []) + + m2 = M6.new(b: M6.new(a: [])) + m2.b.a << M6.new(a: []) + + m3 = M6.new(a: []) + m4 = M6.new(b: m3) + m3.a << M6.new(a: []) + + assert_pattern do + m1 => {a: [{a: []}]} + m2 => {b: {a: [{a: []}]}} + m4 => {b: {a: [{a: []}]}} + end + end end class Increase::Test::UnionTest < Minitest::Test @@ -555,7 +582,7 @@ def test_coerce cases.each do |lhs, rhs| target, input = lhs exactness, branched, expect = rhs - state = {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0} + state = Increase::Internal::Type::Converter.new_coerce_state assert_pattern do coerced = Increase::Internal::Type::Converter.coerce(target, input, state: state) assert_equal(coerced, coerced) diff --git a/test/increase/resources/inbound_ach_transfers_test.rb b/test/increase/resources/inbound_ach_transfers_test.rb index 7f1ff01a3..9497cbaef 100644 --- a/test/increase/resources/inbound_ach_transfers_test.rb +++ b/test/increase/resources/inbound_ach_transfers_test.rb @@ -23,7 +23,6 @@ def test_retrieve decline: Increase::InboundACHTransfer::Decline | nil, direction: Increase::InboundACHTransfer::Direction, effective_date: Date, - expected_settlement_schedule: Increase::InboundACHTransfer::ExpectedSettlementSchedule, international_addenda: Increase::InboundACHTransfer::InternationalAddenda | nil, notification_of_change: Increase::InboundACHTransfer::NotificationOfChange | nil, originator_company_descriptive_date: String | nil, @@ -34,6 +33,7 @@ def test_retrieve originator_routing_number: String, receiver_id_number: String | nil, receiver_name: String | nil, + settlement: Increase::InboundACHTransfer::Settlement, standard_entry_class_code: Increase::InboundACHTransfer::StandardEntryClassCode, status: Increase::InboundACHTransfer::Status, trace_number: String, @@ -70,7 +70,6 @@ def test_list decline: Increase::InboundACHTransfer::Decline | nil, direction: Increase::InboundACHTransfer::Direction, effective_date: Date, - expected_settlement_schedule: Increase::InboundACHTransfer::ExpectedSettlementSchedule, international_addenda: Increase::InboundACHTransfer::InternationalAddenda | nil, notification_of_change: Increase::InboundACHTransfer::NotificationOfChange | nil, originator_company_descriptive_date: String | nil, @@ -81,6 +80,7 @@ def test_list originator_routing_number: String, receiver_id_number: String | nil, receiver_name: String | nil, + settlement: Increase::InboundACHTransfer::Settlement, standard_entry_class_code: Increase::InboundACHTransfer::StandardEntryClassCode, status: Increase::InboundACHTransfer::Status, trace_number: String, @@ -110,7 +110,6 @@ def test_create_notification_of_change decline: Increase::InboundACHTransfer::Decline | nil, direction: Increase::InboundACHTransfer::Direction, effective_date: Date, - expected_settlement_schedule: Increase::InboundACHTransfer::ExpectedSettlementSchedule, international_addenda: Increase::InboundACHTransfer::InternationalAddenda | nil, notification_of_change: Increase::InboundACHTransfer::NotificationOfChange | nil, originator_company_descriptive_date: String | nil, @@ -121,6 +120,7 @@ def test_create_notification_of_change originator_routing_number: String, receiver_id_number: String | nil, receiver_name: String | nil, + settlement: Increase::InboundACHTransfer::Settlement, standard_entry_class_code: Increase::InboundACHTransfer::StandardEntryClassCode, status: Increase::InboundACHTransfer::Status, trace_number: String, @@ -150,7 +150,6 @@ def test_decline decline: Increase::InboundACHTransfer::Decline | nil, direction: Increase::InboundACHTransfer::Direction, effective_date: Date, - expected_settlement_schedule: Increase::InboundACHTransfer::ExpectedSettlementSchedule, international_addenda: Increase::InboundACHTransfer::InternationalAddenda | nil, notification_of_change: Increase::InboundACHTransfer::NotificationOfChange | nil, originator_company_descriptive_date: String | nil, @@ -161,6 +160,7 @@ def test_decline originator_routing_number: String, receiver_id_number: String | nil, receiver_name: String | nil, + settlement: Increase::InboundACHTransfer::Settlement, standard_entry_class_code: Increase::InboundACHTransfer::StandardEntryClassCode, status: Increase::InboundACHTransfer::Status, trace_number: String, @@ -191,7 +191,6 @@ def test_transfer_return_required_params decline: Increase::InboundACHTransfer::Decline | nil, direction: Increase::InboundACHTransfer::Direction, effective_date: Date, - expected_settlement_schedule: Increase::InboundACHTransfer::ExpectedSettlementSchedule, international_addenda: Increase::InboundACHTransfer::InternationalAddenda | nil, notification_of_change: Increase::InboundACHTransfer::NotificationOfChange | nil, originator_company_descriptive_date: String | nil, @@ -202,6 +201,7 @@ def test_transfer_return_required_params originator_routing_number: String, receiver_id_number: String | nil, receiver_name: String | nil, + settlement: Increase::InboundACHTransfer::Settlement, standard_entry_class_code: Increase::InboundACHTransfer::StandardEntryClassCode, status: Increase::InboundACHTransfer::Status, trace_number: String, diff --git a/test/increase/resources/inbound_mail_items_test.rb b/test/increase/resources/inbound_mail_items_test.rb index 2b9413606..2008574c2 100644 --- a/test/increase/resources/inbound_mail_items_test.rb +++ b/test/increase/resources/inbound_mail_items_test.rb @@ -13,6 +13,7 @@ def test_retrieve assert_pattern do response => { id: String, + checks: ^(Increase::Internal::Type::ArrayOf[Increase::InboundMailItem::Check]), created_at: Time, file_id: String, lockbox_id: String | nil, @@ -41,6 +42,7 @@ def test_list assert_pattern do row => { id: String, + checks: ^(Increase::Internal::Type::ArrayOf[Increase::InboundMailItem::Check]), created_at: Time, file_id: String, lockbox_id: String | nil, diff --git a/test/increase/resources/simulations/inbound_ach_transfers_test.rb b/test/increase/resources/simulations/inbound_ach_transfers_test.rb index f8d8c0fd6..9fefd58fc 100644 --- a/test/increase/resources/simulations/inbound_ach_transfers_test.rb +++ b/test/increase/resources/simulations/inbound_ach_transfers_test.rb @@ -27,7 +27,6 @@ def test_create_required_params decline: Increase::InboundACHTransfer::Decline | nil, direction: Increase::InboundACHTransfer::Direction, effective_date: Date, - expected_settlement_schedule: Increase::InboundACHTransfer::ExpectedSettlementSchedule, international_addenda: Increase::InboundACHTransfer::InternationalAddenda | nil, notification_of_change: Increase::InboundACHTransfer::NotificationOfChange | nil, originator_company_descriptive_date: String | nil, @@ -38,6 +37,7 @@ def test_create_required_params originator_routing_number: String, receiver_id_number: String | nil, receiver_name: String | nil, + settlement: Increase::InboundACHTransfer::Settlement, standard_entry_class_code: Increase::InboundACHTransfer::StandardEntryClassCode, status: Increase::InboundACHTransfer::Status, trace_number: String, diff --git a/test/increase/resources/simulations/inbound_mail_items_test.rb b/test/increase/resources/simulations/inbound_mail_items_test.rb index 3a4ac7ae5..a65abd0b0 100644 --- a/test/increase/resources/simulations/inbound_mail_items_test.rb +++ b/test/increase/resources/simulations/inbound_mail_items_test.rb @@ -17,6 +17,7 @@ def test_create_required_params assert_pattern do response => { id: String, + checks: ^(Increase::Internal::Type::ArrayOf[Increase::InboundMailItem::Check]), created_at: Time, file_id: String, lockbox_id: String | nil,