Sha256: 7d58cfb959e55f3bdbd6de25d314f35aa8ffc19a483810b75c4fa2671dc94d4f
Contents?: true
Size: 1.4 KB
Versions: 661
Compression:
Stored size: 1.4 KB
Contents
require_relative 'portal_base' module Spaceship module Portal class Invite < PortalBase # @return (String) Invite Id attr_accessor :invite_id # @return (String) Inviter name attr_accessor :inviter_name # @return (String) Recipient Email Address attr_accessor :email_address # @return (String) Role (member, admin or agent) attr_accessor :type # @return (String) Invite creation date attr_accessor :created # @return (String) Invite expiration date attr_accessor :expires attr_mapping( 'inviteId' => :invite_id, 'inviterName' => :inviter_name, 'recipientEmail' => :email_address, 'recipientRole' => :type, 'dateCreated' => :created, 'dateExpires' => :expires ) class << self def factory(attrs) begin attrs['dateCreated'] = Time.at(attrs['dateCreated'] / 1000).utc rescue NoMethodError # if attrs['dateCreated'] does not implement / rescue TypeError # if Time.at receives an invalid type end begin attrs['dateExpires'] = Time.at(attrs['dateExpires'] / 1000).utc rescue NoMethodError rescue TypeError end attrs['recipientRole'] = attrs['recipientRole'].downcase return self.new(attrs) end end end end end
Version data entries
661 entries across 661 versions & 5 rubygems
Version | Path |
---|---|
fastlane-2.74.0.beta.20180107010004 | spaceship/lib/spaceship/portal/invite.rb |