Class: ThePlaidApi::TransferDebitUsageConfiguration

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/the_plaid_api/models/transfer_debit_usage_configuration.rb

Overview

Specifies the originator’s expected usage of debits. For all dollar amounts, use a decimal string with two digits of precision e.g. “10.00”. This field is required if the originator is expected to process debit transfers.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(expected_frequency:, expected_highest_amount:, expected_average_amount:, expected_monthly_amount:, sec_codes:, additional_properties: nil) ⇒ TransferDebitUsageConfiguration

Returns a new instance of TransferDebitUsageConfiguration.



70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 70

def initialize(expected_frequency:, expected_highest_amount:,
               expected_average_amount:, expected_monthly_amount:,
               sec_codes:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @expected_frequency = expected_frequency
  @expected_highest_amount = expected_highest_amount
  @expected_average_amount = expected_average_amount
  @expected_monthly_amount = expected_monthly_amount
  @sec_codes = sec_codes
  @additional_properties = additional_properties
end

Instance Attribute Details

#expected_average_amountString

The originator’s expected average amount per debit.

Returns:

  • (String)


24
25
26
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 24

def expected_average_amount
  @expected_average_amount
end

#expected_frequencyOriginatorExpectedTransferFrequency

The originator’s expected transfer frequency.



16
17
18
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 16

def expected_frequency
  @expected_frequency
end

#expected_highest_amountString

The originator’s expected highest amount for a single debit transfer.

Returns:

  • (String)


20
21
22
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 20

def expected_highest_amount
  @expected_highest_amount
end

#expected_monthly_amountString

The originator’s monthly expected ACH debit processing amount for the next 6-12 months.

Returns:

  • (String)


29
30
31
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 29

def expected_monthly_amount
  @expected_monthly_amount
end

#sec_codesArray[AchClass]

Specifies the expected use cases for the originator’s debit transfers. This should be a list that contains one or more of the following codes: ‘“ccd”` - Corporate Credit or Debit - fund transfer between two corporate bank accounts `“ppd”` - Prearranged Payment or Deposit - The transfer is part of a pre-existing relationship with a consumer. Authorization was obtained in writing either in person or via an electronic document signing, e.g. Docusign, by the consumer. Can be used for credits or debits. `“web”` - Internet-Initiated Entry. The transfer debits a consumer’s bank account. Authorization from the consumer is obtained over the Internet (e.g. a web or mobile application). Can be used for single debits or recurring debits. `“tel”` - Telephone-Initiated Entry. The transfer debits a consumer. Debit authorization has been received orally over the telephone via a recorded call.

Returns:



47
48
49
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 47

def sec_codes
  @sec_codes
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 85

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  expected_frequency =
    hash.key?('expected_frequency') ? hash['expected_frequency'] : nil
  expected_highest_amount =
    hash.key?('expected_highest_amount') ? hash['expected_highest_amount'] : nil
  expected_average_amount =
    hash.key?('expected_average_amount') ? hash['expected_average_amount'] : nil
  expected_monthly_amount =
    hash.key?('expected_monthly_amount') ? hash['expected_monthly_amount'] : nil
  sec_codes = hash.key?('sec_codes') ? hash['sec_codes'] : nil

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  TransferDebitUsageConfiguration.new(expected_frequency: expected_frequency,
                                      expected_highest_amount: expected_highest_amount,
                                      expected_average_amount: expected_average_amount,
                                      expected_monthly_amount: expected_monthly_amount,
                                      sec_codes: sec_codes,
                                      additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



50
51
52
53
54
55
56
57
58
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 50

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['expected_frequency'] = 'expected_frequency'
  @_hash['expected_highest_amount'] = 'expected_highest_amount'
  @_hash['expected_average_amount'] = 'expected_average_amount'
  @_hash['expected_monthly_amount'] = 'expected_monthly_amount'
  @_hash['sec_codes'] = 'sec_codes'
  @_hash
end

.nullablesObject

An array for nullable fields



66
67
68
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 66

def self.nullables
  []
end

.optionalsObject

An array for optional fields



61
62
63
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 61

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



125
126
127
128
129
130
131
132
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 125

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} expected_frequency: #{@expected_frequency.inspect},"\
  " expected_highest_amount: #{@expected_highest_amount.inspect}, expected_average_amount:"\
  " #{@expected_average_amount.inspect}, expected_monthly_amount:"\
  " #{@expected_monthly_amount.inspect}, sec_codes: #{@sec_codes.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



116
117
118
119
120
121
122
# File 'lib/the_plaid_api/models/transfer_debit_usage_configuration.rb', line 116

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} expected_frequency: #{@expected_frequency}, expected_highest_amount:"\
  " #{@expected_highest_amount}, expected_average_amount: #{@expected_average_amount},"\
  " expected_monthly_amount: #{@expected_monthly_amount}, sec_codes: #{@sec_codes},"\
  " additional_properties: #{@additional_properties}>"
end