Class: Increase::Resources::CardPushTransfers

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardPushTransfers

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 CardPushTransfers.

Parameters:



175
176
177
# File 'lib/increase/resources/card_push_transfers.rb', line 175

def initialize(client:)
  @client = client
end

Instance Method Details

#approve(card_push_transfer_id, request_options: {}) ⇒ Increase::Models::CardPushTransfer

Approves a Card Push Transfer in a pending_approval state.

Parameters:

  • card_push_transfer_id (String)

    The identifier of the Card Push Transfer to approve.

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

Returns:

See Also:



143
144
145
146
147
148
149
150
# File 'lib/increase/resources/card_push_transfers.rb', line 143

def approve(card_push_transfer_id, params = {})
  @client.request(
    method: :post,
    path: ["card_push_transfers/%1$s/approve", card_push_transfer_id],
    model: Increase::CardPushTransfer,
    options: params[:request_options]
  )
end

#cancel(card_push_transfer_id, request_options: {}) ⇒ Increase::Models::CardPushTransfer

Cancels a Card Push Transfer in a pending_approval state.

Parameters:

  • card_push_transfer_id (String)

    The identifier of the pending Card Push Transfer to cancel.

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

Returns:

See Also:



163
164
165
166
167
168
169
170
# File 'lib/increase/resources/card_push_transfers.rb', line 163

def cancel(card_push_transfer_id, params = {})
  @client.request(
    method: :post,
    path: ["card_push_transfers/%1$s/cancel", card_push_transfer_id],
    model: Increase::CardPushTransfer,
    options: params[:request_options]
  )
end

#create(business_application_identifier:, card_token_id:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_name_prefix:, merchant_postal_code:, merchant_state:, presentment_amount:, recipient_name:, sender_address_city:, sender_address_line1:, sender_address_postal_code:, sender_address_state:, sender_name:, source_account_number_id:, merchant_legal_business_name: nil, merchant_street_address: nil, recipient_address_city: nil, recipient_address_line1: nil, recipient_address_postal_code: nil, recipient_address_state: nil, require_approval: nil, request_options: {}) ⇒ Increase::Models::CardPushTransfer

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

Create a Card Push Transfer

Parameters:

  • business_application_identifier (Symbol, Increase::Models::CardPushTransferCreateParams::BusinessApplicationIdentifier)

    The Business Application Identifier describes the type of transaction being perf

  • card_token_id (String)

    The Increase identifier for the Card Token that represents the card number you’r

  • merchant_category_code (String)

    The merchant category code (MCC) of the merchant (generally your business) sendi

  • merchant_city_name (String)

    The city name of the merchant (generally your business) sending the transfer.

  • merchant_name (String)

    The merchant name shows up as the statement descriptor for the transfer. This is

  • merchant_name_prefix (String)

    For certain Business Application Identifiers, the statement descriptor is ‘merch

  • merchant_postal_code (String)

    The postal code of the merchant (generally your business) sending the transfer.

  • merchant_state (String)

    The state of the merchant (generally your business) sending the transfer.

  • presentment_amount (Increase::Models::CardPushTransferCreateParams::PresentmentAmount)

    The amount to transfer. The receiving bank will convert this to the cardholder’s

  • recipient_name (String)

    The name of the funds recipient.

  • sender_address_city (String)

    The city of the sender.

  • sender_address_line1 (String)

    The address line 1 of the sender.

  • sender_address_postal_code (String)

    The postal code of the sender.

  • sender_address_state (String)

    The state of the sender.

  • sender_name (String)

    The name of the funds originator.

  • source_account_number_id (String)

    The identifier of the Account Number from which to send the transfer.

  • merchant_legal_business_name (String)

    The legal business name of the merchant (generally your business) sending the tr

  • merchant_street_address (String)

    The street address of the merchant (generally your business) sending the transfe

  • recipient_address_city (String)

    The city of the recipient. Required if the card is issued in Canada.

  • recipient_address_line1 (String)

    The first line of the recipient’s address. Required if the card is issued in Can

  • recipient_address_postal_code (String)

    The postal code of the recipient. Required if the card is issued in Canada.

  • recipient_address_state (String)

    The state or province of the recipient. Required if the card is issued in Canada

  • require_approval (Boolean)

    Whether the transfer requires explicit approval via the dashboard or API.

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

Returns:

See Also:



64
65
66
67
68
69
70
71
72
73
# File 'lib/increase/resources/card_push_transfers.rb', line 64

def create(params)
  parsed, options = Increase::CardPushTransferCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "card_push_transfers",
    body: parsed,
    model: Increase::CardPushTransfer,
    options: options
  )
end

#list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::CardPushTransfer>

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

List Card Push Transfers

Parameters:

Returns:

See Also:



119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/increase/resources/card_push_transfers.rb', line 119

def list(params = {})
  parsed, options = Increase::CardPushTransferListParams.dump_request(params)
  query = Increase::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "card_push_transfers",
    query: query,
    page: Increase::Internal::Page,
    model: Increase::CardPushTransfer,
    options: options
  )
end

#retrieve(card_push_transfer_id, request_options: {}) ⇒ Increase::Models::CardPushTransfer

Retrieve a Card Push Transfer

Parameters:

  • card_push_transfer_id (String)

    The identifier of the Card Push Transfer.

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

Returns:

See Also:



86
87
88
89
90
91
92
93
# File 'lib/increase/resources/card_push_transfers.rb', line 86

def retrieve(card_push_transfer_id, params = {})
  @client.request(
    method: :get,
    path: ["card_push_transfers/%1$s", card_push_transfer_id],
    model: Increase::CardPushTransfer,
    options: params[:request_options]
  )
end