Class: ThePlaidApi::BetaPartnerEndCustomer
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::BetaPartnerEndCustomer
- Defined in:
- lib/the_plaid_api/models/beta_partner_end_customer.rb
Overview
The details for an end customer.
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.
-
#product_statuses ⇒ Object
Mapping of product names to their current status.
-
#requirements_due ⇒ Array[PartnerEndCustomerRequirementDue]
A list of fields that are still required to be submitted.
-
#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, product_statuses: SKIP, requirements_due: SKIP, additional_properties: nil) ⇒ BetaPartnerEndCustomer
constructor
A new instance of BetaPartnerEndCustomer.
-
#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, product_statuses: SKIP, requirements_due: SKIP, additional_properties: nil) ⇒ BetaPartnerEndCustomer
Returns a new instance of BetaPartnerEndCustomer.
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 71 def initialize(client_id: SKIP, company_name: SKIP, status: SKIP, product_statuses: SKIP, requirements_due: 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 @product_statuses = product_statuses unless product_statuses == SKIP @requirements_due = requirements_due unless requirements_due == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#client_id ⇒ String
The ‘client_id` of the end customer.
14 15 16 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 14 def client_id @client_id end |
#company_name ⇒ String
The company name associated with the end customer.
18 19 20 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 18 def company_name @company_name end |
#product_statuses ⇒ Object
Mapping of product names to their current status.
38 39 40 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 38 def product_statuses @product_statuses end |
#requirements_due ⇒ Array[PartnerEndCustomerRequirementDue]
A list of fields that are still required to be submitted.
42 43 44 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 42 def requirements_due @requirements_due 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.
34 35 36 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 34 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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/beta_partner_end_customer.rb', line 86 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 product_statuses = hash.key?('product_statuses') ? hash['product_statuses'] : SKIP requirements_due = hash.key?('requirements_due') ? hash['requirements_due'] : 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. BetaPartnerEndCustomer.new(client_id: client_id, company_name: company_name, status: status, product_statuses: product_statuses, requirements_due: requirements_due, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['company_name'] = 'company_name' @_hash['status'] = 'status' @_hash['product_statuses'] = 'product_statuses' @_hash['requirements_due'] = 'requirements_due' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
56 57 58 59 60 61 62 63 64 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 56 def self.optionals %w[ client_id company_name status product_statuses requirements_due ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
123 124 125 126 127 128 129 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 123 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, company_name: #{@company_name.inspect},"\ " status: #{@status.inspect}, product_statuses: #{@product_statuses.inspect},"\ " requirements_due: #{@requirements_due.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
115 116 117 118 119 120 |
# File 'lib/the_plaid_api/models/beta_partner_end_customer.rb', line 115 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, company_name: #{@company_name}, status:"\ " #{@status}, product_statuses: #{@product_statuses}, requirements_due:"\ " #{@requirements_due}, additional_properties: #{@additional_properties}>" end |