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:



162
163
164
# File 'lib/increase/resources/card_push_transfers.rb', line 162

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:



130
131
132
133
134
135
136
137
# File 'lib/increase/resources/card_push_transfers.rb', line 130

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:



150
151
152
153
154
155
156
157
# File 'lib/increase/resources/card_push_transfers.rb', line 150

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: , 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.

  • 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:



52
53
54
55
56
57
58
59
60
61
# File 'lib/increase/resources/card_push_transfers.rb', line 52

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:



107
108
109
110
111
112
113
114
115
116
117
# File 'lib/increase/resources/card_push_transfers.rb', line 107

def list(params = {})
  parsed, options = Increase::CardPushTransferListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "card_push_transfers",
    query: parsed,
    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:



74
75
76
77
78
79
80
81
# File 'lib/increase/resources/card_push_transfers.rb', line 74

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