Class: Twilio::REST::Accounts::V1::ComplianceSignalsCheckList::CreateComplianceSignalsCheckRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ CreateComplianceSignalsCheckRequest

Returns a new instance of CreateComplianceSignalsCheckRequest.



89
90
91
92
93
94
95
96
97
98
# File 'lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb', line 89

def initialize(payload)
        @signals = payload["signals"]
        @to = payload["to"]
        @body = payload["body"]
        @use_case = payload["use_case"]
        @channel = payload["channel"]
        @country_iso_code = payload["country_iso_code"]
        @zip_code = payload["zip_code"]
        @send_at = payload["send_at"]
end

Instance Attribute Details

#body ⇒ Object

Parameters:

  • : (signals) —

    [Array] The signals to evaluate. Only QUIET_HOURS is supported.

  • : (to) —

    [String] The recipient phone number in E.164 format.

  • : (body) —

    [String] The content of the message, at most 1600 characters. Required if useCase is not provided.

  • : (use_case) —

    [String] The intent of the message, one of OTP, NOTIFICATIONS, FRAUD, SECURITY, CUSTOMERCARE, DELIVERY, EDUCATION, EVENTS, POLLING, ANNOUNCEMENTS or MARKETING. Required if body is not provided. It is used instead of the body when both are given.

  • : (channel) —

    [String] The channel the message is sent on, one of SMS, MMS, RCS or CALL. Defaults to SMS.

  • : (country_iso_code) —

    [String] The ISO 3166-1 alpha-2 country of the recipient. Only US is supported.

  • : (zip_code) —

    [String] The US zip code of the recipient, 5 digits or ZIP+4. When it is not given or not known, the location is inferred from the phone number.

  • : (send_at) —

    [String] An RFC 3339 timestamp, in UTC or with an offset, to evaluate a scheduled delivery instead of the current time. It must not be in the past.



88
89
90
# File 'lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb', line 88

def body
  @body
end

#channel ⇒ Object

Parameters:

  • : (signals) —

    [Array] The signals to evaluate. Only QUIET_HOURS is supported.

  • : (to) —

    [String] The recipient phone number in E.164 format.

  • : (body) —

    [String] The content of the message, at most 1600 characters. Required if useCase is not provided.

  • : (use_case) —

    [String] The intent of the message, one of OTP, NOTIFICATIONS, FRAUD, SECURITY, CUSTOMERCARE, DELIVERY, EDUCATION, EVENTS, POLLING, ANNOUNCEMENTS or MARKETING. Required if body is not provided. It is used instead of the body when both are given.

  • : (channel) —

    [String] The channel the message is sent on, one of SMS, MMS, RCS or CALL. Defaults to SMS.

  • : (country_iso_code) —

    [String] The ISO 3166-1 alpha-2 country of the recipient. Only US is supported.

  • : (zip_code) —

    [String] The US zip code of the recipient, 5 digits or ZIP+4. When it is not given or not known, the location is inferred from the phone number.

  • : (send_at) —

    [String] An RFC 3339 timestamp, in UTC or with an offset, to evaluate a scheduled delivery instead of the current time. It must not be in the past.



88
89
90
# File 'lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb', line 88

def channel
  @channel
end

#country_iso_code ⇒ Object

Parameters:

  • : (signals) —

    [Array] The signals to evaluate. Only QUIET_HOURS is supported.

  • : (to) —

    [String] The recipient phone number in E.164 format.

  • : (body) —

    [String] The content of the message, at most 1600 characters. Required if useCase is not provided.

  • : (use_case) —

    [String] The intent of the message, one of OTP, NOTIFICATIONS, FRAUD, SECURITY, CUSTOMERCARE, DELIVERY, EDUCATION, EVENTS, POLLING, ANNOUNCEMENTS or MARKETING. Required if body is not provided. It is used instead of the body when both are given.

  • : (channel) —

    [String] The channel the message is sent on, one of SMS, MMS, RCS or CALL. Defaults to SMS.

  • : (country_iso_code) —

    [String] The ISO 3166-1 alpha-2 country of the recipient. Only US is supported.

  • : (zip_code) —

    [String] The US zip code of the recipient, 5 digits or ZIP+4. When it is not given or not known, the location is inferred from the phone number.

  • : (send_at) —

    [String] An RFC 3339 timestamp, in UTC or with an offset, to evaluate a scheduled delivery instead of the current time. It must not be in the past.



88
89
90
# File 'lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb', line 88

def country_iso_code
  @country_iso_code
end

#send_at ⇒ Object

Parameters:

  • : (signals) —

    [Array] The signals to evaluate. Only QUIET_HOURS is supported.

  • : (to) —

    [String] The recipient phone number in E.164 format.

  • : (body) —

    [String] The content of the message, at most 1600 characters. Required if useCase is not provided.

  • : (use_case) —

    [String] The intent of the message, one of OTP, NOTIFICATIONS, FRAUD, SECURITY, CUSTOMERCARE, DELIVERY, EDUCATION, EVENTS, POLLING, ANNOUNCEMENTS or MARKETING. Required if body is not provided. It is used instead of the body when both are given.

  • : (channel) —

    [String] The channel the message is sent on, one of SMS, MMS, RCS or CALL. Defaults to SMS.

  • : (country_iso_code) —

    [String] The ISO 3166-1 alpha-2 country of the recipient. Only US is supported.

  • : (zip_code) —

    [String] The US zip code of the recipient, 5 digits or ZIP+4. When it is not given or not known, the location is inferred from the phone number.

  • : (send_at) —

    [String] An RFC 3339 timestamp, in UTC or with an offset, to evaluate a scheduled delivery instead of the current time. It must not be in the past.



88
89
90
# File 'lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb', line 88

def send_at
  @send_at
end

#signals ⇒ Object

Parameters:

  • : (signals) —

    [Array] The signals to evaluate. Only QUIET_HOURS is supported.

  • : (to) —

    [String] The recipient phone number in E.164 format.

  • : (body) —

    [String] The content of the message, at most 1600 characters. Required if useCase is not provided.

  • : (use_case) —

    [String] The intent of the message, one of OTP, NOTIFICATIONS, FRAUD, SECURITY, CUSTOMERCARE, DELIVERY, EDUCATION, EVENTS, POLLING, ANNOUNCEMENTS or MARKETING. Required if body is not provided. It is used instead of the body when both are given.

  • : (channel) —

    [String] The channel the message is sent on, one of SMS, MMS, RCS or CALL. Defaults to SMS.

  • : (country_iso_code) —

    [String] The ISO 3166-1 alpha-2 country of the recipient. Only US is supported.

  • : (zip_code) —

    [String] The US zip code of the recipient, 5 digits or ZIP+4. When it is not given or not known, the location is inferred from the phone number.

  • : (send_at) —

    [String] An RFC 3339 timestamp, in UTC or with an offset, to evaluate a scheduled delivery instead of the current time. It must not be in the past.



88
89
90
# File 'lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb', line 88

def signals
  @signals
end

#to ⇒ Object

Parameters:

  • : (signals) —

    [Array] The signals to evaluate. Only QUIET_HOURS is supported.

  • : (to) —

    [String] The recipient phone number in E.164 format.

  • : (body) —

    [String] The content of the message, at most 1600 characters. Required if useCase is not provided.

  • : (use_case) —

    [String] The intent of the message, one of OTP, NOTIFICATIONS, FRAUD, SECURITY, CUSTOMERCARE, DELIVERY, EDUCATION, EVENTS, POLLING, ANNOUNCEMENTS or MARKETING. Required if body is not provided. It is used instead of the body when both are given.

  • : (channel) —

    [String] The channel the message is sent on, one of SMS, MMS, RCS or CALL. Defaults to SMS.

  • : (country_iso_code) —

    [String] The ISO 3166-1 alpha-2 country of the recipient. Only US is supported.

  • : (zip_code) —

    [String] The US zip code of the recipient, 5 digits or ZIP+4. When it is not given or not known, the location is inferred from the phone number.

  • : (send_at) —

    [String] An RFC 3339 timestamp, in UTC or with an offset, to evaluate a scheduled delivery instead of the current time. It must not be in the past.



88
89
90
# File 'lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb', line 88

def to
  @to
end

#use_case ⇒ Object

Parameters:

  • : (signals) —

    [Array] The signals to evaluate. Only QUIET_HOURS is supported.

  • : (to) —

    [String] The recipient phone number in E.164 format.

  • : (body) —

    [String] The content of the message, at most 1600 characters. Required if useCase is not provided.

  • : (use_case) —

    [String] The intent of the message, one of OTP, NOTIFICATIONS, FRAUD, SECURITY, CUSTOMERCARE, DELIVERY, EDUCATION, EVENTS, POLLING, ANNOUNCEMENTS or MARKETING. Required if body is not provided. It is used instead of the body when both are given.

  • : (channel) —

    [String] The channel the message is sent on, one of SMS, MMS, RCS or CALL. Defaults to SMS.

  • : (country_iso_code) —

    [String] The ISO 3166-1 alpha-2 country of the recipient. Only US is supported.

  • : (zip_code) —

    [String] The US zip code of the recipient, 5 digits or ZIP+4. When it is not given or not known, the location is inferred from the phone number.

  • : (send_at) —

    [String] An RFC 3339 timestamp, in UTC or with an offset, to evaluate a scheduled delivery instead of the current time. It must not be in the past.



88
89
90
# File 'lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb', line 88

def use_case
  @use_case
end

#zip_code ⇒ Object

Parameters:

  • : (signals) —

    [Array] The signals to evaluate. Only QUIET_HOURS is supported.

  • : (to) —

    [String] The recipient phone number in E.164 format.

  • : (body) —

    [String] The content of the message, at most 1600 characters. Required if useCase is not provided.

  • : (use_case) —

    [String] The intent of the message, one of OTP, NOTIFICATIONS, FRAUD, SECURITY, CUSTOMERCARE, DELIVERY, EDUCATION, EVENTS, POLLING, ANNOUNCEMENTS or MARKETING. Required if body is not provided. It is used instead of the body when both are given.

  • : (channel) —

    [String] The channel the message is sent on, one of SMS, MMS, RCS or CALL. Defaults to SMS.

  • : (country_iso_code) —

    [String] The ISO 3166-1 alpha-2 country of the recipient. Only US is supported.

  • : (zip_code) —

    [String] The US zip code of the recipient, 5 digits or ZIP+4. When it is not given or not known, the location is inferred from the phone number.

  • : (send_at) —

    [String] An RFC 3339 timestamp, in UTC or with an offset, to evaluate a scheduled delivery instead of the current time. It must not be in the past.



88
89
90
# File 'lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb', line 88

def zip_code
  @zip_code
end

Instance Method Details

#to_json(options = {}) ⇒ Object



99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb', line 99

def to_json(options = {})
{
        "signals": @signals,
        "to": @to,
        "body": @body,
        "useCase": @use_case,
        "channel": @channel,
        "countryIsoCode": @country_iso_code,
        "zipCode": @zip_code,
        "sendAt": @send_at,
}.to_json(options)
end