Class: ModernTreasury::CounterpartyCollectAccountResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/modern_treasury/models/counterparty_collect_account_response.rb

Overview

CounterpartyCollectAccountResponse Model.

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(id:, is_resend:, form_link:) ⇒ CounterpartyCollectAccountResponse

Returns a new instance of CounterpartyCollectAccountResponse.



48
49
50
51
52
# File 'lib/modern_treasury/models/counterparty_collect_account_response.rb', line 48

def initialize(id:, is_resend:, form_link:)
  @id = id
  @is_resend = is_resend
  @form_link = form_link
end

Instance Attribute Details

This is the link to the secure Modern Treasury form. By default, Modern Treasury will send an email to your counterparty that includes a link to this form. However, if ‘send_email` is passed as `false` in the body then Modern Treasury will not send the email and you can send it to the counterparty directly.

Returns:

  • (String)


27
28
29
# File 'lib/modern_treasury/models/counterparty_collect_account_response.rb', line 27

def form_link
  @form_link
end

#idString

The id of the existing counterparty.

Returns:

  • (String)


14
15
16
# File 'lib/modern_treasury/models/counterparty_collect_account_response.rb', line 14

def id
  @id
end

#is_resendTrueClass | FalseClass

This field will be ‘true` if an email requesting account details has already been sent to this counterparty.

Returns:

  • (TrueClass | FalseClass)


19
20
21
# File 'lib/modern_treasury/models/counterparty_collect_account_response.rb', line 19

def is_resend
  @is_resend
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/modern_treasury/models/counterparty_collect_account_response.rb', line 55

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash.key?('id') ? hash['id'] : nil
  is_resend = hash.key?('is_resend') ? hash['is_resend'] : nil
  form_link = hash.key?('form_link') ? hash['form_link'] : nil

  # Create object from extracted values.
  CounterpartyCollectAccountResponse.new(id: id,
                                         is_resend: is_resend,
                                         form_link: form_link)
end

.namesObject

A mapping from model property names to API property names.



30
31
32
33
34
35
36
# File 'lib/modern_treasury/models/counterparty_collect_account_response.rb', line 30

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'id'
  @_hash['is_resend'] = 'is_resend'
  @_hash['form_link'] = 'form_link'
  @_hash
end

.nullablesObject

An array for nullable fields



44
45
46
# File 'lib/modern_treasury/models/counterparty_collect_account_response.rb', line 44

def self.nullables
  []
end

.optionalsObject

An array for optional fields



39
40
41
# File 'lib/modern_treasury/models/counterparty_collect_account_response.rb', line 39

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



76
77
78
79
80
# File 'lib/modern_treasury/models/counterparty_collect_account_response.rb', line 76

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id.inspect}, is_resend: #{@is_resend.inspect}, form_link:"\
  " #{@form_link.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



70
71
72
73
# File 'lib/modern_treasury/models/counterparty_collect_account_response.rb', line 70

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id}, is_resend: #{@is_resend}, form_link: #{@form_link}>"
end