Class: AdvancedBilling::ScheduledRenewalConfigurationResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/advanced_billing/models/scheduled_renewal_configuration_response.rb

Overview

ScheduledRenewalConfigurationResponse Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #get_additional_properties, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(scheduled_renewal_configuration: SKIP, additional_properties: {}) ⇒ ScheduledRenewalConfigurationResponse

Returns a new instance of ScheduledRenewalConfigurationResponse.



36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/advanced_billing/models/scheduled_renewal_configuration_response.rb', line 36

def initialize(scheduled_renewal_configuration: SKIP,
               additional_properties: {})
  # Add additional model properties to the instance.
  additional_properties.each do |_name, _value|
    instance_variable_set("@#{_name}", _value)
  end

  unless scheduled_renewal_configuration == SKIP
    @scheduled_renewal_configuration =
      scheduled_renewal_configuration
  end
end

Instance Attribute Details

#scheduled_renewal_configurationScheduledRenewalConfiguration

TODO: Write general description for this method



14
15
16
# File 'lib/advanced_billing/models/scheduled_renewal_configuration_response.rb', line 14

def scheduled_renewal_configuration
  @scheduled_renewal_configuration
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/advanced_billing/models/scheduled_renewal_configuration_response.rb', line 50

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  if hash['scheduled_renewal_configuration']
    scheduled_renewal_configuration = ScheduledRenewalConfiguration.from_hash(hash['scheduled_renewal_configuration'])
  end

  # Clean out expected properties from Hash.
  additional_properties = hash.reject { |k, _| names.value?(k) }

  # Create object from extracted values.
  ScheduledRenewalConfigurationResponse.new(scheduled_renewal_configuration: scheduled_renewal_configuration,
                                            additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



17
18
19
20
21
22
# File 'lib/advanced_billing/models/scheduled_renewal_configuration_response.rb', line 17

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['scheduled_renewal_configuration'] =
    'scheduled_renewal_configuration'
  @_hash
end

.nullablesObject

An array for nullable fields



32
33
34
# File 'lib/advanced_billing/models/scheduled_renewal_configuration_response.rb', line 32

def self.nullables
  []
end

.optionalsObject

An array for optional fields



25
26
27
28
29
# File 'lib/advanced_billing/models/scheduled_renewal_configuration_response.rb', line 25

def self.optionals
  %w[
    scheduled_renewal_configuration
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



74
75
76
77
78
79
# File 'lib/advanced_billing/models/scheduled_renewal_configuration_response.rb', line 74

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} scheduled_renewal_configuration:"\
  " #{@scheduled_renewal_configuration.inspect}, additional_properties:"\
  " #{get_additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



67
68
69
70
71
# File 'lib/advanced_billing/models/scheduled_renewal_configuration_response.rb', line 67

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} scheduled_renewal_configuration: #{@scheduled_renewal_configuration},"\
  " additional_properties: #{get_additional_properties}>"
end