Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 254
openapi_spec_hash: b502688710d2e1e332c41ca7adc8aabf
openapi_spec_hash: 554ad31b4be955204857435cc2593074
config_hash: f0e1844d06c76a9e145f7986d993dda6
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ All errors raised by this gem, including `Increase::Errors::APIError` and respon

Certain errors will be automatically retried 2 times by default, with a short exponential backoff.

Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default.
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default.

You can use the `max_retries` option to configure or disable this:

Expand Down
3 changes: 1 addition & 2 deletions lib/increase/internal/transport/base_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ def should_retry?(status, headers:)
case [coerced, status]
in [true | false, _]
coerced
in [_, 408 | 409 | 429 | (500..)]
in [_, 408 | 429 | (500..)]
# retry on:
# 408: timeouts
# 409: locks
# 429: rate limits
# 500+: unknown errors
true
Expand Down
38 changes: 37 additions & 1 deletion lib/increase/models/card_payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ module VerificationMethod
# The one-time code was sent via email.
EMAIL = :email

# The one-time code was not successfully delivered.
# The one-time code could not be delivered because the card has no phone number or email on file.
NONE_AVAILABLE = :none_available

# @!method self.values
Expand Down Expand Up @@ -2782,6 +2782,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -4283,6 +4286,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -5938,6 +5944,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -7455,6 +7464,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -8017,6 +8029,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -8901,6 +8916,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -10445,6 +10463,9 @@ module PurchaseIdentifierFormat
# Invoice number
INVOICE_NUMBER = :invoice_number

# Visa Recurrent reference identifier
VISA_RECURRENT_REFERENCE_IDENTIFIER = :visa_recurrent_reference_identifier

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -11080,6 +11101,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -11600,6 +11624,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -13175,6 +13202,9 @@ module PurchaseIdentifierFormat
# Invoice number
INVOICE_NUMBER = :invoice_number

# Visa Recurrent reference identifier
VISA_RECURRENT_REFERENCE_IDENTIFIER = :visa_recurrent_reference_identifier

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -13812,6 +13842,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down Expand Up @@ -15058,6 +15091,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down
3 changes: 3 additions & 0 deletions lib/increase/models/check_deposit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ module Reason
# The check has already been deposited elsewhere and so this is a duplicate.
PAID = :paid

# A previous adjustment for the check was applied twice and the duplicate has been reversed.
DUPLICATE_ENTRY = :duplicate_entry

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down
3 changes: 3 additions & 0 deletions lib/increase/models/declined_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down
21 changes: 12 additions & 9 deletions lib/increase/models/digital_card_profile_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@ class DigitalCardProfileCreateParams < Increase::Internal::Type::BaseModel
# @return [String]
required :description, String

# @!attribute issuer_name
# A user-facing description for whoever is issuing the card.
#
# @return [String]
required :issuer_name, String

# @!attribute contact_email
# An email address the user can contact to receive support for their card.
#
# @return [String, nil]
optional :contact_email, String

# @!attribute contact_name
# The name of your company or card program, shown to the user as who to contact
# for support with their card.
#
# @return [String, nil]
optional :contact_name, String

# @!attribute contact_phone
# A phone number the user can contact to receive support for their card.
#
Expand All @@ -61,7 +62,7 @@ class DigitalCardProfileCreateParams < Increase::Internal::Type::BaseModel
# @return [Increase::Models::DigitalCardProfileCreateParams::TextColor, nil]
optional :text_color, -> { Increase::DigitalCardProfileCreateParams::TextColor }

# @!method initialize(app_icon_file_id:, background_image_file_id:, card_description:, description:, issuer_name:, contact_email: nil, contact_phone: nil, contact_website: nil, text_color: nil, request_options: {})
# @!method initialize(app_icon_file_id:, background_image_file_id:, card_description:, description:, contact_email: nil, contact_name: nil, contact_phone: nil, contact_website: nil, text_color: nil, request_options: {})
# @param app_icon_file_id [String] The identifier of the File containing the card's icon image.
#
# @param background_image_file_id [String] The identifier of the File containing the card's front image.
Expand All @@ -70,10 +71,12 @@ class DigitalCardProfileCreateParams < Increase::Internal::Type::BaseModel
#
# @param description [String] A description you can use to identify the Card Profile.
#
# @param issuer_name [String] A user-facing description for whoever is issuing the card.
#
# @param contact_email [String] An email address the user can contact to receive support for their card.
#
# @param contact_name [String]
# The name of your company or card program, shown to the user as who to contact
# for support with their card.
#
# @param contact_phone [String] A phone number the user can contact to receive support for their card.
#
# @param contact_website [String] A website the user can visit to view and receive support for their card.
Expand Down
3 changes: 3 additions & 0 deletions lib/increase/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ module Category
# Occurs whenever a Digital Wallet Token is updated.
DIGITAL_WALLET_TOKEN_UPDATED = :"digital_wallet_token.updated"

# Occurs whenever a Digital Wallet Token Request is created.
DIGITAL_WALLET_TOKEN_REQUEST_CREATED = :"digital_wallet_token_request.created"

# Occurs whenever an Entity is created.
ENTITY_CREATED = :"entity.created"

Expand Down
11 changes: 7 additions & 4 deletions lib/increase/models/event_list_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class EventListParams < Increase::Internal::Type::BaseModel
optional :cursor, String

# @!attribute limit
# Limit the size of the list that is returned. The default (and maximum) is 100
# objects.
# Limit the size of the list that is returned. The default is 100 objects and the
# maximum is 1,000.
#
# Defaults to `100`.
#
Expand All @@ -54,8 +54,8 @@ class EventListParams < Increase::Internal::Type::BaseModel
# @param cursor [String] Return the page of entries after this one.
#
# @param limit [Integer]
# Limit the size of the list that is returned. The default (and maximum) is 100
# objects.
# Limit the size of the list that is returned. The default is 100 objects and the
# maximum is 1,000.
#
# Defaults to `100`.
#
Expand Down Expand Up @@ -197,6 +197,9 @@ module In
# Occurs whenever a Digital Wallet Token is updated.
DIGITAL_WALLET_TOKEN_UPDATED = :"digital_wallet_token.updated"

# Occurs whenever a Digital Wallet Token Request is created.
DIGITAL_WALLET_TOKEN_REQUEST_CREATED = :"digital_wallet_token_request.created"

# Occurs whenever an Entity is created.
ENTITY_CREATED = :"entity.created"

Expand Down
3 changes: 3 additions & 0 deletions lib/increase/models/event_subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ module EventCategory
# Occurs whenever a Digital Wallet Token is updated.
DIGITAL_WALLET_TOKEN_UPDATED = :"digital_wallet_token.updated"

# Occurs whenever a Digital Wallet Token Request is created.
DIGITAL_WALLET_TOKEN_REQUEST_CREATED = :"digital_wallet_token_request.created"

# Occurs whenever an Entity is created.
ENTITY_CREATED = :"entity.created"

Expand Down
3 changes: 3 additions & 0 deletions lib/increase/models/event_subscription_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ module EventCategory
# Occurs whenever a Digital Wallet Token is updated.
DIGITAL_WALLET_TOKEN_UPDATED = :"digital_wallet_token.updated"

# Occurs whenever a Digital Wallet Token Request is created.
DIGITAL_WALLET_TOKEN_REQUEST_CREATED = :"digital_wallet_token_request.created"

# Occurs whenever an Entity is created.
ENTITY_CREATED = :"entity.created"

Expand Down
16 changes: 9 additions & 7 deletions lib/increase/models/inbound_check_deposit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class InboundCheckDeposit < Increase::Internal::Type::BaseModel
# @!attribute back_image_file_id
# The ID for the File containing the image of the back of the check.
#
# @return [String, nil]
required :back_image_file_id, String, nil?: true
# @return [String]
required :back_image_file_id, String

# @!attribute bank_of_first_deposit_routing_number
# The American Bankers' Association (ABA) Routing Transit Number (RTN) for the
Expand Down Expand Up @@ -116,8 +116,8 @@ class InboundCheckDeposit < Increase::Internal::Type::BaseModel
# @!attribute front_image_file_id
# The ID for the File containing the image of the front of the check.
#
# @return [String, nil]
required :front_image_file_id, String, nil?: true
# @return [String]
required :front_image_file_id, String

# @!attribute payee_name_analysis
# Whether the details on the check match the recipient name of the check transfer.
Expand Down Expand Up @@ -172,7 +172,7 @@ class InboundCheckDeposit < Increase::Internal::Type::BaseModel
# the Inbound Check Deposit will be automatically resolved if it has not been
# actioned by then.
#
# @param back_image_file_id [String, nil] The ID for the File containing the image of the back of the check.
# @param back_image_file_id [String] The ID for the File containing the image of the back of the check.
#
# @param bank_of_first_deposit_routing_number [String, nil]
# The American Bankers' Association (ABA) Routing Transit Number (RTN) for the
Expand Down Expand Up @@ -205,8 +205,7 @@ class InboundCheckDeposit < Increase::Internal::Type::BaseModel
# If you requested a return of this deposit, this will contain details of the
# return.
#
# @param front_image_file_id [String, nil]
# The ID for the File containing the image of the front of the check.
# @param front_image_file_id [String] The ID for the File containing the image of the front of the check.
#
# @param payee_name_analysis [Symbol, Increase::Models::InboundCheckDeposit::PayeeNameAnalysis]
# Whether the details on the check match the recipient name of the check transfer.
Expand Down Expand Up @@ -273,6 +272,9 @@ module Reason
# The check was deposited to the wrong payee and the depositing institution has reimbursed the funds with a Wrong Payee Credit.
WRONG_PAYEE_CREDIT = :wrong_payee_credit

# A previous adjustment for the check was applied twice and the duplicate has been reversed.
DUPLICATE_ENTRY = :duplicate_entry

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down
15 changes: 9 additions & 6 deletions lib/increase/models/pending_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class PendingTransaction < Increase::Internal::Type::BaseModel
# @!attribute amount
# The Pending Transaction amount in the minor unit of its currency. For dollars,
# for example, this is cents. For a card authorization this is the amount still
# held: it decreases when the merchant reverses part of the authorization. The
# amount that settled is available on the resulting Transaction and on the Card
# Payment's `state.settled_amount`.
# held: it decreases when the merchant reverses or partially settles the
# authorization. The amount that settled is available on the resulting Transaction
# and on the Card Payment's `state.settled_amount`.
#
# @return [Integer]
required :amount, Integer
Expand Down Expand Up @@ -112,9 +112,9 @@ class PendingTransaction < Increase::Internal::Type::BaseModel
# @param amount [Integer]
# The Pending Transaction amount in the minor unit of its currency. For dollars,
# for example, this is cents. For a card authorization this is the amount still
# held: it decreases when the merchant reverses part of the authorization. The
# amount that settled is available on the resulting Transaction and on the Card
# Payment's `state.settled_amount`.
# held: it decreases when the merchant reverses or partially settles the
# authorization. The amount that settled is available on the resulting Transaction
# and on the Card Payment's `state.settled_amount`.
#
# @param completed_at [Time, nil]
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending
Expand Down Expand Up @@ -2212,6 +2212,9 @@ module FeeType
# Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
PULSE_SWITCH_FEE = :pulse_switch_fee

# Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ module Reason
# The check has already been deposited elsewhere and so this is a duplicate.
PAID = :paid

# A previous adjustment for the check was applied twice and the duplicate has been reversed.
DUPLICATE_ENTRY = :duplicate_entry

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ module Reason
# The check was deposited to the wrong payee and the depositing institution has reimbursed the funds with a Wrong Payee Credit.
WRONG_PAYEE_CREDIT = :wrong_payee_credit

# A previous adjustment for the check was applied twice and the duplicate has been reversed.
DUPLICATE_ENTRY = :duplicate_entry

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