Class: VisaAcceptanceMergedSpec::RecipientInformation2
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::RecipientInformation2
- Defined in:
- lib/visa_acceptance_merged_spec/models/recipient_information2.rb
Overview
RecipientInformation2 Model.
Instance Attribute Summary collapse
-
#account_id ⇒ String
The account ID of the recipient.
-
#business_name ⇒ String
The business name of the recipient.
-
#country_code ⇒ String
The country code of the recipient.
-
#create_date ⇒ String
The date when the recipient's account was created.
-
#email ⇒ String
The email address of the recipient.
-
#risk_popularity_score ⇒ String
The risk popularity score of the recipient.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(account_id: SKIP, create_date: SKIP, email: SKIP, country_code: SKIP, business_name: SKIP, risk_popularity_score: SKIP, additional_properties: nil) ⇒ RecipientInformation2
constructor
A new instance of RecipientInformation2.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(account_id: SKIP, create_date: SKIP, email: SKIP, country_code: SKIP, business_name: SKIP, risk_popularity_score: SKIP, additional_properties: nil) ⇒ RecipientInformation2
Returns a new instance of RecipientInformation2.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 65 def initialize(account_id: SKIP, create_date: SKIP, email: SKIP, country_code: SKIP, business_name: SKIP, risk_popularity_score: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_id = account_id unless account_id == SKIP @create_date = create_date unless create_date == SKIP @email = email unless email == SKIP @country_code = country_code unless country_code == SKIP @business_name = business_name unless business_name == SKIP @risk_popularity_score = risk_popularity_score unless risk_popularity_score == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
The account ID of the recipient.
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 14 def account_id @account_id end |
#business_name ⇒ String
The business name of the recipient.
30 31 32 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 30 def business_name @business_name end |
#country_code ⇒ String
The country code of the recipient.
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 26 def country_code @country_code end |
#create_date ⇒ String
The date when the recipient's account was created.
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 18 def create_date @create_date end |
#email ⇒ String
The email address of the recipient
22 23 24 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 22 def email @email end |
#risk_popularity_score ⇒ String
The risk popularity score of the recipient.
34 35 36 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 34 def risk_popularity_score @risk_popularity_score end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 81 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('accountId') ? hash['accountId'] : SKIP create_date = hash.key?('createDate') ? hash['createDate'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP country_code = hash.key?('countryCode') ? hash['countryCode'] : SKIP business_name = hash.key?('businessName') ? hash['businessName'] : SKIP risk_popularity_score = hash.key?('riskPopularityScore') ? hash['riskPopularityScore'] : SKIP # 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. RecipientInformation2.new(account_id: account_id, create_date: create_date, email: email, country_code: country_code, business_name: business_name, risk_popularity_score: risk_popularity_score, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'accountId' @_hash['create_date'] = 'createDate' @_hash['email'] = 'email' @_hash['country_code'] = 'countryCode' @_hash['business_name'] = 'businessName' @_hash['risk_popularity_score'] = 'riskPopularityScore' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 49 def self.optionals %w[ account_id create_date email country_code business_name risk_popularity_score ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
119 120 121 122 123 124 125 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 119 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id.inspect}, create_date: #{@create_date.inspect},"\ " email: #{@email.inspect}, country_code: #{@country_code.inspect}, business_name:"\ " #{@business_name.inspect}, risk_popularity_score: #{@risk_popularity_score.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
111 112 113 114 115 116 |
# File 'lib/visa_acceptance_merged_spec/models/recipient_information2.rb', line 111 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id}, create_date: #{@create_date}, email: #{@email},"\ " country_code: #{@country_code}, business_name: #{@business_name}, risk_popularity_score:"\ " #{@risk_popularity_score}, additional_properties: #{@additional_properties}>" end |