Class: Verizon::VZM2MTokenCredentials

Inherits:
Object
  • Object
show all
Defined in:
lib/verizon/http/auth/vz_m2m_token.rb

Overview

Data class for VZM2MTokenCredentials. Data class for VZM2MTokenCredentials.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vz_m2m_token:) ⇒ VZM2MTokenCredentials

Returns a new instance of VZM2MTokenCredentials.

Raises:

  • (ArgumentError)


30
31
32
33
34
# File 'lib/verizon/http/auth/vz_m2m_token.rb', line 30

def initialize(vz_m2m_token:)
  raise ArgumentError, 'vz_m2m_token cannot be nil' if vz_m2m_token.nil?

  @vz_m2m_token = vz_m2m_token
end

Instance Attribute Details

#vz_m2m_tokenObject (readonly)

Returns the value of attribute vz_m2m_token.



28
29
30
# File 'lib/verizon/http/auth/vz_m2m_token.rb', line 28

def vz_m2m_token
  @vz_m2m_token
end

Instance Method Details

#clone_with(vz_m2m_token: nil) ⇒ Object



36
37
38
39
40
# File 'lib/verizon/http/auth/vz_m2m_token.rb', line 36

def clone_with(vz_m2m_token: nil)
  vz_m2m_token ||= self.vz_m2m_token

  VZM2MTokenCredentials.new(vz_m2m_token: vz_m2m_token)
end