Class: SendGrid::IpManagement
- Inherits:
-
Object
- Object
- SendGrid::IpManagement
- Defined in:
- lib/sendgrid/helpers/ip_management/ip_management.rb
Instance Attribute Summary collapse
-
#sendgrid_client ⇒ Object
Returns the value of attribute sendgrid_client.
Instance Method Summary collapse
-
#initialize(sendgrid_client:) ⇒ IpManagement
constructor
A new instance of IpManagement.
- #unassigned ⇒ Object
Constructor Details
#initialize(sendgrid_client:) ⇒ IpManagement
Returns a new instance of IpManagement.
7 8 9 |
# File 'lib/sendgrid/helpers/ip_management/ip_management.rb', line 7 def initialize(sendgrid_client:) @sendgrid_client = sendgrid_client end |
Instance Attribute Details
#sendgrid_client ⇒ Object
Returns the value of attribute sendgrid_client.
5 6 7 |
# File 'lib/sendgrid/helpers/ip_management/ip_management.rb', line 5 def sendgrid_client @sendgrid_client end |
Instance Method Details
#unassigned ⇒ Object
11 12 13 14 15 |
# File 'lib/sendgrid/helpers/ip_management/ip_management.rb', line 11 def unassigned response = @sendgrid_client.ips.get ips = JSON.parse(response.body) ips.select { |ip| ip.subusers.empty? } end |