Class: Pluggy::Resources::Document

Inherits:
APIResource show all
Defined in:
lib/pluggy/resources/transaction.rb

Overview

A CPF or CNPJ, already formatted by Pluggy ("416.799.495-00").

Constant Summary

Constants inherited from PluggyObject

PluggyObject::ISO8601, PluggyObject::RESERVED, PluggyObject::TEMPORAL_KEYS

Instance Attribute Summary

Attributes inherited from PluggyObject

#client

Instance Method Summary collapse

Methods inherited from PluggyObject

#==, #[], #as_json, declared_fields, define_field, #each_pair, fields, #hash, #initialize, #inspect, #key?, #keys, #method_missing, nested, nested_types, #read, #respond_to_missing?, #to_h, #to_json, #values

Constructor Details

This class inherits a constructor from Pluggy::PluggyObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Pluggy::PluggyObject

Instance Method Details

#cnpj?Boolean

Returns:

  • (Boolean)


10
# File 'lib/pluggy/resources/transaction.rb', line 10

def cnpj? = self["type"] == "CNPJ"

#cpf?Boolean

Returns:

  • (Boolean)


9
# File 'lib/pluggy/resources/transaction.rb', line 9

def cpf? = self["type"] == "CPF"