Class: Dodopayments::Models::Customers::EmailBody

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/customers/email_body.rb,
sig/dodopayments/models/customers/email_body.rbs

Overview

See Also:

  • Dodopayments::Resources::Customers::Emails#retrieve_body

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(merchant_authored:, failure_code: nil, failure_reason: nil, html: nil, text: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::Customers::EmailBody for more details.

Parameters:

  • merchant_authored (Boolean)

    Whether the merchant wrote this content. It is true for the recovery

  • failure_code (Symbol, Dodopayments::Models::Customers::EmailFailureCode, nil) (defaults to: nil)

    Why the email did not arrive. It is null unless the email failed.

  • failure_reason (String, nil) (defaults to: nil)

    A sentence that explains failure_code. It is null unless the email

  • html (String, nil) (defaults to: nil)

    The stored HTML. It is null on a text-only email.

  • text (String, nil) (defaults to: nil)

    The stored plain text.



# File 'lib/dodopayments/models/customers/email_body.rb', line 41

Instance Attribute Details

#failure_codeSymbol, ...

Why the email did not arrive. It is null unless the email failed.

Parameters:

  • value (Dodopayments::Models::Customers::email_failure_code, nil)

Returns:



21
# File 'lib/dodopayments/models/customers/email_body.rb', line 21

optional :failure_code, enum: -> { Dodopayments::Customers::EmailFailureCode }, nil?: true

#failure_reasonString?

A sentence that explains failure_code. It is null unless the email failed.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


27
# File 'lib/dodopayments/models/customers/email_body.rb', line 27

optional :failure_reason, String, nil?: true

#htmlString?

The stored HTML. It is null on a text-only email.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


33
# File 'lib/dodopayments/models/customers/email_body.rb', line 33

optional :html, String, nil?: true

#merchant_authoredBoolean

Whether the merchant wrote this content. It is true for the recovery and dunning emails, which the merchant writes.

The content is email HTML. Render it in a sandbox, whatever this value is.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


15
# File 'lib/dodopayments/models/customers/email_body.rb', line 15

required :merchant_authored, Dodopayments::Internal::Type::Boolean

#textString?

The stored plain text.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


39
# File 'lib/dodopayments/models/customers/email_body.rb', line 39

optional :text, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


32
# File 'sig/dodopayments/models/customers/email_body.rbs', line 32

def to_hash: -> {