Class: Zavudev::Models::TemplateCreateParams::Button
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Zavudev::Models::TemplateCreateParams::Button
- Defined in:
- lib/zavudev/models/template_create_params.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#example ⇒ String?
Sample value Meta uses to review templates with a dynamic URL button.
-
#otp_type ⇒ Symbol, ...
Required when type is ‘otp’.
-
#package_name ⇒ String?
Android package name.
- #phone_number ⇒ String?
-
#signature_hash ⇒ String?
Android app signature hash.
- #text ⇒ String
- #type ⇒ Symbol, Zavudev::Models::TemplateCreateParams::Button::Type
-
#url ⇒ String?
Button destination.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(text:, type:, example: nil, otp_type: nil, package_name: nil, phone_number: nil, signature_hash: nil, url: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Button for more details.
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(text:, type:, example: nil, otp_type: nil, package_name: nil, phone_number: nil, signature_hash: nil, url: nil) ⇒ Object
Some parameter documentations has been truncated, see Zavudev::Models::TemplateCreateParams::Button for more details.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/zavudev/models/template_create_params.rb', line 124 class Button < Zavudev::Internal::Type::BaseModel # @!attribute text # # @return [String] required :text, String # @!attribute type # # @return [Symbol, Zavudev::Models::TemplateCreateParams::Button::Type] required :type, enum: -> { Zavudev::TemplateCreateParams::Button::Type } # @!attribute example # Sample value Meta uses to review templates with a dynamic URL button. # Substituted into `{{1}}` of the URL when the template is submitted to Meta. Only # meaningful when `url` contains `{{1}}`; ignored for static URLs. # # @return [String, nil] optional :example, String # @!attribute otp_type # Required when type is 'otp'. COPY_CODE shows copy button, ONE_TAP enables # Android autofill. # # @return [Symbol, Zavudev::Models::TemplateCreateParams::Button::OtpType, nil] optional :otp_type, enum: -> { Zavudev::TemplateCreateParams::Button::OtpType }, api_name: :otpType # @!attribute package_name # Android package name. Required for ONE_TAP buttons. # # @return [String, nil] optional :package_name, String, api_name: :packageName # @!attribute phone_number # # @return [String, nil] optional :phone_number, String, api_name: :phoneNumber # @!attribute signature_hash # Android app signature hash. Required for ONE_TAP buttons. # # @return [String, nil] optional :signature_hash, String, api_name: :signatureHash # @!attribute url # Button destination. Use `{{1}}` exactly once for a dynamic URL (e.g. # `https://example.com/orders/{{1}}`); WhatsApp only accepts the strict `{{1}}` # form. Static URLs must not contain any `{{...}}` placeholder. # # @return [String, nil] optional :url, String # @!method initialize(text:, type:, example: nil, otp_type: nil, package_name: nil, phone_number: nil, signature_hash: nil, url: nil) # Some parameter documentations has been truncated, see # {Zavudev::Models::TemplateCreateParams::Button} for more details. # # @param text [String] # # @param type [Symbol, Zavudev::Models::TemplateCreateParams::Button::Type] # # @param example [String] Sample value Meta uses to review templates with a dynamic URL button. Substitute # # @param otp_type [Symbol, Zavudev::Models::TemplateCreateParams::Button::OtpType] Required when type is 'otp'. COPY_CODE shows copy button, ONE_TAP enables Androi # # @param package_name [String] Android package name. Required for ONE_TAP buttons. # # @param phone_number [String] # # @param signature_hash [String] Android app signature hash. Required for ONE_TAP buttons. # # @param url [String] Button destination. Use `{{1}}` exactly once for a dynamic URL (e.g. `https://ex # @see Zavudev::Models::TemplateCreateParams::Button#type module Type extend Zavudev::Internal::Type::Enum QUICK_REPLY = :quick_reply URL = :url PHONE = :phone OTP = :otp # @!method self.values # @return [Array<Symbol>] end # Required when type is 'otp'. COPY_CODE shows copy button, ONE_TAP enables # Android autofill. # # @see Zavudev::Models::TemplateCreateParams::Button#otp_type module OtpType extend Zavudev::Internal::Type::Enum COPY_CODE = :COPY_CODE ONE_TAP = :ONE_TAP # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#example ⇒ String?
Sample value Meta uses to review templates with a dynamic URL button. Substituted into ‘{1}` of the URL when the template is submitted to Meta. Only meaningful when `url` contains `{1}`; ignored for static URLs.
141 |
# File 'lib/zavudev/models/template_create_params.rb', line 141 optional :example, String |
#otp_type ⇒ Symbol, ...
Required when type is ‘otp’. COPY_CODE shows copy button, ONE_TAP enables Android autofill.
148 |
# File 'lib/zavudev/models/template_create_params.rb', line 148 optional :otp_type, enum: -> { Zavudev::TemplateCreateParams::Button::OtpType }, api_name: :otpType |
#package_name ⇒ String?
Android package name. Required for ONE_TAP buttons.
154 |
# File 'lib/zavudev/models/template_create_params.rb', line 154 optional :package_name, String, api_name: :packageName |
#phone_number ⇒ String?
159 |
# File 'lib/zavudev/models/template_create_params.rb', line 159 optional :phone_number, String, api_name: :phoneNumber |
#signature_hash ⇒ String?
Android app signature hash. Required for ONE_TAP buttons.
165 |
# File 'lib/zavudev/models/template_create_params.rb', line 165 optional :signature_hash, String, api_name: :signatureHash |
#text ⇒ String
128 |
# File 'lib/zavudev/models/template_create_params.rb', line 128 required :text, String |
#type ⇒ Symbol, Zavudev::Models::TemplateCreateParams::Button::Type
133 |
# File 'lib/zavudev/models/template_create_params.rb', line 133 required :type, enum: -> { Zavudev::TemplateCreateParams::Button::Type } |
#url ⇒ String?
Button destination. Use ‘{1}` exactly once for a dynamic URL (e.g. `example.com/orders/{1}`); WhatsApp only accepts the strict `{1}` form. Static URLs must not contain any `{…}` placeholder.
173 |
# File 'lib/zavudev/models/template_create_params.rb', line 173 optional :url, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/zavudev/models/template_create_params.rb', line 204
|