increase 1.362.0 → 1.364.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.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/increase/client.rb +8 -16
  4. data/lib/increase/models/account_number.rb +51 -81
  5. data/lib/increase/models/account_number_create_params.rb +41 -75
  6. data/lib/increase/models/account_number_list_params.rb +39 -39
  7. data/lib/increase/models/account_number_update_params.rb +48 -79
  8. data/lib/increase/models/ach_transfer.rb +38 -23
  9. data/lib/increase/models/card_payment.rb +6 -0
  10. data/lib/increase/models/card_update_params.rb +12 -8
  11. data/lib/increase/models/check_transfer.rb +58 -44
  12. data/lib/increase/models/check_transfer_create_params.rb +35 -21
  13. data/lib/increase/models/checkbook.rb +352 -0
  14. data/lib/increase/models/checkbook_check.rb +100 -0
  15. data/lib/increase/models/checkbook_check_list_params.rb +61 -0
  16. data/lib/increase/models/checkbook_check_retrieve_params.rb +22 -0
  17. data/lib/increase/models/checkbook_check_stop_params.rb +22 -0
  18. data/lib/increase/models/checkbook_create_params.rb +111 -0
  19. data/lib/increase/models/checkbook_list_params.rb +104 -0
  20. data/lib/increase/models/checkbook_retrieve_params.rb +22 -0
  21. data/lib/increase/models/checkbook_stop_params.rb +22 -0
  22. data/lib/increase/models/declined_transaction.rb +10 -1
  23. data/lib/increase/models/entity.rb +1 -65
  24. data/lib/increase/models/entity_create_params.rb +1 -65
  25. data/lib/increase/models/entity_update_params.rb +1 -57
  26. data/lib/increase/models/export.rb +12 -1
  27. data/lib/increase/models/export_create_params.rb +26 -4
  28. data/lib/increase/models/inbound_ach_transfer.rb +6 -6
  29. data/lib/increase/models/inbound_check_deposit.rb +12 -1
  30. data/lib/increase/models/inbound_real_time_payments_transfer.rb +10 -1
  31. data/lib/increase/models/inbound_real_time_payments_transfer_return_params.rb +36 -0
  32. data/lib/increase/models/real_time_decision.rb +65 -1
  33. data/lib/increase/models/real_time_payments_transfer.rb +21 -1
  34. data/lib/increase/models/simulations/checkbook_mail_params.rb +24 -0
  35. data/lib/increase/models/transaction.rb +27 -5
  36. data/lib/increase/models.rb +21 -20
  37. data/lib/increase/resources/account_numbers.rb +19 -16
  38. data/lib/increase/resources/checkbook_checks.rb +90 -0
  39. data/lib/increase/resources/checkbooks.rb +127 -0
  40. data/lib/increase/resources/entities.rb +2 -12
  41. data/lib/increase/resources/inbound_real_time_payments_transfers.rb +28 -0
  42. data/lib/increase/resources/simulations/checkbooks.rb +38 -0
  43. data/lib/increase/resources/simulations.rb +4 -0
  44. data/lib/increase/version.rb +1 -1
  45. data/lib/increase.rb +14 -14
  46. data/rbi/increase/client.rbi +6 -12
  47. data/rbi/increase/models/account_number.rbi +86 -173
  48. data/rbi/increase/models/account_number_create_params.rbi +87 -165
  49. data/rbi/increase/models/account_number_list_params.rbi +106 -105
  50. data/rbi/increase/models/account_number_update_params.rbi +105 -190
  51. data/rbi/increase/models/ach_transfer.rbi +35 -23
  52. data/rbi/increase/models/card_payment.rbi +14 -0
  53. data/rbi/increase/models/card_update_params.rbi +17 -15
  54. data/rbi/increase/models/check_transfer.rbi +72 -54
  55. data/rbi/increase/models/check_transfer_create_params.rbi +55 -21
  56. data/rbi/increase/models/checkbook.rbi +507 -0
  57. data/rbi/increase/models/checkbook_check.rbi +142 -0
  58. data/rbi/increase/models/checkbook_check_list_params.rbi +96 -0
  59. data/rbi/increase/models/{oauth_connection_retrieve_params.rbi → checkbook_check_retrieve_params.rbi} +8 -8
  60. data/rbi/increase/models/{oauth_application_retrieve_params.rbi → checkbook_check_stop_params.rbi} +8 -11
  61. data/rbi/increase/models/checkbook_create_params.rbi +178 -0
  62. data/rbi/increase/models/checkbook_list_params.rbi +198 -0
  63. data/rbi/increase/models/checkbook_retrieve_params.rbi +40 -0
  64. data/rbi/increase/models/checkbook_stop_params.rbi +40 -0
  65. data/rbi/increase/models/declined_transaction.rbi +8 -0
  66. data/rbi/increase/models/entity.rbi +0 -97
  67. data/rbi/increase/models/entity_create_params.rbi +0 -119
  68. data/rbi/increase/models/entity_update_params.rbi +0 -108
  69. data/rbi/increase/models/export.rbi +15 -3
  70. data/rbi/increase/models/export_create_params.rbi +27 -3
  71. data/rbi/increase/models/inbound_ach_transfer.rbi +6 -6
  72. data/rbi/increase/models/inbound_check_deposit.rbi +10 -0
  73. data/rbi/increase/models/inbound_real_time_payments_transfer.rbi +8 -0
  74. data/rbi/increase/models/inbound_real_time_payments_transfer_return_params.rbi +61 -0
  75. data/rbi/increase/models/real_time_decision.rbi +134 -3
  76. data/rbi/increase/models/real_time_payments_transfer.rbi +18 -0
  77. data/rbi/increase/models/simulations/checkbook_mail_params.rbi +45 -0
  78. data/rbi/increase/models/transaction.rbi +33 -3
  79. data/rbi/increase/models.rbi +21 -22
  80. data/rbi/increase/resources/account_numbers.rbi +24 -19
  81. data/rbi/increase/resources/checkbook_checks.rbi +69 -0
  82. data/rbi/increase/resources/checkbooks.rbi +96 -0
  83. data/rbi/increase/resources/entities.rbi +0 -11
  84. data/rbi/increase/resources/inbound_real_time_payments_transfers.rbi +19 -0
  85. data/rbi/increase/resources/simulations/checkbooks.rbi +30 -0
  86. data/rbi/increase/resources/simulations.rbi +3 -0
  87. data/sig/increase/client.rbs +4 -8
  88. data/sig/increase/models/account_number.rbs +34 -66
  89. data/sig/increase/models/account_number_create_params.rbs +30 -64
  90. data/sig/increase/models/account_number_list_params.rbs +44 -44
  91. data/sig/increase/models/account_number_update_params.rbs +39 -77
  92. data/sig/increase/models/ach_transfer.rbs +4 -4
  93. data/sig/increase/models/card_payment.rbs +8 -0
  94. data/sig/increase/models/card_update_params.rbs +7 -11
  95. data/sig/increase/models/check_transfer.rbs +59 -49
  96. data/sig/increase/models/check_transfer_create_params.rbs +20 -12
  97. data/sig/increase/models/checkbook.rbs +272 -0
  98. data/sig/increase/models/checkbook_check.rbs +76 -0
  99. data/sig/increase/models/checkbook_check_list_params.rbs +56 -0
  100. data/sig/increase/models/{oauth_connection_retrieve_params.rbs → checkbook_check_retrieve_params.rbs} +6 -6
  101. data/sig/increase/models/{oauth_application_retrieve_params.rbs → checkbook_check_stop_params.rbs} +6 -6
  102. data/sig/increase/models/checkbook_create_params.rbs +90 -0
  103. data/sig/increase/models/checkbook_list_params.rbs +97 -0
  104. data/sig/increase/models/checkbook_retrieve_params.rbs +23 -0
  105. data/sig/increase/models/checkbook_stop_params.rbs +23 -0
  106. data/sig/increase/models/declined_transaction.rbs +5 -0
  107. data/sig/increase/models/entity.rbs +0 -46
  108. data/sig/increase/models/entity_create_params.rbs +0 -55
  109. data/sig/increase/models/entity_update_params.rbs +0 -48
  110. data/sig/increase/models/export.rbs +13 -3
  111. data/sig/increase/models/export_create_params.rbs +7 -0
  112. data/sig/increase/models/inbound_check_deposit.rbs +5 -0
  113. data/sig/increase/models/inbound_real_time_payments_transfer.rbs +5 -0
  114. data/sig/increase/models/inbound_real_time_payments_transfer_return_params.rbs +30 -0
  115. data/sig/increase/models/real_time_decision.rbs +69 -3
  116. data/sig/increase/models/real_time_payments_transfer.rbs +10 -0
  117. data/sig/increase/models/simulations/checkbook_mail_params.rbs +25 -0
  118. data/sig/increase/models/transaction.rbs +26 -5
  119. data/sig/increase/models.rbs +20 -20
  120. data/sig/increase/resources/account_numbers.rbs +5 -5
  121. data/sig/increase/resources/checkbook_checks.rbs +26 -0
  122. data/sig/increase/resources/checkbooks.rbs +33 -0
  123. data/sig/increase/resources/entities.rbs +0 -3
  124. data/sig/increase/resources/inbound_real_time_payments_transfers.rbs +6 -0
  125. data/sig/increase/resources/simulations/checkbooks.rbs +14 -0
  126. data/sig/increase/resources/simulations.rbs +2 -0
  127. metadata +45 -45
  128. data/lib/increase/models/group.rb +0 -57
  129. data/lib/increase/models/group_retrieve_params.rb +0 -14
  130. data/lib/increase/models/oauth_application.rb +0 -111
  131. data/lib/increase/models/oauth_application_list_params.rb +0 -129
  132. data/lib/increase/models/oauth_application_retrieve_params.rb +0 -22
  133. data/lib/increase/models/oauth_connection.rb +0 -107
  134. data/lib/increase/models/oauth_connection_list_params.rb +0 -88
  135. data/lib/increase/models/oauth_connection_retrieve_params.rb +0 -22
  136. data/lib/increase/models/oauth_token.rb +0 -76
  137. data/lib/increase/models/oauth_token_create_params.rb +0 -85
  138. data/lib/increase/resources/groups.rb +0 -32
  139. data/lib/increase/resources/oauth_applications.rb +0 -68
  140. data/lib/increase/resources/oauth_connections.rb +0 -70
  141. data/lib/increase/resources/oauth_tokens.rb +0 -54
  142. data/rbi/increase/models/group.rbi +0 -74
  143. data/rbi/increase/models/group_retrieve_params.rbi +0 -27
  144. data/rbi/increase/models/oauth_application.rbi +0 -146
  145. data/rbi/increase/models/oauth_application_list_params.rbi +0 -263
  146. data/rbi/increase/models/oauth_connection.rbi +0 -142
  147. data/rbi/increase/models/oauth_connection_list_params.rbi +0 -187
  148. data/rbi/increase/models/oauth_token.rbi +0 -106
  149. data/rbi/increase/models/oauth_token_create_params.rbi +0 -133
  150. data/rbi/increase/resources/groups.rbi +0 -21
  151. data/rbi/increase/resources/oauth_applications.rbi +0 -50
  152. data/rbi/increase/resources/oauth_connections.rbi +0 -52
  153. data/rbi/increase/resources/oauth_tokens.rbi +0 -44
  154. data/sig/increase/models/group.rbs +0 -36
  155. data/sig/increase/models/group_retrieve_params.rbs +0 -15
  156. data/sig/increase/models/oauth_application.rbs +0 -74
  157. data/sig/increase/models/oauth_application_list_params.rbs +0 -123
  158. data/sig/increase/models/oauth_connection.rbs +0 -74
  159. data/sig/increase/models/oauth_connection_list_params.rbs +0 -86
  160. data/sig/increase/models/oauth_token.rbs +0 -55
  161. data/sig/increase/models/oauth_token_create_params.rbs +0 -68
  162. data/sig/increase/resources/groups.rbs +0 -11
  163. data/sig/increase/resources/oauth_applications.rbs +0 -20
  164. data/sig/increase/resources/oauth_connections.rbs +0 -20
  165. data/sig/increase/resources/oauth_tokens.rbs +0 -16
@@ -1,107 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Increase
4
- module Models
5
- # @see Increase::Resources::OAuthConnections#retrieve
6
- class OAuthConnection < Increase::Internal::Type::BaseModel
7
- # @!attribute id
8
- # The OAuth Connection's identifier.
9
- #
10
- # @return [String]
11
- required :id, String
12
-
13
- # @!attribute created_at
14
- # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the OAuth
15
- # Connection was created.
16
- #
17
- # @return [Time]
18
- required :created_at, Time
19
-
20
- # @!attribute deleted_at
21
- # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the OAuth
22
- # Connection was deleted.
23
- #
24
- # @return [Time, nil]
25
- required :deleted_at, Time, nil?: true
26
-
27
- # @!attribute group_id
28
- # The identifier of the Group that has authorized your OAuth application.
29
- #
30
- # @return [String]
31
- required :group_id, String
32
-
33
- # @!attribute oauth_application_id
34
- # The identifier of the OAuth application this connection is for.
35
- #
36
- # @return [String]
37
- required :oauth_application_id, String
38
-
39
- # @!attribute status
40
- # Whether the connection is active.
41
- #
42
- # @return [Symbol, Increase::Models::OAuthConnection::Status]
43
- required :status, enum: -> { Increase::OAuthConnection::Status }
44
-
45
- # @!attribute type
46
- # A constant representing the object's type. For this resource it will always be
47
- # `oauth_connection`.
48
- #
49
- # @return [Symbol, Increase::Models::OAuthConnection::Type]
50
- required :type, enum: -> { Increase::OAuthConnection::Type }
51
-
52
- # @!method initialize(id:, created_at:, deleted_at:, group_id:, oauth_application_id:, status:, type:)
53
- # When a user authorizes your OAuth application, an OAuth Connection object is
54
- # created. Learn more about OAuth
55
- # [here](https://increase.com/documentation/oauth).
56
- #
57
- # @param id [String] The OAuth Connection's identifier.
58
- #
59
- # @param created_at [Time]
60
- # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the OAuth
61
- # Connection was created.
62
- #
63
- # @param deleted_at [Time, nil]
64
- # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the OAuth
65
- # Connection was deleted.
66
- #
67
- # @param group_id [String] The identifier of the Group that has authorized your OAuth application.
68
- #
69
- # @param oauth_application_id [String] The identifier of the OAuth application this connection is for.
70
- #
71
- # @param status [Symbol, Increase::Models::OAuthConnection::Status] Whether the connection is active.
72
- #
73
- # @param type [Symbol, Increase::Models::OAuthConnection::Type]
74
- # A constant representing the object's type. For this resource it will always be
75
- # `oauth_connection`.
76
-
77
- # Whether the connection is active.
78
- #
79
- # @see Increase::Models::OAuthConnection#status
80
- module Status
81
- extend Increase::Internal::Type::Enum
82
-
83
- # The OAuth connection is active.
84
- ACTIVE = :active
85
-
86
- # The OAuth connection is permanently deactivated.
87
- INACTIVE = :inactive
88
-
89
- # @!method self.values
90
- # @return [Array<Symbol>]
91
- end
92
-
93
- # A constant representing the object's type. For this resource it will always be
94
- # `oauth_connection`.
95
- #
96
- # @see Increase::Models::OAuthConnection#type
97
- module Type
98
- extend Increase::Internal::Type::Enum
99
-
100
- OAUTH_CONNECTION = :oauth_connection
101
-
102
- # @!method self.values
103
- # @return [Array<Symbol>]
104
- end
105
- end
106
- end
107
- end
@@ -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