Method: VoucherifySdk::MemberActivity#initialize

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

#initialize(attributes = {}) ⇒ MemberActivity

Initializes the object

Parameters:

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

    Model attributes in the form of hash



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/VoucherifySdk/models/member_activity.rb', line 74

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

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

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

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