Class: Sendly::TenDlcThroughput

Inherits:
Object
  • Object
show all
Defined in:
lib/sendly/tendlc_resource.rb

Overview

Messaging throughput granted by the carrier network.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ TenDlcThroughput

Returns a new instance of TenDlcThroughput.



53
54
55
56
# File 'lib/sendly/tendlc_resource.rb', line 53

def initialize(data)
  @tier = data["tier"]
  @carriers_ready = data["carriersReady"] || data["carriers_ready"]
end

Instance Attribute Details

#carriers_readyObject (readonly)

Returns the value of attribute carriers_ready.



51
52
53
# File 'lib/sendly/tendlc_resource.rb', line 51

def carriers_ready
  @carriers_ready
end

#tierObject (readonly)

Returns the value of attribute tier.



51
52
53
# File 'lib/sendly/tendlc_resource.rb', line 51

def tier
  @tier
end

Instance Method Details

#to_hObject



58
59
60
# File 'lib/sendly/tendlc_resource.rb', line 58

def to_h
  { tier: tier, carriers_ready: carriers_ready }.compact
end