Method: VoucherifySdk::RewardAttributes#initialize

Defined in:
lib/VoucherifySdk/models/reward_attributes.rb

#initialize(attributes = {}) ⇒ RewardAttributes

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/VoucherifySdk/models/reward_attributes.rb', line 56

def initialize(attributes = {})
  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    h[k.to_sym] = v
  }

  if attributes.key?(:'image_url')
    self.image_url = attributes[:'image_url']
  end

  if attributes.key?(:'description')
    self.description = attributes[:'description']
  end
end