Class: PepipostSdkRuby::Files

Inherits:
Object
  • Object
show all
Defined in:
lib/pepipost_sdk_ruby/models/files.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name) ⇒ Object



9
10
11
# File 'lib/pepipost_sdk_ruby/models/files.rb', line 9

def method_missing(method_name)
  puts "there's no method called '#{method_name}'"
end

Instance Attribute Details

#example_attachment_1_txtString

TODO: Write general description for this method

Returns:

  • (String)


7
8
9
# File 'lib/pepipost_sdk_ruby/models/files.rb', line 7

def example_attachment_1_txt
  @example_attachment_1_txt
end

Instance Method Details

#key_mapObject

Defines the key map for json serialization



20
21
22
23
24
# File 'lib/pepipost_sdk_ruby/models/files.rb', line 20

def key_map
  hash = {}
  hash['example_attachment1.txt'] = example_attachment_1_txt
  hash
end

#to_jsonObject

Creates JSON of the curent object



14
15
16
17
# File 'lib/pepipost_sdk_ruby/models/files.rb', line 14

def to_json
  hash = key_map
  hash.to_json
end