Class: Stripe::File::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/file.rb

Defined Under Namespace

Classes: FileLinkData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



106
107
108
109
110
111
# File 'lib/stripe/resources/file.rb', line 106

def initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil)
  @expand = expand
  @file = file
  @file_link_data = file_link_data
  @purpose = purpose
end

Instance Attribute Details

#expandObject

Specifies which fields in the response should be expanded.



95
96
97
# File 'lib/stripe/resources/file.rb', line 95

def expand
  @expand
end

#fileObject

A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the ‘multipart/form-data` protocol.



98
99
100
# File 'lib/stripe/resources/file.rb', line 98

def file
  @file
end

Optional parameters that automatically create a [file link](stripe.com/docs/api#file_links) for the newly created file.



101
102
103
# File 'lib/stripe/resources/file.rb', line 101

def file_link_data
  @file_link_data
end

#purposeObject

The [purpose](stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.



104
105
106
# File 'lib/stripe/resources/file.rb', line 104

def purpose
  @purpose
end