Class: AdvancedBilling::ScheduledRenewalConfigurationItemResponse

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

Overview

ScheduledRenewalConfigurationItemResponse 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_item: SKIP, additional_properties: {}) ⇒ ScheduledRenewalConfigurationItemResponse

Returns a new instance of ScheduledRenewalConfigurationItemResponse.



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

def initialize(scheduled_renewal_configuration_item: 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_item == SKIP
    @scheduled_renewal_configuration_item =
      scheduled_renewal_configuration_item
  end
end

Instance Attribute Details

#scheduled_renewal_configuration_itemScheduledRenewalConfigurationItem

TODO: Write general description for this method



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

def scheduled_renewal_configuration_item
  @scheduled_renewal_configuration_item
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_item_response.rb', line 50

def self.from_hash(hash)
  return nil unless hash

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

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

  # Create object from extracted values.
  ScheduledRenewalConfigurationItemResponse.new(scheduled_renewal_configuration_item: scheduled_renewal_configuration_item,
                                                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_item_response.rb', line 17

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

.nullablesObject

An array for nullable fields



32
33
34
# File 'lib/advanced_billing/models/scheduled_renewal_configuration_item_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_item_response.rb', line 25

def self.optionals
  %w[
    scheduled_renewal_configuration_item
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



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

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

#to_sObject

Provides a human-readable string representation of the object.



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

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