Class: ShellDataReportingApIs::AssociatedAccount

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_data_reporting_ap_is/models/associated_account.rb

Overview

AssociatedAccount Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

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( = SKIP,
                = SKIP,
                = SKIP,
                = SKIP)
  @associated_account_id =  unless  == SKIP
  unless  == SKIP
    @associated_account_number =
      
  end
  unless  == SKIP
    @associated_account_short_name =
      
  end
  unless  == SKIP
    @associated_account_full_name =
      
  end
end

Instance Attribute Details

#associated_account_full_nameString

Full name of the Associated Account associated with the Payer.

Returns:

  • (String)


26
27
28
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 26

def 
  @associated_account_full_name
end

#associated_account_idInteger

Account identifier of the Associated Account associated with the Payer.

Returns:

  • (Integer)


14
15
16
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 14

def 
  @associated_account_id
end

#associated_account_numberString

Account number of the Associated Account associated with the Payer.

Returns:

  • (String)


18
19
20
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 18

def 
  @associated_account_number
end

#associated_account_short_nameString

Account associated with the Payer.

Returns:

  • (String)


22
23
24
# File 'lib/shell_data_reporting_ap_is/models/associated_account.rb', line 22

def 
  @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.
   =
    hash.key?('AssociatedAccountId') ? hash['AssociatedAccountId'] : SKIP
   =
    hash.key?('AssociatedAccountNumber') ? hash['AssociatedAccountNumber'] : SKIP
   =
    hash.key?('AssociatedAccountShortName') ? hash['AssociatedAccountShortName'] : SKIP
   =
    hash.key?('AssociatedAccountFullName') ? hash['AssociatedAccountFullName'] : SKIP

  # Create object from extracted values.
  AssociatedAccount.new(,
                        ,
                        ,
                        )
end

.namesObject

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

.nullablesObject

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

.optionalsObject

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