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
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 254
openapi_spec_hash: 55fb271eb29805e8a49ed72fb5ed8843
config_hash: f0e1844d06c76a9e145f7986d993dda6
configured_endpoints: 255
openapi_spec_hash: 8ece1240dd922e927487c86b373ce942
config_hash: de151ebd21a0bd391662389b310a8f49
1 change: 1 addition & 0 deletions lib/increase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
require_relative "increase/models/card_push_transfer_create_params"
require_relative "increase/models/card_push_transfer_list_params"
require_relative "increase/models/card_push_transfer_retrieve_params"
require_relative "increase/models/card_renew_params"
require_relative "increase/models/card_retrieve_params"
require_relative "increase/models/card_token"
require_relative "increase/models/card_token_capabilities"
Expand Down
2 changes: 2 additions & 0 deletions lib/increase/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ module Increase

CardPushTransferRetrieveParams = Increase::Models::CardPushTransferRetrieveParams

CardRenewParams = Increase::Models::CardRenewParams

CardRetrieveParams = Increase::Models::CardRetrieveParams

CardToken = Increase::Models::CardToken
Expand Down
20 changes: 12 additions & 8 deletions lib/increase/models/account_statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,19 @@ class AccountStatement < Increase::Internal::Type::BaseModel
# @!attribute statement_period_end
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the end
# of the period the Account Statement covers. The statement covers all
# transactions up to, but not including this timestamp. Usually, this is the
# beginning of the following month.
# transactions up to, but not including this timestamp. Statement periods are
# measured in UTC days, so this is usually midnight UTC on the first day of the
# following month.
#
# @return [Time]
required :statement_period_end, Time

# @!attribute statement_period_start
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the
# start of the period the Account Statement covers. This is the first moment of
# the statement period and is inclusive. Usually, this is the beginning of the
# month this statement covers.
# the statement period and is inclusive. Statement periods are measured in UTC
# days, so this is usually midnight UTC on the first day of the month this
# statement covers.
#
# @return [Time]
required :statement_period_start, Time
Expand Down Expand Up @@ -96,14 +98,16 @@ class AccountStatement < Increase::Internal::Type::BaseModel
# @param statement_period_end [Time]
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the end
# of the period the Account Statement covers. The statement covers all
# transactions up to, but not including this timestamp. Usually, this is the
# beginning of the following month.
# transactions up to, but not including this timestamp. Statement periods are
# measured in UTC days, so this is usually midnight UTC on the first day of the
# following month.
#
# @param statement_period_start [Time]
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the
# start of the period the Account Statement covers. This is the first moment of
# the statement period and is inclusive. Usually, this is the beginning of the
# month this statement covers.
# the statement period and is inclusive. Statement periods are measured in UTC
# days, so this is usually midnight UTC on the first day of the month this
# statement covers.
#
# @param type [Symbol, Increase::Models::AccountStatement::Type]
# A constant representing the object's type. For this resource it will always be
Expand Down
104 changes: 103 additions & 1 deletion lib/increase/models/card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@ class Card < Increase::Internal::Type::BaseModel
# @return [String]
required :last4, String

# @!attribute renewals
# Completed renewals of this Card, sorted by `renewed_at` in ascending order. Each
# renewal records the expiration date the Card had before it was renewed.
#
# @return [Array<Increase::Models::Card::Renewal>]
required :renewals, -> { Increase::Internal::Type::ArrayOf[Increase::Card::Renewal] }

# @!attribute replacement_for
# Details about the Card this Card replaces, if it was created as a replacement.
#
# @return [Increase::Models::Card::ReplacementFor, nil]
required :replacement_for, -> { Increase::Card::ReplacementFor }, nil?: true

# @!attribute status
# This indicates if payments can be made with the card.
#
Expand All @@ -107,7 +120,7 @@ class Card < Increase::Internal::Type::BaseModel
# @return [Symbol, Increase::Models::Card::Type]
required :type, enum: -> { Increase::Card::Type }

# @!method initialize(id:, account_id:, authorization_controls:, billing_address:, bin:, cardholder_name:, created_at:, description:, digital_wallet:, entity_id:, expiration_month:, expiration_year:, idempotency_key:, last4:, status:, type:)
# @!method initialize(id:, account_id:, authorization_controls:, billing_address:, bin:, cardholder_name:, created_at:, description:, digital_wallet:, entity_id:, expiration_month:, expiration_year:, idempotency_key:, last4:, renewals:, replacement_for:, status:, type:)
# Cards may operate on credit, debit, or prepaid BINs. They’ll immediately work
# for online purchases after you create them. All cards work on a good funds
# model, and maintain a maximum limit of 100% of the Account’s available balance
Expand Down Expand Up @@ -153,6 +166,13 @@ class Card < Increase::Internal::Type::BaseModel
#
# @param last4 [String] The last 4 digits of the Card's Primary Account Number.
#
# @param renewals [Array<Increase::Models::Card::Renewal>]
# Completed renewals of this Card, sorted by `renewed_at` in ascending order. Each
# renewal records the expiration date the Card had before it was renewed.
#
# @param replacement_for [Increase::Models::Card::ReplacementFor, nil]
# Details about the Card this Card replaces, if it was created as a replacement.
#
# @param status [Symbol, Increase::Models::Card::Status]
# This indicates if payments can be made with the card.
#
Expand Down Expand Up @@ -696,6 +716,88 @@ class DigitalWallet < Increase::Internal::Type::BaseModel
# over SMS.
end

class Renewal < Increase::Internal::Type::BaseModel
# @!attribute previous_expiration_month
# The month the Card expired in before this renewal, in M format (e.g., August is
# 8).
#
# @return [Integer]
required :previous_expiration_month, Integer

# @!attribute previous_expiration_year
# The year the Card expired in before this renewal, in YYYY format (e.g., 2025).
#
# @return [Integer]
required :previous_expiration_year, Integer

# @!attribute renewed_at
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
# the Card was renewed.
#
# @return [Time]
required :renewed_at, Time

# @!method initialize(previous_expiration_month:, previous_expiration_year:, renewed_at:)
# @param previous_expiration_month [Integer]
# The month the Card expired in before this renewal, in M format (e.g., August is
# 8).
#
# @param previous_expiration_year [Integer]
# The year the Card expired in before this renewal, in YYYY format (e.g., 2025).
#
# @param renewed_at [Time]
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
# the Card was renewed.
end

# @see Increase::Models::Card#replacement_for
class ReplacementFor < Increase::Internal::Type::BaseModel
# @!attribute card_id
# The identifier of the replaced Card.
#
# @return [String]
required :card_id, String

# @!attribute reason
# Why the Card was replaced. Only `expiring` notifies merchants that have the
# replaced Card on file of the new Card.
#
# @return [Symbol, Increase::Models::Card::ReplacementFor::Reason]
required :reason, enum: -> { Increase::Card::ReplacementFor::Reason }

# @!method initialize(card_id:, reason:)
# Details about the Card this Card replaces, if it was created as a replacement.
#
# @param card_id [String] The identifier of the replaced Card.
#
# @param reason [Symbol, Increase::Models::Card::ReplacementFor::Reason]
# Why the Card was replaced. Only `expiring` notifies merchants that have the
# replaced Card on file of the new Card.

# Why the Card was replaced. Only `expiring` notifies merchants that have the
# replaced Card on file of the new Card.
#
# @see Increase::Models::Card::ReplacementFor#reason
module Reason
extend Increase::Internal::Type::Enum

# The replaced card is expiring. Merchants with the replaced card on file will be notified of the new card.
EXPIRING = :expiring

# The replaced card was lost. Merchants will not be notified of the new card.
LOST = :lost

# The replaced card was stolen. Merchants will not be notified of the new card.
STOLEN = :stolen

# The replaced card was used fraudulently. Merchants will not be notified of the new card.
FRAUD = :fraud

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

# This indicates if payments can be made with the card.
#
# @see Increase::Models::Card#status
Expand Down
61 changes: 60 additions & 1 deletion lib/increase/models/card_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ class CardCreateParams < Increase::Internal::Type::BaseModel
# @return [String, nil]
optional :entity_id, String

# @!method initialize(account_id:, authorization_controls: nil, billing_address: nil, cardholder_name: nil, description: nil, digital_wallet: nil, entity_id: nil, request_options: {})
# @!attribute replacement_for
# Details about the Card this Card replaces. Supply this when issuing a new Card
# to take over from an existing one. The replaced Card is not affected.
#
# @return [Increase::Models::CardCreateParams::ReplacementFor, nil]
optional :replacement_for, -> { Increase::CardCreateParams::ReplacementFor }

# @!method initialize(account_id:, authorization_controls: nil, billing_address: nil, cardholder_name: nil, description: nil, digital_wallet: nil, entity_id: nil, replacement_for: nil, request_options: {})
# @param account_id [String] The Account the card should belong to.
#
# @param authorization_controls [Increase::Models::CardCreateParams::AuthorizationControls]
Expand All @@ -80,6 +87,10 @@ class CardCreateParams < Increase::Internal::Type::BaseModel
# The Entity the card belongs to. You only need to supply this in rare situations
# when the card is not for the Account holder.
#
# @param replacement_for [Increase::Models::CardCreateParams::ReplacementFor]
# Details about the Card this Card replaces. Supply this when issuing a new Card
# to take over from an existing one. The replaced Card is not affected.
#
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]

class AuthorizationControls < Increase::Internal::Type::BaseModel
Expand Down Expand Up @@ -598,6 +609,54 @@ class DigitalWallet < Increase::Internal::Type::BaseModel
# A phone number that can be used to contact and verify the cardholder via
# one-time passcode over SMS.
end

class ReplacementFor < Increase::Internal::Type::BaseModel
# @!attribute card_id
# The identifier of the Card being replaced.
#
# @return [String]
required :card_id, String

# @!attribute reason
# Why the Card is being replaced. Only `expiring` notifies merchants that have the
# replaced Card on file of the new Card.
#
# @return [Symbol, Increase::Models::CardCreateParams::ReplacementFor::Reason]
required :reason, enum: -> { Increase::CardCreateParams::ReplacementFor::Reason }

# @!method initialize(card_id:, reason:)
# Details about the Card this Card replaces. Supply this when issuing a new Card
# to take over from an existing one. The replaced Card is not affected.
#
# @param card_id [String] The identifier of the Card being replaced.
#
# @param reason [Symbol, Increase::Models::CardCreateParams::ReplacementFor::Reason]
# Why the Card is being replaced. Only `expiring` notifies merchants that have the
# replaced Card on file of the new Card.

# Why the Card is being replaced. Only `expiring` notifies merchants that have the
# replaced Card on file of the new Card.
#
# @see Increase::Models::CardCreateParams::ReplacementFor#reason
module Reason
extend Increase::Internal::Type::Enum

# The replaced card is expiring. Merchants with the replaced card on file will be notified of the new card.
EXPIRING = :expiring

# The replaced card was lost. Merchants will not be notified of the new card.
LOST = :lost

# The replaced card was stolen. Merchants will not be notified of the new card.
STOLEN = :stolen

# The replaced card was used fraudulently. Merchants will not be notified of the new card.
FRAUD = :fraud

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
end
22 changes: 22 additions & 0 deletions lib/increase/models/card_renew_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

module Increase
module Models
# @see Increase::Resources::Cards#renew
class CardRenewParams < Increase::Internal::Type::BaseModel
extend Increase::Internal::Type::RequestParameters::Converter
include Increase::Internal::Type::RequestParameters

# @!attribute card_id
# The identifier of the Card to renew.
#
# @return [String]
required :card_id, String

# @!method initialize(card_id:, request_options: {})
# @param card_id [String] The identifier of the Card to renew.
#
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
end
end
end
12 changes: 8 additions & 4 deletions lib/increase/models/entity_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ class Corporation < Increase::Internal::Type::BaseModel
# @!attribute industry_code
# The North American Industry Classification System (NAICS) code for the
# corporation's primary line of business. This is a number, like `5132` for
# `Software Publishers`. A full list of classification codes is available
# `Software Publishers`. Increase uses the 2022 version of NAICS. A full list of
# classification codes is available
# [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes).
#
# @return [String, nil]
Expand Down Expand Up @@ -280,7 +281,8 @@ class Corporation < Increase::Internal::Type::BaseModel
# @param industry_code [String]
# The North American Industry Classification System (NAICS) code for the
# corporation's primary line of business. This is a number, like `5132` for
# `Software Publishers`. A full list of classification codes is available
# `Software Publishers`. Increase uses the 2022 version of NAICS. A full list of
# classification codes is available
# [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes).
#
# @param website [String]
Expand Down Expand Up @@ -1749,7 +1751,8 @@ class SoleProprietorship < Increase::Internal::Type::BaseModel
# @!attribute industry_code
# The North American Industry Classification System (NAICS) code for the sole
# proprietorship's primary line of business. This is a number, like `5132` for
# `Software Publishers`. A full list of classification codes is available
# `Software Publishers`. Increase uses the 2022 version of NAICS. A full list of
# classification codes is available
# [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes).
#
# @return [String, nil]
Expand Down Expand Up @@ -1792,7 +1795,8 @@ class SoleProprietorship < Increase::Internal::Type::BaseModel
# @param industry_code [String]
# The North American Industry Classification System (NAICS) code for the sole
# proprietorship's primary line of business. This is a number, like `5132` for
# `Software Publishers`. A full list of classification codes is available
# `Software Publishers`. Increase uses the 2022 version of NAICS. A full list of
# classification codes is available
# [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes).
#
# @param tax_identifier [String]
Expand Down
Loading
Loading