Class: ThePlaidApi::PartnerEndCustomerWithSecrets
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::PartnerEndCustomerWithSecrets
- Defined in:
- lib/the_plaid_api/models/partner_end_customer_with_secrets.rb
Overview
The details for the newly created end customer, including secrets for non-Production environments.
Instance Attribute Summary collapse
-
#client_id ⇒ String
The ‘client_id` of the end customer.
-
#company_name ⇒ String
The company name associated with the end customer.
-
#secrets ⇒ PartnerEndCustomerSecrets
The secrets for the newly created end customer.
-
#status ⇒ PartnerEndCustomerStatus
The status of the given end customer.
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_id: SKIP, company_name: SKIP, status: SKIP, secrets: SKIP, additional_properties: nil) ⇒ PartnerEndCustomerWithSecrets
constructor
A new instance of PartnerEndCustomerWithSecrets.
-
#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(client_id: SKIP, company_name: SKIP, status: SKIP, secrets: SKIP, additional_properties: nil) ⇒ PartnerEndCustomerWithSecrets
Returns a new instance of PartnerEndCustomerWithSecrets.
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 66 def initialize(client_id: SKIP, company_name: SKIP, status: SKIP, secrets: 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 @company_name = company_name unless company_name == SKIP @status = status unless status == SKIP @secrets = secrets unless secrets == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#client_id ⇒ String
The ‘client_id` of the end customer.
15 16 17 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 15 def client_id @client_id end |
#company_name ⇒ String
The company name associated with the end customer.
19 20 21 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 19 def company_name @company_name end |
#secrets ⇒ PartnerEndCustomerSecrets
The secrets for the newly created end customer.
39 40 41 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 39 def secrets @secrets end |
#status ⇒ PartnerEndCustomerStatus
The status of the given end customer. ‘UNDER_REVIEW`: The end customer has been created and enabled in the Sandbox environment. The end customer must be manually reviewed by the Plaid team before it can be enabled in Production, at which point its status will automatically transition to `PENDING_ENABLEMENT` or `DENIED`. `PENDING_ENABLEMENT`: The end customer is ready to be fully enabled in the Production environment. Call the `/partner/customer/enable` endpoint to enable the end customer in full Production. `ACTIVE`: The end customer has been fully enabled in all environments. `DENIED`: The end customer has been created and enabled in the Sandbox environment, but it did not pass review by the Plaid team and therefore cannot be enabled for Production access. Talk to your Account Manager for more information.
35 36 37 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 35 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. client_id = hash.key?('client_id') ? hash['client_id'] : SKIP company_name = hash.key?('company_name') ? hash['company_name'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP secrets = PartnerEndCustomerSecrets.from_hash(hash['secrets']) if hash['secrets'] # 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. PartnerEndCustomerWithSecrets.new(client_id: client_id, company_name: company_name, status: status, secrets: secrets, 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 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['company_name'] = 'company_name' @_hash['status'] = 'status' @_hash['secrets'] = 'secrets' @_hash end |
.nullables ⇒ Object
An array for nullable fields
62 63 64 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 62 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
52 53 54 55 56 57 58 59 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 52 def self.optionals %w[ client_id company_name status secrets ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
111 112 113 114 115 116 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 111 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, company_name: #{@company_name.inspect},"\ " status: #{@status.inspect}, secrets: #{@secrets.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
104 105 106 107 108 |
# File 'lib/the_plaid_api/models/partner_end_customer_with_secrets.rb', line 104 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, company_name: #{@company_name}, status:"\ " #{@status}, secrets: #{@secrets}, additional_properties: #{@additional_properties}>" end |