Skip to content
Open
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: 5cce8a47b5940a7903e79134ccaca371
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.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ class DigitalCardProfile < Increase::Internal::Type::BaseModel
# @return [String, nil]
required :contact_email, String, nil?: true

# @!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]
required :contact_name, String

# @!attribute contact_phone
# A phone number the user can contact to receive support for their card.
#
Expand Down Expand Up @@ -67,12 +74,6 @@ class DigitalCardProfile < Increase::Internal::Type::BaseModel
# @return [String, nil]
required :idempotency_key, String, nil?: true

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

# @!attribute status
# The status of the Card Profile.
#
Expand All @@ -92,7 +93,7 @@ class DigitalCardProfile < Increase::Internal::Type::BaseModel
# @return [Symbol, Increase::Models::DigitalCardProfile::Type]
required :type, enum: -> { Increase::DigitalCardProfile::Type }

# @!method initialize(id:, app_icon_file_id:, background_image_file_id:, card_description:, contact_email:, contact_phone:, contact_website:, created_at:, description:, idempotency_key:, issuer_name:, status:, text_color:, type:)
# @!method initialize(id:, app_icon_file_id:, background_image_file_id:, card_description:, contact_email:, contact_name:, contact_phone:, contact_website:, created_at:, description:, idempotency_key:, status:, text_color:, type:)
# This contains artwork and metadata relating to a Card's appearance in digital
# wallet apps like Apple Pay and Google Pay. For more information, see our guide
# on [digital card artwork](https://increase.com/documentation/card-art).
Expand All @@ -108,6 +109,10 @@ class DigitalCardProfile < Increase::Internal::Type::BaseModel
# @param contact_email [String, nil]
# 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, nil] A phone number the user can contact to receive support for their card.
#
# @param contact_website [String, nil]
Expand All @@ -124,8 +129,6 @@ class DigitalCardProfile < Increase::Internal::Type::BaseModel
# Increase and is used to ensure that a request is only processed once. Learn more
# about [idempotency](https://increase.com/documentation/idempotency-keys).
#
# @param issuer_name [String] A user-facing description for whoever is issuing the card.
#
# @param status [Symbol, Increase::Models::DigitalCardProfile::Status] The status of the Card Profile.
#
# @param text_color [Increase::Models::DigitalCardProfile::TextColor]
Expand Down
21 changes: 12 additions & 9 deletions lib/increase/models/digital_card_profile_clone_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ class DigitalCardProfileCloneParams < Increase::Internal::Type::BaseModel
# @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 @@ -55,19 +62,13 @@ class DigitalCardProfileCloneParams < Increase::Internal::Type::BaseModel
# @return [String, nil]
optional :description, String

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

# @!attribute text_color
# The Card's text color, specified as an RGB triple. The default is white.
#
# @return [Increase::Models::DigitalCardProfileCloneParams::TextColor, nil]
optional :text_color, -> { Increase::DigitalCardProfileCloneParams::TextColor }

# @!method initialize(digital_card_profile_id:, app_icon_file_id: nil, background_image_file_id: nil, card_description: nil, contact_email: nil, contact_phone: nil, contact_website: nil, description: nil, issuer_name: nil, text_color: nil, request_options: {})
# @!method initialize(digital_card_profile_id:, app_icon_file_id: nil, background_image_file_id: nil, card_description: nil, contact_email: nil, contact_name: nil, contact_phone: nil, contact_website: nil, description: nil, text_color: nil, request_options: {})
# @param digital_card_profile_id [String] The identifier of the Digital Card Profile to clone.
#
# @param app_icon_file_id [String] The identifier of the File containing the card's icon image.
Expand All @@ -78,14 +79,16 @@ class DigitalCardProfileCloneParams < Increase::Internal::Type::BaseModel
#
# @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.
#
# @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 text_color [Increase::Models::DigitalCardProfileCloneParams::TextColor]
# The Card's text color, specified as an RGB triple. The default is white.
#
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
Loading
Loading