Class: Increase::Resources::IntrafiAccountEnrollments

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ IntrafiAccountEnrollments

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

Parameters:



107
108
109
# File 'lib/increase/resources/intrafi_account_enrollments.rb', line 107

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_id: , email_address: , request_options: {}) ⇒ Increase::Models::IntrafiAccountEnrollment

Enroll an account in the IntraFi deposit sweep network

Parameters:

  • account_id (String)

    The identifier for the account to be added to IntraFi.

  • email_address (String)

    The contact email for the account owner, to be shared with IntraFi.

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

Returns:

See Also:



19
20
21
22
23
24
25
26
27
28
# File 'lib/increase/resources/intrafi_account_enrollments.rb', line 19

def create(params)
  parsed, options = Increase::IntrafiAccountEnrollmentCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "intrafi_account_enrollments",
    body: parsed,
    model: Increase::IntrafiAccountEnrollment,
    options: options
  )
end

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

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

List IntraFi Account Enrollments

Parameters:

  • account_id (String)

    Filter IntraFi Account Enrollments to the one belonging to an account.

  • cursor (String)

    Return the page of entries after this one.

  • idempotency_key (String)

    Filter records to the one with the specified ‘idempotency_key` you chose for tha

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

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

Returns:

See Also:



72
73
74
75
76
77
78
79
80
81
82
# File 'lib/increase/resources/intrafi_account_enrollments.rb', line 72

def list(params = {})
  parsed, options = Increase::IntrafiAccountEnrollmentListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "intrafi_account_enrollments",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::IntrafiAccountEnrollment,
    options: options
  )
end

#retrieve(intrafi_account_enrollment_id, request_options: {}) ⇒ Increase::Models::IntrafiAccountEnrollment

Get an IntraFi Account Enrollment

Parameters:

  • intrafi_account_enrollment_id (String)

    The identifier of the IntraFi Account Enrollment to retrieve.

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

Returns:

See Also:



41
42
43
44
45
46
47
48
# File 'lib/increase/resources/intrafi_account_enrollments.rb', line 41

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

#unenroll(intrafi_account_enrollment_id, request_options: {}) ⇒ Increase::Models::IntrafiAccountEnrollment

Unenroll an account from IntraFi

Parameters:

  • intrafi_account_enrollment_id (String)

    The Identifier of the IntraFi Account Enrollment to remove from IntraFi.

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

Returns:

See Also:



95
96
97
98
99
100
101
102
# File 'lib/increase/resources/intrafi_account_enrollments.rb', line 95

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