Class: Karaden::Model::Message

Inherits:
Requestable show all
Defined in:
lib/karaden/model/message.rb

Constant Summary collapse

OBJECT_NAME =
'message'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Requestable

request, request_and_return_response_interface, requestor, requestor=

Methods inherited from KaradenObject

#id, #initialize, #object, #property, #property_keys, #set_property

Constructor Details

This class inherits a constructor from Karaden::Model::KaradenObject

Class Method Details

.cancel(params, request_options = nil) ⇒ Object



128
129
130
131
# File 'lib/karaden/model/message.rb', line 128

def self.cancel(params, request_options = nil)
  params.validate
  request('POST', params.to_path, nil, nil, nil, request_options)
end

.create(params, request_options = nil) ⇒ Object



113
114
115
116
# File 'lib/karaden/model/message.rb', line 113

def self.create(params, request_options = nil)
  params.validate
  request('POST', params.to_path, 'application/x-www-form-urlencoded', nil, params.to_data, request_options)
end

.detail(params, request_options = nil) ⇒ Object



123
124
125
126
# File 'lib/karaden/model/message.rb', line 123

def self.detail(params, request_options = nil)
  params.validate
  request('GET', params.to_path, nil, nil, nil, request_options)
end

.list(params, request_options = nil) ⇒ Object



118
119
120
121
# File 'lib/karaden/model/message.rb', line 118

def self.list(params, request_options = nil)
  params.validate
  request('GET', params.to_path, nil, params.to_params, nil, request_options)
end

Instance Method Details

#billing_address_idObject



10
11
12
# File 'lib/karaden/model/message.rb', line 10

def billing_address_id()
  property('billing_address_id')
end

#bodyObject



18
19
20
# File 'lib/karaden/model/message.rb', line 18

def body()
  property('body')
end

#carrierObject



46
47
48
# File 'lib/karaden/model/message.rb', line 46

def carrier()
  property('carrier')
end

#charged_atObject



86
87
88
89
90
91
92
93
# File 'lib/karaden/model/message.rb', line 86

def charged_at()
  charged_at = property('charged_at')
  begin
    Time.parse(charged_at)
  rescue StandardError
    nil
  end
end

#created_atObject



95
96
97
98
99
100
101
102
# File 'lib/karaden/model/message.rb', line 95

def created_at()
  created_at = property('created_at')
  begin
    Time.parse(created_at)
  rescue StandardError
    nil
  end
end

#limited_atObject



59
60
61
62
63
64
65
66
# File 'lib/karaden/model/message.rb', line 59

def limited_at()
  limited_at = property('limited_at')
  begin
    Time.parse(limited_at)
  rescue StandardError
    nil
  end
end

#received_atObject



77
78
79
80
81
82
83
84
# File 'lib/karaden/model/message.rb', line 77

def received_at()
  received_at = property('received_at')
  begin
    Time.parse(received_at)
  rescue StandardError
    nil
  end
end

#resultObject



34
35
36
# File 'lib/karaden/model/message.rb', line 34

def result()
  property('result')
end

#scheduled_atObject



50
51
52
53
54
55
56
57
# File 'lib/karaden/model/message.rb', line 50

def scheduled_at()
  scheduled_at = property('scheduled_at')
  begin
    Time.parse(scheduled_at)
  rescue StandardError
    nil
  end
end

#sent_atObject



68
69
70
71
72
73
74
75
# File 'lib/karaden/model/message.rb', line 68

def sent_at()
  sent_at = property('sent_at')
  begin
    Time.parse(sent_at)
  rescue StandardError
    nil
  end
end

#sent_resultObject



42
43
44
# File 'lib/karaden/model/message.rb', line 42

def sent_result()
  property('sent_result')
end

#service_idObject



6
7
8
# File 'lib/karaden/model/message.rb', line 6

def service_id()
  property('service_id')
end

#shorten?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/karaden/model/message.rb', line 26

def shorten?()
  property('is_shorten')
end

#shorten_clicked?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/karaden/model/message.rb', line 30

def shorten_clicked?()
  property('is_shorten_clicked')
end

#statusObject



38
39
40
# File 'lib/karaden/model/message.rb', line 38

def status()
  property('status')
end

#tagsObject



22
23
24
# File 'lib/karaden/model/message.rb', line 22

def tags()
  property('tags')
end

#toObject



14
15
16
# File 'lib/karaden/model/message.rb', line 14

def to()
  property('to')
end

#updated_atObject



104
105
106
107
108
109
110
111
# File 'lib/karaden/model/message.rb', line 104

def updated_at()
  updated_at = property('updated_at')
  begin
    Time.parse(updated_at)
  rescue StandardError
    nil
  end
end