increase 1.361.0 → 1.363.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/increase/client.rb +0 -16
- data/lib/increase/internal/transport/pooled_net_requester.rb +3 -0
- data/lib/increase/internal/util.rb +22 -17
- data/lib/increase/models/ach_transfer.rb +38 -23
- data/lib/increase/models/ach_transfer_create_params.rb +73 -42
- data/lib/increase/models/check_transfer.rb +58 -44
- data/lib/increase/models/check_transfer_create_params.rb +35 -21
- data/lib/increase/models/export.rb +12 -1
- data/lib/increase/models/export_create_params.rb +26 -4
- data/lib/increase/models/inbound_real_time_payments_transfer.rb +10 -1
- data/lib/increase/models/inbound_real_time_payments_transfer_return_params.rb +36 -0
- data/lib/increase/models/real_time_payments_transfer.rb +21 -1
- data/lib/increase/models/simulations/card_dispute_action_params.rb +26 -4
- data/lib/increase/models/simulations/wire_drawdown_request_refuse_params.rb +52 -1
- data/lib/increase/models/transaction.rb +3 -3
- data/lib/increase/models/wire_drawdown_request.rb +78 -1
- data/lib/increase/models.rb +3 -20
- data/lib/increase/resources/ach_transfers.rb +43 -22
- data/lib/increase/resources/inbound_real_time_payments_transfers.rb +28 -0
- data/lib/increase/resources/simulations/wire_drawdown_requests.rb +12 -2
- data/lib/increase/version.rb +1 -1
- data/lib/increase.rb +1 -14
- data/rbi/increase/client.rbi +0 -12
- data/rbi/increase/internal/util.rbi +3 -1
- data/rbi/increase/models/ach_transfer.rbi +35 -23
- data/rbi/increase/models/ach_transfer_create_params.rbi +72 -42
- data/rbi/increase/models/check_transfer.rbi +72 -54
- data/rbi/increase/models/check_transfer_create_params.rbi +55 -21
- data/rbi/increase/models/export.rbi +15 -3
- data/rbi/increase/models/export_create_params.rbi +27 -3
- data/rbi/increase/models/inbound_real_time_payments_transfer.rbi +8 -0
- data/rbi/increase/models/inbound_real_time_payments_transfer_return_params.rbi +61 -0
- data/rbi/increase/models/real_time_payments_transfer.rbi +18 -0
- data/rbi/increase/models/simulations/card_dispute_action_params.rbi +56 -3
- data/rbi/increase/models/simulations/wire_drawdown_request_refuse_params.rbi +107 -0
- data/rbi/increase/models/transaction.rbi +3 -3
- data/rbi/increase/models/wire_drawdown_request.rbi +146 -0
- data/rbi/increase/models.rbi +3 -22
- data/rbi/increase/resources/ach_transfers.rbi +42 -22
- data/rbi/increase/resources/inbound_real_time_payments_transfers.rbi +19 -0
- data/rbi/increase/resources/simulations/wire_drawdown_requests.rbi +9 -0
- data/sig/increase/client.rbs +0 -8
- data/sig/increase/internal/util.rbs +1 -1
- data/sig/increase/models/ach_transfer.rbs +4 -4
- data/sig/increase/models/check_transfer.rbs +59 -49
- data/sig/increase/models/check_transfer_create_params.rbs +20 -12
- data/sig/increase/models/export.rbs +13 -3
- data/sig/increase/models/export_create_params.rbs +7 -0
- data/sig/increase/models/inbound_real_time_payments_transfer.rbs +5 -0
- data/sig/increase/models/inbound_real_time_payments_transfer_return_params.rbs +30 -0
- data/sig/increase/models/real_time_payments_transfer.rbs +10 -0
- data/sig/increase/models/simulations/card_dispute_action_params.rbs +24 -3
- data/sig/increase/models/simulations/wire_drawdown_request_refuse_params.rbs +51 -1
- data/sig/increase/models/transaction.rbs +4 -4
- data/sig/increase/models/wire_drawdown_request.rbs +64 -0
- data/sig/increase/models.rbs +2 -20
- data/sig/increase/resources/inbound_real_time_payments_transfers.rbs +6 -0
- data/sig/increase/resources/simulations/wire_drawdown_requests.rbs +2 -0
- metadata +20 -45
- data/lib/increase/models/group.rb +0 -57
- data/lib/increase/models/group_retrieve_params.rb +0 -14
- data/lib/increase/models/oauth_application.rb +0 -111
- data/lib/increase/models/oauth_application_list_params.rb +0 -129
- data/lib/increase/models/oauth_application_retrieve_params.rb +0 -22
- data/lib/increase/models/oauth_connection.rb +0 -107
- data/lib/increase/models/oauth_connection_list_params.rb +0 -88
- data/lib/increase/models/oauth_connection_retrieve_params.rb +0 -22
- data/lib/increase/models/oauth_token.rb +0 -76
- data/lib/increase/models/oauth_token_create_params.rb +0 -85
- data/lib/increase/resources/groups.rb +0 -32
- data/lib/increase/resources/oauth_applications.rb +0 -68
- data/lib/increase/resources/oauth_connections.rb +0 -70
- data/lib/increase/resources/oauth_tokens.rb +0 -54
- data/rbi/increase/models/group.rbi +0 -74
- data/rbi/increase/models/group_retrieve_params.rbi +0 -27
- data/rbi/increase/models/oauth_application.rbi +0 -146
- data/rbi/increase/models/oauth_application_list_params.rbi +0 -263
- data/rbi/increase/models/oauth_application_retrieve_params.rbi +0 -46
- data/rbi/increase/models/oauth_connection.rbi +0 -142
- data/rbi/increase/models/oauth_connection_list_params.rbi +0 -187
- data/rbi/increase/models/oauth_connection_retrieve_params.rbi +0 -46
- data/rbi/increase/models/oauth_token.rbi +0 -106
- data/rbi/increase/models/oauth_token_create_params.rbi +0 -133
- data/rbi/increase/resources/groups.rbi +0 -21
- data/rbi/increase/resources/oauth_applications.rbi +0 -50
- data/rbi/increase/resources/oauth_connections.rbi +0 -52
- data/rbi/increase/resources/oauth_tokens.rbi +0 -44
- data/sig/increase/models/group.rbs +0 -36
- data/sig/increase/models/group_retrieve_params.rbs +0 -15
- data/sig/increase/models/oauth_application.rbs +0 -74
- data/sig/increase/models/oauth_application_list_params.rbs +0 -123
- data/sig/increase/models/oauth_application_retrieve_params.rbs +0 -24
- data/sig/increase/models/oauth_connection.rbs +0 -74
- data/sig/increase/models/oauth_connection_list_params.rbs +0 -86
- data/sig/increase/models/oauth_connection_retrieve_params.rbs +0 -24
- data/sig/increase/models/oauth_token.rbs +0 -55
- data/sig/increase/models/oauth_token_create_params.rbs +0 -68
- data/sig/increase/resources/groups.rbs +0 -11
- data/sig/increase/resources/oauth_applications.rbs +0 -20
- data/sig/increase/resources/oauth_connections.rbs +0 -20
- data/sig/increase/resources/oauth_tokens.rbs +0 -16
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Increase
|
|
4
|
-
module Models
|
|
5
|
-
# @see Increase::Resources::OAuthConnections#list
|
|
6
|
-
class OAuthConnectionListParams < Increase::Internal::Type::BaseModel
|
|
7
|
-
extend Increase::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Increase::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
# @!attribute cursor
|
|
11
|
-
# Return the page of entries after this one.
|
|
12
|
-
#
|
|
13
|
-
# @return [String, nil]
|
|
14
|
-
optional :cursor, String
|
|
15
|
-
|
|
16
|
-
# @!attribute limit
|
|
17
|
-
# Limit the size of the list that is returned. The default (and maximum) is 100
|
|
18
|
-
# objects.
|
|
19
|
-
#
|
|
20
|
-
# Defaults to `100`.
|
|
21
|
-
#
|
|
22
|
-
# @return [Integer, nil]
|
|
23
|
-
optional :limit, Integer
|
|
24
|
-
|
|
25
|
-
# @!attribute oauth_application_id
|
|
26
|
-
# Filter results to only include OAuth Connections for a specific OAuth
|
|
27
|
-
# Application.
|
|
28
|
-
#
|
|
29
|
-
# @return [String, nil]
|
|
30
|
-
optional :oauth_application_id, String
|
|
31
|
-
|
|
32
|
-
# @!attribute status
|
|
33
|
-
#
|
|
34
|
-
# @return [Increase::Models::OAuthConnectionListParams::Status, nil]
|
|
35
|
-
optional :status, -> { Increase::OAuthConnectionListParams::Status }
|
|
36
|
-
|
|
37
|
-
# @!method initialize(cursor: nil, limit: nil, oauth_application_id: nil, status: nil, request_options: {})
|
|
38
|
-
# @param cursor [String] Return the page of entries after this one.
|
|
39
|
-
#
|
|
40
|
-
# @param limit [Integer]
|
|
41
|
-
# Limit the size of the list that is returned. The default (and maximum) is 100
|
|
42
|
-
# objects.
|
|
43
|
-
#
|
|
44
|
-
# Defaults to `100`.
|
|
45
|
-
#
|
|
46
|
-
# @param oauth_application_id [String]
|
|
47
|
-
# Filter results to only include OAuth Connections for a specific OAuth
|
|
48
|
-
# Application.
|
|
49
|
-
#
|
|
50
|
-
# @param status [Increase::Models::OAuthConnectionListParams::Status]
|
|
51
|
-
#
|
|
52
|
-
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
|
|
53
|
-
|
|
54
|
-
class Status < Increase::Internal::Type::BaseModel
|
|
55
|
-
# @!attribute in_
|
|
56
|
-
# Filter to OAuth Connections by their status. By default, return only the
|
|
57
|
-
# `active` ones. For GET requests, this should be encoded as a comma-delimited
|
|
58
|
-
# string, such as `?in=one,two,three`.
|
|
59
|
-
#
|
|
60
|
-
# @return [Array<Symbol, Increase::Models::OAuthConnectionListParams::Status::In>, nil]
|
|
61
|
-
optional :in_,
|
|
62
|
-
-> {
|
|
63
|
-
Increase::Internal::Type::ArrayOf[enum: Increase::OAuthConnectionListParams::Status::In]
|
|
64
|
-
},
|
|
65
|
-
api_name: :in
|
|
66
|
-
|
|
67
|
-
# @!method initialize(in_: nil)
|
|
68
|
-
# @param in_ [Array<Symbol, Increase::Models::OAuthConnectionListParams::Status::In>]
|
|
69
|
-
# Filter to OAuth Connections by their status. By default, return only the
|
|
70
|
-
# `active` ones. For GET requests, this should be encoded as a comma-delimited
|
|
71
|
-
# string, such as `?in=one,two,three`.
|
|
72
|
-
|
|
73
|
-
module In
|
|
74
|
-
extend Increase::Internal::Type::Enum
|
|
75
|
-
|
|
76
|
-
# The OAuth connection is active.
|
|
77
|
-
ACTIVE = :active
|
|
78
|
-
|
|
79
|
-
# The OAuth connection is permanently deactivated.
|
|
80
|
-
INACTIVE = :inactive
|
|
81
|
-
|
|
82
|
-
# @!method self.values
|
|
83
|
-
# @return [Array<Symbol>]
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
end
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Increase
|
|
4
|
-
module Models
|
|
5
|
-
# @see Increase::Resources::OAuthConnections#retrieve
|
|
6
|
-
class OAuthConnectionRetrieveParams < Increase::Internal::Type::BaseModel
|
|
7
|
-
extend Increase::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Increase::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
# @!attribute oauth_connection_id
|
|
11
|
-
# The identifier of the OAuth Connection.
|
|
12
|
-
#
|
|
13
|
-
# @return [String]
|
|
14
|
-
required :oauth_connection_id, String
|
|
15
|
-
|
|
16
|
-
# @!method initialize(oauth_connection_id:, request_options: {})
|
|
17
|
-
# @param oauth_connection_id [String] The identifier of the OAuth Connection.
|
|
18
|
-
#
|
|
19
|
-
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Increase
|
|
4
|
-
module Models
|
|
5
|
-
# @see Increase::Resources::OAuthTokens#create
|
|
6
|
-
class OAuthToken < Increase::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute access_token
|
|
8
|
-
# You may use this token in place of an API key to make OAuth requests on a user's
|
|
9
|
-
# behalf.
|
|
10
|
-
#
|
|
11
|
-
# @return [String]
|
|
12
|
-
required :access_token, String
|
|
13
|
-
|
|
14
|
-
# @!attribute group_id
|
|
15
|
-
# The Group's identifier. A Group is the top-level organization in Increase.
|
|
16
|
-
#
|
|
17
|
-
# @return [String]
|
|
18
|
-
required :group_id, String
|
|
19
|
-
|
|
20
|
-
# @!attribute token_type
|
|
21
|
-
# The type of OAuth token.
|
|
22
|
-
#
|
|
23
|
-
# @return [Symbol, Increase::Models::OAuthToken::TokenType]
|
|
24
|
-
required :token_type, enum: -> { Increase::OAuthToken::TokenType }
|
|
25
|
-
|
|
26
|
-
# @!attribute type
|
|
27
|
-
# A constant representing the object's type. For this resource it will always be
|
|
28
|
-
# `oauth_token`.
|
|
29
|
-
#
|
|
30
|
-
# @return [Symbol, Increase::Models::OAuthToken::Type]
|
|
31
|
-
required :type, enum: -> { Increase::OAuthToken::Type }
|
|
32
|
-
|
|
33
|
-
# @!method initialize(access_token:, group_id:, token_type:, type:)
|
|
34
|
-
# A token that is returned to your application when a user completes the OAuth
|
|
35
|
-
# flow and may be used to authenticate requests. Learn more about OAuth
|
|
36
|
-
# [here](/documentation/oauth).
|
|
37
|
-
#
|
|
38
|
-
# @param access_token [String]
|
|
39
|
-
# You may use this token in place of an API key to make OAuth requests on a user's
|
|
40
|
-
# behalf.
|
|
41
|
-
#
|
|
42
|
-
# @param group_id [String] The Group's identifier. A Group is the top-level organization in Increase.
|
|
43
|
-
#
|
|
44
|
-
# @param token_type [Symbol, Increase::Models::OAuthToken::TokenType] The type of OAuth token.
|
|
45
|
-
#
|
|
46
|
-
# @param type [Symbol, Increase::Models::OAuthToken::Type]
|
|
47
|
-
# A constant representing the object's type. For this resource it will always be
|
|
48
|
-
# `oauth_token`.
|
|
49
|
-
|
|
50
|
-
# The type of OAuth token.
|
|
51
|
-
#
|
|
52
|
-
# @see Increase::Models::OAuthToken#token_type
|
|
53
|
-
module TokenType
|
|
54
|
-
extend Increase::Internal::Type::Enum
|
|
55
|
-
|
|
56
|
-
BEARER = :bearer
|
|
57
|
-
|
|
58
|
-
# @!method self.values
|
|
59
|
-
# @return [Array<Symbol>]
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# A constant representing the object's type. For this resource it will always be
|
|
63
|
-
# `oauth_token`.
|
|
64
|
-
#
|
|
65
|
-
# @see Increase::Models::OAuthToken#type
|
|
66
|
-
module Type
|
|
67
|
-
extend Increase::Internal::Type::Enum
|
|
68
|
-
|
|
69
|
-
OAUTH_TOKEN = :oauth_token
|
|
70
|
-
|
|
71
|
-
# @!method self.values
|
|
72
|
-
# @return [Array<Symbol>]
|
|
73
|
-
end
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
end
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Increase
|
|
4
|
-
module Models
|
|
5
|
-
# @see Increase::Resources::OAuthTokens#create
|
|
6
|
-
class OAuthTokenCreateParams < Increase::Internal::Type::BaseModel
|
|
7
|
-
extend Increase::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Increase::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
# @!attribute grant_type
|
|
11
|
-
# The credential you request in exchange for the code. In Production, this is
|
|
12
|
-
# always `authorization_code`. In Sandbox, you can pass either enum value.
|
|
13
|
-
#
|
|
14
|
-
# @return [Symbol, Increase::Models::OAuthTokenCreateParams::GrantType]
|
|
15
|
-
required :grant_type, enum: -> { Increase::OAuthTokenCreateParams::GrantType }
|
|
16
|
-
|
|
17
|
-
# @!attribute client_id
|
|
18
|
-
# The public identifier for your application.
|
|
19
|
-
#
|
|
20
|
-
# @return [String, nil]
|
|
21
|
-
optional :client_id, String
|
|
22
|
-
|
|
23
|
-
# @!attribute client_secret
|
|
24
|
-
# The secret that confirms you own the application. This is redundant given that
|
|
25
|
-
# the request is made with your API key but it's a required component of OAuth
|
|
26
|
-
# 2.0.
|
|
27
|
-
#
|
|
28
|
-
# @return [String, nil]
|
|
29
|
-
optional :client_secret, String
|
|
30
|
-
|
|
31
|
-
# @!attribute code
|
|
32
|
-
# The authorization code generated by the user and given to you as a query
|
|
33
|
-
# parameter.
|
|
34
|
-
#
|
|
35
|
-
# @return [String, nil]
|
|
36
|
-
optional :code, String
|
|
37
|
-
|
|
38
|
-
# @!attribute production_token
|
|
39
|
-
# The production token you want to exchange for a sandbox token. This is only
|
|
40
|
-
# available in Sandbox. Set `grant_type` to `production_token` to use this
|
|
41
|
-
# parameter.
|
|
42
|
-
#
|
|
43
|
-
# @return [String, nil]
|
|
44
|
-
optional :production_token, String
|
|
45
|
-
|
|
46
|
-
# @!method initialize(grant_type:, client_id: nil, client_secret: nil, code: nil, production_token: nil, request_options: {})
|
|
47
|
-
# @param grant_type [Symbol, Increase::Models::OAuthTokenCreateParams::GrantType]
|
|
48
|
-
# The credential you request in exchange for the code. In Production, this is
|
|
49
|
-
# always `authorization_code`. In Sandbox, you can pass either enum value.
|
|
50
|
-
#
|
|
51
|
-
# @param client_id [String] The public identifier for your application.
|
|
52
|
-
#
|
|
53
|
-
# @param client_secret [String]
|
|
54
|
-
# The secret that confirms you own the application. This is redundant given that
|
|
55
|
-
# the request is made with your API key but it's a required component of OAuth
|
|
56
|
-
# 2.0.
|
|
57
|
-
#
|
|
58
|
-
# @param code [String]
|
|
59
|
-
# The authorization code generated by the user and given to you as a query
|
|
60
|
-
# parameter.
|
|
61
|
-
#
|
|
62
|
-
# @param production_token [String]
|
|
63
|
-
# The production token you want to exchange for a sandbox token. This is only
|
|
64
|
-
# available in Sandbox. Set `grant_type` to `production_token` to use this
|
|
65
|
-
# parameter.
|
|
66
|
-
#
|
|
67
|
-
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
|
|
68
|
-
|
|
69
|
-
# The credential you request in exchange for the code. In Production, this is
|
|
70
|
-
# always `authorization_code`. In Sandbox, you can pass either enum value.
|
|
71
|
-
module GrantType
|
|
72
|
-
extend Increase::Internal::Type::Enum
|
|
73
|
-
|
|
74
|
-
# An OAuth authorization code.
|
|
75
|
-
AUTHORIZATION_CODE = :authorization_code
|
|
76
|
-
|
|
77
|
-
# An OAuth production token.
|
|
78
|
-
PRODUCTION_TOKEN = :production_token
|
|
79
|
-
|
|
80
|
-
# @!method self.values
|
|
81
|
-
# @return [Array<Symbol>]
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
end
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Increase
|
|
4
|
-
module Resources
|
|
5
|
-
class Groups
|
|
6
|
-
# Returns details for the currently authenticated Group.
|
|
7
|
-
#
|
|
8
|
-
# @overload retrieve(request_options: {})
|
|
9
|
-
#
|
|
10
|
-
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
11
|
-
#
|
|
12
|
-
# @return [Increase::Models::Group]
|
|
13
|
-
#
|
|
14
|
-
# @see Increase::Models::GroupRetrieveParams
|
|
15
|
-
def retrieve(params = {})
|
|
16
|
-
@client.request(
|
|
17
|
-
method: :get,
|
|
18
|
-
path: "groups/current",
|
|
19
|
-
model: Increase::Group,
|
|
20
|
-
options: params[:request_options]
|
|
21
|
-
)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# @api private
|
|
25
|
-
#
|
|
26
|
-
# @param client [Increase::Client]
|
|
27
|
-
def initialize(client:)
|
|
28
|
-
@client = client
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Increase
|
|
4
|
-
module Resources
|
|
5
|
-
class OAuthApplications
|
|
6
|
-
# Retrieve an OAuth Application
|
|
7
|
-
#
|
|
8
|
-
# @overload retrieve(oauth_application_id, request_options: {})
|
|
9
|
-
#
|
|
10
|
-
# @param oauth_application_id [String] The identifier of the OAuth Application.
|
|
11
|
-
#
|
|
12
|
-
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
13
|
-
#
|
|
14
|
-
# @return [Increase::Models::OAuthApplication]
|
|
15
|
-
#
|
|
16
|
-
# @see Increase::Models::OAuthApplicationRetrieveParams
|
|
17
|
-
def retrieve(oauth_application_id, params = {})
|
|
18
|
-
@client.request(
|
|
19
|
-
method: :get,
|
|
20
|
-
path: ["oauth_applications/%1$s", oauth_application_id],
|
|
21
|
-
model: Increase::OAuthApplication,
|
|
22
|
-
options: params[:request_options]
|
|
23
|
-
)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# List OAuth Applications
|
|
27
|
-
#
|
|
28
|
-
# @overload list(created_at: nil, cursor: nil, limit: nil, status: nil, request_options: {})
|
|
29
|
-
#
|
|
30
|
-
# @param created_at [Increase::Models::OAuthApplicationListParams::CreatedAt]
|
|
31
|
-
#
|
|
32
|
-
# @param cursor [String] Return the page of entries after this one.
|
|
33
|
-
#
|
|
34
|
-
# @param limit [Integer]
|
|
35
|
-
# Limit the size of the list that is returned. The default (and maximum) is 100
|
|
36
|
-
# objects.
|
|
37
|
-
#
|
|
38
|
-
# Defaults to `100`.
|
|
39
|
-
#
|
|
40
|
-
# @param status [Increase::Models::OAuthApplicationListParams::Status]
|
|
41
|
-
#
|
|
42
|
-
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
43
|
-
#
|
|
44
|
-
# @return [Increase::Internal::Page<Increase::Models::OAuthApplication>]
|
|
45
|
-
#
|
|
46
|
-
# @see Increase::Models::OAuthApplicationListParams
|
|
47
|
-
def list(params = {})
|
|
48
|
-
parsed, options = Increase::OAuthApplicationListParams.dump_request(params)
|
|
49
|
-
query = Increase::Internal::Util.encode_query_params(parsed)
|
|
50
|
-
@client.request(
|
|
51
|
-
method: :get,
|
|
52
|
-
path: "oauth_applications",
|
|
53
|
-
query: query,
|
|
54
|
-
page: Increase::Internal::Page,
|
|
55
|
-
model: Increase::OAuthApplication,
|
|
56
|
-
options: options
|
|
57
|
-
)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# @api private
|
|
61
|
-
#
|
|
62
|
-
# @param client [Increase::Client]
|
|
63
|
-
def initialize(client:)
|
|
64
|
-
@client = client
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|
|
68
|
-
end
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Increase
|
|
4
|
-
module Resources
|
|
5
|
-
class OAuthConnections
|
|
6
|
-
# Retrieve an OAuth Connection
|
|
7
|
-
#
|
|
8
|
-
# @overload retrieve(oauth_connection_id, request_options: {})
|
|
9
|
-
#
|
|
10
|
-
# @param oauth_connection_id [String] The identifier of the OAuth Connection.
|
|
11
|
-
#
|
|
12
|
-
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
13
|
-
#
|
|
14
|
-
# @return [Increase::Models::OAuthConnection]
|
|
15
|
-
#
|
|
16
|
-
# @see Increase::Models::OAuthConnectionRetrieveParams
|
|
17
|
-
def retrieve(oauth_connection_id, params = {})
|
|
18
|
-
@client.request(
|
|
19
|
-
method: :get,
|
|
20
|
-
path: ["oauth_connections/%1$s", oauth_connection_id],
|
|
21
|
-
model: Increase::OAuthConnection,
|
|
22
|
-
options: params[:request_options]
|
|
23
|
-
)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# List OAuth Connections
|
|
27
|
-
#
|
|
28
|
-
# @overload list(cursor: nil, limit: nil, oauth_application_id: nil, status: nil, request_options: {})
|
|
29
|
-
#
|
|
30
|
-
# @param cursor [String] Return the page of entries after this one.
|
|
31
|
-
#
|
|
32
|
-
# @param limit [Integer]
|
|
33
|
-
# Limit the size of the list that is returned. The default (and maximum) is 100
|
|
34
|
-
# objects.
|
|
35
|
-
#
|
|
36
|
-
# Defaults to `100`.
|
|
37
|
-
#
|
|
38
|
-
# @param oauth_application_id [String]
|
|
39
|
-
# Filter results to only include OAuth Connections for a specific OAuth
|
|
40
|
-
# Application.
|
|
41
|
-
#
|
|
42
|
-
# @param status [Increase::Models::OAuthConnectionListParams::Status]
|
|
43
|
-
#
|
|
44
|
-
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
45
|
-
#
|
|
46
|
-
# @return [Increase::Internal::Page<Increase::Models::OAuthConnection>]
|
|
47
|
-
#
|
|
48
|
-
# @see Increase::Models::OAuthConnectionListParams
|
|
49
|
-
def list(params = {})
|
|
50
|
-
parsed, options = Increase::OAuthConnectionListParams.dump_request(params)
|
|
51
|
-
query = Increase::Internal::Util.encode_query_params(parsed)
|
|
52
|
-
@client.request(
|
|
53
|
-
method: :get,
|
|
54
|
-
path: "oauth_connections",
|
|
55
|
-
query: query,
|
|
56
|
-
page: Increase::Internal::Page,
|
|
57
|
-
model: Increase::OAuthConnection,
|
|
58
|
-
options: options
|
|
59
|
-
)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# @api private
|
|
63
|
-
#
|
|
64
|
-
# @param client [Increase::Client]
|
|
65
|
-
def initialize(client:)
|
|
66
|
-
@client = client
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
end
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Increase
|
|
4
|
-
module Resources
|
|
5
|
-
class OAuthTokens
|
|
6
|
-
# Create an OAuth Token
|
|
7
|
-
#
|
|
8
|
-
# @overload create(grant_type:, client_id: nil, client_secret: nil, code: nil, production_token: nil, request_options: {})
|
|
9
|
-
#
|
|
10
|
-
# @param grant_type [Symbol, Increase::Models::OAuthTokenCreateParams::GrantType]
|
|
11
|
-
# The credential you request in exchange for the code. In Production, this is
|
|
12
|
-
# always `authorization_code`. In Sandbox, you can pass either enum value.
|
|
13
|
-
#
|
|
14
|
-
# @param client_id [String] The public identifier for your application.
|
|
15
|
-
#
|
|
16
|
-
# @param client_secret [String]
|
|
17
|
-
# The secret that confirms you own the application. This is redundant given that
|
|
18
|
-
# the request is made with your API key but it's a required component of OAuth
|
|
19
|
-
# 2.0.
|
|
20
|
-
#
|
|
21
|
-
# @param code [String]
|
|
22
|
-
# The authorization code generated by the user and given to you as a query
|
|
23
|
-
# parameter.
|
|
24
|
-
#
|
|
25
|
-
# @param production_token [String]
|
|
26
|
-
# The production token you want to exchange for a sandbox token. This is only
|
|
27
|
-
# available in Sandbox. Set `grant_type` to `production_token` to use this
|
|
28
|
-
# parameter.
|
|
29
|
-
#
|
|
30
|
-
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
31
|
-
#
|
|
32
|
-
# @return [Increase::Models::OAuthToken]
|
|
33
|
-
#
|
|
34
|
-
# @see Increase::Models::OAuthTokenCreateParams
|
|
35
|
-
def create(params)
|
|
36
|
-
parsed, options = Increase::OAuthTokenCreateParams.dump_request(params)
|
|
37
|
-
@client.request(
|
|
38
|
-
method: :post,
|
|
39
|
-
path: "oauth/tokens",
|
|
40
|
-
body: parsed,
|
|
41
|
-
model: Increase::OAuthToken,
|
|
42
|
-
options: options
|
|
43
|
-
)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# @api private
|
|
47
|
-
#
|
|
48
|
-
# @param client [Increase::Client]
|
|
49
|
-
def initialize(client:)
|
|
50
|
-
@client = client
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Increase
|
|
4
|
-
module Models
|
|
5
|
-
class Group < Increase::Internal::Type::BaseModel
|
|
6
|
-
OrHash =
|
|
7
|
-
T.type_alias { T.any(Increase::Group, Increase::Internal::AnyHash) }
|
|
8
|
-
|
|
9
|
-
# The Group identifier.
|
|
10
|
-
sig { returns(String) }
|
|
11
|
-
attr_accessor :id
|
|
12
|
-
|
|
13
|
-
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Group
|
|
14
|
-
# was created.
|
|
15
|
-
sig { returns(Time) }
|
|
16
|
-
attr_accessor :created_at
|
|
17
|
-
|
|
18
|
-
# A constant representing the object's type. For this resource it will always be
|
|
19
|
-
# `group`.
|
|
20
|
-
sig { returns(Increase::Group::Type::TaggedSymbol) }
|
|
21
|
-
attr_accessor :type
|
|
22
|
-
|
|
23
|
-
# Groups represent organizations using Increase. You can retrieve information
|
|
24
|
-
# about your own organization via the API. More commonly, OAuth platforms can
|
|
25
|
-
# retrieve information about the organizations that have granted them access.
|
|
26
|
-
# Learn more about OAuth [here](https://increase.com/documentation/oauth).
|
|
27
|
-
sig do
|
|
28
|
-
params(
|
|
29
|
-
id: String,
|
|
30
|
-
created_at: Time,
|
|
31
|
-
type: Increase::Group::Type::OrSymbol
|
|
32
|
-
).returns(T.attached_class)
|
|
33
|
-
end
|
|
34
|
-
def self.new(
|
|
35
|
-
# The Group identifier.
|
|
36
|
-
id:,
|
|
37
|
-
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Group
|
|
38
|
-
# was created.
|
|
39
|
-
created_at:,
|
|
40
|
-
# A constant representing the object's type. For this resource it will always be
|
|
41
|
-
# `group`.
|
|
42
|
-
type:
|
|
43
|
-
)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
sig do
|
|
47
|
-
override.returns(
|
|
48
|
-
{
|
|
49
|
-
id: String,
|
|
50
|
-
created_at: Time,
|
|
51
|
-
type: Increase::Group::Type::TaggedSymbol
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
end
|
|
55
|
-
def to_hash
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# A constant representing the object's type. For this resource it will always be
|
|
59
|
-
# `group`.
|
|
60
|
-
module Type
|
|
61
|
-
extend Increase::Internal::Type::Enum
|
|
62
|
-
|
|
63
|
-
TaggedSymbol = T.type_alias { T.all(Symbol, Increase::Group::Type) }
|
|
64
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
65
|
-
|
|
66
|
-
GROUP = T.let(:group, Increase::Group::Type::TaggedSymbol)
|
|
67
|
-
|
|
68
|
-
sig { override.returns(T::Array[Increase::Group::Type::TaggedSymbol]) }
|
|
69
|
-
def self.values
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
end
|
|
74
|
-
end
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Increase
|
|
4
|
-
module Models
|
|
5
|
-
class GroupRetrieveParams < Increase::Internal::Type::BaseModel
|
|
6
|
-
extend Increase::Internal::Type::RequestParameters::Converter
|
|
7
|
-
include Increase::Internal::Type::RequestParameters
|
|
8
|
-
|
|
9
|
-
OrHash =
|
|
10
|
-
T.type_alias do
|
|
11
|
-
T.any(Increase::GroupRetrieveParams, Increase::Internal::AnyHash)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
sig do
|
|
15
|
-
params(request_options: Increase::RequestOptions::OrHash).returns(
|
|
16
|
-
T.attached_class
|
|
17
|
-
)
|
|
18
|
-
end
|
|
19
|
-
def self.new(request_options: {})
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
sig { override.returns({ request_options: Increase::RequestOptions }) }
|
|
23
|
-
def to_hash
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|