Class: CheckoutSdk::CheckoutOAuthSdkBuilder
Instance Attribute Summary collapse
#environment, #environment_subdomain, #http_client, #logger, #multipart_http_client
Instance Method Summary
collapse
#with_environment, #with_environment_subdomain, #with_http_client, #with_logger, #with_multipart_http_client
Instance Attribute Details
#authorization_uri ⇒ String
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/checkout_sdk/checkout_oauth_sdk_builder.rb', line 12
class CheckoutOAuthSdkBuilder < AbstractCheckoutSdkBuilder
attr_accessor :client_id,
:client_secret,
:authorization_uri,
:scopes
def with_client_credentials(client_id, client_secret)
@client_id = client_id
@client_secret = client_secret
self
end
def with_authorization_uri(authorization_uri)
@authorization_uri = authorization_uri
self
end
def with_scopes(scopes)
@scopes = scopes
self
end
def build
super
configuration = CheckoutConfiguration.new(
OAuthSdkCredentials.new(client_id,
client_secret,
scopes,
http_client,
environment,
logger,
authorization_uri),
environment,
http_client,
multipart_http_client,
logger
)
configuration.environment_subdomain = environment_subdomain if environment_subdomain
CheckoutApi.new(configuration)
end
end
|
#client_id ⇒ String
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/checkout_sdk/checkout_oauth_sdk_builder.rb', line 12
class CheckoutOAuthSdkBuilder < AbstractCheckoutSdkBuilder
attr_accessor :client_id,
:client_secret,
:authorization_uri,
:scopes
def with_client_credentials(client_id, client_secret)
@client_id = client_id
@client_secret = client_secret
self
end
def with_authorization_uri(authorization_uri)
@authorization_uri = authorization_uri
self
end
def with_scopes(scopes)
@scopes = scopes
self
end
def build
super
configuration = CheckoutConfiguration.new(
OAuthSdkCredentials.new(client_id,
client_secret,
scopes,
http_client,
environment,
logger,
authorization_uri),
environment,
http_client,
multipart_http_client,
logger
)
configuration.environment_subdomain = environment_subdomain if environment_subdomain
CheckoutApi.new(configuration)
end
end
|
#client_secret ⇒ String
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/checkout_sdk/checkout_oauth_sdk_builder.rb', line 12
class CheckoutOAuthSdkBuilder < AbstractCheckoutSdkBuilder
attr_accessor :client_id,
:client_secret,
:authorization_uri,
:scopes
def with_client_credentials(client_id, client_secret)
@client_id = client_id
@client_secret = client_secret
self
end
def with_authorization_uri(authorization_uri)
@authorization_uri = authorization_uri
self
end
def with_scopes(scopes)
@scopes = scopes
self
end
def build
super
configuration = CheckoutConfiguration.new(
OAuthSdkCredentials.new(client_id,
client_secret,
scopes,
http_client,
environment,
logger,
authorization_uri),
environment,
http_client,
multipart_http_client,
logger
)
configuration.environment_subdomain = environment_subdomain if environment_subdomain
CheckoutApi.new(configuration)
end
end
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/checkout_sdk/checkout_oauth_sdk_builder.rb', line 12
class CheckoutOAuthSdkBuilder < AbstractCheckoutSdkBuilder
attr_accessor :client_id,
:client_secret,
:authorization_uri,
:scopes
def with_client_credentials(client_id, client_secret)
@client_id = client_id
@client_secret = client_secret
self
end
def with_authorization_uri(authorization_uri)
@authorization_uri = authorization_uri
self
end
def with_scopes(scopes)
@scopes = scopes
self
end
def build
super
configuration = CheckoutConfiguration.new(
OAuthSdkCredentials.new(client_id,
client_secret,
scopes,
http_client,
environment,
logger,
authorization_uri),
environment,
http_client,
multipart_http_client,
logger
)
configuration.environment_subdomain = environment_subdomain if environment_subdomain
CheckoutApi.new(configuration)
end
end
|
Instance Method Details
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/checkout_sdk/checkout_oauth_sdk_builder.rb', line 42
def build
super
configuration = CheckoutConfiguration.new(
OAuthSdkCredentials.new(client_id,
client_secret,
scopes,
http_client,
environment,
logger,
authorization_uri),
environment,
http_client,
multipart_http_client,
logger
)
configuration.environment_subdomain = environment_subdomain if environment_subdomain
CheckoutApi.new(configuration)
end
|
29
30
31
32
|
# File 'lib/checkout_sdk/checkout_oauth_sdk_builder.rb', line 29
def with_authorization_uri(authorization_uri)
@authorization_uri = authorization_uri
self
end
|
#with_client_credentials(client_id, client_secret) ⇒ CheckoutOAuthSdkBuilder
21
22
23
24
25
|
# File 'lib/checkout_sdk/checkout_oauth_sdk_builder.rb', line 21
def with_client_credentials(client_id, client_secret)
@client_id = client_id
@client_secret = client_secret
self
end
|
36
37
38
39
|
# File 'lib/checkout_sdk/checkout_oauth_sdk_builder.rb', line 36
def with_scopes(scopes)
@scopes = scopes
self
end
|