Class: Plaid::DepositSwitchCreateRequestOptions
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::DepositSwitchCreateRequestOptions
- Defined in:
- lib/plaid/models/deposit_switch_create_request_options.rb
Overview
Options to configure the ‘/deposit_switch/create` request. If provided, cannot be `null`.
Instance Attribute Summary collapse
-
#transaction_item_access_tokens ⇒ Array[String]
An array of access tokens corresponding to transaction items to use when attempting to match the user to their Payroll Provider.
-
#webhook ⇒ String
The URL registered to receive webhooks when the status of a deposit switch request has changed.
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(webhook: SKIP, transaction_item_access_tokens: SKIP, additional_properties: nil) ⇒ DepositSwitchCreateRequestOptions
constructor
A new instance of DepositSwitchCreateRequestOptions.
-
#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(webhook: SKIP, transaction_item_access_tokens: SKIP, additional_properties: nil) ⇒ DepositSwitchCreateRequestOptions
Returns a new instance of DepositSwitchCreateRequestOptions.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/plaid/models/deposit_switch_create_request_options.rb', line 49 def initialize(webhook: SKIP, transaction_item_access_tokens: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @webhook = webhook unless webhook == SKIP unless transaction_item_access_tokens == SKIP @transaction_item_access_tokens = transaction_item_access_tokens end @additional_properties = additional_properties end |
Instance Attribute Details
#transaction_item_access_tokens ⇒ Array[String]
An array of access tokens corresponding to transaction items to use when attempting to match the user to their Payroll Provider. These tokens must be created by the same client id as the one creating the switch, and have access to the transactions product.
23 24 25 |
# File 'lib/plaid/models/deposit_switch_create_request_options.rb', line 23 def transaction_item_access_tokens @transaction_item_access_tokens end |
#webhook ⇒ String
The URL registered to receive webhooks when the status of a deposit switch request has changed.
16 17 18 |
# File 'lib/plaid/models/deposit_switch_create_request_options.rb', line 16 def webhook @webhook end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/plaid/models/deposit_switch_create_request_options.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. webhook = hash.key?('webhook') ? hash['webhook'] : SKIP transaction_item_access_tokens = hash.key?('transaction_item_access_tokens') ? hash['transaction_item_access_tokens'] : SKIP # 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. DepositSwitchCreateRequestOptions.new(webhook: webhook, transaction_item_access_tokens: transaction_item_access_tokens, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/plaid/models/deposit_switch_create_request_options.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['webhook'] = 'webhook' @_hash['transaction_item_access_tokens'] = 'transaction_item_access_tokens' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 46 47 |
# File 'lib/plaid/models/deposit_switch_create_request_options.rb', line 43 def self.nullables %w[ webhook ] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 |
# File 'lib/plaid/models/deposit_switch_create_request_options.rb', line 35 def self.optionals %w[ webhook transaction_item_access_tokens ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
92 93 94 95 96 97 |
# File 'lib/plaid/models/deposit_switch_create_request_options.rb', line 92 def inspect class_name = self.class.name.split('::').last "<#{class_name} webhook: #{@webhook.inspect}, transaction_item_access_tokens:"\ " #{@transaction_item_access_tokens.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
85 86 87 88 89 |
# File 'lib/plaid/models/deposit_switch_create_request_options.rb', line 85 def to_s class_name = self.class.name.split('::').last "<#{class_name} webhook: #{@webhook}, transaction_item_access_tokens:"\ " #{@transaction_item_access_tokens}, additional_properties: #{@additional_properties}>" end |