Class: Increase::Models::OAuthTokenCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/increase/models/oauth_token_create_params.rb

Overview

Defined Under Namespace

Modules: GrantType

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(grant_type:, client_id: nil, client_secret: nil, code: nil, production_token: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Increase::Models::OAuthTokenCreateParams for more details.

Parameters:

  • grant_type (Symbol, Increase::Models::OAuthTokenCreateParams::GrantType)

    The credential you request in exchange for the code. In Production, this is alwa

  • client_id (String) (defaults to: nil)

    The public identifier for your application.

  • client_secret (String) (defaults to: nil)

    The secret that confirms you own the application. This is redundant given that t

  • code (String) (defaults to: nil)

    The authorization code generated by the user and given to you as a query paramet

  • production_token (String) (defaults to: nil)

    The production token you want to exchange for a sandbox token. This is only avai

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/increase/models/oauth_token_create_params.rb', line 46

Instance Attribute Details

#client_idString?

The public identifier for your application.

Returns:

  • (String, nil)


21
# File 'lib/increase/models/oauth_token_create_params.rb', line 21

optional :client_id, String

#client_secretString?

The secret that confirms you own the application. This is redundant given that the request is made with your API key but it’s a required component of OAuth 2.0.

Returns:

  • (String, nil)


29
# File 'lib/increase/models/oauth_token_create_params.rb', line 29

optional :client_secret, String

#codeString?

The authorization code generated by the user and given to you as a query parameter.

Returns:

  • (String, nil)


36
# File 'lib/increase/models/oauth_token_create_params.rb', line 36

optional :code, String

#grant_typeSymbol, Increase::Models::OAuthTokenCreateParams::GrantType

The credential you request in exchange for the code. In Production, this is always ‘authorization_code`. In Sandbox, you can pass either enum value.



15
# File 'lib/increase/models/oauth_token_create_params.rb', line 15

required :grant_type, enum: -> { Increase::OAuthTokenCreateParams::GrantType }

#production_tokenString?

The production token you want to exchange for a sandbox token. This is only available in Sandbox. Set ‘grant_type` to `production_token` to use this parameter.

Returns:

  • (String, nil)


44
# File 'lib/increase/models/oauth_token_create_params.rb', line 44

optional :production_token, String