Class: Rfsms::SendAnswer
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#all_recivers ⇒ Object
readonly
Returns the value of attribute all_recivers.
-
#col_non_send_abonent ⇒ Object
readonly
Returns the value of attribute col_non_send_abonent.
-
#col_send_abonent ⇒ Object
readonly
Returns the value of attribute col_send_abonent.
-
#colsms_of_sending ⇒ Object
readonly
Returns the value of attribute colsms_of_sending.
-
#datetime ⇒ Object
readonly
Returns the value of attribute datetime.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#price_of_sending ⇒ Object
readonly
Returns the value of attribute price_of_sending.
-
#smsid ⇒ Object
readonly
Returns the value of attribute smsid.
Attributes inherited from Answer
Instance Method Summary collapse
-
#initialize(body) ⇒ SendAnswer
constructor
A new instance of SendAnswer.
Constructor Details
#initialize(body) ⇒ SendAnswer
Returns a new instance of SendAnswer.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/rfsms.rb', line 68 def initialize(body) super(body) do |e| e.has_key?(:smsid) and e[:datetime] =~ DATEREGEXP and e[:action] =~ /^(?:check|make|send)$/ and e[:all_recivers] =~ INTEGER_REGEXP and e[:col_send_abonent] =~ INTEGER_REGEXP and e[:col_non_send_abonent] =~ INTEGER_REGEXP and e[:price_of_sending] =~ FLOAT_REGEXP and e[:colsms_of_sending] =~ INTEGER_REGEXP and e[:price] =~ FLOAT_REGEXP end @datetime = DateTime.strptime(@datetime, DATEFORMAT) @all_recivers = @all_recivers.to_i @col_send_abonent = @col_send_abonent.to_i @col_non_send_abonent = @col_non_send_abonent.to_i @price_of_sending = @price_of_sending.to_f @colsms_of_sending = @colsms_of_sending.to_i @price = @price.to_f end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
64 65 66 |
# File 'lib/rfsms.rb', line 64 def action @action end |
#all_recivers ⇒ Object (readonly)
Returns the value of attribute all_recivers.
64 65 66 |
# File 'lib/rfsms.rb', line 64 def all_recivers @all_recivers end |
#col_non_send_abonent ⇒ Object (readonly)
Returns the value of attribute col_non_send_abonent.
64 65 66 |
# File 'lib/rfsms.rb', line 64 def col_non_send_abonent @col_non_send_abonent end |
#col_send_abonent ⇒ Object (readonly)
Returns the value of attribute col_send_abonent.
64 65 66 |
# File 'lib/rfsms.rb', line 64 def col_send_abonent @col_send_abonent end |
#colsms_of_sending ⇒ Object (readonly)
Returns the value of attribute colsms_of_sending.
64 65 66 |
# File 'lib/rfsms.rb', line 64 def colsms_of_sending @colsms_of_sending end |
#datetime ⇒ Object (readonly)
Returns the value of attribute datetime.
64 65 66 |
# File 'lib/rfsms.rb', line 64 def datetime @datetime end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
64 65 66 |
# File 'lib/rfsms.rb', line 64 def price @price end |
#price_of_sending ⇒ Object (readonly)
Returns the value of attribute price_of_sending.
64 65 66 |
# File 'lib/rfsms.rb', line 64 def price_of_sending @price_of_sending end |
#smsid ⇒ Object (readonly)
Returns the value of attribute smsid.
64 65 66 |
# File 'lib/rfsms.rb', line 64 def smsid @smsid end |