Class: ThePlaidApi::PaymentInitiationStandingOrderMetadata

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

Overview

Metadata specifically related to valid Payment Initiation standing order configurations for the institution.

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(supports_standing_order_end_date:, supports_standing_order_negative_execution_days:, valid_standing_order_intervals:, additional_properties: nil) ⇒ PaymentInitiationStandingOrderMetadata

Returns a new instance of PaymentInitiationStandingOrderMetadata.



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

def initialize(supports_standing_order_end_date:,
               supports_standing_order_negative_execution_days:,
               valid_standing_order_intervals:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @supports_standing_order_end_date = supports_standing_order_end_date
  @supports_standing_order_negative_execution_days = supports_standing_order_negative_execution_days
  @valid_standing_order_intervals = valid_standing_order_intervals
  @additional_properties = additional_properties
end

Instance Attribute Details

#supports_standing_order_end_dateTrueClass | FalseClass

Indicates whether the institution supports closed-ended standing orders by providing an end date.

Returns:

  • (TrueClass | FalseClass)


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

def supports_standing_order_end_date
  @supports_standing_order_end_date
end

#supports_standing_order_negative_execution_daysTrueClass | FalseClass

This is only applicable to ‘MONTHLY` standing orders. Indicates whether the institution supports negative integers (-1 to -5) for setting up a `MONTHLY` standing order relative to the end of the month.

Returns:

  • (TrueClass | FalseClass)


22
23
24
# File 'lib/the_plaid_api/models/payment_initiation_standing_order_metadata.rb', line 22

def supports_standing_order_negative_execution_days
  @supports_standing_order_negative_execution_days
end

#valid_standing_order_intervalsArray[PaymentScheduleInterval]

A list of the valid standing order intervals supported by the institution.

Returns:



26
27
28
# File 'lib/the_plaid_api/models/payment_initiation_standing_order_metadata.rb', line 26

def valid_standing_order_intervals
  @valid_standing_order_intervals
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/the_plaid_api/models/payment_initiation_standing_order_metadata.rb', line 63

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  supports_standing_order_end_date =
    hash.key?('supports_standing_order_end_date') ? hash['supports_standing_order_end_date'] : nil
  supports_standing_order_negative_execution_days =
    hash.key?('supports_standing_order_negative_execution_days') ? hash['supports_standing_order_negative_execution_days'] : nil
  valid_standing_order_intervals =
    hash.key?('valid_standing_order_intervals') ? hash['valid_standing_order_intervals'] : 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.
  PaymentInitiationStandingOrderMetadata.new(supports_standing_order_end_date: supports_standing_order_end_date,
                                             supports_standing_order_negative_execution_days: supports_standing_order_negative_execution_days,
                                             valid_standing_order_intervals: valid_standing_order_intervals,
                                             additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



29
30
31
32
33
34
35
36
37
38
# File 'lib/the_plaid_api/models/payment_initiation_standing_order_metadata.rb', line 29

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['supports_standing_order_end_date'] =
    'supports_standing_order_end_date'
  @_hash['supports_standing_order_negative_execution_days'] =
    'supports_standing_order_negative_execution_days'
  @_hash['valid_standing_order_intervals'] =
    'valid_standing_order_intervals'
  @_hash
end

.nullablesObject

An array for nullable fields



46
47
48
# File 'lib/the_plaid_api/models/payment_initiation_standing_order_metadata.rb', line 46

def self.nullables
  []
end

.optionalsObject

An array for optional fields



41
42
43
# File 'lib/the_plaid_api/models/payment_initiation_standing_order_metadata.rb', line 41

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



98
99
100
101
102
103
104
105
106
# File 'lib/the_plaid_api/models/payment_initiation_standing_order_metadata.rb', line 98

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} supports_standing_order_end_date:"\
  " #{@supports_standing_order_end_date.inspect},"\
  ' supports_standing_order_negative_execution_days:'\
  " #{@supports_standing_order_negative_execution_days.inspect},"\
  " valid_standing_order_intervals: #{@valid_standing_order_intervals.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



89
90
91
92
93
94
95
# File 'lib/the_plaid_api/models/payment_initiation_standing_order_metadata.rb', line 89

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} supports_standing_order_end_date: #{@supports_standing_order_end_date},"\
  ' supports_standing_order_negative_execution_days:'\
  " #{@supports_standing_order_negative_execution_days}, valid_standing_order_intervals:"\
  " #{@valid_standing_order_intervals}, additional_properties: #{@additional_properties}>"
end