Class: SDM::AccountAttachmentCreateOptions

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

Overview

AccountAttachmentCreateOptions specifies extra options for creating an AccountAttachment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(overwrite: nil) ⇒ AccountAttachmentCreateOptions

Returns a new instance of AccountAttachmentCreateOptions.



124
125
126
127
128
129
130
# File 'lib/models/porcelain.rb', line 124

def initialize(
  overwrite: nil
)
  if overwrite != nil
    @overwrite = overwrite
  end
end

Instance Attribute Details

#overwriteObject

Overwrite clears all account grants before the attachment.



122
123
124
# File 'lib/models/porcelain.rb', line 122

def overwrite
  @overwrite
end

Instance Method Details

#to_json(options = {}) ⇒ Object



132
133
134
135
136
137
138
# File 'lib/models/porcelain.rb', line 132

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end