Class: Increase::Resources::Simulations::CardBalanceInquiries

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/simulations/card_balance_inquiries.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardBalanceInquiries

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of CardBalanceInquiries.

Parameters:



64
65
66
# File 'lib/increase/resources/simulations/card_balance_inquiries.rb', line 64

def initialize(client:)
  @client = client
end

Instance Method Details

#create(balance: nil, card_id: nil, decline_reason: nil, digital_wallet_token_id: nil, event_subscription_id: nil, merchant_acceptor_id: nil, merchant_category_code: nil, merchant_city: nil, merchant_country: nil, merchant_descriptor: nil, merchant_state: nil, network_details: nil, network_risk_score: nil, physical_card_id: nil, terminal_id: nil, request_options: {}) ⇒ Increase::Models::CardPayment

Some parameter documentations has been truncated, see Models::Simulations::CardBalanceInquiryCreateParams for more details.

Simulates a balance inquiry on a [Card](#cards).

Parameters:

  • balance (Integer)

    The balance amount in cents. The account balance will be used if not provided.

  • card_id (String)

    The identifier of the Card to be authorized.

  • decline_reason (Symbol, Increase::Models::Simulations::CardBalanceInquiryCreateParams::DeclineReason)

    Forces a card decline with a specific reason. No real time decision will be sent

  • digital_wallet_token_id (String)

    The identifier of the Digital Wallet Token to be authorized.

  • event_subscription_id (String)

    The identifier of the Event Subscription to use. If provided, will override the

  • merchant_acceptor_id (String)

    The merchant identifier (commonly abbreviated as MID) of the merchant the card i

  • merchant_category_code (String)

    The Merchant Category Code (commonly abbreviated as MCC) of the merchant the car

  • merchant_city (String)

    The city the merchant resides in.

  • merchant_country (String)

    The country the merchant resides in.

  • merchant_descriptor (String)

    The merchant descriptor of the merchant the card is transacting with.

  • merchant_state (String)

    The state the merchant resides in.

  • network_details (Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails)

    Fields specific to a given card network.

  • network_risk_score (Integer)

    The risk score generated by the card network. For Visa this is the Visa Advanced

  • physical_card_id (String)

    The identifier of the Physical Card to be authorized.

  • terminal_id (String)

    The terminal identifier (commonly abbreviated as TID) of the terminal the card i

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



50
51
52
53
54
55
56
57
58
59
# File 'lib/increase/resources/simulations/card_balance_inquiries.rb', line 50

def create(params = {})
  parsed, options = Increase::Simulations::CardBalanceInquiryCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "simulations/card_balance_inquiries",
    body: parsed,
    model: Increase::CardPayment,
    options: options
  )
end