Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdks/ruby/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ script:
- bundle install --path vendor/bundle
- bundle exec rspec
- gem build dropbox-sign.gemspec
- gem install ./dropbox-sign-1.8-dev.gem
- gem install ./dropbox-sign-1.8.1-dev.gem
10 changes: 5 additions & 5 deletions sdks/ruby/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
dropbox-sign (1.8.pre.dev)
dropbox-sign (1.8.1.pre.dev)
typhoeus (~> 1.0, >= 1.0.1)

GEM
Expand All @@ -13,10 +13,10 @@ GEM
diff-lcs (1.5.1)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.1-aarch64-linux-gnu)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x86_64-darwin)
ffi (1.17.1-x86_64-linux-gnu)
json (2.7.2)
json_spec (1.1.5)
multi_json (~> 1.0)
Expand Down
10 changes: 5 additions & 5 deletions sdks/ruby/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ directory that corresponds to the file you want updated.
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 3.0.0
- Package version: 1.8-dev
- Generator version: 7.8.0
- Package version: 1.8.1-dev
- Generator version: 7.12.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen

## Installation
Expand All @@ -47,15 +47,15 @@ gem build dropbox-sign.gemspec
Then install the gem locally:

```shell
gem install ./dropbox-sign-1.8-dev.gem
gem install ./dropbox-sign-1.8.1-dev.gem
```

(for development, run `gem install --dev ./dropbox-sign-1.8-dev.gem` to install the development dependencies)
(for development, run `gem install --dev ./dropbox-sign-1.8.1-dev.gem` to install the development dependencies)


Finally add this to the Gemfile:

gem 'dropbox-sign', '~> 1.8-dev'
gem 'dropbox-sign', '~> 1.8.1-dev'

### Install from Git

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8-dev
1.8.1-dev
2 changes: 1 addition & 1 deletion sdks/ruby/dropbox-sign.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/account_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/api_app_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/bulk_send_job_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/embedded_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/fax_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/fax_line_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/report_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/team_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/template_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api/unclaimed_draft_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
17 changes: 8 additions & 9 deletions sdks/ruby/lib/dropbox-sign/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down Expand Up @@ -51,7 +51,8 @@ def self.default
# the data deserialized from response body (may be a Tempfile or nil), response status code and response headers.
def call_api(http_method, path, opts = {})
request = build_request(http_method, path, opts)
tempfile = download_file(request) if opts[:return_type] == 'File'
tempfile = nil
(download_file(request) { tempfile = _1 }) if opts[:return_type] == 'File'
response = request.run

if @config.debugging
Expand Down Expand Up @@ -190,19 +191,17 @@ def download_file(request)
chunk.force_encoding(encoding)
tempfile.write(chunk)
end
# run the request to ensure the tempfile is created successfully before returning it
request.run
if tempfile
request.on_complete do
if !tempfile
fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
end
tempfile.close
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
"explicitly with `tempfile.delete`"
else
fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
yield tempfile if block_given?
end

tempfile
end

# Check if the given MIME is a JSON MIME.
Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/api_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
2 changes: 1 addition & 1 deletion sdks/ruby/lib/dropbox-sign/event_callback_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down
22 changes: 19 additions & 3 deletions sdks/ruby/lib/dropbox-sign/models/account_create_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down Expand Up @@ -44,9 +44,14 @@ def self.attribute_map
}
end

# Returns attribute mapping this model knows about
def self.acceptable_attribute_map
attribute_map
end

# Returns all the JSON keys this model knows about
def self.acceptable_attributes
attribute_map.values
acceptable_attribute_map.values
end

# Attribute type mapping.
Expand Down Expand Up @@ -98,9 +103,10 @@ def initialize(attributes = {})
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.merged_attributes.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down Expand Up @@ -140,6 +146,16 @@ def valid?
true
end

# Custom attribute writer method with validation
# @param [Object] email_address Value to be assigned
def email_address=(email_address)
if email_address.nil?
fail ArgumentError, 'email_address cannot be nil'
end

@email_address = email_address
end

# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
Expand Down
22 changes: 19 additions & 3 deletions sdks/ruby/lib/dropbox-sign/models/account_create_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 3.0.0
Contact: apisupport@hellosign.com
Generated by: https://openapi-generator.tech
Generator version: 7.8.0
Generator version: 7.12.0

=end

Expand Down Expand Up @@ -37,9 +37,14 @@ def self.attribute_map
}
end

# Returns attribute mapping this model knows about
def self.acceptable_attribute_map
attribute_map
end

# Returns all the JSON keys this model knows about
def self.acceptable_attributes
attribute_map.values
acceptable_attribute_map.values
end

# Attribute type mapping.
Expand Down Expand Up @@ -90,9 +95,10 @@ def initialize(attributes = {})
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.merged_attributes.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down Expand Up @@ -130,6 +136,16 @@ def valid?
true
end

# Custom attribute writer method with validation
# @param [Object] account Value to be assigned
def account=(account)
if account.nil?
fail ArgumentError, 'account cannot be nil'
end

@account = account
end

# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
Expand Down
Loading