Class: Nfe::Generated::ProductInvoiceRtcV1::PaymentDetailResource

Inherits:
Data
  • Object
show all
Defined in:
lib/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rb,
sig/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePaymentDetailResource

Returns a new instance of PaymentDetailResource.

Parameters:

  • amount: (Float)
  • card: (CardResource)
  • federal_tax_number_pag: (String, nil)
  • method: (Object)
  • method_description: (String, nil)
  • payment_date: (String, nil)
  • payment_type: (Object)
  • state_pag: (String, nil)


18
# File 'sig/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rbs', line 18

def initialize: (amount: Float, ?card: CardResource, ?federal_tax_number_pag: String?, method: untyped, ?method_description: String?, ?payment_date: String?, ?payment_type: untyped, ?state_pag: String?) -> void

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount

Returns:

  • (Object)

    the current value of amount



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rb', line 9

def amount
  @amount
end

#cardObject (readonly)

Returns the value of attribute card

Returns:

  • (Object)

    the current value of card



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rb', line 9

def card
  @card
end

#federal_tax_number_pagObject (readonly)

Returns the value of attribute federal_tax_number_pag

Returns:

  • (Object)

    the current value of federal_tax_number_pag



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rb', line 9

def federal_tax_number_pag
  @federal_tax_number_pag
end

#methodObject (readonly)

Returns the value of attribute method

Returns:

  • (Object)

    the current value of method



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rb', line 9

def method
  @method
end

#method_descriptionObject (readonly)

Returns the value of attribute method_description

Returns:

  • (Object)

    the current value of method_description



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rb', line 9

def method_description
  @method_description
end

#payment_dateObject (readonly)

Returns the value of attribute payment_date

Returns:

  • (Object)

    the current value of payment_date



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rb', line 9

def payment_date
  @payment_date
end

#payment_typeObject (readonly)

Returns the value of attribute payment_type

Returns:

  • (Object)

    the current value of payment_type



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rb', line 9

def payment_type
  @payment_type
end

#state_pagObject (readonly)

Returns the value of attribute state_pag

Returns:

  • (Object)

    the current value of state_pag



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rb', line 9

def state_pag
  @state_pag
end

Class Method Details

.from_api(payload) ⇒ instance?

Parameters:

  • payload (Hash[String, untyped], nil)

Returns:

  • (instance, nil)


10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rb', line 10

def self.from_api(payload)
  return nil if payload.nil?

  new(
    amount: payload["amount"],
    card: CardResource.from_api(payload["card"]),
    federal_tax_number_pag: payload["federalTaxNumberPag"],
    method: payload["method"],
    method_description: payload["methodDescription"],
    payment_date: payload["paymentDate"],
    payment_type: payload["paymentType"],
    state_pag: payload["statePag"],
  )
end

.newinstance

Parameters:

  • amount: (Float)
  • card: (CardResource)
  • federal_tax_number_pag: (String, nil)
  • method: (Object)
  • method_description: (String, nil)
  • payment_date: (String, nil)
  • payment_type: (Object)
  • state_pag: (String, nil)

Returns:

  • (instance)


17
# File 'sig/nfe/generated/product_invoice_rtc_v1/payment_detail_resource.rbs', line 17

def self.new: (amount: Float, ?card: CardResource, ?federal_tax_number_pag: String?, method: untyped, ?method_description: String?, ?payment_date: String?, ?payment_type: untyped, ?state_pag: String?) -> instance