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

Returns a new instance of IntrafiAccountEnrollments.



6
7
8
# File 'lib/increase/resources/intrafi_account_enrollments.rb', line 6

def initialize(client:)
  @client = client
end

Instance Method Details

#create(params = {}, opts = {}) ⇒ Increase::Models::IntrafiAccountEnrollment

Enroll an account in the IntraFi deposit sweep network.

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

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

Returns:



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

def create(params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/intrafi_account_enrollments"
  req[:body] = params
  req[:model] = Increase::Models::IntrafiAccountEnrollment
  @client.request(req, opts)
end

#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::IntrafiAccountEnrollment>

List IntraFi Account Enrollments

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :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 that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about idempotency.

  • :limit (Integer)

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

  • :status (Status)

Returns:



58
59
60
61
62
63
64
65
66
# File 'lib/increase/resources/intrafi_account_enrollments.rb', line 58

def list(params = {}, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/intrafi_account_enrollments"
  req[:query] = params
  req[:page] = Increase::Page
  req[:model] = Increase::Models::IntrafiAccountEnrollment
  @client.request(req, opts)
end

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

Get an IntraFi Account Enrollment

Parameters:

  • intrafi_account_enrollment_id (String)

    The identifier of the IntraFi Account Enrollment to retrieve.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



34
35
36
37
38
39
40
# File 'lib/increase/resources/intrafi_account_enrollments.rb', line 34

def retrieve(, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/intrafi_account_enrollments/#{}"
  req[:model] = Increase::Models::IntrafiAccountEnrollment
  @client.request(req, opts)
end

#unenroll(intrafi_account_enrollment_id, opts = {}) ⇒ 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.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



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

def unenroll(, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/intrafi_account_enrollments/#{}/unenroll"
  req[:model] = Increase::Models::IntrafiAccountEnrollment
  @client.request(req, opts)
end