Class: Pinnacle::Send::SendMmsResponse
- Inherits:
-
Object
- Object
- Pinnacle::Send::SendMmsResponse
- Defined in:
- lib/rcs/send/types/send_mms_response.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#message ⇒ String
readonly
A message indicating the status of the sent message.
-
#message_id ⇒ String
readonly
The unique ID of the sent message.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Pinnacle::Send::SendMmsResponse
Deserialize a JSON object to an instance of SendMmsResponse.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(message_id:, message:, additional_properties: nil) ⇒ Pinnacle::Send::SendMmsResponse constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of SendMmsResponse to a JSON object.
Constructor Details
#initialize(message_id:, message:, additional_properties: nil) ⇒ Pinnacle::Send::SendMmsResponse
25 26 27 28 29 30 |
# File 'lib/rcs/send/types/send_mms_response.rb', line 25 def initialize(message_id:, message:, additional_properties: nil) @message_id = @message = @additional_properties = additional_properties @_field_set = { "messageId": , "message": } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
14 15 16 |
# File 'lib/rcs/send/types/send_mms_response.rb', line 14 def additional_properties @additional_properties end |
#message ⇒ String (readonly)
Returns A message indicating the status of the sent message.
12 13 14 |
# File 'lib/rcs/send/types/send_mms_response.rb', line 12 def @message end |
#message_id ⇒ String (readonly)
Returns The unique ID of the sent message.
10 11 12 |
# File 'lib/rcs/send/types/send_mms_response.rb', line 10 def @message_id end |
Class Method Details
.from_json(json_object:) ⇒ Pinnacle::Send::SendMmsResponse
Deserialize a JSON object to an instance of SendMmsResponse
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rcs/send/types/send_mms_response.rb', line 36 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) = parsed_json["messageId"] = parsed_json["message"] new( message_id: , message: , additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
61 62 63 64 |
# File 'lib/rcs/send/types/send_mms_response.rb', line 61 def self.validate_raw(obj:) obj..is_a?(String) != false || raise("Passed value for field obj.message_id is not the expected type, validation failed.") obj..is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of SendMmsResponse to a JSON object
51 52 53 |
# File 'lib/rcs/send/types/send_mms_response.rb', line 51 def to_json(*_args) @_field_set&.to_json end |