Class: GandiV5::Email::Offer
- Inherits:
-
Object
- Object
- GandiV5::Email::Offer
- Includes:
- Data
- Defined in:
- lib/gandi_v5/email/offer.rb
Overview
The current status of your mailbox offer.
Instance Attribute Summary collapse
- #status ⇒ :active, :inactive readonly
- #version ⇒ 1, 2 readonly
Class Method Summary collapse
-
.fetch(fqdn) ⇒ GandiV5::Email::Offer
Get the current status of your mailbox offer.
Methods included from Data
#from_gandi, included, #initialize, #to_gandi, #to_h, #values_at
Instance Attribute Details
#status ⇒ :active, :inactive (readonly)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/gandi_v5/email/offer.rb', line 10 class Offer include GandiV5::Data member :version member :status, converter: GandiV5::Data::Converter::Symbol # Get the current status of your mailbox offer. # @see https://api.gandi.net/docs/email#get-v5-email-offers-domain # @param fqdn [String, #to_s] the fully qualified domain name to get the offer for. # @return [GandiV5::Email::Offer] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch(fqdn) _response, data = GandiV5.get "#{BASE}email/offers/#{CGI.escape fqdn}" from_gandi data end end |
#version ⇒ 1, 2 (readonly)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/gandi_v5/email/offer.rb', line 10 class Offer include GandiV5::Data member :version member :status, converter: GandiV5::Data::Converter::Symbol # Get the current status of your mailbox offer. # @see https://api.gandi.net/docs/email#get-v5-email-offers-domain # @param fqdn [String, #to_s] the fully qualified domain name to get the offer for. # @return [GandiV5::Email::Offer] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch(fqdn) _response, data = GandiV5.get "#{BASE}email/offers/#{CGI.escape fqdn}" from_gandi data end end |
Class Method Details
.fetch(fqdn) ⇒ GandiV5::Email::Offer
Get the current status of your mailbox offer.
21 22 23 24 |
# File 'lib/gandi_v5/email/offer.rb', line 21 def self.fetch(fqdn) _response, data = GandiV5.get "#{BASE}email/offers/#{CGI.escape fqdn}" from_gandi data end |