Class: ApiReference::NewAccountingSyncConfiguration
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ApiReference::NewAccountingSyncConfiguration
- Defined in:
- lib/api_reference/models/new_accounting_sync_configuration.rb
Overview
NewAccountingSyncConfiguration Model.
Instance Attribute Summary collapse
-
#accounting_providers ⇒ Array[AccountingProviderConfig]
TODO: Write general description for this method.
-
#excluded ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
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(excluded: SKIP, accounting_providers: SKIP, additional_properties: nil) ⇒ NewAccountingSyncConfiguration
constructor
A new instance of NewAccountingSyncConfiguration.
-
#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(excluded: SKIP, accounting_providers: SKIP, additional_properties: nil) ⇒ NewAccountingSyncConfiguration
Returns a new instance of NewAccountingSyncConfiguration.
44 45 46 47 48 49 50 51 52 |
# File 'lib/api_reference/models/new_accounting_sync_configuration.rb', line 44 def initialize(excluded: SKIP, accounting_providers: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @excluded = excluded unless excluded == SKIP @accounting_providers = accounting_providers unless accounting_providers == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#accounting_providers ⇒ Array[AccountingProviderConfig]
TODO: Write general description for this method
18 19 20 |
# File 'lib/api_reference/models/new_accounting_sync_configuration.rb', line 18 def accounting_providers @accounting_providers end |
#excluded ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/api_reference/models/new_accounting_sync_configuration.rb', line 14 def excluded @excluded 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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/api_reference/models/new_accounting_sync_configuration.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. excluded = hash.key?('excluded') ? hash['excluded'] : SKIP # Parameter is an array, so we need to iterate through it accounting_providers = nil unless hash['accounting_providers'].nil? accounting_providers = [] hash['accounting_providers'].each do |structure| accounting_providers << (AccountingProviderConfig.from_hash(structure) if structure) end end accounting_providers = SKIP unless hash.key?('accounting_providers') # 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. NewAccountingSyncConfiguration.new(excluded: excluded, accounting_providers: accounting_providers, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/api_reference/models/new_accounting_sync_configuration.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['excluded'] = 'excluded' @_hash['accounting_providers'] = 'accounting_providers' @_hash end |
.nullables ⇒ Object
An array for nullable fields
37 38 39 40 41 42 |
# File 'lib/api_reference/models/new_accounting_sync_configuration.rb', line 37 def self.nullables %w[ excluded accounting_providers ] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 32 33 34 |
# File 'lib/api_reference/models/new_accounting_sync_configuration.rb', line 29 def self.optionals %w[ excluded accounting_providers ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
92 93 94 95 96 |
# File 'lib/api_reference/models/new_accounting_sync_configuration.rb', line 92 def inspect class_name = self.class.name.split('::').last "<#{class_name} excluded: #{@excluded.inspect}, accounting_providers:"\ " #{@accounting_providers.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
85 86 87 88 89 |
# File 'lib/api_reference/models/new_accounting_sync_configuration.rb', line 85 def to_s class_name = self.class.name.split('::').last "<#{class_name} excluded: #{@excluded}, accounting_providers: #{@accounting_providers},"\ " additional_properties: #{@additional_properties}>" end |