Class: ShellDataReportingApIs::AssociatedAccount
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::AssociatedAccount
- Defined in:
- lib/shell_data_reporting_ap_is/models/associated_account.rb
Overview
AssociatedAccount Model.
Instance Attribute Summary collapse
-
#associated_account_full_name ⇒ String
Full name of the Associated Account associated with the Payer.
-
#associated_account_id ⇒ Integer
Account identifier of the Associated Account associated with the Payer.
-
#associated_account_number ⇒ String
Account number of the Associated Account associated with the Payer.
-
#associated_account_short_name ⇒ String
Account associated with the Payer.
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(associated_account_id = SKIP, associated_account_number = SKIP, associated_account_short_name = SKIP, associated_account_full_name = SKIP) ⇒ AssociatedAccount
constructor
A new instance of AssociatedAccount.
Methods inherited from BaseModel
Constructor Details
#initialize(associated_account_id = SKIP, associated_account_number = SKIP, associated_account_short_name = SKIP, associated_account_full_name = SKIP) ⇒ AssociatedAccount
Returns a new instance of AssociatedAccount.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 58 def initialize(associated_account_id = SKIP, associated_account_number = SKIP, associated_account_short_name = SKIP, associated_account_full_name = SKIP) @associated_account_id = associated_account_id unless associated_account_id == SKIP unless associated_account_number == SKIP @associated_account_number = associated_account_number end unless associated_account_short_name == SKIP @associated_account_short_name = associated_account_short_name end unless associated_account_full_name == SKIP @associated_account_full_name = associated_account_full_name end end |
Instance Attribute Details
#associated_account_full_name ⇒ String
Full name of the Associated Account associated with the Payer.
26 27 28 |
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 26 def associated_account_full_name @associated_account_full_name end |
#associated_account_id ⇒ Integer
Account identifier of the Associated Account associated with the Payer.
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 14 def associated_account_id @associated_account_id end |
#associated_account_number ⇒ String
Account number of the Associated Account associated with the Payer.
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 18 def associated_account_number @associated_account_number end |
#associated_account_short_name ⇒ String
Account associated with the Payer.
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 22 def associated_account_short_name @associated_account_short_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 78 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. associated_account_id = hash.key?('AssociatedAccountId') ? hash['AssociatedAccountId'] : SKIP associated_account_number = hash.key?('AssociatedAccountNumber') ? hash['AssociatedAccountNumber'] : SKIP associated_account_short_name = hash.key?('AssociatedAccountShortName') ? hash['AssociatedAccountShortName'] : SKIP associated_account_full_name = hash.key?('AssociatedAccountFullName') ? hash['AssociatedAccountFullName'] : SKIP # Create object from extracted values. AssociatedAccount.new(associated_account_id, associated_account_number, associated_account_short_name, associated_account_full_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['associated_account_id'] = 'AssociatedAccountId' @_hash['associated_account_number'] = 'AssociatedAccountNumber' @_hash['associated_account_short_name'] = 'AssociatedAccountShortName' @_hash['associated_account_full_name'] = 'AssociatedAccountFullName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 52 53 54 55 56 |
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 49 def self.nullables %w[ associated_account_id associated_account_number associated_account_short_name associated_account_full_name ] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 39 def self.optionals %w[ associated_account_id associated_account_number associated_account_short_name associated_account_full_name ] end |