Method: VoucherifySdk::ReferrerId#initialize

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

#initialize(attributes = {}) ⇒ ReferrerId

Initializes the object

Parameters:

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

    Model attributes in the form of hash



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/VoucherifySdk/models/referrer_id.rb', line 77

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?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.key?(:'object')
    self.object = attributes[:'object']
  else
    self.object = 'customer'
  end
end