Class: ThePlaidApi::TransferCreditUsageConfiguration

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

Overview

Specifies the originator’s expected usage of credits. 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 credit 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) ⇒ TransferCreditUsageConfiguration

Returns a new instance of TransferCreditUsageConfiguration.



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

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

Returns:

  • (String)


25
26
27
# File 'lib/the_plaid_api/models/transfer_credit_usage_configuration.rb', line 25

def expected_average_amount
  @expected_average_amount
end

#expected_frequencyOriginatorExpectedTransferFrequency

The originator’s expected transfer frequency.



17
18
19
# File 'lib/the_plaid_api/models/transfer_credit_usage_configuration.rb', line 17

def expected_frequency
  @expected_frequency
end

#expected_highest_amountString

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

Returns:

  • (String)


21
22
23
# File 'lib/the_plaid_api/models/transfer_credit_usage_configuration.rb', line 21

def expected_highest_amount
  @expected_highest_amount
end

#expected_monthly_amountString

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

Returns:

  • (String)


30
31
32
# File 'lib/the_plaid_api/models/transfer_credit_usage_configuration.rb', line 30

def expected_monthly_amount
  @expected_monthly_amount
end

#sec_codesArray[CreditAchClass]

Specifies the expected use cases for the originator’s credit 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 from the consumer in person via writing, or through online authorization, or via an electronic document signing, e.g. Docusign. For example language for online authorization, see the 2025 Nacha Operating Rules — Section 2.3.2, Authorization of Entries via Electronic Means. 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.

Returns:



48
49
50
# File 'lib/the_plaid_api/models/transfer_credit_usage_configuration.rb', line 48

def sec_codes
  @sec_codes
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
114
# File 'lib/the_plaid_api/models/transfer_credit_usage_configuration.rb', line 86

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



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

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



67
68
69
# File 'lib/the_plaid_api/models/transfer_credit_usage_configuration.rb', line 67

def self.nullables
  []
end

.optionalsObject

An array for optional fields



62
63
64
# File 'lib/the_plaid_api/models/transfer_credit_usage_configuration.rb', line 62

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



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

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.



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

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