Class: ThePlaidApi::BetaPartnerCustomerV1UpdateRequest

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

Overview

Request schema for ‘/beta/partner/customer/v1/update`.

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(end_customer_client_id:, client_id: SKIP, secret: SKIP, legal_entity_name: SKIP, redirect_uris: SKIP, bank_addendum_acceptance: SKIP, questionnaires: SKIP, additional_properties: nil) ⇒ BetaPartnerCustomerV1UpdateRequest

Returns a new instance of BetaPartnerCustomerV1UpdateRequest.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 76

def initialize(end_customer_client_id:, client_id: SKIP, secret: SKIP,
               legal_entity_name: SKIP, redirect_uris: SKIP,
               bank_addendum_acceptance: SKIP, questionnaires: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @client_id = client_id unless client_id == SKIP
  @secret = secret unless secret == SKIP
  @end_customer_client_id = end_customer_client_id
  @legal_entity_name = legal_entity_name unless legal_entity_name == SKIP
  @redirect_uris = redirect_uris unless redirect_uris == SKIP
  @bank_addendum_acceptance = bank_addendum_acceptance unless bank_addendum_acceptance == SKIP
  @questionnaires = questionnaires unless questionnaires == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#bank_addendum_acceptancePartnerEndCustomerBankAddendumAcceptance

The bank addendum acceptance for the end customer.



40
41
42
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 40

def bank_addendum_acceptance
  @bank_addendum_acceptance
end

#client_idString

Your Plaid API ‘client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.

Returns:

  • (String)


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

def client_id
  @client_id
end

#end_customer_client_idString

Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

Returns:

  • (String)


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

def end_customer_client_id
  @end_customer_client_id
end

Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

Returns:

  • (String)


31
32
33
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 31

def legal_entity_name
  @legal_entity_name
end

#questionnairesPartnerEndCustomerQuestionnaires

The questionnaires for the end customer.



44
45
46
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 44

def questionnaires
  @questionnaires
end

#redirect_urisArray[String]

Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

Returns:

  • (Array[String])


36
37
38
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 36

def redirect_uris
  @redirect_uris
end

#secretString

Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.

Returns:

  • (String)


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

def secret
  @secret
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 94

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  end_customer_client_id =
    hash.key?('end_customer_client_id') ? hash['end_customer_client_id'] : nil
  client_id = hash.key?('client_id') ? hash['client_id'] : SKIP
  secret = hash.key?('secret') ? hash['secret'] : SKIP
  legal_entity_name =
    hash.key?('legal_entity_name') ? hash['legal_entity_name'] : SKIP
  redirect_uris = hash.key?('redirect_uris') ? hash['redirect_uris'] : SKIP
  if hash['bank_addendum_acceptance']
    bank_addendum_acceptance = PartnerEndCustomerBankAddendumAcceptance.from_hash(hash['bank_addendum_acceptance'])
  end
  questionnaires = PartnerEndCustomerQuestionnaires.from_hash(hash['questionnaires']) if
    hash['questionnaires']

  # 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.
  BetaPartnerCustomerV1UpdateRequest.new(end_customer_client_id: end_customer_client_id,
                                         client_id: client_id,
                                         secret: secret,
                                         legal_entity_name: legal_entity_name,
                                         redirect_uris: redirect_uris,
                                         bank_addendum_acceptance: bank_addendum_acceptance,
                                         questionnaires: questionnaires,
                                         additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 47

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['client_id'] = 'client_id'
  @_hash['secret'] = 'secret'
  @_hash['end_customer_client_id'] = 'end_customer_client_id'
  @_hash['legal_entity_name'] = 'legal_entity_name'
  @_hash['redirect_uris'] = 'redirect_uris'
  @_hash['bank_addendum_acceptance'] = 'bank_addendum_acceptance'
  @_hash['questionnaires'] = 'questionnaires'
  @_hash
end

.nullablesObject

An array for nullable fields



72
73
74
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 72

def self.nullables
  []
end

.optionalsObject

An array for optional fields



60
61
62
63
64
65
66
67
68
69
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 60

def self.optionals
  %w[
    client_id
    secret
    legal_entity_name
    redirect_uris
    bank_addendum_acceptance
    questionnaires
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



139
140
141
142
143
144
145
146
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 139

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect},"\
  " end_customer_client_id: #{@end_customer_client_id.inspect}, legal_entity_name:"\
  " #{@legal_entity_name.inspect}, redirect_uris: #{@redirect_uris.inspect},"\
  " bank_addendum_acceptance: #{@bank_addendum_acceptance.inspect}, questionnaires:"\
  " #{@questionnaires.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



130
131
132
133
134
135
136
# File 'lib/the_plaid_api/models/beta_partner_customer_v1_update_request.rb', line 130

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, end_customer_client_id:"\
  " #{@end_customer_client_id}, legal_entity_name: #{@legal_entity_name}, redirect_uris:"\
  " #{@redirect_uris}, bank_addendum_acceptance: #{@bank_addendum_acceptance}, questionnaires:"\
  " #{@questionnaires}, additional_properties: #{@additional_properties}>"
end