Class: GandiV5::Organization
- Inherits:
-
Object
- Object
- GandiV5::Organization
- Includes:
- Data
- Defined in:
- lib/gandi_v5/organization.rb
Overview
The Organization API is a read-only API. All organization management must be performed via the web interface.
Instance Attribute Summary collapse
-
#city ⇒ String
readonly
The city name of the address.
-
#country ⇒ nil, String
readonly
Country ISO code of the address.
-
#email ⇒ String
readonly
The email address of the user.
-
#first_name ⇒ nil, String
readonly
The first name of the user.
-
#lang ⇒ String
readonly
Language used by the user.
-
#last_name ⇒ nil, String
readonly
The last name of the user.
-
#name ⇒ String
readonly
The sharing name of the user.
-
#phone ⇒ nil, String
readonly
The phone number of the user.
-
#security_email ⇒ String
readonly
Email address used for security processes such as account recovery.
-
#security_email_validated ⇒ Boolean
readonly
State of the email validation process.
-
#security_email_validation_deadline ⇒ Time
readonly
Deadline for the email address validation process.
-
#security_phone ⇒ nil, String
readonly
Phone number used for security recovery processes such as totp recovery.
-
#street_address ⇒ nil, String
readonly
The street address of the user.
-
#username ⇒ String
readonly
The username of the user.
-
#uuid ⇒ String
(also: #organization_uuid)
readonly
The sharing uuid of the user.
-
#zip ⇒ nil, String
readonly
Zip code of the address.
Class Method Summary collapse
-
.fetch ⇒ GandiV5::Organization
Get information about the current authenticated user.
-
.list(**params) ⇒ Array<GandiV5::Organization>
List organisations.
Methods included from Data
#from_gandi, included, #initialize, #to_gandi, #to_h, #values_at
Instance Attribute Details
#city ⇒ String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#country ⇒ nil, String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#email ⇒ String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#first_name ⇒ nil, String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#lang ⇒ String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#last_name ⇒ nil, String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#name ⇒ String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#phone ⇒ nil, String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#security_email ⇒ String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#security_email_validated ⇒ Boolean (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#security_email_validation_deadline ⇒ Time (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#security_phone ⇒ nil, String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#street_address ⇒ nil, String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#username ⇒ String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#uuid ⇒ String (readonly) Also known as: organization_uuid
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
#zip ⇒ nil, String (readonly)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/gandi_v5/organization.rb', line 40 class Organization include GandiV5::Data members :username, :name, :lang, :city, :zip, :country, :email, :phone, :security_phone, :security_email, :security_email_validated, :security_email_validation_deadline member :uuid, gandi_key: 'id' member :first_name, gandi_key: 'firstname' member :last_name, gandi_key: 'lastname' member :street_address, gandi_key: 'streetaddr' member :security_email_validation_deadline, converter: GandiV5::Data::Converter::Time alias organization_uuid uuid # Get information about the current authenticated user. # @see https://api.gandi.net/docs/organization#get-v5-organization-user-info # @return [GandiV5::Organization] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end # List organisations. # @see https://api.gandi.net/docs/domains#get-v5-organization-organizations # @param name [String, #to_s] (optional) # filters the list by name, with optional patterns. # e.g. "alice", "ali*", "*ice" # @param type [String, #to_s] (optional) # filters the list by type of organization. # One of: "individual", "company", "association", "publicbody" # @param permission [String, #to_s] (optional) # filters the list by the permission the authenticated user # has on that organization and products in it. # @param sort_by [String, #to_s] (optional default "name") how to sort the list. # @return [Array<GandiV5::Organization>] # @raise [GandiV5::Error::GandiError] if Gandi returns an error. def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end private def self.url "#{BASE}organization" end private_class_method :url end |
Class Method Details
.fetch ⇒ GandiV5::Organization
Get information about the current authenticated user.
57 58 59 60 |
# File 'lib/gandi_v5/organization.rb', line 57 def self.fetch _response, data = GandiV5.get "#{url}/user-info" from_gandi data end |
.list(**params) ⇒ Array<GandiV5::Organization>
List organisations.
76 77 78 79 80 |
# File 'lib/gandi_v5/organization.rb', line 76 def self.list(**params) params['~name'] = params.delete(:name) if params.key?(:name) _resp, data = GandiV5.get "#{url}/organizations", params: params data.map { |organisation| from_gandi organisation } end |