Class: ThePlaidApi::SignalReturnReportRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::SignalReturnReportRequest
- Defined in:
- lib/the_plaid_api/models/signal_return_report_request.rb
Overview
SignalReturnReportRequest defines the request schema for ‘/signal/return/report`
Instance Attribute Summary collapse
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#client_transaction_id ⇒ String
Must be the same as the ‘client_transaction_id` supplied when calling `/signal/evaluate` or `/accounts/balance/get`.
-
#return_code ⇒ String
Must be a valid ACH return code (e.g. “R01”) If formatted incorrectly, this will result in an [‘INVALID_FIELD`](plaid.com/docs/errors/invalid-request/#invalid_f ield) error.
-
#returned_at ⇒ DateTime
Date and time when you receive the returns from your payment processors, in ISO 8601 format (‘YYYY-MM-DDTHH:mm:ssZ`).
-
#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(client_transaction_id:, return_code:, client_id: SKIP, secret: SKIP, returned_at: SKIP, additional_properties: nil) ⇒ SignalReturnReportRequest
constructor
A new instance of SignalReturnReportRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_returned_at ⇒ Object
-
#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(client_transaction_id:, return_code:, client_id: SKIP, secret: SKIP, returned_at: SKIP, additional_properties: nil) ⇒ SignalReturnReportRequest
Returns a new instance of SignalReturnReportRequest.
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 69 def initialize(client_transaction_id:, return_code:, client_id: SKIP, secret: SKIP, returned_at: 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 @client_transaction_id = client_transaction_id @return_code = return_code @returned_at = returned_at unless returned_at == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#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.
18 19 20 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 18 def client_id @client_id end |
#client_transaction_id ⇒ String
Must be the same as the ‘client_transaction_id` supplied when calling `/signal/evaluate` or `/accounts/balance/get`.
28 29 30 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 28 def client_transaction_id @client_transaction_id end |
#return_code ⇒ String
Must be a valid ACH return code (e.g. “R01”) If formatted incorrectly, this will result in an [‘INVALID_FIELD`](plaid.com/docs/errors/invalid-request/#invalid_f ield) error.
35 36 37 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 35 def return_code @return_code end |
#returned_at ⇒ DateTime
Date and time when you receive the returns from your payment processors, in ISO 8601 format (‘YYYY-MM-DDTHH:mm:ssZ`).
40 41 42 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 40 def returned_at @returned_at 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.
23 24 25 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 23 def secret @secret end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
83 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 111 112 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 83 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. client_transaction_id = hash.key?('client_transaction_id') ? hash['client_transaction_id'] : nil return_code = hash.key?('return_code') ? hash['return_code'] : nil client_id = hash.key?('client_id') ? hash['client_id'] : SKIP secret = hash.key?('secret') ? hash['secret'] : SKIP returned_at = if hash.key?('returned_at') (DateTimeHelper.from_rfc3339(hash['returned_at']) if hash['returned_at']) else SKIP end # 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. SignalReturnReportRequest.new(client_transaction_id: client_transaction_id, return_code: return_code, client_id: client_id, secret: secret, returned_at: returned_at, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
43 44 45 46 47 48 49 50 51 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 43 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['client_transaction_id'] = 'client_transaction_id' @_hash['return_code'] = 'return_code' @_hash['returned_at'] = 'returned_at' @_hash end |
.nullables ⇒ Object
An array for nullable fields
63 64 65 66 67 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 63 def self.nullables %w[ returned_at ] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 54 def self.optionals %w[ client_id secret returned_at ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
127 128 129 130 131 132 133 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 127 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect},"\ " client_transaction_id: #{@client_transaction_id.inspect}, return_code:"\ " #{@return_code.inspect}, returned_at: #{@returned_at.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_returned_at ⇒ Object
114 115 116 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 114 def to_custom_returned_at DateTimeHelper.to_rfc3339(returned_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
119 120 121 122 123 124 |
# File 'lib/the_plaid_api/models/signal_return_report_request.rb', line 119 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, client_transaction_id:"\ " #{@client_transaction_id}, return_code: #{@return_code}, returned_at: #{@returned_at},"\ " additional_properties: #{@additional_properties}>" end |