Class: TempmailSdk::GenerateEmailOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/tempmail_sdk/types.rb

Overview

创建临时邮箱的选项

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel: nil, duration: 30, domain: nil, retry_config: nil, max_channels_tried: 20, total_timeout: 60.0, suffix: nil, domains: nil) ⇒ GenerateEmailOptions

rubocop:disable Metrics/ParameterLists



124
125
126
127
128
129
130
131
132
133
134
# File 'lib/tempmail_sdk/types.rb', line 124

def initialize(channel: nil, duration: 30, domain: nil, retry_config: nil,
               max_channels_tried: 20, total_timeout: 60.0, suffix: nil, domains: nil)
  @channel = channel                     # 指定渠道,不指定则随机选择
  @duration = duration                   # tempmail 渠道的有效期(分钟)
  @domain = domain                       # 部分渠道指定接入域名
  @retry_config = retry_config           # 重试配置
  @max_channels_tried = max_channels_tried # 最大尝试渠道数
  @total_timeout = total_timeout         # 整体超时时间(秒)
  @suffix = suffix                       # 邮箱后缀筛选
  @domains = domains                     # 多个目标域名
end

Instance Attribute Details

#channelObject

Returns the value of attribute channel.



120
121
122
# File 'lib/tempmail_sdk/types.rb', line 120

def channel
  @channel
end

#domainObject

Returns the value of attribute domain.



120
121
122
# File 'lib/tempmail_sdk/types.rb', line 120

def domain
  @domain
end

#domainsObject

Returns the value of attribute domains.



120
121
122
# File 'lib/tempmail_sdk/types.rb', line 120

def domains
  @domains
end

#durationObject

Returns the value of attribute duration.



120
121
122
# File 'lib/tempmail_sdk/types.rb', line 120

def duration
  @duration
end

#max_channels_triedObject

Returns the value of attribute max_channels_tried.



120
121
122
# File 'lib/tempmail_sdk/types.rb', line 120

def max_channels_tried
  @max_channels_tried
end

#retry_configObject

Returns the value of attribute retry_config.



120
121
122
# File 'lib/tempmail_sdk/types.rb', line 120

def retry_config
  @retry_config
end

#suffixObject

Returns the value of attribute suffix.



120
121
122
# File 'lib/tempmail_sdk/types.rb', line 120

def suffix
  @suffix
end

#total_timeoutObject

Returns the value of attribute total_timeout.



120
121
122
# File 'lib/tempmail_sdk/types.rb', line 120

def total_timeout
  @total_timeout
end