Class: Nfe::ProductInvoiceDetails::Buyer
- Inherits:
-
Data
- Object
- Data
- Nfe::ProductInvoiceDetails::Buyer
- Defined in:
- lib/nfe/resources/dto/product_invoice_query/product_invoice_details.rb,
sig/nfe/resources/dto/product_invoice_query/product_invoice_details.rbs
Overview
Buyer (destinatário / dest) of the invoice.
Instance Attribute Summary collapse
-
#email ⇒ String?
readonly
Returns the value of attribute email.
-
#federal_tax_number ⇒ String?
readonly
Returns the value of attribute federal_tax_number.
-
#name ⇒ String?
readonly
Returns the value of attribute name.
-
#state_tax_number ⇒ String?
readonly
Returns the value of attribute state_tax_number.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Buyer
constructor
A new instance of Buyer.
Constructor Details
#initialize ⇒ Buyer
Returns a new instance of Buyer.
22 |
# File 'sig/nfe/resources/dto/product_invoice_query/product_invoice_details.rbs', line 22
def initialize: (federal_tax_number: String?, name: String?, state_tax_number: String?, email: String?) -> void
|
Instance Attribute Details
#email ⇒ String? (readonly)
Returns the value of attribute email.
18 19 20 |
# File 'sig/nfe/resources/dto/product_invoice_query/product_invoice_details.rbs', line 18 def email @email end |
#federal_tax_number ⇒ String? (readonly)
Returns the value of attribute federal_tax_number.
15 16 17 |
# File 'sig/nfe/resources/dto/product_invoice_query/product_invoice_details.rbs', line 15 def federal_tax_number @federal_tax_number end |
#name ⇒ String? (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'sig/nfe/resources/dto/product_invoice_query/product_invoice_details.rbs', line 16 def name @name end |
#state_tax_number ⇒ String? (readonly)
Returns the value of attribute state_tax_number.
17 18 19 |
# File 'sig/nfe/resources/dto/product_invoice_query/product_invoice_details.rbs', line 17 def state_tax_number @state_tax_number end |
Class Method Details
.from_api(payload) ⇒ Nfe::ProductInvoiceDetails::Buyer?
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/nfe/resources/dto/product_invoice_query/product_invoice_details.rb', line 49 def self.from_api(payload) return nil if payload.nil? new( federal_tax_number: payload["federalTaxNumber"]&.to_s, name: payload["name"], state_tax_number: payload["stateTaxNumber"]&.to_s, email: payload["email"] ) end |
.new ⇒ instance
21 |
# File 'sig/nfe/resources/dto/product_invoice_query/product_invoice_details.rbs', line 21
def self.new: (federal_tax_number: String?, name: String?, state_tax_number: String?, email: String?) -> instance
|