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

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

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:



75
76
77
# File 'lib/increase/resources/simulations/card_balance_inquiries.rb', line 75

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

Simulates a balance inquiry on a Card.

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 default real time event subscription. Because you can only create one real time decision event subscription, you can use this field to route events to any specified event subscription for testing purposes.

  • merchant_acceptor_id (String)

    The merchant identifier (commonly abbreviated as MID) of the merchant the card is transacting with.

  • merchant_category_code (String)

    The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with.

  • 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 Authorization risk score, from 0 to 99, where 99 is the riskiest.

  • 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 is transacting with.

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

Returns:

See Also:



61
62
63
64
65
66
67
68
69
70
# File 'lib/increase/resources/simulations/card_balance_inquiries.rb', line 61

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