Class: ShellSmartPayApi::OAuthTokenPostCredentials

Inherits:
Object
  • Object
show all
Defined in:
lib/shell_smart_pay_api/http/auth/o_auth_token_post.rb

Overview

Data class for OAuthTokenPostCredentials. Data class for OAuthTokenPostCredentials.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x_apigee_authorization:) ⇒ OAuthTokenPostCredentials

Returns a new instance of OAuthTokenPostCredentials.

Raises:

  • (ArgumentError)


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

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

  @x_apigee_authorization = x_apigee_authorization
end

Instance Attribute Details

#x_apigee_authorizationObject (readonly)

Returns the value of attribute x_apigee_authorization.



28
29
30
# File 'lib/shell_smart_pay_api/http/auth/o_auth_token_post.rb', line 28

def x_apigee_authorization
  @x_apigee_authorization
end

Instance Method Details

#clone_with(x_apigee_authorization: nil) ⇒ Object



36
37
38
39
40
41
42
# File 'lib/shell_smart_pay_api/http/auth/o_auth_token_post.rb', line 36

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

  OAuthTokenPostCredentials.new(
    x_apigee_authorization: x_apigee_authorization
  )
end