Class: ThePlaidApi::AssetReportRefreshRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::AssetReportRefreshRequest
- Defined in:
- lib/the_plaid_api/models/asset_report_refresh_request.rb
Overview
AssetReportRefreshRequest defines the request schema for ‘/asset_report/refresh`
Instance Attribute Summary collapse
-
#asset_report_token ⇒ String
The ‘asset_report_token` returned by the original call to `/asset_report/create`.
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#days_requested ⇒ Integer
The maximum number of days of history to include in the Asset Report.
-
#options ⇒ AssetReportRefreshRequestOptions
An optional object to filter ‘/asset_report/refresh` results.
-
#secret ⇒ String
Your Plaid API ‘secret`.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(asset_report_token:, client_id: SKIP, secret: SKIP, days_requested: SKIP, options: SKIP, additional_properties: nil) ⇒ AssetReportRefreshRequest
constructor
A new instance of AssetReportRefreshRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(asset_report_token:, client_id: SKIP, secret: SKIP, days_requested: SKIP, options: SKIP, additional_properties: nil) ⇒ AssetReportRefreshRequest
Returns a new instance of AssetReportRefreshRequest.
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 69 def initialize(asset_report_token:, client_id: SKIP, secret: SKIP, days_requested: SKIP, options: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @client_id = client_id unless client_id == SKIP @secret = secret unless secret == SKIP @asset_report_token = asset_report_token @days_requested = days_requested unless days_requested == SKIP @options = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#asset_report_token ⇒ String
The ‘asset_report_token` returned by the original call to `/asset_report/create`
27 28 29 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 27 def asset_report_token @asset_report_token end |
#client_id ⇒ String
Your Plaid API ‘client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.
17 18 19 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 17 def client_id @client_id end |
#days_requested ⇒ Integer
The maximum number of days of history to include in the Asset Report. Must be an integer. If not specified, the value from the original call to ‘/asset_report/create` will be used.
33 34 35 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 33 def days_requested @days_requested end |
#options ⇒ AssetReportRefreshRequestOptions
An optional object to filter ‘/asset_report/refresh` results. If provided, cannot be `null`. If not specified, the `options` from the original call to `/asset_report/create` will be used.
39 40 41 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 39 def @options end |
#secret ⇒ String
Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.
22 23 24 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 22 def secret @secret end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 84 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. asset_report_token = hash.key?('asset_report_token') ? hash['asset_report_token'] : nil client_id = hash.key?('client_id') ? hash['client_id'] : SKIP secret = hash.key?('secret') ? hash['secret'] : SKIP days_requested = hash.key?('days_requested') ? hash['days_requested'] : SKIP = AssetReportRefreshRequestOptions.from_hash(hash['options']) if hash['options'] # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. AssetReportRefreshRequest.new(asset_report_token: asset_report_token, client_id: client_id, secret: secret, days_requested: days_requested, options: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 48 49 50 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['asset_report_token'] = 'asset_report_token' @_hash['days_requested'] = 'days_requested' @_hash['options'] = 'options' @_hash end |
.nullables ⇒ Object
An array for nullable fields
63 64 65 66 67 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 63 def self.nullables %w[ days_requested ] end |
.optionals ⇒ Object
An array for optional fields
53 54 55 56 57 58 59 60 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 53 def self.optionals %w[ client_id secret days_requested options ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
121 122 123 124 125 126 127 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 121 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect},"\ " asset_report_token: #{@asset_report_token.inspect}, days_requested:"\ " #{@days_requested.inspect}, options: #{@options.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
113 114 115 116 117 118 |
# File 'lib/the_plaid_api/models/asset_report_refresh_request.rb', line 113 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, asset_report_token:"\ " #{@asset_report_token}, days_requested: #{@days_requested}, options: #{@options},"\ " additional_properties: #{@additional_properties}>" end |