Class: Gusto::Companies::Attachments::AttachmentsGetDownloadURLResponse
- Inherits:
-
Object
- Object
- Gusto::Companies::Attachments::AttachmentsGetDownloadURLResponse
- Defined in:
- lib/fern_gusto/companies/attachments/types/attachments_get_download_url_response.rb
Overview
The temporary url to download a Company Attachment File
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#url ⇒ String
readonly
A full Url to download a Company Attachment File.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::Companies::Attachments::AttachmentsGetDownloadURLResponse
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(url:, additional_properties: nil) ⇒ Gusto::Companies::Attachments::AttachmentsGetDownloadURLResponse constructor
- #to_json ⇒ String
Constructor Details
#initialize(url:, additional_properties: nil) ⇒ Gusto::Companies::Attachments::AttachmentsGetDownloadURLResponse
23 24 25 26 27 |
# File 'lib/fern_gusto/companies/attachments/types/attachments_get_download_url_response.rb', line 23 def initialize(url:, additional_properties: nil) @url = url @additional_properties = additional_properties @_field_set = { "url": url } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
13 14 15 |
# File 'lib/fern_gusto/companies/attachments/types/attachments_get_download_url_response.rb', line 13 def additional_properties @additional_properties end |
#url ⇒ String (readonly)
Returns A full Url to download a Company Attachment File.
11 12 13 |
# File 'lib/fern_gusto/companies/attachments/types/attachments_get_download_url_response.rb', line 11 def url @url end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Companies::Attachments::AttachmentsGetDownloadURLResponse
32 33 34 35 36 37 |
# File 'lib/fern_gusto/companies/attachments/types/attachments_get_download_url_response.rb', line 32 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) url = parsed_json["url"] new(url: url, additional_properties: struct) end |
.validate_raw(obj:) ⇒ Void
50 51 52 |
# File 'lib/fern_gusto/companies/attachments/types/attachments_get_download_url_response.rb', line 50 def self.validate_raw(obj:) obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
41 42 43 |
# File 'lib/fern_gusto/companies/attachments/types/attachments_get_download_url_response.rb', line 41 def to_json @_field_set&.to_json end |